1 2018-05-21 Mark Wielaard <mark@klomp.org>
3 * dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result.
4 * dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split
5 dwarf if shared with skeleton.
6 (dwarf_end): release fake_addr_cu.
7 * dwarf_formaddr.c (__libdw_cu_addr_base): Move to...
8 * libdwP.h (__libdw_cu_addr_base): ... here.
9 (struct Dwarf): Add fake_addr_cu field.
10 * dwarf_formudata.c (dwarf_formudata): Handle
11 DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
12 * dwarf_getlocation_attr.c (addr_valp): New static function.
13 (dwarf_getlocation_attr): Create attribute for values of
14 DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and
16 * libdw_find_split_unit.c (__libdw_find_split_unit): Connect
17 IDX_debug_addr sectiondata and fake_addr_cu between split and
20 2018-05-20 Mark Wielaard <mark@klomp.org>
22 * dwarf_cu_info.c: New file.
23 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c.
24 * libdw.h (dwarf_cu_info): New function declaration.
25 * libdw.map (ELFUTILS_0.171): Add dwarf_cu_info.
27 2018-05-24 Mark Wielaard <mark@klomp.org>
29 * dwarf_ranges.c (dwarf_ranges): Check for NULL cu.
30 * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base.
32 2018-05-18 Mark Wielaard <mark@klomp.org>
34 * dwarf_formudata.c (__libdw_formptr): Handle the special case
35 of IDX_debug_ranges for DW_UT_split_compile with version < 5.
36 * dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for
38 * dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie.
39 * dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for
41 * libdwP.h (struct Dwarf_CU): Add ranges_base field.
42 (__libdw_cu_ranges_base): New static inline function.
44 2018-05-18 Mark Wielaard <mark@klomp.org>
46 * libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL.
47 * dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by
48 taking the line table from the skeleton.
49 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by
50 only taking the files from .debug_line offset zero (if it exists),
51 otherwise fall back to the skeleton.
53 2018-05-17 Mark Wielaard <mark@klomp.org>
55 * dwarf_begin_elf.c (__libdw_debugdir): New function.
56 (valid_p): Call __libdw_debugdir.
57 * dwarf_end.c (dwarf_end.c): Free debugdir.
58 * dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic.
59 take debugdir as argument instead of fd.
60 (find_debug_altlink): Call __libdw_filepath with debugdir.
61 * libdwP.h (struct Dwarf): Add debugdir field.
62 (__libdw_debugdir): New function prototype.
63 (__libdw_filepath): Adjust prototype to take a const char * instead of
65 * libdw_find_split_unit.c (__libdw_find_split_unit): Call
66 __libdw_filepath with debugdir.
68 2018-05-17 Mark Wielaard <mark@klomp.org>
70 * dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile
71 unit DIE, search skeleton_compile unit DIE.
72 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
73 * libdwP.h (is_cudie): Check cu is not NULL.
75 2018-05-19 Mark Wielaard <mark@klomp.org>
77 * libdwP.h (__libdw_find_split_unit): Mark as internal_function.
79 2018-05-15 Mark Wielaard <mark@klomp.org>
81 * Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c.
82 * dwarf_end.c (cu_free): Free split Dwarf.
83 * dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by
84 calling __libdw_find_split_unit.
85 * libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field.
86 (__libdw_find_split_unit): New function prototype.
87 (str_offsets_base_off): Use cu Dwarf if dbg is NULL.
88 (filepath): Rename to ...
89 (__libdw_filepath): This. Which is the actual function name in
91 (libdw_find_split_unit.c): New file.
92 * libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1.
94 2018-05-15 Mark Wielaard <mark@klomp.org>
96 * libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out
98 * libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if
99 the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to
100 DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has
101 child DIEs and a DW_AT_GNU_dwo_name attribute.
103 2018-05-14 Mark Wielaard <mark@klomp.org>
105 * dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name,
106 DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base,
107 DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index,
108 DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index.
109 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index
111 (__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and
113 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index
115 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base
116 as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr.
117 * dwarf_getlocation.c (__libdw_intern_expression): Handle
118 DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as
120 * libdw_form.c (__libdw_form_val_compute_len): Handle
121 DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128.
123 2018-05-12 Mark Wielaard <mark@klomp.org>
125 * dwarf_begin_elf.c (check_section): Also recognize .dwo section
128 2018-05-11 Mark Wielaard <mark@klomp.org>
130 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr.
131 * dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup,
132 DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and
133 DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with
134 DW_AT_macros. Use libdw_valid_user_form.
136 2018-05-09 Mark Wielaard <mark@klomp.org>
138 * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to...
139 * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline.
140 (str_offsets_base_off): New internal function that also parses
141 .debug_str_offsets header if necessary.
143 2018-05-11 Mark Wielaard <mark@klomp.org>
145 * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is
146 known the Dwarf_Die is came from is valid.
147 * libdwP.h (__libdw_dieabbrev): Check cu is not NULL.
149 2018-05-08 Mark Wielaard <mark@klomp.org>
151 * dwarf_formref.c (__libdw_formref): Explicitly don't handle
152 DW_FORM_ref_sup4 and DW_FORM_ref_sup8.
153 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4
154 and DW_FORM_ref_sup8.
155 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup
156 as DW_FORM_GNU_strp_alt.
158 2018-05-05 Mark Wielaard <mark@klomp.org>
160 * dwarf.h: Add DWARF line content descriptions.
161 * libdwP.h (libdw_valid_user_form): New static function.
162 * dwarf_getsrclines.c (read_srclines): Check and parse version 5
163 DWARF header, dir and file tables separately from older versions
166 2018-04-24 Mark Wielaard <mark@klomp.org>
168 * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str".
169 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and
170 DWARF_E_NO_DEBUG_LINE_STR.
171 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp.
172 Get data from either .debug_str or .debug_line_str.
173 * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and
174 DWARF_E_NO_DEBUG_LINE_STR.
176 2018-04-03 Mark Wielaard <mark@klomp.org>
178 * dwarf_formudata.c (__libdw_formptr): Take and return const
179 unsigned char pointers.
180 * dwarf_getlocation.c (attr_base_address): Rename to...
181 (__libdw_cu_base_address): this. Take Dwarf_CU, check and set
183 (initial_offset_base): Renamed to...
184 (initial_offset): this. Only provide offset.
185 (getlocations_addr): Move data size check and
186 address base addition into __libdw_read_begin_end_pair_inc. Use
187 __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL
188 check (already done by initial_offset, through __libdw_formptr).
189 (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset.
190 Drop Elf_Data NULL check.
191 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument
192 type of readp to Add readend argument. Check data size. Include base
193 in begin and end result.
194 (initial_offset): New static function.
195 (dwarf_ranges): Don't check Elf_Data being NULL (already done by
196 initial_offset, through __libdw_formptr). Use __libdw_cu_base_address
197 and initial_offset. Remove base check and addition (already done by
198 __libdw_read_begin_end_pair_inc.
199 * libdwP.h (Dwarf_CU): Add base_address field.
200 (__libdw_read_begin_end_pair_inc): Change argument type of readp to
201 const. Add readend argument.
202 (__libdw_formptr): Take and return const unsigned char pointers.
203 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
206 2018-04-04 Mark Wielaard <mark@klomp.org>
208 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
209 addr_base and str_off_base.
211 2018-03-23 Mark Wielaard <mark@klomp.org>
213 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
215 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
216 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
217 (__libdw_cu_str_off_base): New function.
218 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
220 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
221 (struct Dwarf_CU): Add str_off_base field.
222 (__libdw_cu_str_off_base): New function declaration.
224 2018-03-22 Mark Wielaard <mark@klomp.org>
226 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
227 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
228 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
229 (__libdw_cu_addr_base): New function.
230 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
232 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
233 (struct Dwarf_CU): Add addr_base field.
234 (__libdw_cu_addr_base): New function definition.
235 * memory-access.h (file_byte_order): New static function.
236 (read_3ubyte_unaligned): New inline function.
238 2018-03-29 Mark Wielaard <mark@klomp.org>
240 * libdw.h (dwarf_decl_file): Extend documentation.
241 (dwarf_linesrc): Likewise.
242 (dwarf_filesrc): Likewise.
244 2018-03-06 Mark Wielaard <mark@klomp.org>
246 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
247 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
248 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
250 * dwarf_getlocation.c (__libdw_intern_expression): Handle
251 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
252 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
253 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
254 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
255 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
256 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
257 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
258 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
260 * dwarf_getlocation_implicit_pointer.c
261 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
263 2018-03-01 Mark Wielaard <mark@klomp.org>
265 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
266 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
269 2018-02-09 Mark Wielaard <mark@klomp.org>
271 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
274 2018-02-09 Mark Wielaard <mark@klomp.org>
276 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
277 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
278 * dwarf_formudata.c (dwarf_formudata): Likewise.
279 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
280 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
281 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
282 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
283 that will also return any data associated with the abbrev. Which
284 currently is only for DW_FORM_implicit_const. Based on...
285 (dwarf_getabbrevattr): ... this function. Which now just calls
286 dwarf_getabbrevattr_data.
287 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
288 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
289 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
290 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
291 function based on __libdw_get_uleb128_unchecked.
293 2018-02-08 Mark Wielaard <mark@klomp.org>
295 * dwarf.h: Add DWARF5 DW_FORMs.
296 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
297 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
298 DW_FORM_ref_sup[48] and DW_FORM_data16.
299 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
300 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
301 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
303 2018-01-30 Mark Wielaard <mark@klomp.org>
305 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
306 * dwarf_get_units.c: New file.
307 * libdw.h (dwarf_get_units): New function declaration.
308 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
310 2018-01-29 Mark Wielaard <mark@klomp.org>
312 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
313 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
314 is now called unit_idp. type_offsetp is now called subdie_offsetp.
315 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
316 and .debug_types sections for type units when type signature ref
318 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
319 __libdw_first_die_off_from_cu instead of trying by hand.
320 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
321 instead of checking type_offset by hand.
322 * dwarf_getlocation_implicit_pointer.c
323 (dwarf_getlocation_implicit_pointer): Likewise.
324 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
325 (__libdw_next_unit): New function based on dwarf_next_unit with
326 DWARF5 header support.
327 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
328 and type_sig8 to unit_id8.
329 (ISV4TU): New macro to determine whether a CU is a version 4 type
330 unit (which comes from the .debug_types section).
331 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
332 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
334 (__libdw_first_die_off_from_cu): New function that calls the above
336 (CUDIE): Use __libdw_first_die_off_from_cu.
337 (SUBDIE): New macro that provides the DIE for a CU using the
339 (__libdw_next_unit): New internal function declaration.
340 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
341 Accept DWARF version 5 headers. Setup unit_type.
342 (__libdw_findcu): Rename debug_types argument to v4_debug_types
343 argument (to indicate that we are looking in the .debug_types
344 section). Support finding the exact offset (unit header start).
346 2018-01-25 Mark Wielaard <mark@klomp.org>
348 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
349 * dwarf_die_addr_die.c: New file.
350 * libdw.h (dwarf_die_addr_die): New function declaration.
351 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
352 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
353 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
355 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
357 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
358 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
360 2018-01-22 Mark Wielaard <mark@klomp.org>
362 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
363 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
364 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
365 and alt_fd if we allocated them.
366 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
367 * dwarf_formstring.c (dwarf_formstring): Likewise.
368 * dwarf_getalt.c (__libdw_filepath): New internal function.
369 (find_debug_altlink): New static function.
370 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
372 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
374 * libdw.h (dwarf_getalt): Extend documentation.
375 (dwarf_setalt): Likewise.
376 * libdwP.h (struct Dwarf): Add alt_fd field.
377 (filepath): Declare new internal function.
379 2018-01-14 Petr Machata <pmachata@gmail.com>
381 * dwarf_formsdata.c (dwarf_formsdata):
382 <DW_FORM_data1>: Cast to signed char.
383 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
384 read_*ubyte_unaligned.
386 2017-12-26 Mark Wielaard <mark@klomp.org>
388 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
389 use bitfields for has_children and code.
390 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
391 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
393 2017-12-26 Mark Wielaard <mark@klomp.org>
395 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
396 (get_uleb128_unchecked): New define.
397 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
398 read attr name and form.
399 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
400 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
401 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
403 2017-12-28 Mark Wielaard <mark@klomp.org>
405 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
407 2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
408 Mark Wielaard <mark@klomp.org>
410 * libdwP.h (__libdw_in_section): Fix check for the upper border of
412 (__libdw_offset_in_section): Likewise.
414 2017-12-20 Mark Wielaard <mark@klomp.org>
416 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
417 (cu_sec_idx): Return cu->sec_idx.
418 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
419 IDX_debug_info or IDX_debug_types.
420 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
422 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
423 IDX_debug_macro or IDX_debug_macinfo.
425 2017-12-12 Mark Wielaard <mark@klomp.org>
427 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
428 given DIE. Reserve memory for a new DIE first.
430 2017-12-11 Dima Kogan <dima@secretsauce.net>
432 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
435 2017-11-03 Mark Wielaard <mark@klomp.org>
437 * dwarf_getlocation.c (__libdw_intern_expression): Handle
438 DW_OP_GNU_variable_value.
439 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
440 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
442 2017-11-03 Mark Wielaard <mark@klomp.org>
444 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
445 Update list of acceptable attribute codes based on DWARF5.
447 2017-11-03 Mark Wielaard <mark@klomp.org>
449 * dwarf.h: Add DW_OP_GNU_variable_value.
451 2017-10-03 Mark Wielaard <mark@klomp.org>
453 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
455 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
457 * memory-access.h: Use attribute_packed.
459 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
461 * libdwP.h: Use attribute_hidden.
462 * libdw_alloc.c: Likewise.
464 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
466 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
468 2017-07-26 Mark Wielaard <mark@klomp.org>
470 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
471 * dwarf_getmacros.c (get_table_for_offset): Accept either version
472 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
473 (read_macros): Use table version for fake_cu.
475 2017-07-26 Mark Wielaard <mark@klomp.org>
477 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
478 DW_TAG_packed_type and DW_TAG_shared_type.
479 * libdw.h (dwarf_peel_type): Extend documentation.
481 2017-07-26 Mark Wielaard <mark@klomp.org>
483 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
484 DW_DEFAULTED_out_of_class.
486 2017-07-26 Mark Wielaard <mark@klomp.org>
488 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
490 2017-07-26 Mark Wielaard <mark@klomp.org>
492 * dwarf_default_lower_bound.c: New file.
493 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
494 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
495 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
496 * libdw.h: Add dwarf_default_lower_bound.
497 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
498 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
499 dwarf_default_lower_bound INTDECL.
501 2017-07-26 Mark Wielaard <mark@klomp.org>
503 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
504 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
505 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
506 * dwarf_aggregate_size.c (array_size): Add lower bound for
507 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
508 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
509 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
510 DW_LANG_Julia and DW_LANG_BLISS.
512 2017-07-26 Mark Wielaard <mark@klomp.org>
514 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
516 2017-07-25 Mark Wielaard <mark@klomp.org>
518 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
519 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
520 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
521 for currently unused numbers.
523 2017-07-25 Mark Wielaard <mark@klomp.org>
525 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
526 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
527 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
529 2017-07-21 Mark Wielaard <mark@klomp.org>
531 * dwarf_line_file.c: New file.
532 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
533 * libdw.h (dwarf_line_file): New function declaration.
534 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
536 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
538 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
539 made of, libdw_so_DEPS for libraries it depends on (including
540 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
541 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
542 library dependencies, use libdw_so_LIBS rather than relying on the
543 order of dependencies specified, add -z,relro.
545 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
547 * libdw.h: Remove attribute macro declarations and use
548 __noreturn_attribute__ as defined in libelf.h.
550 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
552 * dwarf_begin_elf.c: Include endian.h.
554 2017-03-30 Mark Wielaard <mjw@redhat.com>
556 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
559 2016-10-22 Mark Wielaard <mjw@redhat.com>
561 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
562 * dwarf_aggregate_size.c (array_size): Use correct spelling of
565 2016-11-02 Mark Wielaard <mjw@redhat.com>
567 * cfi.c (execute_cfi): Add fallthrough comments.
568 * encoded-value.h (encoded_value_size): Add explicit return instead
569 of relying on fallthrough.
570 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
573 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
575 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
576 * libdw_alloc.c: Likewise.
578 2016-07-08 Mark Wielaard <mjw@redhat.com>
580 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
581 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
582 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
584 2016-02-13 Mark Wielaard <mjw@redhat.com>
586 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
589 2015-12-18 Mark Wielaard <mjw@redhat.com>
591 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
592 (__libdw_free_zdata): Remove.
593 * dwarf_begin_elf.c (inflate_section): Remove.
594 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
595 and elf_compress_gnu to decompress if necessary.
596 (valid_p): Remove __libdw_free_zdata calls.
597 (scngrp_read): Use elf_compress if section is compressed. Remove
598 __libdw_free_zdata calls.
599 * dwarf_end.c (__libdw_free_zdata): Remove.
600 (dwarf_end): Don't call __libdw_free_zdata.
602 2015-10-28 Mark Wielaard <mjw@redhat.com>
604 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
606 2015-12-02 Mark Wielaard <mjw@redhat.com>
608 * fde.c (intern_fde): Don't leak duplicate FDEs.
610 2015-12-01 Mark Wielaard <mjw@redhat.com>
612 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
615 2015-12-01 Mark Wielaard <mjw@redhat.com>
617 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
619 2015-10-14 Chih-Hung Hsieh <chh@google.com>
621 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
622 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
624 2015-10-14 Chih-Hung Hsieh <chh@google.com>
626 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
627 function 'walk_children' to file scope; inline 'recurse' at its call
630 2015-10-19 Mark Wielaard <mjw@redhat.com>
632 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
635 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
637 * dwarf_getsrclines.c (read_srclines): Initialize state early.
639 2015-10-13 Chih-Hung Hsieh <chh@google.com>
641 * dwarf_getsrclines.c (read_srclines): Move nested functions
642 'advance_pc' and 'add_new_line' to file scope and keep many
643 local state variables within one structure.
645 2015-10-13 Chih-Hung Hsieh <chh@google.com>
647 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
648 function 'file_matches' to file scope.
650 2015-10-16 Mark Wielaard <mjw@redhat.com>
652 * Makefile.am (libdw.so): Add -lz.
654 2015-10-14 Chih-Hung Hsieh <chh@google.com>
656 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
657 and 'require_cfa_offset' to file scope.
659 2015-10-09 Josh Stone <jistone@redhat.com>
661 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
664 2015-10-05 Josh Stone <jistone@redhat.com>
666 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
668 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
670 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
671 relocation overflows in some platforms.
673 2015-09-23 Mark Wielaard <mjw@redhat.com>
675 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
676 * dwarf_formref.c (__libdw_formref): Likewise.
677 * libdw_findcu.c (__libdw_findcu): Likewise.
678 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
680 2015-09-22 Mark Wielaard <mjw@redhat.com>
682 * *.c: Remove old-style function definitions.
684 2015-09-15 Mark Wielaard <mjw@redhat.com>
686 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
688 2015-09-09 Chih-Hung Hsieh <chh@google.com>
690 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
691 redundant NULL tests on parameters declared with __nonnull_attribute__.
692 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
693 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
695 2015-09-04 Chih-Hung Hsieh <chh@google.com>
696 Mark Wielaard <mjw@redhat.com>
698 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
699 definition with ansi-C definition and add const qualifier to
702 2015-09-04 Chih-Hung Hsieh <chh@google.com>
704 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
705 definition with ansi-C definitions.
706 (__libdw_findcu): Likewise.
708 2015-08-25 Mark Wielaard <mjw@redhat.com>
710 * dwarf.h: Add DW_LANG_Haskell.
712 2015-06-18 Mark Wielaard <mjw@redhat.com>
714 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
717 2015-06-18 Mark Wielaard <mjw@redhat.com>
719 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
721 2015-06-18 Mark Wielaard <mjw@redhat.com>
723 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
724 dwarf_formudata reports an error.
725 (get_table_for_offset): Likewise.
727 2015-06-08 Mark Wielaard <mjw@redhat.com>
729 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
731 2015-06-06 Mark Wielaard <mjw@redhat.com>
733 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
735 2015-05-27 Mark Wielaard <mjw@redhat.com>
737 * encoded-value.h (read_encoded_value): Check data d_size contains
738 at least enough data to hold a pointer for DW_EH_PE_indirect.
740 2015-05-22 Mark Wielaard <mjw@redhat.com>
742 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
743 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
744 MAX_STACK_DIRS. Calculate number of dirs needed first, then
745 create dirarray directly, without needing the next field. Free
746 not stack allocated lines and files at the end.
748 2015-05-19 Mark Wielaard <mjw@redhat.com>
750 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
751 allocated array to hold locs. Allocate locs bigger than the array
752 with malloc and free them when done.
754 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
756 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
757 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
758 * dwarf_begin_elf.c (inflate_section): New static function, lifted
760 (check_section): ... here. Call inflate_section, set libdw errno to
761 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
763 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
765 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
766 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
768 2015-05-06 Mark Wielaard <mjw@redhat.com>
770 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
771 check the line number.
773 2015-05-05 Mark Wielaard <mjw@redhat.com>
775 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
776 left before reading values.
778 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
780 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
783 2015-04-22 Mark Wielaard <mjw@redhat.com>
785 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
786 (__libdw_max_len_uleb128): New function.
787 (__libdw_max_len_sleb128): Likewise.
788 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
789 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
791 2015-04-21 Mark Wielaard <mjw@redhat.com>
793 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
794 when there are more than 8.
796 2015-04-01 Petr Machata <pmachata@redhat.com>
798 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
799 (is_cudie): New function.
800 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
801 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
802 of white-listing valid tags.
803 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
805 2015-03-18 Petr Machata <pmachata@redhat.com>
807 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
808 (EXTRA_DIST): Remove known-dwarf.h.
810 2015-02-09 Mark Wielaard <mjw@redhat.com>
812 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
813 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
814 for new Fortran language codes is 1.
816 2015-02-09 Mark Wielaard <mjw@redhat.com>
818 * dwarf.h: Add DW_TAG_atomic_type.
819 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
820 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
822 2015-02-11 Josh Stone <jistone@redhat.com>
824 * encoded-value.h (read_encoded_value): Initialize value.
826 2015-02-11 Petr Machata <pmachata@redhat.com>
828 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
829 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
830 the fact in *BASEP and bail out later if it hasn't been updated by
831 __libdw_read_begin_end_pair_inc.
833 2014-12-24 Mark Wielaard <mjw@redhat.com>
835 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
836 smaller than or equal to addr, rather than returning immediately on
839 2015-01-07 Mark Wielaard <mjw@redhat.com>
841 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
842 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
843 room in the search table for all entries. Store search_table_len.
844 (getcfi_scn_eh_frame): Likewise.
845 * encoded-value.h (encoded_value_size): Don't abort, return zero.
846 (__libdw_cfi_read_address_inc): Check there is enough room to read
847 values. Pass other byte order to read functions.
848 (read_encoded_value): Check encoded_value_size. Don't abort, but
849 set libdw errno and report failure. Check there is enough room to
851 * fde.c (binary_search_fde): Check encoded value size. Add hdr
852 data buf and size to dummy_cfi.
854 2015-01-04 Mark Wielaard <mjw@redhat.com>
856 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
857 is after current DIE.
859 2015-01-04 Mark Wielaard <mjw@redhat.com>
861 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
862 (dwarf_frame_register).
864 2015-01-02 Mark Wielaard <mjw@redhat.com>
866 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
867 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
868 (getcfi_scn_eh_frame): Check d_buf is not NULL.
870 2015-01-02 Mark Wielaard <mjw@redhat.com>
872 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
873 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
874 DW_OP_addr if dbg is NULL then read argument directly.
876 2015-01-14 Jason P. Leasure <jpleasu@super.org>
878 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
881 2014-12-27 Mark Wielaard <mjw@redhat.com>
883 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
884 still falls inside CU data.
886 2015-01-11 Mark Wielaard <mjw@redhat.com>
888 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
889 __libdw_visit_scopes with NULL imports.
890 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
891 * dwarf_getscopes.c (pc_record): Likewise.
892 (dwarf_getscopes): Likewise.
893 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
894 * libdwP.h (__libdw_visit_scopes): Add imports argument.
895 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
896 function imports_contains. Push and pop imports around walk_children
897 when processing DW_TAG_imported_unit.
899 2014-12-18 Ulrich Drepper <drepper@gmail.com>
901 * Makefile.am: Suppress output of textrel_check command.
903 2014-12-16 Mark Wielaard <mjw@redhat.com>
905 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
908 2014-12-16 Mark Wielaard <mjw@redhat.com>
910 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
911 space to read die offset.
913 2014-12-16 Mark Wielaard <mjw@redhat.com>
915 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
918 2014-12-15 Mark Wielaard <mjw@redhat.com>
920 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
921 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
922 (dwarf_getpubnames): Make sure section data contains string zero
925 2014-12-16 Mark Wielaard <mjw@redhat.com>
927 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
928 the compiler optimize for the common single-byte case.
930 2014-12-15 Josh Stone <jistone@redhat.com>
932 * memory-access.h (__libdw_max_len_leb128): New.
933 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
934 (__libdw_get_sleb128): Likewise.
936 2014-12-14 Mark Wielaard <mjw@redhat.com>
938 * cfi.c (execute_cfi): Add program bounds checks.
939 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
940 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
941 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
942 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
943 * dwarf_formudata.c (dwarf_formudata): Likewise.
944 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
945 with end of data buf.
946 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
947 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
948 call gets enough data.
949 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
950 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
952 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
954 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
955 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
956 get_uleb128 with lineendp.
957 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
958 get_uleb128 with endp.
959 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
960 get_uleb128/get_sleb128 with limit.
961 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
962 get_sleb128 get called with enough data.
963 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
964 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
965 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
967 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
968 Don't call get_uleb128_step if out of data.
969 (__libdw_get_sleb128): Likewise for get_sleb128_step.
971 2014-12-12 Mark Wielaard <mjw@redhat.com>
973 * libdwP.h (struct Dwarf): Add fake_loc_cu.
975 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
976 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
977 (__libdw_form_val_len): Likewise.
978 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
979 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
980 the already found data buffer directly.
981 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
982 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
983 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
985 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
986 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
987 * dwarf_getlocation_attr.c (attr_form_cu): New function.
988 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
989 (getlocation): Handle empty blocks immediately.
990 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
991 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
992 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
994 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
995 fake_cu. Call __libdw_form_val_len with just fake_cu.
996 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
997 datap and size directly from cu startp and endp.
999 2014-12-11 Mark Wielaard <mjw@redhat.com>
1001 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
1003 2014-12-13 Mark Wielaard <mjw@redhat.com>
1005 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
1006 difference doesn't wrap around before returning as int.
1008 2014-12-11 Josh Stone <jistone@redhat.com>
1010 * dwarf_getsrclines.c (struct linelist): Add sequence.
1011 (compare_lines): Take linelists, and break ties by sequence.
1012 (read_srclines): Use linelists for sorting.
1013 (read_srclines::add_new_line): Set sequence.
1015 2014-12-10 Josh Stone <jistone@redhat.com>
1017 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
1018 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
1019 * dwarf_child.c (dwarf_child): Use cu->endp.
1020 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
1021 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
1022 * dwarf_siblingof.c (dwarf_siblingof): Use both.
1024 2014-12-10 Josh Stone <jistone@redhat.com>
1026 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
1028 2014-12-10 Josh Stone <jistone@redhat.com>
1030 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
1031 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
1032 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1033 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1034 * dwarf_tag.c (dwarf_tag): Likewise.
1036 2014-12-04 Mark Wielaard <mjw@redhat.com>
1038 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
1039 (__libdw_form_val_len): Likewise and check len doesn't overflow.
1040 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
1041 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
1043 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1044 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
1046 2014-12-02 Petr Machata <pmachata@redhat.com>
1048 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
1050 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
1051 * libdw.h (DWARF_GETMACROS_START): New macro.
1053 2014-11-27 Mark Wielaard <mjw@redhat.com>
1055 * Makefile.am (libdw.so): Use textrel_check.
1057 2014-11-27 Mark Wielaard <mjw@redhat.com>
1059 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
1060 search_table_entries and search_table_encoding.
1062 2014-11-24 Mark Wielaard <mjw@redhat.com>
1064 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
1067 2014-11-23 Mark Wielaard <mjw@redhat.com>
1069 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
1070 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
1071 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
1073 2014-11-23 Mark Wielaard <mjw@redhat.com>
1075 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
1076 Set libdw errno and return NULL.
1078 2014-11-24 Mark Wielaard <mjw@redhat.com>
1080 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
1081 (DW_LANG_C11): Likewise.
1082 (DW_LANG_C_plus_plus_14): Likewise.
1083 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
1084 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
1086 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
1089 2014-11-26 Mark Wielaard <mjw@redhat.com>
1091 * dwarf.h (DW_AT_noreturn): Added.
1093 2014-11-11 Mark Wielaard <mjw@redhat.com>
1095 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
1096 explicitly as uint8_t.
1097 (__libdw_getsrclines): Add internal_function to declaration.
1099 2014-09-10 Petr Machata <pmachata@redhat.com>
1101 * dwarf_macro_getparamcnt.c: New file.
1102 * dwarf_macro_param.c: New file.
1103 * dwarf_macro_getsrcfiles.c: New file.
1104 * Makefile.am (libdw_a_SOURCES): Add the new files.
1105 * libdwP.h (struct files_lines_s): New structure.
1106 (DWARF_E_INVALID_OPCODE): New enumerator.
1107 (struct Dwarf): New fields macro_ops, files_lines.
1108 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
1109 keeping macro opcode prototypes in.
1110 (Dwarf_Macro_s): Redefine from scratch.
1111 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
1112 internal interfaces.
1113 * dwarf_error.c (errmsgs): Add a message for
1114 DWARF_E_INVALID_OPCODE.
1115 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
1117 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
1118 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
1120 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
1121 (get_offset_from, macro_op_compare, build_table)
1122 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
1123 (cache_op_table, read_macros, gnu_macros_getmacros_off)
1124 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
1126 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
1127 * dwarf_getsrclines.c (read_srclines): New function with guts
1128 taken from dwarf_getsrclines.
1129 (__libdw_getsrclines): Likewise.
1130 (__libdw_getcompdir, files_lines_compare): New functions.
1131 (dwarf_getsrclines): Make it dispatch to the new interfaces.
1132 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
1134 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
1135 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
1136 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
1138 2014-10-06 Mark Wielaard <mjw@redhat.com>
1140 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
1141 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
1142 (aggregate_size): Likewise. Add old and new version.
1143 * dwarf_peel_type.c: New file.
1144 * libdw.h (dwarf_peel_type): New function declaration.
1145 * libdwP.h (dwarf_peel_type): New internal declaration.
1146 * libdw.map (ELFUTILS_0.161): New section.
1148 2014-10-15 Petr Machata <pmachata@redhat.com>
1150 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
1151 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
1153 2014-10-05 Mark Wielaard <mjw@redhat.com>
1155 * dwarf.h: Add DW_AT_GNU_deleted.
1157 2014-10-02 Mark Wielaard <mjw@redhat.com>
1159 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
1160 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
1161 DW_TAG_rvalue_reference_type.
1163 2014-09-12 Petr Machata <pmachata@redhat.com>
1165 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
1166 8-byte quantities. Consequently, rename to...
1167 (read_addr_unaligned_inc): ... this.
1168 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
1169 (read_sbyte_unaligned): Drop.
1171 2014-09-10 Petr Machata <pmachata@redhat.com>
1173 * dwarf_getlocation.c (attr_ok): Also accept
1174 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
1175 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
1177 2014-08-15 Mark Wielaard <mjw@redhat.com>
1179 * dwarf_cu_die.c: New file.
1180 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
1181 * libdw.h (dwarf_cu_die): New function declaration.
1182 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
1184 2014-08-15 Mark Wielaard <mjw@redhat.com>
1186 * dwarf_cu_getdwarf.c: New file.
1187 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
1188 * libdw.h (Dwarf_CU): New typedef.
1189 (dwarf_cu_getdwarf): New function declaration.
1190 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
1192 2014-06-18 Mark Wielaard <mjw@redhat.com>
1194 * dwarf.h: Remove DW_TAG_mutable_type.
1196 2014-05-02 Mark Wielaard <mjw@redhat.com>
1198 * libdwP.h (__check_build_id): Removed now unused.
1200 2014-05-01 Mark Wielaard <mjw@redhat.com>
1202 * libdwP.h (struct Dwarf): Remove free_alt.
1203 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
1204 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1206 2014-04-30 Mark Wielaard <mjw@redhat.com>
1208 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1210 2014-04-15 Florian Weimer <fweimer@redhat.com>
1212 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1213 (open_debugaltlink): Move to libdwfl.
1214 (check_section): Do not locate alternate debuginfo.
1216 2014-04-24 Florian Weimer <fweimer@redhat.com>
1218 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1220 2014-04-22 Florian Weimer <fweimer@redhat.com>
1222 * dwarf_getalt.c, dwarf_setalt.c: New files.
1223 * Makefile.am (libdw_a_SOURCES): Add them.
1224 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1225 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1227 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1229 2014-04-15 Florian Weimer <fweimer@redhat.com>
1231 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1232 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1234 (check_section): Obtain .gnu_debugaltlink section from the
1237 2014-04-11 Mark Wielaard <mjw@redhat.com>
1239 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1240 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1241 (libdwelf_objects): New variable.
1242 (libdw_a_LIBADD): Add libdwelf objects.
1244 2014-04-22 Mark Wielaard <mjw@redhat.com>
1246 * memory-access.h (get_sleb128_step): Remove undefined behavior
1247 of left shifting a signed value. Replace it with a multiplication.
1249 2014-04-13 Mark Wielaard <mjw@redhat.com>
1251 * Makefile.am: Remove !MUDFLAP conditions.
1253 2014-04-09 Mark Wielaard <mjw@redhat.com>
1255 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1256 before calling malloc to uncompress data.
1258 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1260 Fix abort() on missing section headers.
1261 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1262 New label err to return NULL.
1264 2014-02-05 Josh Stone <jistone@redhat.com>
1266 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1267 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1268 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1270 2013-12-30 Mark Wielaard <mjw@redhat.com>
1272 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1273 dwfl_linux_proc_attach.
1275 2013-12-20 Mark Wielaard <mjw@redhat.com>
1277 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1279 2013-12-18 Mark Wielaard <mjw@redhat.com>
1281 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1282 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1283 dwfl_module_getsym_info.
1285 2013-12-16 Mark Wielaard <mjw@redhat.com>
1287 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1289 2013-12-10 Josh Stone <jistone@redhat.com>
1291 * memory-access.h (get_uleb128_rest_return): Removed.
1292 (get_sleb128_rest_return): Removed.
1293 (get_uleb128_step): Make this a self-contained block.
1294 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1295 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1296 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1297 (__libdw_get_uleb128): Simplify and inline for all callers.
1298 (__libdw_get_sleb128): Ditto.
1299 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1300 * memory-access.c: Delete file.
1301 * Makefile.am (libdw_a_SOURCES): Remove it.
1302 (DEFS): Remove the now unused -DIS_LIBDW.
1304 2013-12-09 Josh Stone <jistone@redhat.com>
1306 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1307 __libdw_form_val_len, now handling only non-constant form lengths.
1308 * libdwP.h (__libdw_form_val_len): New inlined function.
1310 2013-12-09 Mark Wielaard <mjw@redhat.com>
1312 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1313 location expressions.
1314 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1315 location found, return empty location expression.
1316 * dwarf_getlocation_implicit_pointer.c
1317 (dwarf_getlocation_implicit_pointer): Likewise.
1318 (__libdw_empty_loc_attr): New internal function.
1319 * libdwP.h (__libdw_empty_loc_attr): Define.
1321 2013-11-27 Mark Wielaard <mjw@redhat.com>
1323 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1324 dwfl_module_getsym_elf.
1326 2013-11-26 Mark Wielaard <mjw@redhat.com>
1328 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1329 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1330 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1331 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1332 (ELFUTILS_0.158): ... here.
1334 2013-11-09 Mark Wielaard <mjw@redhat.com>
1336 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1337 check that it is zero.
1339 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1341 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1342 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1343 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1344 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1345 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1347 2013-11-01 Michael Forney <mforney@mforney.org>
1349 * Makefile.am (libdwfl_objects): New definition.
1350 (libdw_a_LIBADD): Use libdwfl_objects.
1352 2013-11-01 Michael Forney <mforney@mforney.org>
1354 * Makefile.am: Use READELF.
1356 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1358 * libdw.map (ELFUTILS_0.158): New.
1360 2013-10-10 Mark Wielaard <mjw@redhat.com>
1362 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1363 start_addr and rename last_offset to last_addr. Now both void *.
1364 (tree_visitor): Use start_add and die_addr instead of start_offset
1366 (dwarf_getfuncs): Use last_addr instead of last_offset.
1368 2013-10-06 Mark Wielaard <mjw@redhat.com>
1370 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1371 DW_CFA_val_expression are not used with abi_cfi.
1373 2013-10-03 Josh Stone <jistone@redhat.com>
1375 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1376 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1377 a unit, make sure to always hash the sig8 here, so none are missed.
1379 2013-09-29 Mark Wielaard <mjw@redhat.com>
1381 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1382 uintptr_t before casting to char *.
1383 (__libdw_intern_expression): Cast data to uintptr_t before casting
1385 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1386 op->number2 to uintptr_t before casting to char *.
1388 2013-09-24 Josh Stone <jistone@redhat.com>
1390 * libdw_visit_scopes.c (classify_die): Removed.
1391 (may_have_scopes): New function to replace classify_die. There's no
1392 need for full classification; just find tags that may contain scopes.
1393 (__libdw_visit_scopes): Use a direct tag comparison for imported
1394 units, and use may_have_scopes to test if recursion is needed.
1396 2013-09-20 Mark Wielaard <mjw@redhat.com>
1398 * dwarf_getfuncs.c (visitor_info): New struct.
1399 (tree_visitor): New function.
1400 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1401 * libdw.h (dwarf_getfuncs): Expand function documentation.
1403 2013-09-12 Mark Wielaard <mjw@redhat.com>
1405 * fde.c (intern_fde): Free fde and set libdw errno when start
1406 or end could not be read.
1408 2013-08-24 Mark Wielaard <mjw@redhat.com>
1410 * dwarf_getlocation.c (store_implicit_value): Don't take data
1411 as argument, get block data from op number2. Return false when
1412 block data length and op number don't match up.
1413 (__libdw_intern_expression): Store start of block for
1414 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1415 relative data offset. Also store block start (including length)
1416 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1417 * dwarf_getlocation_attr.c: New file.
1418 * dwarf_getlocation_die.c: Likewise.
1419 * libdw.h (dwarf_getlocation_die): New function definition.
1420 (dwarf_getlocation_attr): Likewise.
1421 * libdwP.h: Declare internal dwarf_getlocation_die.
1422 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1423 dwarf_getlocation_attr.
1424 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1425 dwarf_getlocation_attr.c.
1427 2013-08-23 Mark Wielaard <mjw@redhat.com>
1429 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1430 (attr_base_address): New function.
1431 (initial_offset_base): New function.
1432 (getlocations_addr): New function. Taken from...
1433 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1435 (dwarf_getlocations): New function.
1436 * libdw.h (dwarf_getlocations): New function definition.
1437 * libdw.map (ELFUTILS_0.157): New.
1439 2013-07-02 Mark Wielaard <mjw@redhat.com>
1441 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1442 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1443 NEW_LINE macro. Free malloced line records if any at the end.
1445 2013-07-02 Mark Wielaard <mjw@redhat.com>
1447 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1449 2013-06-26 Mark Wielaard <mjw@redhat.com>
1451 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1452 DIEs without children. Return an error whenever dwarf_child or
1453 dwarf_siblingof return an error. Don't call recurse and increase
1454 the depth for an imported unit. Walk the children of an imported
1455 unit as if they are logical children of the parent root DIE.
1457 2013-05-03 Mark Wielaard <mjw@redhat.com>
1459 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1462 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1464 * libdw.map (ELFUTILS_0.156): New.
1466 2013-04-24 Mark Wielaard <mjw@redhat.com>
1468 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1470 2013-04-10 Mark Wielaard <mjw@redhat.com>
1472 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1473 equal to address size when we have a DW_FORM_ref_addr for DWARF
1476 2013-03-25 Mark Wielaard <mjw@redhat.com>
1478 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1481 2013-03-12 Mark Wielaard <mjw@redhat.com>
1483 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1484 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1486 2013-02-15 Mark Wielaard <mjw@redhat.com>
1488 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1489 not dbg->sectiondata.
1491 2013-01-07 Roland McGrath <roland@hack.frob.com>
1494 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1495 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1497 2012-12-18 Mark Wielaard <mjw@redhat.com>
1499 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1500 (check_section): Likewise on error.
1501 (scngrp_read): Likewise.
1502 (dwarf_begin_elf): Likewise.
1504 2012-10-09 Petr Machata <pmachata@redhat.com>
1506 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1507 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1508 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1509 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1511 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1513 * cfi.c: New include system.h.
1514 (execute_cfi) (enough_registers): Clear new memory after realloc.
1516 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1518 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1519 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1522 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1524 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1525 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1526 Remove the later DW_OP_call_frame_cfa push to RESULT.
1528 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1531 * fde.c (binary_search_fde): Remove always true <address >= start>
1532 conditional. Move L initialization upwards.
1534 2012-08-24 Mark Wielaard <mjw@redhat.com>
1536 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1537 when ENABLE_DWZ is defined.
1538 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1541 2012-08-16 Mark Wielaard <mjw@redhat.com>
1543 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1544 * dwarf.h (DW_LANG_Go): Update comment.
1545 (DW_LANG_Mips_Assembler): Likewise.
1547 2012-06-27 Mark Wielaard <mjw@redhat.com>
1549 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1550 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1551 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1552 (try_debugaltlink): New function.
1553 (open_debugaltlink): Likewise.
1554 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1555 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1557 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1558 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1560 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1561 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1562 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1564 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1565 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1566 (struct Dwarf): Add alt_dwarf and free_alt fields.
1567 (__libdw_read_offset): Add dbg_ret argument, use to check with
1568 __libdw_offset_in_section.
1569 (__check_build_id): New function declaration.
1570 (dwarf_begin): Define as INTDECL.
1571 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1572 and DW_FORM_GNU_strp_alt.
1574 2012-07-19 Mark Wielaard <mjw@redhat.com>
1576 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1578 2012-07-24 Mark Wielaard <mjw@redhat.com>
1580 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1581 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1584 2012-07-24 Mark Wielaard <mjw@redhat.com>
1586 * dwarf.h: Add DW_ATE_UTF.
1588 2012-06-27 Mark Wielaard <mjw@redhat.com>
1590 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1592 2012-06-26 Mark Wielaard <mjw@redhat.com>
1594 * libdwP.h: Add IDX_debug_macro.
1595 * dwarf.h: Add DW_AT_GNU_macros.
1596 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1597 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1599 2012-04-27 Mark Wielaard <mjw@redhat.com>
1601 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1602 a constant offset from DW_AT_low_pc.
1604 2012-03-19 Tom Tromey <tromey@redhat.com>
1606 * libdw_findcu.c (findcu_cb): Move earlier.
1607 (__libdw_intern_next_unit): Add new CU to search tree here...
1608 (__libdw_findcu): ... not here.
1610 2012-01-31 Mark Wielaard <mjw@redhat.com>
1612 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1614 2011-11-31 Mark Wielaard <mjw@redhat.com>
1616 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1618 2011-07-14 Mark Wielaard <mjw@redhat.com>
1620 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1622 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1624 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1625 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1628 2011-04-26 Mark Wielaard <mjw@redhat.com>
1630 * dwarf_child (dwarf_child): Sanity check end of section against
1631 cu_data () of die->cu.
1633 2011-03-22 Mark Wielaard <mjw@redhat.com>
1635 * dwarf.h: Add DW_TAG_GNU_call_site,
1636 DW_TAG_GNU_call_site_parameter,
1637 DW_AT_GNU_call_site_value,
1638 DW_AT_GNU_call_site_data_value,
1639 DW_AT_GNU_call_site_target,
1640 DW_AT_GNU_call_site_target_clobbered,
1641 DW_AT_GNU_tail_call,
1642 DW_AT_GNU_all_tail_call_sites,
1643 DW_AT_GNU_all_call_sites,
1644 DW_AT_GNU_all_source_call_sites,
1645 and DW_OP_GNU_entry_value.
1647 2011-03-10 Petr Machata <pmachata@redhat.com>
1649 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1650 abbreviation with code 0.
1652 2011-03-09 Petr Machata <pmachata@redhat.com>
1654 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1656 2011-02-23 Roland McGrath <roland@redhat.com>
1658 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1659 Declare __libdw_free_zdata.
1660 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1661 (dwarf_end): Call it.
1663 * dwarf_begin_elf.c (valid_p): Likewise.
1664 (check_section, scngrp_read): Likewise.
1665 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1667 2010-10-13 Roland McGrath <roland@redhat.com>
1669 * dwarf.h: Add DW_LANG_Go.
1671 2010-10-05 Roland McGrath <roland@redhat.com>
1673 * dwarf_getaranges.c: Use malloc rather than alloca,
1674 since the total number of elements can be quite huge.
1676 2010-07-26 Roland McGrath <roland@redhat.com>
1678 * dwarf_getlocation_implicit_pointer.c: New file.
1679 * Makefile.am (libdw_a_SOURCES): Add it.
1680 * libdw.map (ELFUTILS_0.149): New set.
1681 Add dwarf_getlocation_implicit_pointer.
1682 * libdw.h: Declare it.
1684 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1685 (dwarf_offdie, dwarf_offdie_types): Update callers.
1686 * libdwP.h: Declare it.
1688 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1689 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1691 2010-08-24 Roland McGrath <roland@redhat.com>
1693 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1695 2010-07-27 Roland McGrath <roland@redhat.com>
1697 * dwarf_formref_die.c: Fix sig8 hash insertion.
1699 2010-06-23 Roland McGrath <roland@redhat.com>
1701 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1702 * libdw.h: Remove it.
1703 * libdw.map: Likewise.
1705 2010-06-22 Roland McGrath <roland@redhat.com>
1707 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1709 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1712 2010-06-21 Roland McGrath <roland@redhat.com>
1714 * dwarf.h: Add DW_TAG_GNU_* constants.
1716 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1719 2010-06-20 Roland McGrath <roland@redhat.com>
1721 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1722 to search TUs instead of CUs.
1723 * libdwP.h: Update decl.
1724 (struct Dwarf): New member tu_tree.
1725 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1726 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1727 (dwarf_offdie): ... here.
1728 (dwarf_offdie_types): New function.
1729 * libdw.h: Declare it.
1730 * libdw.map (ELFUTILS_0.148): Add it.
1732 * libdwP.h (CUDIE): Use cu_data.
1733 * dwarf_formblock.c: Likewise.
1734 * dwarf_formref_die.c: Likewise.
1735 * dwarf_diecu.c: Use CUDIE macro.
1736 * dwarf_formaddr.c: Use cu_sec_idx.
1738 2010-06-16 Roland McGrath <roland@redhat.com>
1740 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1741 we don't repeat a CU lookup we've already done. Handle
1742 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1744 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1746 (__libdw_findcu): ... here. Call it.
1747 * libdwP.h: Declare it.
1748 (struct Dwarf): New member next_tu_offset.
1750 * dwarf_sig8_hash.c: New file.
1751 * dwarf_sig8_hash.h: New file.
1752 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1753 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1755 * libdwP.h (struct Dwarf): New member sig8_hash.
1756 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1757 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1759 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1760 (dwarf_nextcu): ... here. Call it.
1761 * libdw.h: Declare it.
1762 * libdwP.h: Add INTDECL.
1763 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1764 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1766 * libdwP.h (cu_sec_idx, cu_data): New functions.
1767 Use .debug_types when CU is a TU.
1768 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1769 * dwarf_siblingof.c: Likewise.
1770 * dwarf_formstring.c: Likewise.
1771 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1772 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1773 (dwarf_getlocation_addr): Likewise.
1775 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1776 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1777 .debug_types header size instead of .debug_info header size.
1779 * dwarf_diecu.c: Update caller.
1780 * dwarf_getaranges.c: Likewise.
1781 * dwarf_nextcu.c: Likewise.
1782 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1784 * fde.c (fde_by_offset): Renamed to ...
1785 (__libdw_fde_by_offset): ... this, made global and internal_function.
1786 Don't take ADDRESS argument.
1787 (__libdw_find_fde): Update caller. Do address sanity check here.
1788 * cfi.h: Declare __libdw_fde_by_offset.
1789 * cfi.c (dwarf_cfi_validate_fde): New function.
1790 * libdw.h: Declare it.
1791 * libdw.map (ELFUTILS_0.148): Add it.
1793 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1794 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1796 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1797 Don't assume DW_EH_PE_aligned refers to native address size.
1799 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1802 2010-06-17 Roland McGrath <roland@redhat.com>
1804 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1806 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1807 into an inner inline function. Set new fields. Check all fields for
1808 overflow when setting.
1809 * dwarf_lineisa.c: New file.
1810 * dwarf_linediscriminator.c: New file.
1811 * dwarf_lineop_index.c: New file.
1812 * Makefile.am (libdw_a_SOURCES): Add them.
1813 * libdw.map (ELFUTILS_0.148): Add them.
1814 * libdw.h: Declare them.
1816 2010-06-16 Roland McGrath <roland@redhat.com>
1818 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1820 * fde.c (fde_by_offset): Renamed to ...
1821 (__libdw_fde_by_offset): ... this, made global and internal_function.
1822 Don't take ADDRESS argument.
1823 (__libdw_find_fde): Update caller. Do address sanity check here.
1824 * cfi.h: Declare __libdw_fde_by_offset.
1825 * cfi.c (dwarf_cfi_validate_fde): New function.
1826 * libdw.h: Declare it.
1827 * libdw.map (ELFUTILS_0.148): Add it.
1829 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1830 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1832 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1833 Don't assume DW_EH_PE_aligned refers to native address size.
1835 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1838 2010-06-15 Roland McGrath <roland@redhat.com>
1840 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1842 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1843 here, since we don't support it yet.
1845 * dwarf_next_cfi.c: Handle version 4 format.
1847 * dwarf_getsrclines.c: Handle version 4 format.
1849 2010-06-01 Roland McGrath <roland@redhat.com>
1851 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1852 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1854 * libdwP.h (CIE_VERSION): Remove unused macro.
1856 * dwarf_getsrclines.c: Fix version field test.
1857 * libdwP.h (DWARF_VERSION): Remove useless macro.
1859 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1861 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1863 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1865 2010-05-31 Mark Wielaard <mjw@redhat.com>
1867 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1868 * libdw.h (dwarf_cfi_cie_p): ... here.
1870 2010-05-31 Mark Wielaard <mjw@redhat.com>
1872 * dwarf.h: Fix DW_LANG_Python constant.
1874 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1876 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1879 2010-05-27 Roland McGrath <roland@redhat.com>
1881 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1882 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1884 2010-05-08 Roland McGrath <roland@redhat.com>
1886 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1887 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1888 (getlocation): Update caller.
1889 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1890 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1891 * libdwP.h: Update decl.
1893 2010-04-26 Roland McGrath <roland@redhat.com>
1895 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1896 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1897 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1898 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1900 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1901 Prepend DW_OP_call_frame_cfa if true.
1902 (getlocation): Update caller.
1903 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1904 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1905 * libdwP.h: Update decl.
1907 2010-04-22 Roland McGrath <roland@redhat.com>
1909 * cfi.c (execute_cfi): Never return without cleanup.
1911 (cie_cache_initial_state): Adjust caller to expect that free.
1912 (__libdw_frame_at_address): Likewise.
1914 2010-03-10 Roland McGrath <roland@redhat.com>
1916 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1918 2010-02-15 Roland McGrath <roland@redhat.com>
1920 * Makefile.am: Use config/eu.am for common stuff.
1922 2010-02-02 Mark Wielaard <mjw@redhat.com>
1924 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1926 2010-01-07 Roland McGrath <roland@redhat.com>
1928 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1930 2010-01-05 Roland McGrath <roland@redhat.com>
1932 * dwarf_aggregate_size.c: New file.
1933 * Makefile.am (libdw_a_SOURCES): Add it.
1934 * libdw.h: Declare it.
1935 * libdwP.h: Add INTDECL.
1936 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1938 * dwarf_srclang.c: Add INTDEF.
1939 * libdwP.h: Add INTDECL.
1941 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1943 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1945 2009-11-21 Roland McGrath <roland@redhat.com>
1947 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1950 2009-10-15 Roland McGrath <roland@redhat.com>
1952 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1953 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1955 2009-09-17 Roland McGrath <roland@redhat.com>
1957 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1958 argument a pointer to const.
1959 * libdw.h: Update decl.
1961 2009-09-10 Roland McGrath <roland@redhat.com>
1963 * dwarf_getlocation.c (store_implicit_value): New function.
1964 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1965 (dwarf_getlocation_implicit_value): New function.
1966 * libdw.h: Declare it.
1967 * libdw.map (ELFUTILS_0.143): Add it.
1969 2009-09-09 Mark Wielaard <mjw@redhat.com>
1971 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1973 2009-08-21 Josh Stone <jistone@redhat.com>
1975 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1977 2009-08-10 Roland McGrath <roland@redhat.com>
1979 * dwarf_getscopevar.c: Use dwarf_diename.
1981 2009-08-09 Roland McGrath <roland@redhat.com>
1983 * libdw.map (ELFUTILS_0.143): New version set,
1984 inherits from ELFUTILS_0.142.
1985 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1986 alias in the ELFUTILS_0.122 version set and the default in the new set.
1987 * dwarf_srclang.c: Likewise.
1988 * dwarf_decl_file.c: Likewise.
1989 * dwarf_decl_line.c: Likewise.
1990 * dwarf_decl_column.c: Likewise.
1991 * dwarf_bytesize.c: Likewise.
1992 * dwarf_bitsize.c: Likewise.
1993 * dwarf_bitoffset.c: Likewise.
1995 2009-08-07 Roland McGrath <roland@redhat.com>
1997 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1998 * dwarf_srclang.c: Likewise.
1999 * dwarf_decl_file.c: Likewise.
2000 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
2001 * dwarf_bytesize.c: Likewise.
2002 * dwarf_bitsize.c: Likewise.
2003 * dwarf_bitoffset.c: Likewise.
2005 2009-07-22 Roland McGrath <roland@redhat.com>
2007 * dwarf_frame_cfa.c: Change calling convention.
2008 * libdw.h: Update decl.
2010 * dwarf_frame_register.c: Change calling/return-value convention for
2011 value-only results and undefined/same_value.
2012 * libdw.h: Update decl.
2014 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
2015 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
2016 return that value instead.
2017 (getlocation): Update caller.
2018 * dwarf_frame_cfa.c: Likewise.
2019 * libdwP.h: Update decl.
2021 2009-07-21 Roland McGrath <roland@redhat.com>
2023 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
2024 Fix loop iteration after skipping a bogus or useless CU.
2026 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
2027 absence, not DWARF_E_NO_DEBUG_LINE.
2029 2009-07-20 Roland McGrath <roland@redhat.com>
2031 * dwarf_getlocation.c (__libdw_intern_expression):
2032 Handle DW_OP_stack_value.
2034 2009-07-16 Roland McGrath <roland@redhat.com>
2036 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
2037 reject others when CU's version > 3.
2039 * dwarf_formflag.c: Handle DW_FORM_flag_present.
2041 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
2042 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
2043 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
2044 and DW_AT_const_expr.
2045 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
2046 and DW_FORM_ref_sig8.
2048 2009-07-15 Roland McGrath <roland@redhat.com>
2050 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
2051 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
2053 2009-07-13 Roland McGrath <roland@redhat.com>
2055 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
2057 2009-07-08 Roland McGrath <roland@redhat.com>
2059 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
2062 * libdwP.h (struct Dwarf): Add member `cfi'.
2063 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
2064 * dwarf_getcfi.c: New file.
2065 * dwarf_getcfi_elf.c: New file.
2066 * dwarf_cfi_end.c: New file.
2067 * dwarf_cfi_addrframe.c: New file.
2068 * dwarf_frame_cfa.c: New file.
2069 * dwarf_frame_register.c: New file.
2070 * dwarf_frame_return_address_register.c: New file.
2071 * Makefile.am (libdw_a_SOURCES): Add them.
2072 * unwind.h: Declare those functions.
2073 * libdw.map (ELFUTILS_0.142): Export them.
2075 * dwarf_getlocation.c (__libdw_intern_expression): New function,
2077 (getlocation): ... here, call it.
2078 * libdwP.h: Declare it.
2082 * frame-cache.c: New file.
2085 * encoded-value.h: New file.
2086 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2087 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
2088 * dwarf_error.c (errmsgs): Add element for it.
2090 * dwarf_next_cfi.c: New file.
2091 * Makefile.am (libdw_a_SOURCES): Add it.
2092 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
2093 Declare dwarf_next_cfi.
2094 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
2097 * memory-access.h [! ALLOW_UNALIGNED]
2098 (read_2ubyte_unaligned): Renamed to ...
2099 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
2100 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
2101 (read_2sbyte_unaligned): Likewise.
2102 (read_4ubyte_unaligned): Likewise.
2103 (read_4sbyte_unaligned): Likewise.
2104 (read_8ubyte_unaligned): Likewise.
2105 (read_8sbyte_unaligned): Likewise.
2107 * libdwP.h (IDX_eh_frame): Remove it.
2108 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
2110 2009-07-08 Roland McGrath <roland@redhat.com>
2112 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
2114 * dwarf_getlocation.c (check_constant_offset): New function.
2115 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
2116 handle DW_AT_data_member_location of data[48] as constant offset.
2118 2009-06-18 Roland McGrath <roland@redhat.com>
2120 * libdwP.h (__libdw_read_address_inc): Constify.
2121 (__libdw_read_offset_inc): Likewise.
2122 * dwarf_getaranges.c: Likewise.
2123 * dwarf_getlocation.c: Likewise.
2124 * dwarf_getsrclines.c: Likewise.
2125 * dwarf_nextcu.c: Likewise.
2127 2009-05-05 Petr Machata <pmachata@redhat.com>
2129 * libdwP.h (__libdw_formptr): Declare new function.
2130 * dwarf_formudata.c: Implement it here.
2131 * dwarf_getlocation.c (dwarf_getlocation_addr):
2132 Call it instead of hand-rolled offset handling code.
2133 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2134 * dwarf_ranges.c (dwarf_ranges): Likewise.
2136 2009-05-04 Petr Machata <pmachata@redhat.com>
2138 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
2139 * dwarf_ranges.c: Implement it here.
2140 (dwarf_ranges): Call it.
2141 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
2143 2009-04-23 Petr Machata <pmachata@redhat.com>
2145 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
2146 of read_*ubyte_unaligned.
2147 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
2148 * dwarf_formstring.c (dwarf_formstring): Likewise.
2149 * dwarf_formudate.c (dwarf_formudata): Likewise.
2150 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
2151 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
2152 * dwarf_getpubnames.c (get_offsets): Likewise.
2153 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
2155 2009-04-23 Petr Machata <pmachata@redhat.com>
2157 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
2158 __libdw_read_addr, __libdw_read_off): Add four new internal
2161 2009-05-07 Roland McGrath <roland@redhat.com>
2163 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
2164 return value and OFFSET argument, not CU-relative. Only fetch the
2165 attribute data when called with OFFSET of 0.
2167 2009-05-07 Petr Machata <pmachata@redhat.com>
2169 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
2170 DW_AT_macro_info attribute of CU DIE.
2172 2009-04-15 Roland McGrath <roland@redhat.com>
2174 * dwarf.h (DW_CIE_ID): Removed.
2175 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
2177 2009-04-01 Roland McGrath <roland@redhat.com>
2179 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
2181 2009-01-28 Roland McGrath <roland@redhat.com>
2183 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
2184 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
2186 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
2188 2009-01-26 Roland McGrath <roland@redhat.com>
2190 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
2192 2009-01-25 Roland McGrath <roland@redhat.com>
2194 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
2196 2009-01-23 Roland McGrath <roland@redhat.com>
2198 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
2199 Put these rules under if MAINTAINER_MODE.
2201 2009-01-22 Roland McGrath <roland@redhat.com>
2203 * dwarf.h: Add DW_OP_GNU_encoded_addr.
2205 2009-01-21 Roland McGrath <roland@redhat.com>
2207 * Makefile.am (CLEANFILES): Renamed to ...
2208 (MOSTLYCLEANFILES): ... here.
2209 (CLEANFILES): New variable, add known-dwarf.h.
2211 2009-01-17 Roland McGrath <roland@redhat.com>
2213 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
2214 Make it unconditional.
2215 (BUILT_SOURCES): Updated.
2217 * dwarf.h: Add description comments for DW_LANG_* values.
2219 * Makefile.am [MAINTAINER_MODE]
2220 ($(srcdir)/known-dwarf.h): New target.
2221 (BUILT_SOURCES): Add it.
2223 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
2225 2009-01-10 Ulrich Drepper <drepper@redhat.com>
2227 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
2229 2009-01-08 Roland McGrath <roland@redhat.com>
2231 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2233 2008-01-06 Roland McGrath <roland@redhat.com>
2235 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2237 * dwarf_haschildren.c: Return -1 for error case, not 0.
2239 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2241 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2243 * dwarf.h: Add definition for unwind and call frame information.
2245 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2246 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2248 2008-08-15 Roland McGrath <roland@redhat.com>
2250 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2251 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2253 2008-01-21 Ulrich Drepper <drepper@redhat.com>
2255 * dwarf_child.c: Minor optimizations.
2256 * dwarf_getattrs.c: Likewise.
2257 * dwarf_getpubnames.c: Likewise.
2258 * dwarf_siblingof.c: Likewise.
2259 * dwarf_tag.c: Likewise.
2261 2008-01-18 Ulrich Drepper <drepper@redhat.com>
2263 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2264 of DWARF_VERSION comparison, just fail if the file's version is newer.
2266 2008-01-17 Nick Clifton <nickc@redhat.com>
2268 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2269 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2270 (DWARF3_LENGTH_64_BIT): New define.
2271 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2272 * dwarf_getpubnames: Include dwarf.h.
2273 (get_offsets): Use the new definitions.
2274 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2275 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2276 (dwarf_nextcu): Use the new definitions.
2278 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2279 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2280 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2281 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2283 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2286 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2288 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2289 Set the address in the return structure to the address of the next
2290 non-sibling die, if there is no sibling and the return pointer is
2291 not the same as the die pointer.
2292 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2294 * dwarf_child.c: Fix typo in comment.
2296 * libdwP.h (DWARF_VERSION): Change to 3.
2298 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2299 not have a initialised valp pointer.
2301 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2302 the end of the attributes is reached. When the callback fails,
2303 return the address of the failing attribute, not the address of
2305 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2307 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2308 (dwarf_child): Likewise.
2309 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2310 (dwarf_tag): Likewise.
2312 2008-01-08 Roland McGrath <roland@redhat.com>
2314 * Makefile.am (euinclude): Variable removed.
2315 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2316 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
2318 2007-10-17 Roland McGrath <roland@redhat.com>
2320 * libdw.h (__deprecated_attribute__): New macro.
2321 (dwarf_formref): Mark it deprecated.
2322 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2323 (dwarf_formref): ... here. Call it. Remove INTDEF.
2324 * libdwP.h: Remove INTDECL.
2325 Declare __libdw_formref.
2326 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2327 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2329 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2330 needs to check CU->version.
2332 * libdwP.h (struct Dwarf_CU): New member `version'.
2333 * libdw_findcu.c (__libdw_findcu): Initialize it.
2335 * dwarf_child.c: Return 1 for null entry as first child.
2337 2007-10-05 Roland McGrath <roland@redhat.com>
2339 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2341 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2342 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2344 2007-10-03 Roland McGrath <roland@redhat.com>
2346 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2347 and dwfl_build_id_find_debuginfo.
2349 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2350 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2352 2007-10-02 Roland McGrath <roland@redhat.com>
2354 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2357 2007-08-07 Roland McGrath <roland@redhat.com>
2359 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2360 error code is DWARF_E_NOERROR (0).
2362 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2363 Fix typo in __libdw_visit_scopes argument.
2365 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2366 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2368 2007-07-03 Roland McGrath <roland@redhat.com>
2370 * libdw.h (__extern_inline): New macro.
2371 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2373 2007-04-16 Roland McGrath <roland@redhat.com>
2375 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2377 2007-04-05 Roland McGrath <roland@redhat.com>
2379 * dwarf_getsrcdirs.c: New file.
2380 * Makefile.am (libdw_a_SOURCES): Add it.
2381 * libdw.h: Declare dwarf_getsrcdirs.
2382 * libdw.map (ELFUTILS_0.127): Add it.
2384 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2385 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2386 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2387 Save DIRARRAY in the Dwarf_Files.
2389 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
2390 address to check for all-ones base address entry. Check directly.
2391 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2393 2007-03-25 Roland McGrath <roland@redhat.com>
2395 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2396 Return NULL when freeing RESULT on error.
2397 (global_read, scngrp_read): Check return value from check_section,
2398 break out of loop after it has freed RESULT.
2399 (valid_p): Handle null argument.
2401 2007-03-12 Roland McGrath <roland@redhat.com>
2403 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2405 2007-03-04 Roland McGrath <roland@redhat.com>
2407 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2408 ELFUTILS_0.126. Add dwfl_module_addrsym.
2410 2007-02-10 Roland McGrath <roland@redhat.com>
2412 * dwarf.h (DW_OP_fbreg): Comment fix.
2414 2007-02-03 Roland McGrath <roland@redhat.com>
2416 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2417 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2418 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2419 exported in the past.
2421 2006-12-17 Roland McGrath <roland@redhat.com>
2423 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2424 address when the CU is missing attributes due to buggy GCC.
2426 2006-08-29 Roland McGrath <roland@redhat.com>
2428 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2430 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2431 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2433 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2434 result is aligned. Adjust NEWP->remaining here for this allocation.
2435 * libdwP.h: Update decl.
2436 (libdw_alloc): Update caller.
2438 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2440 * dwarf_child.c: Adjust for internal_function_def removal.
2441 * dwarf_getabbrev.c: Likewise.
2442 * dwarf_tag.c: Likewise.
2443 * libdw_form.c: Likewise.
2444 * memory-access.c: Likewise.
2446 2006-06-28 Roland McGrath <roland@redhat.com>
2448 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2450 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2453 2006-05-27 Ulrich Drepper <drepper@redhat.com>
2455 * libdw.h: Add extern "C".
2457 2006-05-22 Ulrich Drepper <drepper@redhat.com>
2459 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2460 aranges information.
2462 2006-05-21 Ulrich Drepper <drepper@redhat.com>
2464 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2467 2006-02-28 Roland McGrath <roland@redhat.com>
2469 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2470 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2471 values from DWARF 3.0.
2473 2006-02-22 Roland McGrath <roland@redhat.com>
2475 * libdw.map: Bump to 0.120; export dwfl_version.
2477 2005-12-22 Roland McGrath <roland@redhat.com>
2479 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2481 2005-12-12 Roland McGrath <roland@redhat.com>
2483 * dwarf_ranges.c: Copy CU base address-finding code from
2486 2005-12-09 Roland McGrath <roland@redhat.com>
2488 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2489 Delay CU base lookup until it's needed.
2490 If CU base lookup fails with no error, flag invalid DWARF.
2492 2005-11-25 Roland McGrath <roland@redhat.com>
2494 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2496 2005-11-15 Roland McGrath <roland@redhat.com>
2498 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2500 2005-11-13 Roland McGrath <roland@redhat.com>
2502 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2504 2005-10-27 Roland McGrath <roland@redhat.com>
2506 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2507 don't match end_sequence markers.
2509 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2510 before normal records at the same address.
2511 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2514 2005-10-26 Roland McGrath <roland@redhat.com>
2516 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2517 * dwarf_func_file.c: Renamed to ...
2518 * dwarf_decl_file.c: ... here.
2519 * dwarf_func_col.c: Renamed to ...
2520 * dwarf_decl_column.c: ... here.
2521 * dwarf_func_line.c: Renamed to ...
2522 * dwarf_decl_line.c: ... here.
2523 (dwarf_func_line): Renamed to ...
2524 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2525 (__libdw_func_intval): Renamed __libdw_attr_intval.
2526 * dwarf_func_name.c: File removed.
2527 * dwarf_func_lowpc.c: File removed.
2528 * dwarf_func_highpc.c: File removed.
2529 * dwarf_func_entrypc.c: File removed.
2530 * dwarf_func_die.c: File removed.
2531 * Makefile.am (libdw_a_SOURCES): Updated.
2532 * libdw.h: Update decls.
2533 (Dwarf_Func): Type removed.
2534 * libdwP.h: Update decls.
2535 (struct Dwarf_Func_s): Type removed.
2536 * libdw.map: Updated.
2538 * libdwP.h (CUDIE): New macro.
2539 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2540 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2541 * dwarf_ranges.c (dwarf_ranges): Likewise.
2543 * dwarf_getloclist.c: Renamed to ...
2544 * dwarf_getlocation.c: ... here.
2545 (getloclist): Renamed to getlocation.
2546 (dwarf_getloclist): Renamed to dwarf_getlocation.
2547 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2548 * Makefile.am (libdw_a_SOURCES): Updated.
2549 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2550 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2551 (Dwarf_Loc): Renamed Dwarf_Op.
2552 * libdwP.h (struct loc_s): Update use.
2553 * libdw.map: Update map.
2555 * dwarf_entry_breakpoints.c: Use the second line record within the
2556 function, regardless of its source location data.
2558 2005-10-25 Roland McGrath <roland@redhat.com>
2560 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2562 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2564 2005-10-14 Roland McGrath <roland@redhat.com>
2566 * dwarf_diecu.c (dwarf_diecu): New file.
2567 * Makefile.am (libdw_a_SOURCES): Add it.
2568 * libdw.h: Declare dwarf_diecu.
2569 * libdw.map: Export it.
2571 * libdw.map: Bump to 0.116; export dwarf_ranges.
2573 2005-09-20 Roland McGrath <roland@redhat.com>
2575 * dwarf_haspc.c: Use dwarf_ranges.
2576 * dwarf_entry_breakpoints.c: Likewise.
2578 * dwarf_ranges.c: New file.
2579 * Makefile.am (libdw_a_SOURCES): Add it.
2580 * libdw.h: Declare dwarf_ranges.
2581 * libdwP.h: Add INTDECL.
2583 2005-09-14 Roland McGrath <roland@redhat.com>
2585 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2586 prologue_end marker scanning loop.
2588 2005-09-11 Roland McGrath <roland@redhat.com>
2590 * dwarf.h: Comment typo fix.
2592 2005-09-07 Roland McGrath <roland@redhat.com>
2594 * dwarf_entry_breakpoints.c: New file.
2595 * Makefile.am (libdw_a_SOURCES): Add it.
2596 * libdw.h: Declare dwarf_entry_breakpoints.
2598 * dwarf_entrypc.c: New file.
2599 * Makefile.am (libdw_a_SOURCES): Add it.
2600 * libdw.h: Declare dwarf_entrypc.
2601 * libdwP.h: Add INTDECL.
2603 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2605 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2606 (%.os): Use COMPILE.os.
2607 (COMPILE.os): Filter out gconv options.
2609 2005-08-27 Roland McGrath <roland@redhat.com>
2611 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2612 __libdw_visit_scopes.
2614 * dwarf_getscopes_die.c: New file.
2615 * Makefile.am (libdw_a_SOURCES): Add it.
2616 * libdw.h: Declare dwarf_getscopes_die.
2617 * libdw.map: Bump to 0.115 and add it.
2619 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2620 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2621 Take two functions for both preorder and postorder visitors.
2622 * libdwP.h: Update decl.
2623 (struct Dwarf_Die_Chain): New type.
2624 * dwarf_func_inline.c: Update uses.
2626 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2628 * libdwP.h: Add INTDECL.
2629 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2631 2005-08-23 Roland McGrath <roland@redhat.com>
2633 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2634 DW_AT_specification the same as DW_AT_abstract_origin.
2636 2005-08-20 Roland McGrath <roland@redhat.com>
2638 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2639 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2640 and dwfl_report_offline.
2642 2005-08-19 Roland McGrath <roland@redhat.com>
2644 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2645 Add dwfl_module_relocate_address, dwfl_module_relocations,
2646 dwfl_module_relocation_info.
2648 2005-08-18 Roland McGrath <roland@redhat.com>
2650 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2651 outermost scope in the results.
2653 2005-08-15 Roland McGrath <roland@redhat.com>
2655 * dwarf_func_inline.c: New file.
2656 * Makefile.am (libdw_a_SOURCES): Add it.
2657 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2658 * libdw.map: Add them.
2660 * dwarf_func_die.c: New file.
2661 * Makefile.am (libdw_a_SOURCES): Add it.
2662 * libdw.h: Declare dwarf_func_die.
2663 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2665 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2667 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2668 of DW_LNS_set_epilog_begin.
2670 2005-08-09 Roland McGrath <roland@redhat.com>
2672 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2674 * dwarf_end.c: Add INTDEF.
2675 * dwarf_error.c (dwarf_errmsg): Likewise.
2676 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2678 2005-08-01 Roland McGrath <roland@redhat.com>
2680 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2681 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2683 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2685 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2686 (libdw_a_LIBADD): Add all files from libdwfl.a.
2688 2005-07-27 Roland McGrath <roland@redhat.com>
2690 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2691 along with ../libebl/libebl.a and ../lib/libeu.a;
2692 depend on ../libelf/libelf.so.
2693 (libdw_so_LDADD): New variable.
2694 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2696 * libdw.map: Define an empty base version and move all symbols to
2697 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2699 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2701 * dwarf_error.c: Add internal alias for dwarf_errno.
2702 * libdwP.h: Declare __dwarf_errno_internal.
2703 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2705 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2708 2005-06-01 Roland McGrath <roland@redhat.com>
2710 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2711 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2713 2005-06-08 Roland McGrath <roland@redhat.com>
2715 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2716 (get_sleb128_step, get_sleb128): Likewise.
2717 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2718 * dwarf_getloclist.c (getloclist): Likewise.
2719 * dwarf_formblock.c (dwarf_formblock): Likewise.
2720 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2721 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2722 * dwarf_formref.c (dwarf_formref): Likewise.
2723 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2724 * dwarf_formudata.c (dwarf_formudata): Likewise.
2725 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2726 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2727 * dwarf_tag.c (dwarf_tag): Likewise.
2728 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2729 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2730 * libdw_form.c (__libdw_form_val_len): Likewise.
2731 * libdwP.h: Update decl.
2733 2005-06-04 Roland McGrath <roland@redhat.com>
2735 * memory-access.h (get_uleb128_rest_return): New macro.
2736 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2737 (get_sleb128_rest_return): New macro.
2738 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2739 * memory-access.c: New file.
2740 * Makefile.am (libdw_a_SOURCES): Add it.
2741 (DEFS): Add -DIS_LIBDW.
2743 2005-05-31 Roland McGrath <roland@redhat.com>
2745 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2748 2005-05-30 Roland McGrath <roland@redhat.com>
2750 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2751 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2753 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2754 BEGIN value. Instead, match base address entries separately for
2757 2005-05-28 Roland McGrath <roland@redhat.com>
2759 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2760 past location expression contents.
2762 2005-05-23 Roland McGrath <roland@redhat.com>
2764 * dwarf_getsrclines.c: Comment typo fix.
2766 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2767 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2769 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2771 * libdwP.h: Only use INTDECL for alias prototypes.
2773 2005-05-19 Roland McGrath <roland@redhat.com>
2775 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2777 * dwarf_getscopevar.c: New file.
2778 * Makefile.am (libdw_a_SOURCES): Add it.
2779 * libdw.h: Declare dwarf_getscopevar.
2781 * dwarf_getsrcfiles.c: Add INTDEF.
2782 * dwarf_haschildren.c: Likewise.
2783 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2785 * dwarf_getscopes.c: New file.
2786 * Makefile.am (libdw_a_SOURCES): Add it.
2787 * libdw.h: Declare dwarf_getscopes.
2788 * libdw.map: Add it.
2790 2005-05-18 Roland McGrath <roland@redhat.com>
2792 * libdwP.h (IDX_debug_ranges): New enum constant.
2793 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2794 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2795 * dwarf_error.c (errmsgs): Add it.
2796 * dwarf_haspc.c: New file.
2797 * libdw.h: Declare dwarf_haspc.
2798 * libdw.map: Add it.
2799 * libdwP.h: Add INTDECL.
2801 * dwarf_attr_integrate.c: New file.
2802 * dwarf_hasattr_integrate.c: New file.
2803 * Makefile.am (libdw_a_SOURCES): Add them.
2804 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2805 * libdw.map: Add them.
2807 * dwarf_hasattr.c: Add INTDEF.
2808 * libdwP.h: Add INTDECL for it.
2810 * dwarf_formref_die.c: New file.
2811 * Makefile.am (libdw_a_SOURCES): Add it.
2812 * libdw.h (dwarf_formref_die): Declare it.
2813 * libdwP.h (dwarf_formref_die): Add INTDECL.
2814 * libdw.map: Add it.
2816 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2818 (dwarf_getloclist): ... here. Call them.
2819 (dwarf_addrloclists): New function.
2820 * libdw.h: Declare it.
2821 * libdw.map: Add it.
2823 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2824 DW_MACINFO_end_file. Recognize type 0 as terminator.
2826 2005-05-05 Roland McGrath <roland@redhat.com>
2828 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2830 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2831 the line program does not produce all entries in ascending order.
2833 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2835 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2836 occurences (e.g., inlines) better.
2838 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2840 * libdw.h (DWARF_END_ABBREV): Define.
2841 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2843 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2845 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2846 as error of __libdw_getabbrev.
2848 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2850 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2852 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2853 results back to caller.
2855 2005-04-04 Roland McGrath <roland@redhat.com>
2857 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2859 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2862 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2864 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2866 * dwarf_getsrc_file.c: New file.
2867 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2868 * libdw.h: Declare dwarf_getsrc_file.
2869 * libdw.map: Add dwarf_getsrc_file.
2871 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2873 * dwarf_func_entrypc.c: New file.
2874 * dwarf_func_col.c: New file.
2875 * dwarf_func_line.c: New file.
2876 * dwarf_func_file.c: New file.
2877 * libdw.h: Add prototypes for new functions.
2878 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2880 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2881 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2882 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2883 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2884 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2885 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2887 * dwarf.h: Add some DWARF3 definitions.
2889 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2891 * dwarf_getfuncs.c: New file.
2892 * dwarf_func_highpc.c: New file.
2893 * dwarf_func_lowpc.c: New file.
2894 * dwarf_func_name.c: New file.
2895 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2896 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2897 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2898 and dwarf_func_name.
2899 * libdw.h: Add prototypes for new functions.
2900 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2901 * dwarf_siblingof.c: Likewise.
2902 * dwarf_dieoffset.c: Likewise.
2903 * dwarf_highpc.c: Likewise.
2904 * dwarf_lowpc.c: Likewise.
2905 * libdwP.h: Add prototypes for internal functions.
2906 Define Dwarf_Func_s structure.
2908 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2910 * libdw.h: Add padding in Dwarf_die.
2912 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2913 * dwarf_attr.c: Likewise.
2914 * dwarf_begin.c: Likewise.
2915 * dwarf_begin_elf.c: Likewise.
2916 * dwarf_bitoffset.c: Likewise.
2917 * dwarf_bitsize.c: Likewise.
2918 * dwarf_bytesize.c: Likewise.
2919 * dwarf_diename.c: Likewise.
2920 * dwarf_formaddr.c: Likewise.
2921 * dwarf_formblock.c: Likewise.
2922 * dwarf_formref.c: Likewise.
2923 * dwarf_formstring.c: Likewise.
2924 * dwarf_formudata.c: Likewise.
2925 * dwarf_getarange_addr.c: Likewise.
2926 * dwarf_getarangeinfo.c: Likewise.
2927 * dwarf_getaranges.c: Likewise.
2928 * dwarf_getloclist.c: Likewise.
2929 * dwarf_getmacros.c: Likewise.
2930 * dwarf_getsrc_die.c: Likewise.
2931 * dwarf_getsrcfiles.c: Likewise.
2932 * dwarf_getsrclines.c: Likewise.
2933 * dwarf_highpc.c: Likewise.
2934 * dwarf_lowpc.c: Likewise.
2935 * dwarf_nextcu.c: Likewise.
2936 * dwarf_offdie.c: Likewise.
2937 * dwarf_siblingof.c: Likewise.
2938 * dwarf_srclang.c: Likewise.
2939 * dwarf_tag.c: Likewise.
2940 * libdw_findcu.c: Likewise.
2941 * libdwP.h: Add prototypes for internal functions.
2943 * dwarf_addrdie.c: New file.
2944 * dwarf_macro_opcode.c: New file.
2945 * dwarf_macro_param1.c: New file.
2946 * dwarf_macro_param2.c: New file.
2947 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2948 * libdwP.h: Remove Dwarf_Macro definition.
2949 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2950 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2951 * libdw.map: Add entries for new functions.
2953 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2955 * libdw.h: Handle broken gcc < 4.
2957 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2959 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2961 * dwarf_begin_elf.c: Fix warnings.
2962 * dwarf_dieoffset.c: Likewise.
2963 * dwarf_end.c: Likewise.
2964 * dwarf_error.c: Likewise.
2965 * dwarf_getpubnames.c: Likewise.
2967 * libdwP.h: Add new error values.
2968 * dwarf_error.c: Support new error values.
2969 * dwarf_getpubnames.c: Check parameter value.
2971 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2973 * Makefile.am: Check for text relocations in constructed DSO.
2975 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2977 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2979 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2980 checks to not read over buffer boundaries for ill-formed DWARF data.
2982 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2984 * dwarf_child.c: Make compile with gcc 4.0.
2985 * dwarf_error.c: Likewise.
2986 * dwarf_formblock.c: Likewise.
2987 * dwarf_getabbrev.c: Likewise.
2988 * dwarf_getattrs.c: Likewise.
2989 * dwarf_getsrclines.c: Likewise.
2990 * dwarf_tag.c: Likewise.
2991 * libdw_form.c: Likewise.
2993 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2995 * Makefile.am: Support building with mudflap.
2997 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2998 * dwarf_getsrclines.c: Likewise.
2999 * dwarf_memory-access.h: Likewise.
3001 2004-01-19 Ulrich Drepper <drepper@redhat.com>
3003 * dwarf_getsrcfiles.c: Third parameter can be NULL.
3005 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
3006 Third parameter of dwarf_getsrcfiles can be NULL.
3008 * libdw.map: Add dwarf_getmacros.
3009 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
3010 * dwarf_getmacros.c: New file.
3012 2004-01-18 Ulrich Drepper <drepper@redhat.com>
3014 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
3016 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
3018 * dwarf_getsrclines.c:
3019 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
3021 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
3023 * libdwP.h (_): Use elfutils domain.
3025 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
3027 * dwarf_getsrclines.c: Fix typo in comment.
3029 2004-01-17 Ulrich Drepper <drepper@redhat.com>
3031 * Makefile.am: Support building with mudflap.
3033 2004-01-16 Ulrich Drepper <drepper@redhat.com>
3035 * memory-access.h: Add lots of const in case a pointer passed is const.
3037 * dwarf_formflag.c: New file.
3038 * dwarf_getattrs.c: New file.
3039 * dwarf_error.c: Add new error value.
3040 * libdw.h: Add prototypes for new functions. Adjust prototype for
3042 * libdw.map: Add new functions.
3043 * dwarf_getpubnames.c: Change type of return value and fourth parameter
3045 * libdwP.h: Add new error value.
3046 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
3049 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
3051 2004-01-12 Ulrich Drepper <drepper@redhat.com>
3053 * dwarf_getarange_addr.c: New file
3054 * dwarf_getarangeinfo.c: New file.
3055 * dwarf_getaranges.c: New file.
3056 * dwarf_onerange.c: New file.
3057 * libdw.h: Declare new functions. Define Dwarf_Arange and
3059 * libdw.map: Add new functions.
3060 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
3061 Define Dwarf_Aranges_s and Dwarf_Arange_s.
3062 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
3063 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
3064 * dwarf_error.c: Add new message.
3066 2004-01-11 Ulrich Drepper <drepper@redhat.com>
3068 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
3069 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
3070 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
3071 * dwarf_error.c: Add another message.
3072 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
3074 * dwarf_filesrc.c: Likewise.
3075 * dwarf_getsrcfiles.c: Likewise.
3076 * dwarf_getsrclines.c: Likewise.
3077 * dwarf_lineaddr.c: New file.
3078 * dwarf_linebeginstatement.c: New file.
3079 * dwarf_lineblock.c: New file.
3080 * dwarf_linecol.c: New file.
3081 * dwarf_lineendsequence.c: New file.
3082 * dwarf_lineepiloguebegin.c: New file.
3083 * dwarf_lineno.c: New file.
3084 * dwarf_lineprologueend.c: New file.
3085 * dwarf_onesrcline.c: New file.
3086 * dwarf_lineno.c: Change interface to store result in object pointed
3087 to by second parameter.
3088 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
3089 prototype. Define Dwarf_Files and Dwarf_Lines.
3090 * libdw.map: Add new functions.
3091 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
3092 * libdw_findcu.c: Don't initialize nlines field.
3094 * dwarf_siblingof: Little optimization.
3096 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
3097 * dwarf_end.c: Close ELF descriptor if free_elf is set.
3098 * libdwP.h (struct Dwarf): Add free_elf field.
3100 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
3102 * dwarf_getstring.c: New file.
3103 * dwarf_offabbrev.c: New file.
3104 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
3105 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
3106 parameters. Don't allocate memory if not necessary and don't lookup
3107 previous results if no CU given.
3108 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
3109 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
3110 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
3111 * libdwP.h: Change prototype for __libdw_getabbrev.
3113 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
3114 returning if this is wanted.
3116 2004-01-09 Ulrich Drepper <drepper@redhat.com>
3118 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
3119 with offset_size value.
3120 * libdw.h: Adjust dwarf_nextcu prototype.
3121 * libdwP.h (struct Dwarf_CU): Add offset_size member.
3122 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
3123 member of new CU struct.
3124 * dwarf_formstring.c: Depend on offset_size not address_size for
3125 DW_FORM_strp handling.
3126 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
3128 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
3130 (dwarf_tag): Correctly recognize failed lookup.
3132 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
3134 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
3135 * dwarf_formblock.c: New file.
3136 * dwarf_getloclist.c: Rewrite to handle a single block.
3137 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
3138 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
3139 dwarf_getloclistent declaration.
3140 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
3141 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
3142 Add locs member to struct Dwarf_CU.
3143 * libdw_fundcu.c: Initialize locs member of new CU.
3144 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
3145 Remove dwarf_getloclistent.c.
3147 2004-01-07 Ulrich Drepper <drepper@redhat.com>
3149 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
3150 * libdwP.h: Likewise.
3152 * dwarf_getloclist.c: New file.
3153 * dwarf_getloclistent.c: New file.
3154 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
3155 Declare dwarf_getloclistent and dwarf_getloclist.
3156 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
3157 * libdwP.h: Define DWARF_E_NO_LOCLIST.
3158 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
3161 * dwarf_error.c: More error messages.
3163 2004-01-06 Ulrich Drepper <drepper@redhat.com>
3165 * dwarf_getsrclines.c: Remove debugging support.
3167 * dwarf_getsrcfiles.c: New file.
3168 * dwarf_filesrc.c: New file.
3169 * libdw.h: Declare these functions. Define Dwarf_File.
3170 * libdwP.c: Adjust Dwarf_File_s definition.
3171 * libdw.map: Add these functions.
3172 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
3174 * dwarf_getsrclines.c: Initialize cu->files.
3176 2004-01-05 Ulrich Drepper <drepper@redhat.com>
3178 * libdw.h: Add more nonnull function attributes.
3180 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
3181 * dwarf_end.c (cu_free): New function.
3182 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
3183 * dwarf_error.c (errmsgs): Add new messages.
3184 * dwarf_getsrc_die.c: New file.
3185 * dwarf_getsrclines.c: New file.
3186 * dwarf_lineno.c: New file.
3187 * dwarf_linesrc.c: New file.
3188 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
3189 instead of the *_inc-less variants.
3190 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
3191 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
3192 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
3194 * libdwP.h: Add more error codes.
3195 (struct Dwarf): Remove mem_tail.next member.
3196 (Dwarf_File): Define type.
3197 (struct Dwarf_Line_s): Define type.
3198 (struct Dwarf_CU): Add lines and nlines members.
3199 (libdw_alloc): Define local variable _tail and use it.
3200 Add some function attributes.
3201 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
3202 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
3203 * memory-access.h: Add unlikely for the endian conversion paths.
3204 * Makefile.am (AM_CFLAGS): Add -std parameter.
3205 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3206 dwarf_lineno, and dwarf_linesrc.
3208 2003-08-11 Ulrich Drepper <drepper@redhat.com>
3210 * Moved to CVS archive.