1 2017-12-20 Mark Wielaard <mark@klomp.org>
3 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
4 (cu_sec_idx): Return cu->sec_idx.
5 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
6 IDX_debug_info or IDX_debug_types.
7 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
9 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
10 IDX_debug_macro or IDX_debug_macinfo.
12 2017-12-12 Mark Wielaard <mark@klomp.org>
14 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
15 given DIE. Reserve memory for a new DIE first.
17 2017-12-11 Dima Kogan <dima@secretsauce.net>
19 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
22 2017-11-03 Mark Wielaard <mark@klomp.org>
24 * dwarf_getlocation.c (__libdw_intern_expression): Handle
25 DW_OP_GNU_variable_value.
26 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
27 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
29 2017-11-03 Mark Wielaard <mark@klomp.org>
31 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
32 Update list of acceptable attribute codes based on DWARF5.
34 2017-11-03 Mark Wielaard <mark@klomp.org>
36 * dwarf.h: Add DW_OP_GNU_variable_value.
38 2017-10-03 Mark Wielaard <mark@klomp.org>
40 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
42 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
44 * memory-access.h: Use attribute_packed.
46 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
48 * libdwP.h: Use attribute_hidden.
49 * libdw_alloc.c: Likewise.
51 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
53 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
55 2017-07-26 Mark Wielaard <mark@klomp.org>
57 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
58 * dwarf_getmacros.c (get_table_for_offset): Accept either version
59 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
60 (read_macros): Use table version for fake_cu.
62 2017-07-26 Mark Wielaard <mark@klomp.org>
64 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
65 DW_TAG_packed_type and DW_TAG_shared_type.
66 * libdw.h (dwarf_peel_type): Extend documentation.
68 2017-07-26 Mark Wielaard <mark@klomp.org>
70 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
71 DW_DEFAULTED_out_of_class.
73 2017-07-26 Mark Wielaard <mark@klomp.org>
75 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
77 2017-07-26 Mark Wielaard <mark@klomp.org>
79 * dwarf_default_lower_bound.c: New file.
80 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
81 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
82 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
83 * libdw.h: Add dwarf_default_lower_bound.
84 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
85 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
86 dwarf_default_lower_bound INTDECL.
88 2017-07-26 Mark Wielaard <mark@klomp.org>
90 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
91 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
92 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
93 * dwarf_aggregate_size.c (array_size): Add lower bound for
94 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
95 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
96 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
97 DW_LANG_Julia and DW_LANG_BLISS.
99 2017-07-26 Mark Wielaard <mark@klomp.org>
101 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
103 2017-07-25 Mark Wielaard <mark@klomp.org>
105 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
106 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
107 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
108 for currently unused numbers.
110 2017-07-25 Mark Wielaard <mark@klomp.org>
112 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
113 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
114 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
116 2017-07-21 Mark Wielaard <mark@klomp.org>
118 * dwarf_line_file.c: New file.
119 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
120 * libdw.h (dwarf_line_file): New function declaration.
121 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
123 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
125 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
126 made of, libdw_so_DEPS for libraries it depends on (including
127 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
128 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
129 library dependencies, use libdw_so_LIBS rather than relying on the
130 order of dependencies specified, add -z,relro.
132 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
134 * libdw.h: Remove attribute macro declarations and use
135 __noreturn_attribute__ as defined in libelf.h.
137 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
139 * dwarf_begin_elf.c: Include endian.h.
141 2017-03-30 Mark Wielaard <mjw@redhat.com>
143 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
146 2016-10-22 Mark Wielaard <mjw@redhat.com>
148 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
149 * dwarf_aggregate_size.c (array_size): Use correct spelling of
152 2016-11-02 Mark Wielaard <mjw@redhat.com>
154 * cfi.c (execute_cfi): Add fallthrough comments.
155 * encoded-value.h (encoded_value_size): Add explicit return instead
156 of relying on fallthrough.
157 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
160 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
162 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
163 * libdw_alloc.c: Likewise.
165 2016-07-08 Mark Wielaard <mjw@redhat.com>
167 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
168 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
169 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
171 2016-02-13 Mark Wielaard <mjw@redhat.com>
173 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
176 2015-12-18 Mark Wielaard <mjw@redhat.com>
178 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
179 (__libdw_free_zdata): Remove.
180 * dwarf_begin_elf.c (inflate_section): Remove.
181 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
182 and elf_compress_gnu to decompress if necessary.
183 (valid_p): Remove __libdw_free_zdata calls.
184 (scngrp_read): Use elf_compress if section is compressed. Remove
185 __libdw_free_zdata calls.
186 * dwarf_end.c (__libdw_free_zdata): Remove.
187 (dwarf_end): Don't call __libdw_free_zdata.
189 2015-10-28 Mark Wielaard <mjw@redhat.com>
191 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
193 2015-12-02 Mark Wielaard <mjw@redhat.com>
195 * fde.c (intern_fde): Don't leak duplicate FDEs.
197 2015-12-01 Mark Wielaard <mjw@redhat.com>
199 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
202 2015-12-01 Mark Wielaard <mjw@redhat.com>
204 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
206 2015-10-14 Chih-Hung Hsieh <chh@google.com>
208 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
209 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
211 2015-10-14 Chih-Hung Hsieh <chh@google.com>
213 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
214 function 'walk_children' to file scope; inline 'recurse' at its call
217 2015-10-19 Mark Wielaard <mjw@redhat.com>
219 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
222 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
224 * dwarf_getsrclines.c (read_srclines): Initialize state early.
226 2015-10-13 Chih-Hung Hsieh <chh@google.com>
228 * dwarf_getsrclines.c (read_srclines): Move nested functions
229 'advance_pc' and 'add_new_line' to file scope and keep many
230 local state variables within one structure.
232 2015-10-13 Chih-Hung Hsieh <chh@google.com>
234 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
235 function 'file_matches' to file scope.
237 2015-10-16 Mark Wielaard <mjw@redhat.com>
239 * Makefile.am (libdw.so): Add -lz.
241 2015-10-14 Chih-Hung Hsieh <chh@google.com>
243 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
244 and 'require_cfa_offset' to file scope.
246 2015-10-09 Josh Stone <jistone@redhat.com>
248 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
251 2015-10-05 Josh Stone <jistone@redhat.com>
253 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
255 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
257 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
258 relocation overflows in some platforms.
260 2015-09-23 Mark Wielaard <mjw@redhat.com>
262 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
263 * dwarf_formref.c (__libdw_formref): Likewise.
264 * libdw_findcu.c (__libdw_findcu): Likewise.
265 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
267 2015-09-22 Mark Wielaard <mjw@redhat.com>
269 * *.c: Remove old-style function definitions.
271 2015-09-15 Mark Wielaard <mjw@redhat.com>
273 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
275 2015-09-09 Chih-Hung Hsieh <chh@google.com>
277 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
278 redundant NULL tests on parameters declared with __nonnull_attribute__.
279 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
280 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
282 2015-09-04 Chih-Hung Hsieh <chh@google.com>
283 Mark Wielaard <mjw@redhat.com>
285 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
286 definition with ansi-C definition and add const qualifier to
289 2015-09-04 Chih-Hung Hsieh <chh@google.com>
291 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
292 definition with ansi-C definitions.
293 (__libdw_findcu): Likewise.
295 2015-08-25 Mark Wielaard <mjw@redhat.com>
297 * dwarf.h: Add DW_LANG_Haskell.
299 2015-06-18 Mark Wielaard <mjw@redhat.com>
301 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
304 2015-06-18 Mark Wielaard <mjw@redhat.com>
306 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
308 2015-06-18 Mark Wielaard <mjw@redhat.com>
310 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
311 dwarf_formudata reports an error.
312 (get_table_for_offset): Likewise.
314 2015-06-08 Mark Wielaard <mjw@redhat.com>
316 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
318 2015-06-06 Mark Wielaard <mjw@redhat.com>
320 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
322 2015-05-27 Mark Wielaard <mjw@redhat.com>
324 * encoded-value.h (read_encoded_value): Check data d_size contains
325 at least enough data to hold a pointer for DW_EH_PE_indirect.
327 2015-05-22 Mark Wielaard <mjw@redhat.com>
329 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
330 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
331 MAX_STACK_DIRS. Calculate number of dirs needed first, then
332 create dirarray directly, without needing the next field. Free
333 not stack allocated lines and files at the end.
335 2015-05-19 Mark Wielaard <mjw@redhat.com>
337 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
338 allocated array to hold locs. Allocate locs bigger than the array
339 with malloc and free them when done.
341 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
343 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
344 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
345 * dwarf_begin_elf.c (inflate_section): New static function, lifted
347 (check_section): ... here. Call inflate_section, set libdw errno to
348 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
350 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
352 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
353 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
355 2015-05-06 Mark Wielaard <mjw@redhat.com>
357 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
358 check the line number.
360 2015-05-05 Mark Wielaard <mjw@redhat.com>
362 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
363 left before reading values.
365 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
367 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
370 2015-04-22 Mark Wielaard <mjw@redhat.com>
372 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
373 (__libdw_max_len_uleb128): New function.
374 (__libdw_max_len_sleb128): Likewise.
375 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
376 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
378 2015-04-21 Mark Wielaard <mjw@redhat.com>
380 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
381 when there are more than 8.
383 2015-04-01 Petr Machata <pmachata@redhat.com>
385 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
386 (is_cudie): New function.
387 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
388 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
389 of white-listing valid tags.
390 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
392 2015-03-18 Petr Machata <pmachata@redhat.com>
394 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
395 (EXTRA_DIST): Remove known-dwarf.h.
397 2015-02-09 Mark Wielaard <mjw@redhat.com>
399 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
400 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
401 for new Fortran language codes is 1.
403 2015-02-09 Mark Wielaard <mjw@redhat.com>
405 * dwarf.h: Add DW_TAG_atomic_type.
406 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
407 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
409 2015-02-11 Josh Stone <jistone@redhat.com>
411 * encoded-value.h (read_encoded_value): Initialize value.
413 2015-02-11 Petr Machata <pmachata@redhat.com>
415 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
416 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
417 the fact in *BASEP and bail out later if it hasn't been updated by
418 __libdw_read_begin_end_pair_inc.
420 2014-12-24 Mark Wielaard <mjw@redhat.com>
422 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
423 smaller than or equal to addr, rather than returning immediately on
426 2015-01-07 Mark Wielaard <mjw@redhat.com>
428 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
429 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
430 room in the search table for all entries. Store search_table_len.
431 (getcfi_scn_eh_frame): Likewise.
432 * encoded-value.h (encoded_value_size): Don't abort, return zero.
433 (__libdw_cfi_read_address_inc): Check there is enough room to read
434 values. Pass other byte order to read functions.
435 (read_encoded_value): Check encoded_value_size. Don't abort, but
436 set libdw errno and report failure. Check there is enough room to
438 * fde.c (binary_search_fde): Check encoded value size. Add hdr
439 data buf and size to dummy_cfi.
441 2015-01-04 Mark Wielaard <mjw@redhat.com>
443 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
444 is after current DIE.
446 2015-01-04 Mark Wielaard <mjw@redhat.com>
448 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
449 (dwarf_frame_register).
451 2015-01-02 Mark Wielaard <mjw@redhat.com>
453 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
454 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
455 (getcfi_scn_eh_frame): Check d_buf is not NULL.
457 2015-01-02 Mark Wielaard <mjw@redhat.com>
459 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
460 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
461 DW_OP_addr if dbg is NULL then read argument directly.
463 2015-01-14 Jason P. Leasure <jpleasu@super.org>
465 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
468 2014-12-27 Mark Wielaard <mjw@redhat.com>
470 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
471 still falls inside CU data.
473 2015-01-11 Mark Wielaard <mjw@redhat.com>
475 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
476 __libdw_visit_scopes with NULL imports.
477 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
478 * dwarf_getscopes.c (pc_record): Likewise.
479 (dwarf_getscopes): Likewise.
480 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
481 * libdwP.h (__libdw_visit_scopes): Add imports argument.
482 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
483 function imports_contains. Push and pop imports around walk_children
484 when processing DW_TAG_imported_unit.
486 2014-12-18 Ulrich Drepper <drepper@gmail.com>
488 * Makefile.am: Suppress output of textrel_check command.
490 2014-12-16 Mark Wielaard <mjw@redhat.com>
492 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
495 2014-12-16 Mark Wielaard <mjw@redhat.com>
497 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
498 space to read die offset.
500 2014-12-16 Mark Wielaard <mjw@redhat.com>
502 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
505 2014-12-15 Mark Wielaard <mjw@redhat.com>
507 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
508 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
509 (dwarf_getpubnames): Make sure section data contains string zero
512 2014-12-16 Mark Wielaard <mjw@redhat.com>
514 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
515 the compiler optimize for the common single-byte case.
517 2014-12-15 Josh Stone <jistone@redhat.com>
519 * memory-access.h (__libdw_max_len_leb128): New.
520 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
521 (__libdw_get_sleb128): Likewise.
523 2014-12-14 Mark Wielaard <mjw@redhat.com>
525 * cfi.c (execute_cfi): Add program bounds checks.
526 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
527 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
528 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
529 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
530 * dwarf_formudata.c (dwarf_formudata): Likewise.
531 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
532 with end of data buf.
533 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
534 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
535 call gets enough data.
536 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
537 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
539 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
541 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
542 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
543 get_uleb128 with lineendp.
544 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
545 get_uleb128 with endp.
546 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
547 get_uleb128/get_sleb128 with limit.
548 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
549 get_sleb128 get called with enough data.
550 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
551 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
552 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
554 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
555 Don't call get_uleb128_step if out of data.
556 (__libdw_get_sleb128): Likewise for get_sleb128_step.
558 2014-12-12 Mark Wielaard <mjw@redhat.com>
560 * libdwP.h (struct Dwarf): Add fake_loc_cu.
562 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
563 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
564 (__libdw_form_val_len): Likewise.
565 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
566 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
567 the already found data buffer directly.
568 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
569 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
570 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
572 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
573 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
574 * dwarf_getlocation_attr.c (attr_form_cu): New function.
575 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
576 (getlocation): Handle empty blocks immediately.
577 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
578 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
579 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
581 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
582 fake_cu. Call __libdw_form_val_len with just fake_cu.
583 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
584 datap and size directly from cu startp and endp.
586 2014-12-11 Mark Wielaard <mjw@redhat.com>
588 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
590 2014-12-13 Mark Wielaard <mjw@redhat.com>
592 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
593 difference doesn't wrap around before returning as int.
595 2014-12-11 Josh Stone <jistone@redhat.com>
597 * dwarf_getsrclines.c (struct linelist): Add sequence.
598 (compare_lines): Take linelists, and break ties by sequence.
599 (read_srclines): Use linelists for sorting.
600 (read_srclines::add_new_line): Set sequence.
602 2014-12-10 Josh Stone <jistone@redhat.com>
604 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
605 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
606 * dwarf_child.c (dwarf_child): Use cu->endp.
607 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
608 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
609 * dwarf_siblingof.c (dwarf_siblingof): Use both.
611 2014-12-10 Josh Stone <jistone@redhat.com>
613 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
615 2014-12-10 Josh Stone <jistone@redhat.com>
617 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
618 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
619 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
620 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
621 * dwarf_tag.c (dwarf_tag): Likewise.
623 2014-12-04 Mark Wielaard <mjw@redhat.com>
625 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
626 (__libdw_form_val_len): Likewise and check len doesn't overflow.
627 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
628 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
630 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
631 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
633 2014-12-02 Petr Machata <pmachata@redhat.com>
635 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
637 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
638 * libdw.h (DWARF_GETMACROS_START): New macro.
640 2014-11-27 Mark Wielaard <mjw@redhat.com>
642 * Makefile.am (libdw.so): Use textrel_check.
644 2014-11-27 Mark Wielaard <mjw@redhat.com>
646 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
647 search_table_entries and search_table_encoding.
649 2014-11-24 Mark Wielaard <mjw@redhat.com>
651 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
654 2014-11-23 Mark Wielaard <mjw@redhat.com>
656 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
657 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
658 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
660 2014-11-23 Mark Wielaard <mjw@redhat.com>
662 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
663 Set libdw errno and return NULL.
665 2014-11-24 Mark Wielaard <mjw@redhat.com>
667 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
668 (DW_LANG_C11): Likewise.
669 (DW_LANG_C_plus_plus_14): Likewise.
670 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
671 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
673 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
676 2014-11-26 Mark Wielaard <mjw@redhat.com>
678 * dwarf.h (DW_AT_noreturn): Added.
680 2014-11-11 Mark Wielaard <mjw@redhat.com>
682 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
683 explicitly as uint8_t.
684 (__libdw_getsrclines): Add internal_function to declaration.
686 2014-09-10 Petr Machata <pmachata@redhat.com>
688 * dwarf_macro_getparamcnt.c: New file.
689 * dwarf_macro_param.c: New file.
690 * dwarf_macro_getsrcfiles.c: New file.
691 * Makefile.am (libdw_a_SOURCES): Add the new files.
692 * libdwP.h (struct files_lines_s): New structure.
693 (DWARF_E_INVALID_OPCODE): New enumerator.
694 (struct Dwarf): New fields macro_ops, files_lines.
695 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
696 keeping macro opcode prototypes in.
697 (Dwarf_Macro_s): Redefine from scratch.
698 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
700 * dwarf_error.c (errmsgs): Add a message for
701 DWARF_E_INVALID_OPCODE.
702 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
704 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
705 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
707 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
708 (get_offset_from, macro_op_compare, build_table)
709 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
710 (cache_op_table, read_macros, gnu_macros_getmacros_off)
711 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
713 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
714 * dwarf_getsrclines.c (read_srclines): New function with guts
715 taken from dwarf_getsrclines.
716 (__libdw_getsrclines): Likewise.
717 (__libdw_getcompdir, files_lines_compare): New functions.
718 (dwarf_getsrclines): Make it dispatch to the new interfaces.
719 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
721 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
722 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
723 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
725 2014-10-06 Mark Wielaard <mjw@redhat.com>
727 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
728 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
729 (aggregate_size): Likewise. Add old and new version.
730 * dwarf_peel_type.c: New file.
731 * libdw.h (dwarf_peel_type): New function declaration.
732 * libdwP.h (dwarf_peel_type): New internal declaration.
733 * libdw.map (ELFUTILS_0.161): New section.
735 2014-10-15 Petr Machata <pmachata@redhat.com>
737 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
738 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
740 2014-10-05 Mark Wielaard <mjw@redhat.com>
742 * dwarf.h: Add DW_AT_GNU_deleted.
744 2014-10-02 Mark Wielaard <mjw@redhat.com>
746 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
747 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
748 DW_TAG_rvalue_reference_type.
750 2014-09-12 Petr Machata <pmachata@redhat.com>
752 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
753 8-byte quantities. Consequently, rename to...
754 (read_addr_unaligned_inc): ... this.
755 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
756 (read_sbyte_unaligned): Drop.
758 2014-09-10 Petr Machata <pmachata@redhat.com>
760 * dwarf_getlocation.c (attr_ok): Also accept
761 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
762 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
764 2014-08-15 Mark Wielaard <mjw@redhat.com>
766 * dwarf_cu_die.c: New file.
767 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
768 * libdw.h (dwarf_cu_die): New function declaration.
769 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
771 2014-08-15 Mark Wielaard <mjw@redhat.com>
773 * dwarf_cu_getdwarf.c: New file.
774 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
775 * libdw.h (Dwarf_CU): New typedef.
776 (dwarf_cu_getdwarf): New function declaration.
777 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
779 2014-06-18 Mark Wielaard <mjw@redhat.com>
781 * dwarf.h: Remove DW_TAG_mutable_type.
783 2014-05-02 Mark Wielaard <mjw@redhat.com>
785 * libdwP.h (__check_build_id): Removed now unused.
787 2014-05-01 Mark Wielaard <mjw@redhat.com>
789 * libdwP.h (struct Dwarf): Remove free_alt.
790 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
791 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
793 2014-04-30 Mark Wielaard <mjw@redhat.com>
795 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
797 2014-04-15 Florian Weimer <fweimer@redhat.com>
799 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
800 (open_debugaltlink): Move to libdwfl.
801 (check_section): Do not locate alternate debuginfo.
803 2014-04-24 Florian Weimer <fweimer@redhat.com>
805 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
807 2014-04-22 Florian Weimer <fweimer@redhat.com>
809 * dwarf_getalt.c, dwarf_setalt.c: New files.
810 * Makefile.am (libdw_a_SOURCES): Add them.
811 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
812 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
814 * libdw.map (ELFUTILS_0.159): Export the two new functions.
816 2014-04-15 Florian Weimer <fweimer@redhat.com>
818 * libdwP.h (enum IDX_gnu_debugaltlink): New.
819 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
821 (check_section): Obtain .gnu_debugaltlink section from the
824 2014-04-11 Mark Wielaard <mjw@redhat.com>
826 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
827 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
828 (libdwelf_objects): New variable.
829 (libdw_a_LIBADD): Add libdwelf objects.
831 2014-04-22 Mark Wielaard <mjw@redhat.com>
833 * memory-access.h (get_sleb128_step): Remove undefined behavior
834 of left shifting a signed value. Replace it with a multiplication.
836 2014-04-13 Mark Wielaard <mjw@redhat.com>
838 * Makefile.am: Remove !MUDFLAP conditions.
840 2014-04-09 Mark Wielaard <mjw@redhat.com>
842 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
843 before calling malloc to uncompress data.
845 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
847 Fix abort() on missing section headers.
848 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
849 New label err to return NULL.
851 2014-02-05 Josh Stone <jistone@redhat.com>
853 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
854 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
855 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
857 2013-12-30 Mark Wielaard <mjw@redhat.com>
859 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
860 dwfl_linux_proc_attach.
862 2013-12-20 Mark Wielaard <mjw@redhat.com>
864 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
866 2013-12-18 Mark Wielaard <mjw@redhat.com>
868 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
869 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
870 dwfl_module_getsym_info.
872 2013-12-16 Mark Wielaard <mjw@redhat.com>
874 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
876 2013-12-10 Josh Stone <jistone@redhat.com>
878 * memory-access.h (get_uleb128_rest_return): Removed.
879 (get_sleb128_rest_return): Removed.
880 (get_uleb128_step): Make this a self-contained block.
881 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
882 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
883 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
884 (__libdw_get_uleb128): Simplify and inline for all callers.
885 (__libdw_get_sleb128): Ditto.
886 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
887 * memory-access.c: Delete file.
888 * Makefile.am (libdw_a_SOURCES): Remove it.
889 (DEFS): Remove the now unused -DIS_LIBDW.
891 2013-12-09 Josh Stone <jistone@redhat.com>
893 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
894 __libdw_form_val_len, now handling only non-constant form lengths.
895 * libdwP.h (__libdw_form_val_len): New inlined function.
897 2013-12-09 Mark Wielaard <mjw@redhat.com>
899 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
900 location expressions.
901 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
902 location found, return empty location expression.
903 * dwarf_getlocation_implicit_pointer.c
904 (dwarf_getlocation_implicit_pointer): Likewise.
905 (__libdw_empty_loc_attr): New internal function.
906 * libdwP.h (__libdw_empty_loc_attr): Define.
908 2013-11-27 Mark Wielaard <mjw@redhat.com>
910 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
911 dwfl_module_getsym_elf.
913 2013-11-26 Mark Wielaard <mjw@redhat.com>
915 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
916 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
917 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
918 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
919 (ELFUTILS_0.158): ... here.
921 2013-11-09 Mark Wielaard <mjw@redhat.com>
923 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
924 check that it is zero.
926 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
928 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
929 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
930 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
931 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
932 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
934 2013-11-01 Michael Forney <mforney@mforney.org>
936 * Makefile.am (libdwfl_objects): New definition.
937 (libdw_a_LIBADD): Use libdwfl_objects.
939 2013-11-01 Michael Forney <mforney@mforney.org>
941 * Makefile.am: Use READELF.
943 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
945 * libdw.map (ELFUTILS_0.158): New.
947 2013-10-10 Mark Wielaard <mjw@redhat.com>
949 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
950 start_addr and rename last_offset to last_addr. Now both void *.
951 (tree_visitor): Use start_add and die_addr instead of start_offset
953 (dwarf_getfuncs): Use last_addr instead of last_offset.
955 2013-10-06 Mark Wielaard <mjw@redhat.com>
957 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
958 DW_CFA_val_expression are not used with abi_cfi.
960 2013-10-03 Josh Stone <jistone@redhat.com>
962 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
963 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
964 a unit, make sure to always hash the sig8 here, so none are missed.
966 2013-09-29 Mark Wielaard <mjw@redhat.com>
968 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
969 uintptr_t before casting to char *.
970 (__libdw_intern_expression): Cast data to uintptr_t before casting
972 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
973 op->number2 to uintptr_t before casting to char *.
975 2013-09-24 Josh Stone <jistone@redhat.com>
977 * libdw_visit_scopes.c (classify_die): Removed.
978 (may_have_scopes): New function to replace classify_die. There's no
979 need for full classification; just find tags that may contain scopes.
980 (__libdw_visit_scopes): Use a direct tag comparison for imported
981 units, and use may_have_scopes to test if recursion is needed.
983 2013-09-20 Mark Wielaard <mjw@redhat.com>
985 * dwarf_getfuncs.c (visitor_info): New struct.
986 (tree_visitor): New function.
987 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
988 * libdw.h (dwarf_getfuncs): Expand function documentation.
990 2013-09-12 Mark Wielaard <mjw@redhat.com>
992 * fde.c (intern_fde): Free fde and set libdw errno when start
993 or end could not be read.
995 2013-08-24 Mark Wielaard <mjw@redhat.com>
997 * dwarf_getlocation.c (store_implicit_value): Don't take data
998 as argument, get block data from op number2. Return false when
999 block data length and op number don't match up.
1000 (__libdw_intern_expression): Store start of block for
1001 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1002 relative data offset. Also store block start (including length)
1003 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1004 * dwarf_getlocation_attr.c: New file.
1005 * dwarf_getlocation_die.c: Likewise.
1006 * libdw.h (dwarf_getlocation_die): New function definition.
1007 (dwarf_getlocation_attr): Likewise.
1008 * libdwP.h: Declare internal dwarf_getlocation_die.
1009 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1010 dwarf_getlocation_attr.
1011 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1012 dwarf_getlocation_attr.c.
1014 2013-08-23 Mark Wielaard <mjw@redhat.com>
1016 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1017 (attr_base_address): New function.
1018 (initial_offset_base): New function.
1019 (getlocations_addr): New function. Taken from...
1020 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1022 (dwarf_getlocations): New function.
1023 * libdw.h (dwarf_getlocations): New function definition.
1024 * libdw.map (ELFUTILS_0.157): New.
1026 2013-07-02 Mark Wielaard <mjw@redhat.com>
1028 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1029 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1030 NEW_LINE macro. Free malloced line records if any at the end.
1032 2013-07-02 Mark Wielaard <mjw@redhat.com>
1034 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1036 2013-06-26 Mark Wielaard <mjw@redhat.com>
1038 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1039 DIEs without children. Return an error whenever dwarf_child or
1040 dwarf_siblingof return an error. Don't call recurse and increase
1041 the depth for an imported unit. Walk the children of an imported
1042 unit as if they are logical children of the parent root DIE.
1044 2013-05-03 Mark Wielaard <mjw@redhat.com>
1046 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1049 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1051 * libdw.map (ELFUTILS_0.156): New.
1053 2013-04-24 Mark Wielaard <mjw@redhat.com>
1055 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1057 2013-04-10 Mark Wielaard <mjw@redhat.com>
1059 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1060 equal to address size when we have a DW_FORM_ref_addr for DWARF
1063 2013-03-25 Mark Wielaard <mjw@redhat.com>
1065 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1068 2013-03-12 Mark Wielaard <mjw@redhat.com>
1070 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1071 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1073 2013-02-15 Mark Wielaard <mjw@redhat.com>
1075 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1076 not dbg->sectiondata.
1078 2013-01-07 Roland McGrath <roland@hack.frob.com>
1081 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1082 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1084 2012-12-18 Mark Wielaard <mjw@redhat.com>
1086 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1087 (check_section): Likewise on error.
1088 (scngrp_read): Likewise.
1089 (dwarf_begin_elf): Likewise.
1091 2012-10-09 Petr Machata <pmachata@redhat.com>
1093 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1094 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1095 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1096 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1098 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1100 * cfi.c: New include system.h.
1101 (execute_cfi) (enough_registers): Clear new memory after realloc.
1103 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1105 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1106 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1109 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1111 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1112 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1113 Remove the later DW_OP_call_frame_cfa push to RESULT.
1115 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1118 * fde.c (binary_search_fde): Remove always true <address >= start>
1119 conditional. Move L initialization upwards.
1121 2012-08-24 Mark Wielaard <mjw@redhat.com>
1123 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1124 when ENABLE_DWZ is defined.
1125 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1128 2012-08-16 Mark Wielaard <mjw@redhat.com>
1130 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1131 * dwarf.h (DW_LANG_Go): Update comment.
1132 (DW_LANG_Mips_Assembler): Likewise.
1134 2012-06-27 Mark Wielaard <mjw@redhat.com>
1136 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1137 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1138 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1139 (try_debugaltlink): New function.
1140 (open_debugaltlink): Likewise.
1141 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1142 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1144 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1145 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1147 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1148 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1149 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1151 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1152 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1153 (struct Dwarf): Add alt_dwarf and free_alt fields.
1154 (__libdw_read_offset): Add dbg_ret argument, use to check with
1155 __libdw_offset_in_section.
1156 (__check_build_id): New function declaration.
1157 (dwarf_begin): Define as INTDECL.
1158 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1159 and DW_FORM_GNU_strp_alt.
1161 2012-07-19 Mark Wielaard <mjw@redhat.com>
1163 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1165 2012-07-24 Mark Wielaard <mjw@redhat.com>
1167 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1168 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1171 2012-07-24 Mark Wielaard <mjw@redhat.com>
1173 * dwarf.h: Add DW_ATE_UTF.
1175 2012-06-27 Mark Wielaard <mjw@redhat.com>
1177 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1179 2012-06-26 Mark Wielaard <mjw@redhat.com>
1181 * libdwP.h: Add IDX_debug_macro.
1182 * dwarf.h: Add DW_AT_GNU_macros.
1183 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1184 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1186 2012-04-27 Mark Wielaard <mjw@redhat.com>
1188 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1189 a constant offset from DW_AT_low_pc.
1191 2012-03-19 Tom Tromey <tromey@redhat.com>
1193 * libdw_findcu.c (findcu_cb): Move earlier.
1194 (__libdw_intern_next_unit): Add new CU to search tree here...
1195 (__libdw_findcu): ... not here.
1197 2012-01-31 Mark Wielaard <mjw@redhat.com>
1199 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1201 2011-11-31 Mark Wielaard <mjw@redhat.com>
1203 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1205 2011-07-14 Mark Wielaard <mjw@redhat.com>
1207 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1209 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1211 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1212 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1215 2011-04-26 Mark Wielaard <mjw@redhat.com>
1217 * dwarf_child (dwarf_child): Sanity check end of section against
1218 cu_data () of die->cu.
1220 2011-03-22 Mark Wielaard <mjw@redhat.com>
1222 * dwarf.h: Add DW_TAG_GNU_call_site,
1223 DW_TAG_GNU_call_site_parameter,
1224 DW_AT_GNU_call_site_value,
1225 DW_AT_GNU_call_site_data_value,
1226 DW_AT_GNU_call_site_target,
1227 DW_AT_GNU_call_site_target_clobbered,
1228 DW_AT_GNU_tail_call,
1229 DW_AT_GNU_all_tail_call_sites,
1230 DW_AT_GNU_all_call_sites,
1231 DW_AT_GNU_all_source_call_sites,
1232 and DW_OP_GNU_entry_value.
1234 2011-03-10 Petr Machata <pmachata@redhat.com>
1236 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1237 abbreviation with code 0.
1239 2011-03-09 Petr Machata <pmachata@redhat.com>
1241 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1243 2011-02-23 Roland McGrath <roland@redhat.com>
1245 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1246 Declare __libdw_free_zdata.
1247 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1248 (dwarf_end): Call it.
1250 * dwarf_begin_elf.c (valid_p): Likewise.
1251 (check_section, scngrp_read): Likewise.
1252 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1254 2010-10-13 Roland McGrath <roland@redhat.com>
1256 * dwarf.h: Add DW_LANG_Go.
1258 2010-10-05 Roland McGrath <roland@redhat.com>
1260 * dwarf_getaranges.c: Use malloc rather than alloca,
1261 since the total number of elements can be quite huge.
1263 2010-07-26 Roland McGrath <roland@redhat.com>
1265 * dwarf_getlocation_implicit_pointer.c: New file.
1266 * Makefile.am (libdw_a_SOURCES): Add it.
1267 * libdw.map (ELFUTILS_0.149): New set.
1268 Add dwarf_getlocation_implicit_pointer.
1269 * libdw.h: Declare it.
1271 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1272 (dwarf_offdie, dwarf_offdie_types): Update callers.
1273 * libdwP.h: Declare it.
1275 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1276 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1278 2010-08-24 Roland McGrath <roland@redhat.com>
1280 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1282 2010-07-27 Roland McGrath <roland@redhat.com>
1284 * dwarf_formref_die.c: Fix sig8 hash insertion.
1286 2010-06-23 Roland McGrath <roland@redhat.com>
1288 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1289 * libdw.h: Remove it.
1290 * libdw.map: Likewise.
1292 2010-06-22 Roland McGrath <roland@redhat.com>
1294 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1296 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1299 2010-06-21 Roland McGrath <roland@redhat.com>
1301 * dwarf.h: Add DW_TAG_GNU_* constants.
1303 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1306 2010-06-20 Roland McGrath <roland@redhat.com>
1308 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1309 to search TUs instead of CUs.
1310 * libdwP.h: Update decl.
1311 (struct Dwarf): New member tu_tree.
1312 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1313 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1314 (dwarf_offdie): ... here.
1315 (dwarf_offdie_types): New function.
1316 * libdw.h: Declare it.
1317 * libdw.map (ELFUTILS_0.148): Add it.
1319 * libdwP.h (CUDIE): Use cu_data.
1320 * dwarf_formblock.c: Likewise.
1321 * dwarf_formref_die.c: Likewise.
1322 * dwarf_diecu.c: Use CUDIE macro.
1323 * dwarf_formaddr.c: Use cu_sec_idx.
1325 2010-06-16 Roland McGrath <roland@redhat.com>
1327 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1328 we don't repeat a CU lookup we've already done. Handle
1329 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1331 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1333 (__libdw_findcu): ... here. Call it.
1334 * libdwP.h: Declare it.
1335 (struct Dwarf): New member next_tu_offset.
1337 * dwarf_sig8_hash.c: New file.
1338 * dwarf_sig8_hash.h: New file.
1339 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1340 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1342 * libdwP.h (struct Dwarf): New member sig8_hash.
1343 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1344 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1346 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1347 (dwarf_nextcu): ... here. Call it.
1348 * libdw.h: Declare it.
1349 * libdwP.h: Add INTDECL.
1350 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1351 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1353 * libdwP.h (cu_sec_idx, cu_data): New functions.
1354 Use .debug_types when CU is a TU.
1355 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1356 * dwarf_siblingof.c: Likewise.
1357 * dwarf_formstring.c: Likewise.
1358 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1359 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1360 (dwarf_getlocation_addr): Likewise.
1362 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1363 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1364 .debug_types header size instead of .debug_info header size.
1366 * dwarf_diecu.c: Update caller.
1367 * dwarf_getaranges.c: Likewise.
1368 * dwarf_nextcu.c: Likewise.
1369 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1371 * fde.c (fde_by_offset): Renamed to ...
1372 (__libdw_fde_by_offset): ... this, made global and internal_function.
1373 Don't take ADDRESS argument.
1374 (__libdw_find_fde): Update caller. Do address sanity check here.
1375 * cfi.h: Declare __libdw_fde_by_offset.
1376 * cfi.c (dwarf_cfi_validate_fde): New function.
1377 * libdw.h: Declare it.
1378 * libdw.map (ELFUTILS_0.148): Add it.
1380 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1381 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1383 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1384 Don't assume DW_EH_PE_aligned refers to native address size.
1386 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1389 2010-06-17 Roland McGrath <roland@redhat.com>
1391 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1393 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1394 into an inner inline function. Set new fields. Check all fields for
1395 overflow when setting.
1396 * dwarf_lineisa.c: New file.
1397 * dwarf_linediscriminator.c: New file.
1398 * dwarf_lineop_index.c: New file.
1399 * Makefile.am (libdw_a_SOURCES): Add them.
1400 * libdw.map (ELFUTILS_0.148): Add them.
1401 * libdw.h: Declare them.
1403 2010-06-16 Roland McGrath <roland@redhat.com>
1405 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1407 * fde.c (fde_by_offset): Renamed to ...
1408 (__libdw_fde_by_offset): ... this, made global and internal_function.
1409 Don't take ADDRESS argument.
1410 (__libdw_find_fde): Update caller. Do address sanity check here.
1411 * cfi.h: Declare __libdw_fde_by_offset.
1412 * cfi.c (dwarf_cfi_validate_fde): New function.
1413 * libdw.h: Declare it.
1414 * libdw.map (ELFUTILS_0.148): Add it.
1416 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1417 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1419 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1420 Don't assume DW_EH_PE_aligned refers to native address size.
1422 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1425 2010-06-15 Roland McGrath <roland@redhat.com>
1427 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1429 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1430 here, since we don't support it yet.
1432 * dwarf_next_cfi.c: Handle version 4 format.
1434 * dwarf_getsrclines.c: Handle version 4 format.
1436 2010-06-01 Roland McGrath <roland@redhat.com>
1438 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1439 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1441 * libdwP.h (CIE_VERSION): Remove unused macro.
1443 * dwarf_getsrclines.c: Fix version field test.
1444 * libdwP.h (DWARF_VERSION): Remove useless macro.
1446 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1448 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1450 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1452 2010-05-31 Mark Wielaard <mjw@redhat.com>
1454 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1455 * libdw.h (dwarf_cfi_cie_p): ... here.
1457 2010-05-31 Mark Wielaard <mjw@redhat.com>
1459 * dwarf.h: Fix DW_LANG_Python constant.
1461 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1463 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1466 2010-05-27 Roland McGrath <roland@redhat.com>
1468 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1469 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1471 2010-05-08 Roland McGrath <roland@redhat.com>
1473 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1474 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1475 (getlocation): Update caller.
1476 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1477 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1478 * libdwP.h: Update decl.
1480 2010-04-26 Roland McGrath <roland@redhat.com>
1482 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1483 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1484 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1485 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1487 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1488 Prepend DW_OP_call_frame_cfa if true.
1489 (getlocation): Update caller.
1490 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1491 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1492 * libdwP.h: Update decl.
1494 2010-04-22 Roland McGrath <roland@redhat.com>
1496 * cfi.c (execute_cfi): Never return without cleanup.
1498 (cie_cache_initial_state): Adjust caller to expect that free.
1499 (__libdw_frame_at_address): Likewise.
1501 2010-03-10 Roland McGrath <roland@redhat.com>
1503 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1505 2010-02-15 Roland McGrath <roland@redhat.com>
1507 * Makefile.am: Use config/eu.am for common stuff.
1509 2010-02-02 Mark Wielaard <mjw@redhat.com>
1511 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1513 2010-01-07 Roland McGrath <roland@redhat.com>
1515 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1517 2010-01-05 Roland McGrath <roland@redhat.com>
1519 * dwarf_aggregate_size.c: New file.
1520 * Makefile.am (libdw_a_SOURCES): Add it.
1521 * libdw.h: Declare it.
1522 * libdwP.h: Add INTDECL.
1523 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1525 * dwarf_srclang.c: Add INTDEF.
1526 * libdwP.h: Add INTDECL.
1528 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1530 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1532 2009-11-21 Roland McGrath <roland@redhat.com>
1534 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1537 2009-10-15 Roland McGrath <roland@redhat.com>
1539 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1540 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1542 2009-09-17 Roland McGrath <roland@redhat.com>
1544 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1545 argument a pointer to const.
1546 * libdw.h: Update decl.
1548 2009-09-10 Roland McGrath <roland@redhat.com>
1550 * dwarf_getlocation.c (store_implicit_value): New function.
1551 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1552 (dwarf_getlocation_implicit_value): New function.
1553 * libdw.h: Declare it.
1554 * libdw.map (ELFUTILS_0.143): Add it.
1556 2009-09-09 Mark Wielaard <mjw@redhat.com>
1558 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1560 2009-08-21 Josh Stone <jistone@redhat.com>
1562 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1564 2009-08-10 Roland McGrath <roland@redhat.com>
1566 * dwarf_getscopevar.c: Use dwarf_diename.
1568 2009-08-09 Roland McGrath <roland@redhat.com>
1570 * libdw.map (ELFUTILS_0.143): New version set,
1571 inherits from ELFUTILS_0.142.
1572 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1573 alias in the ELFUTILS_0.122 version set and the default in the new set.
1574 * dwarf_srclang.c: Likewise.
1575 * dwarf_decl_file.c: Likewise.
1576 * dwarf_decl_line.c: Likewise.
1577 * dwarf_decl_column.c: Likewise.
1578 * dwarf_bytesize.c: Likewise.
1579 * dwarf_bitsize.c: Likewise.
1580 * dwarf_bitoffset.c: Likewise.
1582 2009-08-07 Roland McGrath <roland@redhat.com>
1584 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1585 * dwarf_srclang.c: Likewise.
1586 * dwarf_decl_file.c: Likewise.
1587 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1588 * dwarf_bytesize.c: Likewise.
1589 * dwarf_bitsize.c: Likewise.
1590 * dwarf_bitoffset.c: Likewise.
1592 2009-07-22 Roland McGrath <roland@redhat.com>
1594 * dwarf_frame_cfa.c: Change calling convention.
1595 * libdw.h: Update decl.
1597 * dwarf_frame_register.c: Change calling/return-value convention for
1598 value-only results and undefined/same_value.
1599 * libdw.h: Update decl.
1601 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1602 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1603 return that value instead.
1604 (getlocation): Update caller.
1605 * dwarf_frame_cfa.c: Likewise.
1606 * libdwP.h: Update decl.
1608 2009-07-21 Roland McGrath <roland@redhat.com>
1610 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1611 Fix loop iteration after skipping a bogus or useless CU.
1613 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1614 absence, not DWARF_E_NO_DEBUG_LINE.
1616 2009-07-20 Roland McGrath <roland@redhat.com>
1618 * dwarf_getlocation.c (__libdw_intern_expression):
1619 Handle DW_OP_stack_value.
1621 2009-07-16 Roland McGrath <roland@redhat.com>
1623 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1624 reject others when CU's version > 3.
1626 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1628 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1629 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1630 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1631 and DW_AT_const_expr.
1632 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1633 and DW_FORM_ref_sig8.
1635 2009-07-15 Roland McGrath <roland@redhat.com>
1637 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1638 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1640 2009-07-13 Roland McGrath <roland@redhat.com>
1642 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1644 2009-07-08 Roland McGrath <roland@redhat.com>
1646 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1649 * libdwP.h (struct Dwarf): Add member `cfi'.
1650 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1651 * dwarf_getcfi.c: New file.
1652 * dwarf_getcfi_elf.c: New file.
1653 * dwarf_cfi_end.c: New file.
1654 * dwarf_cfi_addrframe.c: New file.
1655 * dwarf_frame_cfa.c: New file.
1656 * dwarf_frame_register.c: New file.
1657 * dwarf_frame_return_address_register.c: New file.
1658 * Makefile.am (libdw_a_SOURCES): Add them.
1659 * unwind.h: Declare those functions.
1660 * libdw.map (ELFUTILS_0.142): Export them.
1662 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1664 (getlocation): ... here, call it.
1665 * libdwP.h: Declare it.
1669 * frame-cache.c: New file.
1672 * encoded-value.h: New file.
1673 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1674 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1675 * dwarf_error.c (errmsgs): Add element for it.
1677 * dwarf_next_cfi.c: New file.
1678 * Makefile.am (libdw_a_SOURCES): Add it.
1679 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1680 Declare dwarf_next_cfi.
1681 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1684 * memory-access.h [! ALLOW_UNALIGNED]
1685 (read_2ubyte_unaligned): Renamed to ...
1686 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1687 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1688 (read_2sbyte_unaligned): Likewise.
1689 (read_4ubyte_unaligned): Likewise.
1690 (read_4sbyte_unaligned): Likewise.
1691 (read_8ubyte_unaligned): Likewise.
1692 (read_8sbyte_unaligned): Likewise.
1694 * libdwP.h (IDX_eh_frame): Remove it.
1695 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1697 2009-07-08 Roland McGrath <roland@redhat.com>
1699 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1701 * dwarf_getlocation.c (check_constant_offset): New function.
1702 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1703 handle DW_AT_data_member_location of data[48] as constant offset.
1705 2009-06-18 Roland McGrath <roland@redhat.com>
1707 * libdwP.h (__libdw_read_address_inc): Constify.
1708 (__libdw_read_offset_inc): Likewise.
1709 * dwarf_getaranges.c: Likewise.
1710 * dwarf_getlocation.c: Likewise.
1711 * dwarf_getsrclines.c: Likewise.
1712 * dwarf_nextcu.c: Likewise.
1714 2009-05-05 Petr Machata <pmachata@redhat.com>
1716 * libdwP.h (__libdw_formptr): Declare new function.
1717 * dwarf_formudata.c: Implement it here.
1718 * dwarf_getlocation.c (dwarf_getlocation_addr):
1719 Call it instead of hand-rolled offset handling code.
1720 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1721 * dwarf_ranges.c (dwarf_ranges): Likewise.
1723 2009-05-04 Petr Machata <pmachata@redhat.com>
1725 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1726 * dwarf_ranges.c: Implement it here.
1727 (dwarf_ranges): Call it.
1728 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1730 2009-04-23 Petr Machata <pmachata@redhat.com>
1732 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1733 of read_*ubyte_unaligned.
1734 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1735 * dwarf_formstring.c (dwarf_formstring): Likewise.
1736 * dwarf_formudate.c (dwarf_formudata): Likewise.
1737 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1738 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1739 * dwarf_getpubnames.c (get_offsets): Likewise.
1740 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1742 2009-04-23 Petr Machata <pmachata@redhat.com>
1744 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1745 __libdw_read_addr, __libdw_read_off): Add four new internal
1748 2009-05-07 Roland McGrath <roland@redhat.com>
1750 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1751 return value and OFFSET argument, not CU-relative. Only fetch the
1752 attribute data when called with OFFSET of 0.
1754 2009-05-07 Petr Machata <pmachata@redhat.com>
1756 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1757 DW_AT_macro_info attribute of CU DIE.
1759 2009-04-15 Roland McGrath <roland@redhat.com>
1761 * dwarf.h (DW_CIE_ID): Removed.
1762 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1764 2009-04-01 Roland McGrath <roland@redhat.com>
1766 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1768 2009-01-28 Roland McGrath <roland@redhat.com>
1770 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1771 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1773 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1775 2009-01-26 Roland McGrath <roland@redhat.com>
1777 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1779 2009-01-25 Roland McGrath <roland@redhat.com>
1781 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1783 2009-01-23 Roland McGrath <roland@redhat.com>
1785 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1786 Put these rules under if MAINTAINER_MODE.
1788 2009-01-22 Roland McGrath <roland@redhat.com>
1790 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1792 2009-01-21 Roland McGrath <roland@redhat.com>
1794 * Makefile.am (CLEANFILES): Renamed to ...
1795 (MOSTLYCLEANFILES): ... here.
1796 (CLEANFILES): New variable, add known-dwarf.h.
1798 2009-01-17 Roland McGrath <roland@redhat.com>
1800 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1801 Make it unconditional.
1802 (BUILT_SOURCES): Updated.
1804 * dwarf.h: Add description comments for DW_LANG_* values.
1806 * Makefile.am [MAINTAINER_MODE]
1807 ($(srcdir)/known-dwarf.h): New target.
1808 (BUILT_SOURCES): Add it.
1810 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1812 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1814 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1816 2009-01-08 Roland McGrath <roland@redhat.com>
1818 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1820 2008-01-06 Roland McGrath <roland@redhat.com>
1822 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1824 * dwarf_haschildren.c: Return -1 for error case, not 0.
1826 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1828 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1830 * dwarf.h: Add definition for unwind and call frame information.
1832 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1833 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1835 2008-08-15 Roland McGrath <roland@redhat.com>
1837 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1838 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1840 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1842 * dwarf_child.c: Minor optimizations.
1843 * dwarf_getattrs.c: Likewise.
1844 * dwarf_getpubnames.c: Likewise.
1845 * dwarf_siblingof.c: Likewise.
1846 * dwarf_tag.c: Likewise.
1848 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1850 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1851 of DWARF_VERSION comparison, just fail if the file's version is newer.
1853 2008-01-17 Nick Clifton <nickc@redhat.com>
1855 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1856 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1857 (DWARF3_LENGTH_64_BIT): New define.
1858 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1859 * dwarf_getpubnames: Include dwarf.h.
1860 (get_offsets): Use the new definitions.
1861 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1862 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1863 (dwarf_nextcu): Use the new definitions.
1865 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1866 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1867 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1868 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1870 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1873 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1875 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1876 Set the address in the return structure to the address of the next
1877 non-sibling die, if there is no sibling and the return pointer is
1878 not the same as the die pointer.
1879 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1881 * dwarf_child.c: Fix typo in comment.
1883 * libdwP.h (DWARF_VERSION): Change to 3.
1885 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1886 not have a initialised valp pointer.
1888 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1889 the end of the attributes is reached. When the callback fails,
1890 return the address of the failing attribute, not the address of
1892 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1894 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1895 (dwarf_child): Likewise.
1896 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1897 (dwarf_tag): Likewise.
1899 2008-01-08 Roland McGrath <roland@redhat.com>
1901 * Makefile.am (euinclude): Variable removed.
1902 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1903 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1905 2007-10-17 Roland McGrath <roland@redhat.com>
1907 * libdw.h (__deprecated_attribute__): New macro.
1908 (dwarf_formref): Mark it deprecated.
1909 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1910 (dwarf_formref): ... here. Call it. Remove INTDEF.
1911 * libdwP.h: Remove INTDECL.
1912 Declare __libdw_formref.
1913 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1914 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1916 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1917 needs to check CU->version.
1919 * libdwP.h (struct Dwarf_CU): New member `version'.
1920 * libdw_findcu.c (__libdw_findcu): Initialize it.
1922 * dwarf_child.c: Return 1 for null entry as first child.
1924 2007-10-05 Roland McGrath <roland@redhat.com>
1926 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1928 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1929 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1931 2007-10-03 Roland McGrath <roland@redhat.com>
1933 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1934 and dwfl_build_id_find_debuginfo.
1936 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1937 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1939 2007-10-02 Roland McGrath <roland@redhat.com>
1941 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1944 2007-08-07 Roland McGrath <roland@redhat.com>
1946 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1947 error code is DWARF_E_NOERROR (0).
1949 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1950 Fix typo in __libdw_visit_scopes argument.
1952 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1953 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1955 2007-07-03 Roland McGrath <roland@redhat.com>
1957 * libdw.h (__extern_inline): New macro.
1958 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1960 2007-04-16 Roland McGrath <roland@redhat.com>
1962 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1964 2007-04-05 Roland McGrath <roland@redhat.com>
1966 * dwarf_getsrcdirs.c: New file.
1967 * Makefile.am (libdw_a_SOURCES): Add it.
1968 * libdw.h: Declare dwarf_getsrcdirs.
1969 * libdw.map (ELFUTILS_0.127): Add it.
1971 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1972 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1973 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1974 Save DIRARRAY in the Dwarf_Files.
1976 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1977 address to check for all-ones base address entry. Check directly.
1978 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1980 2007-03-25 Roland McGrath <roland@redhat.com>
1982 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1983 Return NULL when freeing RESULT on error.
1984 (global_read, scngrp_read): Check return value from check_section,
1985 break out of loop after it has freed RESULT.
1986 (valid_p): Handle null argument.
1988 2007-03-12 Roland McGrath <roland@redhat.com>
1990 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1992 2007-03-04 Roland McGrath <roland@redhat.com>
1994 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1995 ELFUTILS_0.126. Add dwfl_module_addrsym.
1997 2007-02-10 Roland McGrath <roland@redhat.com>
1999 * dwarf.h (DW_OP_fbreg): Comment fix.
2001 2007-02-03 Roland McGrath <roland@redhat.com>
2003 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2004 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2005 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2006 exported in the past.
2008 2006-12-17 Roland McGrath <roland@redhat.com>
2010 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2011 address when the CU is missing attributes due to buggy GCC.
2013 2006-08-29 Roland McGrath <roland@redhat.com>
2015 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2017 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2018 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2020 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2021 result is aligned. Adjust NEWP->remaining here for this allocation.
2022 * libdwP.h: Update decl.
2023 (libdw_alloc): Update caller.
2025 2006-07-12 Ulrich Drepper <drepper@redhat.com>
2027 * dwarf_child.c: Adjust for internal_function_def removal.
2028 * dwarf_getabbrev.c: Likewise.
2029 * dwarf_tag.c: Likewise.
2030 * libdw_form.c: Likewise.
2031 * memory-access.c: Likewise.
2033 2006-06-28 Roland McGrath <roland@redhat.com>
2035 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2037 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2040 2006-05-27 Ulrich Drepper <drepper@redhat.com>
2042 * libdw.h: Add extern "C".
2044 2006-05-22 Ulrich Drepper <drepper@redhat.com>
2046 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2047 aranges information.
2049 2006-05-21 Ulrich Drepper <drepper@redhat.com>
2051 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2054 2006-02-28 Roland McGrath <roland@redhat.com>
2056 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2057 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2058 values from DWARF 3.0.
2060 2006-02-22 Roland McGrath <roland@redhat.com>
2062 * libdw.map: Bump to 0.120; export dwfl_version.
2064 2005-12-22 Roland McGrath <roland@redhat.com>
2066 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2068 2005-12-12 Roland McGrath <roland@redhat.com>
2070 * dwarf_ranges.c: Copy CU base address-finding code from
2073 2005-12-09 Roland McGrath <roland@redhat.com>
2075 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2076 Delay CU base lookup until it's needed.
2077 If CU base lookup fails with no error, flag invalid DWARF.
2079 2005-11-25 Roland McGrath <roland@redhat.com>
2081 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2083 2005-11-15 Roland McGrath <roland@redhat.com>
2085 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2087 2005-11-13 Roland McGrath <roland@redhat.com>
2089 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2091 2005-10-27 Roland McGrath <roland@redhat.com>
2093 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2094 don't match end_sequence markers.
2096 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2097 before normal records at the same address.
2098 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2101 2005-10-26 Roland McGrath <roland@redhat.com>
2103 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2104 * dwarf_func_file.c: Renamed to ...
2105 * dwarf_decl_file.c: ... here.
2106 * dwarf_func_col.c: Renamed to ...
2107 * dwarf_decl_column.c: ... here.
2108 * dwarf_func_line.c: Renamed to ...
2109 * dwarf_decl_line.c: ... here.
2110 (dwarf_func_line): Renamed to ...
2111 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2112 (__libdw_func_intval): Renamed __libdw_attr_intval.
2113 * dwarf_func_name.c: File removed.
2114 * dwarf_func_lowpc.c: File removed.
2115 * dwarf_func_highpc.c: File removed.
2116 * dwarf_func_entrypc.c: File removed.
2117 * dwarf_func_die.c: File removed.
2118 * Makefile.am (libdw_a_SOURCES): Updated.
2119 * libdw.h: Update decls.
2120 (Dwarf_Func): Type removed.
2121 * libdwP.h: Update decls.
2122 (struct Dwarf_Func_s): Type removed.
2123 * libdw.map: Updated.
2125 * libdwP.h (CUDIE): New macro.
2126 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2127 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2128 * dwarf_ranges.c (dwarf_ranges): Likewise.
2130 * dwarf_getloclist.c: Renamed to ...
2131 * dwarf_getlocation.c: ... here.
2132 (getloclist): Renamed to getlocation.
2133 (dwarf_getloclist): Renamed to dwarf_getlocation.
2134 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2135 * Makefile.am (libdw_a_SOURCES): Updated.
2136 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2137 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2138 (Dwarf_Loc): Renamed Dwarf_Op.
2139 * libdwP.h (struct loc_s): Update use.
2140 * libdw.map: Update map.
2142 * dwarf_entry_breakpoints.c: Use the second line record within the
2143 function, regardless of its source location data.
2145 2005-10-25 Roland McGrath <roland@redhat.com>
2147 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2149 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2151 2005-10-14 Roland McGrath <roland@redhat.com>
2153 * dwarf_diecu.c (dwarf_diecu): New file.
2154 * Makefile.am (libdw_a_SOURCES): Add it.
2155 * libdw.h: Declare dwarf_diecu.
2156 * libdw.map: Export it.
2158 * libdw.map: Bump to 0.116; export dwarf_ranges.
2160 2005-09-20 Roland McGrath <roland@redhat.com>
2162 * dwarf_haspc.c: Use dwarf_ranges.
2163 * dwarf_entry_breakpoints.c: Likewise.
2165 * dwarf_ranges.c: New file.
2166 * Makefile.am (libdw_a_SOURCES): Add it.
2167 * libdw.h: Declare dwarf_ranges.
2168 * libdwP.h: Add INTDECL.
2170 2005-09-14 Roland McGrath <roland@redhat.com>
2172 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2173 prologue_end marker scanning loop.
2175 2005-09-11 Roland McGrath <roland@redhat.com>
2177 * dwarf.h: Comment typo fix.
2179 2005-09-07 Roland McGrath <roland@redhat.com>
2181 * dwarf_entry_breakpoints.c: New file.
2182 * Makefile.am (libdw_a_SOURCES): Add it.
2183 * libdw.h: Declare dwarf_entry_breakpoints.
2185 * dwarf_entrypc.c: New file.
2186 * Makefile.am (libdw_a_SOURCES): Add it.
2187 * libdw.h: Declare dwarf_entrypc.
2188 * libdwP.h: Add INTDECL.
2190 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2192 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2193 (%.os): Use COMPILE.os.
2194 (COMPILE.os): Filter out gconv options.
2196 2005-08-27 Roland McGrath <roland@redhat.com>
2198 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2199 __libdw_visit_scopes.
2201 * dwarf_getscopes_die.c: New file.
2202 * Makefile.am (libdw_a_SOURCES): Add it.
2203 * libdw.h: Declare dwarf_getscopes_die.
2204 * libdw.map: Bump to 0.115 and add it.
2206 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2207 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2208 Take two functions for both preorder and postorder visitors.
2209 * libdwP.h: Update decl.
2210 (struct Dwarf_Die_Chain): New type.
2211 * dwarf_func_inline.c: Update uses.
2213 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2215 * libdwP.h: Add INTDECL.
2216 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2218 2005-08-23 Roland McGrath <roland@redhat.com>
2220 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2221 DW_AT_specification the same as DW_AT_abstract_origin.
2223 2005-08-20 Roland McGrath <roland@redhat.com>
2225 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2226 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2227 and dwfl_report_offline.
2229 2005-08-19 Roland McGrath <roland@redhat.com>
2231 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2232 Add dwfl_module_relocate_address, dwfl_module_relocations,
2233 dwfl_module_relocation_info.
2235 2005-08-18 Roland McGrath <roland@redhat.com>
2237 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2238 outermost scope in the results.
2240 2005-08-15 Roland McGrath <roland@redhat.com>
2242 * dwarf_func_inline.c: New file.
2243 * Makefile.am (libdw_a_SOURCES): Add it.
2244 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2245 * libdw.map: Add them.
2247 * dwarf_func_die.c: New file.
2248 * Makefile.am (libdw_a_SOURCES): Add it.
2249 * libdw.h: Declare dwarf_func_die.
2250 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2252 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2254 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2255 of DW_LNS_set_epilog_begin.
2257 2005-08-09 Roland McGrath <roland@redhat.com>
2259 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2261 * dwarf_end.c: Add INTDEF.
2262 * dwarf_error.c (dwarf_errmsg): Likewise.
2263 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2265 2005-08-01 Roland McGrath <roland@redhat.com>
2267 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2268 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2270 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2272 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2273 (libdw_a_LIBADD): Add all files from libdwfl.a.
2275 2005-07-27 Roland McGrath <roland@redhat.com>
2277 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2278 along with ../libebl/libebl.a and ../lib/libeu.a;
2279 depend on ../libelf/libelf.so.
2280 (libdw_so_LDADD): New variable.
2281 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2283 * libdw.map: Define an empty base version and move all symbols to
2284 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2286 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2288 * dwarf_error.c: Add internal alias for dwarf_errno.
2289 * libdwP.h: Declare __dwarf_errno_internal.
2290 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2292 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2295 2005-06-01 Roland McGrath <roland@redhat.com>
2297 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2298 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2300 2005-06-08 Roland McGrath <roland@redhat.com>
2302 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2303 (get_sleb128_step, get_sleb128): Likewise.
2304 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2305 * dwarf_getloclist.c (getloclist): Likewise.
2306 * dwarf_formblock.c (dwarf_formblock): Likewise.
2307 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2308 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2309 * dwarf_formref.c (dwarf_formref): Likewise.
2310 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2311 * dwarf_formudata.c (dwarf_formudata): Likewise.
2312 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2313 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2314 * dwarf_tag.c (dwarf_tag): Likewise.
2315 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2316 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2317 * libdw_form.c (__libdw_form_val_len): Likewise.
2318 * libdwP.h: Update decl.
2320 2005-06-04 Roland McGrath <roland@redhat.com>
2322 * memory-access.h (get_uleb128_rest_return): New macro.
2323 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2324 (get_sleb128_rest_return): New macro.
2325 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2326 * memory-access.c: New file.
2327 * Makefile.am (libdw_a_SOURCES): Add it.
2328 (DEFS): Add -DIS_LIBDW.
2330 2005-05-31 Roland McGrath <roland@redhat.com>
2332 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2335 2005-05-30 Roland McGrath <roland@redhat.com>
2337 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2338 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2340 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2341 BEGIN value. Instead, match base address entries separately for
2344 2005-05-28 Roland McGrath <roland@redhat.com>
2346 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2347 past location expression contents.
2349 2005-05-23 Roland McGrath <roland@redhat.com>
2351 * dwarf_getsrclines.c: Comment typo fix.
2353 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2354 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2356 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2358 * libdwP.h: Only use INTDECL for alias prototypes.
2360 2005-05-19 Roland McGrath <roland@redhat.com>
2362 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2364 * dwarf_getscopevar.c: New file.
2365 * Makefile.am (libdw_a_SOURCES): Add it.
2366 * libdw.h: Declare dwarf_getscopevar.
2368 * dwarf_getsrcfiles.c: Add INTDEF.
2369 * dwarf_haschildren.c: Likewise.
2370 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2372 * dwarf_getscopes.c: New file.
2373 * Makefile.am (libdw_a_SOURCES): Add it.
2374 * libdw.h: Declare dwarf_getscopes.
2375 * libdw.map: Add it.
2377 2005-05-18 Roland McGrath <roland@redhat.com>
2379 * libdwP.h (IDX_debug_ranges): New enum constant.
2380 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2381 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2382 * dwarf_error.c (errmsgs): Add it.
2383 * dwarf_haspc.c: New file.
2384 * libdw.h: Declare dwarf_haspc.
2385 * libdw.map: Add it.
2386 * libdwP.h: Add INTDECL.
2388 * dwarf_attr_integrate.c: New file.
2389 * dwarf_hasattr_integrate.c: New file.
2390 * Makefile.am (libdw_a_SOURCES): Add them.
2391 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2392 * libdw.map: Add them.
2394 * dwarf_hasattr.c: Add INTDEF.
2395 * libdwP.h: Add INTDECL for it.
2397 * dwarf_formref_die.c: New file.
2398 * Makefile.am (libdw_a_SOURCES): Add it.
2399 * libdw.h (dwarf_formref_die): Declare it.
2400 * libdwP.h (dwarf_formref_die): Add INTDECL.
2401 * libdw.map: Add it.
2403 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2405 (dwarf_getloclist): ... here. Call them.
2406 (dwarf_addrloclists): New function.
2407 * libdw.h: Declare it.
2408 * libdw.map: Add it.
2410 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2411 DW_MACINFO_end_file. Recognize type 0 as terminator.
2413 2005-05-05 Roland McGrath <roland@redhat.com>
2415 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2417 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2418 the line program does not produce all entries in ascending order.
2420 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2422 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2423 occurences (e.g., inlines) better.
2425 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2427 * libdw.h (DWARF_END_ABBREV): Define.
2428 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2430 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2432 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2433 as error of __libdw_getabbrev.
2435 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2437 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2439 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2440 results back to caller.
2442 2005-04-04 Roland McGrath <roland@redhat.com>
2444 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2446 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2449 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2451 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2453 * dwarf_getsrc_file.c: New file.
2454 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2455 * libdw.h: Declare dwarf_getsrc_file.
2456 * libdw.map: Add dwarf_getsrc_file.
2458 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2460 * dwarf_func_entrypc.c: New file.
2461 * dwarf_func_col.c: New file.
2462 * dwarf_func_line.c: New file.
2463 * dwarf_func_file.c: New file.
2464 * libdw.h: Add prototypes for new functions.
2465 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2467 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2468 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2469 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2470 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2471 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2472 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2474 * dwarf.h: Add some DWARF3 definitions.
2476 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2478 * dwarf_getfuncs.c: New file.
2479 * dwarf_func_highpc.c: New file.
2480 * dwarf_func_lowpc.c: New file.
2481 * dwarf_func_name.c: New file.
2482 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2483 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2484 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2485 and dwarf_func_name.
2486 * libdw.h: Add prototypes for new functions.
2487 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2488 * dwarf_siblingof.c: Likewise.
2489 * dwarf_dieoffset.c: Likewise.
2490 * dwarf_highpc.c: Likewise.
2491 * dwarf_lowpc.c: Likewise.
2492 * libdwP.h: Add prototypes for internal functions.
2493 Define Dwarf_Func_s structure.
2495 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2497 * libdw.h: Add padding in Dwarf_die.
2499 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2500 * dwarf_attr.c: Likewise.
2501 * dwarf_begin.c: Likewise.
2502 * dwarf_begin_elf.c: Likewise.
2503 * dwarf_bitoffset.c: Likewise.
2504 * dwarf_bitsize.c: Likewise.
2505 * dwarf_bytesize.c: Likewise.
2506 * dwarf_diename.c: Likewise.
2507 * dwarf_formaddr.c: Likewise.
2508 * dwarf_formblock.c: Likewise.
2509 * dwarf_formref.c: Likewise.
2510 * dwarf_formstring.c: Likewise.
2511 * dwarf_formudata.c: Likewise.
2512 * dwarf_getarange_addr.c: Likewise.
2513 * dwarf_getarangeinfo.c: Likewise.
2514 * dwarf_getaranges.c: Likewise.
2515 * dwarf_getloclist.c: Likewise.
2516 * dwarf_getmacros.c: Likewise.
2517 * dwarf_getsrc_die.c: Likewise.
2518 * dwarf_getsrcfiles.c: Likewise.
2519 * dwarf_getsrclines.c: Likewise.
2520 * dwarf_highpc.c: Likewise.
2521 * dwarf_lowpc.c: Likewise.
2522 * dwarf_nextcu.c: Likewise.
2523 * dwarf_offdie.c: Likewise.
2524 * dwarf_siblingof.c: Likewise.
2525 * dwarf_srclang.c: Likewise.
2526 * dwarf_tag.c: Likewise.
2527 * libdw_findcu.c: Likewise.
2528 * libdwP.h: Add prototypes for internal functions.
2530 * dwarf_addrdie.c: New file.
2531 * dwarf_macro_opcode.c: New file.
2532 * dwarf_macro_param1.c: New file.
2533 * dwarf_macro_param2.c: New file.
2534 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2535 * libdwP.h: Remove Dwarf_Macro definition.
2536 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2537 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2538 * libdw.map: Add entries for new functions.
2540 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2542 * libdw.h: Handle broken gcc < 4.
2544 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2546 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2548 * dwarf_begin_elf.c: Fix warnings.
2549 * dwarf_dieoffset.c: Likewise.
2550 * dwarf_end.c: Likewise.
2551 * dwarf_error.c: Likewise.
2552 * dwarf_getpubnames.c: Likewise.
2554 * libdwP.h: Add new error values.
2555 * dwarf_error.c: Support new error values.
2556 * dwarf_getpubnames.c: Check parameter value.
2558 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2560 * Makefile.am: Check for text relocations in constructed DSO.
2562 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2564 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2566 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2567 checks to not read over buffer boundaries for ill-formed DWARF data.
2569 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2571 * dwarf_child.c: Make compile with gcc 4.0.
2572 * dwarf_error.c: Likewise.
2573 * dwarf_formblock.c: Likewise.
2574 * dwarf_getabbrev.c: Likewise.
2575 * dwarf_getattrs.c: Likewise.
2576 * dwarf_getsrclines.c: Likewise.
2577 * dwarf_tag.c: Likewise.
2578 * libdw_form.c: Likewise.
2580 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2582 * Makefile.am: Support building with mudflap.
2584 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2585 * dwarf_getsrclines.c: Likewise.
2586 * dwarf_memory-access.h: Likewise.
2588 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2590 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2592 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2593 Third parameter of dwarf_getsrcfiles can be NULL.
2595 * libdw.map: Add dwarf_getmacros.
2596 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2597 * dwarf_getmacros.c: New file.
2599 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2601 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2603 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2605 * dwarf_getsrclines.c:
2606 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2608 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2610 * libdwP.h (_): Use elfutils domain.
2612 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2614 * dwarf_getsrclines.c: Fix typo in comment.
2616 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2618 * Makefile.am: Support building with mudflap.
2620 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2622 * memory-access.h: Add lots of const in case a pointer passed is const.
2624 * dwarf_formflag.c: New file.
2625 * dwarf_getattrs.c: New file.
2626 * dwarf_error.c: Add new error value.
2627 * libdw.h: Add prototypes for new functions. Adjust prototype for
2629 * libdw.map: Add new functions.
2630 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2632 * libdwP.h: Add new error value.
2633 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2636 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2638 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2640 * dwarf_getarange_addr.c: New file
2641 * dwarf_getarangeinfo.c: New file.
2642 * dwarf_getaranges.c: New file.
2643 * dwarf_onerange.c: New file.
2644 * libdw.h: Declare new functions. Define Dwarf_Arange and
2646 * libdw.map: Add new functions.
2647 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2648 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2649 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2650 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2651 * dwarf_error.c: Add new message.
2653 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2655 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2656 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2657 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2658 * dwarf_error.c: Add another message.
2659 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2661 * dwarf_filesrc.c: Likewise.
2662 * dwarf_getsrcfiles.c: Likewise.
2663 * dwarf_getsrclines.c: Likewise.
2664 * dwarf_lineaddr.c: New file.
2665 * dwarf_linebeginstatement.c: New file.
2666 * dwarf_lineblock.c: New file.
2667 * dwarf_linecol.c: New file.
2668 * dwarf_lineendsequence.c: New file.
2669 * dwarf_lineepiloguebegin.c: New file.
2670 * dwarf_lineno.c: New file.
2671 * dwarf_lineprologueend.c: New file.
2672 * dwarf_onesrcline.c: New file.
2673 * dwarf_lineno.c: Change interface to store result in object pointed
2674 to by second parameter.
2675 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2676 prototype. Define Dwarf_Files and Dwarf_Lines.
2677 * libdw.map: Add new functions.
2678 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2679 * libdw_findcu.c: Don't initialize nlines field.
2681 * dwarf_siblingof: Little optimization.
2683 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2684 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2685 * libdwP.h (struct Dwarf): Add free_elf field.
2687 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2689 * dwarf_getstring.c: New file.
2690 * dwarf_offabbrev.c: New file.
2691 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2692 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2693 parameters. Don't allocate memory if not necessary and don't lookup
2694 previous results if no CU given.
2695 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2696 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2697 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2698 * libdwP.h: Change prototype for __libdw_getabbrev.
2700 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2701 returning if this is wanted.
2703 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2705 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2706 with offset_size value.
2707 * libdw.h: Adjust dwarf_nextcu prototype.
2708 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2709 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2710 member of new CU struct.
2711 * dwarf_formstring.c: Depend on offset_size not address_size for
2712 DW_FORM_strp handling.
2713 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2715 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2717 (dwarf_tag): Correctly recognize failed lookup.
2719 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2721 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2722 * dwarf_formblock.c: New file.
2723 * dwarf_getloclist.c: Rewrite to handle a single block.
2724 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2725 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2726 dwarf_getloclistent declaration.
2727 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2728 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2729 Add locs member to struct Dwarf_CU.
2730 * libdw_fundcu.c: Initialize locs member of new CU.
2731 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2732 Remove dwarf_getloclistent.c.
2734 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2736 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2737 * libdwP.h: Likewise.
2739 * dwarf_getloclist.c: New file.
2740 * dwarf_getloclistent.c: New file.
2741 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2742 Declare dwarf_getloclistent and dwarf_getloclist.
2743 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2744 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2745 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2748 * dwarf_error.c: More error messages.
2750 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2752 * dwarf_getsrclines.c: Remove debugging support.
2754 * dwarf_getsrcfiles.c: New file.
2755 * dwarf_filesrc.c: New file.
2756 * libdw.h: Declare these functions. Define Dwarf_File.
2757 * libdwP.c: Adjust Dwarf_File_s definition.
2758 * libdw.map: Add these functions.
2759 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2761 * dwarf_getsrclines.c: Initialize cu->files.
2763 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2765 * libdw.h: Add more nonnull function attributes.
2767 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2768 * dwarf_end.c (cu_free): New function.
2769 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2770 * dwarf_error.c (errmsgs): Add new messages.
2771 * dwarf_getsrc_die.c: New file.
2772 * dwarf_getsrclines.c: New file.
2773 * dwarf_lineno.c: New file.
2774 * dwarf_linesrc.c: New file.
2775 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2776 instead of the *_inc-less variants.
2777 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2778 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2779 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2781 * libdwP.h: Add more error codes.
2782 (struct Dwarf): Remove mem_tail.next member.
2783 (Dwarf_File): Define type.
2784 (struct Dwarf_Line_s): Define type.
2785 (struct Dwarf_CU): Add lines and nlines members.
2786 (libdw_alloc): Define local variable _tail and use it.
2787 Add some function attributes.
2788 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2789 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2790 * memory-access.h: Add unlikely for the endian conversion paths.
2791 * Makefile.am (AM_CFLAGS): Add -std parameter.
2792 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2793 dwarf_lineno, and dwarf_linesrc.
2795 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2797 * Moved to CVS archive.