1 2022-10-21 Yonggang Luo <luoyonggang@gmail.com>
3 * dwarf_begin_elf.h: Don't include unistd.h and endian.h.
4 * dwarf_end.c: Don't include unistd.h.
5 * dwarf_setalt.c: Likewise.
6 * libdw_find_split_unit.c: Likewise.
8 2022-10-19 Mark Wielaard <mark@klomp.org>
10 * dwarf.h (DW_LLE_GNU_view_pair): New constant.
12 2022-10-21 Yonggang Luo <luoyonggang@gmail.com>
14 * memory-access.h: Include system.h instead of byteswap.h and
17 2022-09-20 Yonggang Luo <luoyonggang@gmail.com>
19 * memory-access.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
21 2022-09-13 Aleksei Vetrov <vvvvvv@google.com>
23 * libdw.map (ELFUTILS_0.188): Add dwfl_report_offline_memory.
25 2022-08-09 Ulrich Drepper <drepper@redhat.com>
27 * dwarf_next_cfi.c (dwarf_next_cfi): Don't skip processing the
28 augmentation string. Be more stringent what to accept.
30 2022-07-28 Di Chen <dichen@redhat.com>
32 * libdw.map (ELFUTILS_0.188): Add dwfl_frame_reg.
34 2022-07-13 Mark Wielaard <mark@klomp.org>
36 * libdw.map (ELFUTILS_0.187): Renamed to...
37 (ELFUTILS_0.188): ... this.
39 2022-05-09 Mark Wielaard <mark@klomp.org>
41 * dwarf_getlocation.c (store_implicit_value): Check block length.
43 2022-04-16 Mark Wielaard <mark@klomp.org>
45 * libdwP.h: Remove atomics.h include.
47 2022-04-13 Mark Wielaard <mark@klomp.org>
49 * dwarf.h: Add DWARF5 package file section identifiers,
52 2021-10-20 John M Mellor-Crummey <johnmc@rice.edu>
54 * dwarf_linecontext.c: New file.
55 * dwarf_linefunctionname.c: Likewise.
56 * Makefile.am (libdw_a_SOURCES): Add dwarf_linecontext.c and
57 dwarf_linefunctionname.c
58 * dwarf.h: Add DW_LNE_NVIDIA_inlined_call and
59 DW_LNE_NVIDIA_set_function_name.
60 * dwarf_getsrclines.c (struct line_state): Add context and
62 (add_new_line): Set context and function_name.
63 (MAX_STACK_LINES): Reduce to MAX_STACK_ALLOC / 2.
64 (read_srclines): Initialize context and function_name. Try to
65 read debug_str_offset if available. Handle
66 DW_LNE_NVIDIA_inlined_call and DW_LNE_NVIDIA_set_function_name.
67 * libdw.h (dwarf_linecontext): New declaration.
68 (dwarf_linefunctionname): Likewise.
69 * libdw.map (ELFUTILS_0.186): New section.
71 2021-11-08 Mark Wielaard <mark@klomp.org>
73 * dwarf_begin_elf.c (scn_dwarf_type): New function.
74 (check_section): Check result->type.
75 (global_read): First check type.
76 (scngrp_read): Likewise.
77 * libdw/libdwP.h (enum dwarf_type): New enumeration.
78 (struct Dwarf): New field type.
80 2021-02-14 Alexander Miller <alex.miller@gmx.de>
82 * dwarf_aggregate_size.c (dwarf_aggregate_size): Move NEW_VERSION
83 before definition. Replace INTDEF with NEW_INTDEF.
84 * dwarf_srclang.c (dwarf_srclang): Likewise.
85 * dwarf_arrayorder.c (dwarf_arrayorder): Move NEW_VERSION.
86 * dwarf_bitoffset.c (dwarf_bitoffset): Likewise.
87 * dwarf_bitsize.c (dwarf_bitsize): Likewise.
88 * dwarf_bytesize.c (dwarf_bytesize): Likewise.
89 * dwarf_decl_column.c (dwarf_decl_column): Likewise.
91 2021-10-18 Mark Wielaard <mark@klomp.org>
93 * dwarf_aggregate_size.c (get_type): Don't pass NULL to
96 2021-10-06 Mark Wielaard <mark@klomp.org>
98 * dwarf_aggregate_size.c (array_size): Check signedness of child DIE
99 type. Use dwarf_formsdata or dwarf_formudata to get the lower and
102 2021-09-08 Mark Wielaard <mark@klomp.org>
104 * dwarf_begin_elf.c (valid_p): Identify ELF class and use this to set
105 address_size of the fake CUs. Also set offset_size and DWARF version.
107 2021-09-06 Dmitry V. Levin <ldv@altlinux.org>
109 * dwarf_begin_elf.c (valid_p): Remove casts of malloc return values.
110 (dwarf_begin_elf): Remove cast of calloc return value.
111 * dwarf_getpubnames.c (get_offsets): Remove casts of realloc return
113 * dwarf_getsrclines.c (read_srclines): Remove cast of malloc return
116 2021-04-19 Martin Liska <mliska@suse.cz>
118 * dwarf_begin_elf.c (check_section): Use startswith.
120 2021-05-01 Mark Wielaard <mark@klomp.org>
122 * libdw_form.c (__libdw_form_val_compute_len): Check indirect
123 form is not DW_FORM_indirect or DW_FORM_implicit_const.
125 2021-04-23 Omar Sandoval <osandov@fb.com>
127 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_indirect.
128 * dwarf_getattrs.c (dwarf_getattrs): Handle DW_FORM_indirect.
130 2021-02-12 Mark Wielaard <mark@klomp.org>
132 * dwarf_getlocation.c (attr_ok): For DWARF version 4 or higher
133 block forms are not expression locations.
134 (is_constant_offset): DW_FORM_implicit_const is also a constant.
136 2020-12-20 Dmitry V. Levin <ldv@altlinux.org>
138 * .gitignore: New file.
140 2020-12-16 Dmitry V. Levin <ldv@altlinux.org>
142 * libdwP.h (_): Remove.
144 2020-12-12 Dmitry V. Levin <ldv@altlinux.org>
146 * dwarf.h: Fix spelling typo in comment.
147 * dwarf_begin_elf.c (dwarf_begin_elf): Likewise.
148 * dwarf_getlocation.c (attr_ok, __libdw_intern_expression): Likewise.
149 * dwarf_getsrclines.c (read_srclines): Likewise.
150 * libdw.h: Fix spelling typos in comments.
151 * libdwP.h: Likewise.
153 2020-12-09 Dmitry V. Levin <ldv@altlinux.org>
155 * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
156 (libdw_so_SOURCES): Remove.
157 (MOSTLYCLEANFILES): Add libdw.so.
159 2020-11-30 Dmitry V. Levin <ldv@altlinux.org>
161 * Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix.
163 2020-11-01 Érico N. Rolim <erico.erc@gmail.com>
165 * Makefile.am (libdw_so_LDLIBS): Add fts_LIBS.
167 2020-10-28 Tom Tromey <tom@tromey.com>
170 * dwarf_getlocation.c (store_implicit_value): Use
171 __libdw_get_uleb128_unchecked.
172 * memory-access.h (get_sleb128_step): Assume unsigned type for
174 (__libdw_get_sleb128, __libdw_get_sleb128_unchecked): Work in
175 unsigned type. Handle final byte.
177 2020-10-19 Mark Wielaard <mark@klomp.org>
179 * dwarf_frame_register.c (dwarf_frame_register): Declare ops_mem
180 as array of (at least) 3 elements.
181 * libdw.h (dwarf_frame_register): Add extra explanation of ops_mem
184 2020-10-23 Tom Tromey <tom@tromey.com>
186 * memory-access.h (read_3ubyte_unaligned_inc): Call
187 read_3ubyte_unaligned.
189 2020-09-03 Mark Wielaard <mark@klomp.org>
191 * dwarf.h: Add DW_CFA_AARCH64_negate_ra_state.
192 * cfi.h (struct Dwarf_CFI_s): Add e_machine field.
193 * cfi.c (execute_cfi): Recognize, but ignore
194 DW_CFA_AARCH64_negate_ra_state on aarch64.
195 * dwarf_getcfi.c (dwarf_getcfi): Set cfi e_machine.
196 * dwarf_getcfi_elf.c (allocate_cfi): Take ehdr as argument and set
198 (getcfi_gnu_eh_frame): Pass ehdr to allocate_cfi.
199 (getcfi_scn_eh_frame): Likewise.
201 2020-09-03 Mark Wielaard <mark@klomp.org>
203 * libdw.map (ELFUTILS_0.126): Remove local wildcard.
204 (ELFUTILS_0.127): Likewise.
205 (ELFUTILS_0.130): Likewise.
206 (ELFUTILS_0.136): Likewise.
207 (ELFUTILS_0.138): Likewise.
209 2020-08-25 Mark Wielaard <mark@klomp.org>
211 * dwarf_getlocation.c (check_constant_offset): Rename to...
212 (is_constant_offset): .. this.
214 2020-06-28 Mark Wielaard <mark@klomp.org>
216 * linux-kernel-modules.c (intuit_kernel_bounds): Check read_address
217 returns an increasing address when searching for end.
219 2020-06-16 Mark Wielaard <mark@klomp.org>
221 * cfi.c (execute_cfi): Add missing FALLTHROUGH.
223 2020-05-08 Mark Wielaard <mark@klomp.org>
225 * libdw_visit_scopes.c (walk_children): Don't recurse into imported
226 DW_TAG_compile_units.
228 2020-05-08 Mark Wielaard <mark@klomp.org>
230 * dwarf_decl_file.c (dwarf_decl_file): Use attr CU instead of DIE
231 CU to resolve file name.
232 * dwarf_ranges.c(dwarf_ranges): Document which CU we use when.
233 * libdw.h (dwarf_attr_integrate): Extend documentation.
235 2020-04-25 Mark Wielaard <mark@klomp.org>
237 * libdw_alloc.c (__libdw_alloc_tail): Call Dwarf oom_handler()
240 2020-04-17 Mark Wielaard <mark@klomp.org>
242 * dwarf_begin_elf.c (check_section): Handle .gnu.debuglto_ prefix.
244 2019-10-28 Aaron Merey <amerey@redhat.com>
246 * Makefile.am (libdw_so_LDLIBS): Add -ldl for libdebuginfod.so dlopen.
248 2019-11-10 Mark Wielaard <mark@klomp.org>
250 * libdwP.h (libdw_unalloc): New define.
251 (libdw_typed_unalloc): Likewise.
252 (__libdw_thread_tail): New function declaration.
253 * libdw_alloc.c (__libdw_thread_tail): New function.
254 * dwarf_getabbrev.c (__libdw_getabbrev): Call libdw_typed_unalloc
255 when reading invalid data or when hash collission detected.
257 2019-10-28 Jonathon Anderson <jma14@rice.edu>
259 * libdw_alloc.c: Added __libdw_alloc_tail.
260 (__libdw_allocate): Switch to use the mem_tails array.
261 * libdwP.h (Dwarf): Likewise.
262 * dwarf_begin_elf.c (dwarf_begin_elf): Support for above.
263 * dwarf_end.c (dwarf_end): Likewise.
264 * atomics.h: Add support for thread_local.
266 2019-10-28 Mark Wielaard <mark@klomp.org>
268 * dwarf_sig8_hash.h: Include libdw.h. Remove COMPARE. Include
269 dynamicsizehash_concurrent.h.
270 * dwarf_sig8_hash.c: Include dynamicsizehash_concurrent.c.
271 * dwarf_formref_die.c (dwarf_formref_die): Drop NULL argument to
272 Dwarf_Sig8_Hash_find.
274 2019-08-26 Srđan Milaković <sm108@rice.edu@rice.edu>
276 * dwarf_abbrev_hash.{c,h}: Use the *_concurrent hash table.
278 2019-11-01 Jonathon Anderson <jma14@rice.edu>
280 * dwarf_begin_elf.c (valid_p): Switch calloc for malloc for fake CUs.
281 Add explicit initialization of some fields.
282 * dwarf_end.c (cu_free): Add clause to limit freeing of CU internals.
284 2019-08-26 Jonathon Anderson <jma14@rice.edu>
286 * libdw_alloc.c (__libdw_allocate): Added thread-safe stack allocator.
287 * libdwP.h (Dwarf): Likewise.
288 * dwarf_begin_elf.c (dwarf_begin_elf): Support for above.
289 * dwarf_end.c (dwarf_end): Likewise.
290 * Makefile.am: Use -pthread to provide rwlocks.
292 2019-07-05 Omar Sandoval <osandov@fb.com>
294 * Makefile.am (libdw_so_LIBS): Replace libebl.a with libebl_pic.a.
295 Move libebl_pic.a to the beginning so that libdw symbols are resolved.
296 (libdw_so_LDLIBS): Remove -ldl.
297 (libdw.so): Remove -rpath.
298 (libdw_a_LIBADD): Add libebl, libebl_backends, and libcpu objects.
300 2019-08-25 Jonathon Anderson <jma14@rice.edu>
302 * dwarf_getcfi.c (dwarf_getcfi): Set default_same_value to false.
304 2019-08-12 Mark Wielaard <mark@klomp.org>
306 * libdw.map (ELFUTILS_0.177): Add new version of dwelf_elf_begin.
308 2019-06-28 Mark Wielaard <mark@klomp.org>
310 * libdw.map (ELFUTILS_0.177): New section. Add
311 dwelf_elf_e_machine_string.
313 2019-05-16 Mark Wielaard <mark@klomp.org>
315 * dwarf.h: Add DW_AT_GNU_numerator, DW_AT_GNU_denominator and
318 2019-04-28 Mark Wielaard <mark@klomp.org>
320 * dwarf_siblingof.c (dwarf_siblingof): Don't initialize addr.
322 2019-04-28 Mark Wielaard <mark@klomp.org>
324 * dwarf_getlocation.c (dwarf_getlocation_addr): Call
325 check_constant_offset with llbufs and listlens directly.
327 2019-04-27 Mark Wielaard <mark@klomp.org>
329 * dwarf_getlocation.c (store_implicit_value): Check dbg isn't
332 2019-02-02 Mark Wielaard <mark@klomp.org>
334 * dwarf_nextcu.c (__libdw_next_unit): Define bytes_end.
335 Check there are enough bytes to read extended length, version
338 2019-01-20 Mark Wielaard <mark@klomp.org>
340 * dwarf_getsrclines.c (read_srclines): Check terminating NUL byte
341 for dir and file lists.
343 2018-10-23 Mark Wielaard <mark@klomp.org>
345 * dwarf_child.c (__libdw_find_attr): Initialize readp to NULL.
346 * dwarf_getattrs.c (dwarf_getattrs): Initialize die_addr to NULL.
348 2018-10-20 Mark Wielaard <mark@klomp.org>
350 * libdw.map (ELFUTILS_0.175): New section. Add dwelf_elf_begin.
352 2018-10-29 Milian Wolff <milian.wolff@kdab.com>
354 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type != SHT_NOBITS.
356 2018-09-13 Mark Wielaard <mark@klomp.org>
358 * dwarf_begin_elf.c (check_section): Drop ehdr argument, add and
359 use shstrndx argument.
360 (global_read): Likewise.
361 (scngrp_read): Likewise.
362 (dwarf_begin_elf): Call elf_getshdrstrndx. Pass shstrndx to
363 global_read or scngrp_read.
365 2018-08-18 Mark Wielaard <mark@klomp.org>
367 * dwarf_getabbrev.c (__libdw_getabbrev): Continue until both name
369 * dwarf_hasattr.c (dwarf_hasattr): Stop when both name and form
372 2018-08-18 Mark Wielaard <mark@klomp.org>
374 * dwarf_getaranges.c (dwarf_getaranges.c): Make sure there is enough
375 data to read the address and segment size.
377 2018-07-04 Ross Burton <ross.burton@intel.com>
379 * libdw_alloc.c: Remove error.h include.
381 2018-06-28 Mark Wielaard <mark@klomp.org>
383 * dwarf_next_cfi.c (dwarf_next_cfi): Check whether length is zero.
385 2018-06-27 Mark Wielaard <mark@klomp.org>
387 * dwarf_begin_elf.c (check_section): Allow a single .debug_frame
390 2018-06-26 Mark Wielaard <mark@klomp.org>
392 * libdw.h (dwarf_getscn_info): Remove.
393 * libdw.map (ELFUTILS_0.122): Remove dwarf_getscn_info.
395 2018-06-25 Mark Wielaard <mark@klomp.org>
397 * Makefile.am (libdw_a_SOURCES): Add dwarf_next_lines.c.
398 * libdw.h (dwarf_next_lines): New function declaration.
399 * libdw.map (ELFUTILS_0.173): New section.
400 * dwarf_next_lines.c: New files.
401 * dwarf_begin_elf.c (check_section): Don't error out when elf
403 (valid_p): Allow just a single .debug_line section.
404 * dwarf_getsrclines.c (read_srclines): Keep files relative if comp_dir
407 2018-06-22 Mark Wielaard <mark@klomp.org>
409 * dwarf_nextcu.c (__libdw_next_unit): Set next_off to -1 when it would
412 2018-06-18 Mark Wielaard <mark@klomp.org>
414 * dwarf_aggregate_size.c (array_size): New depth argument. Use
415 aggregate_size instead of dwarf_aggregate_size and pass depth.
416 (aggregate_size): New depth argument. Check depth isn't bigger
417 than MAX_DEPTH (256). Pass depth to recursive calls.
418 (dwarf_aggregate_size): ass zero as depth to aggregate_size.
420 2018-06-18 Mark Wielaard <mark@klomp.org>
422 * dwarf_peel_type.c (dwarf_peel_type): Limit modifier chain to 64.
424 2018-06-18 Mark Wielaard <mark@klomp.org>
426 * dwarf_aggregate_size.c (aggregate_size): Check die is not NULL.
428 2018-06-17 Luiz Angelo Daros de Luca <luizluca@gmail.com>
430 * dwarf_getsrclines.c (read_srclines): Intialize filelist early.
432 2018-06-15 Mark Wielaard <mark@klomp.org>
434 * dwarf_getlocation.c (check_constant_offset): Clarify DW_FORM_data16
435 isn't really a constant.
436 (dwarf_getlocation): Don't handle DW_FORM_data16 as block.
437 (dwarf_getlocation_addr): Likewise.
438 (dwarf_getlocations): Likewise.
440 2018-06-12 Mark Wielaard <mark@klomp.org>
442 * memory-access.h (read_3ubyte_unaligned_inc): New define.
444 2018-06-12 Mark Wielaard <mark@klomp.org>
446 * libdw.h (__libdw_dieabbrev): Set die->abbrev to DWARF_END_ABBREV
449 2018-06-10 Mark Wielaard <mark@klomp.org>
451 * dwarf_attr_integrate.c (dwarf_attr_integrate): Stop after 16 DIE
453 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
455 2018-06-08 Mark Wielaard <mark@klomp.org>
457 * dwarf_getabbrev.c (dwarf_getabbrev): Check die and offset.
459 2018-06-08 Mark Wielaard <mark@klomp.org>
461 * dwarf_get_units.c (dwarf_get_units): Handle existing error, no
464 2018-06-08 Mark Wielaard <mark@klomp.org>
466 * dwarf_getlocation.c (store_implicit_value): Return error when
467 seeing bad DWARF or when tsearch runs out of memory.
468 (__libdw_intern_expression): Report error when store_implicit_value
471 2018-06-08 Mark Wielaard <mark@klomp.org>
473 * dwarf_getsrclines.c (read_srclines): Sanity check ndirs and nfiles.
475 2018-06-08 Mark Wielaard <mark@klomp.org>
477 * dwarf_getlocation_attr.c (addr_valp): Set error and return NULL
478 when there is no .debug_addr section.
479 (dwarf_getlocation_attr): If addr_valp returns NULL, then return -1.
481 2018-06-07 Mark Wielaard <mark@klomp.org>
483 * libdw_findcu.c (__libdw_intern_next_unit): Report DWARF_E_VERSION,
484 not DWARF_E_INVALID_DWARF on unknown version. Set address_size and
485 offset_size to 8 when unknown.
487 2018-06-06 Mark Wielaard <mark@klomp.org>
489 * libdwP.h (__libdw_dieabbrev): Check DIE addr falls in cu.
491 2018-06-06 Mark Wielaard <mark@klomp.org>
493 * dwarf_getlocation_die.c (dwarf_getlocation_die): Check offset
494 falls inside cu data.
496 2018-06-05 Mark Wielaard <mark@klomp.org>
498 * dwarf_getsrclines.c (read_srclines): Explicitly set diridx to -1
499 in case dwarf_formudata fails.
501 2018-06-05 Mark Wielaard <mark@klomp.org>
503 * dwarf_getaranges (dwarf_getaranges): Free new_arange if
504 __libdw_findcu fails.
506 2018-06-05 Mark Wielaard <mark@klomp.org>
508 * dwarf_getsrclines.c (read_srclines): Define dirarray early and
509 check whether or not it is equal to dirstack on exit/out before
512 2018-06-05 Mark Wielaard <mark@klomp.org>
514 * dwarf_getalt.c (find_debug_altlink): id_path array should be 2
515 larger to contain MAX_BUILD_ID_BYTES.
517 2018-05-31 Mark Wielaard <mark@klomp.org>
519 * libdw_find_split_unit.c (try_split_file): New function extracted
521 (__libdw_find_split_unit): ... here. Try both the relative and
522 absolute paths to find a .dwo file.
524 2018-05-30 Mark Wielaard <mark@klomp.org>
526 * libdw/dwarf_getsrclines.c (read_srclines): Change ndir and
527 ndirlist to size_t. Add check to see ndirlist doesn't overflow.
529 2018-05-31 Mark Wielaard <mark@klomp.org>
531 * dwarf_dieoffset.c: Check die->cu != NULL. Return -1, not ~0ul
534 2018-05-29 Mark Wielaard <mark@klomp.org>
536 * dwarf_cuoffset.c (dwarf_cuoffset): Check die->cu is not NULL.
537 * dwarf_die_addr_die.c (dwarf_die_addr_die): Also search split
539 * libdwP.h (struct Dwarf): Add split_tree field.
540 (__libdw_find_split_dbg_addr): New internal function definition.
541 (__libdw_finddbg_cb): Likewise.
542 * libdw_find_split_unit.c (__libdw_find_split_unit): Insert split
543 Dwarf into skeleton dbg split_tree.
544 * libdw_findcu.c (__libdw_finddbg_cb): New function.
545 (__libdw_find_split_dbg_addr): Likewise.
546 * dwarf_end (dwarf_end): Destroy split_tree.
548 2018-05-29 Mark Wielaard <mark@klomp.org>
550 * dwarf.h: Add GNU DebugFission list entry encodings
551 DW_LLE_GNU_end_of_list_entry,
552 DW_LLE_GNU_base_address_selection_entry,
553 DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry.
554 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle
555 GNU DebugFission list entries.
557 2018-05-28 Mark Wielaard <mark@klomp.org>
559 * libdw_find_split_unit.c (__libdw_find_split_unit): End split_dwarf
560 only after we tried every unit id in it.
562 2018-04-07 Mark Wielaard <mark@klomp.org>
564 * libdwP.h (struct Dwarf_CU): Add locs_base.
565 (__libdw_cu_locs_base): New static inline function.
566 * libdw_findcu.c (__libdw_intern_next_unit): Initialize locs_base.
567 * dwarf_begin_elf.c (valid_p): Create fake_loclists_cu if necessary.
568 * dwarf_end.c (dwarf_end): Clean up fake_loclists_cu.
569 * dwarf_getlocation.c (initial_offset): Handle .debug_loclists.
570 (getlocations_addr): Likewise.
571 (dwarf_getlocation_addr): Likewise.
572 * dwarf_getlocation_attr.c (attr_form_cu): Use fake_loclists_cu for
574 (initial_offset): Handle DW_FORM_loclistx.
575 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle
577 * libdwP.h (struct Dwarf): Add fake_loclists_cu.
579 2018-04-12 Mark Wielaard <mark@klomp.org>
581 * dwarf.h: Add DWARF5 location list entry DW_LLE encodings.
582 * begin_elf.c (dwarf_scnnames): Add IDX_debug_loclists.
583 * dwarf_error.c (errmsgs): Remove DWARF_E_NO_LOCLIST. And replace
584 with DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and
585 DWARF_E_NO_LOC_VALUE.
586 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_loclists_base
587 and DW_FORM_loclistx.
588 * dwarf_getlocation.c (attr_ok): Use DWARF_E_NO_LOC_VALUE.
589 (initial_offset): Use DWARF_E_NO_DEBUG_LOC.
590 * libdwP.h: Add IDX_debug_rnglists. Remove DWARF_E_NO_LOCLIST.
591 Add DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and
592 DWARF_E_NO_LOC_VALUE.
594 2018-05-25 Mark Wielaard <mark@klomp.org>
596 * libdw_find_split_unit.c (__libdw_find_split_unit): Extract linking
597 skeleton and split compile units code into...
598 * libdwP (__libdw_link_skel_split): ...this new function.
600 2018-04-06 Mark Wielaard <mark@klomp.org>
602 * dwarf_formaddr.c (__libdw_addrx): New function, extracted from...
603 (dwarf_formaddr): here. Use __libdw_addrx.
604 * dwarf_getlocation.c (getlocations_addr): Pass cu to
605 __libdw_read_begin_end_pair_inc.
606 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Take cu as
607 argument. Handle .debug_rnglists.
608 (initial_offset): Handle .debug_rnglists and DW_FORM_rnglistx.
609 (dwarf_ranges): Likewise. Check cu isn't NULL before use. Pass cu to
610 __libdw_read_begin_end_pair_inc.
611 * libdwP.h (__libdw_read_begin_end_pair_inc): Take cu as argument.
612 (__libdw_cu_ranges_base): Handle DW_AT_rnglists_base.
613 (__libdw_addrx): New function definition.
615 2018-04-11 Mark Wielaard <mark@klomp.org>
617 * dwarf.h: Add DWARF5 range list entry DW_RLE encodings.
618 * begin_elf.c (dwarf_scnnames): Add IDX_debug_rnglists.
619 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_RNGLISTS.
620 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_rnglists_base
621 and DW_FORM_rnglistx.
622 * dwarf_getscopes.c (pc_match): Also check for
623 DWARF_E_NO_DEBUG_RNGLISTS.
624 * libdwP.h: Add IDX_debug_rnglists.
626 2018-05-25 Mark Wielaard <mark@klomp.org>
628 * dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to
629 uintptr_t before returning as pointer.
631 2018-05-22 Mark Wielaard <mark@klomp.org>
633 * dwarf_getlocation.c (__libdw_cu_base_address): Treat errors of
634 getting lowpc or entrypc the same as missing base address (zero).
635 * dwarf_highpc (dwarf_highpc): Handle any address form. Always set
636 error when attribute could not be found.
638 2018-05-21 Mark Wielaard <mark@klomp.org>
640 * dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result.
641 * dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split
642 dwarf if shared with skeleton.
643 (dwarf_end): release fake_addr_cu.
644 * dwarf_formaddr.c (__libdw_cu_addr_base): Move to...
645 * libdwP.h (__libdw_cu_addr_base): ... here.
646 (struct Dwarf): Add fake_addr_cu field.
647 * dwarf_formudata.c (dwarf_formudata): Handle
648 DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
649 * dwarf_getlocation_attr.c (addr_valp): New static function.
650 (dwarf_getlocation_attr): Create attribute for values of
651 DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and
653 * libdw_find_split_unit.c (__libdw_find_split_unit): Connect
654 IDX_debug_addr sectiondata and fake_addr_cu between split and
657 2018-05-20 Mark Wielaard <mark@klomp.org>
659 * dwarf_cu_info.c: New file.
660 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c.
661 * libdw.h (dwarf_cu_info): New function declaration.
662 * libdw.map (ELFUTILS_0.171): Add dwarf_cu_info.
664 2018-05-24 Mark Wielaard <mark@klomp.org>
666 * dwarf_ranges.c (dwarf_ranges): Check for NULL cu.
667 * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base.
669 2018-05-18 Mark Wielaard <mark@klomp.org>
671 * dwarf_formudata.c (__libdw_formptr): Handle the special case
672 of IDX_debug_ranges for DW_UT_split_compile with version < 5.
673 * dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for
675 * dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie.
676 * dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for
678 * libdwP.h (struct Dwarf_CU): Add ranges_base field.
679 (__libdw_cu_ranges_base): New static inline function.
681 2018-05-18 Mark Wielaard <mark@klomp.org>
683 * libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL.
684 * dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by
685 taking the line table from the skeleton.
686 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by
687 only taking the files from .debug_line offset zero (if it exists),
688 otherwise fall back to the skeleton.
690 2018-05-17 Mark Wielaard <mark@klomp.org>
692 * dwarf_begin_elf.c (__libdw_debugdir): New function.
693 (valid_p): Call __libdw_debugdir.
694 * dwarf_end.c (dwarf_end.c): Free debugdir.
695 * dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic.
696 take debugdir as argument instead of fd.
697 (find_debug_altlink): Call __libdw_filepath with debugdir.
698 * libdwP.h (struct Dwarf): Add debugdir field.
699 (__libdw_debugdir): New function prototype.
700 (__libdw_filepath): Adjust prototype to take a const char * instead of
702 * libdw_find_split_unit.c (__libdw_find_split_unit): Call
703 __libdw_filepath with debugdir.
705 2018-05-17 Mark Wielaard <mark@klomp.org>
707 * dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile
708 unit DIE, search skeleton_compile unit DIE.
709 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
710 * libdwP.h (is_cudie): Check cu is not NULL.
712 2018-05-19 Mark Wielaard <mark@klomp.org>
714 * libdwP.h (__libdw_find_split_unit): Mark as internal_function.
716 2018-05-15 Mark Wielaard <mark@klomp.org>
718 * Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c.
719 * dwarf_end.c (cu_free): Free split Dwarf.
720 * dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by
721 calling __libdw_find_split_unit.
722 * libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field.
723 (__libdw_find_split_unit): New function prototype.
724 (str_offsets_base_off): Use cu Dwarf if dbg is NULL.
725 (filepath): Rename to ...
726 (__libdw_filepath): This. Which is the actual function name in
728 (libdw_find_split_unit.c): New file.
729 * libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1.
731 2018-05-15 Mark Wielaard <mark@klomp.org>
733 * libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out
735 * libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if
736 the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to
737 DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has
738 child DIEs and a DW_AT_GNU_dwo_name attribute.
740 2018-05-14 Mark Wielaard <mark@klomp.org>
742 * dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name,
743 DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base,
744 DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index,
745 DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index.
746 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index
748 (__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and
750 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index
752 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base
753 as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr.
754 * dwarf_getlocation.c (__libdw_intern_expression): Handle
755 DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as
757 * libdw_form.c (__libdw_form_val_compute_len): Handle
758 DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128.
760 2018-05-12 Mark Wielaard <mark@klomp.org>
762 * dwarf_begin_elf.c (check_section): Also recognize .dwo section
765 2018-05-11 Mark Wielaard <mark@klomp.org>
767 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr.
768 * dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup,
769 DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and
770 DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with
771 DW_AT_macros. Use libdw_valid_user_form.
773 2018-05-09 Mark Wielaard <mark@klomp.org>
775 * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to...
776 * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline.
777 (str_offsets_base_off): New internal function that also parses
778 .debug_str_offsets header if necessary.
780 2018-05-11 Mark Wielaard <mark@klomp.org>
782 * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is
783 known the Dwarf_Die is came from is valid.
784 * libdwP.h (__libdw_dieabbrev): Check cu is not NULL.
786 2018-05-08 Mark Wielaard <mark@klomp.org>
788 * dwarf_formref.c (__libdw_formref): Explicitly don't handle
789 DW_FORM_ref_sup4 and DW_FORM_ref_sup8.
790 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4
791 and DW_FORM_ref_sup8.
792 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup
793 as DW_FORM_GNU_strp_alt.
795 2018-05-05 Mark Wielaard <mark@klomp.org>
797 * dwarf.h: Add DWARF line content descriptions.
798 * libdwP.h (libdw_valid_user_form): New static function.
799 * dwarf_getsrclines.c (read_srclines): Check and parse version 5
800 DWARF header, dir and file tables separately from older versions
803 2018-04-24 Mark Wielaard <mark@klomp.org>
805 * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str".
806 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and
807 DWARF_E_NO_DEBUG_LINE_STR.
808 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp.
809 Get data from either .debug_str or .debug_line_str.
810 * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and
811 DWARF_E_NO_DEBUG_LINE_STR.
813 2018-04-03 Mark Wielaard <mark@klomp.org>
815 * dwarf_formudata.c (__libdw_formptr): Take and return const
816 unsigned char pointers.
817 * dwarf_getlocation.c (attr_base_address): Rename to...
818 (__libdw_cu_base_address): this. Take Dwarf_CU, check and set
820 (initial_offset_base): Renamed to...
821 (initial_offset): this. Only provide offset.
822 (getlocations_addr): Move data size check and
823 address base addition into __libdw_read_begin_end_pair_inc. Use
824 __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL
825 check (already done by initial_offset, through __libdw_formptr).
826 (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset.
827 Drop Elf_Data NULL check.
828 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument
829 type of readp to Add readend argument. Check data size. Include base
830 in begin and end result.
831 (initial_offset): New static function.
832 (dwarf_ranges): Don't check Elf_Data being NULL (already done by
833 initial_offset, through __libdw_formptr). Use __libdw_cu_base_address
834 and initial_offset. Remove base check and addition (already done by
835 __libdw_read_begin_end_pair_inc.
836 * libdwP.h (Dwarf_CU): Add base_address field.
837 (__libdw_read_begin_end_pair_inc): Change argument type of readp to
838 const. Add readend argument.
839 (__libdw_formptr): Take and return const unsigned char pointers.
840 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
843 2018-04-04 Mark Wielaard <mark@klomp.org>
845 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
846 addr_base and str_off_base.
848 2018-03-23 Mark Wielaard <mark@klomp.org>
850 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
852 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
853 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
854 (__libdw_cu_str_off_base): New function.
855 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
857 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
858 (struct Dwarf_CU): Add str_off_base field.
859 (__libdw_cu_str_off_base): New function declaration.
861 2018-03-22 Mark Wielaard <mark@klomp.org>
863 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
864 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
865 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
866 (__libdw_cu_addr_base): New function.
867 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
869 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
870 (struct Dwarf_CU): Add addr_base field.
871 (__libdw_cu_addr_base): New function definition.
872 * memory-access.h (file_byte_order): New static function.
873 (read_3ubyte_unaligned): New inline function.
875 2018-03-29 Mark Wielaard <mark@klomp.org>
877 * libdw.h (dwarf_decl_file): Extend documentation.
878 (dwarf_linesrc): Likewise.
879 (dwarf_filesrc): Likewise.
881 2018-03-06 Mark Wielaard <mark@klomp.org>
883 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
884 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
885 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
887 * dwarf_getlocation.c (__libdw_intern_expression): Handle
888 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
889 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
890 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
891 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
892 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
893 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
894 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
895 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
897 * dwarf_getlocation_implicit_pointer.c
898 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
900 2018-03-01 Mark Wielaard <mark@klomp.org>
902 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
903 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
906 2018-02-09 Mark Wielaard <mark@klomp.org>
908 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
911 2018-02-09 Mark Wielaard <mark@klomp.org>
913 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
914 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
915 * dwarf_formudata.c (dwarf_formudata): Likewise.
916 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
917 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
918 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
919 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
920 that will also return any data associated with the abbrev. Which
921 currently is only for DW_FORM_implicit_const. Based on...
922 (dwarf_getabbrevattr): ... this function. Which now just calls
923 dwarf_getabbrevattr_data.
924 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
925 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
926 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
927 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
928 function based on __libdw_get_uleb128_unchecked.
930 2018-02-08 Mark Wielaard <mark@klomp.org>
932 * dwarf.h: Add DWARF5 DW_FORMs.
933 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
934 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
935 DW_FORM_ref_sup[48] and DW_FORM_data16.
936 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
937 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
938 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
940 2018-01-30 Mark Wielaard <mark@klomp.org>
942 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
943 * dwarf_get_units.c: New file.
944 * libdw.h (dwarf_get_units): New function declaration.
945 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
947 2018-01-29 Mark Wielaard <mark@klomp.org>
949 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
950 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
951 is now called unit_idp. type_offsetp is now called subdie_offsetp.
952 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
953 and .debug_types sections for type units when type signature ref
955 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
956 __libdw_first_die_off_from_cu instead of trying by hand.
957 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
958 instead of checking type_offset by hand.
959 * dwarf_getlocation_implicit_pointer.c
960 (dwarf_getlocation_implicit_pointer): Likewise.
961 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
962 (__libdw_next_unit): New function based on dwarf_next_unit with
963 DWARF5 header support.
964 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
965 and type_sig8 to unit_id8.
966 (ISV4TU): New macro to determine whether a CU is a version 4 type
967 unit (which comes from the .debug_types section).
968 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
969 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
971 (__libdw_first_die_off_from_cu): New function that calls the above
973 (CUDIE): Use __libdw_first_die_off_from_cu.
974 (SUBDIE): New macro that provides the DIE for a CU using the
976 (__libdw_next_unit): New internal function declaration.
977 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
978 Accept DWARF version 5 headers. Setup unit_type.
979 (__libdw_findcu): Rename debug_types argument to v4_debug_types
980 argument (to indicate that we are looking in the .debug_types
981 section). Support finding the exact offset (unit header start).
983 2018-01-25 Mark Wielaard <mark@klomp.org>
985 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
986 * dwarf_die_addr_die.c: New file.
987 * libdw.h (dwarf_die_addr_die): New function declaration.
988 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
989 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
990 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
992 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
994 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
995 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
997 2018-01-22 Mark Wielaard <mark@klomp.org>
999 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
1000 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
1001 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
1002 and alt_fd if we allocated them.
1003 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
1004 * dwarf_formstring.c (dwarf_formstring): Likewise.
1005 * dwarf_getalt.c (__libdw_filepath): New internal function.
1006 (find_debug_altlink): New static function.
1007 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
1009 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
1011 * libdw.h (dwarf_getalt): Extend documentation.
1012 (dwarf_setalt): Likewise.
1013 * libdwP.h (struct Dwarf): Add alt_fd field.
1014 (filepath): Declare new internal function.
1016 2018-01-14 Petr Machata <pmachata@gmail.com>
1018 * dwarf_formsdata.c (dwarf_formsdata):
1019 <DW_FORM_data1>: Cast to signed char.
1020 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
1021 read_*ubyte_unaligned.
1023 2017-12-26 Mark Wielaard <mark@klomp.org>
1025 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
1026 use bitfields for has_children and code.
1027 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
1028 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
1030 2017-12-26 Mark Wielaard <mark@klomp.org>
1032 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
1033 (get_uleb128_unchecked): New define.
1034 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
1035 read attr name and form.
1036 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
1037 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1038 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
1040 2017-12-28 Mark Wielaard <mark@klomp.org>
1042 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
1044 2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
1045 Mark Wielaard <mark@klomp.org>
1047 * libdwP.h (__libdw_in_section): Fix check for the upper border of
1049 (__libdw_offset_in_section): Likewise.
1051 2017-12-20 Mark Wielaard <mark@klomp.org>
1053 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
1054 (cu_sec_idx): Return cu->sec_idx.
1055 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
1056 IDX_debug_info or IDX_debug_types.
1057 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
1059 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
1060 IDX_debug_macro or IDX_debug_macinfo.
1062 2017-12-12 Mark Wielaard <mark@klomp.org>
1064 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
1065 given DIE. Reserve memory for a new DIE first.
1067 2017-12-11 Dima Kogan <dima@secretsauce.net>
1069 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
1072 2017-11-03 Mark Wielaard <mark@klomp.org>
1074 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1075 DW_OP_GNU_variable_value.
1076 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
1077 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
1079 2017-11-03 Mark Wielaard <mark@klomp.org>
1081 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
1082 Update list of acceptable attribute codes based on DWARF5.
1084 2017-11-03 Mark Wielaard <mark@klomp.org>
1086 * dwarf.h: Add DW_OP_GNU_variable_value.
1088 2017-10-03 Mark Wielaard <mark@klomp.org>
1090 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
1092 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
1094 * memory-access.h: Use attribute_packed.
1096 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
1098 * libdwP.h: Use attribute_hidden.
1099 * libdw_alloc.c: Likewise.
1101 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
1103 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
1105 2017-07-26 Mark Wielaard <mark@klomp.org>
1107 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
1108 * dwarf_getmacros.c (get_table_for_offset): Accept either version
1109 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
1110 (read_macros): Use table version for fake_cu.
1112 2017-07-26 Mark Wielaard <mark@klomp.org>
1114 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
1115 DW_TAG_packed_type and DW_TAG_shared_type.
1116 * libdw.h (dwarf_peel_type): Extend documentation.
1118 2017-07-26 Mark Wielaard <mark@klomp.org>
1120 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
1121 DW_DEFAULTED_out_of_class.
1123 2017-07-26 Mark Wielaard <mark@klomp.org>
1125 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
1127 2017-07-26 Mark Wielaard <mark@klomp.org>
1129 * dwarf_default_lower_bound.c: New file.
1130 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
1131 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
1132 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
1133 * libdw.h: Add dwarf_default_lower_bound.
1134 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
1135 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
1136 dwarf_default_lower_bound INTDECL.
1138 2017-07-26 Mark Wielaard <mark@klomp.org>
1140 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
1141 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
1142 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
1143 * dwarf_aggregate_size.c (array_size): Add lower bound for
1144 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
1145 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
1146 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
1147 DW_LANG_Julia and DW_LANG_BLISS.
1149 2017-07-26 Mark Wielaard <mark@klomp.org>
1151 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
1153 2017-07-25 Mark Wielaard <mark@klomp.org>
1155 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
1156 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
1157 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
1158 for currently unused numbers.
1160 2017-07-25 Mark Wielaard <mark@klomp.org>
1162 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
1163 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
1164 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
1166 2017-07-21 Mark Wielaard <mark@klomp.org>
1168 * dwarf_line_file.c: New file.
1169 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
1170 * libdw.h (dwarf_line_file): New function declaration.
1171 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
1173 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
1175 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
1176 made of, libdw_so_DEPS for libraries it depends on (including
1177 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
1178 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
1179 library dependencies, use libdw_so_LIBS rather than relying on the
1180 order of dependencies specified, add -z,relro.
1182 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
1184 * libdw.h: Remove attribute macro declarations and use
1185 __noreturn_attribute__ as defined in libelf.h.
1187 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
1189 * dwarf_begin_elf.c: Include endian.h.
1191 2017-03-30 Mark Wielaard <mjw@redhat.com>
1193 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
1196 2016-10-22 Mark Wielaard <mjw@redhat.com>
1198 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
1199 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1202 2016-11-02 Mark Wielaard <mjw@redhat.com>
1204 * cfi.c (execute_cfi): Add fallthrough comments.
1205 * encoded-value.h (encoded_value_size): Add explicit return instead
1206 of relying on fallthrough.
1207 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
1210 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
1212 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
1213 * libdw_alloc.c: Likewise.
1215 2016-07-08 Mark Wielaard <mjw@redhat.com>
1217 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
1218 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
1219 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
1221 2016-02-13 Mark Wielaard <mjw@redhat.com>
1223 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
1226 2015-12-18 Mark Wielaard <mjw@redhat.com>
1228 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
1229 (__libdw_free_zdata): Remove.
1230 * dwarf_begin_elf.c (inflate_section): Remove.
1231 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
1232 and elf_compress_gnu to decompress if necessary.
1233 (valid_p): Remove __libdw_free_zdata calls.
1234 (scngrp_read): Use elf_compress if section is compressed. Remove
1235 __libdw_free_zdata calls.
1236 * dwarf_end.c (__libdw_free_zdata): Remove.
1237 (dwarf_end): Don't call __libdw_free_zdata.
1239 2015-10-28 Mark Wielaard <mjw@redhat.com>
1241 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
1243 2015-12-02 Mark Wielaard <mjw@redhat.com>
1245 * fde.c (intern_fde): Don't leak duplicate FDEs.
1247 2015-12-01 Mark Wielaard <mjw@redhat.com>
1249 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
1252 2015-12-01 Mark Wielaard <mjw@redhat.com>
1254 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
1256 2015-10-14 Chih-Hung Hsieh <chh@google.com>
1258 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
1259 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
1261 2015-10-14 Chih-Hung Hsieh <chh@google.com>
1263 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
1264 function 'walk_children' to file scope; inline 'recurse' at its call
1267 2015-10-19 Mark Wielaard <mjw@redhat.com>
1269 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
1272 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
1274 * dwarf_getsrclines.c (read_srclines): Initialize state early.
1276 2015-10-13 Chih-Hung Hsieh <chh@google.com>
1278 * dwarf_getsrclines.c (read_srclines): Move nested functions
1279 'advance_pc' and 'add_new_line' to file scope and keep many
1280 local state variables within one structure.
1282 2015-10-13 Chih-Hung Hsieh <chh@google.com>
1284 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
1285 function 'file_matches' to file scope.
1287 2015-10-16 Mark Wielaard <mjw@redhat.com>
1289 * Makefile.am (libdw.so): Add -lz.
1291 2015-10-14 Chih-Hung Hsieh <chh@google.com>
1293 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
1294 and 'require_cfa_offset' to file scope.
1296 2015-10-09 Josh Stone <jistone@redhat.com>
1298 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
1301 2015-10-05 Josh Stone <jistone@redhat.com>
1303 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
1305 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
1307 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
1308 relocation overflows in some platforms.
1310 2015-09-23 Mark Wielaard <mjw@redhat.com>
1312 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
1313 * dwarf_formref.c (__libdw_formref): Likewise.
1314 * libdw_findcu.c (__libdw_findcu): Likewise.
1315 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
1317 2015-09-22 Mark Wielaard <mjw@redhat.com>
1319 * *.c: Remove old-style function definitions.
1321 2015-09-15 Mark Wielaard <mjw@redhat.com>
1323 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
1325 2015-09-09 Chih-Hung Hsieh <chh@google.com>
1327 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
1328 redundant NULL tests on parameters declared with __nonnull_attribute__.
1329 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
1330 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
1332 2015-09-04 Chih-Hung Hsieh <chh@google.com>
1333 Mark Wielaard <mjw@redhat.com>
1335 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
1336 definition with ansi-C definition and add const qualifier to
1339 2015-09-04 Chih-Hung Hsieh <chh@google.com>
1341 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
1342 definition with ansi-C definitions.
1343 (__libdw_findcu): Likewise.
1345 2015-08-25 Mark Wielaard <mjw@redhat.com>
1347 * dwarf.h: Add DW_LANG_Haskell.
1349 2015-06-18 Mark Wielaard <mjw@redhat.com>
1351 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
1354 2015-06-18 Mark Wielaard <mjw@redhat.com>
1356 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
1358 2015-06-18 Mark Wielaard <mjw@redhat.com>
1360 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
1361 dwarf_formudata reports an error.
1362 (get_table_for_offset): Likewise.
1364 2015-06-08 Mark Wielaard <mjw@redhat.com>
1366 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
1368 2015-06-06 Mark Wielaard <mjw@redhat.com>
1370 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
1372 2015-05-27 Mark Wielaard <mjw@redhat.com>
1374 * encoded-value.h (read_encoded_value): Check data d_size contains
1375 at least enough data to hold a pointer for DW_EH_PE_indirect.
1377 2015-05-22 Mark Wielaard <mjw@redhat.com>
1379 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
1380 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
1381 MAX_STACK_DIRS. Calculate number of dirs needed first, then
1382 create dirarray directly, without needing the next field. Free
1383 not stack allocated lines and files at the end.
1385 2015-05-19 Mark Wielaard <mjw@redhat.com>
1387 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
1388 allocated array to hold locs. Allocate locs bigger than the array
1389 with malloc and free them when done.
1391 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
1393 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
1394 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
1395 * dwarf_begin_elf.c (inflate_section): New static function, lifted
1397 (check_section): ... here. Call inflate_section, set libdw errno to
1398 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
1400 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
1402 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
1403 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
1405 2015-05-06 Mark Wielaard <mjw@redhat.com>
1407 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
1408 check the line number.
1410 2015-05-05 Mark Wielaard <mjw@redhat.com>
1412 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
1413 left before reading values.
1415 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
1417 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
1420 2015-04-22 Mark Wielaard <mjw@redhat.com>
1422 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
1423 (__libdw_max_len_uleb128): New function.
1424 (__libdw_max_len_sleb128): Likewise.
1425 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
1426 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
1428 2015-04-21 Mark Wielaard <mjw@redhat.com>
1430 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
1431 when there are more than 8.
1433 2015-04-01 Petr Machata <pmachata@redhat.com>
1435 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
1436 (is_cudie): New function.
1437 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
1438 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
1439 of white-listing valid tags.
1440 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1442 2015-03-18 Petr Machata <pmachata@redhat.com>
1444 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
1445 (EXTRA_DIST): Remove known-dwarf.h.
1447 2015-02-09 Mark Wielaard <mjw@redhat.com>
1449 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
1450 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
1451 for new Fortran language codes is 1.
1453 2015-02-09 Mark Wielaard <mjw@redhat.com>
1455 * dwarf.h: Add DW_TAG_atomic_type.
1456 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
1457 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
1459 2015-02-11 Josh Stone <jistone@redhat.com>
1461 * encoded-value.h (read_encoded_value): Initialize value.
1463 2015-02-11 Petr Machata <pmachata@redhat.com>
1465 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
1466 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
1467 the fact in *BASEP and bail out later if it hasn't been updated by
1468 __libdw_read_begin_end_pair_inc.
1470 2014-12-24 Mark Wielaard <mjw@redhat.com>
1472 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
1473 smaller than or equal to addr, rather than returning immediately on
1476 2015-01-07 Mark Wielaard <mjw@redhat.com>
1478 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
1479 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
1480 room in the search table for all entries. Store search_table_len.
1481 (getcfi_scn_eh_frame): Likewise.
1482 * encoded-value.h (encoded_value_size): Don't abort, return zero.
1483 (__libdw_cfi_read_address_inc): Check there is enough room to read
1484 values. Pass other byte order to read functions.
1485 (read_encoded_value): Check encoded_value_size. Don't abort, but
1486 set libdw errno and report failure. Check there is enough room to
1488 * fde.c (binary_search_fde): Check encoded value size. Add hdr
1489 data buf and size to dummy_cfi.
1491 2015-01-04 Mark Wielaard <mjw@redhat.com>
1493 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
1494 is after current DIE.
1496 2015-01-04 Mark Wielaard <mjw@redhat.com>
1498 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
1499 (dwarf_frame_register).
1501 2015-01-02 Mark Wielaard <mjw@redhat.com>
1503 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
1504 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
1505 (getcfi_scn_eh_frame): Check d_buf is not NULL.
1507 2015-01-02 Mark Wielaard <mjw@redhat.com>
1509 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
1510 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
1511 DW_OP_addr if dbg is NULL then read argument directly.
1513 2015-01-14 Jason P. Leasure <jpleasu@super.org>
1515 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
1518 2014-12-27 Mark Wielaard <mjw@redhat.com>
1520 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
1521 still falls inside CU data.
1523 2015-01-11 Mark Wielaard <mjw@redhat.com>
1525 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
1526 __libdw_visit_scopes with NULL imports.
1527 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
1528 * dwarf_getscopes.c (pc_record): Likewise.
1529 (dwarf_getscopes): Likewise.
1530 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1531 * libdwP.h (__libdw_visit_scopes): Add imports argument.
1532 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
1533 function imports_contains. Push and pop imports around walk_children
1534 when processing DW_TAG_imported_unit.
1536 2014-12-18 Ulrich Drepper <drepper@gmail.com>
1538 * Makefile.am: Suppress output of textrel_check command.
1540 2014-12-16 Mark Wielaard <mjw@redhat.com>
1542 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
1545 2014-12-16 Mark Wielaard <mjw@redhat.com>
1547 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
1548 space to read die offset.
1550 2014-12-16 Mark Wielaard <mjw@redhat.com>
1552 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
1555 2014-12-15 Mark Wielaard <mjw@redhat.com>
1557 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
1558 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
1559 (dwarf_getpubnames): Make sure section data contains string zero
1562 2014-12-16 Mark Wielaard <mjw@redhat.com>
1564 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
1565 the compiler optimize for the common single-byte case.
1567 2014-12-15 Josh Stone <jistone@redhat.com>
1569 * memory-access.h (__libdw_max_len_leb128): New.
1570 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
1571 (__libdw_get_sleb128): Likewise.
1573 2014-12-14 Mark Wielaard <mjw@redhat.com>
1575 * cfi.c (execute_cfi): Add program bounds checks.
1576 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
1577 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
1578 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
1579 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
1580 * dwarf_formudata.c (dwarf_formudata): Likewise.
1581 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
1582 with end of data buf.
1583 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
1584 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
1585 call gets enough data.
1586 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
1587 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
1589 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
1591 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
1592 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
1593 get_uleb128 with lineendp.
1594 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
1595 get_uleb128 with endp.
1596 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
1597 get_uleb128/get_sleb128 with limit.
1598 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
1599 get_sleb128 get called with enough data.
1600 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
1601 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
1602 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
1604 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
1605 Don't call get_uleb128_step if out of data.
1606 (__libdw_get_sleb128): Likewise for get_sleb128_step.
1608 2014-12-12 Mark Wielaard <mjw@redhat.com>
1610 * libdwP.h (struct Dwarf): Add fake_loc_cu.
1612 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
1613 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
1614 (__libdw_form_val_len): Likewise.
1615 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
1616 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
1617 the already found data buffer directly.
1618 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
1619 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
1620 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
1622 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1623 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
1624 * dwarf_getlocation_attr.c (attr_form_cu): New function.
1625 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
1626 (getlocation): Handle empty blocks immediately.
1627 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
1628 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
1629 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
1631 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
1632 fake_cu. Call __libdw_form_val_len with just fake_cu.
1633 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
1634 datap and size directly from cu startp and endp.
1636 2014-12-11 Mark Wielaard <mjw@redhat.com>
1638 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
1640 2014-12-13 Mark Wielaard <mjw@redhat.com>
1642 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
1643 difference doesn't wrap around before returning as int.
1645 2014-12-11 Josh Stone <jistone@redhat.com>
1647 * dwarf_getsrclines.c (struct linelist): Add sequence.
1648 (compare_lines): Take linelists, and break ties by sequence.
1649 (read_srclines): Use linelists for sorting.
1650 (read_srclines::add_new_line): Set sequence.
1652 2014-12-10 Josh Stone <jistone@redhat.com>
1654 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
1655 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
1656 * dwarf_child.c (dwarf_child): Use cu->endp.
1657 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
1658 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
1659 * dwarf_siblingof.c (dwarf_siblingof): Use both.
1661 2014-12-10 Josh Stone <jistone@redhat.com>
1663 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
1665 2014-12-10 Josh Stone <jistone@redhat.com>
1667 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
1668 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
1669 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1670 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1671 * dwarf_tag.c (dwarf_tag): Likewise.
1673 2014-12-04 Mark Wielaard <mjw@redhat.com>
1675 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
1676 (__libdw_form_val_len): Likewise and check len doesn't overflow.
1677 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
1678 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
1680 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1681 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
1683 2014-12-02 Petr Machata <pmachata@redhat.com>
1685 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
1687 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
1688 * libdw.h (DWARF_GETMACROS_START): New macro.
1690 2014-11-27 Mark Wielaard <mjw@redhat.com>
1692 * Makefile.am (libdw.so): Use textrel_check.
1694 2014-11-27 Mark Wielaard <mjw@redhat.com>
1696 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
1697 search_table_entries and search_table_encoding.
1699 2014-11-24 Mark Wielaard <mjw@redhat.com>
1701 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
1704 2014-11-23 Mark Wielaard <mjw@redhat.com>
1706 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
1707 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
1708 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
1710 2014-11-23 Mark Wielaard <mjw@redhat.com>
1712 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
1713 Set libdw errno and return NULL.
1715 2014-11-24 Mark Wielaard <mjw@redhat.com>
1717 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
1718 (DW_LANG_C11): Likewise.
1719 (DW_LANG_C_plus_plus_14): Likewise.
1720 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
1721 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
1723 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
1726 2014-11-26 Mark Wielaard <mjw@redhat.com>
1728 * dwarf.h (DW_AT_noreturn): Added.
1730 2014-11-11 Mark Wielaard <mjw@redhat.com>
1732 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
1733 explicitly as uint8_t.
1734 (__libdw_getsrclines): Add internal_function to declaration.
1736 2014-09-10 Petr Machata <pmachata@redhat.com>
1738 * dwarf_macro_getparamcnt.c: New file.
1739 * dwarf_macro_param.c: New file.
1740 * dwarf_macro_getsrcfiles.c: New file.
1741 * Makefile.am (libdw_a_SOURCES): Add the new files.
1742 * libdwP.h (struct files_lines_s): New structure.
1743 (DWARF_E_INVALID_OPCODE): New enumerator.
1744 (struct Dwarf): New fields macro_ops, files_lines.
1745 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
1746 keeping macro opcode prototypes in.
1747 (Dwarf_Macro_s): Redefine from scratch.
1748 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
1749 internal interfaces.
1750 * dwarf_error.c (errmsgs): Add a message for
1751 DWARF_E_INVALID_OPCODE.
1752 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
1754 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
1755 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
1757 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
1758 (get_offset_from, macro_op_compare, build_table)
1759 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
1760 (cache_op_table, read_macros, gnu_macros_getmacros_off)
1761 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
1763 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
1764 * dwarf_getsrclines.c (read_srclines): New function with guts
1765 taken from dwarf_getsrclines.
1766 (__libdw_getsrclines): Likewise.
1767 (__libdw_getcompdir, files_lines_compare): New functions.
1768 (dwarf_getsrclines): Make it dispatch to the new interfaces.
1769 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
1771 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
1772 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
1773 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
1775 2014-10-06 Mark Wielaard <mjw@redhat.com>
1777 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
1778 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
1779 (aggregate_size): Likewise. Add old and new version.
1780 * dwarf_peel_type.c: New file.
1781 * libdw.h (dwarf_peel_type): New function declaration.
1782 * libdwP.h (dwarf_peel_type): New internal declaration.
1783 * libdw.map (ELFUTILS_0.161): New section.
1785 2014-10-15 Petr Machata <pmachata@redhat.com>
1787 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
1788 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
1790 2014-10-05 Mark Wielaard <mjw@redhat.com>
1792 * dwarf.h: Add DW_AT_GNU_deleted.
1794 2014-10-02 Mark Wielaard <mjw@redhat.com>
1796 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
1797 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
1798 DW_TAG_rvalue_reference_type.
1800 2014-09-12 Petr Machata <pmachata@redhat.com>
1802 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
1803 8-byte quantities. Consequently, rename to...
1804 (read_addr_unaligned_inc): ... this.
1805 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
1806 (read_sbyte_unaligned): Drop.
1808 2014-09-10 Petr Machata <pmachata@redhat.com>
1810 * dwarf_getlocation.c (attr_ok): Also accept
1811 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
1812 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
1814 2014-08-15 Mark Wielaard <mjw@redhat.com>
1816 * dwarf_cu_die.c: New file.
1817 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
1818 * libdw.h (dwarf_cu_die): New function declaration.
1819 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
1821 2014-08-15 Mark Wielaard <mjw@redhat.com>
1823 * dwarf_cu_getdwarf.c: New file.
1824 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
1825 * libdw.h (Dwarf_CU): New typedef.
1826 (dwarf_cu_getdwarf): New function declaration.
1827 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
1829 2014-06-18 Mark Wielaard <mjw@redhat.com>
1831 * dwarf.h: Remove DW_TAG_mutable_type.
1833 2014-05-02 Mark Wielaard <mjw@redhat.com>
1835 * libdwP.h (__check_build_id): Removed now unused.
1837 2014-05-01 Mark Wielaard <mjw@redhat.com>
1839 * libdwP.h (struct Dwarf): Remove free_alt.
1840 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
1841 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1843 2014-04-30 Mark Wielaard <mjw@redhat.com>
1845 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1847 2014-04-15 Florian Weimer <fweimer@redhat.com>
1849 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1850 (open_debugaltlink): Move to libdwfl.
1851 (check_section): Do not locate alternate debuginfo.
1853 2014-04-24 Florian Weimer <fweimer@redhat.com>
1855 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1857 2014-04-22 Florian Weimer <fweimer@redhat.com>
1859 * dwarf_getalt.c, dwarf_setalt.c: New files.
1860 * Makefile.am (libdw_a_SOURCES): Add them.
1861 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1862 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1864 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1866 2014-04-15 Florian Weimer <fweimer@redhat.com>
1868 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1869 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1871 (check_section): Obtain .gnu_debugaltlink section from the
1874 2014-04-11 Mark Wielaard <mjw@redhat.com>
1876 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1877 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1878 (libdwelf_objects): New variable.
1879 (libdw_a_LIBADD): Add libdwelf objects.
1881 2014-04-22 Mark Wielaard <mjw@redhat.com>
1883 * memory-access.h (get_sleb128_step): Remove undefined behavior
1884 of left shifting a signed value. Replace it with a multiplication.
1886 2014-04-13 Mark Wielaard <mjw@redhat.com>
1888 * Makefile.am: Remove !MUDFLAP conditions.
1890 2014-04-09 Mark Wielaard <mjw@redhat.com>
1892 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1893 before calling malloc to uncompress data.
1895 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1897 Fix abort() on missing section headers.
1898 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1899 New label err to return NULL.
1901 2014-02-05 Josh Stone <jistone@redhat.com>
1903 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1904 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1905 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1907 2013-12-30 Mark Wielaard <mjw@redhat.com>
1909 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1910 dwfl_linux_proc_attach.
1912 2013-12-20 Mark Wielaard <mjw@redhat.com>
1914 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1916 2013-12-18 Mark Wielaard <mjw@redhat.com>
1918 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1919 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1920 dwfl_module_getsym_info.
1922 2013-12-16 Mark Wielaard <mjw@redhat.com>
1924 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1926 2013-12-10 Josh Stone <jistone@redhat.com>
1928 * memory-access.h (get_uleb128_rest_return): Removed.
1929 (get_sleb128_rest_return): Removed.
1930 (get_uleb128_step): Make this a self-contained block.
1931 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1932 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1933 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1934 (__libdw_get_uleb128): Simplify and inline for all callers.
1935 (__libdw_get_sleb128): Ditto.
1936 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1937 * memory-access.c: Delete file.
1938 * Makefile.am (libdw_a_SOURCES): Remove it.
1939 (DEFS): Remove the now unused -DIS_LIBDW.
1941 2013-12-09 Josh Stone <jistone@redhat.com>
1943 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1944 __libdw_form_val_len, now handling only non-constant form lengths.
1945 * libdwP.h (__libdw_form_val_len): New inlined function.
1947 2013-12-09 Mark Wielaard <mjw@redhat.com>
1949 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1950 location expressions.
1951 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1952 location found, return empty location expression.
1953 * dwarf_getlocation_implicit_pointer.c
1954 (dwarf_getlocation_implicit_pointer): Likewise.
1955 (__libdw_empty_loc_attr): New internal function.
1956 * libdwP.h (__libdw_empty_loc_attr): Define.
1958 2013-11-27 Mark Wielaard <mjw@redhat.com>
1960 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1961 dwfl_module_getsym_elf.
1963 2013-11-26 Mark Wielaard <mjw@redhat.com>
1965 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1966 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1967 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1968 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1969 (ELFUTILS_0.158): ... here.
1971 2013-11-09 Mark Wielaard <mjw@redhat.com>
1973 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1974 check that it is zero.
1976 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1978 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1979 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1980 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1981 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1982 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1984 2013-11-01 Michael Forney <mforney@mforney.org>
1986 * Makefile.am (libdwfl_objects): New definition.
1987 (libdw_a_LIBADD): Use libdwfl_objects.
1989 2013-11-01 Michael Forney <mforney@mforney.org>
1991 * Makefile.am: Use READELF.
1993 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1995 * libdw.map (ELFUTILS_0.158): New.
1997 2013-10-10 Mark Wielaard <mjw@redhat.com>
1999 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
2000 start_addr and rename last_offset to last_addr. Now both void *.
2001 (tree_visitor): Use start_add and die_addr instead of start_offset
2003 (dwarf_getfuncs): Use last_addr instead of last_offset.
2005 2013-10-06 Mark Wielaard <mjw@redhat.com>
2007 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
2008 DW_CFA_val_expression are not used with abi_cfi.
2010 2013-10-03 Josh Stone <jistone@redhat.com>
2012 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
2013 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
2014 a unit, make sure to always hash the sig8 here, so none are missed.
2016 2013-09-29 Mark Wielaard <mjw@redhat.com>
2018 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
2019 uintptr_t before casting to char *.
2020 (__libdw_intern_expression): Cast data to uintptr_t before casting
2022 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
2023 op->number2 to uintptr_t before casting to char *.
2025 2013-09-24 Josh Stone <jistone@redhat.com>
2027 * libdw_visit_scopes.c (classify_die): Removed.
2028 (may_have_scopes): New function to replace classify_die. There's no
2029 need for full classification; just find tags that may contain scopes.
2030 (__libdw_visit_scopes): Use a direct tag comparison for imported
2031 units, and use may_have_scopes to test if recursion is needed.
2033 2013-09-20 Mark Wielaard <mjw@redhat.com>
2035 * dwarf_getfuncs.c (visitor_info): New struct.
2036 (tree_visitor): New function.
2037 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
2038 * libdw.h (dwarf_getfuncs): Expand function documentation.
2040 2013-09-12 Mark Wielaard <mjw@redhat.com>
2042 * fde.c (intern_fde): Free fde and set libdw errno when start
2043 or end could not be read.
2045 2013-08-24 Mark Wielaard <mjw@redhat.com>
2047 * dwarf_getlocation.c (store_implicit_value): Don't take data
2048 as argument, get block data from op number2. Return false when
2049 block data length and op number don't match up.
2050 (__libdw_intern_expression): Store start of block for
2051 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
2052 relative data offset. Also store block start (including length)
2053 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
2054 * dwarf_getlocation_attr.c: New file.
2055 * dwarf_getlocation_die.c: Likewise.
2056 * libdw.h (dwarf_getlocation_die): New function definition.
2057 (dwarf_getlocation_attr): Likewise.
2058 * libdwP.h: Declare internal dwarf_getlocation_die.
2059 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
2060 dwarf_getlocation_attr.
2061 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
2062 dwarf_getlocation_attr.c.
2064 2013-08-23 Mark Wielaard <mjw@redhat.com>
2066 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
2067 (attr_base_address): New function.
2068 (initial_offset_base): New function.
2069 (getlocations_addr): New function. Taken from...
2070 (dwarf_getlocation_addr): here. Use new initial_offset_base and
2072 (dwarf_getlocations): New function.
2073 * libdw.h (dwarf_getlocations): New function definition.
2074 * libdw.map (ELFUTILS_0.157): New.
2076 2013-07-02 Mark Wielaard <mjw@redhat.com>
2078 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
2079 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
2080 NEW_LINE macro. Free malloced line records if any at the end.
2082 2013-07-02 Mark Wielaard <mjw@redhat.com>
2084 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
2086 2013-06-26 Mark Wielaard <mjw@redhat.com>
2088 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
2089 DIEs without children. Return an error whenever dwarf_child or
2090 dwarf_siblingof return an error. Don't call recurse and increase
2091 the depth for an imported unit. Walk the children of an imported
2092 unit as if they are logical children of the parent root DIE.
2094 2013-05-03 Mark Wielaard <mjw@redhat.com>
2096 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
2099 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2101 * libdw.map (ELFUTILS_0.156): New.
2103 2013-04-24 Mark Wielaard <mjw@redhat.com>
2105 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
2107 2013-04-10 Mark Wielaard <mjw@redhat.com>
2109 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
2110 equal to address size when we have a DW_FORM_ref_addr for DWARF
2113 2013-03-25 Mark Wielaard <mjw@redhat.com>
2115 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
2118 2013-03-12 Mark Wielaard <mjw@redhat.com>
2120 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
2121 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2123 2013-02-15 Mark Wielaard <mjw@redhat.com>
2125 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
2126 not dbg->sectiondata.
2128 2013-01-07 Roland McGrath <roland@hack.frob.com>
2131 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
2132 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
2134 2012-12-18 Mark Wielaard <mjw@redhat.com>
2136 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
2137 (check_section): Likewise on error.
2138 (scngrp_read): Likewise.
2139 (dwarf_begin_elf): Likewise.
2141 2012-10-09 Petr Machata <pmachata@redhat.com>
2143 * dwarf_getlocation.c (__libdw_intern_expression): Handle
2144 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
2145 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
2146 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
2148 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2150 * cfi.c: New include system.h.
2151 (execute_cfi) (enough_registers): Clear new memory after realloc.
2153 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2155 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
2156 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
2159 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2161 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
2162 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
2163 Remove the later DW_OP_call_frame_cfa push to RESULT.
2165 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2168 * fde.c (binary_search_fde): Remove always true <address >= start>
2169 conditional. Move L initialization upwards.
2171 2012-08-24 Mark Wielaard <mjw@redhat.com>
2173 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
2174 when ENABLE_DWZ is defined.
2175 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
2178 2012-08-16 Mark Wielaard <mjw@redhat.com>
2180 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
2181 * dwarf.h (DW_LANG_Go): Update comment.
2182 (DW_LANG_Mips_Assembler): Likewise.
2184 2012-06-27 Mark Wielaard <mjw@redhat.com>
2186 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
2187 * dwarf_begin.c (dwarf_begin): Add INTDEF.
2188 * dwarf_begin_elf.c (__check_build_id): New internal_function.
2189 (try_debugaltlink): New function.
2190 (open_debugaltlink): Likewise.
2191 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
2192 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
2194 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
2195 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
2197 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
2198 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
2199 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
2201 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
2202 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
2203 (struct Dwarf): Add alt_dwarf and free_alt fields.
2204 (__libdw_read_offset): Add dbg_ret argument, use to check with
2205 __libdw_offset_in_section.
2206 (__check_build_id): New function declaration.
2207 (dwarf_begin): Define as INTDECL.
2208 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
2209 and DW_FORM_GNU_strp_alt.
2211 2012-07-19 Mark Wielaard <mjw@redhat.com>
2213 * dwarf.h: Add DW_OP_GNU_parameter_ref.
2215 2012-07-24 Mark Wielaard <mjw@redhat.com>
2217 * dwarf.h: Correct spelling of DW_LANG_ObjC.
2218 * dwarf_aggregate_size.c (array_size): Use correct spelling of
2221 2012-07-24 Mark Wielaard <mjw@redhat.com>
2223 * dwarf.h: Add DW_ATE_UTF.
2225 2012-06-27 Mark Wielaard <mjw@redhat.com>
2227 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
2229 2012-06-26 Mark Wielaard <mjw@redhat.com>
2231 * libdwP.h: Add IDX_debug_macro.
2232 * dwarf.h: Add DW_AT_GNU_macros.
2233 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
2234 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
2236 2012-04-27 Mark Wielaard <mjw@redhat.com>
2238 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
2239 a constant offset from DW_AT_low_pc.
2241 2012-03-19 Tom Tromey <tromey@redhat.com>
2243 * libdw_findcu.c (findcu_cb): Move earlier.
2244 (__libdw_intern_next_unit): Add new CU to search tree here...
2245 (__libdw_findcu): ... not here.
2247 2012-01-31 Mark Wielaard <mjw@redhat.com>
2249 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
2251 2011-11-31 Mark Wielaard <mjw@redhat.com>
2253 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
2255 2011-07-14 Mark Wielaard <mjw@redhat.com>
2257 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
2259 2011-05-16 Jakub Jelinek <jakub@redhat.com>
2261 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
2262 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
2265 2011-04-26 Mark Wielaard <mjw@redhat.com>
2267 * dwarf_child (dwarf_child): Sanity check end of section against
2268 cu_data () of die->cu.
2270 2011-03-22 Mark Wielaard <mjw@redhat.com>
2272 * dwarf.h: Add DW_TAG_GNU_call_site,
2273 DW_TAG_GNU_call_site_parameter,
2274 DW_AT_GNU_call_site_value,
2275 DW_AT_GNU_call_site_data_value,
2276 DW_AT_GNU_call_site_target,
2277 DW_AT_GNU_call_site_target_clobbered,
2278 DW_AT_GNU_tail_call,
2279 DW_AT_GNU_all_tail_call_sites,
2280 DW_AT_GNU_all_call_sites,
2281 DW_AT_GNU_all_source_call_sites,
2282 and DW_OP_GNU_entry_value.
2284 2011-03-10 Petr Machata <pmachata@redhat.com>
2286 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
2287 abbreviation with code 0.
2289 2011-03-09 Petr Machata <pmachata@redhat.com>
2291 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
2293 2011-02-23 Roland McGrath <roland@redhat.com>
2295 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
2296 Declare __libdw_free_zdata.
2297 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
2298 (dwarf_end): Call it.
2300 * dwarf_begin_elf.c (valid_p): Likewise.
2301 (check_section, scngrp_read): Likewise.
2302 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
2304 2010-10-13 Roland McGrath <roland@redhat.com>
2306 * dwarf.h: Add DW_LANG_Go.
2308 2010-10-05 Roland McGrath <roland@redhat.com>
2310 * dwarf_getaranges.c: Use malloc rather than alloca,
2311 since the total number of elements can be quite huge.
2313 2010-07-26 Roland McGrath <roland@redhat.com>
2315 * dwarf_getlocation_implicit_pointer.c: New file.
2316 * Makefile.am (libdw_a_SOURCES): Add it.
2317 * libdw.map (ELFUTILS_0.149): New set.
2318 Add dwarf_getlocation_implicit_pointer.
2319 * libdw.h: Declare it.
2321 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
2322 (dwarf_offdie, dwarf_offdie_types): Update callers.
2323 * libdwP.h: Declare it.
2325 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
2326 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
2328 2010-08-24 Roland McGrath <roland@redhat.com>
2330 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
2332 2010-07-27 Roland McGrath <roland@redhat.com>
2334 * dwarf_formref_die.c: Fix sig8 hash insertion.
2336 2010-06-23 Roland McGrath <roland@redhat.com>
2338 * cfi.c (dwarf_cfi_validate_fde): Function removed.
2339 * libdw.h: Remove it.
2340 * libdw.map: Likewise.
2342 2010-06-22 Roland McGrath <roland@redhat.com>
2344 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
2346 * dwarf_getsrclines.c: Fix signed comparison warning in extended
2349 2010-06-21 Roland McGrath <roland@redhat.com>
2351 * dwarf.h: Add DW_TAG_GNU_* constants.
2353 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
2356 2010-06-20 Roland McGrath <roland@redhat.com>
2358 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
2359 to search TUs instead of CUs.
2360 * libdwP.h: Update decl.
2361 (struct Dwarf): New member tu_tree.
2362 * dwarf_end.c (dwarf_end): Clean up tu_tree.
2363 * dwarf_offdie.c (do_offdie): New function, broken out of ...
2364 (dwarf_offdie): ... here.
2365 (dwarf_offdie_types): New function.
2366 * libdw.h: Declare it.
2367 * libdw.map (ELFUTILS_0.148): Add it.
2369 * libdwP.h (CUDIE): Use cu_data.
2370 * dwarf_formblock.c: Likewise.
2371 * dwarf_formref_die.c: Likewise.
2372 * dwarf_diecu.c: Use CUDIE macro.
2373 * dwarf_formaddr.c: Use cu_sec_idx.
2375 2010-06-16 Roland McGrath <roland@redhat.com>
2377 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
2378 we don't repeat a CU lookup we've already done. Handle
2379 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
2381 * libdw_findcu.c (__libdw_intern_next_unit): New function,
2383 (__libdw_findcu): ... here. Call it.
2384 * libdwP.h: Declare it.
2385 (struct Dwarf): New member next_tu_offset.
2387 * dwarf_sig8_hash.c: New file.
2388 * dwarf_sig8_hash.h: New file.
2389 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2390 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
2392 * libdwP.h (struct Dwarf): New member sig8_hash.
2393 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
2394 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
2396 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
2397 (dwarf_nextcu): ... here. Call it.
2398 * libdw.h: Declare it.
2399 * libdwP.h: Add INTDECL.
2400 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
2401 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
2403 * libdwP.h (cu_sec_idx, cu_data): New functions.
2404 Use .debug_types when CU is a TU.
2405 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
2406 * dwarf_siblingof.c: Likewise.
2407 * dwarf_formstring.c: Likewise.
2408 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
2409 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
2410 (dwarf_getlocation_addr): Likewise.
2412 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
2413 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
2414 .debug_types header size instead of .debug_info header size.
2416 * dwarf_diecu.c: Update caller.
2417 * dwarf_getaranges.c: Likewise.
2418 * dwarf_nextcu.c: Likewise.
2419 * libdw_findcu.c (__libdw_findcu): Initialize new members.
2421 * fde.c (fde_by_offset): Renamed to ...
2422 (__libdw_fde_by_offset): ... this, made global and internal_function.
2423 Don't take ADDRESS argument.
2424 (__libdw_find_fde): Update caller. Do address sanity check here.
2425 * cfi.h: Declare __libdw_fde_by_offset.
2426 * cfi.c (dwarf_cfi_validate_fde): New function.
2427 * libdw.h: Declare it.
2428 * libdw.map (ELFUTILS_0.148): Add it.
2430 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
2431 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
2433 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
2434 Don't assume DW_EH_PE_aligned refers to native address size.
2436 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
2439 2010-06-17 Roland McGrath <roland@redhat.com>
2441 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
2443 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
2444 into an inner inline function. Set new fields. Check all fields for
2445 overflow when setting.
2446 * dwarf_lineisa.c: New file.
2447 * dwarf_linediscriminator.c: New file.
2448 * dwarf_lineop_index.c: New file.
2449 * Makefile.am (libdw_a_SOURCES): Add them.
2450 * libdw.map (ELFUTILS_0.148): Add them.
2451 * libdw.h: Declare them.
2453 2010-06-16 Roland McGrath <roland@redhat.com>
2455 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
2457 * fde.c (fde_by_offset): Renamed to ...
2458 (__libdw_fde_by_offset): ... this, made global and internal_function.
2459 Don't take ADDRESS argument.
2460 (__libdw_find_fde): Update caller. Do address sanity check here.
2461 * cfi.h: Declare __libdw_fde_by_offset.
2462 * cfi.c (dwarf_cfi_validate_fde): New function.
2463 * libdw.h: Declare it.
2464 * libdw.map (ELFUTILS_0.148): Add it.
2466 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
2467 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
2469 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
2470 Don't assume DW_EH_PE_aligned refers to native address size.
2472 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
2475 2010-06-15 Roland McGrath <roland@redhat.com>
2477 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
2479 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
2480 here, since we don't support it yet.
2482 * dwarf_next_cfi.c: Handle version 4 format.
2484 * dwarf_getsrclines.c: Handle version 4 format.
2486 2010-06-01 Roland McGrath <roland@redhat.com>
2488 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
2489 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
2491 * libdwP.h (CIE_VERSION): Remove unused macro.
2493 * dwarf_getsrclines.c: Fix version field test.
2494 * libdwP.h (DWARF_VERSION): Remove useless macro.
2496 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
2498 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
2500 * libdw_findcu.c (__libdw_findcu): Accept version 4.
2502 2010-05-31 Mark Wielaard <mjw@redhat.com>
2504 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
2505 * libdw.h (dwarf_cfi_cie_p): ... here.
2507 2010-05-31 Mark Wielaard <mjw@redhat.com>
2509 * dwarf.h: Fix DW_LANG_Python constant.
2511 2010-05-28 Eduardo Santiago <santiago@redhat.com>
2513 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
2516 2010-05-27 Roland McGrath <roland@redhat.com>
2518 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
2519 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
2521 2010-05-08 Roland McGrath <roland@redhat.com>
2523 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
2524 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
2525 (getlocation): Update caller.
2526 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
2527 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
2528 * libdwP.h: Update decl.
2530 2010-04-26 Roland McGrath <roland@redhat.com>
2532 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
2533 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
2534 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
2535 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
2537 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
2538 Prepend DW_OP_call_frame_cfa if true.
2539 (getlocation): Update caller.
2540 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
2541 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
2542 * libdwP.h: Update decl.
2544 2010-04-22 Roland McGrath <roland@redhat.com>
2546 * cfi.c (execute_cfi): Never return without cleanup.
2548 (cie_cache_initial_state): Adjust caller to expect that free.
2549 (__libdw_frame_at_address): Likewise.
2551 2010-03-10 Roland McGrath <roland@redhat.com>
2553 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
2555 2010-02-15 Roland McGrath <roland@redhat.com>
2557 * Makefile.am: Use config/eu.am for common stuff.
2559 2010-02-02 Mark Wielaard <mjw@redhat.com>
2561 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
2563 2010-01-07 Roland McGrath <roland@redhat.com>
2565 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
2567 2010-01-05 Roland McGrath <roland@redhat.com>
2569 * dwarf_aggregate_size.c: New file.
2570 * Makefile.am (libdw_a_SOURCES): Add it.
2571 * libdw.h: Declare it.
2572 * libdwP.h: Add INTDECL.
2573 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
2575 * dwarf_srclang.c: Add INTDEF.
2576 * libdwP.h: Add INTDECL.
2578 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
2580 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
2582 2009-11-21 Roland McGrath <roland@redhat.com>
2584 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
2587 2009-10-15 Roland McGrath <roland@redhat.com>
2589 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
2590 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
2592 2009-09-17 Roland McGrath <roland@redhat.com>
2594 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
2595 argument a pointer to const.
2596 * libdw.h: Update decl.
2598 2009-09-10 Roland McGrath <roland@redhat.com>
2600 * dwarf_getlocation.c (store_implicit_value): New function.
2601 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
2602 (dwarf_getlocation_implicit_value): New function.
2603 * libdw.h: Declare it.
2604 * libdw.map (ELFUTILS_0.143): Add it.
2606 2009-09-09 Mark Wielaard <mjw@redhat.com>
2608 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
2610 2009-08-21 Josh Stone <jistone@redhat.com>
2612 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
2614 2009-08-10 Roland McGrath <roland@redhat.com>
2616 * dwarf_getscopevar.c: Use dwarf_diename.
2618 2009-08-09 Roland McGrath <roland@redhat.com>
2620 * libdw.map (ELFUTILS_0.143): New version set,
2621 inherits from ELFUTILS_0.142.
2622 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
2623 alias in the ELFUTILS_0.122 version set and the default in the new set.
2624 * dwarf_srclang.c: Likewise.
2625 * dwarf_decl_file.c: Likewise.
2626 * dwarf_decl_line.c: Likewise.
2627 * dwarf_decl_column.c: Likewise.
2628 * dwarf_bytesize.c: Likewise.
2629 * dwarf_bitsize.c: Likewise.
2630 * dwarf_bitoffset.c: Likewise.
2632 2009-08-07 Roland McGrath <roland@redhat.com>
2634 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
2635 * dwarf_srclang.c: Likewise.
2636 * dwarf_decl_file.c: Likewise.
2637 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
2638 * dwarf_bytesize.c: Likewise.
2639 * dwarf_bitsize.c: Likewise.
2640 * dwarf_bitoffset.c: Likewise.
2642 2009-07-22 Roland McGrath <roland@redhat.com>
2644 * dwarf_frame_cfa.c: Change calling convention.
2645 * libdw.h: Update decl.
2647 * dwarf_frame_register.c: Change calling/return-value convention for
2648 value-only results and undefined/same_value.
2649 * libdw.h: Update decl.
2651 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
2652 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
2653 return that value instead.
2654 (getlocation): Update caller.
2655 * dwarf_frame_cfa.c: Likewise.
2656 * libdwP.h: Update decl.
2658 2009-07-21 Roland McGrath <roland@redhat.com>
2660 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
2661 Fix loop iteration after skipping a bogus or useless CU.
2663 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
2664 absence, not DWARF_E_NO_DEBUG_LINE.
2666 2009-07-20 Roland McGrath <roland@redhat.com>
2668 * dwarf_getlocation.c (__libdw_intern_expression):
2669 Handle DW_OP_stack_value.
2671 2009-07-16 Roland McGrath <roland@redhat.com>
2673 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
2674 reject others when CU's version > 3.
2676 * dwarf_formflag.c: Handle DW_FORM_flag_present.
2678 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
2679 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
2680 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
2681 and DW_AT_const_expr.
2682 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
2683 and DW_FORM_ref_sig8.
2685 2009-07-15 Roland McGrath <roland@redhat.com>
2687 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
2688 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
2690 2009-07-13 Roland McGrath <roland@redhat.com>
2692 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
2694 2009-07-08 Roland McGrath <roland@redhat.com>
2696 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
2699 * libdwP.h (struct Dwarf): Add member `cfi'.
2700 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
2701 * dwarf_getcfi.c: New file.
2702 * dwarf_getcfi_elf.c: New file.
2703 * dwarf_cfi_end.c: New file.
2704 * dwarf_cfi_addrframe.c: New file.
2705 * dwarf_frame_cfa.c: New file.
2706 * dwarf_frame_register.c: New file.
2707 * dwarf_frame_return_address_register.c: New file.
2708 * Makefile.am (libdw_a_SOURCES): Add them.
2709 * unwind.h: Declare those functions.
2710 * libdw.map (ELFUTILS_0.142): Export them.
2712 * dwarf_getlocation.c (__libdw_intern_expression): New function,
2714 (getlocation): ... here, call it.
2715 * libdwP.h: Declare it.
2719 * frame-cache.c: New file.
2722 * encoded-value.h: New file.
2723 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2724 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
2725 * dwarf_error.c (errmsgs): Add element for it.
2727 * dwarf_next_cfi.c: New file.
2728 * Makefile.am (libdw_a_SOURCES): Add it.
2729 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
2730 Declare dwarf_next_cfi.
2731 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
2734 * memory-access.h [! ALLOW_UNALIGNED]
2735 (read_2ubyte_unaligned): Renamed to ...
2736 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
2737 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
2738 (read_2sbyte_unaligned): Likewise.
2739 (read_4ubyte_unaligned): Likewise.
2740 (read_4sbyte_unaligned): Likewise.
2741 (read_8ubyte_unaligned): Likewise.
2742 (read_8sbyte_unaligned): Likewise.
2744 * libdwP.h (IDX_eh_frame): Remove it.
2745 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
2747 2009-07-08 Roland McGrath <roland@redhat.com>
2749 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
2751 * dwarf_getlocation.c (check_constant_offset): New function.
2752 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
2753 handle DW_AT_data_member_location of data[48] as constant offset.
2755 2009-06-18 Roland McGrath <roland@redhat.com>
2757 * libdwP.h (__libdw_read_address_inc): Constify.
2758 (__libdw_read_offset_inc): Likewise.
2759 * dwarf_getaranges.c: Likewise.
2760 * dwarf_getlocation.c: Likewise.
2761 * dwarf_getsrclines.c: Likewise.
2762 * dwarf_nextcu.c: Likewise.
2764 2009-05-05 Petr Machata <pmachata@redhat.com>
2766 * libdwP.h (__libdw_formptr): Declare new function.
2767 * dwarf_formudata.c: Implement it here.
2768 * dwarf_getlocation.c (dwarf_getlocation_addr):
2769 Call it instead of hand-rolled offset handling code.
2770 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2771 * dwarf_ranges.c (dwarf_ranges): Likewise.
2773 2009-05-04 Petr Machata <pmachata@redhat.com>
2775 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
2776 * dwarf_ranges.c: Implement it here.
2777 (dwarf_ranges): Call it.
2778 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
2780 2009-04-23 Petr Machata <pmachata@redhat.com>
2782 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
2783 of read_*ubyte_unaligned.
2784 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
2785 * dwarf_formstring.c (dwarf_formstring): Likewise.
2786 * dwarf_formudate.c (dwarf_formudata): Likewise.
2787 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
2788 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
2789 * dwarf_getpubnames.c (get_offsets): Likewise.
2790 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
2792 2009-04-23 Petr Machata <pmachata@redhat.com>
2794 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
2795 __libdw_read_addr, __libdw_read_off): Add four new internal
2798 2009-05-07 Roland McGrath <roland@redhat.com>
2800 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
2801 return value and OFFSET argument, not CU-relative. Only fetch the
2802 attribute data when called with OFFSET of 0.
2804 2009-05-07 Petr Machata <pmachata@redhat.com>
2806 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
2807 DW_AT_macro_info attribute of CU DIE.
2809 2009-04-15 Roland McGrath <roland@redhat.com>
2811 * dwarf.h (DW_CIE_ID): Removed.
2812 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
2814 2009-04-01 Roland McGrath <roland@redhat.com>
2816 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
2818 2009-01-28 Roland McGrath <roland@redhat.com>
2820 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
2821 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
2823 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
2825 2009-01-26 Roland McGrath <roland@redhat.com>
2827 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
2829 2009-01-25 Roland McGrath <roland@redhat.com>
2831 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
2833 2009-01-23 Roland McGrath <roland@redhat.com>
2835 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
2836 Put these rules under if MAINTAINER_MODE.
2838 2009-01-22 Roland McGrath <roland@redhat.com>
2840 * dwarf.h: Add DW_OP_GNU_encoded_addr.
2842 2009-01-21 Roland McGrath <roland@redhat.com>
2844 * Makefile.am (CLEANFILES): Renamed to ...
2845 (MOSTLYCLEANFILES): ... here.
2846 (CLEANFILES): New variable, add known-dwarf.h.
2848 2009-01-17 Roland McGrath <roland@redhat.com>
2850 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
2851 Make it unconditional.
2852 (BUILT_SOURCES): Updated.
2854 * dwarf.h: Add description comments for DW_LANG_* values.
2856 * Makefile.am [MAINTAINER_MODE]
2857 ($(srcdir)/known-dwarf.h): New target.
2858 (BUILT_SOURCES): Add it.
2860 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
2862 2009-01-10 Ulrich Drepper <drepper@redhat.com>
2864 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
2866 2009-01-08 Roland McGrath <roland@redhat.com>
2868 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2870 2008-01-06 Roland McGrath <roland@redhat.com>
2872 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2874 * dwarf_haschildren.c: Return -1 for error case, not 0.
2876 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2878 2009-01-06 Ulrich Drepper <drepper@redhat.com>
2880 * dwarf.h: Add definition for unwind and call frame information.
2882 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2883 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2885 2008-08-15 Roland McGrath <roland@redhat.com>
2887 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2888 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2890 2008-01-21 Ulrich Drepper <drepper@redhat.com>
2892 * dwarf_child.c: Minor optimizations.
2893 * dwarf_getattrs.c: Likewise.
2894 * dwarf_getpubnames.c: Likewise.
2895 * dwarf_siblingof.c: Likewise.
2896 * dwarf_tag.c: Likewise.
2898 2008-01-18 Ulrich Drepper <drepper@redhat.com>
2900 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2901 of DWARF_VERSION comparison, just fail if the file's version is newer.
2903 2008-01-17 Nick Clifton <nickc@redhat.com>
2905 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2906 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2907 (DWARF3_LENGTH_64_BIT): New define.
2908 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2909 * dwarf_getpubnames: Include dwarf.h.
2910 (get_offsets): Use the new definitions.
2911 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2912 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2913 (dwarf_nextcu): Use the new definitions.
2915 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2916 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2917 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2918 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2920 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2923 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2925 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2926 Set the address in the return structure to the address of the next
2927 non-sibling die, if there is no sibling and the return pointer is
2928 not the same as the die pointer.
2929 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2931 * dwarf_child.c: Fix typo in comment.
2933 * libdwP.h (DWARF_VERSION): Change to 3.
2935 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2936 not have a initialised valp pointer.
2938 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2939 the end of the attributes is reached. When the callback fails,
2940 return the address of the failing attribute, not the address of
2942 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2944 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2945 (dwarf_child): Likewise.
2946 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2947 (dwarf_tag): Likewise.
2949 2008-01-08 Roland McGrath <roland@redhat.com>
2951 * Makefile.am (euinclude): Variable removed.
2952 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2953 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
2955 2007-10-17 Roland McGrath <roland@redhat.com>
2957 * libdw.h (__deprecated_attribute__): New macro.
2958 (dwarf_formref): Mark it deprecated.
2959 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2960 (dwarf_formref): ... here. Call it. Remove INTDEF.
2961 * libdwP.h: Remove INTDECL.
2962 Declare __libdw_formref.
2963 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2964 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2966 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2967 needs to check CU->version.
2969 * libdwP.h (struct Dwarf_CU): New member `version'.
2970 * libdw_findcu.c (__libdw_findcu): Initialize it.
2972 * dwarf_child.c: Return 1 for null entry as first child.
2974 2007-10-05 Roland McGrath <roland@redhat.com>
2976 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2978 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2979 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2981 2007-10-03 Roland McGrath <roland@redhat.com>
2983 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2984 and dwfl_build_id_find_debuginfo.
2986 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2987 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2989 2007-10-02 Roland McGrath <roland@redhat.com>
2991 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2994 2007-08-07 Roland McGrath <roland@redhat.com>
2996 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2997 error code is DWARF_E_NOERROR (0).
2999 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
3000 Fix typo in __libdw_visit_scopes argument.
3002 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
3003 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
3005 2007-07-03 Roland McGrath <roland@redhat.com>
3007 * libdw.h (__extern_inline): New macro.
3008 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
3010 2007-04-16 Roland McGrath <roland@redhat.com>
3012 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
3014 2007-04-05 Roland McGrath <roland@redhat.com>
3016 * dwarf_getsrcdirs.c: New file.
3017 * Makefile.am (libdw_a_SOURCES): Add it.
3018 * libdw.h: Declare dwarf_getsrcdirs.
3019 * libdw.map (ELFUTILS_0.127): Add it.
3021 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
3022 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
3023 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
3024 Save DIRARRAY in the Dwarf_Files.
3026 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
3027 address to check for all-ones base address entry. Check directly.
3028 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
3030 2007-03-25 Roland McGrath <roland@redhat.com>
3032 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
3033 Return NULL when freeing RESULT on error.
3034 (global_read, scngrp_read): Check return value from check_section,
3035 break out of loop after it has freed RESULT.
3036 (valid_p): Handle null argument.
3038 2007-03-12 Roland McGrath <roland@redhat.com>
3040 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
3042 2007-03-04 Roland McGrath <roland@redhat.com>
3044 * libdw.map (ELFUTILS_0.127): New version set, inherits from
3045 ELFUTILS_0.126. Add dwfl_module_addrsym.
3047 2007-02-10 Roland McGrath <roland@redhat.com>
3049 * dwarf.h (DW_OP_fbreg): Comment fix.
3051 2007-02-03 Roland McGrath <roland@redhat.com>
3053 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
3054 * libdw.map (ELFUTILS_0.126): New version set, inherits from
3055 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
3056 exported in the past.
3058 2006-12-17 Roland McGrath <roland@redhat.com>
3060 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
3061 address when the CU is missing attributes due to buggy GCC.
3063 2006-08-29 Roland McGrath <roland@redhat.com>
3065 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
3067 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
3068 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
3070 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
3071 result is aligned. Adjust NEWP->remaining here for this allocation.
3072 * libdwP.h: Update decl.
3073 (libdw_alloc): Update caller.
3075 2006-07-12 Ulrich Drepper <drepper@redhat.com>
3077 * dwarf_child.c: Adjust for internal_function_def removal.
3078 * dwarf_getabbrev.c: Likewise.
3079 * dwarf_tag.c: Likewise.
3080 * libdw_form.c: Likewise.
3081 * memory-access.c: Likewise.
3083 2006-06-28 Roland McGrath <roland@redhat.com>
3085 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
3087 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
3090 2006-05-27 Ulrich Drepper <drepper@redhat.com>
3092 * libdw.h: Add extern "C".
3094 2006-05-22 Ulrich Drepper <drepper@redhat.com>
3096 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
3097 aranges information.
3099 2006-05-21 Ulrich Drepper <drepper@redhat.com>
3101 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
3104 2006-02-28 Roland McGrath <roland@redhat.com>
3106 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
3107 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
3108 values from DWARF 3.0.
3110 2006-02-22 Roland McGrath <roland@redhat.com>
3112 * libdw.map: Bump to 0.120; export dwfl_version.
3114 2005-12-22 Roland McGrath <roland@redhat.com>
3116 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
3118 2005-12-12 Roland McGrath <roland@redhat.com>
3120 * dwarf_ranges.c: Copy CU base address-finding code from
3123 2005-12-09 Roland McGrath <roland@redhat.com>
3125 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
3126 Delay CU base lookup until it's needed.
3127 If CU base lookup fails with no error, flag invalid DWARF.
3129 2005-11-25 Roland McGrath <roland@redhat.com>
3131 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
3133 2005-11-15 Roland McGrath <roland@redhat.com>
3135 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
3137 2005-11-13 Roland McGrath <roland@redhat.com>
3139 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
3141 2005-10-27 Roland McGrath <roland@redhat.com>
3143 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
3144 don't match end_sequence markers.
3146 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
3147 before normal records at the same address.
3148 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
3151 2005-10-26 Roland McGrath <roland@redhat.com>
3153 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
3154 * dwarf_func_file.c: Renamed to ...
3155 * dwarf_decl_file.c: ... here.
3156 * dwarf_func_col.c: Renamed to ...
3157 * dwarf_decl_column.c: ... here.
3158 * dwarf_func_line.c: Renamed to ...
3159 * dwarf_decl_line.c: ... here.
3160 (dwarf_func_line): Renamed to ...
3161 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
3162 (__libdw_func_intval): Renamed __libdw_attr_intval.
3163 * dwarf_func_name.c: File removed.
3164 * dwarf_func_lowpc.c: File removed.
3165 * dwarf_func_highpc.c: File removed.
3166 * dwarf_func_entrypc.c: File removed.
3167 * dwarf_func_die.c: File removed.
3168 * Makefile.am (libdw_a_SOURCES): Updated.
3169 * libdw.h: Update decls.
3170 (Dwarf_Func): Type removed.
3171 * libdwP.h: Update decls.
3172 (struct Dwarf_Func_s): Type removed.
3173 * libdw.map: Updated.
3175 * libdwP.h (CUDIE): New macro.
3176 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
3177 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
3178 * dwarf_ranges.c (dwarf_ranges): Likewise.
3180 * dwarf_getloclist.c: Renamed to ...
3181 * dwarf_getlocation.c: ... here.
3182 (getloclist): Renamed to getlocation.
3183 (dwarf_getloclist): Renamed to dwarf_getlocation.
3184 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
3185 * Makefile.am (libdw_a_SOURCES): Updated.
3186 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
3187 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
3188 (Dwarf_Loc): Renamed Dwarf_Op.
3189 * libdwP.h (struct loc_s): Update use.
3190 * libdw.map: Update map.
3192 * dwarf_entry_breakpoints.c: Use the second line record within the
3193 function, regardless of its source location data.
3195 2005-10-25 Roland McGrath <roland@redhat.com>
3197 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
3199 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
3201 2005-10-14 Roland McGrath <roland@redhat.com>
3203 * dwarf_diecu.c (dwarf_diecu): New file.
3204 * Makefile.am (libdw_a_SOURCES): Add it.
3205 * libdw.h: Declare dwarf_diecu.
3206 * libdw.map: Export it.
3208 * libdw.map: Bump to 0.116; export dwarf_ranges.
3210 2005-09-20 Roland McGrath <roland@redhat.com>
3212 * dwarf_haspc.c: Use dwarf_ranges.
3213 * dwarf_entry_breakpoints.c: Likewise.
3215 * dwarf_ranges.c: New file.
3216 * Makefile.am (libdw_a_SOURCES): Add it.
3217 * libdw.h: Declare dwarf_ranges.
3218 * libdwP.h: Add INTDECL.
3220 2005-09-14 Roland McGrath <roland@redhat.com>
3222 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
3223 prologue_end marker scanning loop.
3225 2005-09-11 Roland McGrath <roland@redhat.com>
3227 * dwarf.h: Comment typo fix.
3229 2005-09-07 Roland McGrath <roland@redhat.com>
3231 * dwarf_entry_breakpoints.c: New file.
3232 * Makefile.am (libdw_a_SOURCES): Add it.
3233 * libdw.h: Declare dwarf_entry_breakpoints.
3235 * dwarf_entrypc.c: New file.
3236 * Makefile.am (libdw_a_SOURCES): Add it.
3237 * libdw.h: Declare dwarf_entrypc.
3238 * libdwP.h: Add INTDECL.
3240 2005-08-28 Ulrich Drepper <drepper@redhat.com>
3242 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
3243 (%.os): Use COMPILE.os.
3244 (COMPILE.os): Filter out gconv options.
3246 2005-08-27 Roland McGrath <roland@redhat.com>
3248 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
3249 __libdw_visit_scopes.
3251 * dwarf_getscopes_die.c: New file.
3252 * Makefile.am (libdw_a_SOURCES): Add it.
3253 * libdw.h: Declare dwarf_getscopes_die.
3254 * libdw.map: Bump to 0.115 and add it.
3256 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
3257 containing a DIE and its parent pointer, instead of just Dwarf_Die.
3258 Take two functions for both preorder and postorder visitors.
3259 * libdwP.h: Update decl.
3260 (struct Dwarf_Die_Chain): New type.
3261 * dwarf_func_inline.c: Update uses.
3263 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
3265 * libdwP.h: Add INTDECL.
3266 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
3268 2005-08-23 Roland McGrath <roland@redhat.com>
3270 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
3271 DW_AT_specification the same as DW_AT_abstract_origin.
3273 2005-08-20 Roland McGrath <roland@redhat.com>
3275 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
3276 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
3277 and dwfl_report_offline.
3279 2005-08-19 Roland McGrath <roland@redhat.com>
3281 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
3282 Add dwfl_module_relocate_address, dwfl_module_relocations,
3283 dwfl_module_relocation_info.
3285 2005-08-18 Roland McGrath <roland@redhat.com>
3287 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
3288 outermost scope in the results.
3290 2005-08-15 Roland McGrath <roland@redhat.com>
3292 * dwarf_func_inline.c: New file.
3293 * Makefile.am (libdw_a_SOURCES): Add it.
3294 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
3295 * libdw.map: Add them.
3297 * dwarf_func_die.c: New file.
3298 * Makefile.am (libdw_a_SOURCES): Add it.
3299 * libdw.h: Declare dwarf_func_die.
3300 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
3302 2005-08-10 Ulrich Drepper <drepper@redhat.com>
3304 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
3305 of DW_LNS_set_epilog_begin.
3307 2005-08-09 Roland McGrath <roland@redhat.com>
3309 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
3311 * dwarf_end.c: Add INTDEF.
3312 * dwarf_error.c (dwarf_errmsg): Likewise.
3313 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
3315 2005-08-01 Roland McGrath <roland@redhat.com>
3317 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
3318 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
3320 2005-07-28 Ulrich Drepper <drepper@redhat.com>
3322 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
3323 (libdw_a_LIBADD): Add all files from libdwfl.a.
3325 2005-07-27 Roland McGrath <roland@redhat.com>
3327 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
3328 along with ../libebl/libebl.a and ../lib/libeu.a;
3329 depend on ../libelf/libelf.so.
3330 (libdw_so_LDADD): New variable.
3331 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
3333 * libdw.map: Define an empty base version and move all symbols to
3334 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
3336 2005-07-23 Ulrich Drepper <drepper@redhat.com>
3338 * dwarf_error.c: Add internal alias for dwarf_errno.
3339 * libdwP.h: Declare __dwarf_errno_internal.
3340 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
3342 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
3345 2005-06-01 Roland McGrath <roland@redhat.com>
3347 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
3348 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
3350 2005-06-08 Roland McGrath <roland@redhat.com>
3352 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
3353 (get_sleb128_step, get_sleb128): Likewise.
3354 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
3355 * dwarf_getloclist.c (getloclist): Likewise.
3356 * dwarf_formblock.c (dwarf_formblock): Likewise.
3357 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
3358 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
3359 * dwarf_formref.c (dwarf_formref): Likewise.
3360 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
3361 * dwarf_formudata.c (dwarf_formudata): Likewise.
3362 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
3363 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
3364 * dwarf_tag.c (dwarf_tag): Likewise.
3365 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
3366 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
3367 * libdw_form.c (__libdw_form_val_len): Likewise.
3368 * libdwP.h: Update decl.
3370 2005-06-04 Roland McGrath <roland@redhat.com>
3372 * memory-access.h (get_uleb128_rest_return): New macro.
3373 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
3374 (get_sleb128_rest_return): New macro.
3375 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
3376 * memory-access.c: New file.
3377 * Makefile.am (libdw_a_SOURCES): Add it.
3378 (DEFS): Add -DIS_LIBDW.
3380 2005-05-31 Roland McGrath <roland@redhat.com>
3382 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
3385 2005-05-30 Roland McGrath <roland@redhat.com>
3387 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
3388 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
3390 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
3391 BEGIN value. Instead, match base address entries separately for
3394 2005-05-28 Roland McGrath <roland@redhat.com>
3396 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
3397 past location expression contents.
3399 2005-05-23 Roland McGrath <roland@redhat.com>
3401 * dwarf_getsrclines.c: Comment typo fix.
3403 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
3404 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
3406 2005-05-22 Ulrich Drepper <drepper@redhat.com>
3408 * libdwP.h: Only use INTDECL for alias prototypes.
3410 2005-05-19 Roland McGrath <roland@redhat.com>
3412 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
3414 * dwarf_getscopevar.c: New file.
3415 * Makefile.am (libdw_a_SOURCES): Add it.
3416 * libdw.h: Declare dwarf_getscopevar.
3418 * dwarf_getsrcfiles.c: Add INTDEF.
3419 * dwarf_haschildren.c: Likewise.
3420 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
3422 * dwarf_getscopes.c: New file.
3423 * Makefile.am (libdw_a_SOURCES): Add it.
3424 * libdw.h: Declare dwarf_getscopes.
3425 * libdw.map: Add it.
3427 2005-05-18 Roland McGrath <roland@redhat.com>
3429 * libdwP.h (IDX_debug_ranges): New enum constant.
3430 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
3431 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
3432 * dwarf_error.c (errmsgs): Add it.
3433 * dwarf_haspc.c: New file.
3434 * libdw.h: Declare dwarf_haspc.
3435 * libdw.map: Add it.
3436 * libdwP.h: Add INTDECL.
3438 * dwarf_attr_integrate.c: New file.
3439 * dwarf_hasattr_integrate.c: New file.
3440 * Makefile.am (libdw_a_SOURCES): Add them.
3441 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
3442 * libdw.map: Add them.
3444 * dwarf_hasattr.c: Add INTDEF.
3445 * libdwP.h: Add INTDECL for it.
3447 * dwarf_formref_die.c: New file.
3448 * Makefile.am (libdw_a_SOURCES): Add it.
3449 * libdw.h (dwarf_formref_die): Declare it.
3450 * libdwP.h (dwarf_formref_die): Add INTDECL.
3451 * libdw.map: Add it.
3453 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
3455 (dwarf_getloclist): ... here. Call them.
3456 (dwarf_addrloclists): New function.
3457 * libdw.h: Declare it.
3458 * libdw.map: Add it.
3460 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
3461 DW_MACINFO_end_file. Recognize type 0 as terminator.
3463 2005-05-05 Roland McGrath <roland@redhat.com>
3465 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
3467 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
3468 the line program does not produce all entries in ascending order.
3470 2005-04-25 Ulrich Drepper <drepper@redhat.com>
3472 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
3473 occurences (e.g., inlines) better.
3475 2005-04-24 Ulrich Drepper <drepper@redhat.com>
3477 * libdw.h (DWARF_END_ABBREV): Define.
3478 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
3480 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
3482 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
3483 as error of __libdw_getabbrev.
3485 2005-04-04 Ulrich Drepper <drepper@redhat.com>
3487 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
3489 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
3490 results back to caller.
3492 2005-04-04 Roland McGrath <roland@redhat.com>
3494 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
3496 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
3499 2005-04-04 Ulrich Drepper <drepper@redhat.com>
3501 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
3503 * dwarf_getsrc_file.c: New file.
3504 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
3505 * libdw.h: Declare dwarf_getsrc_file.
3506 * libdw.map: Add dwarf_getsrc_file.
3508 2005-04-02 Ulrich Drepper <drepper@redhat.com>
3510 * dwarf_func_entrypc.c: New file.
3511 * dwarf_func_col.c: New file.
3512 * dwarf_func_line.c: New file.
3513 * dwarf_func_file.c: New file.
3514 * libdw.h: Add prototypes for new functions.
3515 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
3517 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
3518 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
3519 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
3520 Declare __libdw_func_intval and __dwarf_formsdata_internal.
3521 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
3522 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
3524 * dwarf.h: Add some DWARF3 definitions.
3526 2005-04-01 Ulrich Drepper <drepper@redhat.com>
3528 * dwarf_getfuncs.c: New file.
3529 * dwarf_func_highpc.c: New file.
3530 * dwarf_func_lowpc.c: New file.
3531 * dwarf_func_name.c: New file.
3532 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
3533 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
3534 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
3535 and dwarf_func_name.
3536 * libdw.h: Add prototypes for new functions.
3537 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
3538 * dwarf_siblingof.c: Likewise.
3539 * dwarf_dieoffset.c: Likewise.
3540 * dwarf_highpc.c: Likewise.
3541 * dwarf_lowpc.c: Likewise.
3542 * libdwP.h: Add prototypes for internal functions.
3543 Define Dwarf_Func_s structure.
3545 2005-03-29 Ulrich Drepper <drepper@redhat.com>
3547 * libdw.h: Add padding in Dwarf_die.
3549 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
3550 * dwarf_attr.c: Likewise.
3551 * dwarf_begin.c: Likewise.
3552 * dwarf_begin_elf.c: Likewise.
3553 * dwarf_bitoffset.c: Likewise.
3554 * dwarf_bitsize.c: Likewise.
3555 * dwarf_bytesize.c: Likewise.
3556 * dwarf_diename.c: Likewise.
3557 * dwarf_formaddr.c: Likewise.
3558 * dwarf_formblock.c: Likewise.
3559 * dwarf_formref.c: Likewise.
3560 * dwarf_formstring.c: Likewise.
3561 * dwarf_formudata.c: Likewise.
3562 * dwarf_getarange_addr.c: Likewise.
3563 * dwarf_getarangeinfo.c: Likewise.
3564 * dwarf_getaranges.c: Likewise.
3565 * dwarf_getloclist.c: Likewise.
3566 * dwarf_getmacros.c: Likewise.
3567 * dwarf_getsrc_die.c: Likewise.
3568 * dwarf_getsrcfiles.c: Likewise.
3569 * dwarf_getsrclines.c: Likewise.
3570 * dwarf_highpc.c: Likewise.
3571 * dwarf_lowpc.c: Likewise.
3572 * dwarf_nextcu.c: Likewise.
3573 * dwarf_offdie.c: Likewise.
3574 * dwarf_siblingof.c: Likewise.
3575 * dwarf_srclang.c: Likewise.
3576 * dwarf_tag.c: Likewise.
3577 * libdw_findcu.c: Likewise.
3578 * libdwP.h: Add prototypes for internal functions.
3580 * dwarf_addrdie.c: New file.
3581 * dwarf_macro_opcode.c: New file.
3582 * dwarf_macro_param1.c: New file.
3583 * dwarf_macro_param2.c: New file.
3584 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
3585 * libdwP.h: Remove Dwarf_Macro definition.
3586 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
3587 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
3588 * libdw.map: Add entries for new functions.
3590 2005-03-21 Ulrich Drepper <drepper@redhat.com>
3592 * libdw.h: Handle broken gcc < 4.
3594 2005-02-15 Ulrich Drepper <drepper@redhat.com>
3596 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
3598 * dwarf_begin_elf.c: Fix warnings.
3599 * dwarf_dieoffset.c: Likewise.
3600 * dwarf_end.c: Likewise.
3601 * dwarf_error.c: Likewise.
3602 * dwarf_getpubnames.c: Likewise.
3604 * libdwP.h: Add new error values.
3605 * dwarf_error.c: Support new error values.
3606 * dwarf_getpubnames.c: Check parameter value.
3608 2005-02-05 Ulrich Drepper <drepper@redhat.com>
3610 * Makefile.am: Check for text relocations in constructed DSO.
3612 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
3614 2005-02-04 Ulrich Drepper <drepper@redhat.com>
3616 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
3617 checks to not read over buffer boundaries for ill-formed DWARF data.
3619 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3621 * dwarf_child.c: Make compile with gcc 4.0.
3622 * dwarf_error.c: Likewise.
3623 * dwarf_formblock.c: Likewise.
3624 * dwarf_getabbrev.c: Likewise.
3625 * dwarf_getattrs.c: Likewise.
3626 * dwarf_getsrclines.c: Likewise.
3627 * dwarf_tag.c: Likewise.
3628 * libdw_form.c: Likewise.
3630 2004-01-20 Ulrich Drepper <drepper@redhat.com>
3632 * Makefile.am: Support building with mudflap.
3634 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
3635 * dwarf_getsrclines.c: Likewise.
3636 * dwarf_memory-access.h: Likewise.
3638 2004-01-19 Ulrich Drepper <drepper@redhat.com>
3640 * dwarf_getsrcfiles.c: Third parameter can be NULL.
3642 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
3643 Third parameter of dwarf_getsrcfiles can be NULL.
3645 * libdw.map: Add dwarf_getmacros.
3646 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
3647 * dwarf_getmacros.c: New file.
3649 2004-01-18 Ulrich Drepper <drepper@redhat.com>
3651 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
3653 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
3655 * dwarf_getsrclines.c:
3656 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
3658 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
3660 * libdwP.h (_): Use elfutils domain.
3662 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
3664 * dwarf_getsrclines.c: Fix typo in comment.
3666 2004-01-17 Ulrich Drepper <drepper@redhat.com>
3668 * Makefile.am: Support building with mudflap.
3670 2004-01-16 Ulrich Drepper <drepper@redhat.com>
3672 * memory-access.h: Add lots of const in case a pointer passed is const.
3674 * dwarf_formflag.c: New file.
3675 * dwarf_getattrs.c: New file.
3676 * dwarf_error.c: Add new error value.
3677 * libdw.h: Add prototypes for new functions. Adjust prototype for
3679 * libdw.map: Add new functions.
3680 * dwarf_getpubnames.c: Change type of return value and fourth parameter
3682 * libdwP.h: Add new error value.
3683 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
3686 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
3688 2004-01-12 Ulrich Drepper <drepper@redhat.com>
3690 * dwarf_getarange_addr.c: New file
3691 * dwarf_getarangeinfo.c: New file.
3692 * dwarf_getaranges.c: New file.
3693 * dwarf_onerange.c: New file.
3694 * libdw.h: Declare new functions. Define Dwarf_Arange and
3696 * libdw.map: Add new functions.
3697 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
3698 Define Dwarf_Aranges_s and Dwarf_Arange_s.
3699 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
3700 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
3701 * dwarf_error.c: Add new message.
3703 2004-01-11 Ulrich Drepper <drepper@redhat.com>
3705 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
3706 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
3707 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
3708 * dwarf_error.c: Add another message.
3709 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
3711 * dwarf_filesrc.c: Likewise.
3712 * dwarf_getsrcfiles.c: Likewise.
3713 * dwarf_getsrclines.c: Likewise.
3714 * dwarf_lineaddr.c: New file.
3715 * dwarf_linebeginstatement.c: New file.
3716 * dwarf_lineblock.c: New file.
3717 * dwarf_linecol.c: New file.
3718 * dwarf_lineendsequence.c: New file.
3719 * dwarf_lineepiloguebegin.c: New file.
3720 * dwarf_lineno.c: New file.
3721 * dwarf_lineprologueend.c: New file.
3722 * dwarf_onesrcline.c: New file.
3723 * dwarf_lineno.c: Change interface to store result in object pointed
3724 to by second parameter.
3725 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
3726 prototype. Define Dwarf_Files and Dwarf_Lines.
3727 * libdw.map: Add new functions.
3728 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
3729 * libdw_findcu.c: Don't initialize nlines field.
3731 * dwarf_siblingof: Little optimization.
3733 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
3734 * dwarf_end.c: Close ELF descriptor if free_elf is set.
3735 * libdwP.h (struct Dwarf): Add free_elf field.
3737 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
3739 * dwarf_getstring.c: New file.
3740 * dwarf_offabbrev.c: New file.
3741 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
3742 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
3743 parameters. Don't allocate memory if not necessary and don't lookup
3744 previous results if no CU given.
3745 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
3746 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
3747 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
3748 * libdwP.h: Change prototype for __libdw_getabbrev.
3750 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
3751 returning if this is wanted.
3753 2004-01-09 Ulrich Drepper <drepper@redhat.com>
3755 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
3756 with offset_size value.
3757 * libdw.h: Adjust dwarf_nextcu prototype.
3758 * libdwP.h (struct Dwarf_CU): Add offset_size member.
3759 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
3760 member of new CU struct.
3761 * dwarf_formstring.c: Depend on offset_size not address_size for
3762 DW_FORM_strp handling.
3763 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
3765 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
3767 (dwarf_tag): Correctly recognize failed lookup.
3769 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
3771 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
3772 * dwarf_formblock.c: New file.
3773 * dwarf_getloclist.c: Rewrite to handle a single block.
3774 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
3775 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
3776 dwarf_getloclistent declaration.
3777 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
3778 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
3779 Add locs member to struct Dwarf_CU.
3780 * libdw_fundcu.c: Initialize locs member of new CU.
3781 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
3782 Remove dwarf_getloclistent.c.
3784 2004-01-07 Ulrich Drepper <drepper@redhat.com>
3786 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
3787 * libdwP.h: Likewise.
3789 * dwarf_getloclist.c: New file.
3790 * dwarf_getloclistent.c: New file.
3791 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
3792 Declare dwarf_getloclistent and dwarf_getloclist.
3793 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
3794 * libdwP.h: Define DWARF_E_NO_LOCLIST.
3795 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
3798 * dwarf_error.c: More error messages.
3800 2004-01-06 Ulrich Drepper <drepper@redhat.com>
3802 * dwarf_getsrclines.c: Remove debugging support.
3804 * dwarf_getsrcfiles.c: New file.
3805 * dwarf_filesrc.c: New file.
3806 * libdw.h: Declare these functions. Define Dwarf_File.
3807 * libdwP.c: Adjust Dwarf_File_s definition.
3808 * libdw.map: Add these functions.
3809 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
3811 * dwarf_getsrclines.c: Initialize cu->files.
3813 2004-01-05 Ulrich Drepper <drepper@redhat.com>
3815 * libdw.h: Add more nonnull function attributes.
3817 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
3818 * dwarf_end.c (cu_free): New function.
3819 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
3820 * dwarf_error.c (errmsgs): Add new messages.
3821 * dwarf_getsrc_die.c: New file.
3822 * dwarf_getsrclines.c: New file.
3823 * dwarf_lineno.c: New file.
3824 * dwarf_linesrc.c: New file.
3825 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
3826 instead of the *_inc-less variants.
3827 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
3828 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
3829 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
3831 * libdwP.h: Add more error codes.
3832 (struct Dwarf): Remove mem_tail.next member.
3833 (Dwarf_File): Define type.
3834 (struct Dwarf_Line_s): Define type.
3835 (struct Dwarf_CU): Add lines and nlines members.
3836 (libdw_alloc): Define local variable _tail and use it.
3837 Add some function attributes.
3838 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
3839 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
3840 * memory-access.h: Add unlikely for the endian conversion paths.
3841 * Makefile.am (AM_CFLAGS): Add -std parameter.
3842 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3843 dwarf_lineno, and dwarf_linesrc.
3845 2003-08-11 Ulrich Drepper <drepper@redhat.com>
3847 * Moved to CVS archive.