1 2018-04-11 Mark Wielaard <mark@klomp.org>
3 * dwarf.h: Add DWARF5 range list entry DW_RLE encodings.
4 * begin_elf.c (dwarf_scnnames): Add IDX_debug_rnglists.
5 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_RNGLISTS.
6 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_rnglists_base
8 * dwarf_getscopes.c (pc_match): Also check for
9 DWARF_E_NO_DEBUG_RNGLISTS.
10 * libdwP.h: Add IDX_debug_rnglists.
12 2018-05-25 Mark Wielaard <mark@klomp.org>
14 * dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to
15 uintptr_t before returning as pointer.
17 2018-05-22 Mark Wielaard <mark@klomp.org>
19 * dwarf_getlocation.c (__libdw_cu_base_address): Treat errors of
20 getting lowpc or entrypc the same as missing base address (zero).
21 * dwarf_highpc (dwarf_highpc): Handle any address form. Always set
22 error when attribute could not be found.
24 2018-05-21 Mark Wielaard <mark@klomp.org>
26 * dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result.
27 * dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split
28 dwarf if shared with skeleton.
29 (dwarf_end): release fake_addr_cu.
30 * dwarf_formaddr.c (__libdw_cu_addr_base): Move to...
31 * libdwP.h (__libdw_cu_addr_base): ... here.
32 (struct Dwarf): Add fake_addr_cu field.
33 * dwarf_formudata.c (dwarf_formudata): Handle
34 DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
35 * dwarf_getlocation_attr.c (addr_valp): New static function.
36 (dwarf_getlocation_attr): Create attribute for values of
37 DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and
39 * libdw_find_split_unit.c (__libdw_find_split_unit): Connect
40 IDX_debug_addr sectiondata and fake_addr_cu between split and
43 2018-05-20 Mark Wielaard <mark@klomp.org>
45 * dwarf_cu_info.c: New file.
46 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c.
47 * libdw.h (dwarf_cu_info): New function declaration.
48 * libdw.map (ELFUTILS_0.171): Add dwarf_cu_info.
50 2018-05-24 Mark Wielaard <mark@klomp.org>
52 * dwarf_ranges.c (dwarf_ranges): Check for NULL cu.
53 * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base.
55 2018-05-18 Mark Wielaard <mark@klomp.org>
57 * dwarf_formudata.c (__libdw_formptr): Handle the special case
58 of IDX_debug_ranges for DW_UT_split_compile with version < 5.
59 * dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for
61 * dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie.
62 * dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for
64 * libdwP.h (struct Dwarf_CU): Add ranges_base field.
65 (__libdw_cu_ranges_base): New static inline function.
67 2018-05-18 Mark Wielaard <mark@klomp.org>
69 * libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL.
70 * dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by
71 taking the line table from the skeleton.
72 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by
73 only taking the files from .debug_line offset zero (if it exists),
74 otherwise fall back to the skeleton.
76 2018-05-17 Mark Wielaard <mark@klomp.org>
78 * dwarf_begin_elf.c (__libdw_debugdir): New function.
79 (valid_p): Call __libdw_debugdir.
80 * dwarf_end.c (dwarf_end.c): Free debugdir.
81 * dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic.
82 take debugdir as argument instead of fd.
83 (find_debug_altlink): Call __libdw_filepath with debugdir.
84 * libdwP.h (struct Dwarf): Add debugdir field.
85 (__libdw_debugdir): New function prototype.
86 (__libdw_filepath): Adjust prototype to take a const char * instead of
88 * libdw_find_split_unit.c (__libdw_find_split_unit): Call
89 __libdw_filepath with debugdir.
91 2018-05-17 Mark Wielaard <mark@klomp.org>
93 * dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile
94 unit DIE, search skeleton_compile unit DIE.
95 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
96 * libdwP.h (is_cudie): Check cu is not NULL.
98 2018-05-19 Mark Wielaard <mark@klomp.org>
100 * libdwP.h (__libdw_find_split_unit): Mark as internal_function.
102 2018-05-15 Mark Wielaard <mark@klomp.org>
104 * Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c.
105 * dwarf_end.c (cu_free): Free split Dwarf.
106 * dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by
107 calling __libdw_find_split_unit.
108 * libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field.
109 (__libdw_find_split_unit): New function prototype.
110 (str_offsets_base_off): Use cu Dwarf if dbg is NULL.
111 (filepath): Rename to ...
112 (__libdw_filepath): This. Which is the actual function name in
114 (libdw_find_split_unit.c): New file.
115 * libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1.
117 2018-05-15 Mark Wielaard <mark@klomp.org>
119 * libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out
121 * libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if
122 the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to
123 DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has
124 child DIEs and a DW_AT_GNU_dwo_name attribute.
126 2018-05-14 Mark Wielaard <mark@klomp.org>
128 * dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name,
129 DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base,
130 DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index,
131 DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index.
132 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index
134 (__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and
136 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index
138 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base
139 as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr.
140 * dwarf_getlocation.c (__libdw_intern_expression): Handle
141 DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as
143 * libdw_form.c (__libdw_form_val_compute_len): Handle
144 DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128.
146 2018-05-12 Mark Wielaard <mark@klomp.org>
148 * dwarf_begin_elf.c (check_section): Also recognize .dwo section
151 2018-05-11 Mark Wielaard <mark@klomp.org>
153 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr.
154 * dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup,
155 DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and
156 DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with
157 DW_AT_macros. Use libdw_valid_user_form.
159 2018-05-09 Mark Wielaard <mark@klomp.org>
161 * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to...
162 * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline.
163 (str_offsets_base_off): New internal function that also parses
164 .debug_str_offsets header if necessary.
166 2018-05-11 Mark Wielaard <mark@klomp.org>
168 * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is
169 known the Dwarf_Die is came from is valid.
170 * libdwP.h (__libdw_dieabbrev): Check cu is not NULL.
172 2018-05-08 Mark Wielaard <mark@klomp.org>
174 * dwarf_formref.c (__libdw_formref): Explicitly don't handle
175 DW_FORM_ref_sup4 and DW_FORM_ref_sup8.
176 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4
177 and DW_FORM_ref_sup8.
178 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup
179 as DW_FORM_GNU_strp_alt.
181 2018-05-05 Mark Wielaard <mark@klomp.org>
183 * dwarf.h: Add DWARF line content descriptions.
184 * libdwP.h (libdw_valid_user_form): New static function.
185 * dwarf_getsrclines.c (read_srclines): Check and parse version 5
186 DWARF header, dir and file tables separately from older versions
189 2018-04-24 Mark Wielaard <mark@klomp.org>
191 * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str".
192 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and
193 DWARF_E_NO_DEBUG_LINE_STR.
194 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp.
195 Get data from either .debug_str or .debug_line_str.
196 * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and
197 DWARF_E_NO_DEBUG_LINE_STR.
199 2018-04-03 Mark Wielaard <mark@klomp.org>
201 * dwarf_formudata.c (__libdw_formptr): Take and return const
202 unsigned char pointers.
203 * dwarf_getlocation.c (attr_base_address): Rename to...
204 (__libdw_cu_base_address): this. Take Dwarf_CU, check and set
206 (initial_offset_base): Renamed to...
207 (initial_offset): this. Only provide offset.
208 (getlocations_addr): Move data size check and
209 address base addition into __libdw_read_begin_end_pair_inc. Use
210 __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL
211 check (already done by initial_offset, through __libdw_formptr).
212 (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset.
213 Drop Elf_Data NULL check.
214 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument
215 type of readp to Add readend argument. Check data size. Include base
216 in begin and end result.
217 (initial_offset): New static function.
218 (dwarf_ranges): Don't check Elf_Data being NULL (already done by
219 initial_offset, through __libdw_formptr). Use __libdw_cu_base_address
220 and initial_offset. Remove base check and addition (already done by
221 __libdw_read_begin_end_pair_inc.
222 * libdwP.h (Dwarf_CU): Add base_address field.
223 (__libdw_read_begin_end_pair_inc): Change argument type of readp to
224 const. Add readend argument.
225 (__libdw_formptr): Take and return const unsigned char pointers.
226 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
229 2018-04-04 Mark Wielaard <mark@klomp.org>
231 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
232 addr_base and str_off_base.
234 2018-03-23 Mark Wielaard <mark@klomp.org>
236 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
238 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
239 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
240 (__libdw_cu_str_off_base): New function.
241 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
243 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
244 (struct Dwarf_CU): Add str_off_base field.
245 (__libdw_cu_str_off_base): New function declaration.
247 2018-03-22 Mark Wielaard <mark@klomp.org>
249 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
250 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
251 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
252 (__libdw_cu_addr_base): New function.
253 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
255 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
256 (struct Dwarf_CU): Add addr_base field.
257 (__libdw_cu_addr_base): New function definition.
258 * memory-access.h (file_byte_order): New static function.
259 (read_3ubyte_unaligned): New inline function.
261 2018-03-29 Mark Wielaard <mark@klomp.org>
263 * libdw.h (dwarf_decl_file): Extend documentation.
264 (dwarf_linesrc): Likewise.
265 (dwarf_filesrc): Likewise.
267 2018-03-06 Mark Wielaard <mark@klomp.org>
269 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
270 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
271 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
273 * dwarf_getlocation.c (__libdw_intern_expression): Handle
274 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
275 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
276 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
277 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
278 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
279 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
280 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
281 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
283 * dwarf_getlocation_implicit_pointer.c
284 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
286 2018-03-01 Mark Wielaard <mark@klomp.org>
288 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
289 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
292 2018-02-09 Mark Wielaard <mark@klomp.org>
294 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
297 2018-02-09 Mark Wielaard <mark@klomp.org>
299 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
300 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
301 * dwarf_formudata.c (dwarf_formudata): Likewise.
302 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
303 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
304 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
305 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
306 that will also return any data associated with the abbrev. Which
307 currently is only for DW_FORM_implicit_const. Based on...
308 (dwarf_getabbrevattr): ... this function. Which now just calls
309 dwarf_getabbrevattr_data.
310 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
311 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
312 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
313 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
314 function based on __libdw_get_uleb128_unchecked.
316 2018-02-08 Mark Wielaard <mark@klomp.org>
318 * dwarf.h: Add DWARF5 DW_FORMs.
319 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
320 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
321 DW_FORM_ref_sup[48] and DW_FORM_data16.
322 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
323 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
324 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
326 2018-01-30 Mark Wielaard <mark@klomp.org>
328 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
329 * dwarf_get_units.c: New file.
330 * libdw.h (dwarf_get_units): New function declaration.
331 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
333 2018-01-29 Mark Wielaard <mark@klomp.org>
335 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
336 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
337 is now called unit_idp. type_offsetp is now called subdie_offsetp.
338 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
339 and .debug_types sections for type units when type signature ref
341 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
342 __libdw_first_die_off_from_cu instead of trying by hand.
343 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
344 instead of checking type_offset by hand.
345 * dwarf_getlocation_implicit_pointer.c
346 (dwarf_getlocation_implicit_pointer): Likewise.
347 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
348 (__libdw_next_unit): New function based on dwarf_next_unit with
349 DWARF5 header support.
350 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
351 and type_sig8 to unit_id8.
352 (ISV4TU): New macro to determine whether a CU is a version 4 type
353 unit (which comes from the .debug_types section).
354 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
355 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
357 (__libdw_first_die_off_from_cu): New function that calls the above
359 (CUDIE): Use __libdw_first_die_off_from_cu.
360 (SUBDIE): New macro that provides the DIE for a CU using the
362 (__libdw_next_unit): New internal function declaration.
363 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
364 Accept DWARF version 5 headers. Setup unit_type.
365 (__libdw_findcu): Rename debug_types argument to v4_debug_types
366 argument (to indicate that we are looking in the .debug_types
367 section). Support finding the exact offset (unit header start).
369 2018-01-25 Mark Wielaard <mark@klomp.org>
371 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
372 * dwarf_die_addr_die.c: New file.
373 * libdw.h (dwarf_die_addr_die): New function declaration.
374 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
375 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
376 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
378 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
380 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
381 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
383 2018-01-22 Mark Wielaard <mark@klomp.org>
385 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
386 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
387 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
388 and alt_fd if we allocated them.
389 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
390 * dwarf_formstring.c (dwarf_formstring): Likewise.
391 * dwarf_getalt.c (__libdw_filepath): New internal function.
392 (find_debug_altlink): New static function.
393 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
395 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
397 * libdw.h (dwarf_getalt): Extend documentation.
398 (dwarf_setalt): Likewise.
399 * libdwP.h (struct Dwarf): Add alt_fd field.
400 (filepath): Declare new internal function.
402 2018-01-14 Petr Machata <pmachata@gmail.com>
404 * dwarf_formsdata.c (dwarf_formsdata):
405 <DW_FORM_data1>: Cast to signed char.
406 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
407 read_*ubyte_unaligned.
409 2017-12-26 Mark Wielaard <mark@klomp.org>
411 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
412 use bitfields for has_children and code.
413 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
414 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
416 2017-12-26 Mark Wielaard <mark@klomp.org>
418 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
419 (get_uleb128_unchecked): New define.
420 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
421 read attr name and form.
422 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
423 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
424 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
426 2017-12-28 Mark Wielaard <mark@klomp.org>
428 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
430 2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
431 Mark Wielaard <mark@klomp.org>
433 * libdwP.h (__libdw_in_section): Fix check for the upper border of
435 (__libdw_offset_in_section): Likewise.
437 2017-12-20 Mark Wielaard <mark@klomp.org>
439 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
440 (cu_sec_idx): Return cu->sec_idx.
441 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
442 IDX_debug_info or IDX_debug_types.
443 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
445 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
446 IDX_debug_macro or IDX_debug_macinfo.
448 2017-12-12 Mark Wielaard <mark@klomp.org>
450 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
451 given DIE. Reserve memory for a new DIE first.
453 2017-12-11 Dima Kogan <dima@secretsauce.net>
455 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
458 2017-11-03 Mark Wielaard <mark@klomp.org>
460 * dwarf_getlocation.c (__libdw_intern_expression): Handle
461 DW_OP_GNU_variable_value.
462 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
463 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
465 2017-11-03 Mark Wielaard <mark@klomp.org>
467 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
468 Update list of acceptable attribute codes based on DWARF5.
470 2017-11-03 Mark Wielaard <mark@klomp.org>
472 * dwarf.h: Add DW_OP_GNU_variable_value.
474 2017-10-03 Mark Wielaard <mark@klomp.org>
476 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
478 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
480 * memory-access.h: Use attribute_packed.
482 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
484 * libdwP.h: Use attribute_hidden.
485 * libdw_alloc.c: Likewise.
487 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
489 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
491 2017-07-26 Mark Wielaard <mark@klomp.org>
493 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
494 * dwarf_getmacros.c (get_table_for_offset): Accept either version
495 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
496 (read_macros): Use table version for fake_cu.
498 2017-07-26 Mark Wielaard <mark@klomp.org>
500 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
501 DW_TAG_packed_type and DW_TAG_shared_type.
502 * libdw.h (dwarf_peel_type): Extend documentation.
504 2017-07-26 Mark Wielaard <mark@klomp.org>
506 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
507 DW_DEFAULTED_out_of_class.
509 2017-07-26 Mark Wielaard <mark@klomp.org>
511 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
513 2017-07-26 Mark Wielaard <mark@klomp.org>
515 * dwarf_default_lower_bound.c: New file.
516 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
517 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
518 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
519 * libdw.h: Add dwarf_default_lower_bound.
520 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
521 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
522 dwarf_default_lower_bound INTDECL.
524 2017-07-26 Mark Wielaard <mark@klomp.org>
526 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
527 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
528 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
529 * dwarf_aggregate_size.c (array_size): Add lower bound for
530 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
531 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
532 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
533 DW_LANG_Julia and DW_LANG_BLISS.
535 2017-07-26 Mark Wielaard <mark@klomp.org>
537 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
539 2017-07-25 Mark Wielaard <mark@klomp.org>
541 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
542 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
543 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
544 for currently unused numbers.
546 2017-07-25 Mark Wielaard <mark@klomp.org>
548 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
549 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
550 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
552 2017-07-21 Mark Wielaard <mark@klomp.org>
554 * dwarf_line_file.c: New file.
555 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
556 * libdw.h (dwarf_line_file): New function declaration.
557 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
559 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
561 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
562 made of, libdw_so_DEPS for libraries it depends on (including
563 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
564 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
565 library dependencies, use libdw_so_LIBS rather than relying on the
566 order of dependencies specified, add -z,relro.
568 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
570 * libdw.h: Remove attribute macro declarations and use
571 __noreturn_attribute__ as defined in libelf.h.
573 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
575 * dwarf_begin_elf.c: Include endian.h.
577 2017-03-30 Mark Wielaard <mjw@redhat.com>
579 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
582 2016-10-22 Mark Wielaard <mjw@redhat.com>
584 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
585 * dwarf_aggregate_size.c (array_size): Use correct spelling of
588 2016-11-02 Mark Wielaard <mjw@redhat.com>
590 * cfi.c (execute_cfi): Add fallthrough comments.
591 * encoded-value.h (encoded_value_size): Add explicit return instead
592 of relying on fallthrough.
593 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
596 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
598 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
599 * libdw_alloc.c: Likewise.
601 2016-07-08 Mark Wielaard <mjw@redhat.com>
603 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
604 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
605 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
607 2016-02-13 Mark Wielaard <mjw@redhat.com>
609 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
612 2015-12-18 Mark Wielaard <mjw@redhat.com>
614 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
615 (__libdw_free_zdata): Remove.
616 * dwarf_begin_elf.c (inflate_section): Remove.
617 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
618 and elf_compress_gnu to decompress if necessary.
619 (valid_p): Remove __libdw_free_zdata calls.
620 (scngrp_read): Use elf_compress if section is compressed. Remove
621 __libdw_free_zdata calls.
622 * dwarf_end.c (__libdw_free_zdata): Remove.
623 (dwarf_end): Don't call __libdw_free_zdata.
625 2015-10-28 Mark Wielaard <mjw@redhat.com>
627 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
629 2015-12-02 Mark Wielaard <mjw@redhat.com>
631 * fde.c (intern_fde): Don't leak duplicate FDEs.
633 2015-12-01 Mark Wielaard <mjw@redhat.com>
635 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
638 2015-12-01 Mark Wielaard <mjw@redhat.com>
640 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
642 2015-10-14 Chih-Hung Hsieh <chh@google.com>
644 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
645 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
647 2015-10-14 Chih-Hung Hsieh <chh@google.com>
649 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
650 function 'walk_children' to file scope; inline 'recurse' at its call
653 2015-10-19 Mark Wielaard <mjw@redhat.com>
655 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
658 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
660 * dwarf_getsrclines.c (read_srclines): Initialize state early.
662 2015-10-13 Chih-Hung Hsieh <chh@google.com>
664 * dwarf_getsrclines.c (read_srclines): Move nested functions
665 'advance_pc' and 'add_new_line' to file scope and keep many
666 local state variables within one structure.
668 2015-10-13 Chih-Hung Hsieh <chh@google.com>
670 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
671 function 'file_matches' to file scope.
673 2015-10-16 Mark Wielaard <mjw@redhat.com>
675 * Makefile.am (libdw.so): Add -lz.
677 2015-10-14 Chih-Hung Hsieh <chh@google.com>
679 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
680 and 'require_cfa_offset' to file scope.
682 2015-10-09 Josh Stone <jistone@redhat.com>
684 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
687 2015-10-05 Josh Stone <jistone@redhat.com>
689 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
691 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
693 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
694 relocation overflows in some platforms.
696 2015-09-23 Mark Wielaard <mjw@redhat.com>
698 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
699 * dwarf_formref.c (__libdw_formref): Likewise.
700 * libdw_findcu.c (__libdw_findcu): Likewise.
701 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
703 2015-09-22 Mark Wielaard <mjw@redhat.com>
705 * *.c: Remove old-style function definitions.
707 2015-09-15 Mark Wielaard <mjw@redhat.com>
709 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
711 2015-09-09 Chih-Hung Hsieh <chh@google.com>
713 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
714 redundant NULL tests on parameters declared with __nonnull_attribute__.
715 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
716 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
718 2015-09-04 Chih-Hung Hsieh <chh@google.com>
719 Mark Wielaard <mjw@redhat.com>
721 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
722 definition with ansi-C definition and add const qualifier to
725 2015-09-04 Chih-Hung Hsieh <chh@google.com>
727 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
728 definition with ansi-C definitions.
729 (__libdw_findcu): Likewise.
731 2015-08-25 Mark Wielaard <mjw@redhat.com>
733 * dwarf.h: Add DW_LANG_Haskell.
735 2015-06-18 Mark Wielaard <mjw@redhat.com>
737 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
740 2015-06-18 Mark Wielaard <mjw@redhat.com>
742 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
744 2015-06-18 Mark Wielaard <mjw@redhat.com>
746 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
747 dwarf_formudata reports an error.
748 (get_table_for_offset): Likewise.
750 2015-06-08 Mark Wielaard <mjw@redhat.com>
752 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
754 2015-06-06 Mark Wielaard <mjw@redhat.com>
756 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
758 2015-05-27 Mark Wielaard <mjw@redhat.com>
760 * encoded-value.h (read_encoded_value): Check data d_size contains
761 at least enough data to hold a pointer for DW_EH_PE_indirect.
763 2015-05-22 Mark Wielaard <mjw@redhat.com>
765 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
766 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
767 MAX_STACK_DIRS. Calculate number of dirs needed first, then
768 create dirarray directly, without needing the next field. Free
769 not stack allocated lines and files at the end.
771 2015-05-19 Mark Wielaard <mjw@redhat.com>
773 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
774 allocated array to hold locs. Allocate locs bigger than the array
775 with malloc and free them when done.
777 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
779 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
780 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
781 * dwarf_begin_elf.c (inflate_section): New static function, lifted
783 (check_section): ... here. Call inflate_section, set libdw errno to
784 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
786 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
788 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
789 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
791 2015-05-06 Mark Wielaard <mjw@redhat.com>
793 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
794 check the line number.
796 2015-05-05 Mark Wielaard <mjw@redhat.com>
798 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
799 left before reading values.
801 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
803 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
806 2015-04-22 Mark Wielaard <mjw@redhat.com>
808 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
809 (__libdw_max_len_uleb128): New function.
810 (__libdw_max_len_sleb128): Likewise.
811 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
812 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
814 2015-04-21 Mark Wielaard <mjw@redhat.com>
816 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
817 when there are more than 8.
819 2015-04-01 Petr Machata <pmachata@redhat.com>
821 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
822 (is_cudie): New function.
823 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
824 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
825 of white-listing valid tags.
826 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
828 2015-03-18 Petr Machata <pmachata@redhat.com>
830 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
831 (EXTRA_DIST): Remove known-dwarf.h.
833 2015-02-09 Mark Wielaard <mjw@redhat.com>
835 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
836 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
837 for new Fortran language codes is 1.
839 2015-02-09 Mark Wielaard <mjw@redhat.com>
841 * dwarf.h: Add DW_TAG_atomic_type.
842 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
843 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
845 2015-02-11 Josh Stone <jistone@redhat.com>
847 * encoded-value.h (read_encoded_value): Initialize value.
849 2015-02-11 Petr Machata <pmachata@redhat.com>
851 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
852 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
853 the fact in *BASEP and bail out later if it hasn't been updated by
854 __libdw_read_begin_end_pair_inc.
856 2014-12-24 Mark Wielaard <mjw@redhat.com>
858 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
859 smaller than or equal to addr, rather than returning immediately on
862 2015-01-07 Mark Wielaard <mjw@redhat.com>
864 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
865 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
866 room in the search table for all entries. Store search_table_len.
867 (getcfi_scn_eh_frame): Likewise.
868 * encoded-value.h (encoded_value_size): Don't abort, return zero.
869 (__libdw_cfi_read_address_inc): Check there is enough room to read
870 values. Pass other byte order to read functions.
871 (read_encoded_value): Check encoded_value_size. Don't abort, but
872 set libdw errno and report failure. Check there is enough room to
874 * fde.c (binary_search_fde): Check encoded value size. Add hdr
875 data buf and size to dummy_cfi.
877 2015-01-04 Mark Wielaard <mjw@redhat.com>
879 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
880 is after current DIE.
882 2015-01-04 Mark Wielaard <mjw@redhat.com>
884 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
885 (dwarf_frame_register).
887 2015-01-02 Mark Wielaard <mjw@redhat.com>
889 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
890 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
891 (getcfi_scn_eh_frame): Check d_buf is not NULL.
893 2015-01-02 Mark Wielaard <mjw@redhat.com>
895 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
896 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
897 DW_OP_addr if dbg is NULL then read argument directly.
899 2015-01-14 Jason P. Leasure <jpleasu@super.org>
901 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
904 2014-12-27 Mark Wielaard <mjw@redhat.com>
906 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
907 still falls inside CU data.
909 2015-01-11 Mark Wielaard <mjw@redhat.com>
911 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
912 __libdw_visit_scopes with NULL imports.
913 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
914 * dwarf_getscopes.c (pc_record): Likewise.
915 (dwarf_getscopes): Likewise.
916 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
917 * libdwP.h (__libdw_visit_scopes): Add imports argument.
918 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
919 function imports_contains. Push and pop imports around walk_children
920 when processing DW_TAG_imported_unit.
922 2014-12-18 Ulrich Drepper <drepper@gmail.com>
924 * Makefile.am: Suppress output of textrel_check command.
926 2014-12-16 Mark Wielaard <mjw@redhat.com>
928 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
931 2014-12-16 Mark Wielaard <mjw@redhat.com>
933 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
934 space to read die offset.
936 2014-12-16 Mark Wielaard <mjw@redhat.com>
938 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
941 2014-12-15 Mark Wielaard <mjw@redhat.com>
943 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
944 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
945 (dwarf_getpubnames): Make sure section data contains string zero
948 2014-12-16 Mark Wielaard <mjw@redhat.com>
950 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
951 the compiler optimize for the common single-byte case.
953 2014-12-15 Josh Stone <jistone@redhat.com>
955 * memory-access.h (__libdw_max_len_leb128): New.
956 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
957 (__libdw_get_sleb128): Likewise.
959 2014-12-14 Mark Wielaard <mjw@redhat.com>
961 * cfi.c (execute_cfi): Add program bounds checks.
962 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
963 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
964 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
965 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
966 * dwarf_formudata.c (dwarf_formudata): Likewise.
967 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
968 with end of data buf.
969 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
970 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
971 call gets enough data.
972 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
973 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
975 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
977 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
978 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
979 get_uleb128 with lineendp.
980 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
981 get_uleb128 with endp.
982 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
983 get_uleb128/get_sleb128 with limit.
984 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
985 get_sleb128 get called with enough data.
986 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
987 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
988 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
990 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
991 Don't call get_uleb128_step if out of data.
992 (__libdw_get_sleb128): Likewise for get_sleb128_step.
994 2014-12-12 Mark Wielaard <mjw@redhat.com>
996 * libdwP.h (struct Dwarf): Add fake_loc_cu.
998 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
999 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
1000 (__libdw_form_val_len): Likewise.
1001 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
1002 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
1003 the already found data buffer directly.
1004 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
1005 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
1006 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
1008 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1009 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
1010 * dwarf_getlocation_attr.c (attr_form_cu): New function.
1011 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
1012 (getlocation): Handle empty blocks immediately.
1013 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
1014 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
1015 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
1017 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
1018 fake_cu. Call __libdw_form_val_len with just fake_cu.
1019 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
1020 datap and size directly from cu startp and endp.
1022 2014-12-11 Mark Wielaard <mjw@redhat.com>
1024 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
1026 2014-12-13 Mark Wielaard <mjw@redhat.com>
1028 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
1029 difference doesn't wrap around before returning as int.
1031 2014-12-11 Josh Stone <jistone@redhat.com>
1033 * dwarf_getsrclines.c (struct linelist): Add sequence.
1034 (compare_lines): Take linelists, and break ties by sequence.
1035 (read_srclines): Use linelists for sorting.
1036 (read_srclines::add_new_line): Set sequence.
1038 2014-12-10 Josh Stone <jistone@redhat.com>
1040 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
1041 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
1042 * dwarf_child.c (dwarf_child): Use cu->endp.
1043 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
1044 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
1045 * dwarf_siblingof.c (dwarf_siblingof): Use both.
1047 2014-12-10 Josh Stone <jistone@redhat.com>
1049 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
1051 2014-12-10 Josh Stone <jistone@redhat.com>
1053 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
1054 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
1055 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1056 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1057 * dwarf_tag.c (dwarf_tag): Likewise.
1059 2014-12-04 Mark Wielaard <mjw@redhat.com>
1061 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
1062 (__libdw_form_val_len): Likewise and check len doesn't overflow.
1063 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
1064 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
1066 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1067 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
1069 2014-12-02 Petr Machata <pmachata@redhat.com>
1071 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
1073 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
1074 * libdw.h (DWARF_GETMACROS_START): New macro.
1076 2014-11-27 Mark Wielaard <mjw@redhat.com>
1078 * Makefile.am (libdw.so): Use textrel_check.
1080 2014-11-27 Mark Wielaard <mjw@redhat.com>
1082 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
1083 search_table_entries and search_table_encoding.
1085 2014-11-24 Mark Wielaard <mjw@redhat.com>
1087 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
1090 2014-11-23 Mark Wielaard <mjw@redhat.com>
1092 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
1093 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
1094 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
1096 2014-11-23 Mark Wielaard <mjw@redhat.com>
1098 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
1099 Set libdw errno and return NULL.
1101 2014-11-24 Mark Wielaard <mjw@redhat.com>
1103 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
1104 (DW_LANG_C11): Likewise.
1105 (DW_LANG_C_plus_plus_14): Likewise.
1106 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
1107 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
1109 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
1112 2014-11-26 Mark Wielaard <mjw@redhat.com>
1114 * dwarf.h (DW_AT_noreturn): Added.
1116 2014-11-11 Mark Wielaard <mjw@redhat.com>
1118 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
1119 explicitly as uint8_t.
1120 (__libdw_getsrclines): Add internal_function to declaration.
1122 2014-09-10 Petr Machata <pmachata@redhat.com>
1124 * dwarf_macro_getparamcnt.c: New file.
1125 * dwarf_macro_param.c: New file.
1126 * dwarf_macro_getsrcfiles.c: New file.
1127 * Makefile.am (libdw_a_SOURCES): Add the new files.
1128 * libdwP.h (struct files_lines_s): New structure.
1129 (DWARF_E_INVALID_OPCODE): New enumerator.
1130 (struct Dwarf): New fields macro_ops, files_lines.
1131 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
1132 keeping macro opcode prototypes in.
1133 (Dwarf_Macro_s): Redefine from scratch.
1134 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
1135 internal interfaces.
1136 * dwarf_error.c (errmsgs): Add a message for
1137 DWARF_E_INVALID_OPCODE.
1138 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
1140 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
1141 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
1143 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
1144 (get_offset_from, macro_op_compare, build_table)
1145 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
1146 (cache_op_table, read_macros, gnu_macros_getmacros_off)
1147 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
1149 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
1150 * dwarf_getsrclines.c (read_srclines): New function with guts
1151 taken from dwarf_getsrclines.
1152 (__libdw_getsrclines): Likewise.
1153 (__libdw_getcompdir, files_lines_compare): New functions.
1154 (dwarf_getsrclines): Make it dispatch to the new interfaces.
1155 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
1157 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
1158 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
1159 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
1161 2014-10-06 Mark Wielaard <mjw@redhat.com>
1163 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
1164 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
1165 (aggregate_size): Likewise. Add old and new version.
1166 * dwarf_peel_type.c: New file.
1167 * libdw.h (dwarf_peel_type): New function declaration.
1168 * libdwP.h (dwarf_peel_type): New internal declaration.
1169 * libdw.map (ELFUTILS_0.161): New section.
1171 2014-10-15 Petr Machata <pmachata@redhat.com>
1173 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
1174 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
1176 2014-10-05 Mark Wielaard <mjw@redhat.com>
1178 * dwarf.h: Add DW_AT_GNU_deleted.
1180 2014-10-02 Mark Wielaard <mjw@redhat.com>
1182 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
1183 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
1184 DW_TAG_rvalue_reference_type.
1186 2014-09-12 Petr Machata <pmachata@redhat.com>
1188 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
1189 8-byte quantities. Consequently, rename to...
1190 (read_addr_unaligned_inc): ... this.
1191 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
1192 (read_sbyte_unaligned): Drop.
1194 2014-09-10 Petr Machata <pmachata@redhat.com>
1196 * dwarf_getlocation.c (attr_ok): Also accept
1197 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
1198 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
1200 2014-08-15 Mark Wielaard <mjw@redhat.com>
1202 * dwarf_cu_die.c: New file.
1203 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
1204 * libdw.h (dwarf_cu_die): New function declaration.
1205 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
1207 2014-08-15 Mark Wielaard <mjw@redhat.com>
1209 * dwarf_cu_getdwarf.c: New file.
1210 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
1211 * libdw.h (Dwarf_CU): New typedef.
1212 (dwarf_cu_getdwarf): New function declaration.
1213 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
1215 2014-06-18 Mark Wielaard <mjw@redhat.com>
1217 * dwarf.h: Remove DW_TAG_mutable_type.
1219 2014-05-02 Mark Wielaard <mjw@redhat.com>
1221 * libdwP.h (__check_build_id): Removed now unused.
1223 2014-05-01 Mark Wielaard <mjw@redhat.com>
1225 * libdwP.h (struct Dwarf): Remove free_alt.
1226 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
1227 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1229 2014-04-30 Mark Wielaard <mjw@redhat.com>
1231 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1233 2014-04-15 Florian Weimer <fweimer@redhat.com>
1235 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1236 (open_debugaltlink): Move to libdwfl.
1237 (check_section): Do not locate alternate debuginfo.
1239 2014-04-24 Florian Weimer <fweimer@redhat.com>
1241 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1243 2014-04-22 Florian Weimer <fweimer@redhat.com>
1245 * dwarf_getalt.c, dwarf_setalt.c: New files.
1246 * Makefile.am (libdw_a_SOURCES): Add them.
1247 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1248 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1250 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1252 2014-04-15 Florian Weimer <fweimer@redhat.com>
1254 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1255 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1257 (check_section): Obtain .gnu_debugaltlink section from the
1260 2014-04-11 Mark Wielaard <mjw@redhat.com>
1262 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1263 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1264 (libdwelf_objects): New variable.
1265 (libdw_a_LIBADD): Add libdwelf objects.
1267 2014-04-22 Mark Wielaard <mjw@redhat.com>
1269 * memory-access.h (get_sleb128_step): Remove undefined behavior
1270 of left shifting a signed value. Replace it with a multiplication.
1272 2014-04-13 Mark Wielaard <mjw@redhat.com>
1274 * Makefile.am: Remove !MUDFLAP conditions.
1276 2014-04-09 Mark Wielaard <mjw@redhat.com>
1278 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1279 before calling malloc to uncompress data.
1281 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1283 Fix abort() on missing section headers.
1284 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1285 New label err to return NULL.
1287 2014-02-05 Josh Stone <jistone@redhat.com>
1289 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1290 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1291 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1293 2013-12-30 Mark Wielaard <mjw@redhat.com>
1295 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1296 dwfl_linux_proc_attach.
1298 2013-12-20 Mark Wielaard <mjw@redhat.com>
1300 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1302 2013-12-18 Mark Wielaard <mjw@redhat.com>
1304 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1305 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1306 dwfl_module_getsym_info.
1308 2013-12-16 Mark Wielaard <mjw@redhat.com>
1310 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1312 2013-12-10 Josh Stone <jistone@redhat.com>
1314 * memory-access.h (get_uleb128_rest_return): Removed.
1315 (get_sleb128_rest_return): Removed.
1316 (get_uleb128_step): Make this a self-contained block.
1317 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1318 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1319 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1320 (__libdw_get_uleb128): Simplify and inline for all callers.
1321 (__libdw_get_sleb128): Ditto.
1322 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1323 * memory-access.c: Delete file.
1324 * Makefile.am (libdw_a_SOURCES): Remove it.
1325 (DEFS): Remove the now unused -DIS_LIBDW.
1327 2013-12-09 Josh Stone <jistone@redhat.com>
1329 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1330 __libdw_form_val_len, now handling only non-constant form lengths.
1331 * libdwP.h (__libdw_form_val_len): New inlined function.
1333 2013-12-09 Mark Wielaard <mjw@redhat.com>
1335 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1336 location expressions.
1337 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1338 location found, return empty location expression.
1339 * dwarf_getlocation_implicit_pointer.c
1340 (dwarf_getlocation_implicit_pointer): Likewise.
1341 (__libdw_empty_loc_attr): New internal function.
1342 * libdwP.h (__libdw_empty_loc_attr): Define.
1344 2013-11-27 Mark Wielaard <mjw@redhat.com>
1346 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1347 dwfl_module_getsym_elf.
1349 2013-11-26 Mark Wielaard <mjw@redhat.com>
1351 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1352 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1353 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1354 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1355 (ELFUTILS_0.158): ... here.
1357 2013-11-09 Mark Wielaard <mjw@redhat.com>
1359 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1360 check that it is zero.
1362 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1364 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1365 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1366 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1367 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1368 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1370 2013-11-01 Michael Forney <mforney@mforney.org>
1372 * Makefile.am (libdwfl_objects): New definition.
1373 (libdw_a_LIBADD): Use libdwfl_objects.
1375 2013-11-01 Michael Forney <mforney@mforney.org>
1377 * Makefile.am: Use READELF.
1379 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1381 * libdw.map (ELFUTILS_0.158): New.
1383 2013-10-10 Mark Wielaard <mjw@redhat.com>
1385 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1386 start_addr and rename last_offset to last_addr. Now both void *.
1387 (tree_visitor): Use start_add and die_addr instead of start_offset
1389 (dwarf_getfuncs): Use last_addr instead of last_offset.
1391 2013-10-06 Mark Wielaard <mjw@redhat.com>
1393 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1394 DW_CFA_val_expression are not used with abi_cfi.
1396 2013-10-03 Josh Stone <jistone@redhat.com>
1398 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1399 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1400 a unit, make sure to always hash the sig8 here, so none are missed.
1402 2013-09-29 Mark Wielaard <mjw@redhat.com>
1404 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1405 uintptr_t before casting to char *.
1406 (__libdw_intern_expression): Cast data to uintptr_t before casting
1408 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1409 op->number2 to uintptr_t before casting to char *.
1411 2013-09-24 Josh Stone <jistone@redhat.com>
1413 * libdw_visit_scopes.c (classify_die): Removed.
1414 (may_have_scopes): New function to replace classify_die. There's no
1415 need for full classification; just find tags that may contain scopes.
1416 (__libdw_visit_scopes): Use a direct tag comparison for imported
1417 units, and use may_have_scopes to test if recursion is needed.
1419 2013-09-20 Mark Wielaard <mjw@redhat.com>
1421 * dwarf_getfuncs.c (visitor_info): New struct.
1422 (tree_visitor): New function.
1423 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1424 * libdw.h (dwarf_getfuncs): Expand function documentation.
1426 2013-09-12 Mark Wielaard <mjw@redhat.com>
1428 * fde.c (intern_fde): Free fde and set libdw errno when start
1429 or end could not be read.
1431 2013-08-24 Mark Wielaard <mjw@redhat.com>
1433 * dwarf_getlocation.c (store_implicit_value): Don't take data
1434 as argument, get block data from op number2. Return false when
1435 block data length and op number don't match up.
1436 (__libdw_intern_expression): Store start of block for
1437 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1438 relative data offset. Also store block start (including length)
1439 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1440 * dwarf_getlocation_attr.c: New file.
1441 * dwarf_getlocation_die.c: Likewise.
1442 * libdw.h (dwarf_getlocation_die): New function definition.
1443 (dwarf_getlocation_attr): Likewise.
1444 * libdwP.h: Declare internal dwarf_getlocation_die.
1445 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1446 dwarf_getlocation_attr.
1447 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1448 dwarf_getlocation_attr.c.
1450 2013-08-23 Mark Wielaard <mjw@redhat.com>
1452 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1453 (attr_base_address): New function.
1454 (initial_offset_base): New function.
1455 (getlocations_addr): New function. Taken from...
1456 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1458 (dwarf_getlocations): New function.
1459 * libdw.h (dwarf_getlocations): New function definition.
1460 * libdw.map (ELFUTILS_0.157): New.
1462 2013-07-02 Mark Wielaard <mjw@redhat.com>
1464 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1465 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1466 NEW_LINE macro. Free malloced line records if any at the end.
1468 2013-07-02 Mark Wielaard <mjw@redhat.com>
1470 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1472 2013-06-26 Mark Wielaard <mjw@redhat.com>
1474 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1475 DIEs without children. Return an error whenever dwarf_child or
1476 dwarf_siblingof return an error. Don't call recurse and increase
1477 the depth for an imported unit. Walk the children of an imported
1478 unit as if they are logical children of the parent root DIE.
1480 2013-05-03 Mark Wielaard <mjw@redhat.com>
1482 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1485 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1487 * libdw.map (ELFUTILS_0.156): New.
1489 2013-04-24 Mark Wielaard <mjw@redhat.com>
1491 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1493 2013-04-10 Mark Wielaard <mjw@redhat.com>
1495 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1496 equal to address size when we have a DW_FORM_ref_addr for DWARF
1499 2013-03-25 Mark Wielaard <mjw@redhat.com>
1501 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1504 2013-03-12 Mark Wielaard <mjw@redhat.com>
1506 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1507 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1509 2013-02-15 Mark Wielaard <mjw@redhat.com>
1511 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1512 not dbg->sectiondata.
1514 2013-01-07 Roland McGrath <roland@hack.frob.com>
1517 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1518 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1520 2012-12-18 Mark Wielaard <mjw@redhat.com>
1522 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1523 (check_section): Likewise on error.
1524 (scngrp_read): Likewise.
1525 (dwarf_begin_elf): Likewise.
1527 2012-10-09 Petr Machata <pmachata@redhat.com>
1529 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1530 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1531 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1532 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1534 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1536 * cfi.c: New include system.h.
1537 (execute_cfi) (enough_registers): Clear new memory after realloc.
1539 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1541 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1542 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1545 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1547 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1548 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1549 Remove the later DW_OP_call_frame_cfa push to RESULT.
1551 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1554 * fde.c (binary_search_fde): Remove always true <address >= start>
1555 conditional. Move L initialization upwards.
1557 2012-08-24 Mark Wielaard <mjw@redhat.com>
1559 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1560 when ENABLE_DWZ is defined.
1561 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1564 2012-08-16 Mark Wielaard <mjw@redhat.com>
1566 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1567 * dwarf.h (DW_LANG_Go): Update comment.
1568 (DW_LANG_Mips_Assembler): Likewise.
1570 2012-06-27 Mark Wielaard <mjw@redhat.com>
1572 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1573 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1574 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1575 (try_debugaltlink): New function.
1576 (open_debugaltlink): Likewise.
1577 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1578 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1580 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1581 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1583 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1584 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1585 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1587 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1588 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1589 (struct Dwarf): Add alt_dwarf and free_alt fields.
1590 (__libdw_read_offset): Add dbg_ret argument, use to check with
1591 __libdw_offset_in_section.
1592 (__check_build_id): New function declaration.
1593 (dwarf_begin): Define as INTDECL.
1594 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1595 and DW_FORM_GNU_strp_alt.
1597 2012-07-19 Mark Wielaard <mjw@redhat.com>
1599 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1601 2012-07-24 Mark Wielaard <mjw@redhat.com>
1603 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1604 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1607 2012-07-24 Mark Wielaard <mjw@redhat.com>
1609 * dwarf.h: Add DW_ATE_UTF.
1611 2012-06-27 Mark Wielaard <mjw@redhat.com>
1613 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1615 2012-06-26 Mark Wielaard <mjw@redhat.com>
1617 * libdwP.h: Add IDX_debug_macro.
1618 * dwarf.h: Add DW_AT_GNU_macros.
1619 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1620 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1622 2012-04-27 Mark Wielaard <mjw@redhat.com>
1624 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1625 a constant offset from DW_AT_low_pc.
1627 2012-03-19 Tom Tromey <tromey@redhat.com>
1629 * libdw_findcu.c (findcu_cb): Move earlier.
1630 (__libdw_intern_next_unit): Add new CU to search tree here...
1631 (__libdw_findcu): ... not here.
1633 2012-01-31 Mark Wielaard <mjw@redhat.com>
1635 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1637 2011-11-31 Mark Wielaard <mjw@redhat.com>
1639 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1641 2011-07-14 Mark Wielaard <mjw@redhat.com>
1643 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1645 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1647 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1648 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1651 2011-04-26 Mark Wielaard <mjw@redhat.com>
1653 * dwarf_child (dwarf_child): Sanity check end of section against
1654 cu_data () of die->cu.
1656 2011-03-22 Mark Wielaard <mjw@redhat.com>
1658 * dwarf.h: Add DW_TAG_GNU_call_site,
1659 DW_TAG_GNU_call_site_parameter,
1660 DW_AT_GNU_call_site_value,
1661 DW_AT_GNU_call_site_data_value,
1662 DW_AT_GNU_call_site_target,
1663 DW_AT_GNU_call_site_target_clobbered,
1664 DW_AT_GNU_tail_call,
1665 DW_AT_GNU_all_tail_call_sites,
1666 DW_AT_GNU_all_call_sites,
1667 DW_AT_GNU_all_source_call_sites,
1668 and DW_OP_GNU_entry_value.
1670 2011-03-10 Petr Machata <pmachata@redhat.com>
1672 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1673 abbreviation with code 0.
1675 2011-03-09 Petr Machata <pmachata@redhat.com>
1677 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1679 2011-02-23 Roland McGrath <roland@redhat.com>
1681 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1682 Declare __libdw_free_zdata.
1683 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1684 (dwarf_end): Call it.
1686 * dwarf_begin_elf.c (valid_p): Likewise.
1687 (check_section, scngrp_read): Likewise.
1688 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1690 2010-10-13 Roland McGrath <roland@redhat.com>
1692 * dwarf.h: Add DW_LANG_Go.
1694 2010-10-05 Roland McGrath <roland@redhat.com>
1696 * dwarf_getaranges.c: Use malloc rather than alloca,
1697 since the total number of elements can be quite huge.
1699 2010-07-26 Roland McGrath <roland@redhat.com>
1701 * dwarf_getlocation_implicit_pointer.c: New file.
1702 * Makefile.am (libdw_a_SOURCES): Add it.
1703 * libdw.map (ELFUTILS_0.149): New set.
1704 Add dwarf_getlocation_implicit_pointer.
1705 * libdw.h: Declare it.
1707 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1708 (dwarf_offdie, dwarf_offdie_types): Update callers.
1709 * libdwP.h: Declare it.
1711 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1712 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1714 2010-08-24 Roland McGrath <roland@redhat.com>
1716 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1718 2010-07-27 Roland McGrath <roland@redhat.com>
1720 * dwarf_formref_die.c: Fix sig8 hash insertion.
1722 2010-06-23 Roland McGrath <roland@redhat.com>
1724 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1725 * libdw.h: Remove it.
1726 * libdw.map: Likewise.
1728 2010-06-22 Roland McGrath <roland@redhat.com>
1730 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1732 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1735 2010-06-21 Roland McGrath <roland@redhat.com>
1737 * dwarf.h: Add DW_TAG_GNU_* constants.
1739 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1742 2010-06-20 Roland McGrath <roland@redhat.com>
1744 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1745 to search TUs instead of CUs.
1746 * libdwP.h: Update decl.
1747 (struct Dwarf): New member tu_tree.
1748 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1749 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1750 (dwarf_offdie): ... here.
1751 (dwarf_offdie_types): New function.
1752 * libdw.h: Declare it.
1753 * libdw.map (ELFUTILS_0.148): Add it.
1755 * libdwP.h (CUDIE): Use cu_data.
1756 * dwarf_formblock.c: Likewise.
1757 * dwarf_formref_die.c: Likewise.
1758 * dwarf_diecu.c: Use CUDIE macro.
1759 * dwarf_formaddr.c: Use cu_sec_idx.
1761 2010-06-16 Roland McGrath <roland@redhat.com>
1763 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1764 we don't repeat a CU lookup we've already done. Handle
1765 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1767 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1769 (__libdw_findcu): ... here. Call it.
1770 * libdwP.h: Declare it.
1771 (struct Dwarf): New member next_tu_offset.
1773 * dwarf_sig8_hash.c: New file.
1774 * dwarf_sig8_hash.h: New file.
1775 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1776 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1778 * libdwP.h (struct Dwarf): New member sig8_hash.
1779 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1780 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1782 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1783 (dwarf_nextcu): ... here. Call it.
1784 * libdw.h: Declare it.
1785 * libdwP.h: Add INTDECL.
1786 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1787 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1789 * libdwP.h (cu_sec_idx, cu_data): New functions.
1790 Use .debug_types when CU is a TU.
1791 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1792 * dwarf_siblingof.c: Likewise.
1793 * dwarf_formstring.c: Likewise.
1794 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1795 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1796 (dwarf_getlocation_addr): Likewise.
1798 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1799 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1800 .debug_types header size instead of .debug_info header size.
1802 * dwarf_diecu.c: Update caller.
1803 * dwarf_getaranges.c: Likewise.
1804 * dwarf_nextcu.c: Likewise.
1805 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1807 * fde.c (fde_by_offset): Renamed to ...
1808 (__libdw_fde_by_offset): ... this, made global and internal_function.
1809 Don't take ADDRESS argument.
1810 (__libdw_find_fde): Update caller. Do address sanity check here.
1811 * cfi.h: Declare __libdw_fde_by_offset.
1812 * cfi.c (dwarf_cfi_validate_fde): New function.
1813 * libdw.h: Declare it.
1814 * libdw.map (ELFUTILS_0.148): Add it.
1816 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1817 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1819 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1820 Don't assume DW_EH_PE_aligned refers to native address size.
1822 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1825 2010-06-17 Roland McGrath <roland@redhat.com>
1827 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1829 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1830 into an inner inline function. Set new fields. Check all fields for
1831 overflow when setting.
1832 * dwarf_lineisa.c: New file.
1833 * dwarf_linediscriminator.c: New file.
1834 * dwarf_lineop_index.c: New file.
1835 * Makefile.am (libdw_a_SOURCES): Add them.
1836 * libdw.map (ELFUTILS_0.148): Add them.
1837 * libdw.h: Declare them.
1839 2010-06-16 Roland McGrath <roland@redhat.com>
1841 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1843 * fde.c (fde_by_offset): Renamed to ...
1844 (__libdw_fde_by_offset): ... this, made global and internal_function.
1845 Don't take ADDRESS argument.
1846 (__libdw_find_fde): Update caller. Do address sanity check here.
1847 * cfi.h: Declare __libdw_fde_by_offset.
1848 * cfi.c (dwarf_cfi_validate_fde): New function.
1849 * libdw.h: Declare it.
1850 * libdw.map (ELFUTILS_0.148): Add it.
1852 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1853 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1855 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1856 Don't assume DW_EH_PE_aligned refers to native address size.
1858 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1861 2010-06-15 Roland McGrath <roland@redhat.com>
1863 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1865 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1866 here, since we don't support it yet.
1868 * dwarf_next_cfi.c: Handle version 4 format.
1870 * dwarf_getsrclines.c: Handle version 4 format.
1872 2010-06-01 Roland McGrath <roland@redhat.com>
1874 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1875 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1877 * libdwP.h (CIE_VERSION): Remove unused macro.
1879 * dwarf_getsrclines.c: Fix version field test.
1880 * libdwP.h (DWARF_VERSION): Remove useless macro.
1882 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1884 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1886 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1888 2010-05-31 Mark Wielaard <mjw@redhat.com>
1890 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1891 * libdw.h (dwarf_cfi_cie_p): ... here.
1893 2010-05-31 Mark Wielaard <mjw@redhat.com>
1895 * dwarf.h: Fix DW_LANG_Python constant.
1897 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1899 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1902 2010-05-27 Roland McGrath <roland@redhat.com>
1904 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1905 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1907 2010-05-08 Roland McGrath <roland@redhat.com>
1909 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1910 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1911 (getlocation): Update caller.
1912 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1913 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1914 * libdwP.h: Update decl.
1916 2010-04-26 Roland McGrath <roland@redhat.com>
1918 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1919 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1920 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1921 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1923 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1924 Prepend DW_OP_call_frame_cfa if true.
1925 (getlocation): Update caller.
1926 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1927 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1928 * libdwP.h: Update decl.
1930 2010-04-22 Roland McGrath <roland@redhat.com>
1932 * cfi.c (execute_cfi): Never return without cleanup.
1934 (cie_cache_initial_state): Adjust caller to expect that free.
1935 (__libdw_frame_at_address): Likewise.
1937 2010-03-10 Roland McGrath <roland@redhat.com>
1939 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1941 2010-02-15 Roland McGrath <roland@redhat.com>
1943 * Makefile.am: Use config/eu.am for common stuff.
1945 2010-02-02 Mark Wielaard <mjw@redhat.com>
1947 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1949 2010-01-07 Roland McGrath <roland@redhat.com>
1951 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1953 2010-01-05 Roland McGrath <roland@redhat.com>
1955 * dwarf_aggregate_size.c: New file.
1956 * Makefile.am (libdw_a_SOURCES): Add it.
1957 * libdw.h: Declare it.
1958 * libdwP.h: Add INTDECL.
1959 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1961 * dwarf_srclang.c: Add INTDEF.
1962 * libdwP.h: Add INTDECL.
1964 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1966 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1968 2009-11-21 Roland McGrath <roland@redhat.com>
1970 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1973 2009-10-15 Roland McGrath <roland@redhat.com>
1975 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1976 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1978 2009-09-17 Roland McGrath <roland@redhat.com>
1980 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1981 argument a pointer to const.
1982 * libdw.h: Update decl.
1984 2009-09-10 Roland McGrath <roland@redhat.com>
1986 * dwarf_getlocation.c (store_implicit_value): New function.
1987 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1988 (dwarf_getlocation_implicit_value): New function.
1989 * libdw.h: Declare it.
1990 * libdw.map (ELFUTILS_0.143): Add it.
1992 2009-09-09 Mark Wielaard <mjw@redhat.com>
1994 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1996 2009-08-21 Josh Stone <jistone@redhat.com>
1998 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
2000 2009-08-10 Roland McGrath <roland@redhat.com>
2002 * dwarf_getscopevar.c: Use dwarf_diename.
2004 2009-08-09 Roland McGrath <roland@redhat.com>
2006 * libdw.map (ELFUTILS_0.143): New version set,
2007 inherits from ELFUTILS_0.142.
2008 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
2009 alias in the ELFUTILS_0.122 version set and the default in the new set.
2010 * dwarf_srclang.c: Likewise.
2011 * dwarf_decl_file.c: Likewise.
2012 * dwarf_decl_line.c: Likewise.
2013 * dwarf_decl_column.c: Likewise.
2014 * dwarf_bytesize.c: Likewise.
2015 * dwarf_bitsize.c: Likewise.
2016 * dwarf_bitoffset.c: Likewise.
2018 2009-08-07 Roland McGrath <roland@redhat.com>
2020 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
2021 * dwarf_srclang.c: Likewise.
2022 * dwarf_decl_file.c: Likewise.
2023 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
2024 * dwarf_bytesize.c: Likewise.
2025 * dwarf_bitsize.c: Likewise.
2026 * dwarf_bitoffset.c: Likewise.
2028 2009-07-22 Roland McGrath <roland@redhat.com>
2030 * dwarf_frame_cfa.c: Change calling convention.
2031 * libdw.h: Update decl.
2033 * dwarf_frame_register.c: Change calling/return-value convention for
2034 value-only results and undefined/same_value.
2035 * libdw.h: Update decl.
2037 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
2038 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
2039 return that value instead.
2040 (getlocation): Update caller.
2041 * dwarf_frame_cfa.c: Likewise.
2042 * libdwP.h: Update decl.
2044 2009-07-21 Roland McGrath <roland@redhat.com>
2046 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
2047 Fix loop iteration after skipping a bogus or useless CU.
2049 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
2050 absence, not DWARF_E_NO_DEBUG_LINE.
2052 2009-07-20 Roland McGrath <roland@redhat.com>
2054 * dwarf_getlocation.c (__libdw_intern_expression):
2055 Handle DW_OP_stack_value.
2057 2009-07-16 Roland McGrath <roland@redhat.com>
2059 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
2060 reject others when CU's version > 3.
2062 * dwarf_formflag.c: Handle DW_FORM_flag_present.
2064 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
2065 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
2066 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
2067 and DW_AT_const_expr.
2068 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
2069 and DW_FORM_ref_sig8.
2071 2009-07-15 Roland McGrath <roland@redhat.com>
2073 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
2074 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
2076 2009-07-13 Roland McGrath <roland@redhat.com>
2078 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
2080 2009-07-08 Roland McGrath <roland@redhat.com>
2082 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
2085 * libdwP.h (struct Dwarf): Add member `cfi'.
2086 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
2087 * dwarf_getcfi.c: New file.
2088 * dwarf_getcfi_elf.c: New file.
2089 * dwarf_cfi_end.c: New file.
2090 * dwarf_cfi_addrframe.c: New file.
2091 * dwarf_frame_cfa.c: New file.
2092 * dwarf_frame_register.c: New file.
2093 * dwarf_frame_return_address_register.c: New file.
2094 * Makefile.am (libdw_a_SOURCES): Add them.
2095 * unwind.h: Declare those functions.
2096 * libdw.map (ELFUTILS_0.142): Export them.
2098 * dwarf_getlocation.c (__libdw_intern_expression): New function,
2100 (getlocation): ... here, call it.
2101 * libdwP.h: Declare it.
2105 * frame-cache.c: New file.
2108 * encoded-value.h: New file.
2109 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2110 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
2111 * dwarf_error.c (errmsgs): Add element for it.
2113 * dwarf_next_cfi.c: New file.
2114 * Makefile.am (libdw_a_SOURCES): Add it.
2115 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
2116 Declare dwarf_next_cfi.
2117 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
2120 * memory-access.h [! ALLOW_UNALIGNED]
2121 (read_2ubyte_unaligned): Renamed to ...
2122 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
2123 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
2124 (read_2sbyte_unaligned): Likewise.
2125 (read_4ubyte_unaligned): Likewise.
2126 (read_4sbyte_unaligned): Likewise.
2127 (read_8ubyte_unaligned): Likewise.
2128 (read_8sbyte_unaligned): Likewise.
2130 * libdwP.h (IDX_eh_frame): Remove it.
2131 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
2133 2009-07-08 Roland McGrath <roland@redhat.com>
2135 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
2137 * dwarf_getlocation.c (check_constant_offset): New function.
2138 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
2139 handle DW_AT_data_member_location of data[48] as constant offset.
2141 2009-06-18 Roland McGrath <roland@redhat.com>
2143 * libdwP.h (__libdw_read_address_inc): Constify.
2144 (__libdw_read_offset_inc): Likewise.
2145 * dwarf_getaranges.c: Likewise.
2146 * dwarf_getlocation.c: Likewise.
2147 * dwarf_getsrclines.c: Likewise.
2148 * dwarf_nextcu.c: Likewise.
2150 2009-05-05 Petr Machata <pmachata@redhat.com>
2152 * libdwP.h (__libdw_formptr): Declare new function.
2153 * dwarf_formudata.c: Implement it here.
2154 * dwarf_getlocation.c (dwarf_getlocation_addr):
2155 Call it instead of hand-rolled offset handling code.
2156 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2157 * dwarf_ranges.c (dwarf_ranges): Likewise.
2159 2009-05-04 Petr Machata <pmachata@redhat.com>
2161 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
2162 * dwarf_ranges.c: Implement it here.
2163 (dwarf_ranges): Call it.
2164 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
2166 2009-04-23 Petr Machata <pmachata@redhat.com>
2168 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
2169 of read_*ubyte_unaligned.
2170 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
2171 * dwarf_formstring.c (dwarf_formstring): Likewise.
2172 * dwarf_formudate.c (dwarf_formudata): Likewise.
2173 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
2174 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
2175 * dwarf_getpubnames.c (get_offsets): Likewise.
2176 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
2178 2009-04-23 Petr Machata <pmachata@redhat.com>
2180 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
2181 __libdw_read_addr, __libdw_read_off): Add four new internal
2184 2009-05-07 Roland McGrath <roland@redhat.com>
2186 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
2187 return value and OFFSET argument, not CU-relative. Only fetch the
2188 attribute data when called with OFFSET of 0.
2190 2009-05-07 Petr Machata <pmachata@redhat.com>
2192 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
2193 DW_AT_macro_info attribute of CU DIE.
2195 2009-04-15 Roland McGrath <roland@redhat.com>
2197 * dwarf.h (DW_CIE_ID): Removed.
2198 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
2200 2009-04-01 Roland McGrath <roland@redhat.com>
2202 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
2204 2009-01-28 Roland McGrath <roland@redhat.com>
2206 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
2207 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
2209 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
2211 2009-01-26 Roland McGrath <roland@redhat.com>
2213 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
2215 2009-01-25 Roland McGrath <roland@redhat.com>
2217 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
2219 2009-01-23 Roland McGrath <roland@redhat.com>
2221 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
2222 Put these rules under if MAINTAINER_MODE.
2224 2009-01-22 Roland McGrath <roland@redhat.com>
2226 * dwarf.h: Add DW_OP_GNU_encoded_addr.
2228 2009-01-21 Roland McGrath <roland@redhat.com>
2230 * Makefile.am (CLEANFILES): Renamed to ...
2231 (MOSTLYCLEANFILES): ... here.
2232 (CLEANFILES): New variable, add known-dwarf.h.
2234 2009-01-17 Roland McGrath <roland@redhat.com>
2236 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
2237 Make it unconditional.
2238 (BUILT_SOURCES): Updated.
2240 * dwarf.h: Add description comments for DW_LANG_* values.
2242 * Makefile.am [MAINTAINER_MODE]
2243 ($(srcdir)/known-dwarf.h): New target.
2244 (BUILT_SOURCES): Add it.
2246 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
2248 2009-01-10 Ulrich Drepper <drepper@redhat.com>
2250 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
2252 2009-01-08 Roland McGrath <roland@redhat.com>
2254 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2256 2008-01-06 Roland McGrath <roland@redhat.com>
2258 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2260 * dwarf_haschildren.c: Return -1 for error case, not 0.
2262 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2264 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2266 * dwarf.h: Add definition for unwind and call frame information.
2268 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2269 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2271 2008-08-15 Roland McGrath <roland@redhat.com>
2273 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2274 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2276 2008-01-21 Ulrich Drepper <drepper@redhat.com>
2278 * dwarf_child.c: Minor optimizations.
2279 * dwarf_getattrs.c: Likewise.
2280 * dwarf_getpubnames.c: Likewise.
2281 * dwarf_siblingof.c: Likewise.
2282 * dwarf_tag.c: Likewise.
2284 2008-01-18 Ulrich Drepper <drepper@redhat.com>
2286 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2287 of DWARF_VERSION comparison, just fail if the file's version is newer.
2289 2008-01-17 Nick Clifton <nickc@redhat.com>
2291 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2292 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2293 (DWARF3_LENGTH_64_BIT): New define.
2294 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2295 * dwarf_getpubnames: Include dwarf.h.
2296 (get_offsets): Use the new definitions.
2297 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2298 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2299 (dwarf_nextcu): Use the new definitions.
2301 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2302 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2303 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2304 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2306 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2309 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2311 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2312 Set the address in the return structure to the address of the next
2313 non-sibling die, if there is no sibling and the return pointer is
2314 not the same as the die pointer.
2315 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2317 * dwarf_child.c: Fix typo in comment.
2319 * libdwP.h (DWARF_VERSION): Change to 3.
2321 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2322 not have a initialised valp pointer.
2324 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2325 the end of the attributes is reached. When the callback fails,
2326 return the address of the failing attribute, not the address of
2328 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2330 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2331 (dwarf_child): Likewise.
2332 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2333 (dwarf_tag): Likewise.
2335 2008-01-08 Roland McGrath <roland@redhat.com>
2337 * Makefile.am (euinclude): Variable removed.
2338 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2339 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
2341 2007-10-17 Roland McGrath <roland@redhat.com>
2343 * libdw.h (__deprecated_attribute__): New macro.
2344 (dwarf_formref): Mark it deprecated.
2345 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2346 (dwarf_formref): ... here. Call it. Remove INTDEF.
2347 * libdwP.h: Remove INTDECL.
2348 Declare __libdw_formref.
2349 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2350 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2352 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2353 needs to check CU->version.
2355 * libdwP.h (struct Dwarf_CU): New member `version'.
2356 * libdw_findcu.c (__libdw_findcu): Initialize it.
2358 * dwarf_child.c: Return 1 for null entry as first child.
2360 2007-10-05 Roland McGrath <roland@redhat.com>
2362 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2364 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2365 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2367 2007-10-03 Roland McGrath <roland@redhat.com>
2369 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2370 and dwfl_build_id_find_debuginfo.
2372 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2373 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2375 2007-10-02 Roland McGrath <roland@redhat.com>
2377 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2380 2007-08-07 Roland McGrath <roland@redhat.com>
2382 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2383 error code is DWARF_E_NOERROR (0).
2385 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2386 Fix typo in __libdw_visit_scopes argument.
2388 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2389 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2391 2007-07-03 Roland McGrath <roland@redhat.com>
2393 * libdw.h (__extern_inline): New macro.
2394 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2396 2007-04-16 Roland McGrath <roland@redhat.com>
2398 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2400 2007-04-05 Roland McGrath <roland@redhat.com>
2402 * dwarf_getsrcdirs.c: New file.
2403 * Makefile.am (libdw_a_SOURCES): Add it.
2404 * libdw.h: Declare dwarf_getsrcdirs.
2405 * libdw.map (ELFUTILS_0.127): Add it.
2407 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2408 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2409 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2410 Save DIRARRAY in the Dwarf_Files.
2412 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
2413 address to check for all-ones base address entry. Check directly.
2414 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2416 2007-03-25 Roland McGrath <roland@redhat.com>
2418 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2419 Return NULL when freeing RESULT on error.
2420 (global_read, scngrp_read): Check return value from check_section,
2421 break out of loop after it has freed RESULT.
2422 (valid_p): Handle null argument.
2424 2007-03-12 Roland McGrath <roland@redhat.com>
2426 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2428 2007-03-04 Roland McGrath <roland@redhat.com>
2430 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2431 ELFUTILS_0.126. Add dwfl_module_addrsym.
2433 2007-02-10 Roland McGrath <roland@redhat.com>
2435 * dwarf.h (DW_OP_fbreg): Comment fix.
2437 2007-02-03 Roland McGrath <roland@redhat.com>
2439 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2440 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2441 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2442 exported in the past.
2444 2006-12-17 Roland McGrath <roland@redhat.com>
2446 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2447 address when the CU is missing attributes due to buggy GCC.
2449 2006-08-29 Roland McGrath <roland@redhat.com>
2451 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2453 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2454 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2456 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2457 result is aligned. Adjust NEWP->remaining here for this allocation.
2458 * libdwP.h: Update decl.
2459 (libdw_alloc): Update caller.
2461 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2463 * dwarf_child.c: Adjust for internal_function_def removal.
2464 * dwarf_getabbrev.c: Likewise.
2465 * dwarf_tag.c: Likewise.
2466 * libdw_form.c: Likewise.
2467 * memory-access.c: Likewise.
2469 2006-06-28 Roland McGrath <roland@redhat.com>
2471 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2473 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2476 2006-05-27 Ulrich Drepper <drepper@redhat.com>
2478 * libdw.h: Add extern "C".
2480 2006-05-22 Ulrich Drepper <drepper@redhat.com>
2482 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2483 aranges information.
2485 2006-05-21 Ulrich Drepper <drepper@redhat.com>
2487 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2490 2006-02-28 Roland McGrath <roland@redhat.com>
2492 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2493 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2494 values from DWARF 3.0.
2496 2006-02-22 Roland McGrath <roland@redhat.com>
2498 * libdw.map: Bump to 0.120; export dwfl_version.
2500 2005-12-22 Roland McGrath <roland@redhat.com>
2502 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2504 2005-12-12 Roland McGrath <roland@redhat.com>
2506 * dwarf_ranges.c: Copy CU base address-finding code from
2509 2005-12-09 Roland McGrath <roland@redhat.com>
2511 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2512 Delay CU base lookup until it's needed.
2513 If CU base lookup fails with no error, flag invalid DWARF.
2515 2005-11-25 Roland McGrath <roland@redhat.com>
2517 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2519 2005-11-15 Roland McGrath <roland@redhat.com>
2521 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2523 2005-11-13 Roland McGrath <roland@redhat.com>
2525 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2527 2005-10-27 Roland McGrath <roland@redhat.com>
2529 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2530 don't match end_sequence markers.
2532 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2533 before normal records at the same address.
2534 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2537 2005-10-26 Roland McGrath <roland@redhat.com>
2539 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2540 * dwarf_func_file.c: Renamed to ...
2541 * dwarf_decl_file.c: ... here.
2542 * dwarf_func_col.c: Renamed to ...
2543 * dwarf_decl_column.c: ... here.
2544 * dwarf_func_line.c: Renamed to ...
2545 * dwarf_decl_line.c: ... here.
2546 (dwarf_func_line): Renamed to ...
2547 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2548 (__libdw_func_intval): Renamed __libdw_attr_intval.
2549 * dwarf_func_name.c: File removed.
2550 * dwarf_func_lowpc.c: File removed.
2551 * dwarf_func_highpc.c: File removed.
2552 * dwarf_func_entrypc.c: File removed.
2553 * dwarf_func_die.c: File removed.
2554 * Makefile.am (libdw_a_SOURCES): Updated.
2555 * libdw.h: Update decls.
2556 (Dwarf_Func): Type removed.
2557 * libdwP.h: Update decls.
2558 (struct Dwarf_Func_s): Type removed.
2559 * libdw.map: Updated.
2561 * libdwP.h (CUDIE): New macro.
2562 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2563 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2564 * dwarf_ranges.c (dwarf_ranges): Likewise.
2566 * dwarf_getloclist.c: Renamed to ...
2567 * dwarf_getlocation.c: ... here.
2568 (getloclist): Renamed to getlocation.
2569 (dwarf_getloclist): Renamed to dwarf_getlocation.
2570 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2571 * Makefile.am (libdw_a_SOURCES): Updated.
2572 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2573 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2574 (Dwarf_Loc): Renamed Dwarf_Op.
2575 * libdwP.h (struct loc_s): Update use.
2576 * libdw.map: Update map.
2578 * dwarf_entry_breakpoints.c: Use the second line record within the
2579 function, regardless of its source location data.
2581 2005-10-25 Roland McGrath <roland@redhat.com>
2583 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2585 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2587 2005-10-14 Roland McGrath <roland@redhat.com>
2589 * dwarf_diecu.c (dwarf_diecu): New file.
2590 * Makefile.am (libdw_a_SOURCES): Add it.
2591 * libdw.h: Declare dwarf_diecu.
2592 * libdw.map: Export it.
2594 * libdw.map: Bump to 0.116; export dwarf_ranges.
2596 2005-09-20 Roland McGrath <roland@redhat.com>
2598 * dwarf_haspc.c: Use dwarf_ranges.
2599 * dwarf_entry_breakpoints.c: Likewise.
2601 * dwarf_ranges.c: New file.
2602 * Makefile.am (libdw_a_SOURCES): Add it.
2603 * libdw.h: Declare dwarf_ranges.
2604 * libdwP.h: Add INTDECL.
2606 2005-09-14 Roland McGrath <roland@redhat.com>
2608 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2609 prologue_end marker scanning loop.
2611 2005-09-11 Roland McGrath <roland@redhat.com>
2613 * dwarf.h: Comment typo fix.
2615 2005-09-07 Roland McGrath <roland@redhat.com>
2617 * dwarf_entry_breakpoints.c: New file.
2618 * Makefile.am (libdw_a_SOURCES): Add it.
2619 * libdw.h: Declare dwarf_entry_breakpoints.
2621 * dwarf_entrypc.c: New file.
2622 * Makefile.am (libdw_a_SOURCES): Add it.
2623 * libdw.h: Declare dwarf_entrypc.
2624 * libdwP.h: Add INTDECL.
2626 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2628 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2629 (%.os): Use COMPILE.os.
2630 (COMPILE.os): Filter out gconv options.
2632 2005-08-27 Roland McGrath <roland@redhat.com>
2634 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2635 __libdw_visit_scopes.
2637 * dwarf_getscopes_die.c: New file.
2638 * Makefile.am (libdw_a_SOURCES): Add it.
2639 * libdw.h: Declare dwarf_getscopes_die.
2640 * libdw.map: Bump to 0.115 and add it.
2642 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2643 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2644 Take two functions for both preorder and postorder visitors.
2645 * libdwP.h: Update decl.
2646 (struct Dwarf_Die_Chain): New type.
2647 * dwarf_func_inline.c: Update uses.
2649 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2651 * libdwP.h: Add INTDECL.
2652 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2654 2005-08-23 Roland McGrath <roland@redhat.com>
2656 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2657 DW_AT_specification the same as DW_AT_abstract_origin.
2659 2005-08-20 Roland McGrath <roland@redhat.com>
2661 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2662 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2663 and dwfl_report_offline.
2665 2005-08-19 Roland McGrath <roland@redhat.com>
2667 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2668 Add dwfl_module_relocate_address, dwfl_module_relocations,
2669 dwfl_module_relocation_info.
2671 2005-08-18 Roland McGrath <roland@redhat.com>
2673 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2674 outermost scope in the results.
2676 2005-08-15 Roland McGrath <roland@redhat.com>
2678 * dwarf_func_inline.c: New file.
2679 * Makefile.am (libdw_a_SOURCES): Add it.
2680 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2681 * libdw.map: Add them.
2683 * dwarf_func_die.c: New file.
2684 * Makefile.am (libdw_a_SOURCES): Add it.
2685 * libdw.h: Declare dwarf_func_die.
2686 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2688 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2690 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2691 of DW_LNS_set_epilog_begin.
2693 2005-08-09 Roland McGrath <roland@redhat.com>
2695 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2697 * dwarf_end.c: Add INTDEF.
2698 * dwarf_error.c (dwarf_errmsg): Likewise.
2699 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2701 2005-08-01 Roland McGrath <roland@redhat.com>
2703 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2704 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2706 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2708 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2709 (libdw_a_LIBADD): Add all files from libdwfl.a.
2711 2005-07-27 Roland McGrath <roland@redhat.com>
2713 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2714 along with ../libebl/libebl.a and ../lib/libeu.a;
2715 depend on ../libelf/libelf.so.
2716 (libdw_so_LDADD): New variable.
2717 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2719 * libdw.map: Define an empty base version and move all symbols to
2720 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2722 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2724 * dwarf_error.c: Add internal alias for dwarf_errno.
2725 * libdwP.h: Declare __dwarf_errno_internal.
2726 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2728 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2731 2005-06-01 Roland McGrath <roland@redhat.com>
2733 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2734 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2736 2005-06-08 Roland McGrath <roland@redhat.com>
2738 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2739 (get_sleb128_step, get_sleb128): Likewise.
2740 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2741 * dwarf_getloclist.c (getloclist): Likewise.
2742 * dwarf_formblock.c (dwarf_formblock): Likewise.
2743 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2744 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2745 * dwarf_formref.c (dwarf_formref): Likewise.
2746 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2747 * dwarf_formudata.c (dwarf_formudata): Likewise.
2748 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2749 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2750 * dwarf_tag.c (dwarf_tag): Likewise.
2751 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2752 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2753 * libdw_form.c (__libdw_form_val_len): Likewise.
2754 * libdwP.h: Update decl.
2756 2005-06-04 Roland McGrath <roland@redhat.com>
2758 * memory-access.h (get_uleb128_rest_return): New macro.
2759 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2760 (get_sleb128_rest_return): New macro.
2761 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2762 * memory-access.c: New file.
2763 * Makefile.am (libdw_a_SOURCES): Add it.
2764 (DEFS): Add -DIS_LIBDW.
2766 2005-05-31 Roland McGrath <roland@redhat.com>
2768 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2771 2005-05-30 Roland McGrath <roland@redhat.com>
2773 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2774 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2776 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2777 BEGIN value. Instead, match base address entries separately for
2780 2005-05-28 Roland McGrath <roland@redhat.com>
2782 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2783 past location expression contents.
2785 2005-05-23 Roland McGrath <roland@redhat.com>
2787 * dwarf_getsrclines.c: Comment typo fix.
2789 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2790 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2792 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2794 * libdwP.h: Only use INTDECL for alias prototypes.
2796 2005-05-19 Roland McGrath <roland@redhat.com>
2798 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2800 * dwarf_getscopevar.c: New file.
2801 * Makefile.am (libdw_a_SOURCES): Add it.
2802 * libdw.h: Declare dwarf_getscopevar.
2804 * dwarf_getsrcfiles.c: Add INTDEF.
2805 * dwarf_haschildren.c: Likewise.
2806 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2808 * dwarf_getscopes.c: New file.
2809 * Makefile.am (libdw_a_SOURCES): Add it.
2810 * libdw.h: Declare dwarf_getscopes.
2811 * libdw.map: Add it.
2813 2005-05-18 Roland McGrath <roland@redhat.com>
2815 * libdwP.h (IDX_debug_ranges): New enum constant.
2816 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2817 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2818 * dwarf_error.c (errmsgs): Add it.
2819 * dwarf_haspc.c: New file.
2820 * libdw.h: Declare dwarf_haspc.
2821 * libdw.map: Add it.
2822 * libdwP.h: Add INTDECL.
2824 * dwarf_attr_integrate.c: New file.
2825 * dwarf_hasattr_integrate.c: New file.
2826 * Makefile.am (libdw_a_SOURCES): Add them.
2827 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2828 * libdw.map: Add them.
2830 * dwarf_hasattr.c: Add INTDEF.
2831 * libdwP.h: Add INTDECL for it.
2833 * dwarf_formref_die.c: New file.
2834 * Makefile.am (libdw_a_SOURCES): Add it.
2835 * libdw.h (dwarf_formref_die): Declare it.
2836 * libdwP.h (dwarf_formref_die): Add INTDECL.
2837 * libdw.map: Add it.
2839 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2841 (dwarf_getloclist): ... here. Call them.
2842 (dwarf_addrloclists): New function.
2843 * libdw.h: Declare it.
2844 * libdw.map: Add it.
2846 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2847 DW_MACINFO_end_file. Recognize type 0 as terminator.
2849 2005-05-05 Roland McGrath <roland@redhat.com>
2851 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2853 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2854 the line program does not produce all entries in ascending order.
2856 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2858 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2859 occurences (e.g., inlines) better.
2861 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2863 * libdw.h (DWARF_END_ABBREV): Define.
2864 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2866 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2868 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2869 as error of __libdw_getabbrev.
2871 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2873 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2875 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2876 results back to caller.
2878 2005-04-04 Roland McGrath <roland@redhat.com>
2880 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2882 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2885 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2887 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2889 * dwarf_getsrc_file.c: New file.
2890 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2891 * libdw.h: Declare dwarf_getsrc_file.
2892 * libdw.map: Add dwarf_getsrc_file.
2894 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2896 * dwarf_func_entrypc.c: New file.
2897 * dwarf_func_col.c: New file.
2898 * dwarf_func_line.c: New file.
2899 * dwarf_func_file.c: New file.
2900 * libdw.h: Add prototypes for new functions.
2901 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2903 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2904 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2905 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2906 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2907 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2908 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2910 * dwarf.h: Add some DWARF3 definitions.
2912 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2914 * dwarf_getfuncs.c: New file.
2915 * dwarf_func_highpc.c: New file.
2916 * dwarf_func_lowpc.c: New file.
2917 * dwarf_func_name.c: New file.
2918 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2919 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2920 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2921 and dwarf_func_name.
2922 * libdw.h: Add prototypes for new functions.
2923 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2924 * dwarf_siblingof.c: Likewise.
2925 * dwarf_dieoffset.c: Likewise.
2926 * dwarf_highpc.c: Likewise.
2927 * dwarf_lowpc.c: Likewise.
2928 * libdwP.h: Add prototypes for internal functions.
2929 Define Dwarf_Func_s structure.
2931 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2933 * libdw.h: Add padding in Dwarf_die.
2935 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2936 * dwarf_attr.c: Likewise.
2937 * dwarf_begin.c: Likewise.
2938 * dwarf_begin_elf.c: Likewise.
2939 * dwarf_bitoffset.c: Likewise.
2940 * dwarf_bitsize.c: Likewise.
2941 * dwarf_bytesize.c: Likewise.
2942 * dwarf_diename.c: Likewise.
2943 * dwarf_formaddr.c: Likewise.
2944 * dwarf_formblock.c: Likewise.
2945 * dwarf_formref.c: Likewise.
2946 * dwarf_formstring.c: Likewise.
2947 * dwarf_formudata.c: Likewise.
2948 * dwarf_getarange_addr.c: Likewise.
2949 * dwarf_getarangeinfo.c: Likewise.
2950 * dwarf_getaranges.c: Likewise.
2951 * dwarf_getloclist.c: Likewise.
2952 * dwarf_getmacros.c: Likewise.
2953 * dwarf_getsrc_die.c: Likewise.
2954 * dwarf_getsrcfiles.c: Likewise.
2955 * dwarf_getsrclines.c: Likewise.
2956 * dwarf_highpc.c: Likewise.
2957 * dwarf_lowpc.c: Likewise.
2958 * dwarf_nextcu.c: Likewise.
2959 * dwarf_offdie.c: Likewise.
2960 * dwarf_siblingof.c: Likewise.
2961 * dwarf_srclang.c: Likewise.
2962 * dwarf_tag.c: Likewise.
2963 * libdw_findcu.c: Likewise.
2964 * libdwP.h: Add prototypes for internal functions.
2966 * dwarf_addrdie.c: New file.
2967 * dwarf_macro_opcode.c: New file.
2968 * dwarf_macro_param1.c: New file.
2969 * dwarf_macro_param2.c: New file.
2970 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2971 * libdwP.h: Remove Dwarf_Macro definition.
2972 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2973 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2974 * libdw.map: Add entries for new functions.
2976 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2978 * libdw.h: Handle broken gcc < 4.
2980 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2982 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2984 * dwarf_begin_elf.c: Fix warnings.
2985 * dwarf_dieoffset.c: Likewise.
2986 * dwarf_end.c: Likewise.
2987 * dwarf_error.c: Likewise.
2988 * dwarf_getpubnames.c: Likewise.
2990 * libdwP.h: Add new error values.
2991 * dwarf_error.c: Support new error values.
2992 * dwarf_getpubnames.c: Check parameter value.
2994 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2996 * Makefile.am: Check for text relocations in constructed DSO.
2998 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
3000 2005-02-04 Ulrich Drepper <drepper@redhat.com>
3002 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
3003 checks to not read over buffer boundaries for ill-formed DWARF data.
3005 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3007 * dwarf_child.c: Make compile with gcc 4.0.
3008 * dwarf_error.c: Likewise.
3009 * dwarf_formblock.c: Likewise.
3010 * dwarf_getabbrev.c: Likewise.
3011 * dwarf_getattrs.c: Likewise.
3012 * dwarf_getsrclines.c: Likewise.
3013 * dwarf_tag.c: Likewise.
3014 * libdw_form.c: Likewise.
3016 2004-01-20 Ulrich Drepper <drepper@redhat.com>
3018 * Makefile.am: Support building with mudflap.
3020 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
3021 * dwarf_getsrclines.c: Likewise.
3022 * dwarf_memory-access.h: Likewise.
3024 2004-01-19 Ulrich Drepper <drepper@redhat.com>
3026 * dwarf_getsrcfiles.c: Third parameter can be NULL.
3028 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
3029 Third parameter of dwarf_getsrcfiles can be NULL.
3031 * libdw.map: Add dwarf_getmacros.
3032 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
3033 * dwarf_getmacros.c: New file.
3035 2004-01-18 Ulrich Drepper <drepper@redhat.com>
3037 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
3039 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
3041 * dwarf_getsrclines.c:
3042 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
3044 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
3046 * libdwP.h (_): Use elfutils domain.
3048 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
3050 * dwarf_getsrclines.c: Fix typo in comment.
3052 2004-01-17 Ulrich Drepper <drepper@redhat.com>
3054 * Makefile.am: Support building with mudflap.
3056 2004-01-16 Ulrich Drepper <drepper@redhat.com>
3058 * memory-access.h: Add lots of const in case a pointer passed is const.
3060 * dwarf_formflag.c: New file.
3061 * dwarf_getattrs.c: New file.
3062 * dwarf_error.c: Add new error value.
3063 * libdw.h: Add prototypes for new functions. Adjust prototype for
3065 * libdw.map: Add new functions.
3066 * dwarf_getpubnames.c: Change type of return value and fourth parameter
3068 * libdwP.h: Add new error value.
3069 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
3072 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
3074 2004-01-12 Ulrich Drepper <drepper@redhat.com>
3076 * dwarf_getarange_addr.c: New file
3077 * dwarf_getarangeinfo.c: New file.
3078 * dwarf_getaranges.c: New file.
3079 * dwarf_onerange.c: New file.
3080 * libdw.h: Declare new functions. Define Dwarf_Arange and
3082 * libdw.map: Add new functions.
3083 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
3084 Define Dwarf_Aranges_s and Dwarf_Arange_s.
3085 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
3086 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
3087 * dwarf_error.c: Add new message.
3089 2004-01-11 Ulrich Drepper <drepper@redhat.com>
3091 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
3092 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
3093 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
3094 * dwarf_error.c: Add another message.
3095 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
3097 * dwarf_filesrc.c: Likewise.
3098 * dwarf_getsrcfiles.c: Likewise.
3099 * dwarf_getsrclines.c: Likewise.
3100 * dwarf_lineaddr.c: New file.
3101 * dwarf_linebeginstatement.c: New file.
3102 * dwarf_lineblock.c: New file.
3103 * dwarf_linecol.c: New file.
3104 * dwarf_lineendsequence.c: New file.
3105 * dwarf_lineepiloguebegin.c: New file.
3106 * dwarf_lineno.c: New file.
3107 * dwarf_lineprologueend.c: New file.
3108 * dwarf_onesrcline.c: New file.
3109 * dwarf_lineno.c: Change interface to store result in object pointed
3110 to by second parameter.
3111 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
3112 prototype. Define Dwarf_Files and Dwarf_Lines.
3113 * libdw.map: Add new functions.
3114 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
3115 * libdw_findcu.c: Don't initialize nlines field.
3117 * dwarf_siblingof: Little optimization.
3119 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
3120 * dwarf_end.c: Close ELF descriptor if free_elf is set.
3121 * libdwP.h (struct Dwarf): Add free_elf field.
3123 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
3125 * dwarf_getstring.c: New file.
3126 * dwarf_offabbrev.c: New file.
3127 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
3128 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
3129 parameters. Don't allocate memory if not necessary and don't lookup
3130 previous results if no CU given.
3131 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
3132 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
3133 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
3134 * libdwP.h: Change prototype for __libdw_getabbrev.
3136 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
3137 returning if this is wanted.
3139 2004-01-09 Ulrich Drepper <drepper@redhat.com>
3141 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
3142 with offset_size value.
3143 * libdw.h: Adjust dwarf_nextcu prototype.
3144 * libdwP.h (struct Dwarf_CU): Add offset_size member.
3145 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
3146 member of new CU struct.
3147 * dwarf_formstring.c: Depend on offset_size not address_size for
3148 DW_FORM_strp handling.
3149 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
3151 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
3153 (dwarf_tag): Correctly recognize failed lookup.
3155 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
3157 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
3158 * dwarf_formblock.c: New file.
3159 * dwarf_getloclist.c: Rewrite to handle a single block.
3160 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
3161 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
3162 dwarf_getloclistent declaration.
3163 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
3164 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
3165 Add locs member to struct Dwarf_CU.
3166 * libdw_fundcu.c: Initialize locs member of new CU.
3167 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
3168 Remove dwarf_getloclistent.c.
3170 2004-01-07 Ulrich Drepper <drepper@redhat.com>
3172 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
3173 * libdwP.h: Likewise.
3175 * dwarf_getloclist.c: New file.
3176 * dwarf_getloclistent.c: New file.
3177 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
3178 Declare dwarf_getloclistent and dwarf_getloclist.
3179 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
3180 * libdwP.h: Define DWARF_E_NO_LOCLIST.
3181 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
3184 * dwarf_error.c: More error messages.
3186 2004-01-06 Ulrich Drepper <drepper@redhat.com>
3188 * dwarf_getsrclines.c: Remove debugging support.
3190 * dwarf_getsrcfiles.c: New file.
3191 * dwarf_filesrc.c: New file.
3192 * libdw.h: Declare these functions. Define Dwarf_File.
3193 * libdwP.c: Adjust Dwarf_File_s definition.
3194 * libdw.map: Add these functions.
3195 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
3197 * dwarf_getsrclines.c: Initialize cu->files.
3199 2004-01-05 Ulrich Drepper <drepper@redhat.com>
3201 * libdw.h: Add more nonnull function attributes.
3203 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
3204 * dwarf_end.c (cu_free): New function.
3205 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
3206 * dwarf_error.c (errmsgs): Add new messages.
3207 * dwarf_getsrc_die.c: New file.
3208 * dwarf_getsrclines.c: New file.
3209 * dwarf_lineno.c: New file.
3210 * dwarf_linesrc.c: New file.
3211 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
3212 instead of the *_inc-less variants.
3213 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
3214 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
3215 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
3217 * libdwP.h: Add more error codes.
3218 (struct Dwarf): Remove mem_tail.next member.
3219 (Dwarf_File): Define type.
3220 (struct Dwarf_Line_s): Define type.
3221 (struct Dwarf_CU): Add lines and nlines members.
3222 (libdw_alloc): Define local variable _tail and use it.
3223 Add some function attributes.
3224 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
3225 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
3226 * memory-access.h: Add unlikely for the endian conversion paths.
3227 * Makefile.am (AM_CFLAGS): Add -std parameter.
3228 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3229 dwarf_lineno, and dwarf_linesrc.
3231 2003-08-11 Ulrich Drepper <drepper@redhat.com>
3233 * Moved to CVS archive.