1 2018-04-04 Mark Wielaard <mark@klomp.org>
3 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
4 addr_base and str_off_base.
6 2018-03-23 Mark Wielaard <mark@klomp.org>
8 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
10 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
11 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
12 (__libdw_cu_str_off_base): New function.
13 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
15 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
16 (struct Dwarf_CU): Add str_off_base field.
17 (__libdw_cu_str_off_base): New function declaration.
19 2018-03-22 Mark Wielaard <mark@klomp.org>
21 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
22 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
23 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
24 (__libdw_cu_addr_base): New function.
25 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
27 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
28 (struct Dwarf_CU): Add addr_base field.
29 (__libdw_cu_addr_base): New function definition.
30 * memory-access.h (file_byte_order): New static function.
31 (read_3ubyte_unaligned): New inline function.
33 2018-03-29 Mark Wielaard <mark@klomp.org>
35 * libdw.h (dwarf_decl_file): Extend documentation.
36 (dwarf_linesrc): Likewise.
37 (dwarf_filesrc): Likewise.
39 2018-03-06 Mark Wielaard <mark@klomp.org>
41 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
42 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
43 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
45 * dwarf_getlocation.c (__libdw_intern_expression): Handle
46 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
47 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
48 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
49 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
50 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
51 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
52 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
53 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
55 * dwarf_getlocation_implicit_pointer.c
56 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
58 2018-03-01 Mark Wielaard <mark@klomp.org>
60 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
61 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
64 2018-02-09 Mark Wielaard <mark@klomp.org>
66 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
69 2018-02-09 Mark Wielaard <mark@klomp.org>
71 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
72 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
73 * dwarf_formudata.c (dwarf_formudata): Likewise.
74 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
75 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
76 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
77 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
78 that will also return any data associated with the abbrev. Which
79 currently is only for DW_FORM_implicit_const. Based on...
80 (dwarf_getabbrevattr): ... this function. Which now just calls
81 dwarf_getabbrevattr_data.
82 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
83 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
84 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
85 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
86 function based on __libdw_get_uleb128_unchecked.
88 2018-02-08 Mark Wielaard <mark@klomp.org>
90 * dwarf.h: Add DWARF5 DW_FORMs.
91 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
92 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
93 DW_FORM_ref_sup[48] and DW_FORM_data16.
94 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
95 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
96 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
98 2018-01-30 Mark Wielaard <mark@klomp.org>
100 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
101 * dwarf_get_units.c: New file.
102 * libdw.h (dwarf_get_units): New function declaration.
103 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
105 2018-01-29 Mark Wielaard <mark@klomp.org>
107 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
108 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
109 is now called unit_idp. type_offsetp is now called subdie_offsetp.
110 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
111 and .debug_types sections for type units when type signature ref
113 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
114 __libdw_first_die_off_from_cu instead of trying by hand.
115 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
116 instead of checking type_offset by hand.
117 * dwarf_getlocation_implicit_pointer.c
118 (dwarf_getlocation_implicit_pointer): Likewise.
119 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
120 (__libdw_next_unit): New function based on dwarf_next_unit with
121 DWARF5 header support.
122 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
123 and type_sig8 to unit_id8.
124 (ISV4TU): New macro to determine whether a CU is a version 4 type
125 unit (which comes from the .debug_types section).
126 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
127 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
129 (__libdw_first_die_off_from_cu): New function that calls the above
131 (CUDIE): Use __libdw_first_die_off_from_cu.
132 (SUBDIE): New macro that provides the DIE for a CU using the
134 (__libdw_next_unit): New internal function declaration.
135 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
136 Accept DWARF version 5 headers. Setup unit_type.
137 (__libdw_findcu): Rename debug_types argument to v4_debug_types
138 argument (to indicate that we are looking in the .debug_types
139 section). Support finding the exact offset (unit header start).
141 2018-01-25 Mark Wielaard <mark@klomp.org>
143 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
144 * dwarf_die_addr_die.c: New file.
145 * libdw.h (dwarf_die_addr_die): New function declaration.
146 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
147 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
148 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
150 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
152 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
153 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
155 2018-01-22 Mark Wielaard <mark@klomp.org>
157 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
158 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
159 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
160 and alt_fd if we allocated them.
161 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
162 * dwarf_formstring.c (dwarf_formstring): Likewise.
163 * dwarf_getalt.c (__libdw_filepath): New internal function.
164 (find_debug_altlink): New static function.
165 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
167 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
169 * libdw.h (dwarf_getalt): Extend documentation.
170 (dwarf_setalt): Likewise.
171 * libdwP.h (struct Dwarf): Add alt_fd field.
172 (filepath): Declare new internal function.
174 2018-01-14 Petr Machata <pmachata@gmail.com>
176 * dwarf_formsdata.c (dwarf_formsdata):
177 <DW_FORM_data1>: Cast to signed char.
178 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
179 read_*ubyte_unaligned.
181 2017-12-26 Mark Wielaard <mark@klomp.org>
183 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
184 use bitfields for has_children and code.
185 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
186 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
188 2017-12-26 Mark Wielaard <mark@klomp.org>
190 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
191 (get_uleb128_unchecked): New define.
192 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
193 read attr name and form.
194 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
195 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
196 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
198 2017-12-28 Mark Wielaard <mark@klomp.org>
200 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
202 2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
203 Mark Wielaard <mark@klomp.org>
205 * libdwP.h (__libdw_in_section): Fix check for the upper border of
207 (__libdw_offset_in_section): Likewise.
209 2017-12-20 Mark Wielaard <mark@klomp.org>
211 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
212 (cu_sec_idx): Return cu->sec_idx.
213 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
214 IDX_debug_info or IDX_debug_types.
215 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
217 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
218 IDX_debug_macro or IDX_debug_macinfo.
220 2017-12-12 Mark Wielaard <mark@klomp.org>
222 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
223 given DIE. Reserve memory for a new DIE first.
225 2017-12-11 Dima Kogan <dima@secretsauce.net>
227 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
230 2017-11-03 Mark Wielaard <mark@klomp.org>
232 * dwarf_getlocation.c (__libdw_intern_expression): Handle
233 DW_OP_GNU_variable_value.
234 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
235 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
237 2017-11-03 Mark Wielaard <mark@klomp.org>
239 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
240 Update list of acceptable attribute codes based on DWARF5.
242 2017-11-03 Mark Wielaard <mark@klomp.org>
244 * dwarf.h: Add DW_OP_GNU_variable_value.
246 2017-10-03 Mark Wielaard <mark@klomp.org>
248 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
250 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
252 * memory-access.h: Use attribute_packed.
254 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
256 * libdwP.h: Use attribute_hidden.
257 * libdw_alloc.c: Likewise.
259 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
261 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
263 2017-07-26 Mark Wielaard <mark@klomp.org>
265 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
266 * dwarf_getmacros.c (get_table_for_offset): Accept either version
267 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
268 (read_macros): Use table version for fake_cu.
270 2017-07-26 Mark Wielaard <mark@klomp.org>
272 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
273 DW_TAG_packed_type and DW_TAG_shared_type.
274 * libdw.h (dwarf_peel_type): Extend documentation.
276 2017-07-26 Mark Wielaard <mark@klomp.org>
278 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
279 DW_DEFAULTED_out_of_class.
281 2017-07-26 Mark Wielaard <mark@klomp.org>
283 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
285 2017-07-26 Mark Wielaard <mark@klomp.org>
287 * dwarf_default_lower_bound.c: New file.
288 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
289 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
290 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
291 * libdw.h: Add dwarf_default_lower_bound.
292 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
293 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
294 dwarf_default_lower_bound INTDECL.
296 2017-07-26 Mark Wielaard <mark@klomp.org>
298 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
299 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
300 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
301 * dwarf_aggregate_size.c (array_size): Add lower bound for
302 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
303 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
304 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
305 DW_LANG_Julia and DW_LANG_BLISS.
307 2017-07-26 Mark Wielaard <mark@klomp.org>
309 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
311 2017-07-25 Mark Wielaard <mark@klomp.org>
313 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
314 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
315 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
316 for currently unused numbers.
318 2017-07-25 Mark Wielaard <mark@klomp.org>
320 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
321 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
322 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
324 2017-07-21 Mark Wielaard <mark@klomp.org>
326 * dwarf_line_file.c: New file.
327 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
328 * libdw.h (dwarf_line_file): New function declaration.
329 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
331 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
333 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
334 made of, libdw_so_DEPS for libraries it depends on (including
335 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
336 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
337 library dependencies, use libdw_so_LIBS rather than relying on the
338 order of dependencies specified, add -z,relro.
340 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
342 * libdw.h: Remove attribute macro declarations and use
343 __noreturn_attribute__ as defined in libelf.h.
345 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
347 * dwarf_begin_elf.c: Include endian.h.
349 2017-03-30 Mark Wielaard <mjw@redhat.com>
351 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
354 2016-10-22 Mark Wielaard <mjw@redhat.com>
356 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
357 * dwarf_aggregate_size.c (array_size): Use correct spelling of
360 2016-11-02 Mark Wielaard <mjw@redhat.com>
362 * cfi.c (execute_cfi): Add fallthrough comments.
363 * encoded-value.h (encoded_value_size): Add explicit return instead
364 of relying on fallthrough.
365 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
368 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
370 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
371 * libdw_alloc.c: Likewise.
373 2016-07-08 Mark Wielaard <mjw@redhat.com>
375 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
376 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
377 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
379 2016-02-13 Mark Wielaard <mjw@redhat.com>
381 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
384 2015-12-18 Mark Wielaard <mjw@redhat.com>
386 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
387 (__libdw_free_zdata): Remove.
388 * dwarf_begin_elf.c (inflate_section): Remove.
389 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
390 and elf_compress_gnu to decompress if necessary.
391 (valid_p): Remove __libdw_free_zdata calls.
392 (scngrp_read): Use elf_compress if section is compressed. Remove
393 __libdw_free_zdata calls.
394 * dwarf_end.c (__libdw_free_zdata): Remove.
395 (dwarf_end): Don't call __libdw_free_zdata.
397 2015-10-28 Mark Wielaard <mjw@redhat.com>
399 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
401 2015-12-02 Mark Wielaard <mjw@redhat.com>
403 * fde.c (intern_fde): Don't leak duplicate FDEs.
405 2015-12-01 Mark Wielaard <mjw@redhat.com>
407 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
410 2015-12-01 Mark Wielaard <mjw@redhat.com>
412 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
414 2015-10-14 Chih-Hung Hsieh <chh@google.com>
416 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
417 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
419 2015-10-14 Chih-Hung Hsieh <chh@google.com>
421 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
422 function 'walk_children' to file scope; inline 'recurse' at its call
425 2015-10-19 Mark Wielaard <mjw@redhat.com>
427 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
430 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
432 * dwarf_getsrclines.c (read_srclines): Initialize state early.
434 2015-10-13 Chih-Hung Hsieh <chh@google.com>
436 * dwarf_getsrclines.c (read_srclines): Move nested functions
437 'advance_pc' and 'add_new_line' to file scope and keep many
438 local state variables within one structure.
440 2015-10-13 Chih-Hung Hsieh <chh@google.com>
442 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
443 function 'file_matches' to file scope.
445 2015-10-16 Mark Wielaard <mjw@redhat.com>
447 * Makefile.am (libdw.so): Add -lz.
449 2015-10-14 Chih-Hung Hsieh <chh@google.com>
451 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
452 and 'require_cfa_offset' to file scope.
454 2015-10-09 Josh Stone <jistone@redhat.com>
456 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
459 2015-10-05 Josh Stone <jistone@redhat.com>
461 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
463 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
465 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
466 relocation overflows in some platforms.
468 2015-09-23 Mark Wielaard <mjw@redhat.com>
470 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
471 * dwarf_formref.c (__libdw_formref): Likewise.
472 * libdw_findcu.c (__libdw_findcu): Likewise.
473 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
475 2015-09-22 Mark Wielaard <mjw@redhat.com>
477 * *.c: Remove old-style function definitions.
479 2015-09-15 Mark Wielaard <mjw@redhat.com>
481 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
483 2015-09-09 Chih-Hung Hsieh <chh@google.com>
485 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
486 redundant NULL tests on parameters declared with __nonnull_attribute__.
487 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
488 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
490 2015-09-04 Chih-Hung Hsieh <chh@google.com>
491 Mark Wielaard <mjw@redhat.com>
493 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
494 definition with ansi-C definition and add const qualifier to
497 2015-09-04 Chih-Hung Hsieh <chh@google.com>
499 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
500 definition with ansi-C definitions.
501 (__libdw_findcu): Likewise.
503 2015-08-25 Mark Wielaard <mjw@redhat.com>
505 * dwarf.h: Add DW_LANG_Haskell.
507 2015-06-18 Mark Wielaard <mjw@redhat.com>
509 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
512 2015-06-18 Mark Wielaard <mjw@redhat.com>
514 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
516 2015-06-18 Mark Wielaard <mjw@redhat.com>
518 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
519 dwarf_formudata reports an error.
520 (get_table_for_offset): Likewise.
522 2015-06-08 Mark Wielaard <mjw@redhat.com>
524 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
526 2015-06-06 Mark Wielaard <mjw@redhat.com>
528 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
530 2015-05-27 Mark Wielaard <mjw@redhat.com>
532 * encoded-value.h (read_encoded_value): Check data d_size contains
533 at least enough data to hold a pointer for DW_EH_PE_indirect.
535 2015-05-22 Mark Wielaard <mjw@redhat.com>
537 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
538 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
539 MAX_STACK_DIRS. Calculate number of dirs needed first, then
540 create dirarray directly, without needing the next field. Free
541 not stack allocated lines and files at the end.
543 2015-05-19 Mark Wielaard <mjw@redhat.com>
545 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
546 allocated array to hold locs. Allocate locs bigger than the array
547 with malloc and free them when done.
549 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
551 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
552 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
553 * dwarf_begin_elf.c (inflate_section): New static function, lifted
555 (check_section): ... here. Call inflate_section, set libdw errno to
556 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
558 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
560 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
561 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
563 2015-05-06 Mark Wielaard <mjw@redhat.com>
565 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
566 check the line number.
568 2015-05-05 Mark Wielaard <mjw@redhat.com>
570 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
571 left before reading values.
573 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
575 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
578 2015-04-22 Mark Wielaard <mjw@redhat.com>
580 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
581 (__libdw_max_len_uleb128): New function.
582 (__libdw_max_len_sleb128): Likewise.
583 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
584 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
586 2015-04-21 Mark Wielaard <mjw@redhat.com>
588 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
589 when there are more than 8.
591 2015-04-01 Petr Machata <pmachata@redhat.com>
593 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
594 (is_cudie): New function.
595 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
596 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
597 of white-listing valid tags.
598 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
600 2015-03-18 Petr Machata <pmachata@redhat.com>
602 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
603 (EXTRA_DIST): Remove known-dwarf.h.
605 2015-02-09 Mark Wielaard <mjw@redhat.com>
607 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
608 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
609 for new Fortran language codes is 1.
611 2015-02-09 Mark Wielaard <mjw@redhat.com>
613 * dwarf.h: Add DW_TAG_atomic_type.
614 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
615 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
617 2015-02-11 Josh Stone <jistone@redhat.com>
619 * encoded-value.h (read_encoded_value): Initialize value.
621 2015-02-11 Petr Machata <pmachata@redhat.com>
623 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
624 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
625 the fact in *BASEP and bail out later if it hasn't been updated by
626 __libdw_read_begin_end_pair_inc.
628 2014-12-24 Mark Wielaard <mjw@redhat.com>
630 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
631 smaller than or equal to addr, rather than returning immediately on
634 2015-01-07 Mark Wielaard <mjw@redhat.com>
636 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
637 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
638 room in the search table for all entries. Store search_table_len.
639 (getcfi_scn_eh_frame): Likewise.
640 * encoded-value.h (encoded_value_size): Don't abort, return zero.
641 (__libdw_cfi_read_address_inc): Check there is enough room to read
642 values. Pass other byte order to read functions.
643 (read_encoded_value): Check encoded_value_size. Don't abort, but
644 set libdw errno and report failure. Check there is enough room to
646 * fde.c (binary_search_fde): Check encoded value size. Add hdr
647 data buf and size to dummy_cfi.
649 2015-01-04 Mark Wielaard <mjw@redhat.com>
651 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
652 is after current DIE.
654 2015-01-04 Mark Wielaard <mjw@redhat.com>
656 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
657 (dwarf_frame_register).
659 2015-01-02 Mark Wielaard <mjw@redhat.com>
661 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
662 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
663 (getcfi_scn_eh_frame): Check d_buf is not NULL.
665 2015-01-02 Mark Wielaard <mjw@redhat.com>
667 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
668 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
669 DW_OP_addr if dbg is NULL then read argument directly.
671 2015-01-14 Jason P. Leasure <jpleasu@super.org>
673 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
676 2014-12-27 Mark Wielaard <mjw@redhat.com>
678 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
679 still falls inside CU data.
681 2015-01-11 Mark Wielaard <mjw@redhat.com>
683 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
684 __libdw_visit_scopes with NULL imports.
685 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
686 * dwarf_getscopes.c (pc_record): Likewise.
687 (dwarf_getscopes): Likewise.
688 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
689 * libdwP.h (__libdw_visit_scopes): Add imports argument.
690 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
691 function imports_contains. Push and pop imports around walk_children
692 when processing DW_TAG_imported_unit.
694 2014-12-18 Ulrich Drepper <drepper@gmail.com>
696 * Makefile.am: Suppress output of textrel_check command.
698 2014-12-16 Mark Wielaard <mjw@redhat.com>
700 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
703 2014-12-16 Mark Wielaard <mjw@redhat.com>
705 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
706 space to read die offset.
708 2014-12-16 Mark Wielaard <mjw@redhat.com>
710 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
713 2014-12-15 Mark Wielaard <mjw@redhat.com>
715 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
716 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
717 (dwarf_getpubnames): Make sure section data contains string zero
720 2014-12-16 Mark Wielaard <mjw@redhat.com>
722 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
723 the compiler optimize for the common single-byte case.
725 2014-12-15 Josh Stone <jistone@redhat.com>
727 * memory-access.h (__libdw_max_len_leb128): New.
728 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
729 (__libdw_get_sleb128): Likewise.
731 2014-12-14 Mark Wielaard <mjw@redhat.com>
733 * cfi.c (execute_cfi): Add program bounds checks.
734 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
735 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
736 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
737 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
738 * dwarf_formudata.c (dwarf_formudata): Likewise.
739 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
740 with end of data buf.
741 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
742 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
743 call gets enough data.
744 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
745 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
747 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
749 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
750 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
751 get_uleb128 with lineendp.
752 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
753 get_uleb128 with endp.
754 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
755 get_uleb128/get_sleb128 with limit.
756 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
757 get_sleb128 get called with enough data.
758 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
759 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
760 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
762 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
763 Don't call get_uleb128_step if out of data.
764 (__libdw_get_sleb128): Likewise for get_sleb128_step.
766 2014-12-12 Mark Wielaard <mjw@redhat.com>
768 * libdwP.h (struct Dwarf): Add fake_loc_cu.
770 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
771 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
772 (__libdw_form_val_len): Likewise.
773 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
774 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
775 the already found data buffer directly.
776 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
777 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
778 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
780 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
781 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
782 * dwarf_getlocation_attr.c (attr_form_cu): New function.
783 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
784 (getlocation): Handle empty blocks immediately.
785 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
786 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
787 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
789 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
790 fake_cu. Call __libdw_form_val_len with just fake_cu.
791 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
792 datap and size directly from cu startp and endp.
794 2014-12-11 Mark Wielaard <mjw@redhat.com>
796 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
798 2014-12-13 Mark Wielaard <mjw@redhat.com>
800 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
801 difference doesn't wrap around before returning as int.
803 2014-12-11 Josh Stone <jistone@redhat.com>
805 * dwarf_getsrclines.c (struct linelist): Add sequence.
806 (compare_lines): Take linelists, and break ties by sequence.
807 (read_srclines): Use linelists for sorting.
808 (read_srclines::add_new_line): Set sequence.
810 2014-12-10 Josh Stone <jistone@redhat.com>
812 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
813 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
814 * dwarf_child.c (dwarf_child): Use cu->endp.
815 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
816 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
817 * dwarf_siblingof.c (dwarf_siblingof): Use both.
819 2014-12-10 Josh Stone <jistone@redhat.com>
821 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
823 2014-12-10 Josh Stone <jistone@redhat.com>
825 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
826 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
827 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
828 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
829 * dwarf_tag.c (dwarf_tag): Likewise.
831 2014-12-04 Mark Wielaard <mjw@redhat.com>
833 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
834 (__libdw_form_val_len): Likewise and check len doesn't overflow.
835 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
836 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
838 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
839 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
841 2014-12-02 Petr Machata <pmachata@redhat.com>
843 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
845 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
846 * libdw.h (DWARF_GETMACROS_START): New macro.
848 2014-11-27 Mark Wielaard <mjw@redhat.com>
850 * Makefile.am (libdw.so): Use textrel_check.
852 2014-11-27 Mark Wielaard <mjw@redhat.com>
854 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
855 search_table_entries and search_table_encoding.
857 2014-11-24 Mark Wielaard <mjw@redhat.com>
859 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
862 2014-11-23 Mark Wielaard <mjw@redhat.com>
864 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
865 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
866 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
868 2014-11-23 Mark Wielaard <mjw@redhat.com>
870 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
871 Set libdw errno and return NULL.
873 2014-11-24 Mark Wielaard <mjw@redhat.com>
875 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
876 (DW_LANG_C11): Likewise.
877 (DW_LANG_C_plus_plus_14): Likewise.
878 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
879 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
881 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
884 2014-11-26 Mark Wielaard <mjw@redhat.com>
886 * dwarf.h (DW_AT_noreturn): Added.
888 2014-11-11 Mark Wielaard <mjw@redhat.com>
890 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
891 explicitly as uint8_t.
892 (__libdw_getsrclines): Add internal_function to declaration.
894 2014-09-10 Petr Machata <pmachata@redhat.com>
896 * dwarf_macro_getparamcnt.c: New file.
897 * dwarf_macro_param.c: New file.
898 * dwarf_macro_getsrcfiles.c: New file.
899 * Makefile.am (libdw_a_SOURCES): Add the new files.
900 * libdwP.h (struct files_lines_s): New structure.
901 (DWARF_E_INVALID_OPCODE): New enumerator.
902 (struct Dwarf): New fields macro_ops, files_lines.
903 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
904 keeping macro opcode prototypes in.
905 (Dwarf_Macro_s): Redefine from scratch.
906 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
908 * dwarf_error.c (errmsgs): Add a message for
909 DWARF_E_INVALID_OPCODE.
910 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
912 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
913 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
915 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
916 (get_offset_from, macro_op_compare, build_table)
917 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
918 (cache_op_table, read_macros, gnu_macros_getmacros_off)
919 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
921 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
922 * dwarf_getsrclines.c (read_srclines): New function with guts
923 taken from dwarf_getsrclines.
924 (__libdw_getsrclines): Likewise.
925 (__libdw_getcompdir, files_lines_compare): New functions.
926 (dwarf_getsrclines): Make it dispatch to the new interfaces.
927 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
929 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
930 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
931 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
933 2014-10-06 Mark Wielaard <mjw@redhat.com>
935 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
936 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
937 (aggregate_size): Likewise. Add old and new version.
938 * dwarf_peel_type.c: New file.
939 * libdw.h (dwarf_peel_type): New function declaration.
940 * libdwP.h (dwarf_peel_type): New internal declaration.
941 * libdw.map (ELFUTILS_0.161): New section.
943 2014-10-15 Petr Machata <pmachata@redhat.com>
945 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
946 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
948 2014-10-05 Mark Wielaard <mjw@redhat.com>
950 * dwarf.h: Add DW_AT_GNU_deleted.
952 2014-10-02 Mark Wielaard <mjw@redhat.com>
954 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
955 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
956 DW_TAG_rvalue_reference_type.
958 2014-09-12 Petr Machata <pmachata@redhat.com>
960 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
961 8-byte quantities. Consequently, rename to...
962 (read_addr_unaligned_inc): ... this.
963 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
964 (read_sbyte_unaligned): Drop.
966 2014-09-10 Petr Machata <pmachata@redhat.com>
968 * dwarf_getlocation.c (attr_ok): Also accept
969 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
970 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
972 2014-08-15 Mark Wielaard <mjw@redhat.com>
974 * dwarf_cu_die.c: New file.
975 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
976 * libdw.h (dwarf_cu_die): New function declaration.
977 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
979 2014-08-15 Mark Wielaard <mjw@redhat.com>
981 * dwarf_cu_getdwarf.c: New file.
982 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
983 * libdw.h (Dwarf_CU): New typedef.
984 (dwarf_cu_getdwarf): New function declaration.
985 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
987 2014-06-18 Mark Wielaard <mjw@redhat.com>
989 * dwarf.h: Remove DW_TAG_mutable_type.
991 2014-05-02 Mark Wielaard <mjw@redhat.com>
993 * libdwP.h (__check_build_id): Removed now unused.
995 2014-05-01 Mark Wielaard <mjw@redhat.com>
997 * libdwP.h (struct Dwarf): Remove free_alt.
998 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
999 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1001 2014-04-30 Mark Wielaard <mjw@redhat.com>
1003 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1005 2014-04-15 Florian Weimer <fweimer@redhat.com>
1007 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1008 (open_debugaltlink): Move to libdwfl.
1009 (check_section): Do not locate alternate debuginfo.
1011 2014-04-24 Florian Weimer <fweimer@redhat.com>
1013 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1015 2014-04-22 Florian Weimer <fweimer@redhat.com>
1017 * dwarf_getalt.c, dwarf_setalt.c: New files.
1018 * Makefile.am (libdw_a_SOURCES): Add them.
1019 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1020 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1022 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1024 2014-04-15 Florian Weimer <fweimer@redhat.com>
1026 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1027 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1029 (check_section): Obtain .gnu_debugaltlink section from the
1032 2014-04-11 Mark Wielaard <mjw@redhat.com>
1034 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1035 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1036 (libdwelf_objects): New variable.
1037 (libdw_a_LIBADD): Add libdwelf objects.
1039 2014-04-22 Mark Wielaard <mjw@redhat.com>
1041 * memory-access.h (get_sleb128_step): Remove undefined behavior
1042 of left shifting a signed value. Replace it with a multiplication.
1044 2014-04-13 Mark Wielaard <mjw@redhat.com>
1046 * Makefile.am: Remove !MUDFLAP conditions.
1048 2014-04-09 Mark Wielaard <mjw@redhat.com>
1050 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1051 before calling malloc to uncompress data.
1053 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1055 Fix abort() on missing section headers.
1056 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1057 New label err to return NULL.
1059 2014-02-05 Josh Stone <jistone@redhat.com>
1061 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1062 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1063 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1065 2013-12-30 Mark Wielaard <mjw@redhat.com>
1067 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1068 dwfl_linux_proc_attach.
1070 2013-12-20 Mark Wielaard <mjw@redhat.com>
1072 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1074 2013-12-18 Mark Wielaard <mjw@redhat.com>
1076 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1077 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1078 dwfl_module_getsym_info.
1080 2013-12-16 Mark Wielaard <mjw@redhat.com>
1082 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1084 2013-12-10 Josh Stone <jistone@redhat.com>
1086 * memory-access.h (get_uleb128_rest_return): Removed.
1087 (get_sleb128_rest_return): Removed.
1088 (get_uleb128_step): Make this a self-contained block.
1089 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1090 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1091 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1092 (__libdw_get_uleb128): Simplify and inline for all callers.
1093 (__libdw_get_sleb128): Ditto.
1094 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1095 * memory-access.c: Delete file.
1096 * Makefile.am (libdw_a_SOURCES): Remove it.
1097 (DEFS): Remove the now unused -DIS_LIBDW.
1099 2013-12-09 Josh Stone <jistone@redhat.com>
1101 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1102 __libdw_form_val_len, now handling only non-constant form lengths.
1103 * libdwP.h (__libdw_form_val_len): New inlined function.
1105 2013-12-09 Mark Wielaard <mjw@redhat.com>
1107 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1108 location expressions.
1109 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1110 location found, return empty location expression.
1111 * dwarf_getlocation_implicit_pointer.c
1112 (dwarf_getlocation_implicit_pointer): Likewise.
1113 (__libdw_empty_loc_attr): New internal function.
1114 * libdwP.h (__libdw_empty_loc_attr): Define.
1116 2013-11-27 Mark Wielaard <mjw@redhat.com>
1118 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1119 dwfl_module_getsym_elf.
1121 2013-11-26 Mark Wielaard <mjw@redhat.com>
1123 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1124 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1125 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1126 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1127 (ELFUTILS_0.158): ... here.
1129 2013-11-09 Mark Wielaard <mjw@redhat.com>
1131 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1132 check that it is zero.
1134 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1136 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1137 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1138 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1139 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1140 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1142 2013-11-01 Michael Forney <mforney@mforney.org>
1144 * Makefile.am (libdwfl_objects): New definition.
1145 (libdw_a_LIBADD): Use libdwfl_objects.
1147 2013-11-01 Michael Forney <mforney@mforney.org>
1149 * Makefile.am: Use READELF.
1151 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1153 * libdw.map (ELFUTILS_0.158): New.
1155 2013-10-10 Mark Wielaard <mjw@redhat.com>
1157 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1158 start_addr and rename last_offset to last_addr. Now both void *.
1159 (tree_visitor): Use start_add and die_addr instead of start_offset
1161 (dwarf_getfuncs): Use last_addr instead of last_offset.
1163 2013-10-06 Mark Wielaard <mjw@redhat.com>
1165 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1166 DW_CFA_val_expression are not used with abi_cfi.
1168 2013-10-03 Josh Stone <jistone@redhat.com>
1170 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1171 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1172 a unit, make sure to always hash the sig8 here, so none are missed.
1174 2013-09-29 Mark Wielaard <mjw@redhat.com>
1176 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1177 uintptr_t before casting to char *.
1178 (__libdw_intern_expression): Cast data to uintptr_t before casting
1180 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1181 op->number2 to uintptr_t before casting to char *.
1183 2013-09-24 Josh Stone <jistone@redhat.com>
1185 * libdw_visit_scopes.c (classify_die): Removed.
1186 (may_have_scopes): New function to replace classify_die. There's no
1187 need for full classification; just find tags that may contain scopes.
1188 (__libdw_visit_scopes): Use a direct tag comparison for imported
1189 units, and use may_have_scopes to test if recursion is needed.
1191 2013-09-20 Mark Wielaard <mjw@redhat.com>
1193 * dwarf_getfuncs.c (visitor_info): New struct.
1194 (tree_visitor): New function.
1195 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1196 * libdw.h (dwarf_getfuncs): Expand function documentation.
1198 2013-09-12 Mark Wielaard <mjw@redhat.com>
1200 * fde.c (intern_fde): Free fde and set libdw errno when start
1201 or end could not be read.
1203 2013-08-24 Mark Wielaard <mjw@redhat.com>
1205 * dwarf_getlocation.c (store_implicit_value): Don't take data
1206 as argument, get block data from op number2. Return false when
1207 block data length and op number don't match up.
1208 (__libdw_intern_expression): Store start of block for
1209 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1210 relative data offset. Also store block start (including length)
1211 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1212 * dwarf_getlocation_attr.c: New file.
1213 * dwarf_getlocation_die.c: Likewise.
1214 * libdw.h (dwarf_getlocation_die): New function definition.
1215 (dwarf_getlocation_attr): Likewise.
1216 * libdwP.h: Declare internal dwarf_getlocation_die.
1217 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1218 dwarf_getlocation_attr.
1219 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1220 dwarf_getlocation_attr.c.
1222 2013-08-23 Mark Wielaard <mjw@redhat.com>
1224 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1225 (attr_base_address): New function.
1226 (initial_offset_base): New function.
1227 (getlocations_addr): New function. Taken from...
1228 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1230 (dwarf_getlocations): New function.
1231 * libdw.h (dwarf_getlocations): New function definition.
1232 * libdw.map (ELFUTILS_0.157): New.
1234 2013-07-02 Mark Wielaard <mjw@redhat.com>
1236 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1237 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1238 NEW_LINE macro. Free malloced line records if any at the end.
1240 2013-07-02 Mark Wielaard <mjw@redhat.com>
1242 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1244 2013-06-26 Mark Wielaard <mjw@redhat.com>
1246 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1247 DIEs without children. Return an error whenever dwarf_child or
1248 dwarf_siblingof return an error. Don't call recurse and increase
1249 the depth for an imported unit. Walk the children of an imported
1250 unit as if they are logical children of the parent root DIE.
1252 2013-05-03 Mark Wielaard <mjw@redhat.com>
1254 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1257 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1259 * libdw.map (ELFUTILS_0.156): New.
1261 2013-04-24 Mark Wielaard <mjw@redhat.com>
1263 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1265 2013-04-10 Mark Wielaard <mjw@redhat.com>
1267 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1268 equal to address size when we have a DW_FORM_ref_addr for DWARF
1271 2013-03-25 Mark Wielaard <mjw@redhat.com>
1273 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1276 2013-03-12 Mark Wielaard <mjw@redhat.com>
1278 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1279 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1281 2013-02-15 Mark Wielaard <mjw@redhat.com>
1283 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1284 not dbg->sectiondata.
1286 2013-01-07 Roland McGrath <roland@hack.frob.com>
1289 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1290 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1292 2012-12-18 Mark Wielaard <mjw@redhat.com>
1294 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1295 (check_section): Likewise on error.
1296 (scngrp_read): Likewise.
1297 (dwarf_begin_elf): Likewise.
1299 2012-10-09 Petr Machata <pmachata@redhat.com>
1301 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1302 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1303 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1304 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1306 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1308 * cfi.c: New include system.h.
1309 (execute_cfi) (enough_registers): Clear new memory after realloc.
1311 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1313 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1314 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1317 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1319 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1320 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1321 Remove the later DW_OP_call_frame_cfa push to RESULT.
1323 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1326 * fde.c (binary_search_fde): Remove always true <address >= start>
1327 conditional. Move L initialization upwards.
1329 2012-08-24 Mark Wielaard <mjw@redhat.com>
1331 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1332 when ENABLE_DWZ is defined.
1333 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1336 2012-08-16 Mark Wielaard <mjw@redhat.com>
1338 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1339 * dwarf.h (DW_LANG_Go): Update comment.
1340 (DW_LANG_Mips_Assembler): Likewise.
1342 2012-06-27 Mark Wielaard <mjw@redhat.com>
1344 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1345 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1346 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1347 (try_debugaltlink): New function.
1348 (open_debugaltlink): Likewise.
1349 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1350 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1352 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1353 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1355 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1356 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1357 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1359 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1360 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1361 (struct Dwarf): Add alt_dwarf and free_alt fields.
1362 (__libdw_read_offset): Add dbg_ret argument, use to check with
1363 __libdw_offset_in_section.
1364 (__check_build_id): New function declaration.
1365 (dwarf_begin): Define as INTDECL.
1366 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1367 and DW_FORM_GNU_strp_alt.
1369 2012-07-19 Mark Wielaard <mjw@redhat.com>
1371 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1373 2012-07-24 Mark Wielaard <mjw@redhat.com>
1375 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1376 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1379 2012-07-24 Mark Wielaard <mjw@redhat.com>
1381 * dwarf.h: Add DW_ATE_UTF.
1383 2012-06-27 Mark Wielaard <mjw@redhat.com>
1385 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1387 2012-06-26 Mark Wielaard <mjw@redhat.com>
1389 * libdwP.h: Add IDX_debug_macro.
1390 * dwarf.h: Add DW_AT_GNU_macros.
1391 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1392 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1394 2012-04-27 Mark Wielaard <mjw@redhat.com>
1396 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1397 a constant offset from DW_AT_low_pc.
1399 2012-03-19 Tom Tromey <tromey@redhat.com>
1401 * libdw_findcu.c (findcu_cb): Move earlier.
1402 (__libdw_intern_next_unit): Add new CU to search tree here...
1403 (__libdw_findcu): ... not here.
1405 2012-01-31 Mark Wielaard <mjw@redhat.com>
1407 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1409 2011-11-31 Mark Wielaard <mjw@redhat.com>
1411 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1413 2011-07-14 Mark Wielaard <mjw@redhat.com>
1415 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1417 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1419 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1420 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1423 2011-04-26 Mark Wielaard <mjw@redhat.com>
1425 * dwarf_child (dwarf_child): Sanity check end of section against
1426 cu_data () of die->cu.
1428 2011-03-22 Mark Wielaard <mjw@redhat.com>
1430 * dwarf.h: Add DW_TAG_GNU_call_site,
1431 DW_TAG_GNU_call_site_parameter,
1432 DW_AT_GNU_call_site_value,
1433 DW_AT_GNU_call_site_data_value,
1434 DW_AT_GNU_call_site_target,
1435 DW_AT_GNU_call_site_target_clobbered,
1436 DW_AT_GNU_tail_call,
1437 DW_AT_GNU_all_tail_call_sites,
1438 DW_AT_GNU_all_call_sites,
1439 DW_AT_GNU_all_source_call_sites,
1440 and DW_OP_GNU_entry_value.
1442 2011-03-10 Petr Machata <pmachata@redhat.com>
1444 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1445 abbreviation with code 0.
1447 2011-03-09 Petr Machata <pmachata@redhat.com>
1449 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1451 2011-02-23 Roland McGrath <roland@redhat.com>
1453 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1454 Declare __libdw_free_zdata.
1455 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1456 (dwarf_end): Call it.
1458 * dwarf_begin_elf.c (valid_p): Likewise.
1459 (check_section, scngrp_read): Likewise.
1460 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1462 2010-10-13 Roland McGrath <roland@redhat.com>
1464 * dwarf.h: Add DW_LANG_Go.
1466 2010-10-05 Roland McGrath <roland@redhat.com>
1468 * dwarf_getaranges.c: Use malloc rather than alloca,
1469 since the total number of elements can be quite huge.
1471 2010-07-26 Roland McGrath <roland@redhat.com>
1473 * dwarf_getlocation_implicit_pointer.c: New file.
1474 * Makefile.am (libdw_a_SOURCES): Add it.
1475 * libdw.map (ELFUTILS_0.149): New set.
1476 Add dwarf_getlocation_implicit_pointer.
1477 * libdw.h: Declare it.
1479 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1480 (dwarf_offdie, dwarf_offdie_types): Update callers.
1481 * libdwP.h: Declare it.
1483 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1484 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1486 2010-08-24 Roland McGrath <roland@redhat.com>
1488 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1490 2010-07-27 Roland McGrath <roland@redhat.com>
1492 * dwarf_formref_die.c: Fix sig8 hash insertion.
1494 2010-06-23 Roland McGrath <roland@redhat.com>
1496 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1497 * libdw.h: Remove it.
1498 * libdw.map: Likewise.
1500 2010-06-22 Roland McGrath <roland@redhat.com>
1502 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1504 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1507 2010-06-21 Roland McGrath <roland@redhat.com>
1509 * dwarf.h: Add DW_TAG_GNU_* constants.
1511 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1514 2010-06-20 Roland McGrath <roland@redhat.com>
1516 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1517 to search TUs instead of CUs.
1518 * libdwP.h: Update decl.
1519 (struct Dwarf): New member tu_tree.
1520 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1521 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1522 (dwarf_offdie): ... here.
1523 (dwarf_offdie_types): New function.
1524 * libdw.h: Declare it.
1525 * libdw.map (ELFUTILS_0.148): Add it.
1527 * libdwP.h (CUDIE): Use cu_data.
1528 * dwarf_formblock.c: Likewise.
1529 * dwarf_formref_die.c: Likewise.
1530 * dwarf_diecu.c: Use CUDIE macro.
1531 * dwarf_formaddr.c: Use cu_sec_idx.
1533 2010-06-16 Roland McGrath <roland@redhat.com>
1535 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1536 we don't repeat a CU lookup we've already done. Handle
1537 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1539 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1541 (__libdw_findcu): ... here. Call it.
1542 * libdwP.h: Declare it.
1543 (struct Dwarf): New member next_tu_offset.
1545 * dwarf_sig8_hash.c: New file.
1546 * dwarf_sig8_hash.h: New file.
1547 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1548 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1550 * libdwP.h (struct Dwarf): New member sig8_hash.
1551 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1552 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1554 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1555 (dwarf_nextcu): ... here. Call it.
1556 * libdw.h: Declare it.
1557 * libdwP.h: Add INTDECL.
1558 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1559 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1561 * libdwP.h (cu_sec_idx, cu_data): New functions.
1562 Use .debug_types when CU is a TU.
1563 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1564 * dwarf_siblingof.c: Likewise.
1565 * dwarf_formstring.c: Likewise.
1566 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1567 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1568 (dwarf_getlocation_addr): Likewise.
1570 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1571 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1572 .debug_types header size instead of .debug_info header size.
1574 * dwarf_diecu.c: Update caller.
1575 * dwarf_getaranges.c: Likewise.
1576 * dwarf_nextcu.c: Likewise.
1577 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1579 * fde.c (fde_by_offset): Renamed to ...
1580 (__libdw_fde_by_offset): ... this, made global and internal_function.
1581 Don't take ADDRESS argument.
1582 (__libdw_find_fde): Update caller. Do address sanity check here.
1583 * cfi.h: Declare __libdw_fde_by_offset.
1584 * cfi.c (dwarf_cfi_validate_fde): New function.
1585 * libdw.h: Declare it.
1586 * libdw.map (ELFUTILS_0.148): Add it.
1588 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1589 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1591 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1592 Don't assume DW_EH_PE_aligned refers to native address size.
1594 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1597 2010-06-17 Roland McGrath <roland@redhat.com>
1599 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1601 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1602 into an inner inline function. Set new fields. Check all fields for
1603 overflow when setting.
1604 * dwarf_lineisa.c: New file.
1605 * dwarf_linediscriminator.c: New file.
1606 * dwarf_lineop_index.c: New file.
1607 * Makefile.am (libdw_a_SOURCES): Add them.
1608 * libdw.map (ELFUTILS_0.148): Add them.
1609 * libdw.h: Declare them.
1611 2010-06-16 Roland McGrath <roland@redhat.com>
1613 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1615 * fde.c (fde_by_offset): Renamed to ...
1616 (__libdw_fde_by_offset): ... this, made global and internal_function.
1617 Don't take ADDRESS argument.
1618 (__libdw_find_fde): Update caller. Do address sanity check here.
1619 * cfi.h: Declare __libdw_fde_by_offset.
1620 * cfi.c (dwarf_cfi_validate_fde): New function.
1621 * libdw.h: Declare it.
1622 * libdw.map (ELFUTILS_0.148): Add it.
1624 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1625 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1627 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1628 Don't assume DW_EH_PE_aligned refers to native address size.
1630 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1633 2010-06-15 Roland McGrath <roland@redhat.com>
1635 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1637 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1638 here, since we don't support it yet.
1640 * dwarf_next_cfi.c: Handle version 4 format.
1642 * dwarf_getsrclines.c: Handle version 4 format.
1644 2010-06-01 Roland McGrath <roland@redhat.com>
1646 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1647 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1649 * libdwP.h (CIE_VERSION): Remove unused macro.
1651 * dwarf_getsrclines.c: Fix version field test.
1652 * libdwP.h (DWARF_VERSION): Remove useless macro.
1654 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1656 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1658 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1660 2010-05-31 Mark Wielaard <mjw@redhat.com>
1662 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1663 * libdw.h (dwarf_cfi_cie_p): ... here.
1665 2010-05-31 Mark Wielaard <mjw@redhat.com>
1667 * dwarf.h: Fix DW_LANG_Python constant.
1669 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1671 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1674 2010-05-27 Roland McGrath <roland@redhat.com>
1676 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1677 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1679 2010-05-08 Roland McGrath <roland@redhat.com>
1681 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1682 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1683 (getlocation): Update caller.
1684 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1685 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1686 * libdwP.h: Update decl.
1688 2010-04-26 Roland McGrath <roland@redhat.com>
1690 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1691 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1692 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1693 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1695 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1696 Prepend DW_OP_call_frame_cfa if true.
1697 (getlocation): Update caller.
1698 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1699 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1700 * libdwP.h: Update decl.
1702 2010-04-22 Roland McGrath <roland@redhat.com>
1704 * cfi.c (execute_cfi): Never return without cleanup.
1706 (cie_cache_initial_state): Adjust caller to expect that free.
1707 (__libdw_frame_at_address): Likewise.
1709 2010-03-10 Roland McGrath <roland@redhat.com>
1711 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1713 2010-02-15 Roland McGrath <roland@redhat.com>
1715 * Makefile.am: Use config/eu.am for common stuff.
1717 2010-02-02 Mark Wielaard <mjw@redhat.com>
1719 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1721 2010-01-07 Roland McGrath <roland@redhat.com>
1723 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1725 2010-01-05 Roland McGrath <roland@redhat.com>
1727 * dwarf_aggregate_size.c: New file.
1728 * Makefile.am (libdw_a_SOURCES): Add it.
1729 * libdw.h: Declare it.
1730 * libdwP.h: Add INTDECL.
1731 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1733 * dwarf_srclang.c: Add INTDEF.
1734 * libdwP.h: Add INTDECL.
1736 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1738 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1740 2009-11-21 Roland McGrath <roland@redhat.com>
1742 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1745 2009-10-15 Roland McGrath <roland@redhat.com>
1747 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1748 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1750 2009-09-17 Roland McGrath <roland@redhat.com>
1752 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1753 argument a pointer to const.
1754 * libdw.h: Update decl.
1756 2009-09-10 Roland McGrath <roland@redhat.com>
1758 * dwarf_getlocation.c (store_implicit_value): New function.
1759 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1760 (dwarf_getlocation_implicit_value): New function.
1761 * libdw.h: Declare it.
1762 * libdw.map (ELFUTILS_0.143): Add it.
1764 2009-09-09 Mark Wielaard <mjw@redhat.com>
1766 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1768 2009-08-21 Josh Stone <jistone@redhat.com>
1770 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1772 2009-08-10 Roland McGrath <roland@redhat.com>
1774 * dwarf_getscopevar.c: Use dwarf_diename.
1776 2009-08-09 Roland McGrath <roland@redhat.com>
1778 * libdw.map (ELFUTILS_0.143): New version set,
1779 inherits from ELFUTILS_0.142.
1780 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1781 alias in the ELFUTILS_0.122 version set and the default in the new set.
1782 * dwarf_srclang.c: Likewise.
1783 * dwarf_decl_file.c: Likewise.
1784 * dwarf_decl_line.c: Likewise.
1785 * dwarf_decl_column.c: Likewise.
1786 * dwarf_bytesize.c: Likewise.
1787 * dwarf_bitsize.c: Likewise.
1788 * dwarf_bitoffset.c: Likewise.
1790 2009-08-07 Roland McGrath <roland@redhat.com>
1792 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1793 * dwarf_srclang.c: Likewise.
1794 * dwarf_decl_file.c: Likewise.
1795 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1796 * dwarf_bytesize.c: Likewise.
1797 * dwarf_bitsize.c: Likewise.
1798 * dwarf_bitoffset.c: Likewise.
1800 2009-07-22 Roland McGrath <roland@redhat.com>
1802 * dwarf_frame_cfa.c: Change calling convention.
1803 * libdw.h: Update decl.
1805 * dwarf_frame_register.c: Change calling/return-value convention for
1806 value-only results and undefined/same_value.
1807 * libdw.h: Update decl.
1809 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1810 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1811 return that value instead.
1812 (getlocation): Update caller.
1813 * dwarf_frame_cfa.c: Likewise.
1814 * libdwP.h: Update decl.
1816 2009-07-21 Roland McGrath <roland@redhat.com>
1818 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1819 Fix loop iteration after skipping a bogus or useless CU.
1821 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1822 absence, not DWARF_E_NO_DEBUG_LINE.
1824 2009-07-20 Roland McGrath <roland@redhat.com>
1826 * dwarf_getlocation.c (__libdw_intern_expression):
1827 Handle DW_OP_stack_value.
1829 2009-07-16 Roland McGrath <roland@redhat.com>
1831 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1832 reject others when CU's version > 3.
1834 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1836 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1837 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1838 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1839 and DW_AT_const_expr.
1840 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1841 and DW_FORM_ref_sig8.
1843 2009-07-15 Roland McGrath <roland@redhat.com>
1845 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1846 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1848 2009-07-13 Roland McGrath <roland@redhat.com>
1850 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1852 2009-07-08 Roland McGrath <roland@redhat.com>
1854 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1857 * libdwP.h (struct Dwarf): Add member `cfi'.
1858 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1859 * dwarf_getcfi.c: New file.
1860 * dwarf_getcfi_elf.c: New file.
1861 * dwarf_cfi_end.c: New file.
1862 * dwarf_cfi_addrframe.c: New file.
1863 * dwarf_frame_cfa.c: New file.
1864 * dwarf_frame_register.c: New file.
1865 * dwarf_frame_return_address_register.c: New file.
1866 * Makefile.am (libdw_a_SOURCES): Add them.
1867 * unwind.h: Declare those functions.
1868 * libdw.map (ELFUTILS_0.142): Export them.
1870 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1872 (getlocation): ... here, call it.
1873 * libdwP.h: Declare it.
1877 * frame-cache.c: New file.
1880 * encoded-value.h: New file.
1881 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1882 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1883 * dwarf_error.c (errmsgs): Add element for it.
1885 * dwarf_next_cfi.c: New file.
1886 * Makefile.am (libdw_a_SOURCES): Add it.
1887 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1888 Declare dwarf_next_cfi.
1889 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1892 * memory-access.h [! ALLOW_UNALIGNED]
1893 (read_2ubyte_unaligned): Renamed to ...
1894 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1895 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1896 (read_2sbyte_unaligned): Likewise.
1897 (read_4ubyte_unaligned): Likewise.
1898 (read_4sbyte_unaligned): Likewise.
1899 (read_8ubyte_unaligned): Likewise.
1900 (read_8sbyte_unaligned): Likewise.
1902 * libdwP.h (IDX_eh_frame): Remove it.
1903 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1905 2009-07-08 Roland McGrath <roland@redhat.com>
1907 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1909 * dwarf_getlocation.c (check_constant_offset): New function.
1910 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1911 handle DW_AT_data_member_location of data[48] as constant offset.
1913 2009-06-18 Roland McGrath <roland@redhat.com>
1915 * libdwP.h (__libdw_read_address_inc): Constify.
1916 (__libdw_read_offset_inc): Likewise.
1917 * dwarf_getaranges.c: Likewise.
1918 * dwarf_getlocation.c: Likewise.
1919 * dwarf_getsrclines.c: Likewise.
1920 * dwarf_nextcu.c: Likewise.
1922 2009-05-05 Petr Machata <pmachata@redhat.com>
1924 * libdwP.h (__libdw_formptr): Declare new function.
1925 * dwarf_formudata.c: Implement it here.
1926 * dwarf_getlocation.c (dwarf_getlocation_addr):
1927 Call it instead of hand-rolled offset handling code.
1928 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1929 * dwarf_ranges.c (dwarf_ranges): Likewise.
1931 2009-05-04 Petr Machata <pmachata@redhat.com>
1933 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1934 * dwarf_ranges.c: Implement it here.
1935 (dwarf_ranges): Call it.
1936 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1938 2009-04-23 Petr Machata <pmachata@redhat.com>
1940 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1941 of read_*ubyte_unaligned.
1942 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1943 * dwarf_formstring.c (dwarf_formstring): Likewise.
1944 * dwarf_formudate.c (dwarf_formudata): Likewise.
1945 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1946 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1947 * dwarf_getpubnames.c (get_offsets): Likewise.
1948 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1950 2009-04-23 Petr Machata <pmachata@redhat.com>
1952 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1953 __libdw_read_addr, __libdw_read_off): Add four new internal
1956 2009-05-07 Roland McGrath <roland@redhat.com>
1958 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1959 return value and OFFSET argument, not CU-relative. Only fetch the
1960 attribute data when called with OFFSET of 0.
1962 2009-05-07 Petr Machata <pmachata@redhat.com>
1964 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1965 DW_AT_macro_info attribute of CU DIE.
1967 2009-04-15 Roland McGrath <roland@redhat.com>
1969 * dwarf.h (DW_CIE_ID): Removed.
1970 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1972 2009-04-01 Roland McGrath <roland@redhat.com>
1974 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1976 2009-01-28 Roland McGrath <roland@redhat.com>
1978 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1979 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1981 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1983 2009-01-26 Roland McGrath <roland@redhat.com>
1985 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1987 2009-01-25 Roland McGrath <roland@redhat.com>
1989 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1991 2009-01-23 Roland McGrath <roland@redhat.com>
1993 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1994 Put these rules under if MAINTAINER_MODE.
1996 2009-01-22 Roland McGrath <roland@redhat.com>
1998 * dwarf.h: Add DW_OP_GNU_encoded_addr.
2000 2009-01-21 Roland McGrath <roland@redhat.com>
2002 * Makefile.am (CLEANFILES): Renamed to ...
2003 (MOSTLYCLEANFILES): ... here.
2004 (CLEANFILES): New variable, add known-dwarf.h.
2006 2009-01-17 Roland McGrath <roland@redhat.com>
2008 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
2009 Make it unconditional.
2010 (BUILT_SOURCES): Updated.
2012 * dwarf.h: Add description comments for DW_LANG_* values.
2014 * Makefile.am [MAINTAINER_MODE]
2015 ($(srcdir)/known-dwarf.h): New target.
2016 (BUILT_SOURCES): Add it.
2018 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
2020 2009-01-10 Ulrich Drepper <drepper@redhat.com>
2022 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
2024 2009-01-08 Roland McGrath <roland@redhat.com>
2026 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2028 2008-01-06 Roland McGrath <roland@redhat.com>
2030 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2032 * dwarf_haschildren.c: Return -1 for error case, not 0.
2034 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2036 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2038 * dwarf.h: Add definition for unwind and call frame information.
2040 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2041 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2043 2008-08-15 Roland McGrath <roland@redhat.com>
2045 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2046 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2048 2008-01-21 Ulrich Drepper <drepper@redhat.com>
2050 * dwarf_child.c: Minor optimizations.
2051 * dwarf_getattrs.c: Likewise.
2052 * dwarf_getpubnames.c: Likewise.
2053 * dwarf_siblingof.c: Likewise.
2054 * dwarf_tag.c: Likewise.
2056 2008-01-18 Ulrich Drepper <drepper@redhat.com>
2058 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2059 of DWARF_VERSION comparison, just fail if the file's version is newer.
2061 2008-01-17 Nick Clifton <nickc@redhat.com>
2063 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2064 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2065 (DWARF3_LENGTH_64_BIT): New define.
2066 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2067 * dwarf_getpubnames: Include dwarf.h.
2068 (get_offsets): Use the new definitions.
2069 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2070 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2071 (dwarf_nextcu): Use the new definitions.
2073 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2074 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2075 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2076 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2078 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2081 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2083 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2084 Set the address in the return structure to the address of the next
2085 non-sibling die, if there is no sibling and the return pointer is
2086 not the same as the die pointer.
2087 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2089 * dwarf_child.c: Fix typo in comment.
2091 * libdwP.h (DWARF_VERSION): Change to 3.
2093 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2094 not have a initialised valp pointer.
2096 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2097 the end of the attributes is reached. When the callback fails,
2098 return the address of the failing attribute, not the address of
2100 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2102 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2103 (dwarf_child): Likewise.
2104 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2105 (dwarf_tag): Likewise.
2107 2008-01-08 Roland McGrath <roland@redhat.com>
2109 * Makefile.am (euinclude): Variable removed.
2110 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2111 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
2113 2007-10-17 Roland McGrath <roland@redhat.com>
2115 * libdw.h (__deprecated_attribute__): New macro.
2116 (dwarf_formref): Mark it deprecated.
2117 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2118 (dwarf_formref): ... here. Call it. Remove INTDEF.
2119 * libdwP.h: Remove INTDECL.
2120 Declare __libdw_formref.
2121 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2122 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2124 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2125 needs to check CU->version.
2127 * libdwP.h (struct Dwarf_CU): New member `version'.
2128 * libdw_findcu.c (__libdw_findcu): Initialize it.
2130 * dwarf_child.c: Return 1 for null entry as first child.
2132 2007-10-05 Roland McGrath <roland@redhat.com>
2134 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2136 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2137 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2139 2007-10-03 Roland McGrath <roland@redhat.com>
2141 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2142 and dwfl_build_id_find_debuginfo.
2144 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2145 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2147 2007-10-02 Roland McGrath <roland@redhat.com>
2149 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2152 2007-08-07 Roland McGrath <roland@redhat.com>
2154 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2155 error code is DWARF_E_NOERROR (0).
2157 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2158 Fix typo in __libdw_visit_scopes argument.
2160 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2161 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2163 2007-07-03 Roland McGrath <roland@redhat.com>
2165 * libdw.h (__extern_inline): New macro.
2166 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2168 2007-04-16 Roland McGrath <roland@redhat.com>
2170 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2172 2007-04-05 Roland McGrath <roland@redhat.com>
2174 * dwarf_getsrcdirs.c: New file.
2175 * Makefile.am (libdw_a_SOURCES): Add it.
2176 * libdw.h: Declare dwarf_getsrcdirs.
2177 * libdw.map (ELFUTILS_0.127): Add it.
2179 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2180 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2181 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2182 Save DIRARRAY in the Dwarf_Files.
2184 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
2185 address to check for all-ones base address entry. Check directly.
2186 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2188 2007-03-25 Roland McGrath <roland@redhat.com>
2190 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2191 Return NULL when freeing RESULT on error.
2192 (global_read, scngrp_read): Check return value from check_section,
2193 break out of loop after it has freed RESULT.
2194 (valid_p): Handle null argument.
2196 2007-03-12 Roland McGrath <roland@redhat.com>
2198 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2200 2007-03-04 Roland McGrath <roland@redhat.com>
2202 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2203 ELFUTILS_0.126. Add dwfl_module_addrsym.
2205 2007-02-10 Roland McGrath <roland@redhat.com>
2207 * dwarf.h (DW_OP_fbreg): Comment fix.
2209 2007-02-03 Roland McGrath <roland@redhat.com>
2211 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2212 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2213 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2214 exported in the past.
2216 2006-12-17 Roland McGrath <roland@redhat.com>
2218 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2219 address when the CU is missing attributes due to buggy GCC.
2221 2006-08-29 Roland McGrath <roland@redhat.com>
2223 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2225 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2226 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2228 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2229 result is aligned. Adjust NEWP->remaining here for this allocation.
2230 * libdwP.h: Update decl.
2231 (libdw_alloc): Update caller.
2233 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2235 * dwarf_child.c: Adjust for internal_function_def removal.
2236 * dwarf_getabbrev.c: Likewise.
2237 * dwarf_tag.c: Likewise.
2238 * libdw_form.c: Likewise.
2239 * memory-access.c: Likewise.
2241 2006-06-28 Roland McGrath <roland@redhat.com>
2243 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2245 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2248 2006-05-27 Ulrich Drepper <drepper@redhat.com>
2250 * libdw.h: Add extern "C".
2252 2006-05-22 Ulrich Drepper <drepper@redhat.com>
2254 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2255 aranges information.
2257 2006-05-21 Ulrich Drepper <drepper@redhat.com>
2259 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2262 2006-02-28 Roland McGrath <roland@redhat.com>
2264 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2265 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2266 values from DWARF 3.0.
2268 2006-02-22 Roland McGrath <roland@redhat.com>
2270 * libdw.map: Bump to 0.120; export dwfl_version.
2272 2005-12-22 Roland McGrath <roland@redhat.com>
2274 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2276 2005-12-12 Roland McGrath <roland@redhat.com>
2278 * dwarf_ranges.c: Copy CU base address-finding code from
2281 2005-12-09 Roland McGrath <roland@redhat.com>
2283 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2284 Delay CU base lookup until it's needed.
2285 If CU base lookup fails with no error, flag invalid DWARF.
2287 2005-11-25 Roland McGrath <roland@redhat.com>
2289 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2291 2005-11-15 Roland McGrath <roland@redhat.com>
2293 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2295 2005-11-13 Roland McGrath <roland@redhat.com>
2297 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2299 2005-10-27 Roland McGrath <roland@redhat.com>
2301 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2302 don't match end_sequence markers.
2304 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2305 before normal records at the same address.
2306 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2309 2005-10-26 Roland McGrath <roland@redhat.com>
2311 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2312 * dwarf_func_file.c: Renamed to ...
2313 * dwarf_decl_file.c: ... here.
2314 * dwarf_func_col.c: Renamed to ...
2315 * dwarf_decl_column.c: ... here.
2316 * dwarf_func_line.c: Renamed to ...
2317 * dwarf_decl_line.c: ... here.
2318 (dwarf_func_line): Renamed to ...
2319 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2320 (__libdw_func_intval): Renamed __libdw_attr_intval.
2321 * dwarf_func_name.c: File removed.
2322 * dwarf_func_lowpc.c: File removed.
2323 * dwarf_func_highpc.c: File removed.
2324 * dwarf_func_entrypc.c: File removed.
2325 * dwarf_func_die.c: File removed.
2326 * Makefile.am (libdw_a_SOURCES): Updated.
2327 * libdw.h: Update decls.
2328 (Dwarf_Func): Type removed.
2329 * libdwP.h: Update decls.
2330 (struct Dwarf_Func_s): Type removed.
2331 * libdw.map: Updated.
2333 * libdwP.h (CUDIE): New macro.
2334 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2335 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2336 * dwarf_ranges.c (dwarf_ranges): Likewise.
2338 * dwarf_getloclist.c: Renamed to ...
2339 * dwarf_getlocation.c: ... here.
2340 (getloclist): Renamed to getlocation.
2341 (dwarf_getloclist): Renamed to dwarf_getlocation.
2342 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2343 * Makefile.am (libdw_a_SOURCES): Updated.
2344 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2345 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2346 (Dwarf_Loc): Renamed Dwarf_Op.
2347 * libdwP.h (struct loc_s): Update use.
2348 * libdw.map: Update map.
2350 * dwarf_entry_breakpoints.c: Use the second line record within the
2351 function, regardless of its source location data.
2353 2005-10-25 Roland McGrath <roland@redhat.com>
2355 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2357 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2359 2005-10-14 Roland McGrath <roland@redhat.com>
2361 * dwarf_diecu.c (dwarf_diecu): New file.
2362 * Makefile.am (libdw_a_SOURCES): Add it.
2363 * libdw.h: Declare dwarf_diecu.
2364 * libdw.map: Export it.
2366 * libdw.map: Bump to 0.116; export dwarf_ranges.
2368 2005-09-20 Roland McGrath <roland@redhat.com>
2370 * dwarf_haspc.c: Use dwarf_ranges.
2371 * dwarf_entry_breakpoints.c: Likewise.
2373 * dwarf_ranges.c: New file.
2374 * Makefile.am (libdw_a_SOURCES): Add it.
2375 * libdw.h: Declare dwarf_ranges.
2376 * libdwP.h: Add INTDECL.
2378 2005-09-14 Roland McGrath <roland@redhat.com>
2380 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2381 prologue_end marker scanning loop.
2383 2005-09-11 Roland McGrath <roland@redhat.com>
2385 * dwarf.h: Comment typo fix.
2387 2005-09-07 Roland McGrath <roland@redhat.com>
2389 * dwarf_entry_breakpoints.c: New file.
2390 * Makefile.am (libdw_a_SOURCES): Add it.
2391 * libdw.h: Declare dwarf_entry_breakpoints.
2393 * dwarf_entrypc.c: New file.
2394 * Makefile.am (libdw_a_SOURCES): Add it.
2395 * libdw.h: Declare dwarf_entrypc.
2396 * libdwP.h: Add INTDECL.
2398 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2400 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2401 (%.os): Use COMPILE.os.
2402 (COMPILE.os): Filter out gconv options.
2404 2005-08-27 Roland McGrath <roland@redhat.com>
2406 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2407 __libdw_visit_scopes.
2409 * dwarf_getscopes_die.c: New file.
2410 * Makefile.am (libdw_a_SOURCES): Add it.
2411 * libdw.h: Declare dwarf_getscopes_die.
2412 * libdw.map: Bump to 0.115 and add it.
2414 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2415 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2416 Take two functions for both preorder and postorder visitors.
2417 * libdwP.h: Update decl.
2418 (struct Dwarf_Die_Chain): New type.
2419 * dwarf_func_inline.c: Update uses.
2421 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2423 * libdwP.h: Add INTDECL.
2424 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2426 2005-08-23 Roland McGrath <roland@redhat.com>
2428 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2429 DW_AT_specification the same as DW_AT_abstract_origin.
2431 2005-08-20 Roland McGrath <roland@redhat.com>
2433 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2434 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2435 and dwfl_report_offline.
2437 2005-08-19 Roland McGrath <roland@redhat.com>
2439 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2440 Add dwfl_module_relocate_address, dwfl_module_relocations,
2441 dwfl_module_relocation_info.
2443 2005-08-18 Roland McGrath <roland@redhat.com>
2445 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2446 outermost scope in the results.
2448 2005-08-15 Roland McGrath <roland@redhat.com>
2450 * dwarf_func_inline.c: New file.
2451 * Makefile.am (libdw_a_SOURCES): Add it.
2452 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2453 * libdw.map: Add them.
2455 * dwarf_func_die.c: New file.
2456 * Makefile.am (libdw_a_SOURCES): Add it.
2457 * libdw.h: Declare dwarf_func_die.
2458 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2460 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2462 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2463 of DW_LNS_set_epilog_begin.
2465 2005-08-09 Roland McGrath <roland@redhat.com>
2467 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2469 * dwarf_end.c: Add INTDEF.
2470 * dwarf_error.c (dwarf_errmsg): Likewise.
2471 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2473 2005-08-01 Roland McGrath <roland@redhat.com>
2475 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2476 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2478 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2480 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2481 (libdw_a_LIBADD): Add all files from libdwfl.a.
2483 2005-07-27 Roland McGrath <roland@redhat.com>
2485 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2486 along with ../libebl/libebl.a and ../lib/libeu.a;
2487 depend on ../libelf/libelf.so.
2488 (libdw_so_LDADD): New variable.
2489 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2491 * libdw.map: Define an empty base version and move all symbols to
2492 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2494 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2496 * dwarf_error.c: Add internal alias for dwarf_errno.
2497 * libdwP.h: Declare __dwarf_errno_internal.
2498 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2500 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2503 2005-06-01 Roland McGrath <roland@redhat.com>
2505 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2506 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2508 2005-06-08 Roland McGrath <roland@redhat.com>
2510 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2511 (get_sleb128_step, get_sleb128): Likewise.
2512 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2513 * dwarf_getloclist.c (getloclist): Likewise.
2514 * dwarf_formblock.c (dwarf_formblock): Likewise.
2515 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2516 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2517 * dwarf_formref.c (dwarf_formref): Likewise.
2518 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2519 * dwarf_formudata.c (dwarf_formudata): Likewise.
2520 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2521 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2522 * dwarf_tag.c (dwarf_tag): Likewise.
2523 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2524 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2525 * libdw_form.c (__libdw_form_val_len): Likewise.
2526 * libdwP.h: Update decl.
2528 2005-06-04 Roland McGrath <roland@redhat.com>
2530 * memory-access.h (get_uleb128_rest_return): New macro.
2531 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2532 (get_sleb128_rest_return): New macro.
2533 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2534 * memory-access.c: New file.
2535 * Makefile.am (libdw_a_SOURCES): Add it.
2536 (DEFS): Add -DIS_LIBDW.
2538 2005-05-31 Roland McGrath <roland@redhat.com>
2540 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2543 2005-05-30 Roland McGrath <roland@redhat.com>
2545 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2546 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2548 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2549 BEGIN value. Instead, match base address entries separately for
2552 2005-05-28 Roland McGrath <roland@redhat.com>
2554 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2555 past location expression contents.
2557 2005-05-23 Roland McGrath <roland@redhat.com>
2559 * dwarf_getsrclines.c: Comment typo fix.
2561 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2562 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2564 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2566 * libdwP.h: Only use INTDECL for alias prototypes.
2568 2005-05-19 Roland McGrath <roland@redhat.com>
2570 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2572 * dwarf_getscopevar.c: New file.
2573 * Makefile.am (libdw_a_SOURCES): Add it.
2574 * libdw.h: Declare dwarf_getscopevar.
2576 * dwarf_getsrcfiles.c: Add INTDEF.
2577 * dwarf_haschildren.c: Likewise.
2578 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2580 * dwarf_getscopes.c: New file.
2581 * Makefile.am (libdw_a_SOURCES): Add it.
2582 * libdw.h: Declare dwarf_getscopes.
2583 * libdw.map: Add it.
2585 2005-05-18 Roland McGrath <roland@redhat.com>
2587 * libdwP.h (IDX_debug_ranges): New enum constant.
2588 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2589 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2590 * dwarf_error.c (errmsgs): Add it.
2591 * dwarf_haspc.c: New file.
2592 * libdw.h: Declare dwarf_haspc.
2593 * libdw.map: Add it.
2594 * libdwP.h: Add INTDECL.
2596 * dwarf_attr_integrate.c: New file.
2597 * dwarf_hasattr_integrate.c: New file.
2598 * Makefile.am (libdw_a_SOURCES): Add them.
2599 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2600 * libdw.map: Add them.
2602 * dwarf_hasattr.c: Add INTDEF.
2603 * libdwP.h: Add INTDECL for it.
2605 * dwarf_formref_die.c: New file.
2606 * Makefile.am (libdw_a_SOURCES): Add it.
2607 * libdw.h (dwarf_formref_die): Declare it.
2608 * libdwP.h (dwarf_formref_die): Add INTDECL.
2609 * libdw.map: Add it.
2611 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2613 (dwarf_getloclist): ... here. Call them.
2614 (dwarf_addrloclists): New function.
2615 * libdw.h: Declare it.
2616 * libdw.map: Add it.
2618 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2619 DW_MACINFO_end_file. Recognize type 0 as terminator.
2621 2005-05-05 Roland McGrath <roland@redhat.com>
2623 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2625 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2626 the line program does not produce all entries in ascending order.
2628 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2630 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2631 occurences (e.g., inlines) better.
2633 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2635 * libdw.h (DWARF_END_ABBREV): Define.
2636 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2638 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2640 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2641 as error of __libdw_getabbrev.
2643 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2645 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2647 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2648 results back to caller.
2650 2005-04-04 Roland McGrath <roland@redhat.com>
2652 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2654 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2657 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2659 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2661 * dwarf_getsrc_file.c: New file.
2662 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2663 * libdw.h: Declare dwarf_getsrc_file.
2664 * libdw.map: Add dwarf_getsrc_file.
2666 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2668 * dwarf_func_entrypc.c: New file.
2669 * dwarf_func_col.c: New file.
2670 * dwarf_func_line.c: New file.
2671 * dwarf_func_file.c: New file.
2672 * libdw.h: Add prototypes for new functions.
2673 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2675 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2676 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2677 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2678 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2679 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2680 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2682 * dwarf.h: Add some DWARF3 definitions.
2684 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2686 * dwarf_getfuncs.c: New file.
2687 * dwarf_func_highpc.c: New file.
2688 * dwarf_func_lowpc.c: New file.
2689 * dwarf_func_name.c: New file.
2690 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2691 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2692 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2693 and dwarf_func_name.
2694 * libdw.h: Add prototypes for new functions.
2695 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2696 * dwarf_siblingof.c: Likewise.
2697 * dwarf_dieoffset.c: Likewise.
2698 * dwarf_highpc.c: Likewise.
2699 * dwarf_lowpc.c: Likewise.
2700 * libdwP.h: Add prototypes for internal functions.
2701 Define Dwarf_Func_s structure.
2703 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2705 * libdw.h: Add padding in Dwarf_die.
2707 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2708 * dwarf_attr.c: Likewise.
2709 * dwarf_begin.c: Likewise.
2710 * dwarf_begin_elf.c: Likewise.
2711 * dwarf_bitoffset.c: Likewise.
2712 * dwarf_bitsize.c: Likewise.
2713 * dwarf_bytesize.c: Likewise.
2714 * dwarf_diename.c: Likewise.
2715 * dwarf_formaddr.c: Likewise.
2716 * dwarf_formblock.c: Likewise.
2717 * dwarf_formref.c: Likewise.
2718 * dwarf_formstring.c: Likewise.
2719 * dwarf_formudata.c: Likewise.
2720 * dwarf_getarange_addr.c: Likewise.
2721 * dwarf_getarangeinfo.c: Likewise.
2722 * dwarf_getaranges.c: Likewise.
2723 * dwarf_getloclist.c: Likewise.
2724 * dwarf_getmacros.c: Likewise.
2725 * dwarf_getsrc_die.c: Likewise.
2726 * dwarf_getsrcfiles.c: Likewise.
2727 * dwarf_getsrclines.c: Likewise.
2728 * dwarf_highpc.c: Likewise.
2729 * dwarf_lowpc.c: Likewise.
2730 * dwarf_nextcu.c: Likewise.
2731 * dwarf_offdie.c: Likewise.
2732 * dwarf_siblingof.c: Likewise.
2733 * dwarf_srclang.c: Likewise.
2734 * dwarf_tag.c: Likewise.
2735 * libdw_findcu.c: Likewise.
2736 * libdwP.h: Add prototypes for internal functions.
2738 * dwarf_addrdie.c: New file.
2739 * dwarf_macro_opcode.c: New file.
2740 * dwarf_macro_param1.c: New file.
2741 * dwarf_macro_param2.c: New file.
2742 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2743 * libdwP.h: Remove Dwarf_Macro definition.
2744 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2745 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2746 * libdw.map: Add entries for new functions.
2748 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2750 * libdw.h: Handle broken gcc < 4.
2752 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2754 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2756 * dwarf_begin_elf.c: Fix warnings.
2757 * dwarf_dieoffset.c: Likewise.
2758 * dwarf_end.c: Likewise.
2759 * dwarf_error.c: Likewise.
2760 * dwarf_getpubnames.c: Likewise.
2762 * libdwP.h: Add new error values.
2763 * dwarf_error.c: Support new error values.
2764 * dwarf_getpubnames.c: Check parameter value.
2766 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2768 * Makefile.am: Check for text relocations in constructed DSO.
2770 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2772 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2774 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2775 checks to not read over buffer boundaries for ill-formed DWARF data.
2777 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2779 * dwarf_child.c: Make compile with gcc 4.0.
2780 * dwarf_error.c: Likewise.
2781 * dwarf_formblock.c: Likewise.
2782 * dwarf_getabbrev.c: Likewise.
2783 * dwarf_getattrs.c: Likewise.
2784 * dwarf_getsrclines.c: Likewise.
2785 * dwarf_tag.c: Likewise.
2786 * libdw_form.c: Likewise.
2788 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2790 * Makefile.am: Support building with mudflap.
2792 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2793 * dwarf_getsrclines.c: Likewise.
2794 * dwarf_memory-access.h: Likewise.
2796 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2798 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2800 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2801 Third parameter of dwarf_getsrcfiles can be NULL.
2803 * libdw.map: Add dwarf_getmacros.
2804 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2805 * dwarf_getmacros.c: New file.
2807 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2809 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2811 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2813 * dwarf_getsrclines.c:
2814 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2816 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2818 * libdwP.h (_): Use elfutils domain.
2820 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2822 * dwarf_getsrclines.c: Fix typo in comment.
2824 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2826 * Makefile.am: Support building with mudflap.
2828 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2830 * memory-access.h: Add lots of const in case a pointer passed is const.
2832 * dwarf_formflag.c: New file.
2833 * dwarf_getattrs.c: New file.
2834 * dwarf_error.c: Add new error value.
2835 * libdw.h: Add prototypes for new functions. Adjust prototype for
2837 * libdw.map: Add new functions.
2838 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2840 * libdwP.h: Add new error value.
2841 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2844 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2846 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2848 * dwarf_getarange_addr.c: New file
2849 * dwarf_getarangeinfo.c: New file.
2850 * dwarf_getaranges.c: New file.
2851 * dwarf_onerange.c: New file.
2852 * libdw.h: Declare new functions. Define Dwarf_Arange and
2854 * libdw.map: Add new functions.
2855 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2856 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2857 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2858 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2859 * dwarf_error.c: Add new message.
2861 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2863 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2864 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2865 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2866 * dwarf_error.c: Add another message.
2867 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2869 * dwarf_filesrc.c: Likewise.
2870 * dwarf_getsrcfiles.c: Likewise.
2871 * dwarf_getsrclines.c: Likewise.
2872 * dwarf_lineaddr.c: New file.
2873 * dwarf_linebeginstatement.c: New file.
2874 * dwarf_lineblock.c: New file.
2875 * dwarf_linecol.c: New file.
2876 * dwarf_lineendsequence.c: New file.
2877 * dwarf_lineepiloguebegin.c: New file.
2878 * dwarf_lineno.c: New file.
2879 * dwarf_lineprologueend.c: New file.
2880 * dwarf_onesrcline.c: New file.
2881 * dwarf_lineno.c: Change interface to store result in object pointed
2882 to by second parameter.
2883 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2884 prototype. Define Dwarf_Files and Dwarf_Lines.
2885 * libdw.map: Add new functions.
2886 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2887 * libdw_findcu.c: Don't initialize nlines field.
2889 * dwarf_siblingof: Little optimization.
2891 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2892 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2893 * libdwP.h (struct Dwarf): Add free_elf field.
2895 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2897 * dwarf_getstring.c: New file.
2898 * dwarf_offabbrev.c: New file.
2899 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2900 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2901 parameters. Don't allocate memory if not necessary and don't lookup
2902 previous results if no CU given.
2903 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2904 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2905 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2906 * libdwP.h: Change prototype for __libdw_getabbrev.
2908 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2909 returning if this is wanted.
2911 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2913 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2914 with offset_size value.
2915 * libdw.h: Adjust dwarf_nextcu prototype.
2916 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2917 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2918 member of new CU struct.
2919 * dwarf_formstring.c: Depend on offset_size not address_size for
2920 DW_FORM_strp handling.
2921 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2923 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2925 (dwarf_tag): Correctly recognize failed lookup.
2927 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2929 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2930 * dwarf_formblock.c: New file.
2931 * dwarf_getloclist.c: Rewrite to handle a single block.
2932 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2933 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2934 dwarf_getloclistent declaration.
2935 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2936 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2937 Add locs member to struct Dwarf_CU.
2938 * libdw_fundcu.c: Initialize locs member of new CU.
2939 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2940 Remove dwarf_getloclistent.c.
2942 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2944 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2945 * libdwP.h: Likewise.
2947 * dwarf_getloclist.c: New file.
2948 * dwarf_getloclistent.c: New file.
2949 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2950 Declare dwarf_getloclistent and dwarf_getloclist.
2951 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2952 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2953 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2956 * dwarf_error.c: More error messages.
2958 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2960 * dwarf_getsrclines.c: Remove debugging support.
2962 * dwarf_getsrcfiles.c: New file.
2963 * dwarf_filesrc.c: New file.
2964 * libdw.h: Declare these functions. Define Dwarf_File.
2965 * libdwP.c: Adjust Dwarf_File_s definition.
2966 * libdw.map: Add these functions.
2967 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2969 * dwarf_getsrclines.c: Initialize cu->files.
2971 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2973 * libdw.h: Add more nonnull function attributes.
2975 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2976 * dwarf_end.c (cu_free): New function.
2977 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2978 * dwarf_error.c (errmsgs): Add new messages.
2979 * dwarf_getsrc_die.c: New file.
2980 * dwarf_getsrclines.c: New file.
2981 * dwarf_lineno.c: New file.
2982 * dwarf_linesrc.c: New file.
2983 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2984 instead of the *_inc-less variants.
2985 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2986 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2987 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2989 * libdwP.h: Add more error codes.
2990 (struct Dwarf): Remove mem_tail.next member.
2991 (Dwarf_File): Define type.
2992 (struct Dwarf_Line_s): Define type.
2993 (struct Dwarf_CU): Add lines and nlines members.
2994 (libdw_alloc): Define local variable _tail and use it.
2995 Add some function attributes.
2996 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2997 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2998 * memory-access.h: Add unlikely for the endian conversion paths.
2999 * Makefile.am (AM_CFLAGS): Add -std parameter.
3000 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3001 dwarf_lineno, and dwarf_linesrc.
3003 2003-08-11 Ulrich Drepper <drepper@redhat.com>
3005 * Moved to CVS archive.