1 2014-08-15 Mark Wielaard <mjw@redhat.com>
3 * dwarf_cu_die.c: New file.
4 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
5 * libdw.h (dwarf_cu_die): New function declaration.
6 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
8 2014-08-15 Mark Wielaard <mjw@redhat.com>
10 * dwarf_cu_getdwarf.c: New file.
11 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
12 * libdw.h (Dwarf_CU): New typedef.
13 (dwarf_cu_getdwarf): New function declaration.
14 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
16 2014-06-18 Mark Wielaard <mjw@redhat.com>
18 * dwarf.h: Remove DW_TAG_mutable_type.
20 2014-05-02 Mark Wielaard <mjw@redhat.com>
22 * libdwP.h (__check_build_id): Removed now unused.
24 2014-05-01 Mark Wielaard <mjw@redhat.com>
26 * libdwP.h (struct Dwarf): Remove free_alt.
27 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
28 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
30 2014-04-30 Mark Wielaard <mjw@redhat.com>
32 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
34 2014-04-15 Florian Weimer <fweimer@redhat.com>
36 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
37 (open_debugaltlink): Move to libdwfl.
38 (check_section): Do not locate alternate debuginfo.
40 2014-04-24 Florian Weimer <fweimer@redhat.com>
42 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
44 2014-04-22 Florian Weimer <fweimer@redhat.com>
46 * dwarf_getalt.c, dwarf_setalt.c: New files.
47 * Makefile.am (libdw_a_SOURCES): Add them.
48 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
49 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
51 * libdw.map (ELFUTILS_0.159): Export the two new functions.
53 2014-04-15 Florian Weimer <fweimer@redhat.com>
55 * libdwP.h (enum IDX_gnu_debugaltlink): New.
56 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
58 (check_section): Obtain .gnu_debugaltlink section from the
61 2014-04-11 Mark Wielaard <mjw@redhat.com>
63 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
64 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
65 (libdwelf_objects): New variable.
66 (libdw_a_LIBADD): Add libdwelf objects.
68 2014-04-22 Mark Wielaard <mjw@redhat.com>
70 * memory-access.h (get_sleb128_step): Remove undefined behavior
71 of left shifting a signed value. Replace it with a multiplication.
73 2014-04-13 Mark Wielaard <mjw@redhat.com>
75 * Makefile.am: Remove !MUDFLAP conditions.
77 2014-04-09 Mark Wielaard <mjw@redhat.com>
79 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
80 before calling malloc to uncompress data.
82 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
84 Fix abort() on missing section headers.
85 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
86 New label err to return NULL.
88 2014-02-05 Josh Stone <jistone@redhat.com>
90 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
91 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
92 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
94 2013-12-30 Mark Wielaard <mjw@redhat.com>
96 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
97 dwfl_linux_proc_attach.
99 2013-12-20 Mark Wielaard <mjw@redhat.com>
101 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
103 2013-12-18 Mark Wielaard <mjw@redhat.com>
105 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
106 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
107 dwfl_module_getsym_info.
109 2013-12-16 Mark Wielaard <mjw@redhat.com>
111 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
113 2013-12-10 Josh Stone <jistone@redhat.com>
115 * memory-access.h (get_uleb128_rest_return): Removed.
116 (get_sleb128_rest_return): Removed.
117 (get_uleb128_step): Make this a self-contained block.
118 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
119 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
120 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
121 (__libdw_get_uleb128): Simplify and inline for all callers.
122 (__libdw_get_sleb128): Ditto.
123 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
124 * memory-access.c: Delete file.
125 * Makefile.am (libdw_a_SOURCES): Remove it.
126 (DEFS): Remove the now unused -DIS_LIBDW.
128 2013-12-09 Josh Stone <jistone@redhat.com>
130 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
131 __libdw_form_val_len, now handling only non-constant form lengths.
132 * libdwP.h (__libdw_form_val_len): New inlined function.
134 2013-12-09 Mark Wielaard <mjw@redhat.com>
136 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
137 location expressions.
138 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
139 location found, return empty location expression.
140 * dwarf_getlocation_implicit_pointer.c
141 (dwarf_getlocation_implicit_pointer): Likewise.
142 (__libdw_empty_loc_attr): New internal function.
143 * libdwP.h (__libdw_empty_loc_attr): Define.
145 2013-11-27 Mark Wielaard <mjw@redhat.com>
147 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
148 dwfl_module_getsym_elf.
150 2013-11-26 Mark Wielaard <mjw@redhat.com>
152 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
153 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
154 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
155 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
156 (ELFUTILS_0.158): ... here.
158 2013-11-09 Mark Wielaard <mjw@redhat.com>
160 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
161 check that it is zero.
163 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
165 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
166 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
167 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
168 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
169 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
171 2013-11-01 Michael Forney <mforney@mforney.org>
173 * Makefile.am (libdwfl_objects): New definition.
174 (libdw_a_LIBADD): Use libdwfl_objects.
176 2013-11-01 Michael Forney <mforney@mforney.org>
178 * Makefile.am: Use READELF.
180 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
182 * libdw.map (ELFUTILS_0.158): New.
184 2013-10-10 Mark Wielaard <mjw@redhat.com>
186 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
187 start_addr and rename last_offset to last_addr. Now both void *.
188 (tree_visitor): Use start_add and die_addr instead of start_offset
190 (dwarf_getfuncs): Use last_addr instead of last_offset.
192 2013-10-06 Mark Wielaard <mjw@redhat.com>
194 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
195 DW_CFA_val_expression are not used with abi_cfi.
197 2013-10-03 Josh Stone <jistone@redhat.com>
199 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
200 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
201 a unit, make sure to always hash the sig8 here, so none are missed.
203 2013-09-29 Mark Wielaard <mjw@redhat.com>
205 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
206 uintptr_t before casting to char *.
207 (__libdw_intern_expression): Cast data to uintptr_t before casting
209 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
210 op->number2 to uintptr_t before casting to char *.
212 2013-09-24 Josh Stone <jistone@redhat.com>
214 * libdw_visit_scopes.c (classify_die): Removed.
215 (may_have_scopes): New function to replace classify_die. There's no
216 need for full classification; just find tags that may contain scopes.
217 (__libdw_visit_scopes): Use a direct tag comparison for imported
218 units, and use may_have_scopes to test if recursion is needed.
220 2013-09-20 Mark Wielaard <mjw@redhat.com>
222 * dwarf_getfuncs.c (visitor_info): New struct.
223 (tree_visitor): New function.
224 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
225 * libdw.h (dwarf_getfuncs): Expand function documentation.
227 2013-09-12 Mark Wielaard <mjw@redhat.com>
229 * fde.c (intern_fde): Free fde and set libdw errno when start
230 or end could not be read.
232 2013-08-24 Mark Wielaard <mjw@redhat.com>
234 * dwarf_getlocation.c (store_implicit_value): Don't take data
235 as argument, get block data from op number2. Return false when
236 block data length and op number don't match up.
237 (__libdw_intern_expression): Store start of block for
238 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
239 relative data offset. Also store block start (including length)
240 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
241 * dwarf_getlocation_attr.c: New file.
242 * dwarf_getlocation_die.c: Likewise.
243 * libdw.h (dwarf_getlocation_die): New function definition.
244 (dwarf_getlocation_attr): Likewise.
245 * libdwP.h: Declare internal dwarf_getlocation_die.
246 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
247 dwarf_getlocation_attr.
248 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
249 dwarf_getlocation_attr.c.
251 2013-08-23 Mark Wielaard <mjw@redhat.com>
253 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
254 (attr_base_address): New function.
255 (initial_offset_base): New function.
256 (getlocations_addr): New function. Taken from...
257 (dwarf_getlocation_addr): here. Use new initial_offset_base and
259 (dwarf_getlocations): New function.
260 * libdw.h (dwarf_getlocations): New function definition.
261 * libdw.map (ELFUTILS_0.157): New.
263 2013-07-02 Mark Wielaard <mjw@redhat.com>
265 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
266 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
267 NEW_LINE macro. Free malloced line records if any at the end.
269 2013-07-02 Mark Wielaard <mjw@redhat.com>
271 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
273 2013-06-26 Mark Wielaard <mjw@redhat.com>
275 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
276 DIEs without children. Return an error whenever dwarf_child or
277 dwarf_siblingof return an error. Don't call recurse and increase
278 the depth for an imported unit. Walk the children of an imported
279 unit as if they are logical children of the parent root DIE.
281 2013-05-03 Mark Wielaard <mjw@redhat.com>
283 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
286 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
288 * libdw.map (ELFUTILS_0.156): New.
290 2013-04-24 Mark Wielaard <mjw@redhat.com>
292 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
294 2013-04-10 Mark Wielaard <mjw@redhat.com>
296 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
297 equal to address size when we have a DW_FORM_ref_addr for DWARF
300 2013-03-25 Mark Wielaard <mjw@redhat.com>
302 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
305 2013-03-12 Mark Wielaard <mjw@redhat.com>
307 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
308 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
310 2013-02-15 Mark Wielaard <mjw@redhat.com>
312 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
313 not dbg->sectiondata.
315 2013-01-07 Roland McGrath <roland@hack.frob.com>
318 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
319 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
321 2012-12-18 Mark Wielaard <mjw@redhat.com>
323 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
324 (check_section): Likewise on error.
325 (scngrp_read): Likewise.
326 (dwarf_begin_elf): Likewise.
328 2012-10-09 Petr Machata <pmachata@redhat.com>
330 * dwarf_getlocation.c (__libdw_intern_expression): Handle
331 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
332 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
333 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
335 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
337 * cfi.c: New include system.h.
338 (execute_cfi) (enough_registers): Clear new memory after realloc.
340 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
342 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
343 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
346 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
348 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
349 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
350 Remove the later DW_OP_call_frame_cfa push to RESULT.
352 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
355 * fde.c (binary_search_fde): Remove always true <address >= start>
356 conditional. Move L initialization upwards.
358 2012-08-24 Mark Wielaard <mjw@redhat.com>
360 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
361 when ENABLE_DWZ is defined.
362 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
365 2012-08-16 Mark Wielaard <mjw@redhat.com>
367 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
368 * dwarf.h (DW_LANG_Go): Update comment.
369 (DW_LANG_Mips_Assembler): Likewise.
371 2012-06-27 Mark Wielaard <mjw@redhat.com>
373 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
374 * dwarf_begin.c (dwarf_begin): Add INTDEF.
375 * dwarf_begin_elf.c (__check_build_id): New internal_function.
376 (try_debugaltlink): New function.
377 (open_debugaltlink): Likewise.
378 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
379 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
381 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
382 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
384 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
385 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
386 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
388 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
389 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
390 (struct Dwarf): Add alt_dwarf and free_alt fields.
391 (__libdw_read_offset): Add dbg_ret argument, use to check with
392 __libdw_offset_in_section.
393 (__check_build_id): New function declaration.
394 (dwarf_begin): Define as INTDECL.
395 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
396 and DW_FORM_GNU_strp_alt.
398 2012-07-19 Mark Wielaard <mjw@redhat.com>
400 * dwarf.h: Add DW_OP_GNU_parameter_ref.
402 2012-07-24 Mark Wielaard <mjw@redhat.com>
404 * dwarf.h: Correct spelling of DW_LANG_ObjC.
405 * dwarf_aggregate_size.c (array_size): Use correct spelling of
408 2012-07-24 Mark Wielaard <mjw@redhat.com>
410 * dwarf.h: Add DW_ATE_UTF.
412 2012-06-27 Mark Wielaard <mjw@redhat.com>
414 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
416 2012-06-26 Mark Wielaard <mjw@redhat.com>
418 * libdwP.h: Add IDX_debug_macro.
419 * dwarf.h: Add DW_AT_GNU_macros.
420 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
421 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
423 2012-04-27 Mark Wielaard <mjw@redhat.com>
425 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
426 a constant offset from DW_AT_low_pc.
428 2012-03-19 Tom Tromey <tromey@redhat.com>
430 * libdw_findcu.c (findcu_cb): Move earlier.
431 (__libdw_intern_next_unit): Add new CU to search tree here...
432 (__libdw_findcu): ... not here.
434 2012-01-31 Mark Wielaard <mjw@redhat.com>
436 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
438 2011-11-31 Mark Wielaard <mjw@redhat.com>
440 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
442 2011-07-14 Mark Wielaard <mjw@redhat.com>
444 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
446 2011-05-16 Jakub Jelinek <jakub@redhat.com>
448 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
449 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
452 2011-04-26 Mark Wielaard <mjw@redhat.com>
454 * dwarf_child (dwarf_child): Sanity check end of section against
455 cu_data () of die->cu.
457 2011-03-22 Mark Wielaard <mjw@redhat.com>
459 * dwarf.h: Add DW_TAG_GNU_call_site,
460 DW_TAG_GNU_call_site_parameter,
461 DW_AT_GNU_call_site_value,
462 DW_AT_GNU_call_site_data_value,
463 DW_AT_GNU_call_site_target,
464 DW_AT_GNU_call_site_target_clobbered,
466 DW_AT_GNU_all_tail_call_sites,
467 DW_AT_GNU_all_call_sites,
468 DW_AT_GNU_all_source_call_sites,
469 and DW_OP_GNU_entry_value.
471 2011-03-10 Petr Machata <pmachata@redhat.com>
473 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
474 abbreviation with code 0.
476 2011-03-09 Petr Machata <pmachata@redhat.com>
478 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
480 2011-02-23 Roland McGrath <roland@redhat.com>
482 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
483 Declare __libdw_free_zdata.
484 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
485 (dwarf_end): Call it.
487 * dwarf_begin_elf.c (valid_p): Likewise.
488 (check_section, scngrp_read): Likewise.
489 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
491 2010-10-13 Roland McGrath <roland@redhat.com>
493 * dwarf.h: Add DW_LANG_Go.
495 2010-10-05 Roland McGrath <roland@redhat.com>
497 * dwarf_getaranges.c: Use malloc rather than alloca,
498 since the total number of elements can be quite huge.
500 2010-07-26 Roland McGrath <roland@redhat.com>
502 * dwarf_getlocation_implicit_pointer.c: New file.
503 * Makefile.am (libdw_a_SOURCES): Add it.
504 * libdw.map (ELFUTILS_0.149): New set.
505 Add dwarf_getlocation_implicit_pointer.
506 * libdw.h: Declare it.
508 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
509 (dwarf_offdie, dwarf_offdie_types): Update callers.
510 * libdwP.h: Declare it.
512 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
513 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
515 2010-08-24 Roland McGrath <roland@redhat.com>
517 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
519 2010-07-27 Roland McGrath <roland@redhat.com>
521 * dwarf_formref_die.c: Fix sig8 hash insertion.
523 2010-06-23 Roland McGrath <roland@redhat.com>
525 * cfi.c (dwarf_cfi_validate_fde): Function removed.
526 * libdw.h: Remove it.
527 * libdw.map: Likewise.
529 2010-06-22 Roland McGrath <roland@redhat.com>
531 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
533 * dwarf_getsrclines.c: Fix signed comparison warning in extended
536 2010-06-21 Roland McGrath <roland@redhat.com>
538 * dwarf.h: Add DW_TAG_GNU_* constants.
540 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
543 2010-06-20 Roland McGrath <roland@redhat.com>
545 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
546 to search TUs instead of CUs.
547 * libdwP.h: Update decl.
548 (struct Dwarf): New member tu_tree.
549 * dwarf_end.c (dwarf_end): Clean up tu_tree.
550 * dwarf_offdie.c (do_offdie): New function, broken out of ...
551 (dwarf_offdie): ... here.
552 (dwarf_offdie_types): New function.
553 * libdw.h: Declare it.
554 * libdw.map (ELFUTILS_0.148): Add it.
556 * libdwP.h (CUDIE): Use cu_data.
557 * dwarf_formblock.c: Likewise.
558 * dwarf_formref_die.c: Likewise.
559 * dwarf_diecu.c: Use CUDIE macro.
560 * dwarf_formaddr.c: Use cu_sec_idx.
562 2010-06-16 Roland McGrath <roland@redhat.com>
564 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
565 we don't repeat a CU lookup we've already done. Handle
566 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
568 * libdw_findcu.c (__libdw_intern_next_unit): New function,
570 (__libdw_findcu): ... here. Call it.
571 * libdwP.h: Declare it.
572 (struct Dwarf): New member next_tu_offset.
574 * dwarf_sig8_hash.c: New file.
575 * dwarf_sig8_hash.h: New file.
576 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
577 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
579 * libdwP.h (struct Dwarf): New member sig8_hash.
580 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
581 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
583 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
584 (dwarf_nextcu): ... here. Call it.
585 * libdw.h: Declare it.
586 * libdwP.h: Add INTDECL.
587 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
588 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
590 * libdwP.h (cu_sec_idx, cu_data): New functions.
591 Use .debug_types when CU is a TU.
592 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
593 * dwarf_siblingof.c: Likewise.
594 * dwarf_formstring.c: Likewise.
595 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
596 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
597 (dwarf_getlocation_addr): Likewise.
599 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
600 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
601 .debug_types header size instead of .debug_info header size.
603 * dwarf_diecu.c: Update caller.
604 * dwarf_getaranges.c: Likewise.
605 * dwarf_nextcu.c: Likewise.
606 * libdw_findcu.c (__libdw_findcu): Initialize new members.
608 * fde.c (fde_by_offset): Renamed to ...
609 (__libdw_fde_by_offset): ... this, made global and internal_function.
610 Don't take ADDRESS argument.
611 (__libdw_find_fde): Update caller. Do address sanity check here.
612 * cfi.h: Declare __libdw_fde_by_offset.
613 * cfi.c (dwarf_cfi_validate_fde): New function.
614 * libdw.h: Declare it.
615 * libdw.map (ELFUTILS_0.148): Add it.
617 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
618 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
620 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
621 Don't assume DW_EH_PE_aligned refers to native address size.
623 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
626 2010-06-17 Roland McGrath <roland@redhat.com>
628 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
630 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
631 into an inner inline function. Set new fields. Check all fields for
632 overflow when setting.
633 * dwarf_lineisa.c: New file.
634 * dwarf_linediscriminator.c: New file.
635 * dwarf_lineop_index.c: New file.
636 * Makefile.am (libdw_a_SOURCES): Add them.
637 * libdw.map (ELFUTILS_0.148): Add them.
638 * libdw.h: Declare them.
640 2010-06-16 Roland McGrath <roland@redhat.com>
642 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
644 * fde.c (fde_by_offset): Renamed to ...
645 (__libdw_fde_by_offset): ... this, made global and internal_function.
646 Don't take ADDRESS argument.
647 (__libdw_find_fde): Update caller. Do address sanity check here.
648 * cfi.h: Declare __libdw_fde_by_offset.
649 * cfi.c (dwarf_cfi_validate_fde): New function.
650 * libdw.h: Declare it.
651 * libdw.map (ELFUTILS_0.148): Add it.
653 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
654 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
656 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
657 Don't assume DW_EH_PE_aligned refers to native address size.
659 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
662 2010-06-15 Roland McGrath <roland@redhat.com>
664 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
666 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
667 here, since we don't support it yet.
669 * dwarf_next_cfi.c: Handle version 4 format.
671 * dwarf_getsrclines.c: Handle version 4 format.
673 2010-06-01 Roland McGrath <roland@redhat.com>
675 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
676 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
678 * libdwP.h (CIE_VERSION): Remove unused macro.
680 * dwarf_getsrclines.c: Fix version field test.
681 * libdwP.h (DWARF_VERSION): Remove useless macro.
683 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
685 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
687 * libdw_findcu.c (__libdw_findcu): Accept version 4.
689 2010-05-31 Mark Wielaard <mjw@redhat.com>
691 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
692 * libdw.h (dwarf_cfi_cie_p): ... here.
694 2010-05-31 Mark Wielaard <mjw@redhat.com>
696 * dwarf.h: Fix DW_LANG_Python constant.
698 2010-05-28 Eduardo Santiago <santiago@redhat.com>
700 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
703 2010-05-27 Roland McGrath <roland@redhat.com>
705 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
706 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
708 2010-05-08 Roland McGrath <roland@redhat.com>
710 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
711 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
712 (getlocation): Update caller.
713 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
714 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
715 * libdwP.h: Update decl.
717 2010-04-26 Roland McGrath <roland@redhat.com>
719 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
720 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
721 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
722 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
724 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
725 Prepend DW_OP_call_frame_cfa if true.
726 (getlocation): Update caller.
727 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
728 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
729 * libdwP.h: Update decl.
731 2010-04-22 Roland McGrath <roland@redhat.com>
733 * cfi.c (execute_cfi): Never return without cleanup.
735 (cie_cache_initial_state): Adjust caller to expect that free.
736 (__libdw_frame_at_address): Likewise.
738 2010-03-10 Roland McGrath <roland@redhat.com>
740 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
742 2010-02-15 Roland McGrath <roland@redhat.com>
744 * Makefile.am: Use config/eu.am for common stuff.
746 2010-02-02 Mark Wielaard <mjw@redhat.com>
748 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
750 2010-01-07 Roland McGrath <roland@redhat.com>
752 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
754 2010-01-05 Roland McGrath <roland@redhat.com>
756 * dwarf_aggregate_size.c: New file.
757 * Makefile.am (libdw_a_SOURCES): Add it.
758 * libdw.h: Declare it.
759 * libdwP.h: Add INTDECL.
760 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
762 * dwarf_srclang.c: Add INTDEF.
763 * libdwP.h: Add INTDECL.
765 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
767 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
769 2009-11-21 Roland McGrath <roland@redhat.com>
771 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
774 2009-10-15 Roland McGrath <roland@redhat.com>
776 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
777 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
779 2009-09-17 Roland McGrath <roland@redhat.com>
781 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
782 argument a pointer to const.
783 * libdw.h: Update decl.
785 2009-09-10 Roland McGrath <roland@redhat.com>
787 * dwarf_getlocation.c (store_implicit_value): New function.
788 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
789 (dwarf_getlocation_implicit_value): New function.
790 * libdw.h: Declare it.
791 * libdw.map (ELFUTILS_0.143): Add it.
793 2009-09-09 Mark Wielaard <mjw@redhat.com>
795 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
797 2009-08-21 Josh Stone <jistone@redhat.com>
799 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
801 2009-08-10 Roland McGrath <roland@redhat.com>
803 * dwarf_getscopevar.c: Use dwarf_diename.
805 2009-08-09 Roland McGrath <roland@redhat.com>
807 * libdw.map (ELFUTILS_0.143): New version set,
808 inherits from ELFUTILS_0.142.
809 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
810 alias in the ELFUTILS_0.122 version set and the default in the new set.
811 * dwarf_srclang.c: Likewise.
812 * dwarf_decl_file.c: Likewise.
813 * dwarf_decl_line.c: Likewise.
814 * dwarf_decl_column.c: Likewise.
815 * dwarf_bytesize.c: Likewise.
816 * dwarf_bitsize.c: Likewise.
817 * dwarf_bitoffset.c: Likewise.
819 2009-08-07 Roland McGrath <roland@redhat.com>
821 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
822 * dwarf_srclang.c: Likewise.
823 * dwarf_decl_file.c: Likewise.
824 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
825 * dwarf_bytesize.c: Likewise.
826 * dwarf_bitsize.c: Likewise.
827 * dwarf_bitoffset.c: Likewise.
829 2009-07-22 Roland McGrath <roland@redhat.com>
831 * dwarf_frame_cfa.c: Change calling convention.
832 * libdw.h: Update decl.
834 * dwarf_frame_register.c: Change calling/return-value convention for
835 value-only results and undefined/same_value.
836 * libdw.h: Update decl.
838 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
839 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
840 return that value instead.
841 (getlocation): Update caller.
842 * dwarf_frame_cfa.c: Likewise.
843 * libdwP.h: Update decl.
845 2009-07-21 Roland McGrath <roland@redhat.com>
847 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
848 Fix loop iteration after skipping a bogus or useless CU.
850 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
851 absence, not DWARF_E_NO_DEBUG_LINE.
853 2009-07-20 Roland McGrath <roland@redhat.com>
855 * dwarf_getlocation.c (__libdw_intern_expression):
856 Handle DW_OP_stack_value.
858 2009-07-16 Roland McGrath <roland@redhat.com>
860 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
861 reject others when CU's version > 3.
863 * dwarf_formflag.c: Handle DW_FORM_flag_present.
865 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
866 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
867 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
868 and DW_AT_const_expr.
869 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
870 and DW_FORM_ref_sig8.
872 2009-07-15 Roland McGrath <roland@redhat.com>
874 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
875 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
877 2009-07-13 Roland McGrath <roland@redhat.com>
879 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
881 2009-07-08 Roland McGrath <roland@redhat.com>
883 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
886 * libdwP.h (struct Dwarf): Add member `cfi'.
887 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
888 * dwarf_getcfi.c: New file.
889 * dwarf_getcfi_elf.c: New file.
890 * dwarf_cfi_end.c: New file.
891 * dwarf_cfi_addrframe.c: New file.
892 * dwarf_frame_cfa.c: New file.
893 * dwarf_frame_register.c: New file.
894 * dwarf_frame_return_address_register.c: New file.
895 * Makefile.am (libdw_a_SOURCES): Add them.
896 * unwind.h: Declare those functions.
897 * libdw.map (ELFUTILS_0.142): Export them.
899 * dwarf_getlocation.c (__libdw_intern_expression): New function,
901 (getlocation): ... here, call it.
902 * libdwP.h: Declare it.
906 * frame-cache.c: New file.
909 * encoded-value.h: New file.
910 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
911 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
912 * dwarf_error.c (errmsgs): Add element for it.
914 * dwarf_next_cfi.c: New file.
915 * Makefile.am (libdw_a_SOURCES): Add it.
916 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
917 Declare dwarf_next_cfi.
918 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
921 * memory-access.h [! ALLOW_UNALIGNED]
922 (read_2ubyte_unaligned): Renamed to ...
923 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
924 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
925 (read_2sbyte_unaligned): Likewise.
926 (read_4ubyte_unaligned): Likewise.
927 (read_4sbyte_unaligned): Likewise.
928 (read_8ubyte_unaligned): Likewise.
929 (read_8sbyte_unaligned): Likewise.
931 * libdwP.h (IDX_eh_frame): Remove it.
932 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
934 2009-07-08 Roland McGrath <roland@redhat.com>
936 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
938 * dwarf_getlocation.c (check_constant_offset): New function.
939 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
940 handle DW_AT_data_member_location of data[48] as constant offset.
942 2009-06-18 Roland McGrath <roland@redhat.com>
944 * libdwP.h (__libdw_read_address_inc): Constify.
945 (__libdw_read_offset_inc): Likewise.
946 * dwarf_getaranges.c: Likewise.
947 * dwarf_getlocation.c: Likewise.
948 * dwarf_getsrclines.c: Likewise.
949 * dwarf_nextcu.c: Likewise.
951 2009-05-05 Petr Machata <pmachata@redhat.com>
953 * libdwP.h (__libdw_formptr): Declare new function.
954 * dwarf_formudata.c: Implement it here.
955 * dwarf_getlocation.c (dwarf_getlocation_addr):
956 Call it instead of hand-rolled offset handling code.
957 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
958 * dwarf_ranges.c (dwarf_ranges): Likewise.
960 2009-05-04 Petr Machata <pmachata@redhat.com>
962 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
963 * dwarf_ranges.c: Implement it here.
964 (dwarf_ranges): Call it.
965 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
967 2009-04-23 Petr Machata <pmachata@redhat.com>
969 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
970 of read_*ubyte_unaligned.
971 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
972 * dwarf_formstring.c (dwarf_formstring): Likewise.
973 * dwarf_formudate.c (dwarf_formudata): Likewise.
974 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
975 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
976 * dwarf_getpubnames.c (get_offsets): Likewise.
977 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
979 2009-04-23 Petr Machata <pmachata@redhat.com>
981 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
982 __libdw_read_addr, __libdw_read_off): Add four new internal
985 2009-05-07 Roland McGrath <roland@redhat.com>
987 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
988 return value and OFFSET argument, not CU-relative. Only fetch the
989 attribute data when called with OFFSET of 0.
991 2009-05-07 Petr Machata <pmachata@redhat.com>
993 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
994 DW_AT_macro_info attribute of CU DIE.
996 2009-04-15 Roland McGrath <roland@redhat.com>
998 * dwarf.h (DW_CIE_ID): Removed.
999 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1001 2009-04-01 Roland McGrath <roland@redhat.com>
1003 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1005 2009-01-28 Roland McGrath <roland@redhat.com>
1007 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1008 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1010 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1012 2009-01-26 Roland McGrath <roland@redhat.com>
1014 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1016 2009-01-25 Roland McGrath <roland@redhat.com>
1018 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1020 2009-01-23 Roland McGrath <roland@redhat.com>
1022 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1023 Put these rules under if MAINTAINER_MODE.
1025 2009-01-22 Roland McGrath <roland@redhat.com>
1027 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1029 2009-01-21 Roland McGrath <roland@redhat.com>
1031 * Makefile.am (CLEANFILES): Renamed to ...
1032 (MOSTLYCLEANFILES): ... here.
1033 (CLEANFILES): New variable, add known-dwarf.h.
1035 2009-01-17 Roland McGrath <roland@redhat.com>
1037 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1038 Make it unconditional.
1039 (BUILT_SOURCES): Updated.
1041 * dwarf.h: Add description comments for DW_LANG_* values.
1043 * Makefile.am [MAINTAINER_MODE]
1044 ($(srcdir)/known-dwarf.h): New target.
1045 (BUILT_SOURCES): Add it.
1047 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1049 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1051 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1053 2009-01-08 Roland McGrath <roland@redhat.com>
1055 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1057 2008-01-06 Roland McGrath <roland@redhat.com>
1059 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1061 * dwarf_haschildren.c: Return -1 for error case, not 0.
1063 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1065 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1067 * dwarf.h: Add definition for unwind and call frame information.
1069 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1070 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1072 2008-08-15 Roland McGrath <roland@redhat.com>
1074 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1075 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1077 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1079 * dwarf_child.c: Minor optimizations.
1080 * dwarf_getattrs.c: Likewise.
1081 * dwarf_getpubnames.c: Likewise.
1082 * dwarf_siblingof.c: Likewise.
1083 * dwarf_tag.c: Likewise.
1085 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1087 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1088 of DWARF_VERSION comparison, just fail if the file's version is newer.
1090 2008-01-17 Nick Clifton <nickc@redhat.com>
1092 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1093 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1094 (DWARF3_LENGTH_64_BIT): New define.
1095 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1096 * dwarf_getpubnames: Include dwarf.h.
1097 (get_offsets): Use the new definitions.
1098 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1099 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1100 (dwarf_nextcu): Use the new definitions.
1102 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1103 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1104 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1105 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1107 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1110 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1112 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1113 Set the address in the return structure to the address of the next
1114 non-sibling die, if there is no sibling and the return pointer is
1115 not the same as the die pointer.
1116 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1118 * dwarf_child.c: Fix typo in comment.
1120 * libdwP.h (DWARF_VERSION): Change to 3.
1122 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1123 not have a initialised valp pointer.
1125 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1126 the end of the attributes is reached. When the callback fails,
1127 return the address of the failing attribute, not the address of
1129 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1131 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1132 (dwarf_child): Likewise.
1133 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1134 (dwarf_tag): Likewise.
1136 2008-01-08 Roland McGrath <roland@redhat.com>
1138 * Makefile.am (euinclude): Variable removed.
1139 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1140 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1142 2007-10-17 Roland McGrath <roland@redhat.com>
1144 * libdw.h (__deprecated_attribute__): New macro.
1145 (dwarf_formref): Mark it deprecated.
1146 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1147 (dwarf_formref): ... here. Call it. Remove INTDEF.
1148 * libdwP.h: Remove INTDECL.
1149 Declare __libdw_formref.
1150 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1151 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1153 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1154 needs to check CU->version.
1156 * libdwP.h (struct Dwarf_CU): New member `version'.
1157 * libdw_findcu.c (__libdw_findcu): Initialize it.
1159 * dwarf_child.c: Return 1 for null entry as first child.
1161 2007-10-05 Roland McGrath <roland@redhat.com>
1163 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1165 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1166 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1168 2007-10-03 Roland McGrath <roland@redhat.com>
1170 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1171 and dwfl_build_id_find_debuginfo.
1173 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1174 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1176 2007-10-02 Roland McGrath <roland@redhat.com>
1178 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1181 2007-08-07 Roland McGrath <roland@redhat.com>
1183 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1184 error code is DWARF_E_NOERROR (0).
1186 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1187 Fix typo in __libdw_visit_scopes argument.
1189 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1190 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1192 2007-07-03 Roland McGrath <roland@redhat.com>
1194 * libdw.h (__extern_inline): New macro.
1195 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1197 2007-04-16 Roland McGrath <roland@redhat.com>
1199 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1201 2007-04-05 Roland McGrath <roland@redhat.com>
1203 * dwarf_getsrcdirs.c: New file.
1204 * Makefile.am (libdw_a_SOURCES): Add it.
1205 * libdw.h: Declare dwarf_getsrcdirs.
1206 * libdw.map (ELFUTILS_0.127): Add it.
1208 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1209 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1210 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1211 Save DIRARRAY in the Dwarf_Files.
1213 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1214 address to check for all-ones base address entry. Check directly.
1215 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1217 2007-03-25 Roland McGrath <roland@redhat.com>
1219 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1220 Return NULL when freeing RESULT on error.
1221 (global_read, scngrp_read): Check return value from check_section,
1222 break out of loop after it has freed RESULT.
1223 (valid_p): Handle null argument.
1225 2007-03-12 Roland McGrath <roland@redhat.com>
1227 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1229 2007-03-04 Roland McGrath <roland@redhat.com>
1231 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1232 ELFUTILS_0.126. Add dwfl_module_addrsym.
1234 2007-02-10 Roland McGrath <roland@redhat.com>
1236 * dwarf.h (DW_OP_fbreg): Comment fix.
1238 2007-02-03 Roland McGrath <roland@redhat.com>
1240 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1241 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1242 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1243 exported in the past.
1245 2006-12-17 Roland McGrath <roland@redhat.com>
1247 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1248 address when the CU is missing attributes due to buggy GCC.
1250 2006-08-29 Roland McGrath <roland@redhat.com>
1252 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1254 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1255 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1257 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1258 result is aligned. Adjust NEWP->remaining here for this allocation.
1259 * libdwP.h: Update decl.
1260 (libdw_alloc): Update caller.
1262 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1264 * dwarf_child.c: Adjust for internal_function_def removal.
1265 * dwarf_getabbrev.c: Likewise.
1266 * dwarf_tag.c: Likewise.
1267 * libdw_form.c: Likewise.
1268 * memory-access.c: Likewise.
1270 2006-06-28 Roland McGrath <roland@redhat.com>
1272 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1274 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1277 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1279 * libdw.h: Add extern "C".
1281 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1283 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1284 aranges information.
1286 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1288 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1291 2006-02-28 Roland McGrath <roland@redhat.com>
1293 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1294 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1295 values from DWARF 3.0.
1297 2006-02-22 Roland McGrath <roland@redhat.com>
1299 * libdw.map: Bump to 0.120; export dwfl_version.
1301 2005-12-22 Roland McGrath <roland@redhat.com>
1303 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1305 2005-12-12 Roland McGrath <roland@redhat.com>
1307 * dwarf_ranges.c: Copy CU base address-finding code from
1310 2005-12-09 Roland McGrath <roland@redhat.com>
1312 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1313 Delay CU base lookup until it's needed.
1314 If CU base lookup fails with no error, flag invalid DWARF.
1316 2005-11-25 Roland McGrath <roland@redhat.com>
1318 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1320 2005-11-15 Roland McGrath <roland@redhat.com>
1322 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1324 2005-11-13 Roland McGrath <roland@redhat.com>
1326 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1328 2005-10-27 Roland McGrath <roland@redhat.com>
1330 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1331 don't match end_sequence markers.
1333 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1334 before normal records at the same address.
1335 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1338 2005-10-26 Roland McGrath <roland@redhat.com>
1340 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1341 * dwarf_func_file.c: Renamed to ...
1342 * dwarf_decl_file.c: ... here.
1343 * dwarf_func_col.c: Renamed to ...
1344 * dwarf_decl_column.c: ... here.
1345 * dwarf_func_line.c: Renamed to ...
1346 * dwarf_decl_line.c: ... here.
1347 (dwarf_func_line): Renamed to ...
1348 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1349 (__libdw_func_intval): Renamed __libdw_attr_intval.
1350 * dwarf_func_name.c: File removed.
1351 * dwarf_func_lowpc.c: File removed.
1352 * dwarf_func_highpc.c: File removed.
1353 * dwarf_func_entrypc.c: File removed.
1354 * dwarf_func_die.c: File removed.
1355 * Makefile.am (libdw_a_SOURCES): Updated.
1356 * libdw.h: Update decls.
1357 (Dwarf_Func): Type removed.
1358 * libdwP.h: Update decls.
1359 (struct Dwarf_Func_s): Type removed.
1360 * libdw.map: Updated.
1362 * libdwP.h (CUDIE): New macro.
1363 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1364 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1365 * dwarf_ranges.c (dwarf_ranges): Likewise.
1367 * dwarf_getloclist.c: Renamed to ...
1368 * dwarf_getlocation.c: ... here.
1369 (getloclist): Renamed to getlocation.
1370 (dwarf_getloclist): Renamed to dwarf_getlocation.
1371 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1372 * Makefile.am (libdw_a_SOURCES): Updated.
1373 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1374 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1375 (Dwarf_Loc): Renamed Dwarf_Op.
1376 * libdwP.h (struct loc_s): Update use.
1377 * libdw.map: Update map.
1379 * dwarf_entry_breakpoints.c: Use the second line record within the
1380 function, regardless of its source location data.
1382 2005-10-25 Roland McGrath <roland@redhat.com>
1384 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1386 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1388 2005-10-14 Roland McGrath <roland@redhat.com>
1390 * dwarf_diecu.c (dwarf_diecu): New file.
1391 * Makefile.am (libdw_a_SOURCES): Add it.
1392 * libdw.h: Declare dwarf_diecu.
1393 * libdw.map: Export it.
1395 * libdw.map: Bump to 0.116; export dwarf_ranges.
1397 2005-09-20 Roland McGrath <roland@redhat.com>
1399 * dwarf_haspc.c: Use dwarf_ranges.
1400 * dwarf_entry_breakpoints.c: Likewise.
1402 * dwarf_ranges.c: New file.
1403 * Makefile.am (libdw_a_SOURCES): Add it.
1404 * libdw.h: Declare dwarf_ranges.
1405 * libdwP.h: Add INTDECL.
1407 2005-09-14 Roland McGrath <roland@redhat.com>
1409 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1410 prologue_end marker scanning loop.
1412 2005-09-11 Roland McGrath <roland@redhat.com>
1414 * dwarf.h: Comment typo fix.
1416 2005-09-07 Roland McGrath <roland@redhat.com>
1418 * dwarf_entry_breakpoints.c: New file.
1419 * Makefile.am (libdw_a_SOURCES): Add it.
1420 * libdw.h: Declare dwarf_entry_breakpoints.
1422 * dwarf_entrypc.c: New file.
1423 * Makefile.am (libdw_a_SOURCES): Add it.
1424 * libdw.h: Declare dwarf_entrypc.
1425 * libdwP.h: Add INTDECL.
1427 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1429 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1430 (%.os): Use COMPILE.os.
1431 (COMPILE.os): Filter out gconv options.
1433 2005-08-27 Roland McGrath <roland@redhat.com>
1435 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1436 __libdw_visit_scopes.
1438 * dwarf_getscopes_die.c: New file.
1439 * Makefile.am (libdw_a_SOURCES): Add it.
1440 * libdw.h: Declare dwarf_getscopes_die.
1441 * libdw.map: Bump to 0.115 and add it.
1443 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1444 containing a DIE and its parent pointer, instead of just Dwarf_Die.
1445 Take two functions for both preorder and postorder visitors.
1446 * libdwP.h: Update decl.
1447 (struct Dwarf_Die_Chain): New type.
1448 * dwarf_func_inline.c: Update uses.
1450 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1452 * libdwP.h: Add INTDECL.
1453 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1455 2005-08-23 Roland McGrath <roland@redhat.com>
1457 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1458 DW_AT_specification the same as DW_AT_abstract_origin.
1460 2005-08-20 Roland McGrath <roland@redhat.com>
1462 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1463 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1464 and dwfl_report_offline.
1466 2005-08-19 Roland McGrath <roland@redhat.com>
1468 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
1469 Add dwfl_module_relocate_address, dwfl_module_relocations,
1470 dwfl_module_relocation_info.
1472 2005-08-18 Roland McGrath <roland@redhat.com>
1474 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
1475 outermost scope in the results.
1477 2005-08-15 Roland McGrath <roland@redhat.com>
1479 * dwarf_func_inline.c: New file.
1480 * Makefile.am (libdw_a_SOURCES): Add it.
1481 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
1482 * libdw.map: Add them.
1484 * dwarf_func_die.c: New file.
1485 * Makefile.am (libdw_a_SOURCES): Add it.
1486 * libdw.h: Declare dwarf_func_die.
1487 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
1489 2005-08-10 Ulrich Drepper <drepper@redhat.com>
1491 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
1492 of DW_LNS_set_epilog_begin.
1494 2005-08-09 Roland McGrath <roland@redhat.com>
1496 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
1498 * dwarf_end.c: Add INTDEF.
1499 * dwarf_error.c (dwarf_errmsg): Likewise.
1500 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
1502 2005-08-01 Roland McGrath <roland@redhat.com>
1504 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
1505 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1507 2005-07-28 Ulrich Drepper <drepper@redhat.com>
1509 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
1510 (libdw_a_LIBADD): Add all files from libdwfl.a.
1512 2005-07-27 Roland McGrath <roland@redhat.com>
1514 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
1515 along with ../libebl/libebl.a and ../lib/libeu.a;
1516 depend on ../libelf/libelf.so.
1517 (libdw_so_LDADD): New variable.
1518 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
1520 * libdw.map: Define an empty base version and move all symbols to
1521 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
1523 2005-07-23 Ulrich Drepper <drepper@redhat.com>
1525 * dwarf_error.c: Add internal alias for dwarf_errno.
1526 * libdwP.h: Declare __dwarf_errno_internal.
1527 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
1529 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
1532 2005-06-01 Roland McGrath <roland@redhat.com>
1534 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
1535 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
1537 2005-06-08 Roland McGrath <roland@redhat.com>
1539 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
1540 (get_sleb128_step, get_sleb128): Likewise.
1541 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
1542 * dwarf_getloclist.c (getloclist): Likewise.
1543 * dwarf_formblock.c (dwarf_formblock): Likewise.
1544 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1545 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
1546 * dwarf_formref.c (dwarf_formref): Likewise.
1547 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
1548 * dwarf_formudata.c (dwarf_formudata): Likewise.
1549 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1550 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
1551 * dwarf_tag.c (dwarf_tag): Likewise.
1552 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1553 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
1554 * libdw_form.c (__libdw_form_val_len): Likewise.
1555 * libdwP.h: Update decl.
1557 2005-06-04 Roland McGrath <roland@redhat.com>
1559 * memory-access.h (get_uleb128_rest_return): New macro.
1560 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
1561 (get_sleb128_rest_return): New macro.
1562 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
1563 * memory-access.c: New file.
1564 * Makefile.am (libdw_a_SOURCES): Add it.
1565 (DEFS): Add -DIS_LIBDW.
1567 2005-05-31 Roland McGrath <roland@redhat.com>
1569 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
1572 2005-05-30 Roland McGrath <roland@redhat.com>
1574 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
1575 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
1577 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
1578 BEGIN value. Instead, match base address entries separately for
1581 2005-05-28 Roland McGrath <roland@redhat.com>
1583 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
1584 past location expression contents.
1586 2005-05-23 Roland McGrath <roland@redhat.com>
1588 * dwarf_getsrclines.c: Comment typo fix.
1590 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
1591 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
1593 2005-05-22 Ulrich Drepper <drepper@redhat.com>
1595 * libdwP.h: Only use INTDECL for alias prototypes.
1597 2005-05-19 Roland McGrath <roland@redhat.com>
1599 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
1601 * dwarf_getscopevar.c: New file.
1602 * Makefile.am (libdw_a_SOURCES): Add it.
1603 * libdw.h: Declare dwarf_getscopevar.
1605 * dwarf_getsrcfiles.c: Add INTDEF.
1606 * dwarf_haschildren.c: Likewise.
1607 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
1609 * dwarf_getscopes.c: New file.
1610 * Makefile.am (libdw_a_SOURCES): Add it.
1611 * libdw.h: Declare dwarf_getscopes.
1612 * libdw.map: Add it.
1614 2005-05-18 Roland McGrath <roland@redhat.com>
1616 * libdwP.h (IDX_debug_ranges): New enum constant.
1617 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
1618 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
1619 * dwarf_error.c (errmsgs): Add it.
1620 * dwarf_haspc.c: New file.
1621 * libdw.h: Declare dwarf_haspc.
1622 * libdw.map: Add it.
1623 * libdwP.h: Add INTDECL.
1625 * dwarf_attr_integrate.c: New file.
1626 * dwarf_hasattr_integrate.c: New file.
1627 * Makefile.am (libdw_a_SOURCES): Add them.
1628 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
1629 * libdw.map: Add them.
1631 * dwarf_hasattr.c: Add INTDEF.
1632 * libdwP.h: Add INTDECL for it.
1634 * dwarf_formref_die.c: New file.
1635 * Makefile.am (libdw_a_SOURCES): Add it.
1636 * libdw.h (dwarf_formref_die): Declare it.
1637 * libdwP.h (dwarf_formref_die): Add INTDECL.
1638 * libdw.map: Add it.
1640 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
1642 (dwarf_getloclist): ... here. Call them.
1643 (dwarf_addrloclists): New function.
1644 * libdw.h: Declare it.
1645 * libdw.map: Add it.
1647 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
1648 DW_MACINFO_end_file. Recognize type 0 as terminator.
1650 2005-05-05 Roland McGrath <roland@redhat.com>
1652 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
1654 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
1655 the line program does not produce all entries in ascending order.
1657 2005-04-25 Ulrich Drepper <drepper@redhat.com>
1659 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
1660 occurences (e.g., inlines) better.
1662 2005-04-24 Ulrich Drepper <drepper@redhat.com>
1664 * libdw.h (DWARF_END_ABBREV): Define.
1665 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
1667 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
1669 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
1670 as error of __libdw_getabbrev.
1672 2005-04-04 Ulrich Drepper <drepper@redhat.com>
1674 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
1676 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
1677 results back to caller.
1679 2005-04-04 Roland McGrath <roland@redhat.com>
1681 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
1683 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
1686 2005-04-04 Ulrich Drepper <drepper@redhat.com>
1688 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
1690 * dwarf_getsrc_file.c: New file.
1691 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
1692 * libdw.h: Declare dwarf_getsrc_file.
1693 * libdw.map: Add dwarf_getsrc_file.
1695 2005-04-02 Ulrich Drepper <drepper@redhat.com>
1697 * dwarf_func_entrypc.c: New file.
1698 * dwarf_func_col.c: New file.
1699 * dwarf_func_line.c: New file.
1700 * dwarf_func_file.c: New file.
1701 * libdw.h: Add prototypes for new functions.
1702 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
1704 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
1705 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
1706 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
1707 Declare __libdw_func_intval and __dwarf_formsdata_internal.
1708 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
1709 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
1711 * dwarf.h: Add some DWARF3 definitions.
1713 2005-04-01 Ulrich Drepper <drepper@redhat.com>
1715 * dwarf_getfuncs.c: New file.
1716 * dwarf_func_highpc.c: New file.
1717 * dwarf_func_lowpc.c: New file.
1718 * dwarf_func_name.c: New file.
1719 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
1720 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
1721 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
1722 and dwarf_func_name.
1723 * libdw.h: Add prototypes for new functions.
1724 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
1725 * dwarf_siblingof.c: Likewise.
1726 * dwarf_dieoffset.c: Likewise.
1727 * dwarf_highpc.c: Likewise.
1728 * dwarf_lowpc.c: Likewise.
1729 * libdwP.h: Add prototypes for internal functions.
1730 Define Dwarf_Func_s structure.
1732 2005-03-29 Ulrich Drepper <drepper@redhat.com>
1734 * libdw.h: Add padding in Dwarf_die.
1736 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
1737 * dwarf_attr.c: Likewise.
1738 * dwarf_begin.c: Likewise.
1739 * dwarf_begin_elf.c: Likewise.
1740 * dwarf_bitoffset.c: Likewise.
1741 * dwarf_bitsize.c: Likewise.
1742 * dwarf_bytesize.c: Likewise.
1743 * dwarf_diename.c: Likewise.
1744 * dwarf_formaddr.c: Likewise.
1745 * dwarf_formblock.c: Likewise.
1746 * dwarf_formref.c: Likewise.
1747 * dwarf_formstring.c: Likewise.
1748 * dwarf_formudata.c: Likewise.
1749 * dwarf_getarange_addr.c: Likewise.
1750 * dwarf_getarangeinfo.c: Likewise.
1751 * dwarf_getaranges.c: Likewise.
1752 * dwarf_getloclist.c: Likewise.
1753 * dwarf_getmacros.c: Likewise.
1754 * dwarf_getsrc_die.c: Likewise.
1755 * dwarf_getsrcfiles.c: Likewise.
1756 * dwarf_getsrclines.c: Likewise.
1757 * dwarf_highpc.c: Likewise.
1758 * dwarf_lowpc.c: Likewise.
1759 * dwarf_nextcu.c: Likewise.
1760 * dwarf_offdie.c: Likewise.
1761 * dwarf_siblingof.c: Likewise.
1762 * dwarf_srclang.c: Likewise.
1763 * dwarf_tag.c: Likewise.
1764 * libdw_findcu.c: Likewise.
1765 * libdwP.h: Add prototypes for internal functions.
1767 * dwarf_addrdie.c: New file.
1768 * dwarf_macro_opcode.c: New file.
1769 * dwarf_macro_param1.c: New file.
1770 * dwarf_macro_param2.c: New file.
1771 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
1772 * libdwP.h: Remove Dwarf_Macro definition.
1773 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
1774 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
1775 * libdw.map: Add entries for new functions.
1777 2005-03-21 Ulrich Drepper <drepper@redhat.com>
1779 * libdw.h: Handle broken gcc < 4.
1781 2005-02-15 Ulrich Drepper <drepper@redhat.com>
1783 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
1785 * dwarf_begin_elf.c: Fix warnings.
1786 * dwarf_dieoffset.c: Likewise.
1787 * dwarf_end.c: Likewise.
1788 * dwarf_error.c: Likewise.
1789 * dwarf_getpubnames.c: Likewise.
1791 * libdwP.h: Add new error values.
1792 * dwarf_error.c: Support new error values.
1793 * dwarf_getpubnames.c: Check parameter value.
1795 2005-02-05 Ulrich Drepper <drepper@redhat.com>
1797 * Makefile.am: Check for text relocations in constructed DSO.
1799 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
1801 2005-02-04 Ulrich Drepper <drepper@redhat.com>
1803 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
1804 checks to not read over buffer boundaries for ill-formed DWARF data.
1806 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1808 * dwarf_child.c: Make compile with gcc 4.0.
1809 * dwarf_error.c: Likewise.
1810 * dwarf_formblock.c: Likewise.
1811 * dwarf_getabbrev.c: Likewise.
1812 * dwarf_getattrs.c: Likewise.
1813 * dwarf_getsrclines.c: Likewise.
1814 * dwarf_tag.c: Likewise.
1815 * libdw_form.c: Likewise.
1817 2004-01-20 Ulrich Drepper <drepper@redhat.com>
1819 * Makefile.am: Support building with mudflap.
1821 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
1822 * dwarf_getsrclines.c: Likewise.
1823 * dwarf_memory-access.h: Likewise.
1825 2004-01-19 Ulrich Drepper <drepper@redhat.com>
1827 * dwarf_getsrcfiles.c: Third parameter can be NULL.
1829 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
1830 Third parameter of dwarf_getsrcfiles can be NULL.
1832 * libdw.map: Add dwarf_getmacros.
1833 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
1834 * dwarf_getmacros.c: New file.
1836 2004-01-18 Ulrich Drepper <drepper@redhat.com>
1838 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
1840 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
1842 * dwarf_getsrclines.c:
1843 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
1845 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
1847 * libdwP.h (_): Use elfutils domain.
1849 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
1851 * dwarf_getsrclines.c: Fix typo in comment.
1853 2004-01-17 Ulrich Drepper <drepper@redhat.com>
1855 * Makefile.am: Support building with mudflap.
1857 2004-01-16 Ulrich Drepper <drepper@redhat.com>
1859 * memory-access.h: Add lots of const in case a pointer passed is const.
1861 * dwarf_formflag.c: New file.
1862 * dwarf_getattrs.c: New file.
1863 * dwarf_error.c: Add new error value.
1864 * libdw.h: Add prototypes for new functions. Adjust prototype for
1866 * libdw.map: Add new functions.
1867 * dwarf_getpubnames.c: Change type of return value and fourth parameter
1869 * libdwP.h: Add new error value.
1870 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
1873 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
1875 2004-01-12 Ulrich Drepper <drepper@redhat.com>
1877 * dwarf_getarange_addr.c: New file
1878 * dwarf_getarangeinfo.c: New file.
1879 * dwarf_getaranges.c: New file.
1880 * dwarf_onerange.c: New file.
1881 * libdw.h: Declare new functions. Define Dwarf_Arange and
1883 * libdw.map: Add new functions.
1884 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
1885 Define Dwarf_Aranges_s and Dwarf_Arange_s.
1886 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
1887 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
1888 * dwarf_error.c: Add new message.
1890 2004-01-11 Ulrich Drepper <drepper@redhat.com>
1892 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
1893 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
1894 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
1895 * dwarf_error.c: Add another message.
1896 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
1898 * dwarf_filesrc.c: Likewise.
1899 * dwarf_getsrcfiles.c: Likewise.
1900 * dwarf_getsrclines.c: Likewise.
1901 * dwarf_lineaddr.c: New file.
1902 * dwarf_linebeginstatement.c: New file.
1903 * dwarf_lineblock.c: New file.
1904 * dwarf_linecol.c: New file.
1905 * dwarf_lineendsequence.c: New file.
1906 * dwarf_lineepiloguebegin.c: New file.
1907 * dwarf_lineno.c: New file.
1908 * dwarf_lineprologueend.c: New file.
1909 * dwarf_onesrcline.c: New file.
1910 * dwarf_lineno.c: Change interface to store result in object pointed
1911 to by second parameter.
1912 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
1913 prototype. Define Dwarf_Files and Dwarf_Lines.
1914 * libdw.map: Add new functions.
1915 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
1916 * libdw_findcu.c: Don't initialize nlines field.
1918 * dwarf_siblingof: Little optimization.
1920 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
1921 * dwarf_end.c: Close ELF descriptor if free_elf is set.
1922 * libdwP.h (struct Dwarf): Add free_elf field.
1924 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
1926 * dwarf_getstring.c: New file.
1927 * dwarf_offabbrev.c: New file.
1928 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
1929 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
1930 parameters. Don't allocate memory if not necessary and don't lookup
1931 previous results if no CU given.
1932 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
1933 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
1934 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
1935 * libdwP.h: Change prototype for __libdw_getabbrev.
1937 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
1938 returning if this is wanted.
1940 2004-01-09 Ulrich Drepper <drepper@redhat.com>
1942 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
1943 with offset_size value.
1944 * libdw.h: Adjust dwarf_nextcu prototype.
1945 * libdwP.h (struct Dwarf_CU): Add offset_size member.
1946 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
1947 member of new CU struct.
1948 * dwarf_formstring.c: Depend on offset_size not address_size for
1949 DW_FORM_strp handling.
1950 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
1952 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
1954 (dwarf_tag): Correctly recognize failed lookup.
1956 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
1958 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
1959 * dwarf_formblock.c: New file.
1960 * dwarf_getloclist.c: Rewrite to handle a single block.
1961 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
1962 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
1963 dwarf_getloclistent declaration.
1964 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
1965 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
1966 Add locs member to struct Dwarf_CU.
1967 * libdw_fundcu.c: Initialize locs member of new CU.
1968 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
1969 Remove dwarf_getloclistent.c.
1971 2004-01-07 Ulrich Drepper <drepper@redhat.com>
1973 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
1974 * libdwP.h: Likewise.
1976 * dwarf_getloclist.c: New file.
1977 * dwarf_getloclistent.c: New file.
1978 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
1979 Declare dwarf_getloclistent and dwarf_getloclist.
1980 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
1981 * libdwP.h: Define DWARF_E_NO_LOCLIST.
1982 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
1985 * dwarf_error.c: More error messages.
1987 2004-01-06 Ulrich Drepper <drepper@redhat.com>
1989 * dwarf_getsrclines.c: Remove debugging support.
1991 * dwarf_getsrcfiles.c: New file.
1992 * dwarf_filesrc.c: New file.
1993 * libdw.h: Declare these functions. Define Dwarf_File.
1994 * libdwP.c: Adjust Dwarf_File_s definition.
1995 * libdw.map: Add these functions.
1996 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
1998 * dwarf_getsrclines.c: Initialize cu->files.
2000 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2002 * libdw.h: Add more nonnull function attributes.
2004 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2005 * dwarf_end.c (cu_free): New function.
2006 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2007 * dwarf_error.c (errmsgs): Add new messages.
2008 * dwarf_getsrc_die.c: New file.
2009 * dwarf_getsrclines.c: New file.
2010 * dwarf_lineno.c: New file.
2011 * dwarf_linesrc.c: New file.
2012 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2013 instead of the *_inc-less variants.
2014 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2015 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2016 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2018 * libdwP.h: Add more error codes.
2019 (struct Dwarf): Remove mem_tail.next member.
2020 (Dwarf_File): Define type.
2021 (struct Dwarf_Line_s): Define type.
2022 (struct Dwarf_CU): Add lines and nlines members.
2023 (libdw_alloc): Define local variable _tail and use it.
2024 Add some function attributes.
2025 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2026 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2027 * memory-access.h: Add unlikely for the endian conversion paths.
2028 * Makefile.am (AM_CFLAGS): Add -std parameter.
2029 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2030 dwarf_lineno, and dwarf_linesrc.
2032 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2034 * Moved to CVS archive.