1 2018-05-09 Mark Wielaard <mark@klomp.org>
3 * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to...
4 * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline.
5 (str_offsets_base_off): New internal function that also parses
6 .debug_str_offsets header if necessary.
8 2018-05-11 Mark Wielaard <mark@klomp.org>
10 * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is
11 known the Dwarf_Die is came from is valid.
12 * libdwP.h (__libdw_dieabbrev): Check cu is not NULL.
14 2018-05-08 Mark Wielaard <mark@klomp.org>
16 * dwarf_formref.c (__libdw_formref): Explicitly don't handle
17 DW_FORM_ref_sup4 and DW_FORM_ref_sup8.
18 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4
20 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup
21 as DW_FORM_GNU_strp_alt.
23 2018-05-05 Mark Wielaard <mark@klomp.org>
25 * dwarf.h: Add DWARF line content descriptions.
26 * libdwP.h (libdw_valid_user_form): New static function.
27 * dwarf_getsrclines.c (read_srclines): Check and parse version 5
28 DWARF header, dir and file tables separately from older versions
31 2018-04-24 Mark Wielaard <mark@klomp.org>
33 * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str".
34 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and
35 DWARF_E_NO_DEBUG_LINE_STR.
36 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp.
37 Get data from either .debug_str or .debug_line_str.
38 * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and
39 DWARF_E_NO_DEBUG_LINE_STR.
41 2018-04-03 Mark Wielaard <mark@klomp.org>
43 * dwarf_formudata.c (__libdw_formptr): Take and return const
44 unsigned char pointers.
45 * dwarf_getlocation.c (attr_base_address): Rename to...
46 (__libdw_cu_base_address): this. Take Dwarf_CU, check and set
48 (initial_offset_base): Renamed to...
49 (initial_offset): this. Only provide offset.
50 (getlocations_addr): Move data size check and
51 address base addition into __libdw_read_begin_end_pair_inc. Use
52 __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL
53 check (already done by initial_offset, through __libdw_formptr).
54 (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset.
55 Drop Elf_Data NULL check.
56 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument
57 type of readp to Add readend argument. Check data size. Include base
58 in begin and end result.
59 (initial_offset): New static function.
60 (dwarf_ranges): Don't check Elf_Data being NULL (already done by
61 initial_offset, through __libdw_formptr). Use __libdw_cu_base_address
62 and initial_offset. Remove base check and addition (already done by
63 __libdw_read_begin_end_pair_inc.
64 * libdwP.h (Dwarf_CU): Add base_address field.
65 (__libdw_read_begin_end_pair_inc): Change argument type of readp to
66 const. Add readend argument.
67 (__libdw_formptr): Take and return const unsigned char pointers.
68 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
71 2018-04-04 Mark Wielaard <mark@klomp.org>
73 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
74 addr_base and str_off_base.
76 2018-03-23 Mark Wielaard <mark@klomp.org>
78 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
80 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
81 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
82 (__libdw_cu_str_off_base): New function.
83 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
85 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
86 (struct Dwarf_CU): Add str_off_base field.
87 (__libdw_cu_str_off_base): New function declaration.
89 2018-03-22 Mark Wielaard <mark@klomp.org>
91 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
92 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
93 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
94 (__libdw_cu_addr_base): New function.
95 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
97 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
98 (struct Dwarf_CU): Add addr_base field.
99 (__libdw_cu_addr_base): New function definition.
100 * memory-access.h (file_byte_order): New static function.
101 (read_3ubyte_unaligned): New inline function.
103 2018-03-29 Mark Wielaard <mark@klomp.org>
105 * libdw.h (dwarf_decl_file): Extend documentation.
106 (dwarf_linesrc): Likewise.
107 (dwarf_filesrc): Likewise.
109 2018-03-06 Mark Wielaard <mark@klomp.org>
111 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
112 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
113 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
115 * dwarf_getlocation.c (__libdw_intern_expression): Handle
116 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
117 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
118 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
119 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
120 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
121 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
122 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
123 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
125 * dwarf_getlocation_implicit_pointer.c
126 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
128 2018-03-01 Mark Wielaard <mark@klomp.org>
130 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
131 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
134 2018-02-09 Mark Wielaard <mark@klomp.org>
136 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
139 2018-02-09 Mark Wielaard <mark@klomp.org>
141 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
142 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
143 * dwarf_formudata.c (dwarf_formudata): Likewise.
144 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
145 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
146 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
147 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
148 that will also return any data associated with the abbrev. Which
149 currently is only for DW_FORM_implicit_const. Based on...
150 (dwarf_getabbrevattr): ... this function. Which now just calls
151 dwarf_getabbrevattr_data.
152 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
153 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
154 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
155 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
156 function based on __libdw_get_uleb128_unchecked.
158 2018-02-08 Mark Wielaard <mark@klomp.org>
160 * dwarf.h: Add DWARF5 DW_FORMs.
161 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
162 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
163 DW_FORM_ref_sup[48] and DW_FORM_data16.
164 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
165 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
166 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
168 2018-01-30 Mark Wielaard <mark@klomp.org>
170 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
171 * dwarf_get_units.c: New file.
172 * libdw.h (dwarf_get_units): New function declaration.
173 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
175 2018-01-29 Mark Wielaard <mark@klomp.org>
177 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
178 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
179 is now called unit_idp. type_offsetp is now called subdie_offsetp.
180 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
181 and .debug_types sections for type units when type signature ref
183 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
184 __libdw_first_die_off_from_cu instead of trying by hand.
185 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
186 instead of checking type_offset by hand.
187 * dwarf_getlocation_implicit_pointer.c
188 (dwarf_getlocation_implicit_pointer): Likewise.
189 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
190 (__libdw_next_unit): New function based on dwarf_next_unit with
191 DWARF5 header support.
192 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
193 and type_sig8 to unit_id8.
194 (ISV4TU): New macro to determine whether a CU is a version 4 type
195 unit (which comes from the .debug_types section).
196 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
197 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
199 (__libdw_first_die_off_from_cu): New function that calls the above
201 (CUDIE): Use __libdw_first_die_off_from_cu.
202 (SUBDIE): New macro that provides the DIE for a CU using the
204 (__libdw_next_unit): New internal function declaration.
205 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
206 Accept DWARF version 5 headers. Setup unit_type.
207 (__libdw_findcu): Rename debug_types argument to v4_debug_types
208 argument (to indicate that we are looking in the .debug_types
209 section). Support finding the exact offset (unit header start).
211 2018-01-25 Mark Wielaard <mark@klomp.org>
213 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
214 * dwarf_die_addr_die.c: New file.
215 * libdw.h (dwarf_die_addr_die): New function declaration.
216 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
217 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
218 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
220 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
222 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
223 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
225 2018-01-22 Mark Wielaard <mark@klomp.org>
227 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
228 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
229 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
230 and alt_fd if we allocated them.
231 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
232 * dwarf_formstring.c (dwarf_formstring): Likewise.
233 * dwarf_getalt.c (__libdw_filepath): New internal function.
234 (find_debug_altlink): New static function.
235 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
237 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
239 * libdw.h (dwarf_getalt): Extend documentation.
240 (dwarf_setalt): Likewise.
241 * libdwP.h (struct Dwarf): Add alt_fd field.
242 (filepath): Declare new internal function.
244 2018-01-14 Petr Machata <pmachata@gmail.com>
246 * dwarf_formsdata.c (dwarf_formsdata):
247 <DW_FORM_data1>: Cast to signed char.
248 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
249 read_*ubyte_unaligned.
251 2017-12-26 Mark Wielaard <mark@klomp.org>
253 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
254 use bitfields for has_children and code.
255 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
256 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
258 2017-12-26 Mark Wielaard <mark@klomp.org>
260 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
261 (get_uleb128_unchecked): New define.
262 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
263 read attr name and form.
264 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
265 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
266 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
268 2017-12-28 Mark Wielaard <mark@klomp.org>
270 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
272 2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
273 Mark Wielaard <mark@klomp.org>
275 * libdwP.h (__libdw_in_section): Fix check for the upper border of
277 (__libdw_offset_in_section): Likewise.
279 2017-12-20 Mark Wielaard <mark@klomp.org>
281 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
282 (cu_sec_idx): Return cu->sec_idx.
283 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
284 IDX_debug_info or IDX_debug_types.
285 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
287 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
288 IDX_debug_macro or IDX_debug_macinfo.
290 2017-12-12 Mark Wielaard <mark@klomp.org>
292 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
293 given DIE. Reserve memory for a new DIE first.
295 2017-12-11 Dima Kogan <dima@secretsauce.net>
297 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
300 2017-11-03 Mark Wielaard <mark@klomp.org>
302 * dwarf_getlocation.c (__libdw_intern_expression): Handle
303 DW_OP_GNU_variable_value.
304 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
305 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
307 2017-11-03 Mark Wielaard <mark@klomp.org>
309 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
310 Update list of acceptable attribute codes based on DWARF5.
312 2017-11-03 Mark Wielaard <mark@klomp.org>
314 * dwarf.h: Add DW_OP_GNU_variable_value.
316 2017-10-03 Mark Wielaard <mark@klomp.org>
318 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
320 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
322 * memory-access.h: Use attribute_packed.
324 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
326 * libdwP.h: Use attribute_hidden.
327 * libdw_alloc.c: Likewise.
329 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
331 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
333 2017-07-26 Mark Wielaard <mark@klomp.org>
335 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
336 * dwarf_getmacros.c (get_table_for_offset): Accept either version
337 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
338 (read_macros): Use table version for fake_cu.
340 2017-07-26 Mark Wielaard <mark@klomp.org>
342 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
343 DW_TAG_packed_type and DW_TAG_shared_type.
344 * libdw.h (dwarf_peel_type): Extend documentation.
346 2017-07-26 Mark Wielaard <mark@klomp.org>
348 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
349 DW_DEFAULTED_out_of_class.
351 2017-07-26 Mark Wielaard <mark@klomp.org>
353 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
355 2017-07-26 Mark Wielaard <mark@klomp.org>
357 * dwarf_default_lower_bound.c: New file.
358 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
359 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
360 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
361 * libdw.h: Add dwarf_default_lower_bound.
362 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
363 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
364 dwarf_default_lower_bound INTDECL.
366 2017-07-26 Mark Wielaard <mark@klomp.org>
368 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
369 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
370 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
371 * dwarf_aggregate_size.c (array_size): Add lower bound for
372 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
373 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
374 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
375 DW_LANG_Julia and DW_LANG_BLISS.
377 2017-07-26 Mark Wielaard <mark@klomp.org>
379 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
381 2017-07-25 Mark Wielaard <mark@klomp.org>
383 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
384 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
385 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
386 for currently unused numbers.
388 2017-07-25 Mark Wielaard <mark@klomp.org>
390 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
391 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
392 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
394 2017-07-21 Mark Wielaard <mark@klomp.org>
396 * dwarf_line_file.c: New file.
397 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
398 * libdw.h (dwarf_line_file): New function declaration.
399 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
401 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
403 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
404 made of, libdw_so_DEPS for libraries it depends on (including
405 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
406 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
407 library dependencies, use libdw_so_LIBS rather than relying on the
408 order of dependencies specified, add -z,relro.
410 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
412 * libdw.h: Remove attribute macro declarations and use
413 __noreturn_attribute__ as defined in libelf.h.
415 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
417 * dwarf_begin_elf.c: Include endian.h.
419 2017-03-30 Mark Wielaard <mjw@redhat.com>
421 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
424 2016-10-22 Mark Wielaard <mjw@redhat.com>
426 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
427 * dwarf_aggregate_size.c (array_size): Use correct spelling of
430 2016-11-02 Mark Wielaard <mjw@redhat.com>
432 * cfi.c (execute_cfi): Add fallthrough comments.
433 * encoded-value.h (encoded_value_size): Add explicit return instead
434 of relying on fallthrough.
435 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
438 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
440 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
441 * libdw_alloc.c: Likewise.
443 2016-07-08 Mark Wielaard <mjw@redhat.com>
445 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
446 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
447 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
449 2016-02-13 Mark Wielaard <mjw@redhat.com>
451 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
454 2015-12-18 Mark Wielaard <mjw@redhat.com>
456 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
457 (__libdw_free_zdata): Remove.
458 * dwarf_begin_elf.c (inflate_section): Remove.
459 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
460 and elf_compress_gnu to decompress if necessary.
461 (valid_p): Remove __libdw_free_zdata calls.
462 (scngrp_read): Use elf_compress if section is compressed. Remove
463 __libdw_free_zdata calls.
464 * dwarf_end.c (__libdw_free_zdata): Remove.
465 (dwarf_end): Don't call __libdw_free_zdata.
467 2015-10-28 Mark Wielaard <mjw@redhat.com>
469 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
471 2015-12-02 Mark Wielaard <mjw@redhat.com>
473 * fde.c (intern_fde): Don't leak duplicate FDEs.
475 2015-12-01 Mark Wielaard <mjw@redhat.com>
477 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
480 2015-12-01 Mark Wielaard <mjw@redhat.com>
482 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
484 2015-10-14 Chih-Hung Hsieh <chh@google.com>
486 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
487 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
489 2015-10-14 Chih-Hung Hsieh <chh@google.com>
491 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
492 function 'walk_children' to file scope; inline 'recurse' at its call
495 2015-10-19 Mark Wielaard <mjw@redhat.com>
497 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
500 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
502 * dwarf_getsrclines.c (read_srclines): Initialize state early.
504 2015-10-13 Chih-Hung Hsieh <chh@google.com>
506 * dwarf_getsrclines.c (read_srclines): Move nested functions
507 'advance_pc' and 'add_new_line' to file scope and keep many
508 local state variables within one structure.
510 2015-10-13 Chih-Hung Hsieh <chh@google.com>
512 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
513 function 'file_matches' to file scope.
515 2015-10-16 Mark Wielaard <mjw@redhat.com>
517 * Makefile.am (libdw.so): Add -lz.
519 2015-10-14 Chih-Hung Hsieh <chh@google.com>
521 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
522 and 'require_cfa_offset' to file scope.
524 2015-10-09 Josh Stone <jistone@redhat.com>
526 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
529 2015-10-05 Josh Stone <jistone@redhat.com>
531 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
533 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
535 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
536 relocation overflows in some platforms.
538 2015-09-23 Mark Wielaard <mjw@redhat.com>
540 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
541 * dwarf_formref.c (__libdw_formref): Likewise.
542 * libdw_findcu.c (__libdw_findcu): Likewise.
543 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
545 2015-09-22 Mark Wielaard <mjw@redhat.com>
547 * *.c: Remove old-style function definitions.
549 2015-09-15 Mark Wielaard <mjw@redhat.com>
551 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
553 2015-09-09 Chih-Hung Hsieh <chh@google.com>
555 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
556 redundant NULL tests on parameters declared with __nonnull_attribute__.
557 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
558 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
560 2015-09-04 Chih-Hung Hsieh <chh@google.com>
561 Mark Wielaard <mjw@redhat.com>
563 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
564 definition with ansi-C definition and add const qualifier to
567 2015-09-04 Chih-Hung Hsieh <chh@google.com>
569 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
570 definition with ansi-C definitions.
571 (__libdw_findcu): Likewise.
573 2015-08-25 Mark Wielaard <mjw@redhat.com>
575 * dwarf.h: Add DW_LANG_Haskell.
577 2015-06-18 Mark Wielaard <mjw@redhat.com>
579 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
582 2015-06-18 Mark Wielaard <mjw@redhat.com>
584 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
586 2015-06-18 Mark Wielaard <mjw@redhat.com>
588 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
589 dwarf_formudata reports an error.
590 (get_table_for_offset): Likewise.
592 2015-06-08 Mark Wielaard <mjw@redhat.com>
594 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
596 2015-06-06 Mark Wielaard <mjw@redhat.com>
598 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
600 2015-05-27 Mark Wielaard <mjw@redhat.com>
602 * encoded-value.h (read_encoded_value): Check data d_size contains
603 at least enough data to hold a pointer for DW_EH_PE_indirect.
605 2015-05-22 Mark Wielaard <mjw@redhat.com>
607 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
608 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
609 MAX_STACK_DIRS. Calculate number of dirs needed first, then
610 create dirarray directly, without needing the next field. Free
611 not stack allocated lines and files at the end.
613 2015-05-19 Mark Wielaard <mjw@redhat.com>
615 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
616 allocated array to hold locs. Allocate locs bigger than the array
617 with malloc and free them when done.
619 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
621 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
622 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
623 * dwarf_begin_elf.c (inflate_section): New static function, lifted
625 (check_section): ... here. Call inflate_section, set libdw errno to
626 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
628 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
630 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
631 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
633 2015-05-06 Mark Wielaard <mjw@redhat.com>
635 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
636 check the line number.
638 2015-05-05 Mark Wielaard <mjw@redhat.com>
640 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
641 left before reading values.
643 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
645 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
648 2015-04-22 Mark Wielaard <mjw@redhat.com>
650 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
651 (__libdw_max_len_uleb128): New function.
652 (__libdw_max_len_sleb128): Likewise.
653 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
654 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
656 2015-04-21 Mark Wielaard <mjw@redhat.com>
658 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
659 when there are more than 8.
661 2015-04-01 Petr Machata <pmachata@redhat.com>
663 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
664 (is_cudie): New function.
665 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
666 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
667 of white-listing valid tags.
668 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
670 2015-03-18 Petr Machata <pmachata@redhat.com>
672 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
673 (EXTRA_DIST): Remove known-dwarf.h.
675 2015-02-09 Mark Wielaard <mjw@redhat.com>
677 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
678 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
679 for new Fortran language codes is 1.
681 2015-02-09 Mark Wielaard <mjw@redhat.com>
683 * dwarf.h: Add DW_TAG_atomic_type.
684 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
685 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
687 2015-02-11 Josh Stone <jistone@redhat.com>
689 * encoded-value.h (read_encoded_value): Initialize value.
691 2015-02-11 Petr Machata <pmachata@redhat.com>
693 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
694 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
695 the fact in *BASEP and bail out later if it hasn't been updated by
696 __libdw_read_begin_end_pair_inc.
698 2014-12-24 Mark Wielaard <mjw@redhat.com>
700 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
701 smaller than or equal to addr, rather than returning immediately on
704 2015-01-07 Mark Wielaard <mjw@redhat.com>
706 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
707 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
708 room in the search table for all entries. Store search_table_len.
709 (getcfi_scn_eh_frame): Likewise.
710 * encoded-value.h (encoded_value_size): Don't abort, return zero.
711 (__libdw_cfi_read_address_inc): Check there is enough room to read
712 values. Pass other byte order to read functions.
713 (read_encoded_value): Check encoded_value_size. Don't abort, but
714 set libdw errno and report failure. Check there is enough room to
716 * fde.c (binary_search_fde): Check encoded value size. Add hdr
717 data buf and size to dummy_cfi.
719 2015-01-04 Mark Wielaard <mjw@redhat.com>
721 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
722 is after current DIE.
724 2015-01-04 Mark Wielaard <mjw@redhat.com>
726 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
727 (dwarf_frame_register).
729 2015-01-02 Mark Wielaard <mjw@redhat.com>
731 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
732 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
733 (getcfi_scn_eh_frame): Check d_buf is not NULL.
735 2015-01-02 Mark Wielaard <mjw@redhat.com>
737 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
738 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
739 DW_OP_addr if dbg is NULL then read argument directly.
741 2015-01-14 Jason P. Leasure <jpleasu@super.org>
743 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
746 2014-12-27 Mark Wielaard <mjw@redhat.com>
748 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
749 still falls inside CU data.
751 2015-01-11 Mark Wielaard <mjw@redhat.com>
753 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
754 __libdw_visit_scopes with NULL imports.
755 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
756 * dwarf_getscopes.c (pc_record): Likewise.
757 (dwarf_getscopes): Likewise.
758 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
759 * libdwP.h (__libdw_visit_scopes): Add imports argument.
760 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
761 function imports_contains. Push and pop imports around walk_children
762 when processing DW_TAG_imported_unit.
764 2014-12-18 Ulrich Drepper <drepper@gmail.com>
766 * Makefile.am: Suppress output of textrel_check command.
768 2014-12-16 Mark Wielaard <mjw@redhat.com>
770 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
773 2014-12-16 Mark Wielaard <mjw@redhat.com>
775 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
776 space to read die offset.
778 2014-12-16 Mark Wielaard <mjw@redhat.com>
780 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
783 2014-12-15 Mark Wielaard <mjw@redhat.com>
785 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
786 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
787 (dwarf_getpubnames): Make sure section data contains string zero
790 2014-12-16 Mark Wielaard <mjw@redhat.com>
792 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
793 the compiler optimize for the common single-byte case.
795 2014-12-15 Josh Stone <jistone@redhat.com>
797 * memory-access.h (__libdw_max_len_leb128): New.
798 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
799 (__libdw_get_sleb128): Likewise.
801 2014-12-14 Mark Wielaard <mjw@redhat.com>
803 * cfi.c (execute_cfi): Add program bounds checks.
804 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
805 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
806 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
807 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
808 * dwarf_formudata.c (dwarf_formudata): Likewise.
809 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
810 with end of data buf.
811 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
812 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
813 call gets enough data.
814 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
815 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
817 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
819 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
820 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
821 get_uleb128 with lineendp.
822 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
823 get_uleb128 with endp.
824 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
825 get_uleb128/get_sleb128 with limit.
826 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
827 get_sleb128 get called with enough data.
828 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
829 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
830 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
832 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
833 Don't call get_uleb128_step if out of data.
834 (__libdw_get_sleb128): Likewise for get_sleb128_step.
836 2014-12-12 Mark Wielaard <mjw@redhat.com>
838 * libdwP.h (struct Dwarf): Add fake_loc_cu.
840 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
841 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
842 (__libdw_form_val_len): Likewise.
843 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
844 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
845 the already found data buffer directly.
846 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
847 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
848 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
850 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
851 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
852 * dwarf_getlocation_attr.c (attr_form_cu): New function.
853 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
854 (getlocation): Handle empty blocks immediately.
855 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
856 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
857 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
859 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
860 fake_cu. Call __libdw_form_val_len with just fake_cu.
861 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
862 datap and size directly from cu startp and endp.
864 2014-12-11 Mark Wielaard <mjw@redhat.com>
866 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
868 2014-12-13 Mark Wielaard <mjw@redhat.com>
870 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
871 difference doesn't wrap around before returning as int.
873 2014-12-11 Josh Stone <jistone@redhat.com>
875 * dwarf_getsrclines.c (struct linelist): Add sequence.
876 (compare_lines): Take linelists, and break ties by sequence.
877 (read_srclines): Use linelists for sorting.
878 (read_srclines::add_new_line): Set sequence.
880 2014-12-10 Josh Stone <jistone@redhat.com>
882 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
883 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
884 * dwarf_child.c (dwarf_child): Use cu->endp.
885 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
886 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
887 * dwarf_siblingof.c (dwarf_siblingof): Use both.
889 2014-12-10 Josh Stone <jistone@redhat.com>
891 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
893 2014-12-10 Josh Stone <jistone@redhat.com>
895 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
896 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
897 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
898 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
899 * dwarf_tag.c (dwarf_tag): Likewise.
901 2014-12-04 Mark Wielaard <mjw@redhat.com>
903 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
904 (__libdw_form_val_len): Likewise and check len doesn't overflow.
905 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
906 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
908 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
909 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
911 2014-12-02 Petr Machata <pmachata@redhat.com>
913 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
915 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
916 * libdw.h (DWARF_GETMACROS_START): New macro.
918 2014-11-27 Mark Wielaard <mjw@redhat.com>
920 * Makefile.am (libdw.so): Use textrel_check.
922 2014-11-27 Mark Wielaard <mjw@redhat.com>
924 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
925 search_table_entries and search_table_encoding.
927 2014-11-24 Mark Wielaard <mjw@redhat.com>
929 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
932 2014-11-23 Mark Wielaard <mjw@redhat.com>
934 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
935 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
936 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
938 2014-11-23 Mark Wielaard <mjw@redhat.com>
940 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
941 Set libdw errno and return NULL.
943 2014-11-24 Mark Wielaard <mjw@redhat.com>
945 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
946 (DW_LANG_C11): Likewise.
947 (DW_LANG_C_plus_plus_14): Likewise.
948 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
949 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
951 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
954 2014-11-26 Mark Wielaard <mjw@redhat.com>
956 * dwarf.h (DW_AT_noreturn): Added.
958 2014-11-11 Mark Wielaard <mjw@redhat.com>
960 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
961 explicitly as uint8_t.
962 (__libdw_getsrclines): Add internal_function to declaration.
964 2014-09-10 Petr Machata <pmachata@redhat.com>
966 * dwarf_macro_getparamcnt.c: New file.
967 * dwarf_macro_param.c: New file.
968 * dwarf_macro_getsrcfiles.c: New file.
969 * Makefile.am (libdw_a_SOURCES): Add the new files.
970 * libdwP.h (struct files_lines_s): New structure.
971 (DWARF_E_INVALID_OPCODE): New enumerator.
972 (struct Dwarf): New fields macro_ops, files_lines.
973 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
974 keeping macro opcode prototypes in.
975 (Dwarf_Macro_s): Redefine from scratch.
976 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
978 * dwarf_error.c (errmsgs): Add a message for
979 DWARF_E_INVALID_OPCODE.
980 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
982 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
983 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
985 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
986 (get_offset_from, macro_op_compare, build_table)
987 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
988 (cache_op_table, read_macros, gnu_macros_getmacros_off)
989 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
991 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
992 * dwarf_getsrclines.c (read_srclines): New function with guts
993 taken from dwarf_getsrclines.
994 (__libdw_getsrclines): Likewise.
995 (__libdw_getcompdir, files_lines_compare): New functions.
996 (dwarf_getsrclines): Make it dispatch to the new interfaces.
997 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
999 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
1000 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
1001 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
1003 2014-10-06 Mark Wielaard <mjw@redhat.com>
1005 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
1006 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
1007 (aggregate_size): Likewise. Add old and new version.
1008 * dwarf_peel_type.c: New file.
1009 * libdw.h (dwarf_peel_type): New function declaration.
1010 * libdwP.h (dwarf_peel_type): New internal declaration.
1011 * libdw.map (ELFUTILS_0.161): New section.
1013 2014-10-15 Petr Machata <pmachata@redhat.com>
1015 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
1016 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
1018 2014-10-05 Mark Wielaard <mjw@redhat.com>
1020 * dwarf.h: Add DW_AT_GNU_deleted.
1022 2014-10-02 Mark Wielaard <mjw@redhat.com>
1024 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
1025 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
1026 DW_TAG_rvalue_reference_type.
1028 2014-09-12 Petr Machata <pmachata@redhat.com>
1030 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
1031 8-byte quantities. Consequently, rename to...
1032 (read_addr_unaligned_inc): ... this.
1033 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
1034 (read_sbyte_unaligned): Drop.
1036 2014-09-10 Petr Machata <pmachata@redhat.com>
1038 * dwarf_getlocation.c (attr_ok): Also accept
1039 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
1040 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
1042 2014-08-15 Mark Wielaard <mjw@redhat.com>
1044 * dwarf_cu_die.c: New file.
1045 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
1046 * libdw.h (dwarf_cu_die): New function declaration.
1047 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
1049 2014-08-15 Mark Wielaard <mjw@redhat.com>
1051 * dwarf_cu_getdwarf.c: New file.
1052 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
1053 * libdw.h (Dwarf_CU): New typedef.
1054 (dwarf_cu_getdwarf): New function declaration.
1055 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
1057 2014-06-18 Mark Wielaard <mjw@redhat.com>
1059 * dwarf.h: Remove DW_TAG_mutable_type.
1061 2014-05-02 Mark Wielaard <mjw@redhat.com>
1063 * libdwP.h (__check_build_id): Removed now unused.
1065 2014-05-01 Mark Wielaard <mjw@redhat.com>
1067 * libdwP.h (struct Dwarf): Remove free_alt.
1068 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
1069 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1071 2014-04-30 Mark Wielaard <mjw@redhat.com>
1073 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1075 2014-04-15 Florian Weimer <fweimer@redhat.com>
1077 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1078 (open_debugaltlink): Move to libdwfl.
1079 (check_section): Do not locate alternate debuginfo.
1081 2014-04-24 Florian Weimer <fweimer@redhat.com>
1083 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1085 2014-04-22 Florian Weimer <fweimer@redhat.com>
1087 * dwarf_getalt.c, dwarf_setalt.c: New files.
1088 * Makefile.am (libdw_a_SOURCES): Add them.
1089 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1090 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1092 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1094 2014-04-15 Florian Weimer <fweimer@redhat.com>
1096 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1097 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1099 (check_section): Obtain .gnu_debugaltlink section from the
1102 2014-04-11 Mark Wielaard <mjw@redhat.com>
1104 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1105 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1106 (libdwelf_objects): New variable.
1107 (libdw_a_LIBADD): Add libdwelf objects.
1109 2014-04-22 Mark Wielaard <mjw@redhat.com>
1111 * memory-access.h (get_sleb128_step): Remove undefined behavior
1112 of left shifting a signed value. Replace it with a multiplication.
1114 2014-04-13 Mark Wielaard <mjw@redhat.com>
1116 * Makefile.am: Remove !MUDFLAP conditions.
1118 2014-04-09 Mark Wielaard <mjw@redhat.com>
1120 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1121 before calling malloc to uncompress data.
1123 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1125 Fix abort() on missing section headers.
1126 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1127 New label err to return NULL.
1129 2014-02-05 Josh Stone <jistone@redhat.com>
1131 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1132 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1133 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1135 2013-12-30 Mark Wielaard <mjw@redhat.com>
1137 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1138 dwfl_linux_proc_attach.
1140 2013-12-20 Mark Wielaard <mjw@redhat.com>
1142 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1144 2013-12-18 Mark Wielaard <mjw@redhat.com>
1146 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1147 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1148 dwfl_module_getsym_info.
1150 2013-12-16 Mark Wielaard <mjw@redhat.com>
1152 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1154 2013-12-10 Josh Stone <jistone@redhat.com>
1156 * memory-access.h (get_uleb128_rest_return): Removed.
1157 (get_sleb128_rest_return): Removed.
1158 (get_uleb128_step): Make this a self-contained block.
1159 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1160 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1161 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1162 (__libdw_get_uleb128): Simplify and inline for all callers.
1163 (__libdw_get_sleb128): Ditto.
1164 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1165 * memory-access.c: Delete file.
1166 * Makefile.am (libdw_a_SOURCES): Remove it.
1167 (DEFS): Remove the now unused -DIS_LIBDW.
1169 2013-12-09 Josh Stone <jistone@redhat.com>
1171 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1172 __libdw_form_val_len, now handling only non-constant form lengths.
1173 * libdwP.h (__libdw_form_val_len): New inlined function.
1175 2013-12-09 Mark Wielaard <mjw@redhat.com>
1177 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1178 location expressions.
1179 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1180 location found, return empty location expression.
1181 * dwarf_getlocation_implicit_pointer.c
1182 (dwarf_getlocation_implicit_pointer): Likewise.
1183 (__libdw_empty_loc_attr): New internal function.
1184 * libdwP.h (__libdw_empty_loc_attr): Define.
1186 2013-11-27 Mark Wielaard <mjw@redhat.com>
1188 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1189 dwfl_module_getsym_elf.
1191 2013-11-26 Mark Wielaard <mjw@redhat.com>
1193 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1194 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1195 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1196 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1197 (ELFUTILS_0.158): ... here.
1199 2013-11-09 Mark Wielaard <mjw@redhat.com>
1201 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1202 check that it is zero.
1204 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1206 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1207 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1208 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1209 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1210 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1212 2013-11-01 Michael Forney <mforney@mforney.org>
1214 * Makefile.am (libdwfl_objects): New definition.
1215 (libdw_a_LIBADD): Use libdwfl_objects.
1217 2013-11-01 Michael Forney <mforney@mforney.org>
1219 * Makefile.am: Use READELF.
1221 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1223 * libdw.map (ELFUTILS_0.158): New.
1225 2013-10-10 Mark Wielaard <mjw@redhat.com>
1227 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1228 start_addr and rename last_offset to last_addr. Now both void *.
1229 (tree_visitor): Use start_add and die_addr instead of start_offset
1231 (dwarf_getfuncs): Use last_addr instead of last_offset.
1233 2013-10-06 Mark Wielaard <mjw@redhat.com>
1235 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1236 DW_CFA_val_expression are not used with abi_cfi.
1238 2013-10-03 Josh Stone <jistone@redhat.com>
1240 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1241 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1242 a unit, make sure to always hash the sig8 here, so none are missed.
1244 2013-09-29 Mark Wielaard <mjw@redhat.com>
1246 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1247 uintptr_t before casting to char *.
1248 (__libdw_intern_expression): Cast data to uintptr_t before casting
1250 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1251 op->number2 to uintptr_t before casting to char *.
1253 2013-09-24 Josh Stone <jistone@redhat.com>
1255 * libdw_visit_scopes.c (classify_die): Removed.
1256 (may_have_scopes): New function to replace classify_die. There's no
1257 need for full classification; just find tags that may contain scopes.
1258 (__libdw_visit_scopes): Use a direct tag comparison for imported
1259 units, and use may_have_scopes to test if recursion is needed.
1261 2013-09-20 Mark Wielaard <mjw@redhat.com>
1263 * dwarf_getfuncs.c (visitor_info): New struct.
1264 (tree_visitor): New function.
1265 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1266 * libdw.h (dwarf_getfuncs): Expand function documentation.
1268 2013-09-12 Mark Wielaard <mjw@redhat.com>
1270 * fde.c (intern_fde): Free fde and set libdw errno when start
1271 or end could not be read.
1273 2013-08-24 Mark Wielaard <mjw@redhat.com>
1275 * dwarf_getlocation.c (store_implicit_value): Don't take data
1276 as argument, get block data from op number2. Return false when
1277 block data length and op number don't match up.
1278 (__libdw_intern_expression): Store start of block for
1279 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1280 relative data offset. Also store block start (including length)
1281 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1282 * dwarf_getlocation_attr.c: New file.
1283 * dwarf_getlocation_die.c: Likewise.
1284 * libdw.h (dwarf_getlocation_die): New function definition.
1285 (dwarf_getlocation_attr): Likewise.
1286 * libdwP.h: Declare internal dwarf_getlocation_die.
1287 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1288 dwarf_getlocation_attr.
1289 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1290 dwarf_getlocation_attr.c.
1292 2013-08-23 Mark Wielaard <mjw@redhat.com>
1294 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1295 (attr_base_address): New function.
1296 (initial_offset_base): New function.
1297 (getlocations_addr): New function. Taken from...
1298 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1300 (dwarf_getlocations): New function.
1301 * libdw.h (dwarf_getlocations): New function definition.
1302 * libdw.map (ELFUTILS_0.157): New.
1304 2013-07-02 Mark Wielaard <mjw@redhat.com>
1306 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1307 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1308 NEW_LINE macro. Free malloced line records if any at the end.
1310 2013-07-02 Mark Wielaard <mjw@redhat.com>
1312 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1314 2013-06-26 Mark Wielaard <mjw@redhat.com>
1316 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1317 DIEs without children. Return an error whenever dwarf_child or
1318 dwarf_siblingof return an error. Don't call recurse and increase
1319 the depth for an imported unit. Walk the children of an imported
1320 unit as if they are logical children of the parent root DIE.
1322 2013-05-03 Mark Wielaard <mjw@redhat.com>
1324 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1327 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1329 * libdw.map (ELFUTILS_0.156): New.
1331 2013-04-24 Mark Wielaard <mjw@redhat.com>
1333 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1335 2013-04-10 Mark Wielaard <mjw@redhat.com>
1337 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1338 equal to address size when we have a DW_FORM_ref_addr for DWARF
1341 2013-03-25 Mark Wielaard <mjw@redhat.com>
1343 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1346 2013-03-12 Mark Wielaard <mjw@redhat.com>
1348 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1349 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1351 2013-02-15 Mark Wielaard <mjw@redhat.com>
1353 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1354 not dbg->sectiondata.
1356 2013-01-07 Roland McGrath <roland@hack.frob.com>
1359 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1360 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1362 2012-12-18 Mark Wielaard <mjw@redhat.com>
1364 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1365 (check_section): Likewise on error.
1366 (scngrp_read): Likewise.
1367 (dwarf_begin_elf): Likewise.
1369 2012-10-09 Petr Machata <pmachata@redhat.com>
1371 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1372 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1373 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1374 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1376 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1378 * cfi.c: New include system.h.
1379 (execute_cfi) (enough_registers): Clear new memory after realloc.
1381 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1383 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1384 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1387 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1389 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1390 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1391 Remove the later DW_OP_call_frame_cfa push to RESULT.
1393 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1396 * fde.c (binary_search_fde): Remove always true <address >= start>
1397 conditional. Move L initialization upwards.
1399 2012-08-24 Mark Wielaard <mjw@redhat.com>
1401 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1402 when ENABLE_DWZ is defined.
1403 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1406 2012-08-16 Mark Wielaard <mjw@redhat.com>
1408 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1409 * dwarf.h (DW_LANG_Go): Update comment.
1410 (DW_LANG_Mips_Assembler): Likewise.
1412 2012-06-27 Mark Wielaard <mjw@redhat.com>
1414 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1415 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1416 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1417 (try_debugaltlink): New function.
1418 (open_debugaltlink): Likewise.
1419 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1420 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1422 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1423 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1425 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1426 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1427 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1429 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1430 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1431 (struct Dwarf): Add alt_dwarf and free_alt fields.
1432 (__libdw_read_offset): Add dbg_ret argument, use to check with
1433 __libdw_offset_in_section.
1434 (__check_build_id): New function declaration.
1435 (dwarf_begin): Define as INTDECL.
1436 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1437 and DW_FORM_GNU_strp_alt.
1439 2012-07-19 Mark Wielaard <mjw@redhat.com>
1441 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1443 2012-07-24 Mark Wielaard <mjw@redhat.com>
1445 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1446 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1449 2012-07-24 Mark Wielaard <mjw@redhat.com>
1451 * dwarf.h: Add DW_ATE_UTF.
1453 2012-06-27 Mark Wielaard <mjw@redhat.com>
1455 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1457 2012-06-26 Mark Wielaard <mjw@redhat.com>
1459 * libdwP.h: Add IDX_debug_macro.
1460 * dwarf.h: Add DW_AT_GNU_macros.
1461 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1462 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1464 2012-04-27 Mark Wielaard <mjw@redhat.com>
1466 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1467 a constant offset from DW_AT_low_pc.
1469 2012-03-19 Tom Tromey <tromey@redhat.com>
1471 * libdw_findcu.c (findcu_cb): Move earlier.
1472 (__libdw_intern_next_unit): Add new CU to search tree here...
1473 (__libdw_findcu): ... not here.
1475 2012-01-31 Mark Wielaard <mjw@redhat.com>
1477 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1479 2011-11-31 Mark Wielaard <mjw@redhat.com>
1481 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1483 2011-07-14 Mark Wielaard <mjw@redhat.com>
1485 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1487 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1489 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1490 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1493 2011-04-26 Mark Wielaard <mjw@redhat.com>
1495 * dwarf_child (dwarf_child): Sanity check end of section against
1496 cu_data () of die->cu.
1498 2011-03-22 Mark Wielaard <mjw@redhat.com>
1500 * dwarf.h: Add DW_TAG_GNU_call_site,
1501 DW_TAG_GNU_call_site_parameter,
1502 DW_AT_GNU_call_site_value,
1503 DW_AT_GNU_call_site_data_value,
1504 DW_AT_GNU_call_site_target,
1505 DW_AT_GNU_call_site_target_clobbered,
1506 DW_AT_GNU_tail_call,
1507 DW_AT_GNU_all_tail_call_sites,
1508 DW_AT_GNU_all_call_sites,
1509 DW_AT_GNU_all_source_call_sites,
1510 and DW_OP_GNU_entry_value.
1512 2011-03-10 Petr Machata <pmachata@redhat.com>
1514 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1515 abbreviation with code 0.
1517 2011-03-09 Petr Machata <pmachata@redhat.com>
1519 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1521 2011-02-23 Roland McGrath <roland@redhat.com>
1523 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1524 Declare __libdw_free_zdata.
1525 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1526 (dwarf_end): Call it.
1528 * dwarf_begin_elf.c (valid_p): Likewise.
1529 (check_section, scngrp_read): Likewise.
1530 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1532 2010-10-13 Roland McGrath <roland@redhat.com>
1534 * dwarf.h: Add DW_LANG_Go.
1536 2010-10-05 Roland McGrath <roland@redhat.com>
1538 * dwarf_getaranges.c: Use malloc rather than alloca,
1539 since the total number of elements can be quite huge.
1541 2010-07-26 Roland McGrath <roland@redhat.com>
1543 * dwarf_getlocation_implicit_pointer.c: New file.
1544 * Makefile.am (libdw_a_SOURCES): Add it.
1545 * libdw.map (ELFUTILS_0.149): New set.
1546 Add dwarf_getlocation_implicit_pointer.
1547 * libdw.h: Declare it.
1549 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1550 (dwarf_offdie, dwarf_offdie_types): Update callers.
1551 * libdwP.h: Declare it.
1553 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1554 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1556 2010-08-24 Roland McGrath <roland@redhat.com>
1558 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1560 2010-07-27 Roland McGrath <roland@redhat.com>
1562 * dwarf_formref_die.c: Fix sig8 hash insertion.
1564 2010-06-23 Roland McGrath <roland@redhat.com>
1566 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1567 * libdw.h: Remove it.
1568 * libdw.map: Likewise.
1570 2010-06-22 Roland McGrath <roland@redhat.com>
1572 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1574 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1577 2010-06-21 Roland McGrath <roland@redhat.com>
1579 * dwarf.h: Add DW_TAG_GNU_* constants.
1581 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1584 2010-06-20 Roland McGrath <roland@redhat.com>
1586 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1587 to search TUs instead of CUs.
1588 * libdwP.h: Update decl.
1589 (struct Dwarf): New member tu_tree.
1590 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1591 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1592 (dwarf_offdie): ... here.
1593 (dwarf_offdie_types): New function.
1594 * libdw.h: Declare it.
1595 * libdw.map (ELFUTILS_0.148): Add it.
1597 * libdwP.h (CUDIE): Use cu_data.
1598 * dwarf_formblock.c: Likewise.
1599 * dwarf_formref_die.c: Likewise.
1600 * dwarf_diecu.c: Use CUDIE macro.
1601 * dwarf_formaddr.c: Use cu_sec_idx.
1603 2010-06-16 Roland McGrath <roland@redhat.com>
1605 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1606 we don't repeat a CU lookup we've already done. Handle
1607 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1609 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1611 (__libdw_findcu): ... here. Call it.
1612 * libdwP.h: Declare it.
1613 (struct Dwarf): New member next_tu_offset.
1615 * dwarf_sig8_hash.c: New file.
1616 * dwarf_sig8_hash.h: New file.
1617 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1618 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1620 * libdwP.h (struct Dwarf): New member sig8_hash.
1621 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1622 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1624 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1625 (dwarf_nextcu): ... here. Call it.
1626 * libdw.h: Declare it.
1627 * libdwP.h: Add INTDECL.
1628 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1629 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1631 * libdwP.h (cu_sec_idx, cu_data): New functions.
1632 Use .debug_types when CU is a TU.
1633 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1634 * dwarf_siblingof.c: Likewise.
1635 * dwarf_formstring.c: Likewise.
1636 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1637 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1638 (dwarf_getlocation_addr): Likewise.
1640 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1641 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1642 .debug_types header size instead of .debug_info header size.
1644 * dwarf_diecu.c: Update caller.
1645 * dwarf_getaranges.c: Likewise.
1646 * dwarf_nextcu.c: Likewise.
1647 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1649 * fde.c (fde_by_offset): Renamed to ...
1650 (__libdw_fde_by_offset): ... this, made global and internal_function.
1651 Don't take ADDRESS argument.
1652 (__libdw_find_fde): Update caller. Do address sanity check here.
1653 * cfi.h: Declare __libdw_fde_by_offset.
1654 * cfi.c (dwarf_cfi_validate_fde): New function.
1655 * libdw.h: Declare it.
1656 * libdw.map (ELFUTILS_0.148): Add it.
1658 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1659 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1661 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1662 Don't assume DW_EH_PE_aligned refers to native address size.
1664 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1667 2010-06-17 Roland McGrath <roland@redhat.com>
1669 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1671 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1672 into an inner inline function. Set new fields. Check all fields for
1673 overflow when setting.
1674 * dwarf_lineisa.c: New file.
1675 * dwarf_linediscriminator.c: New file.
1676 * dwarf_lineop_index.c: New file.
1677 * Makefile.am (libdw_a_SOURCES): Add them.
1678 * libdw.map (ELFUTILS_0.148): Add them.
1679 * libdw.h: Declare them.
1681 2010-06-16 Roland McGrath <roland@redhat.com>
1683 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1685 * fde.c (fde_by_offset): Renamed to ...
1686 (__libdw_fde_by_offset): ... this, made global and internal_function.
1687 Don't take ADDRESS argument.
1688 (__libdw_find_fde): Update caller. Do address sanity check here.
1689 * cfi.h: Declare __libdw_fde_by_offset.
1690 * cfi.c (dwarf_cfi_validate_fde): New function.
1691 * libdw.h: Declare it.
1692 * libdw.map (ELFUTILS_0.148): Add it.
1694 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1695 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1697 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1698 Don't assume DW_EH_PE_aligned refers to native address size.
1700 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1703 2010-06-15 Roland McGrath <roland@redhat.com>
1705 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1707 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1708 here, since we don't support it yet.
1710 * dwarf_next_cfi.c: Handle version 4 format.
1712 * dwarf_getsrclines.c: Handle version 4 format.
1714 2010-06-01 Roland McGrath <roland@redhat.com>
1716 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1717 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1719 * libdwP.h (CIE_VERSION): Remove unused macro.
1721 * dwarf_getsrclines.c: Fix version field test.
1722 * libdwP.h (DWARF_VERSION): Remove useless macro.
1724 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1726 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1728 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1730 2010-05-31 Mark Wielaard <mjw@redhat.com>
1732 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1733 * libdw.h (dwarf_cfi_cie_p): ... here.
1735 2010-05-31 Mark Wielaard <mjw@redhat.com>
1737 * dwarf.h: Fix DW_LANG_Python constant.
1739 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1741 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1744 2010-05-27 Roland McGrath <roland@redhat.com>
1746 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1747 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1749 2010-05-08 Roland McGrath <roland@redhat.com>
1751 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1752 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1753 (getlocation): Update caller.
1754 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1755 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1756 * libdwP.h: Update decl.
1758 2010-04-26 Roland McGrath <roland@redhat.com>
1760 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1761 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1762 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1763 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1765 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1766 Prepend DW_OP_call_frame_cfa if true.
1767 (getlocation): Update caller.
1768 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1769 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1770 * libdwP.h: Update decl.
1772 2010-04-22 Roland McGrath <roland@redhat.com>
1774 * cfi.c (execute_cfi): Never return without cleanup.
1776 (cie_cache_initial_state): Adjust caller to expect that free.
1777 (__libdw_frame_at_address): Likewise.
1779 2010-03-10 Roland McGrath <roland@redhat.com>
1781 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1783 2010-02-15 Roland McGrath <roland@redhat.com>
1785 * Makefile.am: Use config/eu.am for common stuff.
1787 2010-02-02 Mark Wielaard <mjw@redhat.com>
1789 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1791 2010-01-07 Roland McGrath <roland@redhat.com>
1793 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1795 2010-01-05 Roland McGrath <roland@redhat.com>
1797 * dwarf_aggregate_size.c: New file.
1798 * Makefile.am (libdw_a_SOURCES): Add it.
1799 * libdw.h: Declare it.
1800 * libdwP.h: Add INTDECL.
1801 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1803 * dwarf_srclang.c: Add INTDEF.
1804 * libdwP.h: Add INTDECL.
1806 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1808 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1810 2009-11-21 Roland McGrath <roland@redhat.com>
1812 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1815 2009-10-15 Roland McGrath <roland@redhat.com>
1817 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1818 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1820 2009-09-17 Roland McGrath <roland@redhat.com>
1822 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1823 argument a pointer to const.
1824 * libdw.h: Update decl.
1826 2009-09-10 Roland McGrath <roland@redhat.com>
1828 * dwarf_getlocation.c (store_implicit_value): New function.
1829 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1830 (dwarf_getlocation_implicit_value): New function.
1831 * libdw.h: Declare it.
1832 * libdw.map (ELFUTILS_0.143): Add it.
1834 2009-09-09 Mark Wielaard <mjw@redhat.com>
1836 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1838 2009-08-21 Josh Stone <jistone@redhat.com>
1840 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1842 2009-08-10 Roland McGrath <roland@redhat.com>
1844 * dwarf_getscopevar.c: Use dwarf_diename.
1846 2009-08-09 Roland McGrath <roland@redhat.com>
1848 * libdw.map (ELFUTILS_0.143): New version set,
1849 inherits from ELFUTILS_0.142.
1850 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1851 alias in the ELFUTILS_0.122 version set and the default in the new set.
1852 * dwarf_srclang.c: Likewise.
1853 * dwarf_decl_file.c: Likewise.
1854 * dwarf_decl_line.c: Likewise.
1855 * dwarf_decl_column.c: Likewise.
1856 * dwarf_bytesize.c: Likewise.
1857 * dwarf_bitsize.c: Likewise.
1858 * dwarf_bitoffset.c: Likewise.
1860 2009-08-07 Roland McGrath <roland@redhat.com>
1862 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1863 * dwarf_srclang.c: Likewise.
1864 * dwarf_decl_file.c: Likewise.
1865 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1866 * dwarf_bytesize.c: Likewise.
1867 * dwarf_bitsize.c: Likewise.
1868 * dwarf_bitoffset.c: Likewise.
1870 2009-07-22 Roland McGrath <roland@redhat.com>
1872 * dwarf_frame_cfa.c: Change calling convention.
1873 * libdw.h: Update decl.
1875 * dwarf_frame_register.c: Change calling/return-value convention for
1876 value-only results and undefined/same_value.
1877 * libdw.h: Update decl.
1879 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1880 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1881 return that value instead.
1882 (getlocation): Update caller.
1883 * dwarf_frame_cfa.c: Likewise.
1884 * libdwP.h: Update decl.
1886 2009-07-21 Roland McGrath <roland@redhat.com>
1888 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1889 Fix loop iteration after skipping a bogus or useless CU.
1891 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1892 absence, not DWARF_E_NO_DEBUG_LINE.
1894 2009-07-20 Roland McGrath <roland@redhat.com>
1896 * dwarf_getlocation.c (__libdw_intern_expression):
1897 Handle DW_OP_stack_value.
1899 2009-07-16 Roland McGrath <roland@redhat.com>
1901 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1902 reject others when CU's version > 3.
1904 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1906 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1907 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1908 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1909 and DW_AT_const_expr.
1910 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1911 and DW_FORM_ref_sig8.
1913 2009-07-15 Roland McGrath <roland@redhat.com>
1915 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1916 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1918 2009-07-13 Roland McGrath <roland@redhat.com>
1920 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1922 2009-07-08 Roland McGrath <roland@redhat.com>
1924 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1927 * libdwP.h (struct Dwarf): Add member `cfi'.
1928 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1929 * dwarf_getcfi.c: New file.
1930 * dwarf_getcfi_elf.c: New file.
1931 * dwarf_cfi_end.c: New file.
1932 * dwarf_cfi_addrframe.c: New file.
1933 * dwarf_frame_cfa.c: New file.
1934 * dwarf_frame_register.c: New file.
1935 * dwarf_frame_return_address_register.c: New file.
1936 * Makefile.am (libdw_a_SOURCES): Add them.
1937 * unwind.h: Declare those functions.
1938 * libdw.map (ELFUTILS_0.142): Export them.
1940 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1942 (getlocation): ... here, call it.
1943 * libdwP.h: Declare it.
1947 * frame-cache.c: New file.
1950 * encoded-value.h: New file.
1951 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1952 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1953 * dwarf_error.c (errmsgs): Add element for it.
1955 * dwarf_next_cfi.c: New file.
1956 * Makefile.am (libdw_a_SOURCES): Add it.
1957 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1958 Declare dwarf_next_cfi.
1959 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1962 * memory-access.h [! ALLOW_UNALIGNED]
1963 (read_2ubyte_unaligned): Renamed to ...
1964 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1965 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1966 (read_2sbyte_unaligned): Likewise.
1967 (read_4ubyte_unaligned): Likewise.
1968 (read_4sbyte_unaligned): Likewise.
1969 (read_8ubyte_unaligned): Likewise.
1970 (read_8sbyte_unaligned): Likewise.
1972 * libdwP.h (IDX_eh_frame): Remove it.
1973 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1975 2009-07-08 Roland McGrath <roland@redhat.com>
1977 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1979 * dwarf_getlocation.c (check_constant_offset): New function.
1980 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1981 handle DW_AT_data_member_location of data[48] as constant offset.
1983 2009-06-18 Roland McGrath <roland@redhat.com>
1985 * libdwP.h (__libdw_read_address_inc): Constify.
1986 (__libdw_read_offset_inc): Likewise.
1987 * dwarf_getaranges.c: Likewise.
1988 * dwarf_getlocation.c: Likewise.
1989 * dwarf_getsrclines.c: Likewise.
1990 * dwarf_nextcu.c: Likewise.
1992 2009-05-05 Petr Machata <pmachata@redhat.com>
1994 * libdwP.h (__libdw_formptr): Declare new function.
1995 * dwarf_formudata.c: Implement it here.
1996 * dwarf_getlocation.c (dwarf_getlocation_addr):
1997 Call it instead of hand-rolled offset handling code.
1998 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1999 * dwarf_ranges.c (dwarf_ranges): Likewise.
2001 2009-05-04 Petr Machata <pmachata@redhat.com>
2003 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
2004 * dwarf_ranges.c: Implement it here.
2005 (dwarf_ranges): Call it.
2006 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
2008 2009-04-23 Petr Machata <pmachata@redhat.com>
2010 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
2011 of read_*ubyte_unaligned.
2012 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
2013 * dwarf_formstring.c (dwarf_formstring): Likewise.
2014 * dwarf_formudate.c (dwarf_formudata): Likewise.
2015 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
2016 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
2017 * dwarf_getpubnames.c (get_offsets): Likewise.
2018 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
2020 2009-04-23 Petr Machata <pmachata@redhat.com>
2022 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
2023 __libdw_read_addr, __libdw_read_off): Add four new internal
2026 2009-05-07 Roland McGrath <roland@redhat.com>
2028 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
2029 return value and OFFSET argument, not CU-relative. Only fetch the
2030 attribute data when called with OFFSET of 0.
2032 2009-05-07 Petr Machata <pmachata@redhat.com>
2034 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
2035 DW_AT_macro_info attribute of CU DIE.
2037 2009-04-15 Roland McGrath <roland@redhat.com>
2039 * dwarf.h (DW_CIE_ID): Removed.
2040 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
2042 2009-04-01 Roland McGrath <roland@redhat.com>
2044 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
2046 2009-01-28 Roland McGrath <roland@redhat.com>
2048 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
2049 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
2051 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
2053 2009-01-26 Roland McGrath <roland@redhat.com>
2055 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
2057 2009-01-25 Roland McGrath <roland@redhat.com>
2059 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
2061 2009-01-23 Roland McGrath <roland@redhat.com>
2063 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
2064 Put these rules under if MAINTAINER_MODE.
2066 2009-01-22 Roland McGrath <roland@redhat.com>
2068 * dwarf.h: Add DW_OP_GNU_encoded_addr.
2070 2009-01-21 Roland McGrath <roland@redhat.com>
2072 * Makefile.am (CLEANFILES): Renamed to ...
2073 (MOSTLYCLEANFILES): ... here.
2074 (CLEANFILES): New variable, add known-dwarf.h.
2076 2009-01-17 Roland McGrath <roland@redhat.com>
2078 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
2079 Make it unconditional.
2080 (BUILT_SOURCES): Updated.
2082 * dwarf.h: Add description comments for DW_LANG_* values.
2084 * Makefile.am [MAINTAINER_MODE]
2085 ($(srcdir)/known-dwarf.h): New target.
2086 (BUILT_SOURCES): Add it.
2088 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
2090 2009-01-10 Ulrich Drepper <drepper@redhat.com>
2092 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
2094 2009-01-08 Roland McGrath <roland@redhat.com>
2096 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2098 2008-01-06 Roland McGrath <roland@redhat.com>
2100 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2102 * dwarf_haschildren.c: Return -1 for error case, not 0.
2104 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2106 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2108 * dwarf.h: Add definition for unwind and call frame information.
2110 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2111 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2113 2008-08-15 Roland McGrath <roland@redhat.com>
2115 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2116 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2118 2008-01-21 Ulrich Drepper <drepper@redhat.com>
2120 * dwarf_child.c: Minor optimizations.
2121 * dwarf_getattrs.c: Likewise.
2122 * dwarf_getpubnames.c: Likewise.
2123 * dwarf_siblingof.c: Likewise.
2124 * dwarf_tag.c: Likewise.
2126 2008-01-18 Ulrich Drepper <drepper@redhat.com>
2128 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2129 of DWARF_VERSION comparison, just fail if the file's version is newer.
2131 2008-01-17 Nick Clifton <nickc@redhat.com>
2133 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2134 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2135 (DWARF3_LENGTH_64_BIT): New define.
2136 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2137 * dwarf_getpubnames: Include dwarf.h.
2138 (get_offsets): Use the new definitions.
2139 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2140 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2141 (dwarf_nextcu): Use the new definitions.
2143 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2144 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2145 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2146 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2148 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2151 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2153 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2154 Set the address in the return structure to the address of the next
2155 non-sibling die, if there is no sibling and the return pointer is
2156 not the same as the die pointer.
2157 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2159 * dwarf_child.c: Fix typo in comment.
2161 * libdwP.h (DWARF_VERSION): Change to 3.
2163 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2164 not have a initialised valp pointer.
2166 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2167 the end of the attributes is reached. When the callback fails,
2168 return the address of the failing attribute, not the address of
2170 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2172 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2173 (dwarf_child): Likewise.
2174 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2175 (dwarf_tag): Likewise.
2177 2008-01-08 Roland McGrath <roland@redhat.com>
2179 * Makefile.am (euinclude): Variable removed.
2180 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2181 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
2183 2007-10-17 Roland McGrath <roland@redhat.com>
2185 * libdw.h (__deprecated_attribute__): New macro.
2186 (dwarf_formref): Mark it deprecated.
2187 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2188 (dwarf_formref): ... here. Call it. Remove INTDEF.
2189 * libdwP.h: Remove INTDECL.
2190 Declare __libdw_formref.
2191 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2192 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2194 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2195 needs to check CU->version.
2197 * libdwP.h (struct Dwarf_CU): New member `version'.
2198 * libdw_findcu.c (__libdw_findcu): Initialize it.
2200 * dwarf_child.c: Return 1 for null entry as first child.
2202 2007-10-05 Roland McGrath <roland@redhat.com>
2204 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2206 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2207 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2209 2007-10-03 Roland McGrath <roland@redhat.com>
2211 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2212 and dwfl_build_id_find_debuginfo.
2214 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2215 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2217 2007-10-02 Roland McGrath <roland@redhat.com>
2219 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2222 2007-08-07 Roland McGrath <roland@redhat.com>
2224 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2225 error code is DWARF_E_NOERROR (0).
2227 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2228 Fix typo in __libdw_visit_scopes argument.
2230 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2231 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2233 2007-07-03 Roland McGrath <roland@redhat.com>
2235 * libdw.h (__extern_inline): New macro.
2236 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2238 2007-04-16 Roland McGrath <roland@redhat.com>
2240 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2242 2007-04-05 Roland McGrath <roland@redhat.com>
2244 * dwarf_getsrcdirs.c: New file.
2245 * Makefile.am (libdw_a_SOURCES): Add it.
2246 * libdw.h: Declare dwarf_getsrcdirs.
2247 * libdw.map (ELFUTILS_0.127): Add it.
2249 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2250 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2251 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2252 Save DIRARRAY in the Dwarf_Files.
2254 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
2255 address to check for all-ones base address entry. Check directly.
2256 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2258 2007-03-25 Roland McGrath <roland@redhat.com>
2260 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2261 Return NULL when freeing RESULT on error.
2262 (global_read, scngrp_read): Check return value from check_section,
2263 break out of loop after it has freed RESULT.
2264 (valid_p): Handle null argument.
2266 2007-03-12 Roland McGrath <roland@redhat.com>
2268 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2270 2007-03-04 Roland McGrath <roland@redhat.com>
2272 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2273 ELFUTILS_0.126. Add dwfl_module_addrsym.
2275 2007-02-10 Roland McGrath <roland@redhat.com>
2277 * dwarf.h (DW_OP_fbreg): Comment fix.
2279 2007-02-03 Roland McGrath <roland@redhat.com>
2281 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2282 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2283 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2284 exported in the past.
2286 2006-12-17 Roland McGrath <roland@redhat.com>
2288 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2289 address when the CU is missing attributes due to buggy GCC.
2291 2006-08-29 Roland McGrath <roland@redhat.com>
2293 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2295 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2296 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2298 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2299 result is aligned. Adjust NEWP->remaining here for this allocation.
2300 * libdwP.h: Update decl.
2301 (libdw_alloc): Update caller.
2303 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2305 * dwarf_child.c: Adjust for internal_function_def removal.
2306 * dwarf_getabbrev.c: Likewise.
2307 * dwarf_tag.c: Likewise.
2308 * libdw_form.c: Likewise.
2309 * memory-access.c: Likewise.
2311 2006-06-28 Roland McGrath <roland@redhat.com>
2313 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2315 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2318 2006-05-27 Ulrich Drepper <drepper@redhat.com>
2320 * libdw.h: Add extern "C".
2322 2006-05-22 Ulrich Drepper <drepper@redhat.com>
2324 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2325 aranges information.
2327 2006-05-21 Ulrich Drepper <drepper@redhat.com>
2329 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2332 2006-02-28 Roland McGrath <roland@redhat.com>
2334 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2335 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2336 values from DWARF 3.0.
2338 2006-02-22 Roland McGrath <roland@redhat.com>
2340 * libdw.map: Bump to 0.120; export dwfl_version.
2342 2005-12-22 Roland McGrath <roland@redhat.com>
2344 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2346 2005-12-12 Roland McGrath <roland@redhat.com>
2348 * dwarf_ranges.c: Copy CU base address-finding code from
2351 2005-12-09 Roland McGrath <roland@redhat.com>
2353 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2354 Delay CU base lookup until it's needed.
2355 If CU base lookup fails with no error, flag invalid DWARF.
2357 2005-11-25 Roland McGrath <roland@redhat.com>
2359 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2361 2005-11-15 Roland McGrath <roland@redhat.com>
2363 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2365 2005-11-13 Roland McGrath <roland@redhat.com>
2367 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2369 2005-10-27 Roland McGrath <roland@redhat.com>
2371 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2372 don't match end_sequence markers.
2374 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2375 before normal records at the same address.
2376 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2379 2005-10-26 Roland McGrath <roland@redhat.com>
2381 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2382 * dwarf_func_file.c: Renamed to ...
2383 * dwarf_decl_file.c: ... here.
2384 * dwarf_func_col.c: Renamed to ...
2385 * dwarf_decl_column.c: ... here.
2386 * dwarf_func_line.c: Renamed to ...
2387 * dwarf_decl_line.c: ... here.
2388 (dwarf_func_line): Renamed to ...
2389 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2390 (__libdw_func_intval): Renamed __libdw_attr_intval.
2391 * dwarf_func_name.c: File removed.
2392 * dwarf_func_lowpc.c: File removed.
2393 * dwarf_func_highpc.c: File removed.
2394 * dwarf_func_entrypc.c: File removed.
2395 * dwarf_func_die.c: File removed.
2396 * Makefile.am (libdw_a_SOURCES): Updated.
2397 * libdw.h: Update decls.
2398 (Dwarf_Func): Type removed.
2399 * libdwP.h: Update decls.
2400 (struct Dwarf_Func_s): Type removed.
2401 * libdw.map: Updated.
2403 * libdwP.h (CUDIE): New macro.
2404 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2405 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2406 * dwarf_ranges.c (dwarf_ranges): Likewise.
2408 * dwarf_getloclist.c: Renamed to ...
2409 * dwarf_getlocation.c: ... here.
2410 (getloclist): Renamed to getlocation.
2411 (dwarf_getloclist): Renamed to dwarf_getlocation.
2412 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2413 * Makefile.am (libdw_a_SOURCES): Updated.
2414 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2415 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2416 (Dwarf_Loc): Renamed Dwarf_Op.
2417 * libdwP.h (struct loc_s): Update use.
2418 * libdw.map: Update map.
2420 * dwarf_entry_breakpoints.c: Use the second line record within the
2421 function, regardless of its source location data.
2423 2005-10-25 Roland McGrath <roland@redhat.com>
2425 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2427 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2429 2005-10-14 Roland McGrath <roland@redhat.com>
2431 * dwarf_diecu.c (dwarf_diecu): New file.
2432 * Makefile.am (libdw_a_SOURCES): Add it.
2433 * libdw.h: Declare dwarf_diecu.
2434 * libdw.map: Export it.
2436 * libdw.map: Bump to 0.116; export dwarf_ranges.
2438 2005-09-20 Roland McGrath <roland@redhat.com>
2440 * dwarf_haspc.c: Use dwarf_ranges.
2441 * dwarf_entry_breakpoints.c: Likewise.
2443 * dwarf_ranges.c: New file.
2444 * Makefile.am (libdw_a_SOURCES): Add it.
2445 * libdw.h: Declare dwarf_ranges.
2446 * libdwP.h: Add INTDECL.
2448 2005-09-14 Roland McGrath <roland@redhat.com>
2450 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2451 prologue_end marker scanning loop.
2453 2005-09-11 Roland McGrath <roland@redhat.com>
2455 * dwarf.h: Comment typo fix.
2457 2005-09-07 Roland McGrath <roland@redhat.com>
2459 * dwarf_entry_breakpoints.c: New file.
2460 * Makefile.am (libdw_a_SOURCES): Add it.
2461 * libdw.h: Declare dwarf_entry_breakpoints.
2463 * dwarf_entrypc.c: New file.
2464 * Makefile.am (libdw_a_SOURCES): Add it.
2465 * libdw.h: Declare dwarf_entrypc.
2466 * libdwP.h: Add INTDECL.
2468 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2470 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2471 (%.os): Use COMPILE.os.
2472 (COMPILE.os): Filter out gconv options.
2474 2005-08-27 Roland McGrath <roland@redhat.com>
2476 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2477 __libdw_visit_scopes.
2479 * dwarf_getscopes_die.c: New file.
2480 * Makefile.am (libdw_a_SOURCES): Add it.
2481 * libdw.h: Declare dwarf_getscopes_die.
2482 * libdw.map: Bump to 0.115 and add it.
2484 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2485 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2486 Take two functions for both preorder and postorder visitors.
2487 * libdwP.h: Update decl.
2488 (struct Dwarf_Die_Chain): New type.
2489 * dwarf_func_inline.c: Update uses.
2491 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2493 * libdwP.h: Add INTDECL.
2494 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2496 2005-08-23 Roland McGrath <roland@redhat.com>
2498 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2499 DW_AT_specification the same as DW_AT_abstract_origin.
2501 2005-08-20 Roland McGrath <roland@redhat.com>
2503 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2504 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2505 and dwfl_report_offline.
2507 2005-08-19 Roland McGrath <roland@redhat.com>
2509 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2510 Add dwfl_module_relocate_address, dwfl_module_relocations,
2511 dwfl_module_relocation_info.
2513 2005-08-18 Roland McGrath <roland@redhat.com>
2515 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2516 outermost scope in the results.
2518 2005-08-15 Roland McGrath <roland@redhat.com>
2520 * dwarf_func_inline.c: New file.
2521 * Makefile.am (libdw_a_SOURCES): Add it.
2522 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2523 * libdw.map: Add them.
2525 * dwarf_func_die.c: New file.
2526 * Makefile.am (libdw_a_SOURCES): Add it.
2527 * libdw.h: Declare dwarf_func_die.
2528 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2530 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2532 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2533 of DW_LNS_set_epilog_begin.
2535 2005-08-09 Roland McGrath <roland@redhat.com>
2537 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2539 * dwarf_end.c: Add INTDEF.
2540 * dwarf_error.c (dwarf_errmsg): Likewise.
2541 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2543 2005-08-01 Roland McGrath <roland@redhat.com>
2545 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2546 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2548 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2550 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2551 (libdw_a_LIBADD): Add all files from libdwfl.a.
2553 2005-07-27 Roland McGrath <roland@redhat.com>
2555 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2556 along with ../libebl/libebl.a and ../lib/libeu.a;
2557 depend on ../libelf/libelf.so.
2558 (libdw_so_LDADD): New variable.
2559 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2561 * libdw.map: Define an empty base version and move all symbols to
2562 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2564 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2566 * dwarf_error.c: Add internal alias for dwarf_errno.
2567 * libdwP.h: Declare __dwarf_errno_internal.
2568 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2570 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2573 2005-06-01 Roland McGrath <roland@redhat.com>
2575 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2576 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2578 2005-06-08 Roland McGrath <roland@redhat.com>
2580 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2581 (get_sleb128_step, get_sleb128): Likewise.
2582 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2583 * dwarf_getloclist.c (getloclist): Likewise.
2584 * dwarf_formblock.c (dwarf_formblock): Likewise.
2585 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2586 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2587 * dwarf_formref.c (dwarf_formref): Likewise.
2588 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2589 * dwarf_formudata.c (dwarf_formudata): Likewise.
2590 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2591 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2592 * dwarf_tag.c (dwarf_tag): Likewise.
2593 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2594 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2595 * libdw_form.c (__libdw_form_val_len): Likewise.
2596 * libdwP.h: Update decl.
2598 2005-06-04 Roland McGrath <roland@redhat.com>
2600 * memory-access.h (get_uleb128_rest_return): New macro.
2601 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2602 (get_sleb128_rest_return): New macro.
2603 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2604 * memory-access.c: New file.
2605 * Makefile.am (libdw_a_SOURCES): Add it.
2606 (DEFS): Add -DIS_LIBDW.
2608 2005-05-31 Roland McGrath <roland@redhat.com>
2610 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2613 2005-05-30 Roland McGrath <roland@redhat.com>
2615 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2616 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2618 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2619 BEGIN value. Instead, match base address entries separately for
2622 2005-05-28 Roland McGrath <roland@redhat.com>
2624 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2625 past location expression contents.
2627 2005-05-23 Roland McGrath <roland@redhat.com>
2629 * dwarf_getsrclines.c: Comment typo fix.
2631 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2632 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2634 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2636 * libdwP.h: Only use INTDECL for alias prototypes.
2638 2005-05-19 Roland McGrath <roland@redhat.com>
2640 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2642 * dwarf_getscopevar.c: New file.
2643 * Makefile.am (libdw_a_SOURCES): Add it.
2644 * libdw.h: Declare dwarf_getscopevar.
2646 * dwarf_getsrcfiles.c: Add INTDEF.
2647 * dwarf_haschildren.c: Likewise.
2648 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2650 * dwarf_getscopes.c: New file.
2651 * Makefile.am (libdw_a_SOURCES): Add it.
2652 * libdw.h: Declare dwarf_getscopes.
2653 * libdw.map: Add it.
2655 2005-05-18 Roland McGrath <roland@redhat.com>
2657 * libdwP.h (IDX_debug_ranges): New enum constant.
2658 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2659 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2660 * dwarf_error.c (errmsgs): Add it.
2661 * dwarf_haspc.c: New file.
2662 * libdw.h: Declare dwarf_haspc.
2663 * libdw.map: Add it.
2664 * libdwP.h: Add INTDECL.
2666 * dwarf_attr_integrate.c: New file.
2667 * dwarf_hasattr_integrate.c: New file.
2668 * Makefile.am (libdw_a_SOURCES): Add them.
2669 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2670 * libdw.map: Add them.
2672 * dwarf_hasattr.c: Add INTDEF.
2673 * libdwP.h: Add INTDECL for it.
2675 * dwarf_formref_die.c: New file.
2676 * Makefile.am (libdw_a_SOURCES): Add it.
2677 * libdw.h (dwarf_formref_die): Declare it.
2678 * libdwP.h (dwarf_formref_die): Add INTDECL.
2679 * libdw.map: Add it.
2681 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2683 (dwarf_getloclist): ... here. Call them.
2684 (dwarf_addrloclists): New function.
2685 * libdw.h: Declare it.
2686 * libdw.map: Add it.
2688 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2689 DW_MACINFO_end_file. Recognize type 0 as terminator.
2691 2005-05-05 Roland McGrath <roland@redhat.com>
2693 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2695 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2696 the line program does not produce all entries in ascending order.
2698 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2700 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2701 occurences (e.g., inlines) better.
2703 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2705 * libdw.h (DWARF_END_ABBREV): Define.
2706 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2708 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2710 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2711 as error of __libdw_getabbrev.
2713 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2715 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2717 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2718 results back to caller.
2720 2005-04-04 Roland McGrath <roland@redhat.com>
2722 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2724 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2727 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2729 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2731 * dwarf_getsrc_file.c: New file.
2732 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2733 * libdw.h: Declare dwarf_getsrc_file.
2734 * libdw.map: Add dwarf_getsrc_file.
2736 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2738 * dwarf_func_entrypc.c: New file.
2739 * dwarf_func_col.c: New file.
2740 * dwarf_func_line.c: New file.
2741 * dwarf_func_file.c: New file.
2742 * libdw.h: Add prototypes for new functions.
2743 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2745 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2746 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2747 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2748 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2749 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2750 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2752 * dwarf.h: Add some DWARF3 definitions.
2754 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2756 * dwarf_getfuncs.c: New file.
2757 * dwarf_func_highpc.c: New file.
2758 * dwarf_func_lowpc.c: New file.
2759 * dwarf_func_name.c: New file.
2760 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2761 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2762 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2763 and dwarf_func_name.
2764 * libdw.h: Add prototypes for new functions.
2765 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2766 * dwarf_siblingof.c: Likewise.
2767 * dwarf_dieoffset.c: Likewise.
2768 * dwarf_highpc.c: Likewise.
2769 * dwarf_lowpc.c: Likewise.
2770 * libdwP.h: Add prototypes for internal functions.
2771 Define Dwarf_Func_s structure.
2773 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2775 * libdw.h: Add padding in Dwarf_die.
2777 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2778 * dwarf_attr.c: Likewise.
2779 * dwarf_begin.c: Likewise.
2780 * dwarf_begin_elf.c: Likewise.
2781 * dwarf_bitoffset.c: Likewise.
2782 * dwarf_bitsize.c: Likewise.
2783 * dwarf_bytesize.c: Likewise.
2784 * dwarf_diename.c: Likewise.
2785 * dwarf_formaddr.c: Likewise.
2786 * dwarf_formblock.c: Likewise.
2787 * dwarf_formref.c: Likewise.
2788 * dwarf_formstring.c: Likewise.
2789 * dwarf_formudata.c: Likewise.
2790 * dwarf_getarange_addr.c: Likewise.
2791 * dwarf_getarangeinfo.c: Likewise.
2792 * dwarf_getaranges.c: Likewise.
2793 * dwarf_getloclist.c: Likewise.
2794 * dwarf_getmacros.c: Likewise.
2795 * dwarf_getsrc_die.c: Likewise.
2796 * dwarf_getsrcfiles.c: Likewise.
2797 * dwarf_getsrclines.c: Likewise.
2798 * dwarf_highpc.c: Likewise.
2799 * dwarf_lowpc.c: Likewise.
2800 * dwarf_nextcu.c: Likewise.
2801 * dwarf_offdie.c: Likewise.
2802 * dwarf_siblingof.c: Likewise.
2803 * dwarf_srclang.c: Likewise.
2804 * dwarf_tag.c: Likewise.
2805 * libdw_findcu.c: Likewise.
2806 * libdwP.h: Add prototypes for internal functions.
2808 * dwarf_addrdie.c: New file.
2809 * dwarf_macro_opcode.c: New file.
2810 * dwarf_macro_param1.c: New file.
2811 * dwarf_macro_param2.c: New file.
2812 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2813 * libdwP.h: Remove Dwarf_Macro definition.
2814 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2815 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2816 * libdw.map: Add entries for new functions.
2818 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2820 * libdw.h: Handle broken gcc < 4.
2822 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2824 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2826 * dwarf_begin_elf.c: Fix warnings.
2827 * dwarf_dieoffset.c: Likewise.
2828 * dwarf_end.c: Likewise.
2829 * dwarf_error.c: Likewise.
2830 * dwarf_getpubnames.c: Likewise.
2832 * libdwP.h: Add new error values.
2833 * dwarf_error.c: Support new error values.
2834 * dwarf_getpubnames.c: Check parameter value.
2836 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2838 * Makefile.am: Check for text relocations in constructed DSO.
2840 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2842 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2844 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2845 checks to not read over buffer boundaries for ill-formed DWARF data.
2847 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2849 * dwarf_child.c: Make compile with gcc 4.0.
2850 * dwarf_error.c: Likewise.
2851 * dwarf_formblock.c: Likewise.
2852 * dwarf_getabbrev.c: Likewise.
2853 * dwarf_getattrs.c: Likewise.
2854 * dwarf_getsrclines.c: Likewise.
2855 * dwarf_tag.c: Likewise.
2856 * libdw_form.c: Likewise.
2858 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2860 * Makefile.am: Support building with mudflap.
2862 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2863 * dwarf_getsrclines.c: Likewise.
2864 * dwarf_memory-access.h: Likewise.
2866 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2868 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2870 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2871 Third parameter of dwarf_getsrcfiles can be NULL.
2873 * libdw.map: Add dwarf_getmacros.
2874 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2875 * dwarf_getmacros.c: New file.
2877 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2879 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2881 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2883 * dwarf_getsrclines.c:
2884 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2886 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2888 * libdwP.h (_): Use elfutils domain.
2890 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2892 * dwarf_getsrclines.c: Fix typo in comment.
2894 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2896 * Makefile.am: Support building with mudflap.
2898 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2900 * memory-access.h: Add lots of const in case a pointer passed is const.
2902 * dwarf_formflag.c: New file.
2903 * dwarf_getattrs.c: New file.
2904 * dwarf_error.c: Add new error value.
2905 * libdw.h: Add prototypes for new functions. Adjust prototype for
2907 * libdw.map: Add new functions.
2908 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2910 * libdwP.h: Add new error value.
2911 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2914 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2916 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2918 * dwarf_getarange_addr.c: New file
2919 * dwarf_getarangeinfo.c: New file.
2920 * dwarf_getaranges.c: New file.
2921 * dwarf_onerange.c: New file.
2922 * libdw.h: Declare new functions. Define Dwarf_Arange and
2924 * libdw.map: Add new functions.
2925 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2926 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2927 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2928 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2929 * dwarf_error.c: Add new message.
2931 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2933 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2934 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2935 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2936 * dwarf_error.c: Add another message.
2937 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2939 * dwarf_filesrc.c: Likewise.
2940 * dwarf_getsrcfiles.c: Likewise.
2941 * dwarf_getsrclines.c: Likewise.
2942 * dwarf_lineaddr.c: New file.
2943 * dwarf_linebeginstatement.c: New file.
2944 * dwarf_lineblock.c: New file.
2945 * dwarf_linecol.c: New file.
2946 * dwarf_lineendsequence.c: New file.
2947 * dwarf_lineepiloguebegin.c: New file.
2948 * dwarf_lineno.c: New file.
2949 * dwarf_lineprologueend.c: New file.
2950 * dwarf_onesrcline.c: New file.
2951 * dwarf_lineno.c: Change interface to store result in object pointed
2952 to by second parameter.
2953 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2954 prototype. Define Dwarf_Files and Dwarf_Lines.
2955 * libdw.map: Add new functions.
2956 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2957 * libdw_findcu.c: Don't initialize nlines field.
2959 * dwarf_siblingof: Little optimization.
2961 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2962 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2963 * libdwP.h (struct Dwarf): Add free_elf field.
2965 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2967 * dwarf_getstring.c: New file.
2968 * dwarf_offabbrev.c: New file.
2969 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2970 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2971 parameters. Don't allocate memory if not necessary and don't lookup
2972 previous results if no CU given.
2973 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2974 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2975 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2976 * libdwP.h: Change prototype for __libdw_getabbrev.
2978 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2979 returning if this is wanted.
2981 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2983 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2984 with offset_size value.
2985 * libdw.h: Adjust dwarf_nextcu prototype.
2986 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2987 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2988 member of new CU struct.
2989 * dwarf_formstring.c: Depend on offset_size not address_size for
2990 DW_FORM_strp handling.
2991 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2993 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2995 (dwarf_tag): Correctly recognize failed lookup.
2997 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2999 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
3000 * dwarf_formblock.c: New file.
3001 * dwarf_getloclist.c: Rewrite to handle a single block.
3002 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
3003 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
3004 dwarf_getloclistent declaration.
3005 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
3006 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
3007 Add locs member to struct Dwarf_CU.
3008 * libdw_fundcu.c: Initialize locs member of new CU.
3009 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
3010 Remove dwarf_getloclistent.c.
3012 2004-01-07 Ulrich Drepper <drepper@redhat.com>
3014 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
3015 * libdwP.h: Likewise.
3017 * dwarf_getloclist.c: New file.
3018 * dwarf_getloclistent.c: New file.
3019 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
3020 Declare dwarf_getloclistent and dwarf_getloclist.
3021 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
3022 * libdwP.h: Define DWARF_E_NO_LOCLIST.
3023 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
3026 * dwarf_error.c: More error messages.
3028 2004-01-06 Ulrich Drepper <drepper@redhat.com>
3030 * dwarf_getsrclines.c: Remove debugging support.
3032 * dwarf_getsrcfiles.c: New file.
3033 * dwarf_filesrc.c: New file.
3034 * libdw.h: Declare these functions. Define Dwarf_File.
3035 * libdwP.c: Adjust Dwarf_File_s definition.
3036 * libdw.map: Add these functions.
3037 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
3039 * dwarf_getsrclines.c: Initialize cu->files.
3041 2004-01-05 Ulrich Drepper <drepper@redhat.com>
3043 * libdw.h: Add more nonnull function attributes.
3045 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
3046 * dwarf_end.c (cu_free): New function.
3047 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
3048 * dwarf_error.c (errmsgs): Add new messages.
3049 * dwarf_getsrc_die.c: New file.
3050 * dwarf_getsrclines.c: New file.
3051 * dwarf_lineno.c: New file.
3052 * dwarf_linesrc.c: New file.
3053 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
3054 instead of the *_inc-less variants.
3055 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
3056 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
3057 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
3059 * libdwP.h: Add more error codes.
3060 (struct Dwarf): Remove mem_tail.next member.
3061 (Dwarf_File): Define type.
3062 (struct Dwarf_Line_s): Define type.
3063 (struct Dwarf_CU): Add lines and nlines members.
3064 (libdw_alloc): Define local variable _tail and use it.
3065 Add some function attributes.
3066 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
3067 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
3068 * memory-access.h: Add unlikely for the endian conversion paths.
3069 * Makefile.am (AM_CFLAGS): Add -std parameter.
3070 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3071 dwarf_lineno, and dwarf_linesrc.
3073 2003-08-11 Ulrich Drepper <drepper@redhat.com>
3075 * Moved to CVS archive.