1 2018-03-29 Mark Wielaard <mark@klomp.org>
3 * libdw.h (dwarf_decl_file): Extend documentation.
4 (dwarf_linesrc): Likewise.
5 (dwarf_filesrc): Likewise.
7 2018-03-06 Mark Wielaard <mark@klomp.org>
9 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
10 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
11 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
13 * dwarf_getlocation.c (__libdw_intern_expression): Handle
14 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
15 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
16 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
17 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
18 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
19 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
20 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
21 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
23 * dwarf_getlocation_implicit_pointer.c
24 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
26 2018-03-01 Mark Wielaard <mark@klomp.org>
28 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
29 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
32 2018-02-09 Mark Wielaard <mark@klomp.org>
34 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
37 2018-02-09 Mark Wielaard <mark@klomp.org>
39 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
40 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
41 * dwarf_formudata.c (dwarf_formudata): Likewise.
42 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
43 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
44 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
45 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
46 that will also return any data associated with the abbrev. Which
47 currently is only for DW_FORM_implicit_const. Based on...
48 (dwarf_getabbrevattr): ... this function. Which now just calls
49 dwarf_getabbrevattr_data.
50 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
51 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
52 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
53 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
54 function based on __libdw_get_uleb128_unchecked.
56 2018-02-08 Mark Wielaard <mark@klomp.org>
58 * dwarf.h: Add DWARF5 DW_FORMs.
59 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
60 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
61 DW_FORM_ref_sup[48] and DW_FORM_data16.
62 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
63 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
64 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
66 2018-01-30 Mark Wielaard <mark@klomp.org>
68 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
69 * dwarf_get_units.c: New file.
70 * libdw.h (dwarf_get_units): New function declaration.
71 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
73 2018-01-29 Mark Wielaard <mark@klomp.org>
75 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
76 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
77 is now called unit_idp. type_offsetp is now called subdie_offsetp.
78 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
79 and .debug_types sections for type units when type signature ref
81 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
82 __libdw_first_die_off_from_cu instead of trying by hand.
83 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
84 instead of checking type_offset by hand.
85 * dwarf_getlocation_implicit_pointer.c
86 (dwarf_getlocation_implicit_pointer): Likewise.
87 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
88 (__libdw_next_unit): New function based on dwarf_next_unit with
89 DWARF5 header support.
90 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
91 and type_sig8 to unit_id8.
92 (ISV4TU): New macro to determine whether a CU is a version 4 type
93 unit (which comes from the .debug_types section).
94 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
95 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
97 (__libdw_first_die_off_from_cu): New function that calls the above
99 (CUDIE): Use __libdw_first_die_off_from_cu.
100 (SUBDIE): New macro that provides the DIE for a CU using the
102 (__libdw_next_unit): New internal function declaration.
103 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
104 Accept DWARF version 5 headers. Setup unit_type.
105 (__libdw_findcu): Rename debug_types argument to v4_debug_types
106 argument (to indicate that we are looking in the .debug_types
107 section). Support finding the exact offset (unit header start).
109 2018-01-25 Mark Wielaard <mark@klomp.org>
111 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
112 * dwarf_die_addr_die.c: New file.
113 * libdw.h (dwarf_die_addr_die): New function declaration.
114 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
115 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
116 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
118 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
120 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
121 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
123 2018-01-22 Mark Wielaard <mark@klomp.org>
125 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
126 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
127 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
128 and alt_fd if we allocated them.
129 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
130 * dwarf_formstring.c (dwarf_formstring): Likewise.
131 * dwarf_getalt.c (__libdw_filepath): New internal function.
132 (find_debug_altlink): New static function.
133 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
135 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
137 * libdw.h (dwarf_getalt): Extend documentation.
138 (dwarf_setalt): Likewise.
139 * libdwP.h (struct Dwarf): Add alt_fd field.
140 (filepath): Declare new internal function.
142 2018-01-14 Petr Machata <pmachata@gmail.com>
144 * dwarf_formsdata.c (dwarf_formsdata):
145 <DW_FORM_data1>: Cast to signed char.
146 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
147 read_*ubyte_unaligned.
149 2017-12-26 Mark Wielaard <mark@klomp.org>
151 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
152 use bitfields for has_children and code.
153 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
154 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
156 2017-12-26 Mark Wielaard <mark@klomp.org>
158 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
159 (get_uleb128_unchecked): New define.
160 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
161 read attr name and form.
162 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
163 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
164 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
166 2017-12-28 Mark Wielaard <mark@klomp.org>
168 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
170 2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
171 Mark Wielaard <mark@klomp.org>
173 * libdwP.h (__libdw_in_section): Fix check for the upper border of
175 (__libdw_offset_in_section): Likewise.
177 2017-12-20 Mark Wielaard <mark@klomp.org>
179 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
180 (cu_sec_idx): Return cu->sec_idx.
181 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
182 IDX_debug_info or IDX_debug_types.
183 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
185 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
186 IDX_debug_macro or IDX_debug_macinfo.
188 2017-12-12 Mark Wielaard <mark@klomp.org>
190 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
191 given DIE. Reserve memory for a new DIE first.
193 2017-12-11 Dima Kogan <dima@secretsauce.net>
195 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
198 2017-11-03 Mark Wielaard <mark@klomp.org>
200 * dwarf_getlocation.c (__libdw_intern_expression): Handle
201 DW_OP_GNU_variable_value.
202 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
203 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
205 2017-11-03 Mark Wielaard <mark@klomp.org>
207 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
208 Update list of acceptable attribute codes based on DWARF5.
210 2017-11-03 Mark Wielaard <mark@klomp.org>
212 * dwarf.h: Add DW_OP_GNU_variable_value.
214 2017-10-03 Mark Wielaard <mark@klomp.org>
216 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
218 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
220 * memory-access.h: Use attribute_packed.
222 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
224 * libdwP.h: Use attribute_hidden.
225 * libdw_alloc.c: Likewise.
227 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
229 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
231 2017-07-26 Mark Wielaard <mark@klomp.org>
233 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
234 * dwarf_getmacros.c (get_table_for_offset): Accept either version
235 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
236 (read_macros): Use table version for fake_cu.
238 2017-07-26 Mark Wielaard <mark@klomp.org>
240 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
241 DW_TAG_packed_type and DW_TAG_shared_type.
242 * libdw.h (dwarf_peel_type): Extend documentation.
244 2017-07-26 Mark Wielaard <mark@klomp.org>
246 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
247 DW_DEFAULTED_out_of_class.
249 2017-07-26 Mark Wielaard <mark@klomp.org>
251 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
253 2017-07-26 Mark Wielaard <mark@klomp.org>
255 * dwarf_default_lower_bound.c: New file.
256 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
257 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
258 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
259 * libdw.h: Add dwarf_default_lower_bound.
260 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
261 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
262 dwarf_default_lower_bound INTDECL.
264 2017-07-26 Mark Wielaard <mark@klomp.org>
266 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
267 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
268 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
269 * dwarf_aggregate_size.c (array_size): Add lower bound for
270 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
271 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
272 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
273 DW_LANG_Julia and DW_LANG_BLISS.
275 2017-07-26 Mark Wielaard <mark@klomp.org>
277 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
279 2017-07-25 Mark Wielaard <mark@klomp.org>
281 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
282 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
283 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
284 for currently unused numbers.
286 2017-07-25 Mark Wielaard <mark@klomp.org>
288 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
289 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
290 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
292 2017-07-21 Mark Wielaard <mark@klomp.org>
294 * dwarf_line_file.c: New file.
295 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
296 * libdw.h (dwarf_line_file): New function declaration.
297 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
299 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
301 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
302 made of, libdw_so_DEPS for libraries it depends on (including
303 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
304 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
305 library dependencies, use libdw_so_LIBS rather than relying on the
306 order of dependencies specified, add -z,relro.
308 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
310 * libdw.h: Remove attribute macro declarations and use
311 __noreturn_attribute__ as defined in libelf.h.
313 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
315 * dwarf_begin_elf.c: Include endian.h.
317 2017-03-30 Mark Wielaard <mjw@redhat.com>
319 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
322 2016-10-22 Mark Wielaard <mjw@redhat.com>
324 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
325 * dwarf_aggregate_size.c (array_size): Use correct spelling of
328 2016-11-02 Mark Wielaard <mjw@redhat.com>
330 * cfi.c (execute_cfi): Add fallthrough comments.
331 * encoded-value.h (encoded_value_size): Add explicit return instead
332 of relying on fallthrough.
333 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
336 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
338 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
339 * libdw_alloc.c: Likewise.
341 2016-07-08 Mark Wielaard <mjw@redhat.com>
343 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
344 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
345 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
347 2016-02-13 Mark Wielaard <mjw@redhat.com>
349 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
352 2015-12-18 Mark Wielaard <mjw@redhat.com>
354 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
355 (__libdw_free_zdata): Remove.
356 * dwarf_begin_elf.c (inflate_section): Remove.
357 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
358 and elf_compress_gnu to decompress if necessary.
359 (valid_p): Remove __libdw_free_zdata calls.
360 (scngrp_read): Use elf_compress if section is compressed. Remove
361 __libdw_free_zdata calls.
362 * dwarf_end.c (__libdw_free_zdata): Remove.
363 (dwarf_end): Don't call __libdw_free_zdata.
365 2015-10-28 Mark Wielaard <mjw@redhat.com>
367 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
369 2015-12-02 Mark Wielaard <mjw@redhat.com>
371 * fde.c (intern_fde): Don't leak duplicate FDEs.
373 2015-12-01 Mark Wielaard <mjw@redhat.com>
375 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
378 2015-12-01 Mark Wielaard <mjw@redhat.com>
380 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
382 2015-10-14 Chih-Hung Hsieh <chh@google.com>
384 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
385 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
387 2015-10-14 Chih-Hung Hsieh <chh@google.com>
389 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
390 function 'walk_children' to file scope; inline 'recurse' at its call
393 2015-10-19 Mark Wielaard <mjw@redhat.com>
395 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
398 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
400 * dwarf_getsrclines.c (read_srclines): Initialize state early.
402 2015-10-13 Chih-Hung Hsieh <chh@google.com>
404 * dwarf_getsrclines.c (read_srclines): Move nested functions
405 'advance_pc' and 'add_new_line' to file scope and keep many
406 local state variables within one structure.
408 2015-10-13 Chih-Hung Hsieh <chh@google.com>
410 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
411 function 'file_matches' to file scope.
413 2015-10-16 Mark Wielaard <mjw@redhat.com>
415 * Makefile.am (libdw.so): Add -lz.
417 2015-10-14 Chih-Hung Hsieh <chh@google.com>
419 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
420 and 'require_cfa_offset' to file scope.
422 2015-10-09 Josh Stone <jistone@redhat.com>
424 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
427 2015-10-05 Josh Stone <jistone@redhat.com>
429 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
431 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
433 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
434 relocation overflows in some platforms.
436 2015-09-23 Mark Wielaard <mjw@redhat.com>
438 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
439 * dwarf_formref.c (__libdw_formref): Likewise.
440 * libdw_findcu.c (__libdw_findcu): Likewise.
441 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
443 2015-09-22 Mark Wielaard <mjw@redhat.com>
445 * *.c: Remove old-style function definitions.
447 2015-09-15 Mark Wielaard <mjw@redhat.com>
449 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
451 2015-09-09 Chih-Hung Hsieh <chh@google.com>
453 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
454 redundant NULL tests on parameters declared with __nonnull_attribute__.
455 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
456 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
458 2015-09-04 Chih-Hung Hsieh <chh@google.com>
459 Mark Wielaard <mjw@redhat.com>
461 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
462 definition with ansi-C definition and add const qualifier to
465 2015-09-04 Chih-Hung Hsieh <chh@google.com>
467 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
468 definition with ansi-C definitions.
469 (__libdw_findcu): Likewise.
471 2015-08-25 Mark Wielaard <mjw@redhat.com>
473 * dwarf.h: Add DW_LANG_Haskell.
475 2015-06-18 Mark Wielaard <mjw@redhat.com>
477 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
480 2015-06-18 Mark Wielaard <mjw@redhat.com>
482 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
484 2015-06-18 Mark Wielaard <mjw@redhat.com>
486 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
487 dwarf_formudata reports an error.
488 (get_table_for_offset): Likewise.
490 2015-06-08 Mark Wielaard <mjw@redhat.com>
492 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
494 2015-06-06 Mark Wielaard <mjw@redhat.com>
496 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
498 2015-05-27 Mark Wielaard <mjw@redhat.com>
500 * encoded-value.h (read_encoded_value): Check data d_size contains
501 at least enough data to hold a pointer for DW_EH_PE_indirect.
503 2015-05-22 Mark Wielaard <mjw@redhat.com>
505 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
506 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
507 MAX_STACK_DIRS. Calculate number of dirs needed first, then
508 create dirarray directly, without needing the next field. Free
509 not stack allocated lines and files at the end.
511 2015-05-19 Mark Wielaard <mjw@redhat.com>
513 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
514 allocated array to hold locs. Allocate locs bigger than the array
515 with malloc and free them when done.
517 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
519 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
520 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
521 * dwarf_begin_elf.c (inflate_section): New static function, lifted
523 (check_section): ... here. Call inflate_section, set libdw errno to
524 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
526 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
528 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
529 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
531 2015-05-06 Mark Wielaard <mjw@redhat.com>
533 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
534 check the line number.
536 2015-05-05 Mark Wielaard <mjw@redhat.com>
538 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
539 left before reading values.
541 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
543 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
546 2015-04-22 Mark Wielaard <mjw@redhat.com>
548 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
549 (__libdw_max_len_uleb128): New function.
550 (__libdw_max_len_sleb128): Likewise.
551 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
552 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
554 2015-04-21 Mark Wielaard <mjw@redhat.com>
556 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
557 when there are more than 8.
559 2015-04-01 Petr Machata <pmachata@redhat.com>
561 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
562 (is_cudie): New function.
563 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
564 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
565 of white-listing valid tags.
566 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
568 2015-03-18 Petr Machata <pmachata@redhat.com>
570 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
571 (EXTRA_DIST): Remove known-dwarf.h.
573 2015-02-09 Mark Wielaard <mjw@redhat.com>
575 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
576 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
577 for new Fortran language codes is 1.
579 2015-02-09 Mark Wielaard <mjw@redhat.com>
581 * dwarf.h: Add DW_TAG_atomic_type.
582 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
583 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
585 2015-02-11 Josh Stone <jistone@redhat.com>
587 * encoded-value.h (read_encoded_value): Initialize value.
589 2015-02-11 Petr Machata <pmachata@redhat.com>
591 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
592 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
593 the fact in *BASEP and bail out later if it hasn't been updated by
594 __libdw_read_begin_end_pair_inc.
596 2014-12-24 Mark Wielaard <mjw@redhat.com>
598 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
599 smaller than or equal to addr, rather than returning immediately on
602 2015-01-07 Mark Wielaard <mjw@redhat.com>
604 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
605 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
606 room in the search table for all entries. Store search_table_len.
607 (getcfi_scn_eh_frame): Likewise.
608 * encoded-value.h (encoded_value_size): Don't abort, return zero.
609 (__libdw_cfi_read_address_inc): Check there is enough room to read
610 values. Pass other byte order to read functions.
611 (read_encoded_value): Check encoded_value_size. Don't abort, but
612 set libdw errno and report failure. Check there is enough room to
614 * fde.c (binary_search_fde): Check encoded value size. Add hdr
615 data buf and size to dummy_cfi.
617 2015-01-04 Mark Wielaard <mjw@redhat.com>
619 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
620 is after current DIE.
622 2015-01-04 Mark Wielaard <mjw@redhat.com>
624 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
625 (dwarf_frame_register).
627 2015-01-02 Mark Wielaard <mjw@redhat.com>
629 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
630 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
631 (getcfi_scn_eh_frame): Check d_buf is not NULL.
633 2015-01-02 Mark Wielaard <mjw@redhat.com>
635 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
636 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
637 DW_OP_addr if dbg is NULL then read argument directly.
639 2015-01-14 Jason P. Leasure <jpleasu@super.org>
641 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
644 2014-12-27 Mark Wielaard <mjw@redhat.com>
646 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
647 still falls inside CU data.
649 2015-01-11 Mark Wielaard <mjw@redhat.com>
651 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
652 __libdw_visit_scopes with NULL imports.
653 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
654 * dwarf_getscopes.c (pc_record): Likewise.
655 (dwarf_getscopes): Likewise.
656 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
657 * libdwP.h (__libdw_visit_scopes): Add imports argument.
658 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
659 function imports_contains. Push and pop imports around walk_children
660 when processing DW_TAG_imported_unit.
662 2014-12-18 Ulrich Drepper <drepper@gmail.com>
664 * Makefile.am: Suppress output of textrel_check command.
666 2014-12-16 Mark Wielaard <mjw@redhat.com>
668 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
671 2014-12-16 Mark Wielaard <mjw@redhat.com>
673 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
674 space to read die offset.
676 2014-12-16 Mark Wielaard <mjw@redhat.com>
678 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
681 2014-12-15 Mark Wielaard <mjw@redhat.com>
683 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
684 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
685 (dwarf_getpubnames): Make sure section data contains string zero
688 2014-12-16 Mark Wielaard <mjw@redhat.com>
690 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
691 the compiler optimize for the common single-byte case.
693 2014-12-15 Josh Stone <jistone@redhat.com>
695 * memory-access.h (__libdw_max_len_leb128): New.
696 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
697 (__libdw_get_sleb128): Likewise.
699 2014-12-14 Mark Wielaard <mjw@redhat.com>
701 * cfi.c (execute_cfi): Add program bounds checks.
702 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
703 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
704 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
705 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
706 * dwarf_formudata.c (dwarf_formudata): Likewise.
707 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
708 with end of data buf.
709 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
710 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
711 call gets enough data.
712 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
713 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
715 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
717 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
718 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
719 get_uleb128 with lineendp.
720 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
721 get_uleb128 with endp.
722 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
723 get_uleb128/get_sleb128 with limit.
724 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
725 get_sleb128 get called with enough data.
726 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
727 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
728 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
730 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
731 Don't call get_uleb128_step if out of data.
732 (__libdw_get_sleb128): Likewise for get_sleb128_step.
734 2014-12-12 Mark Wielaard <mjw@redhat.com>
736 * libdwP.h (struct Dwarf): Add fake_loc_cu.
738 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
739 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
740 (__libdw_form_val_len): Likewise.
741 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
742 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
743 the already found data buffer directly.
744 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
745 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
746 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
748 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
749 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
750 * dwarf_getlocation_attr.c (attr_form_cu): New function.
751 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
752 (getlocation): Handle empty blocks immediately.
753 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
754 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
755 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
757 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
758 fake_cu. Call __libdw_form_val_len with just fake_cu.
759 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
760 datap and size directly from cu startp and endp.
762 2014-12-11 Mark Wielaard <mjw@redhat.com>
764 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
766 2014-12-13 Mark Wielaard <mjw@redhat.com>
768 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
769 difference doesn't wrap around before returning as int.
771 2014-12-11 Josh Stone <jistone@redhat.com>
773 * dwarf_getsrclines.c (struct linelist): Add sequence.
774 (compare_lines): Take linelists, and break ties by sequence.
775 (read_srclines): Use linelists for sorting.
776 (read_srclines::add_new_line): Set sequence.
778 2014-12-10 Josh Stone <jistone@redhat.com>
780 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
781 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
782 * dwarf_child.c (dwarf_child): Use cu->endp.
783 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
784 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
785 * dwarf_siblingof.c (dwarf_siblingof): Use both.
787 2014-12-10 Josh Stone <jistone@redhat.com>
789 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
791 2014-12-10 Josh Stone <jistone@redhat.com>
793 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
794 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
795 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
796 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
797 * dwarf_tag.c (dwarf_tag): Likewise.
799 2014-12-04 Mark Wielaard <mjw@redhat.com>
801 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
802 (__libdw_form_val_len): Likewise and check len doesn't overflow.
803 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
804 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
806 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
807 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
809 2014-12-02 Petr Machata <pmachata@redhat.com>
811 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
813 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
814 * libdw.h (DWARF_GETMACROS_START): New macro.
816 2014-11-27 Mark Wielaard <mjw@redhat.com>
818 * Makefile.am (libdw.so): Use textrel_check.
820 2014-11-27 Mark Wielaard <mjw@redhat.com>
822 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
823 search_table_entries and search_table_encoding.
825 2014-11-24 Mark Wielaard <mjw@redhat.com>
827 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
830 2014-11-23 Mark Wielaard <mjw@redhat.com>
832 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
833 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
834 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
836 2014-11-23 Mark Wielaard <mjw@redhat.com>
838 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
839 Set libdw errno and return NULL.
841 2014-11-24 Mark Wielaard <mjw@redhat.com>
843 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
844 (DW_LANG_C11): Likewise.
845 (DW_LANG_C_plus_plus_14): Likewise.
846 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
847 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
849 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
852 2014-11-26 Mark Wielaard <mjw@redhat.com>
854 * dwarf.h (DW_AT_noreturn): Added.
856 2014-11-11 Mark Wielaard <mjw@redhat.com>
858 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
859 explicitly as uint8_t.
860 (__libdw_getsrclines): Add internal_function to declaration.
862 2014-09-10 Petr Machata <pmachata@redhat.com>
864 * dwarf_macro_getparamcnt.c: New file.
865 * dwarf_macro_param.c: New file.
866 * dwarf_macro_getsrcfiles.c: New file.
867 * Makefile.am (libdw_a_SOURCES): Add the new files.
868 * libdwP.h (struct files_lines_s): New structure.
869 (DWARF_E_INVALID_OPCODE): New enumerator.
870 (struct Dwarf): New fields macro_ops, files_lines.
871 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
872 keeping macro opcode prototypes in.
873 (Dwarf_Macro_s): Redefine from scratch.
874 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
876 * dwarf_error.c (errmsgs): Add a message for
877 DWARF_E_INVALID_OPCODE.
878 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
880 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
881 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
883 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
884 (get_offset_from, macro_op_compare, build_table)
885 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
886 (cache_op_table, read_macros, gnu_macros_getmacros_off)
887 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
889 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
890 * dwarf_getsrclines.c (read_srclines): New function with guts
891 taken from dwarf_getsrclines.
892 (__libdw_getsrclines): Likewise.
893 (__libdw_getcompdir, files_lines_compare): New functions.
894 (dwarf_getsrclines): Make it dispatch to the new interfaces.
895 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
897 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
898 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
899 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
901 2014-10-06 Mark Wielaard <mjw@redhat.com>
903 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
904 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
905 (aggregate_size): Likewise. Add old and new version.
906 * dwarf_peel_type.c: New file.
907 * libdw.h (dwarf_peel_type): New function declaration.
908 * libdwP.h (dwarf_peel_type): New internal declaration.
909 * libdw.map (ELFUTILS_0.161): New section.
911 2014-10-15 Petr Machata <pmachata@redhat.com>
913 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
914 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
916 2014-10-05 Mark Wielaard <mjw@redhat.com>
918 * dwarf.h: Add DW_AT_GNU_deleted.
920 2014-10-02 Mark Wielaard <mjw@redhat.com>
922 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
923 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
924 DW_TAG_rvalue_reference_type.
926 2014-09-12 Petr Machata <pmachata@redhat.com>
928 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
929 8-byte quantities. Consequently, rename to...
930 (read_addr_unaligned_inc): ... this.
931 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
932 (read_sbyte_unaligned): Drop.
934 2014-09-10 Petr Machata <pmachata@redhat.com>
936 * dwarf_getlocation.c (attr_ok): Also accept
937 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
938 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
940 2014-08-15 Mark Wielaard <mjw@redhat.com>
942 * dwarf_cu_die.c: New file.
943 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
944 * libdw.h (dwarf_cu_die): New function declaration.
945 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
947 2014-08-15 Mark Wielaard <mjw@redhat.com>
949 * dwarf_cu_getdwarf.c: New file.
950 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
951 * libdw.h (Dwarf_CU): New typedef.
952 (dwarf_cu_getdwarf): New function declaration.
953 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
955 2014-06-18 Mark Wielaard <mjw@redhat.com>
957 * dwarf.h: Remove DW_TAG_mutable_type.
959 2014-05-02 Mark Wielaard <mjw@redhat.com>
961 * libdwP.h (__check_build_id): Removed now unused.
963 2014-05-01 Mark Wielaard <mjw@redhat.com>
965 * libdwP.h (struct Dwarf): Remove free_alt.
966 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
967 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
969 2014-04-30 Mark Wielaard <mjw@redhat.com>
971 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
973 2014-04-15 Florian Weimer <fweimer@redhat.com>
975 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
976 (open_debugaltlink): Move to libdwfl.
977 (check_section): Do not locate alternate debuginfo.
979 2014-04-24 Florian Weimer <fweimer@redhat.com>
981 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
983 2014-04-22 Florian Weimer <fweimer@redhat.com>
985 * dwarf_getalt.c, dwarf_setalt.c: New files.
986 * Makefile.am (libdw_a_SOURCES): Add them.
987 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
988 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
990 * libdw.map (ELFUTILS_0.159): Export the two new functions.
992 2014-04-15 Florian Weimer <fweimer@redhat.com>
994 * libdwP.h (enum IDX_gnu_debugaltlink): New.
995 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
997 (check_section): Obtain .gnu_debugaltlink section from the
1000 2014-04-11 Mark Wielaard <mjw@redhat.com>
1002 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1003 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1004 (libdwelf_objects): New variable.
1005 (libdw_a_LIBADD): Add libdwelf objects.
1007 2014-04-22 Mark Wielaard <mjw@redhat.com>
1009 * memory-access.h (get_sleb128_step): Remove undefined behavior
1010 of left shifting a signed value. Replace it with a multiplication.
1012 2014-04-13 Mark Wielaard <mjw@redhat.com>
1014 * Makefile.am: Remove !MUDFLAP conditions.
1016 2014-04-09 Mark Wielaard <mjw@redhat.com>
1018 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1019 before calling malloc to uncompress data.
1021 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1023 Fix abort() on missing section headers.
1024 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1025 New label err to return NULL.
1027 2014-02-05 Josh Stone <jistone@redhat.com>
1029 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1030 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1031 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1033 2013-12-30 Mark Wielaard <mjw@redhat.com>
1035 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1036 dwfl_linux_proc_attach.
1038 2013-12-20 Mark Wielaard <mjw@redhat.com>
1040 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1042 2013-12-18 Mark Wielaard <mjw@redhat.com>
1044 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1045 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1046 dwfl_module_getsym_info.
1048 2013-12-16 Mark Wielaard <mjw@redhat.com>
1050 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1052 2013-12-10 Josh Stone <jistone@redhat.com>
1054 * memory-access.h (get_uleb128_rest_return): Removed.
1055 (get_sleb128_rest_return): Removed.
1056 (get_uleb128_step): Make this a self-contained block.
1057 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1058 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1059 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1060 (__libdw_get_uleb128): Simplify and inline for all callers.
1061 (__libdw_get_sleb128): Ditto.
1062 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1063 * memory-access.c: Delete file.
1064 * Makefile.am (libdw_a_SOURCES): Remove it.
1065 (DEFS): Remove the now unused -DIS_LIBDW.
1067 2013-12-09 Josh Stone <jistone@redhat.com>
1069 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1070 __libdw_form_val_len, now handling only non-constant form lengths.
1071 * libdwP.h (__libdw_form_val_len): New inlined function.
1073 2013-12-09 Mark Wielaard <mjw@redhat.com>
1075 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1076 location expressions.
1077 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1078 location found, return empty location expression.
1079 * dwarf_getlocation_implicit_pointer.c
1080 (dwarf_getlocation_implicit_pointer): Likewise.
1081 (__libdw_empty_loc_attr): New internal function.
1082 * libdwP.h (__libdw_empty_loc_attr): Define.
1084 2013-11-27 Mark Wielaard <mjw@redhat.com>
1086 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1087 dwfl_module_getsym_elf.
1089 2013-11-26 Mark Wielaard <mjw@redhat.com>
1091 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1092 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1093 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1094 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1095 (ELFUTILS_0.158): ... here.
1097 2013-11-09 Mark Wielaard <mjw@redhat.com>
1099 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1100 check that it is zero.
1102 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1104 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1105 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1106 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1107 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1108 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1110 2013-11-01 Michael Forney <mforney@mforney.org>
1112 * Makefile.am (libdwfl_objects): New definition.
1113 (libdw_a_LIBADD): Use libdwfl_objects.
1115 2013-11-01 Michael Forney <mforney@mforney.org>
1117 * Makefile.am: Use READELF.
1119 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1121 * libdw.map (ELFUTILS_0.158): New.
1123 2013-10-10 Mark Wielaard <mjw@redhat.com>
1125 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1126 start_addr and rename last_offset to last_addr. Now both void *.
1127 (tree_visitor): Use start_add and die_addr instead of start_offset
1129 (dwarf_getfuncs): Use last_addr instead of last_offset.
1131 2013-10-06 Mark Wielaard <mjw@redhat.com>
1133 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1134 DW_CFA_val_expression are not used with abi_cfi.
1136 2013-10-03 Josh Stone <jistone@redhat.com>
1138 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1139 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1140 a unit, make sure to always hash the sig8 here, so none are missed.
1142 2013-09-29 Mark Wielaard <mjw@redhat.com>
1144 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1145 uintptr_t before casting to char *.
1146 (__libdw_intern_expression): Cast data to uintptr_t before casting
1148 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1149 op->number2 to uintptr_t before casting to char *.
1151 2013-09-24 Josh Stone <jistone@redhat.com>
1153 * libdw_visit_scopes.c (classify_die): Removed.
1154 (may_have_scopes): New function to replace classify_die. There's no
1155 need for full classification; just find tags that may contain scopes.
1156 (__libdw_visit_scopes): Use a direct tag comparison for imported
1157 units, and use may_have_scopes to test if recursion is needed.
1159 2013-09-20 Mark Wielaard <mjw@redhat.com>
1161 * dwarf_getfuncs.c (visitor_info): New struct.
1162 (tree_visitor): New function.
1163 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1164 * libdw.h (dwarf_getfuncs): Expand function documentation.
1166 2013-09-12 Mark Wielaard <mjw@redhat.com>
1168 * fde.c (intern_fde): Free fde and set libdw errno when start
1169 or end could not be read.
1171 2013-08-24 Mark Wielaard <mjw@redhat.com>
1173 * dwarf_getlocation.c (store_implicit_value): Don't take data
1174 as argument, get block data from op number2. Return false when
1175 block data length and op number don't match up.
1176 (__libdw_intern_expression): Store start of block for
1177 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1178 relative data offset. Also store block start (including length)
1179 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1180 * dwarf_getlocation_attr.c: New file.
1181 * dwarf_getlocation_die.c: Likewise.
1182 * libdw.h (dwarf_getlocation_die): New function definition.
1183 (dwarf_getlocation_attr): Likewise.
1184 * libdwP.h: Declare internal dwarf_getlocation_die.
1185 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1186 dwarf_getlocation_attr.
1187 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1188 dwarf_getlocation_attr.c.
1190 2013-08-23 Mark Wielaard <mjw@redhat.com>
1192 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1193 (attr_base_address): New function.
1194 (initial_offset_base): New function.
1195 (getlocations_addr): New function. Taken from...
1196 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1198 (dwarf_getlocations): New function.
1199 * libdw.h (dwarf_getlocations): New function definition.
1200 * libdw.map (ELFUTILS_0.157): New.
1202 2013-07-02 Mark Wielaard <mjw@redhat.com>
1204 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1205 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1206 NEW_LINE macro. Free malloced line records if any at the end.
1208 2013-07-02 Mark Wielaard <mjw@redhat.com>
1210 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1212 2013-06-26 Mark Wielaard <mjw@redhat.com>
1214 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1215 DIEs without children. Return an error whenever dwarf_child or
1216 dwarf_siblingof return an error. Don't call recurse and increase
1217 the depth for an imported unit. Walk the children of an imported
1218 unit as if they are logical children of the parent root DIE.
1220 2013-05-03 Mark Wielaard <mjw@redhat.com>
1222 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1225 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1227 * libdw.map (ELFUTILS_0.156): New.
1229 2013-04-24 Mark Wielaard <mjw@redhat.com>
1231 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1233 2013-04-10 Mark Wielaard <mjw@redhat.com>
1235 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1236 equal to address size when we have a DW_FORM_ref_addr for DWARF
1239 2013-03-25 Mark Wielaard <mjw@redhat.com>
1241 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1244 2013-03-12 Mark Wielaard <mjw@redhat.com>
1246 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1247 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1249 2013-02-15 Mark Wielaard <mjw@redhat.com>
1251 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1252 not dbg->sectiondata.
1254 2013-01-07 Roland McGrath <roland@hack.frob.com>
1257 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1258 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1260 2012-12-18 Mark Wielaard <mjw@redhat.com>
1262 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1263 (check_section): Likewise on error.
1264 (scngrp_read): Likewise.
1265 (dwarf_begin_elf): Likewise.
1267 2012-10-09 Petr Machata <pmachata@redhat.com>
1269 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1270 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1271 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1272 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1274 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1276 * cfi.c: New include system.h.
1277 (execute_cfi) (enough_registers): Clear new memory after realloc.
1279 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1281 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1282 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1285 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1287 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1288 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1289 Remove the later DW_OP_call_frame_cfa push to RESULT.
1291 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1294 * fde.c (binary_search_fde): Remove always true <address >= start>
1295 conditional. Move L initialization upwards.
1297 2012-08-24 Mark Wielaard <mjw@redhat.com>
1299 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1300 when ENABLE_DWZ is defined.
1301 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1304 2012-08-16 Mark Wielaard <mjw@redhat.com>
1306 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1307 * dwarf.h (DW_LANG_Go): Update comment.
1308 (DW_LANG_Mips_Assembler): Likewise.
1310 2012-06-27 Mark Wielaard <mjw@redhat.com>
1312 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1313 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1314 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1315 (try_debugaltlink): New function.
1316 (open_debugaltlink): Likewise.
1317 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1318 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1320 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1321 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1323 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1324 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1325 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1327 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1328 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1329 (struct Dwarf): Add alt_dwarf and free_alt fields.
1330 (__libdw_read_offset): Add dbg_ret argument, use to check with
1331 __libdw_offset_in_section.
1332 (__check_build_id): New function declaration.
1333 (dwarf_begin): Define as INTDECL.
1334 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1335 and DW_FORM_GNU_strp_alt.
1337 2012-07-19 Mark Wielaard <mjw@redhat.com>
1339 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1341 2012-07-24 Mark Wielaard <mjw@redhat.com>
1343 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1344 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1347 2012-07-24 Mark Wielaard <mjw@redhat.com>
1349 * dwarf.h: Add DW_ATE_UTF.
1351 2012-06-27 Mark Wielaard <mjw@redhat.com>
1353 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1355 2012-06-26 Mark Wielaard <mjw@redhat.com>
1357 * libdwP.h: Add IDX_debug_macro.
1358 * dwarf.h: Add DW_AT_GNU_macros.
1359 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1360 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1362 2012-04-27 Mark Wielaard <mjw@redhat.com>
1364 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1365 a constant offset from DW_AT_low_pc.
1367 2012-03-19 Tom Tromey <tromey@redhat.com>
1369 * libdw_findcu.c (findcu_cb): Move earlier.
1370 (__libdw_intern_next_unit): Add new CU to search tree here...
1371 (__libdw_findcu): ... not here.
1373 2012-01-31 Mark Wielaard <mjw@redhat.com>
1375 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1377 2011-11-31 Mark Wielaard <mjw@redhat.com>
1379 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1381 2011-07-14 Mark Wielaard <mjw@redhat.com>
1383 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1385 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1387 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1388 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1391 2011-04-26 Mark Wielaard <mjw@redhat.com>
1393 * dwarf_child (dwarf_child): Sanity check end of section against
1394 cu_data () of die->cu.
1396 2011-03-22 Mark Wielaard <mjw@redhat.com>
1398 * dwarf.h: Add DW_TAG_GNU_call_site,
1399 DW_TAG_GNU_call_site_parameter,
1400 DW_AT_GNU_call_site_value,
1401 DW_AT_GNU_call_site_data_value,
1402 DW_AT_GNU_call_site_target,
1403 DW_AT_GNU_call_site_target_clobbered,
1404 DW_AT_GNU_tail_call,
1405 DW_AT_GNU_all_tail_call_sites,
1406 DW_AT_GNU_all_call_sites,
1407 DW_AT_GNU_all_source_call_sites,
1408 and DW_OP_GNU_entry_value.
1410 2011-03-10 Petr Machata <pmachata@redhat.com>
1412 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1413 abbreviation with code 0.
1415 2011-03-09 Petr Machata <pmachata@redhat.com>
1417 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1419 2011-02-23 Roland McGrath <roland@redhat.com>
1421 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1422 Declare __libdw_free_zdata.
1423 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1424 (dwarf_end): Call it.
1426 * dwarf_begin_elf.c (valid_p): Likewise.
1427 (check_section, scngrp_read): Likewise.
1428 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1430 2010-10-13 Roland McGrath <roland@redhat.com>
1432 * dwarf.h: Add DW_LANG_Go.
1434 2010-10-05 Roland McGrath <roland@redhat.com>
1436 * dwarf_getaranges.c: Use malloc rather than alloca,
1437 since the total number of elements can be quite huge.
1439 2010-07-26 Roland McGrath <roland@redhat.com>
1441 * dwarf_getlocation_implicit_pointer.c: New file.
1442 * Makefile.am (libdw_a_SOURCES): Add it.
1443 * libdw.map (ELFUTILS_0.149): New set.
1444 Add dwarf_getlocation_implicit_pointer.
1445 * libdw.h: Declare it.
1447 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1448 (dwarf_offdie, dwarf_offdie_types): Update callers.
1449 * libdwP.h: Declare it.
1451 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1452 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1454 2010-08-24 Roland McGrath <roland@redhat.com>
1456 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1458 2010-07-27 Roland McGrath <roland@redhat.com>
1460 * dwarf_formref_die.c: Fix sig8 hash insertion.
1462 2010-06-23 Roland McGrath <roland@redhat.com>
1464 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1465 * libdw.h: Remove it.
1466 * libdw.map: Likewise.
1468 2010-06-22 Roland McGrath <roland@redhat.com>
1470 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1472 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1475 2010-06-21 Roland McGrath <roland@redhat.com>
1477 * dwarf.h: Add DW_TAG_GNU_* constants.
1479 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1482 2010-06-20 Roland McGrath <roland@redhat.com>
1484 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1485 to search TUs instead of CUs.
1486 * libdwP.h: Update decl.
1487 (struct Dwarf): New member tu_tree.
1488 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1489 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1490 (dwarf_offdie): ... here.
1491 (dwarf_offdie_types): New function.
1492 * libdw.h: Declare it.
1493 * libdw.map (ELFUTILS_0.148): Add it.
1495 * libdwP.h (CUDIE): Use cu_data.
1496 * dwarf_formblock.c: Likewise.
1497 * dwarf_formref_die.c: Likewise.
1498 * dwarf_diecu.c: Use CUDIE macro.
1499 * dwarf_formaddr.c: Use cu_sec_idx.
1501 2010-06-16 Roland McGrath <roland@redhat.com>
1503 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1504 we don't repeat a CU lookup we've already done. Handle
1505 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1507 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1509 (__libdw_findcu): ... here. Call it.
1510 * libdwP.h: Declare it.
1511 (struct Dwarf): New member next_tu_offset.
1513 * dwarf_sig8_hash.c: New file.
1514 * dwarf_sig8_hash.h: New file.
1515 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1516 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1518 * libdwP.h (struct Dwarf): New member sig8_hash.
1519 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1520 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1522 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1523 (dwarf_nextcu): ... here. Call it.
1524 * libdw.h: Declare it.
1525 * libdwP.h: Add INTDECL.
1526 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1527 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1529 * libdwP.h (cu_sec_idx, cu_data): New functions.
1530 Use .debug_types when CU is a TU.
1531 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1532 * dwarf_siblingof.c: Likewise.
1533 * dwarf_formstring.c: Likewise.
1534 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1535 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1536 (dwarf_getlocation_addr): Likewise.
1538 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1539 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1540 .debug_types header size instead of .debug_info header size.
1542 * dwarf_diecu.c: Update caller.
1543 * dwarf_getaranges.c: Likewise.
1544 * dwarf_nextcu.c: Likewise.
1545 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1547 * fde.c (fde_by_offset): Renamed to ...
1548 (__libdw_fde_by_offset): ... this, made global and internal_function.
1549 Don't take ADDRESS argument.
1550 (__libdw_find_fde): Update caller. Do address sanity check here.
1551 * cfi.h: Declare __libdw_fde_by_offset.
1552 * cfi.c (dwarf_cfi_validate_fde): New function.
1553 * libdw.h: Declare it.
1554 * libdw.map (ELFUTILS_0.148): Add it.
1556 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1557 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1559 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1560 Don't assume DW_EH_PE_aligned refers to native address size.
1562 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1565 2010-06-17 Roland McGrath <roland@redhat.com>
1567 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1569 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1570 into an inner inline function. Set new fields. Check all fields for
1571 overflow when setting.
1572 * dwarf_lineisa.c: New file.
1573 * dwarf_linediscriminator.c: New file.
1574 * dwarf_lineop_index.c: New file.
1575 * Makefile.am (libdw_a_SOURCES): Add them.
1576 * libdw.map (ELFUTILS_0.148): Add them.
1577 * libdw.h: Declare them.
1579 2010-06-16 Roland McGrath <roland@redhat.com>
1581 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1583 * fde.c (fde_by_offset): Renamed to ...
1584 (__libdw_fde_by_offset): ... this, made global and internal_function.
1585 Don't take ADDRESS argument.
1586 (__libdw_find_fde): Update caller. Do address sanity check here.
1587 * cfi.h: Declare __libdw_fde_by_offset.
1588 * cfi.c (dwarf_cfi_validate_fde): New function.
1589 * libdw.h: Declare it.
1590 * libdw.map (ELFUTILS_0.148): Add it.
1592 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1593 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1595 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1596 Don't assume DW_EH_PE_aligned refers to native address size.
1598 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1601 2010-06-15 Roland McGrath <roland@redhat.com>
1603 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1605 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1606 here, since we don't support it yet.
1608 * dwarf_next_cfi.c: Handle version 4 format.
1610 * dwarf_getsrclines.c: Handle version 4 format.
1612 2010-06-01 Roland McGrath <roland@redhat.com>
1614 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1615 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1617 * libdwP.h (CIE_VERSION): Remove unused macro.
1619 * dwarf_getsrclines.c: Fix version field test.
1620 * libdwP.h (DWARF_VERSION): Remove useless macro.
1622 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1624 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1626 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1628 2010-05-31 Mark Wielaard <mjw@redhat.com>
1630 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1631 * libdw.h (dwarf_cfi_cie_p): ... here.
1633 2010-05-31 Mark Wielaard <mjw@redhat.com>
1635 * dwarf.h: Fix DW_LANG_Python constant.
1637 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1639 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1642 2010-05-27 Roland McGrath <roland@redhat.com>
1644 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1645 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1647 2010-05-08 Roland McGrath <roland@redhat.com>
1649 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1650 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1651 (getlocation): Update caller.
1652 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1653 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1654 * libdwP.h: Update decl.
1656 2010-04-26 Roland McGrath <roland@redhat.com>
1658 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1659 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1660 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1661 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1663 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1664 Prepend DW_OP_call_frame_cfa if true.
1665 (getlocation): Update caller.
1666 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1667 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1668 * libdwP.h: Update decl.
1670 2010-04-22 Roland McGrath <roland@redhat.com>
1672 * cfi.c (execute_cfi): Never return without cleanup.
1674 (cie_cache_initial_state): Adjust caller to expect that free.
1675 (__libdw_frame_at_address): Likewise.
1677 2010-03-10 Roland McGrath <roland@redhat.com>
1679 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1681 2010-02-15 Roland McGrath <roland@redhat.com>
1683 * Makefile.am: Use config/eu.am for common stuff.
1685 2010-02-02 Mark Wielaard <mjw@redhat.com>
1687 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1689 2010-01-07 Roland McGrath <roland@redhat.com>
1691 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1693 2010-01-05 Roland McGrath <roland@redhat.com>
1695 * dwarf_aggregate_size.c: New file.
1696 * Makefile.am (libdw_a_SOURCES): Add it.
1697 * libdw.h: Declare it.
1698 * libdwP.h: Add INTDECL.
1699 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1701 * dwarf_srclang.c: Add INTDEF.
1702 * libdwP.h: Add INTDECL.
1704 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1706 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1708 2009-11-21 Roland McGrath <roland@redhat.com>
1710 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1713 2009-10-15 Roland McGrath <roland@redhat.com>
1715 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1716 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1718 2009-09-17 Roland McGrath <roland@redhat.com>
1720 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1721 argument a pointer to const.
1722 * libdw.h: Update decl.
1724 2009-09-10 Roland McGrath <roland@redhat.com>
1726 * dwarf_getlocation.c (store_implicit_value): New function.
1727 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1728 (dwarf_getlocation_implicit_value): New function.
1729 * libdw.h: Declare it.
1730 * libdw.map (ELFUTILS_0.143): Add it.
1732 2009-09-09 Mark Wielaard <mjw@redhat.com>
1734 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1736 2009-08-21 Josh Stone <jistone@redhat.com>
1738 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1740 2009-08-10 Roland McGrath <roland@redhat.com>
1742 * dwarf_getscopevar.c: Use dwarf_diename.
1744 2009-08-09 Roland McGrath <roland@redhat.com>
1746 * libdw.map (ELFUTILS_0.143): New version set,
1747 inherits from ELFUTILS_0.142.
1748 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1749 alias in the ELFUTILS_0.122 version set and the default in the new set.
1750 * dwarf_srclang.c: Likewise.
1751 * dwarf_decl_file.c: Likewise.
1752 * dwarf_decl_line.c: Likewise.
1753 * dwarf_decl_column.c: Likewise.
1754 * dwarf_bytesize.c: Likewise.
1755 * dwarf_bitsize.c: Likewise.
1756 * dwarf_bitoffset.c: Likewise.
1758 2009-08-07 Roland McGrath <roland@redhat.com>
1760 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1761 * dwarf_srclang.c: Likewise.
1762 * dwarf_decl_file.c: Likewise.
1763 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1764 * dwarf_bytesize.c: Likewise.
1765 * dwarf_bitsize.c: Likewise.
1766 * dwarf_bitoffset.c: Likewise.
1768 2009-07-22 Roland McGrath <roland@redhat.com>
1770 * dwarf_frame_cfa.c: Change calling convention.
1771 * libdw.h: Update decl.
1773 * dwarf_frame_register.c: Change calling/return-value convention for
1774 value-only results and undefined/same_value.
1775 * libdw.h: Update decl.
1777 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1778 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1779 return that value instead.
1780 (getlocation): Update caller.
1781 * dwarf_frame_cfa.c: Likewise.
1782 * libdwP.h: Update decl.
1784 2009-07-21 Roland McGrath <roland@redhat.com>
1786 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1787 Fix loop iteration after skipping a bogus or useless CU.
1789 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1790 absence, not DWARF_E_NO_DEBUG_LINE.
1792 2009-07-20 Roland McGrath <roland@redhat.com>
1794 * dwarf_getlocation.c (__libdw_intern_expression):
1795 Handle DW_OP_stack_value.
1797 2009-07-16 Roland McGrath <roland@redhat.com>
1799 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1800 reject others when CU's version > 3.
1802 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1804 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1805 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1806 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1807 and DW_AT_const_expr.
1808 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1809 and DW_FORM_ref_sig8.
1811 2009-07-15 Roland McGrath <roland@redhat.com>
1813 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1814 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1816 2009-07-13 Roland McGrath <roland@redhat.com>
1818 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1820 2009-07-08 Roland McGrath <roland@redhat.com>
1822 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1825 * libdwP.h (struct Dwarf): Add member `cfi'.
1826 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1827 * dwarf_getcfi.c: New file.
1828 * dwarf_getcfi_elf.c: New file.
1829 * dwarf_cfi_end.c: New file.
1830 * dwarf_cfi_addrframe.c: New file.
1831 * dwarf_frame_cfa.c: New file.
1832 * dwarf_frame_register.c: New file.
1833 * dwarf_frame_return_address_register.c: New file.
1834 * Makefile.am (libdw_a_SOURCES): Add them.
1835 * unwind.h: Declare those functions.
1836 * libdw.map (ELFUTILS_0.142): Export them.
1838 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1840 (getlocation): ... here, call it.
1841 * libdwP.h: Declare it.
1845 * frame-cache.c: New file.
1848 * encoded-value.h: New file.
1849 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1850 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1851 * dwarf_error.c (errmsgs): Add element for it.
1853 * dwarf_next_cfi.c: New file.
1854 * Makefile.am (libdw_a_SOURCES): Add it.
1855 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1856 Declare dwarf_next_cfi.
1857 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1860 * memory-access.h [! ALLOW_UNALIGNED]
1861 (read_2ubyte_unaligned): Renamed to ...
1862 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1863 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1864 (read_2sbyte_unaligned): Likewise.
1865 (read_4ubyte_unaligned): Likewise.
1866 (read_4sbyte_unaligned): Likewise.
1867 (read_8ubyte_unaligned): Likewise.
1868 (read_8sbyte_unaligned): Likewise.
1870 * libdwP.h (IDX_eh_frame): Remove it.
1871 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1873 2009-07-08 Roland McGrath <roland@redhat.com>
1875 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1877 * dwarf_getlocation.c (check_constant_offset): New function.
1878 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1879 handle DW_AT_data_member_location of data[48] as constant offset.
1881 2009-06-18 Roland McGrath <roland@redhat.com>
1883 * libdwP.h (__libdw_read_address_inc): Constify.
1884 (__libdw_read_offset_inc): Likewise.
1885 * dwarf_getaranges.c: Likewise.
1886 * dwarf_getlocation.c: Likewise.
1887 * dwarf_getsrclines.c: Likewise.
1888 * dwarf_nextcu.c: Likewise.
1890 2009-05-05 Petr Machata <pmachata@redhat.com>
1892 * libdwP.h (__libdw_formptr): Declare new function.
1893 * dwarf_formudata.c: Implement it here.
1894 * dwarf_getlocation.c (dwarf_getlocation_addr):
1895 Call it instead of hand-rolled offset handling code.
1896 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1897 * dwarf_ranges.c (dwarf_ranges): Likewise.
1899 2009-05-04 Petr Machata <pmachata@redhat.com>
1901 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1902 * dwarf_ranges.c: Implement it here.
1903 (dwarf_ranges): Call it.
1904 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1906 2009-04-23 Petr Machata <pmachata@redhat.com>
1908 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1909 of read_*ubyte_unaligned.
1910 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1911 * dwarf_formstring.c (dwarf_formstring): Likewise.
1912 * dwarf_formudate.c (dwarf_formudata): Likewise.
1913 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1914 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1915 * dwarf_getpubnames.c (get_offsets): Likewise.
1916 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1918 2009-04-23 Petr Machata <pmachata@redhat.com>
1920 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1921 __libdw_read_addr, __libdw_read_off): Add four new internal
1924 2009-05-07 Roland McGrath <roland@redhat.com>
1926 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1927 return value and OFFSET argument, not CU-relative. Only fetch the
1928 attribute data when called with OFFSET of 0.
1930 2009-05-07 Petr Machata <pmachata@redhat.com>
1932 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1933 DW_AT_macro_info attribute of CU DIE.
1935 2009-04-15 Roland McGrath <roland@redhat.com>
1937 * dwarf.h (DW_CIE_ID): Removed.
1938 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1940 2009-04-01 Roland McGrath <roland@redhat.com>
1942 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1944 2009-01-28 Roland McGrath <roland@redhat.com>
1946 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1947 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1949 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1951 2009-01-26 Roland McGrath <roland@redhat.com>
1953 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1955 2009-01-25 Roland McGrath <roland@redhat.com>
1957 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1959 2009-01-23 Roland McGrath <roland@redhat.com>
1961 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1962 Put these rules under if MAINTAINER_MODE.
1964 2009-01-22 Roland McGrath <roland@redhat.com>
1966 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1968 2009-01-21 Roland McGrath <roland@redhat.com>
1970 * Makefile.am (CLEANFILES): Renamed to ...
1971 (MOSTLYCLEANFILES): ... here.
1972 (CLEANFILES): New variable, add known-dwarf.h.
1974 2009-01-17 Roland McGrath <roland@redhat.com>
1976 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1977 Make it unconditional.
1978 (BUILT_SOURCES): Updated.
1980 * dwarf.h: Add description comments for DW_LANG_* values.
1982 * Makefile.am [MAINTAINER_MODE]
1983 ($(srcdir)/known-dwarf.h): New target.
1984 (BUILT_SOURCES): Add it.
1986 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1988 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1990 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1992 2009-01-08 Roland McGrath <roland@redhat.com>
1994 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1996 2008-01-06 Roland McGrath <roland@redhat.com>
1998 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2000 * dwarf_haschildren.c: Return -1 for error case, not 0.
2002 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2004 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2006 * dwarf.h: Add definition for unwind and call frame information.
2008 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2009 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2011 2008-08-15 Roland McGrath <roland@redhat.com>
2013 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2014 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2016 2008-01-21 Ulrich Drepper <drepper@redhat.com>
2018 * dwarf_child.c: Minor optimizations.
2019 * dwarf_getattrs.c: Likewise.
2020 * dwarf_getpubnames.c: Likewise.
2021 * dwarf_siblingof.c: Likewise.
2022 * dwarf_tag.c: Likewise.
2024 2008-01-18 Ulrich Drepper <drepper@redhat.com>
2026 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2027 of DWARF_VERSION comparison, just fail if the file's version is newer.
2029 2008-01-17 Nick Clifton <nickc@redhat.com>
2031 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2032 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2033 (DWARF3_LENGTH_64_BIT): New define.
2034 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2035 * dwarf_getpubnames: Include dwarf.h.
2036 (get_offsets): Use the new definitions.
2037 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2038 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2039 (dwarf_nextcu): Use the new definitions.
2041 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2042 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2043 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2044 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2046 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2049 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2051 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2052 Set the address in the return structure to the address of the next
2053 non-sibling die, if there is no sibling and the return pointer is
2054 not the same as the die pointer.
2055 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2057 * dwarf_child.c: Fix typo in comment.
2059 * libdwP.h (DWARF_VERSION): Change to 3.
2061 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2062 not have a initialised valp pointer.
2064 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2065 the end of the attributes is reached. When the callback fails,
2066 return the address of the failing attribute, not the address of
2068 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2070 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2071 (dwarf_child): Likewise.
2072 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2073 (dwarf_tag): Likewise.
2075 2008-01-08 Roland McGrath <roland@redhat.com>
2077 * Makefile.am (euinclude): Variable removed.
2078 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2079 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
2081 2007-10-17 Roland McGrath <roland@redhat.com>
2083 * libdw.h (__deprecated_attribute__): New macro.
2084 (dwarf_formref): Mark it deprecated.
2085 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2086 (dwarf_formref): ... here. Call it. Remove INTDEF.
2087 * libdwP.h: Remove INTDECL.
2088 Declare __libdw_formref.
2089 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2090 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2092 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2093 needs to check CU->version.
2095 * libdwP.h (struct Dwarf_CU): New member `version'.
2096 * libdw_findcu.c (__libdw_findcu): Initialize it.
2098 * dwarf_child.c: Return 1 for null entry as first child.
2100 2007-10-05 Roland McGrath <roland@redhat.com>
2102 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2104 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2105 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2107 2007-10-03 Roland McGrath <roland@redhat.com>
2109 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2110 and dwfl_build_id_find_debuginfo.
2112 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2113 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2115 2007-10-02 Roland McGrath <roland@redhat.com>
2117 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2120 2007-08-07 Roland McGrath <roland@redhat.com>
2122 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2123 error code is DWARF_E_NOERROR (0).
2125 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2126 Fix typo in __libdw_visit_scopes argument.
2128 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2129 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2131 2007-07-03 Roland McGrath <roland@redhat.com>
2133 * libdw.h (__extern_inline): New macro.
2134 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2136 2007-04-16 Roland McGrath <roland@redhat.com>
2138 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2140 2007-04-05 Roland McGrath <roland@redhat.com>
2142 * dwarf_getsrcdirs.c: New file.
2143 * Makefile.am (libdw_a_SOURCES): Add it.
2144 * libdw.h: Declare dwarf_getsrcdirs.
2145 * libdw.map (ELFUTILS_0.127): Add it.
2147 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2148 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2149 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2150 Save DIRARRAY in the Dwarf_Files.
2152 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
2153 address to check for all-ones base address entry. Check directly.
2154 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2156 2007-03-25 Roland McGrath <roland@redhat.com>
2158 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2159 Return NULL when freeing RESULT on error.
2160 (global_read, scngrp_read): Check return value from check_section,
2161 break out of loop after it has freed RESULT.
2162 (valid_p): Handle null argument.
2164 2007-03-12 Roland McGrath <roland@redhat.com>
2166 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2168 2007-03-04 Roland McGrath <roland@redhat.com>
2170 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2171 ELFUTILS_0.126. Add dwfl_module_addrsym.
2173 2007-02-10 Roland McGrath <roland@redhat.com>
2175 * dwarf.h (DW_OP_fbreg): Comment fix.
2177 2007-02-03 Roland McGrath <roland@redhat.com>
2179 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2180 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2181 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2182 exported in the past.
2184 2006-12-17 Roland McGrath <roland@redhat.com>
2186 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2187 address when the CU is missing attributes due to buggy GCC.
2189 2006-08-29 Roland McGrath <roland@redhat.com>
2191 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2193 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2194 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2196 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2197 result is aligned. Adjust NEWP->remaining here for this allocation.
2198 * libdwP.h: Update decl.
2199 (libdw_alloc): Update caller.
2201 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2203 * dwarf_child.c: Adjust for internal_function_def removal.
2204 * dwarf_getabbrev.c: Likewise.
2205 * dwarf_tag.c: Likewise.
2206 * libdw_form.c: Likewise.
2207 * memory-access.c: Likewise.
2209 2006-06-28 Roland McGrath <roland@redhat.com>
2211 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2213 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2216 2006-05-27 Ulrich Drepper <drepper@redhat.com>
2218 * libdw.h: Add extern "C".
2220 2006-05-22 Ulrich Drepper <drepper@redhat.com>
2222 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2223 aranges information.
2225 2006-05-21 Ulrich Drepper <drepper@redhat.com>
2227 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2230 2006-02-28 Roland McGrath <roland@redhat.com>
2232 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2233 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2234 values from DWARF 3.0.
2236 2006-02-22 Roland McGrath <roland@redhat.com>
2238 * libdw.map: Bump to 0.120; export dwfl_version.
2240 2005-12-22 Roland McGrath <roland@redhat.com>
2242 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2244 2005-12-12 Roland McGrath <roland@redhat.com>
2246 * dwarf_ranges.c: Copy CU base address-finding code from
2249 2005-12-09 Roland McGrath <roland@redhat.com>
2251 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2252 Delay CU base lookup until it's needed.
2253 If CU base lookup fails with no error, flag invalid DWARF.
2255 2005-11-25 Roland McGrath <roland@redhat.com>
2257 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2259 2005-11-15 Roland McGrath <roland@redhat.com>
2261 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2263 2005-11-13 Roland McGrath <roland@redhat.com>
2265 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2267 2005-10-27 Roland McGrath <roland@redhat.com>
2269 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2270 don't match end_sequence markers.
2272 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2273 before normal records at the same address.
2274 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2277 2005-10-26 Roland McGrath <roland@redhat.com>
2279 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2280 * dwarf_func_file.c: Renamed to ...
2281 * dwarf_decl_file.c: ... here.
2282 * dwarf_func_col.c: Renamed to ...
2283 * dwarf_decl_column.c: ... here.
2284 * dwarf_func_line.c: Renamed to ...
2285 * dwarf_decl_line.c: ... here.
2286 (dwarf_func_line): Renamed to ...
2287 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2288 (__libdw_func_intval): Renamed __libdw_attr_intval.
2289 * dwarf_func_name.c: File removed.
2290 * dwarf_func_lowpc.c: File removed.
2291 * dwarf_func_highpc.c: File removed.
2292 * dwarf_func_entrypc.c: File removed.
2293 * dwarf_func_die.c: File removed.
2294 * Makefile.am (libdw_a_SOURCES): Updated.
2295 * libdw.h: Update decls.
2296 (Dwarf_Func): Type removed.
2297 * libdwP.h: Update decls.
2298 (struct Dwarf_Func_s): Type removed.
2299 * libdw.map: Updated.
2301 * libdwP.h (CUDIE): New macro.
2302 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2303 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2304 * dwarf_ranges.c (dwarf_ranges): Likewise.
2306 * dwarf_getloclist.c: Renamed to ...
2307 * dwarf_getlocation.c: ... here.
2308 (getloclist): Renamed to getlocation.
2309 (dwarf_getloclist): Renamed to dwarf_getlocation.
2310 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2311 * Makefile.am (libdw_a_SOURCES): Updated.
2312 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2313 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2314 (Dwarf_Loc): Renamed Dwarf_Op.
2315 * libdwP.h (struct loc_s): Update use.
2316 * libdw.map: Update map.
2318 * dwarf_entry_breakpoints.c: Use the second line record within the
2319 function, regardless of its source location data.
2321 2005-10-25 Roland McGrath <roland@redhat.com>
2323 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2325 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2327 2005-10-14 Roland McGrath <roland@redhat.com>
2329 * dwarf_diecu.c (dwarf_diecu): New file.
2330 * Makefile.am (libdw_a_SOURCES): Add it.
2331 * libdw.h: Declare dwarf_diecu.
2332 * libdw.map: Export it.
2334 * libdw.map: Bump to 0.116; export dwarf_ranges.
2336 2005-09-20 Roland McGrath <roland@redhat.com>
2338 * dwarf_haspc.c: Use dwarf_ranges.
2339 * dwarf_entry_breakpoints.c: Likewise.
2341 * dwarf_ranges.c: New file.
2342 * Makefile.am (libdw_a_SOURCES): Add it.
2343 * libdw.h: Declare dwarf_ranges.
2344 * libdwP.h: Add INTDECL.
2346 2005-09-14 Roland McGrath <roland@redhat.com>
2348 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2349 prologue_end marker scanning loop.
2351 2005-09-11 Roland McGrath <roland@redhat.com>
2353 * dwarf.h: Comment typo fix.
2355 2005-09-07 Roland McGrath <roland@redhat.com>
2357 * dwarf_entry_breakpoints.c: New file.
2358 * Makefile.am (libdw_a_SOURCES): Add it.
2359 * libdw.h: Declare dwarf_entry_breakpoints.
2361 * dwarf_entrypc.c: New file.
2362 * Makefile.am (libdw_a_SOURCES): Add it.
2363 * libdw.h: Declare dwarf_entrypc.
2364 * libdwP.h: Add INTDECL.
2366 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2368 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2369 (%.os): Use COMPILE.os.
2370 (COMPILE.os): Filter out gconv options.
2372 2005-08-27 Roland McGrath <roland@redhat.com>
2374 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2375 __libdw_visit_scopes.
2377 * dwarf_getscopes_die.c: New file.
2378 * Makefile.am (libdw_a_SOURCES): Add it.
2379 * libdw.h: Declare dwarf_getscopes_die.
2380 * libdw.map: Bump to 0.115 and add it.
2382 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2383 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2384 Take two functions for both preorder and postorder visitors.
2385 * libdwP.h: Update decl.
2386 (struct Dwarf_Die_Chain): New type.
2387 * dwarf_func_inline.c: Update uses.
2389 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2391 * libdwP.h: Add INTDECL.
2392 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2394 2005-08-23 Roland McGrath <roland@redhat.com>
2396 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2397 DW_AT_specification the same as DW_AT_abstract_origin.
2399 2005-08-20 Roland McGrath <roland@redhat.com>
2401 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2402 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2403 and dwfl_report_offline.
2405 2005-08-19 Roland McGrath <roland@redhat.com>
2407 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2408 Add dwfl_module_relocate_address, dwfl_module_relocations,
2409 dwfl_module_relocation_info.
2411 2005-08-18 Roland McGrath <roland@redhat.com>
2413 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2414 outermost scope in the results.
2416 2005-08-15 Roland McGrath <roland@redhat.com>
2418 * dwarf_func_inline.c: New file.
2419 * Makefile.am (libdw_a_SOURCES): Add it.
2420 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2421 * libdw.map: Add them.
2423 * dwarf_func_die.c: New file.
2424 * Makefile.am (libdw_a_SOURCES): Add it.
2425 * libdw.h: Declare dwarf_func_die.
2426 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2428 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2430 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2431 of DW_LNS_set_epilog_begin.
2433 2005-08-09 Roland McGrath <roland@redhat.com>
2435 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2437 * dwarf_end.c: Add INTDEF.
2438 * dwarf_error.c (dwarf_errmsg): Likewise.
2439 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2441 2005-08-01 Roland McGrath <roland@redhat.com>
2443 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2444 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2446 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2448 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2449 (libdw_a_LIBADD): Add all files from libdwfl.a.
2451 2005-07-27 Roland McGrath <roland@redhat.com>
2453 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2454 along with ../libebl/libebl.a and ../lib/libeu.a;
2455 depend on ../libelf/libelf.so.
2456 (libdw_so_LDADD): New variable.
2457 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2459 * libdw.map: Define an empty base version and move all symbols to
2460 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2462 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2464 * dwarf_error.c: Add internal alias for dwarf_errno.
2465 * libdwP.h: Declare __dwarf_errno_internal.
2466 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2468 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2471 2005-06-01 Roland McGrath <roland@redhat.com>
2473 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2474 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2476 2005-06-08 Roland McGrath <roland@redhat.com>
2478 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2479 (get_sleb128_step, get_sleb128): Likewise.
2480 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2481 * dwarf_getloclist.c (getloclist): Likewise.
2482 * dwarf_formblock.c (dwarf_formblock): Likewise.
2483 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2484 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2485 * dwarf_formref.c (dwarf_formref): Likewise.
2486 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2487 * dwarf_formudata.c (dwarf_formudata): Likewise.
2488 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2489 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2490 * dwarf_tag.c (dwarf_tag): Likewise.
2491 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2492 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2493 * libdw_form.c (__libdw_form_val_len): Likewise.
2494 * libdwP.h: Update decl.
2496 2005-06-04 Roland McGrath <roland@redhat.com>
2498 * memory-access.h (get_uleb128_rest_return): New macro.
2499 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2500 (get_sleb128_rest_return): New macro.
2501 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2502 * memory-access.c: New file.
2503 * Makefile.am (libdw_a_SOURCES): Add it.
2504 (DEFS): Add -DIS_LIBDW.
2506 2005-05-31 Roland McGrath <roland@redhat.com>
2508 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2511 2005-05-30 Roland McGrath <roland@redhat.com>
2513 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2514 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2516 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2517 BEGIN value. Instead, match base address entries separately for
2520 2005-05-28 Roland McGrath <roland@redhat.com>
2522 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2523 past location expression contents.
2525 2005-05-23 Roland McGrath <roland@redhat.com>
2527 * dwarf_getsrclines.c: Comment typo fix.
2529 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2530 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2532 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2534 * libdwP.h: Only use INTDECL for alias prototypes.
2536 2005-05-19 Roland McGrath <roland@redhat.com>
2538 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2540 * dwarf_getscopevar.c: New file.
2541 * Makefile.am (libdw_a_SOURCES): Add it.
2542 * libdw.h: Declare dwarf_getscopevar.
2544 * dwarf_getsrcfiles.c: Add INTDEF.
2545 * dwarf_haschildren.c: Likewise.
2546 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2548 * dwarf_getscopes.c: New file.
2549 * Makefile.am (libdw_a_SOURCES): Add it.
2550 * libdw.h: Declare dwarf_getscopes.
2551 * libdw.map: Add it.
2553 2005-05-18 Roland McGrath <roland@redhat.com>
2555 * libdwP.h (IDX_debug_ranges): New enum constant.
2556 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2557 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2558 * dwarf_error.c (errmsgs): Add it.
2559 * dwarf_haspc.c: New file.
2560 * libdw.h: Declare dwarf_haspc.
2561 * libdw.map: Add it.
2562 * libdwP.h: Add INTDECL.
2564 * dwarf_attr_integrate.c: New file.
2565 * dwarf_hasattr_integrate.c: New file.
2566 * Makefile.am (libdw_a_SOURCES): Add them.
2567 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2568 * libdw.map: Add them.
2570 * dwarf_hasattr.c: Add INTDEF.
2571 * libdwP.h: Add INTDECL for it.
2573 * dwarf_formref_die.c: New file.
2574 * Makefile.am (libdw_a_SOURCES): Add it.
2575 * libdw.h (dwarf_formref_die): Declare it.
2576 * libdwP.h (dwarf_formref_die): Add INTDECL.
2577 * libdw.map: Add it.
2579 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2581 (dwarf_getloclist): ... here. Call them.
2582 (dwarf_addrloclists): New function.
2583 * libdw.h: Declare it.
2584 * libdw.map: Add it.
2586 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2587 DW_MACINFO_end_file. Recognize type 0 as terminator.
2589 2005-05-05 Roland McGrath <roland@redhat.com>
2591 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2593 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2594 the line program does not produce all entries in ascending order.
2596 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2598 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2599 occurences (e.g., inlines) better.
2601 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2603 * libdw.h (DWARF_END_ABBREV): Define.
2604 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2606 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2608 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2609 as error of __libdw_getabbrev.
2611 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2613 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2615 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2616 results back to caller.
2618 2005-04-04 Roland McGrath <roland@redhat.com>
2620 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2622 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2625 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2627 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2629 * dwarf_getsrc_file.c: New file.
2630 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2631 * libdw.h: Declare dwarf_getsrc_file.
2632 * libdw.map: Add dwarf_getsrc_file.
2634 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2636 * dwarf_func_entrypc.c: New file.
2637 * dwarf_func_col.c: New file.
2638 * dwarf_func_line.c: New file.
2639 * dwarf_func_file.c: New file.
2640 * libdw.h: Add prototypes for new functions.
2641 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2643 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2644 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2645 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2646 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2647 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2648 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2650 * dwarf.h: Add some DWARF3 definitions.
2652 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2654 * dwarf_getfuncs.c: New file.
2655 * dwarf_func_highpc.c: New file.
2656 * dwarf_func_lowpc.c: New file.
2657 * dwarf_func_name.c: New file.
2658 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2659 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2660 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2661 and dwarf_func_name.
2662 * libdw.h: Add prototypes for new functions.
2663 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2664 * dwarf_siblingof.c: Likewise.
2665 * dwarf_dieoffset.c: Likewise.
2666 * dwarf_highpc.c: Likewise.
2667 * dwarf_lowpc.c: Likewise.
2668 * libdwP.h: Add prototypes for internal functions.
2669 Define Dwarf_Func_s structure.
2671 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2673 * libdw.h: Add padding in Dwarf_die.
2675 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2676 * dwarf_attr.c: Likewise.
2677 * dwarf_begin.c: Likewise.
2678 * dwarf_begin_elf.c: Likewise.
2679 * dwarf_bitoffset.c: Likewise.
2680 * dwarf_bitsize.c: Likewise.
2681 * dwarf_bytesize.c: Likewise.
2682 * dwarf_diename.c: Likewise.
2683 * dwarf_formaddr.c: Likewise.
2684 * dwarf_formblock.c: Likewise.
2685 * dwarf_formref.c: Likewise.
2686 * dwarf_formstring.c: Likewise.
2687 * dwarf_formudata.c: Likewise.
2688 * dwarf_getarange_addr.c: Likewise.
2689 * dwarf_getarangeinfo.c: Likewise.
2690 * dwarf_getaranges.c: Likewise.
2691 * dwarf_getloclist.c: Likewise.
2692 * dwarf_getmacros.c: Likewise.
2693 * dwarf_getsrc_die.c: Likewise.
2694 * dwarf_getsrcfiles.c: Likewise.
2695 * dwarf_getsrclines.c: Likewise.
2696 * dwarf_highpc.c: Likewise.
2697 * dwarf_lowpc.c: Likewise.
2698 * dwarf_nextcu.c: Likewise.
2699 * dwarf_offdie.c: Likewise.
2700 * dwarf_siblingof.c: Likewise.
2701 * dwarf_srclang.c: Likewise.
2702 * dwarf_tag.c: Likewise.
2703 * libdw_findcu.c: Likewise.
2704 * libdwP.h: Add prototypes for internal functions.
2706 * dwarf_addrdie.c: New file.
2707 * dwarf_macro_opcode.c: New file.
2708 * dwarf_macro_param1.c: New file.
2709 * dwarf_macro_param2.c: New file.
2710 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2711 * libdwP.h: Remove Dwarf_Macro definition.
2712 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2713 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2714 * libdw.map: Add entries for new functions.
2716 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2718 * libdw.h: Handle broken gcc < 4.
2720 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2722 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2724 * dwarf_begin_elf.c: Fix warnings.
2725 * dwarf_dieoffset.c: Likewise.
2726 * dwarf_end.c: Likewise.
2727 * dwarf_error.c: Likewise.
2728 * dwarf_getpubnames.c: Likewise.
2730 * libdwP.h: Add new error values.
2731 * dwarf_error.c: Support new error values.
2732 * dwarf_getpubnames.c: Check parameter value.
2734 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2736 * Makefile.am: Check for text relocations in constructed DSO.
2738 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2740 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2742 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2743 checks to not read over buffer boundaries for ill-formed DWARF data.
2745 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2747 * dwarf_child.c: Make compile with gcc 4.0.
2748 * dwarf_error.c: Likewise.
2749 * dwarf_formblock.c: Likewise.
2750 * dwarf_getabbrev.c: Likewise.
2751 * dwarf_getattrs.c: Likewise.
2752 * dwarf_getsrclines.c: Likewise.
2753 * dwarf_tag.c: Likewise.
2754 * libdw_form.c: Likewise.
2756 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2758 * Makefile.am: Support building with mudflap.
2760 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2761 * dwarf_getsrclines.c: Likewise.
2762 * dwarf_memory-access.h: Likewise.
2764 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2766 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2768 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2769 Third parameter of dwarf_getsrcfiles can be NULL.
2771 * libdw.map: Add dwarf_getmacros.
2772 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2773 * dwarf_getmacros.c: New file.
2775 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2777 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2779 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2781 * dwarf_getsrclines.c:
2782 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2784 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2786 * libdwP.h (_): Use elfutils domain.
2788 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2790 * dwarf_getsrclines.c: Fix typo in comment.
2792 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2794 * Makefile.am: Support building with mudflap.
2796 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2798 * memory-access.h: Add lots of const in case a pointer passed is const.
2800 * dwarf_formflag.c: New file.
2801 * dwarf_getattrs.c: New file.
2802 * dwarf_error.c: Add new error value.
2803 * libdw.h: Add prototypes for new functions. Adjust prototype for
2805 * libdw.map: Add new functions.
2806 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2808 * libdwP.h: Add new error value.
2809 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2812 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2814 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2816 * dwarf_getarange_addr.c: New file
2817 * dwarf_getarangeinfo.c: New file.
2818 * dwarf_getaranges.c: New file.
2819 * dwarf_onerange.c: New file.
2820 * libdw.h: Declare new functions. Define Dwarf_Arange and
2822 * libdw.map: Add new functions.
2823 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2824 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2825 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2826 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2827 * dwarf_error.c: Add new message.
2829 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2831 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2832 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2833 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2834 * dwarf_error.c: Add another message.
2835 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2837 * dwarf_filesrc.c: Likewise.
2838 * dwarf_getsrcfiles.c: Likewise.
2839 * dwarf_getsrclines.c: Likewise.
2840 * dwarf_lineaddr.c: New file.
2841 * dwarf_linebeginstatement.c: New file.
2842 * dwarf_lineblock.c: New file.
2843 * dwarf_linecol.c: New file.
2844 * dwarf_lineendsequence.c: New file.
2845 * dwarf_lineepiloguebegin.c: New file.
2846 * dwarf_lineno.c: New file.
2847 * dwarf_lineprologueend.c: New file.
2848 * dwarf_onesrcline.c: New file.
2849 * dwarf_lineno.c: Change interface to store result in object pointed
2850 to by second parameter.
2851 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2852 prototype. Define Dwarf_Files and Dwarf_Lines.
2853 * libdw.map: Add new functions.
2854 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2855 * libdw_findcu.c: Don't initialize nlines field.
2857 * dwarf_siblingof: Little optimization.
2859 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2860 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2861 * libdwP.h (struct Dwarf): Add free_elf field.
2863 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2865 * dwarf_getstring.c: New file.
2866 * dwarf_offabbrev.c: New file.
2867 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2868 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2869 parameters. Don't allocate memory if not necessary and don't lookup
2870 previous results if no CU given.
2871 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2872 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2873 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2874 * libdwP.h: Change prototype for __libdw_getabbrev.
2876 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2877 returning if this is wanted.
2879 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2881 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2882 with offset_size value.
2883 * libdw.h: Adjust dwarf_nextcu prototype.
2884 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2885 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2886 member of new CU struct.
2887 * dwarf_formstring.c: Depend on offset_size not address_size for
2888 DW_FORM_strp handling.
2889 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2891 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2893 (dwarf_tag): Correctly recognize failed lookup.
2895 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2897 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2898 * dwarf_formblock.c: New file.
2899 * dwarf_getloclist.c: Rewrite to handle a single block.
2900 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2901 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2902 dwarf_getloclistent declaration.
2903 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2904 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2905 Add locs member to struct Dwarf_CU.
2906 * libdw_fundcu.c: Initialize locs member of new CU.
2907 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2908 Remove dwarf_getloclistent.c.
2910 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2912 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2913 * libdwP.h: Likewise.
2915 * dwarf_getloclist.c: New file.
2916 * dwarf_getloclistent.c: New file.
2917 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2918 Declare dwarf_getloclistent and dwarf_getloclist.
2919 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2920 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2921 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2924 * dwarf_error.c: More error messages.
2926 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2928 * dwarf_getsrclines.c: Remove debugging support.
2930 * dwarf_getsrcfiles.c: New file.
2931 * dwarf_filesrc.c: New file.
2932 * libdw.h: Declare these functions. Define Dwarf_File.
2933 * libdwP.c: Adjust Dwarf_File_s definition.
2934 * libdw.map: Add these functions.
2935 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2937 * dwarf_getsrclines.c: Initialize cu->files.
2939 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2941 * libdw.h: Add more nonnull function attributes.
2943 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2944 * dwarf_end.c (cu_free): New function.
2945 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2946 * dwarf_error.c (errmsgs): Add new messages.
2947 * dwarf_getsrc_die.c: New file.
2948 * dwarf_getsrclines.c: New file.
2949 * dwarf_lineno.c: New file.
2950 * dwarf_linesrc.c: New file.
2951 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2952 instead of the *_inc-less variants.
2953 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2954 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2955 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2957 * libdwP.h: Add more error codes.
2958 (struct Dwarf): Remove mem_tail.next member.
2959 (Dwarf_File): Define type.
2960 (struct Dwarf_Line_s): Define type.
2961 (struct Dwarf_CU): Add lines and nlines members.
2962 (libdw_alloc): Define local variable _tail and use it.
2963 Add some function attributes.
2964 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2965 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2966 * memory-access.h: Add unlikely for the endian conversion paths.
2967 * Makefile.am (AM_CFLAGS): Add -std parameter.
2968 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2969 dwarf_lineno, and dwarf_linesrc.
2971 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2973 * Moved to CVS archive.