blob: ee6a1eba7dd59be046206a4f815bbf7b609652ad [file] [log] [blame]
Mark Wielaard9535e6b2018-03-14 22:45:56 +010012018-03-23 Mark Wielaard <mark@klomp.org>
2
3 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
4 increase size.
5 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
6 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
7 (__libdw_cu_str_off_base): New function.
8 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
9 as stroffsetsptr.
10 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
11 (struct Dwarf_CU): Add str_off_base field.
12 (__libdw_cu_str_off_base): New function declaration.
13
Mark Wielaard4a97eb02017-11-24 11:18:39 +0100142018-03-22 Mark Wielaard <mark@klomp.org>
15
16 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
17 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
18 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
19 (__libdw_cu_addr_base): New function.
20 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
21 addrptr.
22 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
23 (struct Dwarf_CU): Add addr_base field.
24 (__libdw_cu_addr_base): New function definition.
25 * memory-access.h (file_byte_order): New static function.
26 (read_3ubyte_unaligned): New inline function.
27
Mark Wielaard402b7f72018-03-29 14:09:12 +0200282018-03-29 Mark Wielaard <mark@klomp.org>
29
30 * libdw.h (dwarf_decl_file): Extend documentation.
31 (dwarf_linesrc): Likewise.
32 (dwarf_filesrc): Likewise.
33
Mark Wielaard86fbef92017-11-15 12:13:38 +0100342018-03-06 Mark Wielaard <mark@klomp.org>
35
36 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
37 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
38 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
39 DW_OP_reinterpret.
40 * dwarf_getlocation.c (__libdw_intern_expression): Handle
41 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
42 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
43 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
44 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
45 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
46 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
47 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
48 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
49 DW_OP_xderef_type.
50 * dwarf_getlocation_implicit_pointer.c
51 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
52
Mark Wielaardfd0cee62018-03-01 00:14:52 +0100532018-03-01 Mark Wielaard <mark@klomp.org>
54
55 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
56 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
57 as a loclistptr.
58
Mark Wielaard8961f332017-11-26 17:51:11 +0100592018-02-09 Mark Wielaard <mark@klomp.org>
60
Mark Wielaard8e5e7892017-12-28 17:44:06 +010061 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
62 16 byte block.
63
642018-02-09 Mark Wielaard <mark@klomp.org>
65
Mark Wielaard8961f332017-11-26 17:51:11 +010066 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
67 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
68 * dwarf_formudata.c (dwarf_formudata): Likewise.
69 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
70 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
71 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
72 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
73 that will also return any data associated with the abbrev. Which
74 currently is only for DW_FORM_implicit_const. Based on...
75 (dwarf_getabbrevattr): ... this function. Which now just calls
76 dwarf_getabbrevattr_data.
77 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
78 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
79 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
80 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
81 function based on __libdw_get_uleb128_unchecked.
82
Mark Wielaardeb11b0f2017-11-26 17:40:56 +0100832018-02-08 Mark Wielaard <mark@klomp.org>
84
85 * dwarf.h: Add DWARF5 DW_FORMs.
86 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
87 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
88 DW_FORM_ref_sup[48] and DW_FORM_data16.
89 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
90 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
91 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
92
Mark Wielaard79f0e622018-01-30 12:05:57 +0100932018-01-30 Mark Wielaard <mark@klomp.org>
94
95 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
96 * dwarf_get_units.c: New file.
97 * libdw.h (dwarf_get_units): New function declaration.
98 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
99
Mark Wielaard532ab1e2018-01-29 15:59:05 +01001002018-01-29 Mark Wielaard <mark@klomp.org>
101
102 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
103 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
104 is now called unit_idp. type_offsetp is now called subdie_offsetp.
105 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
106 and .debug_types sections for type units when type signature ref
107 not found.
108 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
109 __libdw_first_die_off_from_cu instead of trying by hand.
110 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
111 instead of checking type_offset by hand.
112 * dwarf_getlocation_implicit_pointer.c
113 (dwarf_getlocation_implicit_pointer): Likewise.
114 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
115 (__libdw_next_unit): New function based on dwarf_next_unit with
116 DWARF5 header support.
117 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
118 and type_sig8 to unit_id8.
119 (ISV4TU): New macro to determine whether a CU is a version 4 type
120 unit (which comes from the .debug_types section).
121 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
122 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
123 unit headers.
124 (__libdw_first_die_off_from_cu): New function that calls the above
125 using the CU fields.
126 (CUDIE): Use __libdw_first_die_off_from_cu.
127 (SUBDIE): New macro that provides the DIE for a CU using the
128 subdie_offset.
129 (__libdw_next_unit): New internal function declaration.
130 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
131 Accept DWARF version 5 headers. Setup unit_type.
132 (__libdw_findcu): Rename debug_types argument to v4_debug_types
133 argument (to indicate that we are looking in the .debug_types
134 section). Support finding the exact offset (unit header start).
135
Mark Wielaard212b4e32018-01-25 01:13:10 +01001362018-01-25 Mark Wielaard <mark@klomp.org>
137
138 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
139 * dwarf_die_addr_die.c: New file.
140 * libdw.h (dwarf_die_addr_die): New function declaration.
141 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
142 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
143 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
144
Joshua Watt555e15e2018-02-09 10:27:18 -06001452018-02-09 Joshua Watt <JPEWhacker@gmail.com>
146
147 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
148 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
149
Mark Wielaard240a0682018-01-19 23:59:21 +01001502018-01-22 Mark Wielaard <mark@klomp.org>
151
152 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
153 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
154 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
155 and alt_fd if we allocated them.
156 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
157 * dwarf_formstring.c (dwarf_formstring): Likewise.
158 * dwarf_getalt.c (__libdw_filepath): New internal function.
159 (find_debug_altlink): New static function.
160 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
161 Cache result.
162 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
163 if we allocated.
164 * libdw.h (dwarf_getalt): Extend documentation.
165 (dwarf_setalt): Likewise.
166 * libdwP.h (struct Dwarf): Add alt_fd field.
167 (filepath): Declare new internal function.
168
Petr Machata1e2c8862018-01-14 03:22:05 +01001692018-01-14 Petr Machata <pmachata@gmail.com>
170
171 * dwarf_formsdata.c (dwarf_formsdata):
172 <DW_FORM_data1>: Cast to signed char.
173 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
174 read_*ubyte_unaligned.
175
Mark Wielaardbfb21172017-12-26 11:52:06 +01001762017-12-26 Mark Wielaard <mark@klomp.org>
177
Mark Wielaardc09d6112017-12-26 16:49:46 +0100178 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
179 use bitfields for has_children and code.
180 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
181 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
182
1832017-12-26 Mark Wielaard <mark@klomp.org>
184
Mark Wielaardbfb21172017-12-26 11:52:06 +0100185 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
186 (get_uleb128_unchecked): New define.
187 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
188 read attr name and form.
189 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
190 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
191 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
192
Mark Wielaard4af2f2e2017-12-29 00:34:14 +01001932017-12-28 Mark Wielaard <mark@klomp.org>
194
195 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
196
Ulf Hermann0d100f62017-05-09 18:28:33 +02001972017-05-09 Ulf Hermann <ulf.hermann@qt.io>
198 Mark Wielaard <mark@klomp.org>
199
200 * libdwP.h (__libdw_in_section): Fix check for the upper border of
201 the range.
202 (__libdw_offset_in_section): Likewise.
203
Mark Wielaard51a72922017-12-20 16:50:57 +01002042017-12-20 Mark Wielaard <mark@klomp.org>
205
206 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
207 (cu_sec_idx): Return cu->sec_idx.
208 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
209 IDX_debug_info or IDX_debug_types.
210 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
211 IDX_debug_loc.
212 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
213 IDX_debug_macro or IDX_debug_macinfo.
214
Mark Wielaardc25dc622017-12-11 23:58:34 +01002152017-12-12 Mark Wielaard <mark@klomp.org>
216
217 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
218 given DIE. Reserve memory for a new DIE first.
219
Dima Kogana2246aa2017-12-08 01:45:10 -08002202017-12-11 Dima Kogan <dima@secretsauce.net>
221
222 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
223 arrays properly.
224
Mark Wielaarde23c7132017-11-02 16:23:24 +01002252017-11-03 Mark Wielaard <mark@klomp.org>
226
Mark Wielaardafda91c2017-11-02 16:24:41 +0100227 * dwarf_getlocation.c (__libdw_intern_expression): Handle
228 DW_OP_GNU_variable_value.
229 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
230 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
231
2322017-11-03 Mark Wielaard <mark@klomp.org>
233
Mark Wielaard7286e5c2017-11-02 16:24:17 +0100234 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
235 Update list of acceptable attribute codes based on DWARF5.
236
2372017-11-03 Mark Wielaard <mark@klomp.org>
238
Mark Wielaarde23c7132017-11-02 16:23:24 +0100239 * dwarf.h: Add DW_OP_GNU_variable_value.
240
Mark Wielaard73411842017-10-03 23:08:01 +02002412017-10-03 Mark Wielaard <mark@klomp.org>
242
243 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
244
Ulf Hermann17d71942017-08-18 14:05:10 +02002452017-08-18 Ulf Hermann <ulf.hermann@qt.io>
246
247 * memory-access.h: Use attribute_packed.
248
Ulf Hermann07737582017-08-18 12:41:11 +02002492017-02-27 Ulf Hermann <ulf.hermann@qt.io>
250
Ulf Hermann11274702017-08-18 13:06:36 +0200251 * libdwP.h: Use attribute_hidden.
252 * libdw_alloc.c: Likewise.
253
2542017-02-27 Ulf Hermann <ulf.hermann@qt.io>
255
Ulf Hermann07737582017-08-18 12:41:11 +0200256 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
257
Mark Wielaard2d906d82017-07-26 17:38:22 +02002582017-07-26 Mark Wielaard <mark@klomp.org>
259
Mark Wielaardf9d791a2017-07-26 23:02:18 +0200260 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
261 * dwarf_getmacros.c (get_table_for_offset): Accept either version
262 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
263 (read_macros): Use table version for fake_cu.
264
2652017-07-26 Mark Wielaard <mark@klomp.org>
266
Mark Wielaard274f28c2017-07-26 22:54:59 +0200267 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
268 DW_TAG_packed_type and DW_TAG_shared_type.
269 * libdw.h (dwarf_peel_type): Extend documentation.
270
2712017-07-26 Mark Wielaard <mark@klomp.org>
272
Mark Wielaard02e30932017-07-26 18:32:27 +0200273 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
274 DW_DEFAULTED_out_of_class.
275
2762017-07-26 Mark Wielaard <mark@klomp.org>
277
Mark Wielaard75834f32017-07-26 18:15:20 +0200278 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
279
2802017-07-26 Mark Wielaard <mark@klomp.org>
281
Mark Wielaard2eb1e342017-07-26 18:06:21 +0200282 * dwarf_default_lower_bound.c: New file.
283 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
284 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
285 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
286 * libdw.h: Add dwarf_default_lower_bound.
287 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
288 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
289 dwarf_default_lower_bound INTDECL.
290
2912017-07-26 Mark Wielaard <mark@klomp.org>
292
Mark Wielaardd14fd3b2017-07-26 17:44:29 +0200293 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
294 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
295 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
296 * dwarf_aggregate_size.c (array_size): Add lower bound for
297 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
298 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
299 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
300 DW_LANG_Julia and DW_LANG_BLISS.
301
3022017-07-26 Mark Wielaard <mark@klomp.org>
303
Mark Wielaard2d906d82017-07-26 17:38:22 +0200304 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
305
Mark Wielaard8e9c76b2017-07-25 15:29:10 +02003062017-07-25 Mark Wielaard <mark@klomp.org>
307
Mark Wielaard9619d342017-07-26 17:06:07 +0200308 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
309 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
310 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
311 for currently unused numbers.
312
3132017-07-25 Mark Wielaard <mark@klomp.org>
314
Mark Wielaard8e9c76b2017-07-25 15:29:10 +0200315 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
316 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
317 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
318
Mark Wielaardc24b9002017-07-21 21:23:07 +02003192017-07-21 Mark Wielaard <mark@klomp.org>
320
321 * dwarf_line_file.c: New file.
322 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
323 * libdw.h (dwarf_line_file): New function declaration.
324 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
325
Ulf Hermann8abf0b52017-02-17 16:11:28 +01003262017-02-17 Ulf Hermann <ulf.hermann@qt.io>
327
328 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
329 made of, libdw_so_DEPS for libraries it depends on (including
330 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
331 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
332 library dependencies, use libdw_so_LIBS rather than relying on the
333 order of dependencies specified, add -z,relro.
334
Ulf Hermann037be822017-04-20 17:07:37 +02003352017-04-20 Ulf Hermann <ulf.hermann@qt.io>
336
Ulf Hermannc73a00d2017-04-20 15:55:47 +0200337 * libdw.h: Remove attribute macro declarations and use
338 __noreturn_attribute__ as defined in libelf.h.
339
3402017-04-20 Ulf Hermann <ulf.hermann@qt.io>
341
Ulf Hermann037be822017-04-20 17:07:37 +0200342 * dwarf_begin_elf.c: Include endian.h.
343
Mark Wielaardf339da92017-03-30 12:19:53 +02003442017-03-30 Mark Wielaard <mjw@redhat.com>
345
346 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
347 result.
348
Mark Wielaardee38b262016-10-22 19:18:51 +02003492016-10-22 Mark Wielaard <mjw@redhat.com>
350
351 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
352 * dwarf_aggregate_size.c (array_size): Use correct spelling of
353 DW_LANG_PLI.
354
Mark Wielaarda3cc8182016-11-02 13:29:26 +01003552016-11-02 Mark Wielaard <mjw@redhat.com>
356
357 * cfi.c (execute_cfi): Add fallthrough comments.
358 * encoded-value.h (encoded_value_size): Add explicit return instead
359 of relying on fallthrough.
360 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
361 comment.
362
3632016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Akihiko Odaki60b2bf12016-10-11 23:06:48 +0900364
365 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
366 * libdw_alloc.c: Likewise.
367
Mark Wielaarddd906c12016-07-08 14:08:22 +02003682016-07-08 Mark Wielaard <mjw@redhat.com>
369
370 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
371 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
372 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
373
Mark Wielaarde93e6f92016-02-13 19:36:50 +01003742016-02-13 Mark Wielaard <mjw@redhat.com>
375
376 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
377 assign to ndirlist.
378
Mark Wielaardc495d752015-12-30 14:18:40 +01003792015-12-18 Mark Wielaard <mjw@redhat.com>
380
381 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
382 (__libdw_free_zdata): Remove.
383 * dwarf_begin_elf.c (inflate_section): Remove.
384 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
385 and elf_compress_gnu to decompress if necessary.
386 (valid_p): Remove __libdw_free_zdata calls.
387 (scngrp_read): Use elf_compress if section is compressed. Remove
388 __libdw_free_zdata calls.
389 * dwarf_end.c (__libdw_free_zdata): Remove.
390 (dwarf_end): Don't call __libdw_free_zdata.
391
Mark Wielaard0c32b6f2015-11-17 23:52:39 +01003922015-10-28 Mark Wielaard <mjw@redhat.com>
393
394 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
395
Mark Wielaard8bbfc552015-12-02 17:07:40 +01003962015-12-02 Mark Wielaard <mjw@redhat.com>
397
398 * fde.c (intern_fde): Don't leak duplicate FDEs.
399
Mark Wielaarddb30f8b2015-12-01 15:21:55 +01004002015-12-01 Mark Wielaard <mjw@redhat.com>
401
Mark Wielaarde04da0e2015-12-02 00:21:07 +0100402 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
403 valid code range.
404
4052015-12-01 Mark Wielaard <mjw@redhat.com>
406
Mark Wielaarddb30f8b2015-12-01 15:21:55 +0100407 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
408
Chih-Hung Hsieh454a8282015-10-14 12:23:34 -07004092015-10-14 Chih-Hung Hsieh <chh@google.com>
410
Chih-Hung Hsiehe0b020f2015-10-14 12:30:11 -0700411 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
412 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
413
4142015-10-14 Chih-Hung Hsieh <chh@google.com>
415
Chih-Hung Hsieh454a8282015-10-14 12:23:34 -0700416 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
417 function 'walk_children' to file scope; inline 'recurse' at its call
418 site.
419
Mark Wielaarde2cf85c2015-11-19 12:37:08 +01004202015-10-19 Mark Wielaard <mjw@redhat.com>
421
422 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
423 if necessary.
424
Dmitry V. Levinb47fb232015-11-16 18:11:23 +03004252015-10-16 Dmitry V. Levin <ldv@altlinux.org>
426
427 * dwarf_getsrclines.c (read_srclines): Initialize state early.
428
Chih-Hung Hsiehb926e562015-10-13 15:26:14 -07004292015-10-13 Chih-Hung Hsieh <chh@google.com>
430
Chih-Hung Hsiehf8443bd2015-10-13 15:26:14 -0700431 * dwarf_getsrclines.c (read_srclines): Move nested functions
432 'advance_pc' and 'add_new_line' to file scope and keep many
433 local state variables within one structure.
434
4352015-10-13 Chih-Hung Hsieh <chh@google.com>
436
Chih-Hung Hsiehb926e562015-10-13 15:26:14 -0700437 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
438 function 'file_matches' to file scope.
439
Mark Wielaard528cb452015-10-16 23:07:12 +02004402015-10-16 Mark Wielaard <mjw@redhat.com>
441
442 * Makefile.am (libdw.so): Add -lz.
443
Chih-Hung Hsieh34bb96a2015-10-14 11:59:53 -07004442015-10-14 Chih-Hung Hsieh <chh@google.com>
445
446 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
447 and 'require_cfa_offset' to file scope.
448
Josh Stone34254542015-10-09 10:10:37 -07004492015-10-09 Josh Stone <jistone@redhat.com>
450
451 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
452 and fstat.
453
Josh Stonedaee4712015-10-05 11:04:15 -07004542015-10-05 Josh Stone <jistone@redhat.com>
455
456 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
457
Jose E. Marchesi133509f2015-10-05 17:36:30 +02004582015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
459
460 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
461 relocation overflows in some platforms.
462
Mark Wielaardd8698e52015-09-23 20:44:06 +02004632015-09-23 Mark Wielaard <mjw@redhat.com>
464
465 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
466 * dwarf_formref.c (__libdw_formref): Likewise.
467 * libdw_findcu.c (__libdw_findcu): Likewise.
468 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
469
Mark Wielaard1ccdfb62015-09-22 22:27:01 +02004702015-09-22 Mark Wielaard <mjw@redhat.com>
471
472 * *.c: Remove old-style function definitions.
473
Mark Wielaarddd8bd912015-09-15 10:55:10 +02004742015-09-15 Mark Wielaard <mjw@redhat.com>
475
476 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
477
Chih-Hung Hsieh2d982862015-09-09 12:32:07 -07004782015-09-09 Chih-Hung Hsieh <chh@google.com>
479
480 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
481 redundant NULL tests on parameters declared with __nonnull_attribute__.
482 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
483 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
484
Chih-Hung Hsiehaa1c2ca2015-09-04 12:04:11 -07004852015-09-04 Chih-Hung Hsieh <chh@google.com>
Chih-Hung Hsiehf6b93912015-09-04 12:04:11 -0700486 Mark Wielaard <mjw@redhat.com>
487
488 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
489 definition with ansi-C definition and add const qualifier to
490 locs argument.
491
4922015-09-04 Chih-Hung Hsieh <chh@google.com>
Chih-Hung Hsiehaa1c2ca2015-09-04 12:04:11 -0700493
494 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
495 definition with ansi-C definitions.
496 (__libdw_findcu): Likewise.
497
Mark Wielaarda74bdbd2015-08-25 15:11:01 +02004982015-08-25 Mark Wielaard <mjw@redhat.com>
499
500 * dwarf.h: Add DW_LANG_Haskell.
501
Mark Wielaard1dcbe0c2015-06-18 10:38:12 +02005022015-06-18 Mark Wielaard <mjw@redhat.com>
503
Mark Wielaard85cc9c62015-06-18 11:50:50 +0200504 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
505 to hold a Dwarf.
506
5072015-06-18 Mark Wielaard <mjw@redhat.com>
508
Mark Wielaard65e58822015-06-18 10:41:42 +0200509 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
510
5112015-06-18 Mark Wielaard <mjw@redhat.com>
512
Mark Wielaard1dcbe0c2015-06-18 10:38:12 +0200513 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
514 dwarf_formudata reports an error.
515 (get_table_for_offset): Likewise.
516
Mark Wielaard9e3d5c22015-06-09 00:31:25 +02005172015-06-08 Mark Wielaard <mjw@redhat.com>
518
519 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
520
Mark Wielaard20956b82015-06-03 17:42:38 +02005212015-06-06 Mark Wielaard <mjw@redhat.com>
522
523 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
524
Mark Wielaard1ae83ee2015-05-27 14:05:15 +02005252015-05-27 Mark Wielaard <mjw@redhat.com>
526
527 * encoded-value.h (read_encoded_value): Check data d_size contains
528 at least enough data to hold a pointer for DW_EH_PE_indirect.
529
Mark Wielaarde69f59c2015-05-22 23:33:56 +02005302015-05-22 Mark Wielaard <mjw@redhat.com>
531
532 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
533 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
534 MAX_STACK_DIRS. Calculate number of dirs needed first, then
535 create dirarray directly, without needing the next field. Free
536 not stack allocated lines and files at the end.
537
Mark Wielaard720f83a2015-05-19 11:52:58 +02005382015-05-19 Mark Wielaard <mjw@redhat.com>
539
540 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
541 allocated array to hold locs. Allocate locs bigger than the array
542 with malloc and free them when done.
543
Jonathan Lebon90659072015-05-11 15:38:13 -04005442015-05-11 Jonathan Lebon <jlebon@redhat.com>
545
Jonathan Lebon987e3d72015-05-11 15:38:14 -0400546 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
547 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
548 * dwarf_begin_elf.c (inflate_section): New static function, lifted
549 from...
550 (check_section): ... here. Call inflate_section, set libdw errno to
551 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
552
5532015-05-11 Jonathan Lebon <jlebon@redhat.com>
554
Jonathan Lebon90659072015-05-11 15:38:13 -0400555 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
556 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
557
Mark Wielaarddedb5e72015-05-06 12:55:21 +02005582015-05-06 Mark Wielaard <mjw@redhat.com>
559
560 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
561 check the line number.
562
Mark Wielaardae029162015-05-05 10:16:42 +02005632015-05-05 Mark Wielaard <mjw@redhat.com>
564
565 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
566 left before reading values.
567
Anthony G. Basile1ab3c2b2015-05-04 02:25:39 +03005682015-05-04 Anthony G. Basile <blueness@gentoo.org>
569
570 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
571 command.
572
Mark Wielaard65a211f2015-04-22 12:28:30 +02005732015-04-22 Mark Wielaard <mjw@redhat.com>
574
575 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
576 (__libdw_max_len_uleb128): New function.
577 (__libdw_max_len_sleb128): Likewise.
578 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
579 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
580
Mark Wielaardf98b99d2015-04-21 15:46:01 +02005812015-04-21 Mark Wielaard <mjw@redhat.com>
582
583 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
584 when there are more than 8.
585
Petr Machata71de1d22015-04-01 21:44:32 +02005862015-04-01 Petr Machata <pmachata@redhat.com>
587
588 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
589 (is_cudie): New function.
590 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
591 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
592 of white-listing valid tags.
593 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
594
Petr Machata7f617342015-03-18 19:42:02 +01005952015-03-18 Petr Machata <pmachata@redhat.com>
596
597 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
598 (EXTRA_DIST): Remove known-dwarf.h.
599
Mark Wielaard7fb80312015-02-09 16:24:04 +01006002015-02-09 Mark Wielaard <mjw@redhat.com>
601
Mark Wielaardd3c816d2015-02-09 16:47:08 +0100602 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
603 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
604 for new Fortran language codes is 1.
605
6062015-02-09 Mark Wielaard <mjw@redhat.com>
607
Mark Wielaard7fb80312015-02-09 16:24:04 +0100608 * dwarf.h: Add DW_TAG_atomic_type.
609 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
610 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
611
Josh Stone031db7c2015-02-11 13:53:14 -08006122015-02-11 Josh Stone <jistone@redhat.com>
613
614 * encoded-value.h (read_encoded_value): Initialize value.
615
Petr Machatab4da85d2015-02-11 22:11:46 +01006162015-02-11 Petr Machata <pmachata@redhat.com>
617
618 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
619 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
620 the fact in *BASEP and bail out later if it hasn't been updated by
621 __libdw_read_begin_end_pair_inc.
622
Mark Wielaardddbf23a2014-12-24 13:17:23 +01006232014-12-24 Mark Wielaard <mjw@redhat.com>
624
625 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
626 smaller than or equal to addr, rather than returning immediately on
627 a match.
628
Mark Wielaardb4b2de92015-01-07 23:39:28 +01006292015-01-07 Mark Wielaard <mjw@redhat.com>
630
631 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
632 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
633 room in the search table for all entries. Store search_table_len.
634 (getcfi_scn_eh_frame): Likewise.
635 * encoded-value.h (encoded_value_size): Don't abort, return zero.
636 (__libdw_cfi_read_address_inc): Check there is enough room to read
637 values. Pass other byte order to read functions.
638 (read_encoded_value): Check encoded_value_size. Don't abort, but
639 set libdw errno and report failure. Check there is enough room to
640 read values.
641 * fde.c (binary_search_fde): Check encoded value size. Add hdr
642 data buf and size to dummy_cfi.
643
Mark Wielaarda1ea2422015-01-04 16:08:22 +01006442015-01-04 Mark Wielaard <mjw@redhat.com>
645
Mark Wielaard43e924e2015-01-05 00:03:03 +0100646 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
647 is after current DIE.
648
6492015-01-04 Mark Wielaard <mjw@redhat.com>
650
Mark Wielaarda1ea2422015-01-04 16:08:22 +0100651 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
652 (dwarf_frame_register).
653
Mark Wielaard5316e412015-01-03 00:09:45 +01006542015-01-02 Mark Wielaard <mjw@redhat.com>
655
Mark Wielaard9ceebe62015-01-03 00:27:58 +0100656 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
657 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
658 (getcfi_scn_eh_frame): Check d_buf is not NULL.
659
6602015-01-02 Mark Wielaard <mjw@redhat.com>
661
Mark Wielaard5316e412015-01-03 00:09:45 +0100662 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
663 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
664 DW_OP_addr if dbg is NULL then read argument directly.
665
Jason P. Leasure7c713822015-01-14 09:26:55 -05006662015-01-14 Jason P. Leasure <jpleasu@super.org>
667
668 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
669 plus cu->start.
670
Mark Wielaard3fa17962014-12-27 12:13:50 +01006712014-12-27 Mark Wielaard <mjw@redhat.com>
672
673 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
674 still falls inside CU data.
675
Mark Wielaarddaf278f2015-01-11 15:00:52 +01006762015-01-11 Mark Wielaard <mjw@redhat.com>
677
678 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
679 __libdw_visit_scopes with NULL imports.
680 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
681 * dwarf_getscopes.c (pc_record): Likewise.
682 (dwarf_getscopes): Likewise.
683 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
684 * libdwP.h (__libdw_visit_scopes): Add imports argument.
685 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
686 function imports_contains. Push and pop imports around walk_children
687 when processing DW_TAG_imported_unit.
688
Ulrich Drepper898ed262014-12-18 12:32:39 -05006892014-12-18 Ulrich Drepper <drepper@gmail.com>
690
691 * Makefile.am: Suppress output of textrel_check command.
692
Mark Wielaardff1ce972014-12-16 16:10:28 +01006932014-12-16 Mark Wielaard <mjw@redhat.com>
694
Mark Wielaardecd78d32014-12-16 22:47:39 +0100695 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
696 DW_LNE_define_file.
697
6982014-12-16 Mark Wielaard <mjw@redhat.com>
699
Mark Wielaard7f9ea702014-12-16 16:41:19 +0100700 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
701 space to read die offset.
702
7032014-12-16 Mark Wielaard <mjw@redhat.com>
704
Mark Wielaardff1ce972014-12-16 16:10:28 +0100705 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
706 unit_length.
707
Mark Wielaard38648042014-12-15 14:56:07 +01007082014-12-15 Mark Wielaard <mjw@redhat.com>
709
710 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
Mark Wielaard138a9ba2014-12-15 16:56:49 +0100711 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
Mark Wielaard38648042014-12-15 14:56:07 +0100712 (dwarf_getpubnames): Make sure section data contains string zero
713 terminator.
714
Mark Wielaard1b5477d2014-12-16 10:53:22 +01007152014-12-16 Mark Wielaard <mjw@redhat.com>
716
717 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
718 the compiler optimize for the common single-byte case.
719
Josh Stone54662f12014-12-15 12:18:25 -08007202014-12-15 Josh Stone <jistone@redhat.com>
721
722 * memory-access.h (__libdw_max_len_leb128): New.
723 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
724 (__libdw_get_sleb128): Likewise.
725
Mark Wielaard7a053472014-12-14 21:48:23 +01007262014-12-14 Mark Wielaard <mjw@redhat.com>
727
728 * cfi.c (execute_cfi): Add program bounds checks.
729 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
730 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
731 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
732 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
733 * dwarf_formudata.c (dwarf_formudata): Likewise.
734 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
735 with end of data buf.
736 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
737 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
738 call gets enough data.
739 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
740 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
741 with enough data.
742 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
743 end_data.
744 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
745 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
746 get_uleb128 with lineendp.
747 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
748 get_uleb128 with endp.
749 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
750 get_uleb128/get_sleb128 with limit.
751 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
752 get_sleb128 get called with enough data.
753 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
754 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
755 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
756 endp.
757 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
758 Don't call get_uleb128_step if out of data.
759 (__libdw_get_sleb128): Likewise for get_sleb128_step.
760
Mark Wielaard92026652014-12-12 16:43:04 +01007612014-12-12 Mark Wielaard <mjw@redhat.com>
762
763 * libdwP.h (struct Dwarf): Add fake_loc_cu.
764 (cu_data): Removed.
765 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
766 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
767 (__libdw_form_val_len): Likewise.
768 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
769 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
770 the already found data buffer directly.
771 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
772 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
773 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
774 just cu.
775 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
776 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
777 * dwarf_getlocation_attr.c (attr_form_cu): New function.
778 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
779 (getlocation): Handle empty blocks immediately.
780 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
781 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
782 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
783 one argument.
784 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
785 fake_cu. Call __libdw_form_val_len with just fake_cu.
786 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
787 datap and size directly from cu startp and endp.
788
Mark Wielaardf73385e2014-12-12 00:22:31 +01007892014-12-11 Mark Wielaard <mjw@redhat.com>
790
791 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
792
Mark Wielaard4a330f62014-12-14 00:09:29 +01007932014-12-13 Mark Wielaard <mjw@redhat.com>
794
795 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
796 difference doesn't wrap around before returning as int.
797
Josh Stone6e1c0d92014-12-11 16:22:48 -08007982014-12-11 Josh Stone <jistone@redhat.com>
799
800 * dwarf_getsrclines.c (struct linelist): Add sequence.
801 (compare_lines): Take linelists, and break ties by sequence.
802 (read_srclines): Use linelists for sorting.
803 (read_srclines::add_new_line): Set sequence.
804
Josh Stoneb849f812014-12-10 18:28:04 -08008052014-12-10 Josh Stone <jistone@redhat.com>
806
Josh Stone8d200b52014-12-10 18:41:43 -0800807 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
808 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
809 * dwarf_child.c (dwarf_child): Use cu->endp.
810 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
811 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
812 * dwarf_siblingof.c (dwarf_siblingof): Use both.
813
8142014-12-10 Josh Stone <jistone@redhat.com>
815
Josh Stone64e44df2014-12-10 18:33:34 -0800816 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
817
8182014-12-10 Josh Stone <jistone@redhat.com>
819
Josh Stoneb849f812014-12-10 18:28:04 -0800820 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
821 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
822 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
823 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
824 * dwarf_tag.c (dwarf_tag): Likewise.
825
Mark Wielaardcb73b5a2014-12-04 21:43:44 +01008262014-12-04 Mark Wielaard <mjw@redhat.com>
827
828 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
829 (__libdw_form_val_len): Likewise and check len doesn't overflow.
830 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
831 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
832 with endp.
833 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
834 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
835
Petr Machataedb079a2014-12-02 21:22:14 +01008362014-12-02 Petr Machata <pmachata@redhat.com>
837
838 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
839 helper functions.
840 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
841 * libdw.h (DWARF_GETMACROS_START): New macro.
842
Mark Wielaard12ab7002014-11-27 23:41:57 +01008432014-11-27 Mark Wielaard <mjw@redhat.com>
844
Mark Wielaard805ec832014-11-27 23:53:30 +0100845 * Makefile.am (libdw.so): Use textrel_check.
846
8472014-11-27 Mark Wielaard <mjw@redhat.com>
848
Mark Wielaard12ab7002014-11-27 23:41:57 +0100849 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
850 search_table_entries and search_table_encoding.
851
Mark Wielaard020fc022014-11-24 21:54:42 +01008522014-11-24 Mark Wielaard <mjw@redhat.com>
853
854 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
855 before usage.
856
Mark Wielaard04b61f82014-11-23 23:13:55 +01008572014-11-23 Mark Wielaard <mjw@redhat.com>
858
Mark Wielaard59480ba2014-11-23 23:21:05 +0100859 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
860 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
861 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
862
8632014-11-23 Mark Wielaard <mjw@redhat.com>
864
Mark Wielaard04b61f82014-11-23 23:13:55 +0100865 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
866 Set libdw errno and return NULL.
867
Mark Wielaard9f8c08e2014-11-24 22:17:51 +01008682014-11-24 Mark Wielaard <mjw@redhat.com>
869
870 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
871 (DW_LANG_C11): Likewise.
872 (DW_LANG_C_plus_plus_14): Likewise.
873 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
874 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
875 lower bound.
876 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
877 DW_LANG_C11.
878
Mark Wielaard03c033f2014-11-26 17:51:28 +01008792014-11-26 Mark Wielaard <mjw@redhat.com>
880
881 * dwarf.h (DW_AT_noreturn): Added.
882
Mark Wielaard09086232014-11-11 14:10:04 +01008832014-11-11 Mark Wielaard <mjw@redhat.com>
884
885 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
886 explicitly as uint8_t.
887 (__libdw_getsrclines): Add internal_function to declaration.
888
Petr Machatafb90bf32014-10-17 02:47:03 +02008892014-09-10 Petr Machata <pmachata@redhat.com>
890
891 * dwarf_macro_getparamcnt.c: New file.
892 * dwarf_macro_param.c: New file.
893 * dwarf_macro_getsrcfiles.c: New file.
894 * Makefile.am (libdw_a_SOURCES): Add the new files.
895 * libdwP.h (struct files_lines_s): New structure.
896 (DWARF_E_INVALID_OPCODE): New enumerator.
897 (struct Dwarf): New fields macro_ops, files_lines.
898 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
899 keeping macro opcode prototypes in.
900 (Dwarf_Macro_s): Redefine from scratch.
901 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
902 internal interfaces.
903 * dwarf_error.c (errmsgs): Add a message for
904 DWARF_E_INVALID_OPCODE.
905 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
906 files_lines.
907 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
908 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
909 interfaces.
910 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
911 (get_offset_from, macro_op_compare, build_table)
912 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
913 (cache_op_table, read_macros, gnu_macros_getmacros_off)
914 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
915 functions.
916 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
917 * dwarf_getsrclines.c (read_srclines): New function with guts
918 taken from dwarf_getsrclines.
919 (__libdw_getsrclines): Likewise.
920 (__libdw_getcompdir, files_lines_compare): New functions.
921 (dwarf_getsrclines): Make it dispatch to the new interfaces.
922 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
923 the new interfaces.
924 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
925 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
926 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
927
Mark Wielaard3a36e8a2014-10-06 22:00:16 +02009282014-10-06 Mark Wielaard <mjw@redhat.com>
929
930 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
931 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
932 (aggregate_size): Likewise. Add old and new version.
933 * dwarf_peel_type.c: New file.
934 * libdw.h (dwarf_peel_type): New function declaration.
935 * libdwP.h (dwarf_peel_type): New internal declaration.
936 * libdw.map (ELFUTILS_0.161): New section.
937
Petr Machata564cfbe2014-10-15 19:28:08 +02009382014-10-15 Petr Machata <pmachata@redhat.com>
939
940 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
941 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
942
Mark Wielaard2e83c642014-10-05 17:12:41 +02009432014-10-05 Mark Wielaard <mjw@redhat.com>
944
945 * dwarf.h: Add DW_AT_GNU_deleted.
946
Mark Wielaardb50014f2014-10-02 14:00:47 +02009472014-10-02 Mark Wielaard <mjw@redhat.com>
948
949 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
950 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
951 DW_TAG_rvalue_reference_type.
952
Petr Machata1498f542014-09-12 19:03:33 +02009532014-09-12 Petr Machata <pmachata@redhat.com>
954
955 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
956 8-byte quantities. Consequently, rename to...
957 (read_addr_unaligned_inc): ... this.
958 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
959 (read_sbyte_unaligned): Drop.
960
Petr Machata476feb12014-09-10 22:26:28 +02009612014-09-10 Petr Machata <pmachata@redhat.com>
962
963 * dwarf_getlocation.c (attr_ok): Also accept
964 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
965 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
966
Mark Wielaard209f1492014-08-15 13:08:24 +02009672014-08-15 Mark Wielaard <mjw@redhat.com>
968
Mark Wielaardf18f2332014-08-15 16:03:21 +0200969 * dwarf_cu_die.c: New file.
970 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
971 * libdw.h (dwarf_cu_die): New function declaration.
972 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
973
9742014-08-15 Mark Wielaard <mjw@redhat.com>
975
Mark Wielaard209f1492014-08-15 13:08:24 +0200976 * dwarf_cu_getdwarf.c: New file.
977 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
978 * libdw.h (Dwarf_CU): New typedef.
979 (dwarf_cu_getdwarf): New function declaration.
980 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
981
Mark Wielaardaf1e6ed2014-06-18 10:57:58 +02009822014-06-18 Mark Wielaard <mjw@redhat.com>
983
984 * dwarf.h: Remove DW_TAG_mutable_type.
985
Mark Wielaardbb096d02014-05-03 00:23:06 +02009862014-05-02 Mark Wielaard <mjw@redhat.com>
987
988 * libdwP.h (__check_build_id): Removed now unused.
989
Mark Wielaarddf85bf92014-05-01 14:48:27 +02009902014-05-01 Mark Wielaard <mjw@redhat.com>
991
992 * libdwP.h (struct Dwarf): Remove free_alt.
993 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
994 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
995
Mark Wielaardd81d32d2014-04-30 23:00:40 +02009962014-04-30 Mark Wielaard <mjw@redhat.com>
997
998 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
999
Florian Weimer920f03d2014-04-15 17:11:17 +020010002014-04-15 Florian Weimer <fweimer@redhat.com>
1001
1002 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1003 (open_debugaltlink): Move to libdwfl.
1004 (check_section): Do not locate alternate debuginfo.
1005
Florian Weimer4813dbb2014-04-24 14:06:43 +020010062014-04-24 Florian Weimer <fweimer@redhat.com>
1007
1008 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1009
Florian Weimer35e2a762014-04-15 14:31:55 +020010102014-04-22 Florian Weimer <fweimer@redhat.com>
1011
1012 * dwarf_getalt.c, dwarf_setalt.c: New files.
1013 * Makefile.am (libdw_a_SOURCES): Add them.
1014 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1015 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1016 declarations.
1017 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1018
Florian Weimerefa72a02014-04-15 14:04:19 +020010192014-04-15 Florian Weimer <fweimer@redhat.com>
1020
1021 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1022 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1023 .gnu_debugaltlink.
1024 (check_section): Obtain .gnu_debugaltlink section from the
1025 setiondata array.
1026
Mark Wielaard93802972014-04-11 23:52:47 +020010272014-04-11 Mark Wielaard <mjw@redhat.com>
1028
1029 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1030 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1031 (libdwelf_objects): New variable.
1032 (libdw_a_LIBADD): Add libdwelf objects.
1033
Mark Wielaardeb4da482014-04-22 16:43:11 +020010342014-04-22 Mark Wielaard <mjw@redhat.com>
1035
1036 * memory-access.h (get_sleb128_step): Remove undefined behavior
1037 of left shifting a signed value. Replace it with a multiplication.
1038
Mark Wielaard32324792014-04-13 17:39:57 +020010392014-04-13 Mark Wielaard <mjw@redhat.com>
1040
1041 * Makefile.am: Remove !MUDFLAP conditions.
1042
Mark Wielaard7f1eec32014-04-09 11:33:23 +020010432014-04-09 Mark Wielaard <mjw@redhat.com>
1044
1045 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1046 before calling malloc to uncompress data.
1047
Jan Kratochvildff2a992014-03-04 00:04:27 +010010482014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1049
1050 Fix abort() on missing section headers.
1051 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1052 New label err to return NULL.
1053
Josh Stone50d5b2c2014-02-05 11:26:27 -080010542014-02-05 Josh Stone <jistone@redhat.com>
1055
1056 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1057 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1058 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1059
Mark Wielaard19108012013-12-30 22:00:57 +010010602013-12-30 Mark Wielaard <mjw@redhat.com>
1061
1062 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1063 dwfl_linux_proc_attach.
1064
Mark Wielaarde962ec32013-12-20 10:09:12 +010010652013-12-20 Mark Wielaard <mjw@redhat.com>
1066
1067 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1068
Mark Wielaard159ac522013-12-18 11:05:54 +010010692013-12-18 Mark Wielaard <mjw@redhat.com>
1070
1071 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1072 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1073 dwfl_module_getsym_info.
1074
Mark Wielaard14c2d9e2013-12-16 13:28:59 +010010752013-12-16 Mark Wielaard <mjw@redhat.com>
1076
1077 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1078
Josh Stone4e2787c2013-12-10 14:19:09 -080010792013-12-10 Josh Stone <jistone@redhat.com>
1080
1081 * memory-access.h (get_uleb128_rest_return): Removed.
1082 (get_sleb128_rest_return): Removed.
1083 (get_uleb128_step): Make this a self-contained block.
1084 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1085 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1086 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1087 (__libdw_get_uleb128): Simplify and inline for all callers.
1088 (__libdw_get_sleb128): Ditto.
1089 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1090 * memory-access.c: Delete file.
1091 * Makefile.am (libdw_a_SOURCES): Remove it.
1092 (DEFS): Remove the now unused -DIS_LIBDW.
1093
Josh Stonec0d2a0b2013-12-09 13:52:10 -080010942013-12-09 Josh Stone <jistone@redhat.com>
1095
1096 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1097 __libdw_form_val_len, now handling only non-constant form lengths.
1098 * libdwP.h (__libdw_form_val_len): New inlined function.
1099
Mark Wielaard3951f2e2013-12-09 16:33:26 +010011002013-12-09 Mark Wielaard <mjw@redhat.com>
1101
1102 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1103 location expressions.
1104 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1105 location found, return empty location expression.
1106 * dwarf_getlocation_implicit_pointer.c
1107 (dwarf_getlocation_implicit_pointer): Likewise.
1108 (__libdw_empty_loc_attr): New internal function.
1109 * libdwP.h (__libdw_empty_loc_attr): Define.
1110
Mark Wielaard819c3492013-11-27 16:45:44 +010011112013-11-27 Mark Wielaard <mjw@redhat.com>
1112
1113 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1114 dwfl_module_getsym_elf.
1115
Mark Wielaard16bc4562013-11-26 15:13:22 +010011162013-11-26 Mark Wielaard <mjw@redhat.com>
1117
1118 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1119 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1120 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1121 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1122 (ELFUTILS_0.158): ... here.
1123
Mark Wielaard03d76f42013-11-09 16:45:22 +010011242013-11-09 Mark Wielaard <mjw@redhat.com>
1125
1126 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1127 check that it is zero.
1128
Jan Kratochvil0b867462013-05-30 14:37:38 +020011292013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1130
1131 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1132 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1133 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1134 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1135 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1136
Michael Forneya45c8042013-11-01 00:51:04 -070011372013-11-01 Michael Forney <mforney@mforney.org>
1138
Michael Forneycdc09432013-11-01 00:51:05 -07001139 * Makefile.am (libdwfl_objects): New definition.
1140 (libdw_a_LIBADD): Use libdwfl_objects.
1141
11422013-11-01 Michael Forney <mforney@mforney.org>
1143
Michael Forneya45c8042013-11-01 00:51:04 -07001144 * Makefile.am: Use READELF.
1145
Jan Kratochvil3cf491e2013-10-30 10:48:20 +010011462013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1147
1148 * libdw.map (ELFUTILS_0.158): New.
1149
Mark Wielaarde6a9bb82013-10-10 11:40:12 +020011502013-10-10 Mark Wielaard <mjw@redhat.com>
1151
1152 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1153 start_addr and rename last_offset to last_addr. Now both void *.
1154 (tree_visitor): Use start_add and die_addr instead of start_offset
1155 and die_offset.
1156 (dwarf_getfuncs): Use last_addr instead of last_offset.
1157
Mark Wielaard3dec3e12013-10-06 17:04:07 +020011582013-10-06 Mark Wielaard <mjw@redhat.com>
1159
1160 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1161 DW_CFA_val_expression are not used with abi_cfi.
1162
Josh Stone5dbbc5e2013-10-03 12:38:25 -070011632013-10-03 Josh Stone <jistone@redhat.com>
1164
1165 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1166 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1167 a unit, make sure to always hash the sig8 here, so none are missed.
1168
Mark Wielaard74f9b732013-09-30 00:39:07 +020011692013-09-29 Mark Wielaard <mjw@redhat.com>
1170
1171 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1172 uintptr_t before casting to char *.
1173 (__libdw_intern_expression): Cast data to uintptr_t before casting
1174 to Dwarf_Word.
1175 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1176 op->number2 to uintptr_t before casting to char *.
1177
Josh Stonef06c8582013-09-24 15:52:05 -070011782013-09-24 Josh Stone <jistone@redhat.com>
1179
1180 * libdw_visit_scopes.c (classify_die): Removed.
1181 (may_have_scopes): New function to replace classify_die. There's no
1182 need for full classification; just find tags that may contain scopes.
1183 (__libdw_visit_scopes): Use a direct tag comparison for imported
1184 units, and use may_have_scopes to test if recursion is needed.
1185
Mark Wielaard1b734df2013-09-20 09:50:42 -040011862013-09-20 Mark Wielaard <mjw@redhat.com>
1187
1188 * dwarf_getfuncs.c (visitor_info): New struct.
1189 (tree_visitor): New function.
1190 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1191 * libdw.h (dwarf_getfuncs): Expand function documentation.
1192
Mark Wielaard18b2c672013-09-12 15:49:47 +020011932013-09-12 Mark Wielaard <mjw@redhat.com>
1194
1195 * fde.c (intern_fde): Free fde and set libdw errno when start
1196 or end could not be read.
1197
Mark Wielaardb2535b62013-08-30 23:55:12 +020011982013-08-24 Mark Wielaard <mjw@redhat.com>
1199
1200 * dwarf_getlocation.c (store_implicit_value): Don't take data
1201 as argument, get block data from op number2. Return false when
1202 block data length and op number don't match up.
1203 (__libdw_intern_expression): Store start of block for
1204 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1205 relative data offset. Also store block start (including length)
1206 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1207 * dwarf_getlocation_attr.c: New file.
1208 * dwarf_getlocation_die.c: Likewise.
1209 * libdw.h (dwarf_getlocation_die): New function definition.
1210 (dwarf_getlocation_attr): Likewise.
1211 * libdwP.h: Declare internal dwarf_getlocation_die.
1212 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1213 dwarf_getlocation_attr.
1214 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1215 dwarf_getlocation_attr.c.
1216
Mark Wielaard66eaae92013-08-23 16:12:37 +020012172013-08-23 Mark Wielaard <mjw@redhat.com>
1218
1219 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1220 (attr_base_address): New function.
1221 (initial_offset_base): New function.
1222 (getlocations_addr): New function. Taken from...
1223 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1224 getlocations_addr.
1225 (dwarf_getlocations): New function.
1226 * libdw.h (dwarf_getlocations): New function definition.
1227 * libdw.map (ELFUTILS_0.157): New.
1228
Mark Wielaard5704c8c2013-07-02 11:22:35 +020012292013-07-02 Mark Wielaard <mjw@redhat.com>
1230
Mark Wielaard4aacfc12013-07-02 16:36:16 +02001231 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1232 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1233 NEW_LINE macro. Free malloced line records if any at the end.
1234
12352013-07-02 Mark Wielaard <mjw@redhat.com>
1236
Mark Wielaard5704c8c2013-07-02 11:22:35 +02001237 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1238
Mark Wielaard79277072013-06-26 11:42:52 -040012392013-06-26 Mark Wielaard <mjw@redhat.com>
1240
1241 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1242 DIEs without children. Return an error whenever dwarf_child or
1243 dwarf_siblingof return an error. Don't call recurse and increase
1244 the depth for an imported unit. Walk the children of an imported
1245 unit as if they are logical children of the parent root DIE.
1246
Mark Wielaard9affad32013-05-03 11:28:49 +020012472013-05-03 Mark Wielaard <mjw@redhat.com>
1248
1249 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1250 when nlinelist > 0.
1251
Jan Kratochvil904aec22013-04-30 14:27:16 +020012522013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1253
1254 * libdw.map (ELFUTILS_0.156): New.
1255
Mark Wielaardcdaaf212013-04-25 16:50:11 -040012562013-04-24 Mark Wielaard <mjw@redhat.com>
1257
1258 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1259
Mark Wielaardd4744a72013-04-10 15:52:57 +020012602013-04-10 Mark Wielaard <mjw@redhat.com>
1261
1262 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1263 equal to address size when we have a DW_FORM_ref_addr for DWARF
1264 version 2.
1265
Mark Wielaard60ef9ab2013-03-25 17:07:21 +010012662013-03-25 Mark Wielaard <mjw@redhat.com>
1267
1268 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1269 end_sequence.
1270
Mark Wielaardf1b06b52013-03-12 12:02:51 +010012712013-03-12 Mark Wielaard <mjw@redhat.com>
1272
1273 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1274 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1275
Mark Wielaard443304e2013-02-15 22:45:22 +010012762013-02-15 Mark Wielaard <mjw@redhat.com>
1277
1278 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1279 not dbg->sectiondata.
1280
Roland McGrath3999ce12013-01-07 14:53:37 -080012812013-01-07 Roland McGrath <roland@hack.frob.com>
1282
1283 * memory-access.h
1284 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1285 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1286
Mark Wielaard59254422012-12-18 14:14:22 +010012872012-12-18 Mark Wielaard <mjw@redhat.com>
1288
1289 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1290 (check_section): Likewise on error.
1291 (scngrp_read): Likewise.
1292 (dwarf_begin_elf): Likewise.
1293
Petr Machatab5c0b032012-10-09 02:11:29 +020012942012-10-09 Petr Machata <pmachata@redhat.com>
1295
1296 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1297 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1298 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1299 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1300
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +020013012012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1302
Jan Kratochvil1d67c0c2012-10-08 23:51:31 +02001303 * cfi.c: New include system.h.
1304 (execute_cfi) (enough_registers): Clear new memory after realloc.
1305
13062012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1307
Jan Kratochvil07f35072012-10-08 23:34:35 +02001308 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1309 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1310 searched PC.
1311
13122012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1313
Jan Kratochvil96a9fc62012-10-08 23:08:01 +02001314 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1315 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1316 Remove the later DW_OP_call_frame_cfa push to RESULT.
1317
13182012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1319
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +02001320 Code cleanup.
1321 * fde.c (binary_search_fde): Remove always true <address >= start>
1322 conditional. Move L initialization upwards.
1323
Mark Wielaardf5519fc2012-08-24 13:54:52 +020013242012-08-24 Mark Wielaard <mjw@redhat.com>
1325
1326 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1327 when ENABLE_DWZ is defined.
1328 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1329 defined.
1330
Mark Wielaardf31c4412012-08-17 00:35:03 +020013312012-08-16 Mark Wielaard <mjw@redhat.com>
1332
1333 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1334 * dwarf.h (DW_LANG_Go): Update comment.
1335 (DW_LANG_Mips_Assembler): Likewise.
1336
Mark Wielaard775375e2012-06-22 12:02:45 +020013372012-06-27 Mark Wielaard <mjw@redhat.com>
1338
1339 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1340 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1341 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1342 (try_debugaltlink): New function.
1343 (open_debugaltlink): Likewise.
1344 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1345 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1346 necessary.
1347 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1348 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1349 is an error here.
1350 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1351 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1352 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1353 calls.
1354 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1355 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1356 (struct Dwarf): Add alt_dwarf and free_alt fields.
1357 (__libdw_read_offset): Add dbg_ret argument, use to check with
1358 __libdw_offset_in_section.
1359 (__check_build_id): New function declaration.
1360 (dwarf_begin): Define as INTDECL.
1361 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1362 and DW_FORM_GNU_strp_alt.
1363
Mark Wielaard515fba92012-07-20 00:09:56 +020013642012-07-19 Mark Wielaard <mjw@redhat.com>
1365
1366 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1367
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +020013682012-07-24 Mark Wielaard <mjw@redhat.com>
1369
Mark Wielaardc4010b82012-07-24 13:20:41 +02001370 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1371 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1372 DW_LANG_ObjC.
1373
13742012-07-24 Mark Wielaard <mjw@redhat.com>
1375
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +02001376 * dwarf.h: Add DW_ATE_UTF.
1377
Mark Wielaardef5688e2012-06-27 10:15:27 +020013782012-06-27 Mark Wielaard <mjw@redhat.com>
1379
1380 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1381
Mark Wielaarda0172d72012-06-25 17:18:53 +020013822012-06-26 Mark Wielaard <mjw@redhat.com>
1383
1384 * libdwP.h: Add IDX_debug_macro.
1385 * dwarf.h: Add DW_AT_GNU_macros.
1386 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1387 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1388
Mark Wielaard54797252012-04-27 13:00:50 +020013892012-04-27 Mark Wielaard <mjw@redhat.com>
1390
1391 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1392 a constant offset from DW_AT_low_pc.
1393
Tom Tromey581c3f62012-03-21 08:54:32 -060013942012-03-19 Tom Tromey <tromey@redhat.com>
1395
1396 * libdw_findcu.c (findcu_cb): Move earlier.
1397 (__libdw_intern_next_unit): Add new CU to search tree here...
1398 (__libdw_findcu): ... not here.
1399
Mark Wielaardcb643d62012-01-31 19:22:03 +010014002012-01-31 Mark Wielaard <mjw@redhat.com>
1401
1402 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1403
Mark Wielaard387998b2011-10-31 15:01:50 +010014042011-11-31 Mark Wielaard <mjw@redhat.com>
1405
1406 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1407
Mark Wielaard0b72b652011-07-14 12:59:26 +020014082011-07-14 Mark Wielaard <mjw@redhat.com>
1409
1410 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1411
Jakub Jelinek03124242011-05-17 17:00:14 +020014122011-05-16 Jakub Jelinek <jakub@redhat.com>
1413
1414 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1415 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1416 New.
1417
Mark Wielaardf4c39c72011-04-26 17:15:28 +020014182011-04-26 Mark Wielaard <mjw@redhat.com>
1419
1420 * dwarf_child (dwarf_child): Sanity check end of section against
1421 cu_data () of die->cu.
1422
Mark Wielaarde3368c52011-03-22 23:03:31 +010014232011-03-22 Mark Wielaard <mjw@redhat.com>
1424
1425 * dwarf.h: Add DW_TAG_GNU_call_site,
1426 DW_TAG_GNU_call_site_parameter,
1427 DW_AT_GNU_call_site_value,
1428 DW_AT_GNU_call_site_data_value,
1429 DW_AT_GNU_call_site_target,
1430 DW_AT_GNU_call_site_target_clobbered,
1431 DW_AT_GNU_tail_call,
1432 DW_AT_GNU_all_tail_call_sites,
1433 DW_AT_GNU_all_call_sites,
1434 DW_AT_GNU_all_source_call_sites,
1435 and DW_OP_GNU_entry_value.
1436
Petr Machata02c56192011-03-10 01:50:32 +010014372011-03-10 Petr Machata <pmachata@redhat.com>
1438
1439 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1440 abbreviation with code 0.
1441
Petr Machata35870872011-03-09 10:01:29 -080014422011-03-09 Petr Machata <pmachata@redhat.com>
1443
1444 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1445
Roland McGrath725aad52011-02-23 19:52:46 -080014462011-02-23 Roland McGrath <roland@redhat.com>
1447
1448 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1449 Declare __libdw_free_zdata.
1450 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1451 (dwarf_end): Call it.
1452
1453 * dwarf_begin_elf.c (valid_p): Likewise.
1454 (check_section, scngrp_read): Likewise.
1455 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1456
Roland McGrath8c0a3822010-10-13 11:21:17 -070014572010-10-13 Roland McGrath <roland@redhat.com>
1458
1459 * dwarf.h: Add DW_LANG_Go.
1460
Roland McGrath5f95e2b2010-10-05 00:56:30 -070014612010-10-05 Roland McGrath <roland@redhat.com>
1462
1463 * dwarf_getaranges.c: Use malloc rather than alloca,
1464 since the total number of elements can be quite huge.
1465
Roland McGrath932585d2010-05-08 04:01:14 -070014662010-07-26 Roland McGrath <roland@redhat.com>
1467
1468 * dwarf_getlocation_implicit_pointer.c: New file.
1469 * Makefile.am (libdw_a_SOURCES): Add it.
1470 * libdw.map (ELFUTILS_0.149): New set.
1471 Add dwarf_getlocation_implicit_pointer.
1472 * libdw.h: Declare it.
1473
1474 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1475 (dwarf_offdie, dwarf_offdie_types): Update callers.
1476 * libdwP.h: Declare it.
1477
1478 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1479 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1480
Roland McGrathde44f132010-08-24 15:38:42 -070014812010-08-24 Roland McGrath <roland@redhat.com>
1482
1483 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1484
Roland McGrath00aca7f2010-07-27 04:40:23 -070014852010-07-27 Roland McGrath <roland@redhat.com>
1486
1487 * dwarf_formref_die.c: Fix sig8 hash insertion.
1488
Roland McGrath9616b852010-06-23 03:17:28 -070014892010-06-23 Roland McGrath <roland@redhat.com>
1490
1491 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1492 * libdw.h: Remove it.
1493 * libdw.map: Likewise.
1494
Roland McGrath499b8ff2010-06-22 13:13:53 -070014952010-06-22 Roland McGrath <roland@redhat.com>
1496
Roland McGrathc16966a2010-06-22 17:08:43 -07001497 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1498
Roland McGrath499b8ff2010-06-22 13:13:53 -07001499 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1500 opcode parsing.
1501
Roland McGrath0c5638c2010-06-21 23:00:35 -070015022010-06-21 Roland McGrath <roland@redhat.com>
1503
Roland McGrath474cb482010-06-22 00:10:54 -07001504 * dwarf.h: Add DW_TAG_GNU_* constants.
1505
Roland McGrath0c5638c2010-06-21 23:00:35 -07001506 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1507 10-byte case.
1508
Roland McGrath5cc030d2010-06-20 17:25:35 -070015092010-06-20 Roland McGrath <roland@redhat.com>
1510
Roland McGrath2b1f0952010-06-20 17:55:50 -07001511 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1512 to search TUs instead of CUs.
1513 * libdwP.h: Update decl.
1514 (struct Dwarf): New member tu_tree.
1515 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1516 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1517 (dwarf_offdie): ... here.
1518 (dwarf_offdie_types): New function.
1519 * libdw.h: Declare it.
1520 * libdw.map (ELFUTILS_0.148): Add it.
1521
Roland McGrath5cc030d2010-06-20 17:25:35 -07001522 * libdwP.h (CUDIE): Use cu_data.
1523 * dwarf_formblock.c: Likewise.
1524 * dwarf_formref_die.c: Likewise.
1525 * dwarf_diecu.c: Use CUDIE macro.
1526 * dwarf_formaddr.c: Use cu_sec_idx.
1527
Roland McGrathc70ebc02010-06-16 02:21:26 -070015282010-06-16 Roland McGrath <roland@redhat.com>
1529
Roland McGrath3e0f7d12010-06-15 23:10:35 -07001530 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1531 we don't repeat a CU lookup we've already done. Handle
1532 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1533
1534 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1535 broken out of ...
1536 (__libdw_findcu): ... here. Call it.
1537 * libdwP.h: Declare it.
1538 (struct Dwarf): New member next_tu_offset.
1539
1540 * dwarf_sig8_hash.c: New file.
1541 * dwarf_sig8_hash.h: New file.
1542 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1543 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1544 defining NO_UNDEF.
1545 * libdwP.h (struct Dwarf): New member sig8_hash.
1546 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1547 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1548
1549 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1550 (dwarf_nextcu): ... here. Call it.
1551 * libdw.h: Declare it.
1552 * libdwP.h: Add INTDECL.
1553 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1554 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1555
1556 * libdwP.h (cu_sec_idx, cu_data): New functions.
1557 Use .debug_types when CU is a TU.
1558 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1559 * dwarf_siblingof.c: Likewise.
1560 * dwarf_formstring.c: Likewise.
1561 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1562 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1563 (dwarf_getlocation_addr): Likewise.
1564
1565 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1566 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1567 .debug_types header size instead of .debug_info header size.
1568 (CUDIE): Use it.
1569 * dwarf_diecu.c: Update caller.
1570 * dwarf_getaranges.c: Likewise.
1571 * dwarf_nextcu.c: Likewise.
1572 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1573
Roland McGrath3e4b5bb2010-06-16 03:40:56 -07001574 * fde.c (fde_by_offset): Renamed to ...
1575 (__libdw_fde_by_offset): ... this, made global and internal_function.
1576 Don't take ADDRESS argument.
1577 (__libdw_find_fde): Update caller. Do address sanity check here.
1578 * cfi.h: Declare __libdw_fde_by_offset.
1579 * cfi.c (dwarf_cfi_validate_fde): New function.
1580 * libdw.h: Declare it.
1581 * libdw.map (ELFUTILS_0.148): Add it.
1582
Roland McGrath5f4b5082010-06-16 03:11:57 -07001583 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1584 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1585
Roland McGrath7934ded2010-06-16 03:04:09 -07001586 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1587 Don't assume DW_EH_PE_aligned refers to native address size.
1588
Roland McGrathc70ebc02010-06-16 02:21:26 -07001589 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1590 address.
1591
Roland McGrathc70cf4e2010-06-18 17:01:05 -070015922010-06-17 Roland McGrath <roland@redhat.com>
1593
1594 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1595 op_index.
1596 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1597 into an inner inline function. Set new fields. Check all fields for
1598 overflow when setting.
1599 * dwarf_lineisa.c: New file.
1600 * dwarf_linediscriminator.c: New file.
1601 * dwarf_lineop_index.c: New file.
1602 * Makefile.am (libdw_a_SOURCES): Add them.
1603 * libdw.map (ELFUTILS_0.148): Add them.
1604 * libdw.h: Declare them.
1605
Roland McGrath3f633072010-06-15 22:17:04 -070016062010-06-16 Roland McGrath <roland@redhat.com>
1607
Roland McGrath4a87dfa2010-06-16 16:35:10 -07001608 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1609
Roland McGrathb75f4442010-06-15 22:24:19 -07001610 * fde.c (fde_by_offset): Renamed to ...
1611 (__libdw_fde_by_offset): ... this, made global and internal_function.
1612 Don't take ADDRESS argument.
1613 (__libdw_find_fde): Update caller. Do address sanity check here.
1614 * cfi.h: Declare __libdw_fde_by_offset.
Roland McGrath9bcd2652010-06-15 22:17:20 -07001615 * cfi.c (dwarf_cfi_validate_fde): New function.
1616 * libdw.h: Declare it.
Roland McGrath3f633072010-06-15 22:17:04 -07001617 * libdw.map (ELFUTILS_0.148): Add it.
1618
Roland McGrath0b3363e2010-06-01 15:42:14 -07001619 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1620 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
Roland McGrath827d4d12010-06-01 20:17:36 -07001621
1622 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1623 Don't assume DW_EH_PE_aligned refers to native address size.
Roland McGrath1a030b32010-06-01 20:11:40 -07001624
1625 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
Roland McGrath675229b2010-06-01 20:10:19 -07001626 address.
1627
16282010-06-15 Roland McGrath <roland@redhat.com>
Roland McGrath52123962010-06-01 19:05:08 -07001629
1630 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001631 DW_FORM_ref_addr.
1632 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
Roland McGrath0b3363e2010-06-01 15:42:14 -07001633 here, since we don't support it yet.
1634
Mark Wielaard3f507bd2010-05-31 15:06:31 +02001635 * dwarf_next_cfi.c: Handle version 4 format.
1636
Mark Wielaard08e71db2010-05-31 15:39:15 +02001637 * dwarf_getsrclines.c: Handle version 4 format.
1638
16392010-06-01 Roland McGrath <roland@redhat.com>
1640
1641 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
Mark Wielaard3f507bd2010-05-31 15:06:31 +02001642 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1643
Eduardo Santiagod2240bc2010-05-28 14:26:52 -07001644 * libdwP.h (CIE_VERSION): Remove unused macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07001645
Ulrich Drepper49fe7142010-05-28 20:32:37 -07001646 * dwarf_getsrclines.c: Fix version field test.
1647 * libdwP.h (DWARF_VERSION): Remove useless macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07001648
Roland McGrathcfa5da22010-05-27 13:49:25 -07001649 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1650
1651 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1652
1653 * libdw_findcu.c (__libdw_findcu): Accept version 4.
Roland McGrath688f7fc2010-05-08 03:22:59 -07001654
16552010-05-31 Mark Wielaard <mjw@redhat.com>
1656
1657 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1658 * libdw.h (dwarf_cfi_cie_p): ... here.
1659
16602010-05-31 Mark Wielaard <mjw@redhat.com>
1661
1662 * dwarf.h: Fix DW_LANG_Python constant.
Roland McGrath0ab97832010-04-26 11:50:27 -07001663
16642010-05-28 Eduardo Santiago <santiago@redhat.com>
Roland McGrath3b10ac02010-04-26 18:45:36 -07001665
1666 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1667 thing.
1668
16692010-05-27 Roland McGrath <roland@redhat.com>
Roland McGrath0ab97832010-04-26 11:50:27 -07001670
1671 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1672 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1673
16742010-05-08 Roland McGrath <roland@redhat.com>
1675
1676 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
Roland McGrath3f9d9552010-04-22 20:51:07 -07001677 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1678 (getlocation): Update caller.
1679 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1680 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1681 * libdwP.h: Update decl.
1682
16832010-04-26 Roland McGrath <roland@redhat.com>
Roland McGrath8068e062010-03-10 23:49:13 -08001684
1685 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1686 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1687 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
Roland McGrath22359e22010-02-15 15:57:03 -08001688 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1689
1690 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1691 Prepend DW_OP_call_frame_cfa if true.
Mark Wielaardee29a312010-02-02 20:44:53 +01001692 (getlocation): Update caller.
1693 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1694 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1695 * libdwP.h: Update decl.
Roland McGrathf95760a2010-01-07 20:24:34 -08001696
16972010-04-22 Roland McGrath <roland@redhat.com>
1698
1699 * cfi.c (execute_cfi): Never return without cleanup.
Roland McGrath019d9fb2010-01-05 13:36:07 -08001700 Free FS on failure.
1701 (cie_cache_initial_state): Adjust caller to expect that free.
Roland McGrathebc5c882010-01-05 22:53:31 -08001702 (__libdw_frame_at_address): Likewise.
1703
17042010-03-10 Roland McGrath <roland@redhat.com>
1705
1706 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1707
17082010-02-15 Roland McGrath <roland@redhat.com>
1709
1710 * Makefile.am: Use config/eu.am for common stuff.
Roland McGrath0cb19832010-01-05 13:38:15 -08001711
17122010-02-02 Mark Wielaard <mjw@redhat.com>
Roland McGrath019d9fb2010-01-05 13:36:07 -08001713
1714 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
Roland McGrath888381b2009-11-21 17:03:34 -08001715
17162010-01-07 Roland McGrath <roland@redhat.com>
1717
1718 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1719
Roland McGrath9ca7bc42009-10-15 12:26:49 -070017202010-01-05 Roland McGrath <roland@redhat.com>
1721
1722 * dwarf_aggregate_size.c: New file.
1723 * Makefile.am (libdw_a_SOURCES): Add it.
1724 * libdw.h: Declare it.
Roland McGrath7e0aecd2009-09-17 15:02:34 -07001725 * libdwP.h: Add INTDECL.
1726 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1727
1728 * dwarf_srclang.c: Add INTDEF.
1729 * libdwP.h: Add INTDECL.
1730
Roland McGrathf0371042009-09-10 12:39:09 -07001731 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1732
1733 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1734
17352009-11-21 Roland McGrath <roland@redhat.com>
1736
1737 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1738 non-constant forms.
Mark Wielaard418ae4c2009-09-09 20:59:26 +02001739
17402009-10-15 Roland McGrath <roland@redhat.com>
1741
1742 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
Josh Stonecc93cc42009-08-21 18:04:44 -07001743 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1744
17452009-09-17 Roland McGrath <roland@redhat.com>
1746
Roland McGrath08277ba2009-08-10 15:08:08 -07001747 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1748 argument a pointer to const.
1749 * libdw.h: Update decl.
1750
Roland McGrathebfb6482009-08-09 15:40:52 -070017512009-09-10 Roland McGrath <roland@redhat.com>
1752
1753 * dwarf_getlocation.c (store_implicit_value): New function.
1754 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1755 (dwarf_getlocation_implicit_value): New function.
1756 * libdw.h: Declare it.
1757 * libdw.map (ELFUTILS_0.143): Add it.
1758
17592009-09-09 Mark Wielaard <mjw@redhat.com>
1760
1761 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1762
17632009-08-21 Josh Stone <jistone@redhat.com>
1764
Roland McGrathde69d522009-08-07 18:26:19 -07001765 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1766
17672009-08-10 Roland McGrath <roland@redhat.com>
1768
1769 * dwarf_getscopevar.c: Use dwarf_diename.
1770
17712009-08-09 Roland McGrath <roland@redhat.com>
1772
1773 * libdw.map (ELFUTILS_0.143): New version set,
1774 inherits from ELFUTILS_0.142.
Roland McGrathaf800142009-07-22 13:55:50 -07001775 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1776 alias in the ELFUTILS_0.122 version set and the default in the new set.
1777 * dwarf_srclang.c: Likewise.
1778 * dwarf_decl_file.c: Likewise.
1779 * dwarf_decl_line.c: Likewise.
1780 * dwarf_decl_column.c: Likewise.
1781 * dwarf_bytesize.c: Likewise.
1782 * dwarf_bitsize.c: Likewise.
1783 * dwarf_bitoffset.c: Likewise.
1784
17852009-08-07 Roland McGrath <roland@redhat.com>
1786
1787 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1788 * dwarf_srclang.c: Likewise.
1789 * dwarf_decl_file.c: Likewise.
1790 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
Roland McGrathe23e9e72009-07-21 18:14:52 -07001791 * dwarf_bytesize.c: Likewise.
1792 * dwarf_bitsize.c: Likewise.
1793 * dwarf_bitoffset.c: Likewise.
1794
17952009-07-22 Roland McGrath <roland@redhat.com>
1796
1797 * dwarf_frame_cfa.c: Change calling convention.
1798 * libdw.h: Update decl.
Roland McGrath96349ff2009-07-20 11:51:41 -07001799
1800 * dwarf_frame_register.c: Change calling/return-value convention for
1801 value-only results and undefined/same_value.
1802 * libdw.h: Update decl.
1803
Roland McGratha6abdfd2009-07-16 17:40:19 -07001804 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1805 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
Roland McGrathe160cc92009-07-16 17:48:27 -07001806 return that value instead.
1807 (getlocation): Update caller.
1808 * dwarf_frame_cfa.c: Likewise.
1809 * libdwP.h: Update decl.
1810
Roland McGratha6abdfd2009-07-16 17:40:19 -070018112009-07-21 Roland McGrath <roland@redhat.com>
1812
1813 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1814 Fix loop iteration after skipping a bogus or useless CU.
1815
1816 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1817 absence, not DWARF_E_NO_DEBUG_LINE.
Roland McGrath7dd94642009-07-15 11:14:23 -07001818
18192009-07-20 Roland McGrath <roland@redhat.com>
1820
1821 * dwarf_getlocation.c (__libdw_intern_expression):
1822 Handle DW_OP_stack_value.
Roland McGrath80893432009-07-13 12:08:55 -07001823
18242009-07-16 Roland McGrath <roland@redhat.com>
1825
1826 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001827 reject others when CU's version > 3.
1828
Roland McGrath3c84db32009-06-24 17:41:40 -07001829 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1830
1831 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1832 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1833 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1834 and DW_AT_const_expr.
1835 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1836 and DW_FORM_ref_sig8.
1837
18382009-07-15 Roland McGrath <roland@redhat.com>
1839
1840 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1841 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1842
18432009-07-13 Roland McGrath <roland@redhat.com>
1844
1845 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1846
18472009-07-08 Roland McGrath <roland@redhat.com>
1848
1849 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1850 dwfl_module_eh_cfi.
1851
1852 * libdwP.h (struct Dwarf): Add member `cfi'.
1853 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1854 * dwarf_getcfi.c: New file.
1855 * dwarf_getcfi_elf.c: New file.
1856 * dwarf_cfi_end.c: New file.
1857 * dwarf_cfi_addrframe.c: New file.
1858 * dwarf_frame_cfa.c: New file.
1859 * dwarf_frame_register.c: New file.
1860 * dwarf_frame_return_address_register.c: New file.
1861 * Makefile.am (libdw_a_SOURCES): Add them.
1862 * unwind.h: Declare those functions.
1863 * libdw.map (ELFUTILS_0.142): Export them.
1864
1865 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1866 broken out of ...
1867 (getlocation): ... here, call it.
1868 * libdwP.h: Declare it.
1869
1870 * cie.c: New file.
1871 * fde.c: New file.
1872 * frame-cache.c: New file.
1873 * cfi.c: New file.
1874 * cfi.h: New file.
1875 * encoded-value.h: New file.
1876 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1877 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1878 * dwarf_error.c (errmsgs): Add element for it.
1879
1880 * dwarf_next_cfi.c: New file.
1881 * Makefile.am (libdw_a_SOURCES): Add it.
Roland McGrath6e1f4652009-07-08 14:48:34 -07001882 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1883 Declare dwarf_next_cfi.
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001884 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1885 Add dwarf_next_cfi.
1886
1887 * memory-access.h [! ALLOW_UNALIGNED]
Roland McGrath05c4e042009-06-18 13:56:02 -07001888 (read_2ubyte_unaligned): Renamed to ...
1889 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1890 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1891 (read_2sbyte_unaligned): Likewise.
1892 (read_4ubyte_unaligned): Likewise.
1893 (read_4sbyte_unaligned): Likewise.
1894 (read_8ubyte_unaligned): Likewise.
1895 (read_8sbyte_unaligned): Likewise.
1896
Ulrich Drepper99d23722009-06-14 20:19:45 -07001897 * libdwP.h (IDX_eh_frame): Remove it.
1898 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1899
19002009-07-08 Roland McGrath <roland@redhat.com>
1901
1902 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1903
1904 * dwarf_getlocation.c (check_constant_offset): New function.
1905 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1906 handle DW_AT_data_member_location of data[48] as constant offset.
1907
19082009-06-18 Roland McGrath <roland@redhat.com>
1909
1910 * libdwP.h (__libdw_read_address_inc): Constify.
1911 (__libdw_read_offset_inc): Likewise.
1912 * dwarf_getaranges.c: Likewise.
1913 * dwarf_getlocation.c: Likewise.
1914 * dwarf_getsrclines.c: Likewise.
1915 * dwarf_nextcu.c: Likewise.
1916
19172009-05-05 Petr Machata <pmachata@redhat.com>
1918
1919 * libdwP.h (__libdw_formptr): Declare new function.
1920 * dwarf_formudata.c: Implement it here.
1921 * dwarf_getlocation.c (dwarf_getlocation_addr):
1922 Call it instead of hand-rolled offset handling code.
1923 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1924 * dwarf_ranges.c (dwarf_ranges): Likewise.
1925
19262009-05-04 Petr Machata <pmachata@redhat.com>
1927
1928 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1929 * dwarf_ranges.c: Implement it here.
1930 (dwarf_ranges): Call it.
Roland McGrathe2eabd82009-05-07 18:54:52 -07001931 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1932
19332009-04-23 Petr Machata <pmachata@redhat.com>
1934
1935 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1936 of read_*ubyte_unaligned.
Petr Machataf3df61f2009-05-07 21:02:33 +02001937 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1938 * dwarf_formstring.c (dwarf_formstring): Likewise.
1939 * dwarf_formudate.c (dwarf_formudata): Likewise.
1940 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1941 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
Roland McGrath2fb90512009-04-15 14:47:13 -07001942 * dwarf_getpubnames.c (get_offsets): Likewise.
1943 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1944
19452009-04-23 Petr Machata <pmachata@redhat.com>
1946
Roland McGrath6a4bdd92009-04-01 14:25:29 -07001947 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1948 __libdw_read_addr, __libdw_read_off): Add four new internal
1949 functions.
1950
Roland McGrathc5acb302009-01-28 18:28:52 -080019512009-05-07 Roland McGrath <roland@redhat.com>
1952
Roland McGrath03288f02009-01-28 22:00:54 -08001953 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1954 return value and OFFSET argument, not CU-relative. Only fetch the
1955 attribute data when called with OFFSET of 0.
Roland McGrathc5acb302009-01-28 18:28:52 -08001956
19572009-05-07 Petr Machata <pmachata@redhat.com>
Roland McGrathf46272a2009-01-26 18:36:16 -08001958
1959 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1960 DW_AT_macro_info attribute of CU DIE.
1961
Roland McGrathd31505f2009-01-25 19:37:33 -080019622009-04-15 Roland McGrath <roland@redhat.com>
1963
1964 * dwarf.h (DW_CIE_ID): Removed.
1965 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
Roland McGrath3bf7a092009-01-23 16:34:07 -08001966
19672009-04-01 Roland McGrath <roland@redhat.com>
1968
1969 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1970
Roland McGrathafdd51e2009-01-22 02:26:24 -080019712009-01-28 Roland McGrath <roland@redhat.com>
1972
1973 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1974 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
Roland McGrath1ea4fdc2009-01-21 19:14:37 -08001975
1976 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1977
19782009-01-26 Roland McGrath <roland@redhat.com>
1979
1980 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
Roland McGrath24b03302009-01-17 14:34:13 -08001981
19822009-01-25 Roland McGrath <roland@redhat.com>
Roland McGrath54456d82009-01-17 14:39:35 -08001983
1984 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1985
Roland McGrath5513e642009-01-11 01:35:11 -080019862009-01-23 Roland McGrath <roland@redhat.com>
1987
1988 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1989 Put these rules under if MAINTAINER_MODE.
1990
19912009-01-22 Roland McGrath <roland@redhat.com>
1992
Roland McGrath24b03302009-01-17 14:34:13 -08001993 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1994
Ulrich Drepper7e678fa2009-01-10 18:02:05 -080019952009-01-21 Roland McGrath <roland@redhat.com>
1996
1997 * Makefile.am (CLEANFILES): Renamed to ...
1998 (MOSTLYCLEANFILES): ... here.
Roland McGrathe06762c2009-01-08 13:39:08 -08001999 (CLEANFILES): New variable, add known-dwarf.h.
2000
20012009-01-17 Roland McGrath <roland@redhat.com>
2002
Roland McGrath7e827f22009-01-06 02:09:50 -08002003 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
Roland McGrath1f6d2012008-12-31 00:21:04 -08002004 Make it unconditional.
2005 (BUILT_SOURCES): Updated.
2006
2007 * dwarf.h: Add description comments for DW_LANG_* values.
Roland McGrathbca43152009-01-05 23:59:32 -08002008
2009 * Makefile.am [MAINTAINER_MODE]
2010 ($(srcdir)/known-dwarf.h): New target.
Ulrich Drepperac194d02009-01-06 00:30:01 -08002011 (BUILT_SOURCES): Add it.
2012
Roland McGrathc462c632009-01-06 01:04:31 -08002013 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
Ulrich Drepperac194d02009-01-06 00:30:01 -08002014
20152009-01-10 Ulrich Drepper <drepper@redhat.com>
2016
2017 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00002018
20192009-01-08 Roland McGrath <roland@redhat.com>
2020
2021 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2022
Ulrich Drepper8d358d92008-01-22 06:34:31 +000020232008-01-06 Roland McGrath <roland@redhat.com>
2024
2025 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2026 Reorder members.
2027 * dwarf_haschildren.c: Return -1 for error case, not 0.
2028
2029 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2030
Ulrich Drepperb27ce002008-01-18 20:08:54 +000020312009-01-06 Ulrich Drepper <drepper@redhat.com>
2032
2033 * dwarf.h: Add definition for unwind and call frame information.
2034
2035 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
Ulrich Drepper35f08c42008-01-18 19:59:08 +00002036 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2037
20382008-08-15 Roland McGrath <roland@redhat.com>
2039
2040 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2041 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2042
20432008-01-21 Ulrich Drepper <drepper@redhat.com>
2044
2045 * dwarf_child.c: Minor optimizations.
2046 * dwarf_getattrs.c: Likewise.
2047 * dwarf_getpubnames.c: Likewise.
2048 * dwarf_siblingof.c: Likewise.
Ulrich Dreppera969d8e2008-01-22 06:15:00 +00002049 * dwarf_tag.c: Likewise.
Ulrich Drepper35f08c42008-01-18 19:59:08 +00002050
20512008-01-18 Ulrich Drepper <drepper@redhat.com>
2052
2053 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2054 of DWARF_VERSION comparison, just fail if the file's version is newer.
2055
20562008-01-17 Nick Clifton <nickc@redhat.com>
2057
2058 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2059 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2060 (DWARF3_LENGTH_64_BIT): New define.
2061 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2062 * dwarf_getpubnames: Include dwarf.h.
2063 (get_offsets): Use the new definitions.
2064 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2065 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2066 (dwarf_nextcu): Use the new definitions.
2067
2068 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2069 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2070 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2071 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2072
2073 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2074 error return.
2075
2076 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2077
2078 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2079 Set the address in the return structure to the address of the next
2080 non-sibling die, if there is no sibling and the return pointer is
2081 not the same as the die pointer.
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00002082 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2083
2084 * dwarf_child.c: Fix typo in comment.
2085
2086 * libdwP.h (DWARF_VERSION): Change to 3.
2087
Roland McGrathe4c22ea2007-10-23 13:07:39 +00002088 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2089 not have a initialised valp pointer.
2090
2091 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2092 the end of the attributes is reached. When the callback fails,
2093 return the address of the failing attribute, not the address of
2094 its successor.
2095 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2096
2097 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2098 (dwarf_child): Likewise.
2099 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2100 (dwarf_tag): Likewise.
2101
21022008-01-08 Roland McGrath <roland@redhat.com>
2103
2104 * Makefile.am (euinclude): Variable removed.
2105 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2106 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00002107
21082007-10-17 Roland McGrath <roland@redhat.com>
2109
2110 * libdw.h (__deprecated_attribute__): New macro.
2111 (dwarf_formref): Mark it deprecated.
2112 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2113 (dwarf_formref): ... here. Call it. Remove INTDEF.
Roland McGrath59ea7f32007-10-04 08:50:09 +00002114 * libdwP.h: Remove INTDECL.
2115 Declare __libdw_formref.
2116 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2117 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2118
2119 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2120 needs to check CU->version.
2121
Roland McGrath057ec6b2007-10-02 20:55:05 +00002122 * libdwP.h (struct Dwarf_CU): New member `version'.
2123 * libdw_findcu.c (__libdw_findcu): Initialize it.
2124
2125 * dwarf_child.c: Return 1 for null entry as first child.
2126
Roland McGrathd1a48172007-08-07 19:51:01 +000021272007-10-05 Roland McGrath <roland@redhat.com>
2128
2129 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2130
2131 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2132 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2133
21342007-10-03 Roland McGrath <roland@redhat.com>
2135
2136 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2137 and dwfl_build_id_find_debuginfo.
Roland McGrath87d47802007-07-16 22:23:37 +00002138
2139 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2140 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2141
21422007-10-02 Roland McGrath <roland@redhat.com>
Roland McGrath43da9892007-04-16 23:13:37 +00002143
2144 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2145 structure_type.
2146
Roland McGrathbf2ee482007-04-05 09:27:36 +000021472007-08-07 Roland McGrath <roland@redhat.com>
2148
Roland McGrath43da9892007-04-16 23:13:37 +00002149 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2150 error code is DWARF_E_NOERROR (0).
2151
2152 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2153 Fix typo in __libdw_visit_scopes argument.
2154
2155 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2156 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2157
21582007-07-03 Roland McGrath <roland@redhat.com>
Roland McGrathbf2ee482007-04-05 09:27:36 +00002159
2160 * libdw.h (__extern_inline): New macro.
2161 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2162
Ulrich Drepperc07fbb32007-03-30 19:14:59 +000021632007-04-16 Roland McGrath <roland@redhat.com>
2164
2165 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2166
21672007-04-05 Roland McGrath <roland@redhat.com>
2168
2169 * dwarf_getsrcdirs.c: New file.
2170 * Makefile.am (libdw_a_SOURCES): Add it.
Ulrich Drepper6258e742007-03-13 06:22:40 +00002171 * libdw.h: Declare dwarf_getsrcdirs.
2172 * libdw.map (ELFUTILS_0.127): Add it.
2173
2174 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2175 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2176 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2177 Save DIRARRAY in the Dwarf_Files.
2178
2179 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
Ulrich Drepper903c1162007-02-15 19:40:37 +00002180 address to check for all-ones base address entry. Check directly.
2181 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2182
21832007-03-25 Roland McGrath <roland@redhat.com>
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00002184
2185 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2186 Return NULL when freeing RESULT on error.
2187 (global_read, scngrp_read): Check return value from check_section,
2188 break out of loop after it has freed RESULT.
2189 (valid_p): Handle null argument.
2190
Roland McGrath8190db62006-12-17 23:56:51 +000021912007-03-12 Roland McGrath <roland@redhat.com>
2192
2193 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2194
21952007-03-04 Roland McGrath <roland@redhat.com>
Roland McGrathc373d852006-10-10 00:25:21 +00002196
2197 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2198 ELFUTILS_0.126. Add dwfl_module_addrsym.
2199
22002007-02-10 Roland McGrath <roland@redhat.com>
2201
2202 * dwarf.h (DW_OP_fbreg): Comment fix.
2203
22042007-02-03 Roland McGrath <roland@redhat.com>
2205
2206 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2207 * libdw.map (ELFUTILS_0.126): New version set, inherits from
Ulrich Drepper077c65f2006-07-12 19:54:51 +00002208 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2209 exported in the past.
2210
22112006-12-17 Roland McGrath <roland@redhat.com>
2212
2213 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2214 address when the CU is missing attributes due to buggy GCC.
2215
Ulrich Dreppere1812e12006-07-12 07:46:03 +000022162006-08-29 Roland McGrath <roland@redhat.com>
2217
2218 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2219
2220 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2221 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2222
Ulrich Drepper3be74472006-05-27 18:15:40 +00002223 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2224 result is aligned. Adjust NEWP->remaining here for this allocation.
2225 * libdwP.h: Update decl.
2226 (libdw_alloc): Update caller.
Ulrich Dreppere7a73172006-05-22 18:16:45 +00002227
22282006-07-12 Ulrich Drepper <drepper@redhat.com>
2229
2230 * dwarf_child.c: Adjust for internal_function_def removal.
2231 * dwarf_getabbrev.c: Likewise.
Ulrich Drepper4f3d2a22006-05-22 01:30:56 +00002232 * dwarf_tag.c: Likewise.
2233 * libdw_form.c: Likewise.
2234 * memory-access.c: Likewise.
2235
22362006-06-28 Roland McGrath <roland@redhat.com>
Roland McGrath2dade662006-02-28 22:13:20 +00002237
2238 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2239
2240 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2241 dwfl_module_getsym.
2242
Roland McGrath08333122006-02-27 04:54:26 +000022432006-05-27 Ulrich Drepper <drepper@redhat.com>
2244
2245 * libdw.h: Add extern "C".
2246
Roland McGrath50ffcbf2005-12-23 01:51:43 +000022472006-05-22 Ulrich Drepper <drepper@redhat.com>
2248
2249 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2250 aranges information.
Roland McGrathdec3a242005-12-12 08:35:55 +00002251
22522006-05-21 Ulrich Drepper <drepper@redhat.com>
2253
2254 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2255 dwarf_haschildren.
Roland McGrathf64a4422005-12-09 23:40:30 +00002256
22572006-02-28 Roland McGrath <roland@redhat.com>
2258
2259 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2260 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2261 values from DWARF 3.0.
Roland McGrath994b4892005-12-05 22:46:21 +00002262
22632006-02-22 Roland McGrath <roland@redhat.com>
2264
2265 * libdw.map: Bump to 0.120; export dwfl_version.
Roland McGrathe47ab762005-11-17 03:16:00 +00002266
22672005-12-22 Roland McGrath <roland@redhat.com>
2268
2269 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2270
22712005-12-12 Roland McGrath <roland@redhat.com>
2272
2273 * dwarf_ranges.c: Copy CU base address-finding code from
Roland McGrath07d4f2f2005-10-28 06:56:24 +00002274 dwarf_getlocation.
2275
22762005-12-09 Roland McGrath <roland@redhat.com>
2277
2278 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2279 Delay CU base lookup until it's needed.
2280 If CU base lookup fails with no error, flag invalid DWARF.
2281
22822005-11-25 Roland McGrath <roland@redhat.com>
2283
2284 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2285
Roland McGrath6724c902005-10-28 07:07:19 +000022862005-11-15 Roland McGrath <roland@redhat.com>
2287
2288 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2289
22902005-11-13 Roland McGrath <roland@redhat.com>
2291
2292 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2293
22942005-10-27 Roland McGrath <roland@redhat.com>
2295
2296 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2297 don't match end_sequence markers.
2298
2299 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2300 before normal records at the same address.
2301 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2302 marker.
2303
23042005-10-26 Roland McGrath <roland@redhat.com>
2305
2306 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2307 * dwarf_func_file.c: Renamed to ...
2308 * dwarf_decl_file.c: ... here.
2309 * dwarf_func_col.c: Renamed to ...
2310 * dwarf_decl_column.c: ... here.
2311 * dwarf_func_line.c: Renamed to ...
2312 * dwarf_decl_line.c: ... here.
2313 (dwarf_func_line): Renamed to ...
2314 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2315 (__libdw_func_intval): Renamed __libdw_attr_intval.
2316 * dwarf_func_name.c: File removed.
2317 * dwarf_func_lowpc.c: File removed.
2318 * dwarf_func_highpc.c: File removed.
2319 * dwarf_func_entrypc.c: File removed.
2320 * dwarf_func_die.c: File removed.
2321 * Makefile.am (libdw_a_SOURCES): Updated.
2322 * libdw.h: Update decls.
2323 (Dwarf_Func): Type removed.
2324 * libdwP.h: Update decls.
Roland McGrath07d4f2f2005-10-28 06:56:24 +00002325 (struct Dwarf_Func_s): Type removed.
2326 * libdw.map: Updated.
2327
2328 * libdwP.h (CUDIE): New macro.
2329 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2330 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2331 * dwarf_ranges.c (dwarf_ranges): Likewise.
2332
2333 * dwarf_getloclist.c: Renamed to ...
2334 * dwarf_getlocation.c: ... here.
2335 (getloclist): Renamed to getlocation.
2336 (dwarf_getloclist): Renamed to dwarf_getlocation.
2337 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2338 * Makefile.am (libdw_a_SOURCES): Updated.
2339 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2340 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2341 (Dwarf_Loc): Renamed Dwarf_Op.
2342 * libdwP.h (struct loc_s): Update use.
2343 * libdw.map: Update map.
2344
2345 * dwarf_entry_breakpoints.c: Use the second line record within the
2346 function, regardless of its source location data.
2347
23482005-10-25 Roland McGrath <roland@redhat.com>
2349
2350 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2351
2352 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2353
23542005-10-14 Roland McGrath <roland@redhat.com>
2355
2356 * dwarf_diecu.c (dwarf_diecu): New file.
2357 * Makefile.am (libdw_a_SOURCES): Add it.
2358 * libdw.h: Declare dwarf_diecu.
2359 * libdw.map: Export it.
2360
2361 * libdw.map: Bump to 0.116; export dwarf_ranges.
2362
23632005-09-20 Roland McGrath <roland@redhat.com>
2364
2365 * dwarf_haspc.c: Use dwarf_ranges.
2366 * dwarf_entry_breakpoints.c: Likewise.
2367
2368 * dwarf_ranges.c: New file.
2369 * Makefile.am (libdw_a_SOURCES): Add it.
2370 * libdw.h: Declare dwarf_ranges.
2371 * libdwP.h: Add INTDECL.
2372
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000023732005-09-14 Roland McGrath <roland@redhat.com>
2374
2375 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2376 prologue_end marker scanning loop.
2377
23782005-09-11 Roland McGrath <roland@redhat.com>
Roland McGrath71e15a02005-08-27 10:33:26 +00002379
2380 * dwarf.h: Comment typo fix.
2381
23822005-09-07 Roland McGrath <roland@redhat.com>
2383
2384 * dwarf_entry_breakpoints.c: New file.
2385 * Makefile.am (libdw_a_SOURCES): Add it.
2386 * libdw.h: Declare dwarf_entry_breakpoints.
2387
2388 * dwarf_entrypc.c: New file.
2389 * Makefile.am (libdw_a_SOURCES): Add it.
2390 * libdw.h: Declare dwarf_entrypc.
2391 * libdwP.h: Add INTDECL.
2392
23932005-08-28 Ulrich Drepper <drepper@redhat.com>
2394
2395 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2396 (%.os): Use COMPILE.os.
2397 (COMPILE.os): Filter out gconv options.
2398
23992005-08-27 Roland McGrath <roland@redhat.com>
2400
Roland McGrathd17fac72005-08-23 08:20:21 +00002401 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2402 __libdw_visit_scopes.
2403
2404 * dwarf_getscopes_die.c: New file.
2405 * Makefile.am (libdw_a_SOURCES): Add it.
2406 * libdw.h: Declare dwarf_getscopes_die.
2407 * libdw.map: Bump to 0.115 and add it.
2408
2409 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2410 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2411 Take two functions for both preorder and postorder visitors.
2412 * libdwP.h: Update decl.
2413 (struct Dwarf_Die_Chain): New type.
2414 * dwarf_func_inline.c: Update uses.
2415
2416 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2417 Add INTDEF.
Roland McGrathf5fda7d2005-08-18 22:01:57 +00002418 * libdwP.h: Add INTDECL.
2419 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2420
24212005-08-23 Roland McGrath <roland@redhat.com>
2422
Roland McGrath1ecb6062005-08-15 09:53:04 +00002423 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2424 DW_AT_specification the same as DW_AT_abstract_origin.
2425
24262005-08-20 Roland McGrath <roland@redhat.com>
2427
2428 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2429 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2430 and dwfl_report_offline.
2431
24322005-08-19 Roland McGrath <roland@redhat.com>
2433
2434 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
Roland McGrath1c83bf12005-08-11 07:03:55 +00002435 Add dwfl_module_relocate_address, dwfl_module_relocations,
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002436 dwfl_module_relocation_info.
Roland McGrath1c83bf12005-08-11 07:03:55 +00002437
24382005-08-18 Roland McGrath <roland@redhat.com>
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002439
Roland McGrath4959bf82005-08-09 10:31:08 +00002440 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2441 outermost scope in the results.
Roland McGrathb6312e12005-08-09 10:36:01 +00002442
24432005-08-15 Roland McGrath <roland@redhat.com>
Roland McGrath4959bf82005-08-09 10:31:08 +00002444
2445 * dwarf_func_inline.c: New file.
2446 * Makefile.am (libdw_a_SOURCES): Add it.
2447 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
Roland McGratha5a89682005-08-02 01:24:01 +00002448 * libdw.map: Add them.
2449
2450 * dwarf_func_die.c: New file.
2451 * Makefile.am (libdw_a_SOURCES): Add it.
2452 * libdw.h: Declare dwarf_func_die.
Ulrich Drepper18618fd2005-07-28 21:29:22 +00002453 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2454
24552005-08-10 Ulrich Drepper <drepper@redhat.com>
2456
2457 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
Roland McGrath366784a2005-07-28 06:20:53 +00002458 of DW_LNS_set_epilog_begin.
2459
Roland McGrath18385902005-07-28 07:12:38 +000024602005-08-09 Roland McGrath <roland@redhat.com>
2461
2462 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2463
2464 * dwarf_end.c: Add INTDEF.
2465 * dwarf_error.c (dwarf_errmsg): Likewise.
Roland McGrath366784a2005-07-28 06:20:53 +00002466 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2467
24682005-08-01 Roland McGrath <roland@redhat.com>
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00002469
2470 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2471 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2472
24732005-07-28 Ulrich Drepper <drepper@redhat.com>
2474
2475 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2476 (libdw_a_LIBADD): Add all files from libdwfl.a.
2477
24782005-07-27 Roland McGrath <roland@redhat.com>
2479
2480 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2481 along with ../libebl/libebl.a and ../lib/libeu.a;
2482 depend on ../libelf/libelf.so.
2483 (libdw_so_LDADD): New variable.
2484 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2485
2486 * libdw.map: Define an empty base version and move all symbols to
2487 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2488
24892005-07-23 Ulrich Drepper <drepper@redhat.com>
2490
2491 * dwarf_error.c: Add internal alias for dwarf_errno.
2492 * libdwP.h: Declare __dwarf_errno_internal.
2493 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2494
2495 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2496 global_error.
2497
24982005-06-01 Roland McGrath <roland@redhat.com>
2499
2500 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2501 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2502
25032005-06-08 Roland McGrath <roland@redhat.com>
2504
2505 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2506 (get_sleb128_step, get_sleb128): Likewise.
2507 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2508 * dwarf_getloclist.c (getloclist): Likewise.
2509 * dwarf_formblock.c (dwarf_formblock): Likewise.
2510 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2511 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2512 * dwarf_formref.c (dwarf_formref): Likewise.
2513 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2514 * dwarf_formudata.c (dwarf_formudata): Likewise.
2515 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2516 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2517 * dwarf_tag.c (dwarf_tag): Likewise.
2518 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2519 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2520 * libdw_form.c (__libdw_form_val_len): Likewise.
2521 * libdwP.h: Update decl.
2522
25232005-06-04 Roland McGrath <roland@redhat.com>
2524
2525 * memory-access.h (get_uleb128_rest_return): New macro.
2526 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2527 (get_sleb128_rest_return): New macro.
2528 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2529 * memory-access.c: New file.
2530 * Makefile.am (libdw_a_SOURCES): Add it.
2531 (DEFS): Add -DIS_LIBDW.
2532
25332005-05-31 Roland McGrath <roland@redhat.com>
2534
2535 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2536 formref offset.
2537
25382005-05-30 Roland McGrath <roland@redhat.com>
2539
2540 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2541 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2542
2543 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2544 BEGIN value. Instead, match base address entries separately for
2545 32/64 size cases.
2546
25472005-05-28 Roland McGrath <roland@redhat.com>
2548
2549 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2550 past location expression contents.
2551
25522005-05-23 Roland McGrath <roland@redhat.com>
2553
2554 * dwarf_getsrclines.c: Comment typo fix.
2555
2556 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2557 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2558
25592005-05-22 Ulrich Drepper <drepper@redhat.com>
2560
2561 * libdwP.h: Only use INTDECL for alias prototypes.
2562
25632005-05-19 Roland McGrath <roland@redhat.com>
2564
2565 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2566
2567 * dwarf_getscopevar.c: New file.
2568 * Makefile.am (libdw_a_SOURCES): Add it.
2569 * libdw.h: Declare dwarf_getscopevar.
2570
2571 * dwarf_getsrcfiles.c: Add INTDEF.
2572 * dwarf_haschildren.c: Likewise.
2573 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2574
2575 * dwarf_getscopes.c: New file.
2576 * Makefile.am (libdw_a_SOURCES): Add it.
2577 * libdw.h: Declare dwarf_getscopes.
2578 * libdw.map: Add it.
2579
25802005-05-18 Roland McGrath <roland@redhat.com>
2581
2582 * libdwP.h (IDX_debug_ranges): New enum constant.
2583 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2584 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2585 * dwarf_error.c (errmsgs): Add it.
2586 * dwarf_haspc.c: New file.
2587 * libdw.h: Declare dwarf_haspc.
2588 * libdw.map: Add it.
2589 * libdwP.h: Add INTDECL.
2590
2591 * dwarf_attr_integrate.c: New file.
2592 * dwarf_hasattr_integrate.c: New file.
2593 * Makefile.am (libdw_a_SOURCES): Add them.
2594 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2595 * libdw.map: Add them.
2596
2597 * dwarf_hasattr.c: Add INTDEF.
2598 * libdwP.h: Add INTDECL for it.
2599
2600 * dwarf_formref_die.c: New file.
2601 * Makefile.am (libdw_a_SOURCES): Add it.
2602 * libdw.h (dwarf_formref_die): Declare it.
2603 * libdwP.h (dwarf_formref_die): Add INTDECL.
2604 * libdw.map: Add it.
2605
2606 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2607 of ...
2608 (dwarf_getloclist): ... here. Call them.
2609 (dwarf_addrloclists): New function.
2610 * libdw.h: Declare it.
2611 * libdw.map: Add it.
2612
2613 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2614 DW_MACINFO_end_file. Recognize type 0 as terminator.
2615
26162005-05-05 Roland McGrath <roland@redhat.com>
2617
2618 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2619
2620 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2621 the line program does not produce all entries in ascending order.
2622
26232005-04-25 Ulrich Drepper <drepper@redhat.com>
2624
2625 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2626 occurences (e.g., inlines) better.
2627
26282005-04-24 Ulrich Drepper <drepper@redhat.com>
2629
2630 * libdw.h (DWARF_END_ABBREV): Define.
2631 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2632 end is reached.
2633 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2634 of records reached.
2635 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2636 as error of __libdw_getabbrev.
2637
26382005-04-04 Ulrich Drepper <drepper@redhat.com>
2639
2640 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2641
2642 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2643 results back to caller.
2644
26452005-04-04 Roland McGrath <roland@redhat.com>
2646
2647 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2648
2649 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2650 defn.
2651
26522005-04-04 Ulrich Drepper <drepper@redhat.com>
2653
2654 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2655
2656 * dwarf_getsrc_file.c: New file.
2657 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2658 * libdw.h: Declare dwarf_getsrc_file.
2659 * libdw.map: Add dwarf_getsrc_file.
2660
26612005-04-02 Ulrich Drepper <drepper@redhat.com>
2662
2663 * dwarf_func_entrypc.c: New file.
2664 * dwarf_func_col.c: New file.
2665 * dwarf_func_line.c: New file.
2666 * dwarf_func_file.c: New file.
2667 * libdw.h: Add prototypes for new functions.
2668 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2669 dwarf_func_file.
2670 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2671 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2672 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2673 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2674 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2675 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2676
2677 * dwarf.h: Add some DWARF3 definitions.
2678
26792005-04-01 Ulrich Drepper <drepper@redhat.com>
2680
2681 * dwarf_getfuncs.c: New file.
2682 * dwarf_func_highpc.c: New file.
2683 * dwarf_func_lowpc.c: New file.
2684 * dwarf_func_name.c: New file.
2685 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2686 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2687 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2688 and dwarf_func_name.
2689 * libdw.h: Add prototypes for new functions.
2690 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2691 * dwarf_siblingof.c: Likewise.
2692 * dwarf_dieoffset.c: Likewise.
2693 * dwarf_highpc.c: Likewise.
2694 * dwarf_lowpc.c: Likewise.
2695 * libdwP.h: Add prototypes for internal functions.
2696 Define Dwarf_Func_s structure.
2697
26982005-03-29 Ulrich Drepper <drepper@redhat.com>
2699
2700 * libdw.h: Add padding in Dwarf_die.
2701
2702 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2703 * dwarf_attr.c: Likewise.
2704 * dwarf_begin.c: Likewise.
2705 * dwarf_begin_elf.c: Likewise.
2706 * dwarf_bitoffset.c: Likewise.
2707 * dwarf_bitsize.c: Likewise.
2708 * dwarf_bytesize.c: Likewise.
2709 * dwarf_diename.c: Likewise.
2710 * dwarf_formaddr.c: Likewise.
2711 * dwarf_formblock.c: Likewise.
2712 * dwarf_formref.c: Likewise.
2713 * dwarf_formstring.c: Likewise.
2714 * dwarf_formudata.c: Likewise.
2715 * dwarf_getarange_addr.c: Likewise.
2716 * dwarf_getarangeinfo.c: Likewise.
2717 * dwarf_getaranges.c: Likewise.
2718 * dwarf_getloclist.c: Likewise.
2719 * dwarf_getmacros.c: Likewise.
2720 * dwarf_getsrc_die.c: Likewise.
2721 * dwarf_getsrcfiles.c: Likewise.
2722 * dwarf_getsrclines.c: Likewise.
2723 * dwarf_highpc.c: Likewise.
2724 * dwarf_lowpc.c: Likewise.
2725 * dwarf_nextcu.c: Likewise.
2726 * dwarf_offdie.c: Likewise.
2727 * dwarf_siblingof.c: Likewise.
2728 * dwarf_srclang.c: Likewise.
2729 * dwarf_tag.c: Likewise.
2730 * libdw_findcu.c: Likewise.
2731 * libdwP.h: Add prototypes for internal functions.
2732
2733 * dwarf_addrdie.c: New file.
2734 * dwarf_macro_opcode.c: New file.
2735 * dwarf_macro_param1.c: New file.
2736 * dwarf_macro_param2.c: New file.
2737 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2738 * libdwP.h: Remove Dwarf_Macro definition.
2739 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2740 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2741 * libdw.map: Add entries for new functions.
2742
27432005-03-21 Ulrich Drepper <drepper@redhat.com>
2744
2745 * libdw.h: Handle broken gcc < 4.
2746
27472005-02-15 Ulrich Drepper <drepper@redhat.com>
2748
2749 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2750
2751 * dwarf_begin_elf.c: Fix warnings.
2752 * dwarf_dieoffset.c: Likewise.
2753 * dwarf_end.c: Likewise.
2754 * dwarf_error.c: Likewise.
2755 * dwarf_getpubnames.c: Likewise.
2756
2757 * libdwP.h: Add new error values.
2758 * dwarf_error.c: Support new error values.
2759 * dwarf_getpubnames.c: Check parameter value.
2760
27612005-02-05 Ulrich Drepper <drepper@redhat.com>
2762
2763 * Makefile.am: Check for text relocations in constructed DSO.
2764
2765 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2766
27672005-02-04 Ulrich Drepper <drepper@redhat.com>
2768
2769 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2770 checks to not read over buffer boundaries for ill-formed DWARF data.
2771
27722004-09-25 Ulrich Drepper <drepper@redhat.com>
2773
2774 * dwarf_child.c: Make compile with gcc 4.0.
2775 * dwarf_error.c: Likewise.
2776 * dwarf_formblock.c: Likewise.
2777 * dwarf_getabbrev.c: Likewise.
2778 * dwarf_getattrs.c: Likewise.
2779 * dwarf_getsrclines.c: Likewise.
2780 * dwarf_tag.c: Likewise.
2781 * libdw_form.c: Likewise.
2782
27832004-01-20 Ulrich Drepper <drepper@redhat.com>
2784
2785 * Makefile.am: Support building with mudflap.
2786
2787 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2788 * dwarf_getsrclines.c: Likewise.
2789 * dwarf_memory-access.h: Likewise.
2790
27912004-01-19 Ulrich Drepper <drepper@redhat.com>
2792
2793 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2794
2795 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2796 Third parameter of dwarf_getsrcfiles can be NULL.
2797
2798 * libdw.map: Add dwarf_getmacros.
2799 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2800 * dwarf_getmacros.c: New file.
2801
28022004-01-18 Ulrich Drepper <drepper@redhat.com>
2803
2804 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2805
2806 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2807
2808 * dwarf_getsrclines.c:
2809 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2810
2811 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2812
2813 * libdwP.h (_): Use elfutils domain.
2814
2815 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2816
2817 * dwarf_getsrclines.c: Fix typo in comment.
2818
28192004-01-17 Ulrich Drepper <drepper@redhat.com>
2820
2821 * Makefile.am: Support building with mudflap.
2822
28232004-01-16 Ulrich Drepper <drepper@redhat.com>
2824
2825 * memory-access.h: Add lots of const in case a pointer passed is const.
2826
2827 * dwarf_formflag.c: New file.
2828 * dwarf_getattrs.c: New file.
2829 * dwarf_error.c: Add new error value.
2830 * libdw.h: Add prototypes for new functions. Adjust prototype for
2831 dwarf_getpubnames.
2832 * libdw.map: Add new functions.
2833 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2834 to ptrdiff_t.
2835 * libdwP.h: Add new error value.
2836 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2837 dwarf_formflag.c.
2838
2839 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2840
28412004-01-12 Ulrich Drepper <drepper@redhat.com>
2842
2843 * dwarf_getarange_addr.c: New file
2844 * dwarf_getarangeinfo.c: New file.
2845 * dwarf_getaranges.c: New file.
2846 * dwarf_onerange.c: New file.
2847 * libdw.h: Declare new functions. Define Dwarf_Arange and
2848 Dwarf_Aranges.
2849 * libdw.map: Add new functions.
2850 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2851 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2852 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2853 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2854 * dwarf_error.c: Add new message.
2855
28562004-01-11 Ulrich Drepper <drepper@redhat.com>
2857
2858 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2859 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2860 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2861 * dwarf_error.c: Add another message.
2862 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2863 introduction.
2864 * dwarf_filesrc.c: Likewise.
2865 * dwarf_getsrcfiles.c: Likewise.
2866 * dwarf_getsrclines.c: Likewise.
2867 * dwarf_lineaddr.c: New file.
2868 * dwarf_linebeginstatement.c: New file.
2869 * dwarf_lineblock.c: New file.
2870 * dwarf_linecol.c: New file.
2871 * dwarf_lineendsequence.c: New file.
2872 * dwarf_lineepiloguebegin.c: New file.
2873 * dwarf_lineno.c: New file.
2874 * dwarf_lineprologueend.c: New file.
2875 * dwarf_onesrcline.c: New file.
2876 * dwarf_lineno.c: Change interface to store result in object pointed
2877 to by second parameter.
2878 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2879 prototype. Define Dwarf_Files and Dwarf_Lines.
2880 * libdw.map: Add new functions.
2881 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2882 * libdw_findcu.c: Don't initialize nlines field.
2883
2884 * dwarf_siblingof: Little optimization.
2885
2886 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2887 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2888 * libdwP.h (struct Dwarf): Add free_elf field.
2889
2890 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2891 dwarf_offabbrev.c.
2892 * dwarf_getstring.c: New file.
2893 * dwarf_offabbrev.c: New file.
2894 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2895 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2896 parameters. Don't allocate memory if not necessary and don't lookup
2897 previous results if no CU given.
2898 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2899 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2900 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2901 * libdwP.h: Change prototype for __libdw_getabbrev.
2902
2903 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2904 returning if this is wanted.
2905
29062004-01-09 Ulrich Drepper <drepper@redhat.com>
2907
2908 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2909 with offset_size value.
2910 * libdw.h: Adjust dwarf_nextcu prototype.
2911 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2912 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2913 member of new CU struct.
2914 * dwarf_formstring.c: Depend on offset_size not address_size for
2915 DW_FORM_strp handling.
2916 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2917
2918 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2919 failing lookup.
2920 (dwarf_tag): Correctly recognize failed lookup.
2921
2922 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2923 function noop_free.
2924 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2925 * dwarf_formblock.c: New file.
2926 * dwarf_getloclist.c: Rewrite to handle a single block.
2927 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2928 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2929 dwarf_getloclistent declaration.
2930 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2931 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2932 Add locs member to struct Dwarf_CU.
2933 * libdw_fundcu.c: Initialize locs member of new CU.
2934 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2935 Remove dwarf_getloclistent.c.
2936
29372004-01-07 Ulrich Drepper <drepper@redhat.com>
2938
2939 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2940 * libdwP.h: Likewise.
2941
2942 * dwarf_getloclist.c: New file.
2943 * dwarf_getloclistent.c: New file.
2944 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2945 Declare dwarf_getloclistent and dwarf_getloclist.
2946 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2947 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2948 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2949 dwarf_getloclist.c.
2950
2951 * dwarf_error.c: More error messages.
2952
29532004-01-06 Ulrich Drepper <drepper@redhat.com>
2954
2955 * dwarf_getsrclines.c: Remove debugging support.
2956
2957 * dwarf_getsrcfiles.c: New file.
2958 * dwarf_filesrc.c: New file.
2959 * libdw.h: Declare these functions. Define Dwarf_File.
2960 * libdwP.c: Adjust Dwarf_File_s definition.
2961 * libdw.map: Add these functions.
2962 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2963 dwarf_filesrc.c.
2964 * dwarf_getsrclines.c: Initialize cu->files.
2965
29662004-01-05 Ulrich Drepper <drepper@redhat.com>
2967
2968 * libdw.h: Add more nonnull function attributes.
2969
2970 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2971 * dwarf_end.c (cu_free): New function.
2972 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2973 * dwarf_error.c (errmsgs): Add new messages.
2974 * dwarf_getsrc_die.c: New file.
2975 * dwarf_getsrclines.c: New file.
2976 * dwarf_lineno.c: New file.
2977 * dwarf_linesrc.c: New file.
2978 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2979 instead of the *_inc-less variants.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07002980 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00002981 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2982 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2983 and dwarf_linesrc.
2984 * libdwP.h: Add more error codes.
2985 (struct Dwarf): Remove mem_tail.next member.
2986 (Dwarf_File): Define type.
2987 (struct Dwarf_Line_s): Define type.
2988 (struct Dwarf_CU): Add lines and nlines members.
2989 (libdw_alloc): Define local variable _tail and use it.
2990 Add some function attributes.
2991 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2992 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2993 * memory-access.h: Add unlikely for the endian conversion paths.
2994 * Makefile.am (AM_CFLAGS): Add -std parameter.
2995 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2996 dwarf_lineno, and dwarf_linesrc.
2997
29982003-08-11 Ulrich Drepper <drepper@redhat.com>
2999
3000 * Moved to CVS archive.