1 2017-07-26 Mark Wielaard <mark@klomp.org>
3 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
4 DW_TAG_packed_type and DW_TAG_shared_type.
5 * libdw.h (dwarf_peel_type): Extend documentation.
7 2017-07-26 Mark Wielaard <mark@klomp.org>
9 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
10 DW_DEFAULTED_out_of_class.
12 2017-07-26 Mark Wielaard <mark@klomp.org>
14 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
16 2017-07-26 Mark Wielaard <mark@klomp.org>
18 * dwarf_default_lower_bound.c: New file.
19 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
20 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
21 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
22 * libdw.h: Add dwarf_default_lower_bound.
23 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
24 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
25 dwarf_default_lower_bound INTDECL.
27 2017-07-26 Mark Wielaard <mark@klomp.org>
29 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
30 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
31 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
32 * dwarf_aggregate_size.c (array_size): Add lower bound for
33 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
34 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
35 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
36 DW_LANG_Julia and DW_LANG_BLISS.
38 2017-07-26 Mark Wielaard <mark@klomp.org>
40 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
42 2017-07-25 Mark Wielaard <mark@klomp.org>
44 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
45 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
46 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
47 for currently unused numbers.
49 2017-07-25 Mark Wielaard <mark@klomp.org>
51 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
52 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
53 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
55 2017-07-21 Mark Wielaard <mark@klomp.org>
57 * dwarf_line_file.c: New file.
58 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
59 * libdw.h (dwarf_line_file): New function declaration.
60 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
62 2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
64 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
65 made of, libdw_so_DEPS for libraries it depends on (including
66 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
67 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
68 library dependencies, use libdw_so_LIBS rather than relying on the
69 order of dependencies specified, add -z,relro.
71 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
73 * libdw.h: Remove attribute macro declarations and use
74 __noreturn_attribute__ as defined in libelf.h.
76 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
78 * dwarf_begin_elf.c: Include endian.h.
80 2017-03-30 Mark Wielaard <mjw@redhat.com>
82 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
85 2016-10-22 Mark Wielaard <mjw@redhat.com>
87 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
88 * dwarf_aggregate_size.c (array_size): Use correct spelling of
91 2016-11-02 Mark Wielaard <mjw@redhat.com>
93 * cfi.c (execute_cfi): Add fallthrough comments.
94 * encoded-value.h (encoded_value_size): Add explicit return instead
95 of relying on fallthrough.
96 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
99 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
101 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
102 * libdw_alloc.c: Likewise.
104 2016-07-08 Mark Wielaard <mjw@redhat.com>
106 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
107 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
108 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
110 2016-02-13 Mark Wielaard <mjw@redhat.com>
112 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
115 2015-12-18 Mark Wielaard <mjw@redhat.com>
117 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
118 (__libdw_free_zdata): Remove.
119 * dwarf_begin_elf.c (inflate_section): Remove.
120 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
121 and elf_compress_gnu to decompress if necessary.
122 (valid_p): Remove __libdw_free_zdata calls.
123 (scngrp_read): Use elf_compress if section is compressed. Remove
124 __libdw_free_zdata calls.
125 * dwarf_end.c (__libdw_free_zdata): Remove.
126 (dwarf_end): Don't call __libdw_free_zdata.
128 2015-10-28 Mark Wielaard <mjw@redhat.com>
130 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
132 2015-12-02 Mark Wielaard <mjw@redhat.com>
134 * fde.c (intern_fde): Don't leak duplicate FDEs.
136 2015-12-01 Mark Wielaard <mjw@redhat.com>
138 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
141 2015-12-01 Mark Wielaard <mjw@redhat.com>
143 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
145 2015-10-14 Chih-Hung Hsieh <chh@google.com>
147 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
148 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
150 2015-10-14 Chih-Hung Hsieh <chh@google.com>
152 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
153 function 'walk_children' to file scope; inline 'recurse' at its call
156 2015-10-19 Mark Wielaard <mjw@redhat.com>
158 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
161 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
163 * dwarf_getsrclines.c (read_srclines): Initialize state early.
165 2015-10-13 Chih-Hung Hsieh <chh@google.com>
167 * dwarf_getsrclines.c (read_srclines): Move nested functions
168 'advance_pc' and 'add_new_line' to file scope and keep many
169 local state variables within one structure.
171 2015-10-13 Chih-Hung Hsieh <chh@google.com>
173 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
174 function 'file_matches' to file scope.
176 2015-10-16 Mark Wielaard <mjw@redhat.com>
178 * Makefile.am (libdw.so): Add -lz.
180 2015-10-14 Chih-Hung Hsieh <chh@google.com>
182 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
183 and 'require_cfa_offset' to file scope.
185 2015-10-09 Josh Stone <jistone@redhat.com>
187 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
190 2015-10-05 Josh Stone <jistone@redhat.com>
192 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
194 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
196 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
197 relocation overflows in some platforms.
199 2015-09-23 Mark Wielaard <mjw@redhat.com>
201 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
202 * dwarf_formref.c (__libdw_formref): Likewise.
203 * libdw_findcu.c (__libdw_findcu): Likewise.
204 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
206 2015-09-22 Mark Wielaard <mjw@redhat.com>
208 * *.c: Remove old-style function definitions.
210 2015-09-15 Mark Wielaard <mjw@redhat.com>
212 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
214 2015-09-09 Chih-Hung Hsieh <chh@google.com>
216 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
217 redundant NULL tests on parameters declared with __nonnull_attribute__.
218 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
219 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
221 2015-09-04 Chih-Hung Hsieh <chh@google.com>
222 Mark Wielaard <mjw@redhat.com>
224 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
225 definition with ansi-C definition and add const qualifier to
228 2015-09-04 Chih-Hung Hsieh <chh@google.com>
230 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
231 definition with ansi-C definitions.
232 (__libdw_findcu): Likewise.
234 2015-08-25 Mark Wielaard <mjw@redhat.com>
236 * dwarf.h: Add DW_LANG_Haskell.
238 2015-06-18 Mark Wielaard <mjw@redhat.com>
240 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
243 2015-06-18 Mark Wielaard <mjw@redhat.com>
245 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
247 2015-06-18 Mark Wielaard <mjw@redhat.com>
249 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
250 dwarf_formudata reports an error.
251 (get_table_for_offset): Likewise.
253 2015-06-08 Mark Wielaard <mjw@redhat.com>
255 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
257 2015-06-06 Mark Wielaard <mjw@redhat.com>
259 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
261 2015-05-27 Mark Wielaard <mjw@redhat.com>
263 * encoded-value.h (read_encoded_value): Check data d_size contains
264 at least enough data to hold a pointer for DW_EH_PE_indirect.
266 2015-05-22 Mark Wielaard <mjw@redhat.com>
268 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
269 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
270 MAX_STACK_DIRS. Calculate number of dirs needed first, then
271 create dirarray directly, without needing the next field. Free
272 not stack allocated lines and files at the end.
274 2015-05-19 Mark Wielaard <mjw@redhat.com>
276 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
277 allocated array to hold locs. Allocate locs bigger than the array
278 with malloc and free them when done.
280 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
282 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
283 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
284 * dwarf_begin_elf.c (inflate_section): New static function, lifted
286 (check_section): ... here. Call inflate_section, set libdw errno to
287 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
289 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
291 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
292 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
294 2015-05-06 Mark Wielaard <mjw@redhat.com>
296 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
297 check the line number.
299 2015-05-05 Mark Wielaard <mjw@redhat.com>
301 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
302 left before reading values.
304 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
306 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
309 2015-04-22 Mark Wielaard <mjw@redhat.com>
311 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
312 (__libdw_max_len_uleb128): New function.
313 (__libdw_max_len_sleb128): Likewise.
314 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
315 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
317 2015-04-21 Mark Wielaard <mjw@redhat.com>
319 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
320 when there are more than 8.
322 2015-04-01 Petr Machata <pmachata@redhat.com>
324 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
325 (is_cudie): New function.
326 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
327 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
328 of white-listing valid tags.
329 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
331 2015-03-18 Petr Machata <pmachata@redhat.com>
333 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
334 (EXTRA_DIST): Remove known-dwarf.h.
336 2015-02-09 Mark Wielaard <mjw@redhat.com>
338 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
339 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
340 for new Fortran language codes is 1.
342 2015-02-09 Mark Wielaard <mjw@redhat.com>
344 * dwarf.h: Add DW_TAG_atomic_type.
345 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
346 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
348 2015-02-11 Josh Stone <jistone@redhat.com>
350 * encoded-value.h (read_encoded_value): Initialize value.
352 2015-02-11 Petr Machata <pmachata@redhat.com>
354 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
355 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
356 the fact in *BASEP and bail out later if it hasn't been updated by
357 __libdw_read_begin_end_pair_inc.
359 2014-12-24 Mark Wielaard <mjw@redhat.com>
361 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
362 smaller than or equal to addr, rather than returning immediately on
365 2015-01-07 Mark Wielaard <mjw@redhat.com>
367 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
368 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
369 room in the search table for all entries. Store search_table_len.
370 (getcfi_scn_eh_frame): Likewise.
371 * encoded-value.h (encoded_value_size): Don't abort, return zero.
372 (__libdw_cfi_read_address_inc): Check there is enough room to read
373 values. Pass other byte order to read functions.
374 (read_encoded_value): Check encoded_value_size. Don't abort, but
375 set libdw errno and report failure. Check there is enough room to
377 * fde.c (binary_search_fde): Check encoded value size. Add hdr
378 data buf and size to dummy_cfi.
380 2015-01-04 Mark Wielaard <mjw@redhat.com>
382 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
383 is after current DIE.
385 2015-01-04 Mark Wielaard <mjw@redhat.com>
387 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
388 (dwarf_frame_register).
390 2015-01-02 Mark Wielaard <mjw@redhat.com>
392 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
393 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
394 (getcfi_scn_eh_frame): Check d_buf is not NULL.
396 2015-01-02 Mark Wielaard <mjw@redhat.com>
398 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
399 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
400 DW_OP_addr if dbg is NULL then read argument directly.
402 2015-01-14 Jason P. Leasure <jpleasu@super.org>
404 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
407 2014-12-27 Mark Wielaard <mjw@redhat.com>
409 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
410 still falls inside CU data.
412 2015-01-11 Mark Wielaard <mjw@redhat.com>
414 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
415 __libdw_visit_scopes with NULL imports.
416 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
417 * dwarf_getscopes.c (pc_record): Likewise.
418 (dwarf_getscopes): Likewise.
419 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
420 * libdwP.h (__libdw_visit_scopes): Add imports argument.
421 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
422 function imports_contains. Push and pop imports around walk_children
423 when processing DW_TAG_imported_unit.
425 2014-12-18 Ulrich Drepper <drepper@gmail.com>
427 * Makefile.am: Suppress output of textrel_check command.
429 2014-12-16 Mark Wielaard <mjw@redhat.com>
431 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
434 2014-12-16 Mark Wielaard <mjw@redhat.com>
436 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
437 space to read die offset.
439 2014-12-16 Mark Wielaard <mjw@redhat.com>
441 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
444 2014-12-15 Mark Wielaard <mjw@redhat.com>
446 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
447 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
448 (dwarf_getpubnames): Make sure section data contains string zero
451 2014-12-16 Mark Wielaard <mjw@redhat.com>
453 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
454 the compiler optimize for the common single-byte case.
456 2014-12-15 Josh Stone <jistone@redhat.com>
458 * memory-access.h (__libdw_max_len_leb128): New.
459 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
460 (__libdw_get_sleb128): Likewise.
462 2014-12-14 Mark Wielaard <mjw@redhat.com>
464 * cfi.c (execute_cfi): Add program bounds checks.
465 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
466 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
467 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
468 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
469 * dwarf_formudata.c (dwarf_formudata): Likewise.
470 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
471 with end of data buf.
472 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
473 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
474 call gets enough data.
475 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
476 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
478 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
480 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
481 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
482 get_uleb128 with lineendp.
483 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
484 get_uleb128 with endp.
485 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
486 get_uleb128/get_sleb128 with limit.
487 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
488 get_sleb128 get called with enough data.
489 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
490 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
491 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
493 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
494 Don't call get_uleb128_step if out of data.
495 (__libdw_get_sleb128): Likewise for get_sleb128_step.
497 2014-12-12 Mark Wielaard <mjw@redhat.com>
499 * libdwP.h (struct Dwarf): Add fake_loc_cu.
501 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
502 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
503 (__libdw_form_val_len): Likewise.
504 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
505 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
506 the already found data buffer directly.
507 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
508 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
509 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
511 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
512 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
513 * dwarf_getlocation_attr.c (attr_form_cu): New function.
514 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
515 (getlocation): Handle empty blocks immediately.
516 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
517 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
518 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
520 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
521 fake_cu. Call __libdw_form_val_len with just fake_cu.
522 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
523 datap and size directly from cu startp and endp.
525 2014-12-11 Mark Wielaard <mjw@redhat.com>
527 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
529 2014-12-13 Mark Wielaard <mjw@redhat.com>
531 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
532 difference doesn't wrap around before returning as int.
534 2014-12-11 Josh Stone <jistone@redhat.com>
536 * dwarf_getsrclines.c (struct linelist): Add sequence.
537 (compare_lines): Take linelists, and break ties by sequence.
538 (read_srclines): Use linelists for sorting.
539 (read_srclines::add_new_line): Set sequence.
541 2014-12-10 Josh Stone <jistone@redhat.com>
543 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
544 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
545 * dwarf_child.c (dwarf_child): Use cu->endp.
546 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
547 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
548 * dwarf_siblingof.c (dwarf_siblingof): Use both.
550 2014-12-10 Josh Stone <jistone@redhat.com>
552 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
554 2014-12-10 Josh Stone <jistone@redhat.com>
556 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
557 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
558 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
559 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
560 * dwarf_tag.c (dwarf_tag): Likewise.
562 2014-12-04 Mark Wielaard <mjw@redhat.com>
564 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
565 (__libdw_form_val_len): Likewise and check len doesn't overflow.
566 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
567 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
569 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
570 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
572 2014-12-02 Petr Machata <pmachata@redhat.com>
574 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
576 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
577 * libdw.h (DWARF_GETMACROS_START): New macro.
579 2014-11-27 Mark Wielaard <mjw@redhat.com>
581 * Makefile.am (libdw.so): Use textrel_check.
583 2014-11-27 Mark Wielaard <mjw@redhat.com>
585 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
586 search_table_entries and search_table_encoding.
588 2014-11-24 Mark Wielaard <mjw@redhat.com>
590 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
593 2014-11-23 Mark Wielaard <mjw@redhat.com>
595 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
596 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
597 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
599 2014-11-23 Mark Wielaard <mjw@redhat.com>
601 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
602 Set libdw errno and return NULL.
604 2014-11-24 Mark Wielaard <mjw@redhat.com>
606 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
607 (DW_LANG_C11): Likewise.
608 (DW_LANG_C_plus_plus_14): Likewise.
609 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
610 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
612 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
615 2014-11-26 Mark Wielaard <mjw@redhat.com>
617 * dwarf.h (DW_AT_noreturn): Added.
619 2014-11-11 Mark Wielaard <mjw@redhat.com>
621 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
622 explicitly as uint8_t.
623 (__libdw_getsrclines): Add internal_function to declaration.
625 2014-09-10 Petr Machata <pmachata@redhat.com>
627 * dwarf_macro_getparamcnt.c: New file.
628 * dwarf_macro_param.c: New file.
629 * dwarf_macro_getsrcfiles.c: New file.
630 * Makefile.am (libdw_a_SOURCES): Add the new files.
631 * libdwP.h (struct files_lines_s): New structure.
632 (DWARF_E_INVALID_OPCODE): New enumerator.
633 (struct Dwarf): New fields macro_ops, files_lines.
634 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
635 keeping macro opcode prototypes in.
636 (Dwarf_Macro_s): Redefine from scratch.
637 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
639 * dwarf_error.c (errmsgs): Add a message for
640 DWARF_E_INVALID_OPCODE.
641 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
643 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
644 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
646 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
647 (get_offset_from, macro_op_compare, build_table)
648 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
649 (cache_op_table, read_macros, gnu_macros_getmacros_off)
650 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
652 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
653 * dwarf_getsrclines.c (read_srclines): New function with guts
654 taken from dwarf_getsrclines.
655 (__libdw_getsrclines): Likewise.
656 (__libdw_getcompdir, files_lines_compare): New functions.
657 (dwarf_getsrclines): Make it dispatch to the new interfaces.
658 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
660 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
661 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
662 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
664 2014-10-06 Mark Wielaard <mjw@redhat.com>
666 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
667 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
668 (aggregate_size): Likewise. Add old and new version.
669 * dwarf_peel_type.c: New file.
670 * libdw.h (dwarf_peel_type): New function declaration.
671 * libdwP.h (dwarf_peel_type): New internal declaration.
672 * libdw.map (ELFUTILS_0.161): New section.
674 2014-10-15 Petr Machata <pmachata@redhat.com>
676 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
677 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
679 2014-10-05 Mark Wielaard <mjw@redhat.com>
681 * dwarf.h: Add DW_AT_GNU_deleted.
683 2014-10-02 Mark Wielaard <mjw@redhat.com>
685 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
686 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
687 DW_TAG_rvalue_reference_type.
689 2014-09-12 Petr Machata <pmachata@redhat.com>
691 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
692 8-byte quantities. Consequently, rename to...
693 (read_addr_unaligned_inc): ... this.
694 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
695 (read_sbyte_unaligned): Drop.
697 2014-09-10 Petr Machata <pmachata@redhat.com>
699 * dwarf_getlocation.c (attr_ok): Also accept
700 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
701 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
703 2014-08-15 Mark Wielaard <mjw@redhat.com>
705 * dwarf_cu_die.c: New file.
706 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
707 * libdw.h (dwarf_cu_die): New function declaration.
708 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
710 2014-08-15 Mark Wielaard <mjw@redhat.com>
712 * dwarf_cu_getdwarf.c: New file.
713 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
714 * libdw.h (Dwarf_CU): New typedef.
715 (dwarf_cu_getdwarf): New function declaration.
716 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
718 2014-06-18 Mark Wielaard <mjw@redhat.com>
720 * dwarf.h: Remove DW_TAG_mutable_type.
722 2014-05-02 Mark Wielaard <mjw@redhat.com>
724 * libdwP.h (__check_build_id): Removed now unused.
726 2014-05-01 Mark Wielaard <mjw@redhat.com>
728 * libdwP.h (struct Dwarf): Remove free_alt.
729 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
730 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
732 2014-04-30 Mark Wielaard <mjw@redhat.com>
734 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
736 2014-04-15 Florian Weimer <fweimer@redhat.com>
738 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
739 (open_debugaltlink): Move to libdwfl.
740 (check_section): Do not locate alternate debuginfo.
742 2014-04-24 Florian Weimer <fweimer@redhat.com>
744 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
746 2014-04-22 Florian Weimer <fweimer@redhat.com>
748 * dwarf_getalt.c, dwarf_setalt.c: New files.
749 * Makefile.am (libdw_a_SOURCES): Add them.
750 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
751 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
753 * libdw.map (ELFUTILS_0.159): Export the two new functions.
755 2014-04-15 Florian Weimer <fweimer@redhat.com>
757 * libdwP.h (enum IDX_gnu_debugaltlink): New.
758 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
760 (check_section): Obtain .gnu_debugaltlink section from the
763 2014-04-11 Mark Wielaard <mjw@redhat.com>
765 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
766 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
767 (libdwelf_objects): New variable.
768 (libdw_a_LIBADD): Add libdwelf objects.
770 2014-04-22 Mark Wielaard <mjw@redhat.com>
772 * memory-access.h (get_sleb128_step): Remove undefined behavior
773 of left shifting a signed value. Replace it with a multiplication.
775 2014-04-13 Mark Wielaard <mjw@redhat.com>
777 * Makefile.am: Remove !MUDFLAP conditions.
779 2014-04-09 Mark Wielaard <mjw@redhat.com>
781 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
782 before calling malloc to uncompress data.
784 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
786 Fix abort() on missing section headers.
787 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
788 New label err to return NULL.
790 2014-02-05 Josh Stone <jistone@redhat.com>
792 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
793 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
794 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
796 2013-12-30 Mark Wielaard <mjw@redhat.com>
798 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
799 dwfl_linux_proc_attach.
801 2013-12-20 Mark Wielaard <mjw@redhat.com>
803 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
805 2013-12-18 Mark Wielaard <mjw@redhat.com>
807 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
808 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
809 dwfl_module_getsym_info.
811 2013-12-16 Mark Wielaard <mjw@redhat.com>
813 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
815 2013-12-10 Josh Stone <jistone@redhat.com>
817 * memory-access.h (get_uleb128_rest_return): Removed.
818 (get_sleb128_rest_return): Removed.
819 (get_uleb128_step): Make this a self-contained block.
820 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
821 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
822 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
823 (__libdw_get_uleb128): Simplify and inline for all callers.
824 (__libdw_get_sleb128): Ditto.
825 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
826 * memory-access.c: Delete file.
827 * Makefile.am (libdw_a_SOURCES): Remove it.
828 (DEFS): Remove the now unused -DIS_LIBDW.
830 2013-12-09 Josh Stone <jistone@redhat.com>
832 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
833 __libdw_form_val_len, now handling only non-constant form lengths.
834 * libdwP.h (__libdw_form_val_len): New inlined function.
836 2013-12-09 Mark Wielaard <mjw@redhat.com>
838 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
839 location expressions.
840 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
841 location found, return empty location expression.
842 * dwarf_getlocation_implicit_pointer.c
843 (dwarf_getlocation_implicit_pointer): Likewise.
844 (__libdw_empty_loc_attr): New internal function.
845 * libdwP.h (__libdw_empty_loc_attr): Define.
847 2013-11-27 Mark Wielaard <mjw@redhat.com>
849 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
850 dwfl_module_getsym_elf.
852 2013-11-26 Mark Wielaard <mjw@redhat.com>
854 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
855 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
856 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
857 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
858 (ELFUTILS_0.158): ... here.
860 2013-11-09 Mark Wielaard <mjw@redhat.com>
862 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
863 check that it is zero.
865 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
867 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
868 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
869 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
870 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
871 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
873 2013-11-01 Michael Forney <mforney@mforney.org>
875 * Makefile.am (libdwfl_objects): New definition.
876 (libdw_a_LIBADD): Use libdwfl_objects.
878 2013-11-01 Michael Forney <mforney@mforney.org>
880 * Makefile.am: Use READELF.
882 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
884 * libdw.map (ELFUTILS_0.158): New.
886 2013-10-10 Mark Wielaard <mjw@redhat.com>
888 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
889 start_addr and rename last_offset to last_addr. Now both void *.
890 (tree_visitor): Use start_add and die_addr instead of start_offset
892 (dwarf_getfuncs): Use last_addr instead of last_offset.
894 2013-10-06 Mark Wielaard <mjw@redhat.com>
896 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
897 DW_CFA_val_expression are not used with abi_cfi.
899 2013-10-03 Josh Stone <jistone@redhat.com>
901 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
902 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
903 a unit, make sure to always hash the sig8 here, so none are missed.
905 2013-09-29 Mark Wielaard <mjw@redhat.com>
907 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
908 uintptr_t before casting to char *.
909 (__libdw_intern_expression): Cast data to uintptr_t before casting
911 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
912 op->number2 to uintptr_t before casting to char *.
914 2013-09-24 Josh Stone <jistone@redhat.com>
916 * libdw_visit_scopes.c (classify_die): Removed.
917 (may_have_scopes): New function to replace classify_die. There's no
918 need for full classification; just find tags that may contain scopes.
919 (__libdw_visit_scopes): Use a direct tag comparison for imported
920 units, and use may_have_scopes to test if recursion is needed.
922 2013-09-20 Mark Wielaard <mjw@redhat.com>
924 * dwarf_getfuncs.c (visitor_info): New struct.
925 (tree_visitor): New function.
926 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
927 * libdw.h (dwarf_getfuncs): Expand function documentation.
929 2013-09-12 Mark Wielaard <mjw@redhat.com>
931 * fde.c (intern_fde): Free fde and set libdw errno when start
932 or end could not be read.
934 2013-08-24 Mark Wielaard <mjw@redhat.com>
936 * dwarf_getlocation.c (store_implicit_value): Don't take data
937 as argument, get block data from op number2. Return false when
938 block data length and op number don't match up.
939 (__libdw_intern_expression): Store start of block for
940 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
941 relative data offset. Also store block start (including length)
942 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
943 * dwarf_getlocation_attr.c: New file.
944 * dwarf_getlocation_die.c: Likewise.
945 * libdw.h (dwarf_getlocation_die): New function definition.
946 (dwarf_getlocation_attr): Likewise.
947 * libdwP.h: Declare internal dwarf_getlocation_die.
948 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
949 dwarf_getlocation_attr.
950 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
951 dwarf_getlocation_attr.c.
953 2013-08-23 Mark Wielaard <mjw@redhat.com>
955 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
956 (attr_base_address): New function.
957 (initial_offset_base): New function.
958 (getlocations_addr): New function. Taken from...
959 (dwarf_getlocation_addr): here. Use new initial_offset_base and
961 (dwarf_getlocations): New function.
962 * libdw.h (dwarf_getlocations): New function definition.
963 * libdw.map (ELFUTILS_0.157): New.
965 2013-07-02 Mark Wielaard <mjw@redhat.com>
967 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
968 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
969 NEW_LINE macro. Free malloced line records if any at the end.
971 2013-07-02 Mark Wielaard <mjw@redhat.com>
973 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
975 2013-06-26 Mark Wielaard <mjw@redhat.com>
977 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
978 DIEs without children. Return an error whenever dwarf_child or
979 dwarf_siblingof return an error. Don't call recurse and increase
980 the depth for an imported unit. Walk the children of an imported
981 unit as if they are logical children of the parent root DIE.
983 2013-05-03 Mark Wielaard <mjw@redhat.com>
985 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
988 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
990 * libdw.map (ELFUTILS_0.156): New.
992 2013-04-24 Mark Wielaard <mjw@redhat.com>
994 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
996 2013-04-10 Mark Wielaard <mjw@redhat.com>
998 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
999 equal to address size when we have a DW_FORM_ref_addr for DWARF
1002 2013-03-25 Mark Wielaard <mjw@redhat.com>
1004 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1007 2013-03-12 Mark Wielaard <mjw@redhat.com>
1009 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1010 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1012 2013-02-15 Mark Wielaard <mjw@redhat.com>
1014 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1015 not dbg->sectiondata.
1017 2013-01-07 Roland McGrath <roland@hack.frob.com>
1020 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1021 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1023 2012-12-18 Mark Wielaard <mjw@redhat.com>
1025 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1026 (check_section): Likewise on error.
1027 (scngrp_read): Likewise.
1028 (dwarf_begin_elf): Likewise.
1030 2012-10-09 Petr Machata <pmachata@redhat.com>
1032 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1033 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1034 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1035 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1037 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1039 * cfi.c: New include system.h.
1040 (execute_cfi) (enough_registers): Clear new memory after realloc.
1042 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1044 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1045 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1048 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1050 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1051 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1052 Remove the later DW_OP_call_frame_cfa push to RESULT.
1054 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1057 * fde.c (binary_search_fde): Remove always true <address >= start>
1058 conditional. Move L initialization upwards.
1060 2012-08-24 Mark Wielaard <mjw@redhat.com>
1062 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1063 when ENABLE_DWZ is defined.
1064 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1067 2012-08-16 Mark Wielaard <mjw@redhat.com>
1069 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1070 * dwarf.h (DW_LANG_Go): Update comment.
1071 (DW_LANG_Mips_Assembler): Likewise.
1073 2012-06-27 Mark Wielaard <mjw@redhat.com>
1075 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1076 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1077 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1078 (try_debugaltlink): New function.
1079 (open_debugaltlink): Likewise.
1080 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1081 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1083 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1084 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1086 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1087 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1088 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1090 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1091 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1092 (struct Dwarf): Add alt_dwarf and free_alt fields.
1093 (__libdw_read_offset): Add dbg_ret argument, use to check with
1094 __libdw_offset_in_section.
1095 (__check_build_id): New function declaration.
1096 (dwarf_begin): Define as INTDECL.
1097 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1098 and DW_FORM_GNU_strp_alt.
1100 2012-07-19 Mark Wielaard <mjw@redhat.com>
1102 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1104 2012-07-24 Mark Wielaard <mjw@redhat.com>
1106 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1107 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1110 2012-07-24 Mark Wielaard <mjw@redhat.com>
1112 * dwarf.h: Add DW_ATE_UTF.
1114 2012-06-27 Mark Wielaard <mjw@redhat.com>
1116 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1118 2012-06-26 Mark Wielaard <mjw@redhat.com>
1120 * libdwP.h: Add IDX_debug_macro.
1121 * dwarf.h: Add DW_AT_GNU_macros.
1122 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1123 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1125 2012-04-27 Mark Wielaard <mjw@redhat.com>
1127 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1128 a constant offset from DW_AT_low_pc.
1130 2012-03-19 Tom Tromey <tromey@redhat.com>
1132 * libdw_findcu.c (findcu_cb): Move earlier.
1133 (__libdw_intern_next_unit): Add new CU to search tree here...
1134 (__libdw_findcu): ... not here.
1136 2012-01-31 Mark Wielaard <mjw@redhat.com>
1138 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1140 2011-11-31 Mark Wielaard <mjw@redhat.com>
1142 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1144 2011-07-14 Mark Wielaard <mjw@redhat.com>
1146 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1148 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1150 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1151 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1154 2011-04-26 Mark Wielaard <mjw@redhat.com>
1156 * dwarf_child (dwarf_child): Sanity check end of section against
1157 cu_data () of die->cu.
1159 2011-03-22 Mark Wielaard <mjw@redhat.com>
1161 * dwarf.h: Add DW_TAG_GNU_call_site,
1162 DW_TAG_GNU_call_site_parameter,
1163 DW_AT_GNU_call_site_value,
1164 DW_AT_GNU_call_site_data_value,
1165 DW_AT_GNU_call_site_target,
1166 DW_AT_GNU_call_site_target_clobbered,
1167 DW_AT_GNU_tail_call,
1168 DW_AT_GNU_all_tail_call_sites,
1169 DW_AT_GNU_all_call_sites,
1170 DW_AT_GNU_all_source_call_sites,
1171 and DW_OP_GNU_entry_value.
1173 2011-03-10 Petr Machata <pmachata@redhat.com>
1175 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1176 abbreviation with code 0.
1178 2011-03-09 Petr Machata <pmachata@redhat.com>
1180 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1182 2011-02-23 Roland McGrath <roland@redhat.com>
1184 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1185 Declare __libdw_free_zdata.
1186 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1187 (dwarf_end): Call it.
1189 * dwarf_begin_elf.c (valid_p): Likewise.
1190 (check_section, scngrp_read): Likewise.
1191 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1193 2010-10-13 Roland McGrath <roland@redhat.com>
1195 * dwarf.h: Add DW_LANG_Go.
1197 2010-10-05 Roland McGrath <roland@redhat.com>
1199 * dwarf_getaranges.c: Use malloc rather than alloca,
1200 since the total number of elements can be quite huge.
1202 2010-07-26 Roland McGrath <roland@redhat.com>
1204 * dwarf_getlocation_implicit_pointer.c: New file.
1205 * Makefile.am (libdw_a_SOURCES): Add it.
1206 * libdw.map (ELFUTILS_0.149): New set.
1207 Add dwarf_getlocation_implicit_pointer.
1208 * libdw.h: Declare it.
1210 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1211 (dwarf_offdie, dwarf_offdie_types): Update callers.
1212 * libdwP.h: Declare it.
1214 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1215 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1217 2010-08-24 Roland McGrath <roland@redhat.com>
1219 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1221 2010-07-27 Roland McGrath <roland@redhat.com>
1223 * dwarf_formref_die.c: Fix sig8 hash insertion.
1225 2010-06-23 Roland McGrath <roland@redhat.com>
1227 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1228 * libdw.h: Remove it.
1229 * libdw.map: Likewise.
1231 2010-06-22 Roland McGrath <roland@redhat.com>
1233 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1235 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1238 2010-06-21 Roland McGrath <roland@redhat.com>
1240 * dwarf.h: Add DW_TAG_GNU_* constants.
1242 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1245 2010-06-20 Roland McGrath <roland@redhat.com>
1247 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1248 to search TUs instead of CUs.
1249 * libdwP.h: Update decl.
1250 (struct Dwarf): New member tu_tree.
1251 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1252 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1253 (dwarf_offdie): ... here.
1254 (dwarf_offdie_types): New function.
1255 * libdw.h: Declare it.
1256 * libdw.map (ELFUTILS_0.148): Add it.
1258 * libdwP.h (CUDIE): Use cu_data.
1259 * dwarf_formblock.c: Likewise.
1260 * dwarf_formref_die.c: Likewise.
1261 * dwarf_diecu.c: Use CUDIE macro.
1262 * dwarf_formaddr.c: Use cu_sec_idx.
1264 2010-06-16 Roland McGrath <roland@redhat.com>
1266 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1267 we don't repeat a CU lookup we've already done. Handle
1268 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1270 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1272 (__libdw_findcu): ... here. Call it.
1273 * libdwP.h: Declare it.
1274 (struct Dwarf): New member next_tu_offset.
1276 * dwarf_sig8_hash.c: New file.
1277 * dwarf_sig8_hash.h: New file.
1278 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1279 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1281 * libdwP.h (struct Dwarf): New member sig8_hash.
1282 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1283 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1285 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1286 (dwarf_nextcu): ... here. Call it.
1287 * libdw.h: Declare it.
1288 * libdwP.h: Add INTDECL.
1289 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1290 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1292 * libdwP.h (cu_sec_idx, cu_data): New functions.
1293 Use .debug_types when CU is a TU.
1294 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1295 * dwarf_siblingof.c: Likewise.
1296 * dwarf_formstring.c: Likewise.
1297 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1298 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1299 (dwarf_getlocation_addr): Likewise.
1301 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1302 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1303 .debug_types header size instead of .debug_info header size.
1305 * dwarf_diecu.c: Update caller.
1306 * dwarf_getaranges.c: Likewise.
1307 * dwarf_nextcu.c: Likewise.
1308 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1310 * fde.c (fde_by_offset): Renamed to ...
1311 (__libdw_fde_by_offset): ... this, made global and internal_function.
1312 Don't take ADDRESS argument.
1313 (__libdw_find_fde): Update caller. Do address sanity check here.
1314 * cfi.h: Declare __libdw_fde_by_offset.
1315 * cfi.c (dwarf_cfi_validate_fde): New function.
1316 * libdw.h: Declare it.
1317 * libdw.map (ELFUTILS_0.148): Add it.
1319 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1320 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1322 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1323 Don't assume DW_EH_PE_aligned refers to native address size.
1325 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1328 2010-06-17 Roland McGrath <roland@redhat.com>
1330 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1332 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1333 into an inner inline function. Set new fields. Check all fields for
1334 overflow when setting.
1335 * dwarf_lineisa.c: New file.
1336 * dwarf_linediscriminator.c: New file.
1337 * dwarf_lineop_index.c: New file.
1338 * Makefile.am (libdw_a_SOURCES): Add them.
1339 * libdw.map (ELFUTILS_0.148): Add them.
1340 * libdw.h: Declare them.
1342 2010-06-16 Roland McGrath <roland@redhat.com>
1344 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1346 * fde.c (fde_by_offset): Renamed to ...
1347 (__libdw_fde_by_offset): ... this, made global and internal_function.
1348 Don't take ADDRESS argument.
1349 (__libdw_find_fde): Update caller. Do address sanity check here.
1350 * cfi.h: Declare __libdw_fde_by_offset.
1351 * cfi.c (dwarf_cfi_validate_fde): New function.
1352 * libdw.h: Declare it.
1353 * libdw.map (ELFUTILS_0.148): Add it.
1355 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1356 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1358 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1359 Don't assume DW_EH_PE_aligned refers to native address size.
1361 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1364 2010-06-15 Roland McGrath <roland@redhat.com>
1366 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1368 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1369 here, since we don't support it yet.
1371 * dwarf_next_cfi.c: Handle version 4 format.
1373 * dwarf_getsrclines.c: Handle version 4 format.
1375 2010-06-01 Roland McGrath <roland@redhat.com>
1377 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1378 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1380 * libdwP.h (CIE_VERSION): Remove unused macro.
1382 * dwarf_getsrclines.c: Fix version field test.
1383 * libdwP.h (DWARF_VERSION): Remove useless macro.
1385 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1387 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1389 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1391 2010-05-31 Mark Wielaard <mjw@redhat.com>
1393 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1394 * libdw.h (dwarf_cfi_cie_p): ... here.
1396 2010-05-31 Mark Wielaard <mjw@redhat.com>
1398 * dwarf.h: Fix DW_LANG_Python constant.
1400 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1402 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1405 2010-05-27 Roland McGrath <roland@redhat.com>
1407 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1408 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1410 2010-05-08 Roland McGrath <roland@redhat.com>
1412 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1413 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1414 (getlocation): Update caller.
1415 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1416 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1417 * libdwP.h: Update decl.
1419 2010-04-26 Roland McGrath <roland@redhat.com>
1421 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1422 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1423 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1424 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1426 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1427 Prepend DW_OP_call_frame_cfa if true.
1428 (getlocation): Update caller.
1429 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1430 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1431 * libdwP.h: Update decl.
1433 2010-04-22 Roland McGrath <roland@redhat.com>
1435 * cfi.c (execute_cfi): Never return without cleanup.
1437 (cie_cache_initial_state): Adjust caller to expect that free.
1438 (__libdw_frame_at_address): Likewise.
1440 2010-03-10 Roland McGrath <roland@redhat.com>
1442 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1444 2010-02-15 Roland McGrath <roland@redhat.com>
1446 * Makefile.am: Use config/eu.am for common stuff.
1448 2010-02-02 Mark Wielaard <mjw@redhat.com>
1450 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1452 2010-01-07 Roland McGrath <roland@redhat.com>
1454 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1456 2010-01-05 Roland McGrath <roland@redhat.com>
1458 * dwarf_aggregate_size.c: New file.
1459 * Makefile.am (libdw_a_SOURCES): Add it.
1460 * libdw.h: Declare it.
1461 * libdwP.h: Add INTDECL.
1462 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1464 * dwarf_srclang.c: Add INTDEF.
1465 * libdwP.h: Add INTDECL.
1467 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1469 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1471 2009-11-21 Roland McGrath <roland@redhat.com>
1473 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1476 2009-10-15 Roland McGrath <roland@redhat.com>
1478 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1479 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1481 2009-09-17 Roland McGrath <roland@redhat.com>
1483 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1484 argument a pointer to const.
1485 * libdw.h: Update decl.
1487 2009-09-10 Roland McGrath <roland@redhat.com>
1489 * dwarf_getlocation.c (store_implicit_value): New function.
1490 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1491 (dwarf_getlocation_implicit_value): New function.
1492 * libdw.h: Declare it.
1493 * libdw.map (ELFUTILS_0.143): Add it.
1495 2009-09-09 Mark Wielaard <mjw@redhat.com>
1497 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1499 2009-08-21 Josh Stone <jistone@redhat.com>
1501 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1503 2009-08-10 Roland McGrath <roland@redhat.com>
1505 * dwarf_getscopevar.c: Use dwarf_diename.
1507 2009-08-09 Roland McGrath <roland@redhat.com>
1509 * libdw.map (ELFUTILS_0.143): New version set,
1510 inherits from ELFUTILS_0.142.
1511 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1512 alias in the ELFUTILS_0.122 version set and the default in the new set.
1513 * dwarf_srclang.c: Likewise.
1514 * dwarf_decl_file.c: Likewise.
1515 * dwarf_decl_line.c: Likewise.
1516 * dwarf_decl_column.c: Likewise.
1517 * dwarf_bytesize.c: Likewise.
1518 * dwarf_bitsize.c: Likewise.
1519 * dwarf_bitoffset.c: Likewise.
1521 2009-08-07 Roland McGrath <roland@redhat.com>
1523 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1524 * dwarf_srclang.c: Likewise.
1525 * dwarf_decl_file.c: Likewise.
1526 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1527 * dwarf_bytesize.c: Likewise.
1528 * dwarf_bitsize.c: Likewise.
1529 * dwarf_bitoffset.c: Likewise.
1531 2009-07-22 Roland McGrath <roland@redhat.com>
1533 * dwarf_frame_cfa.c: Change calling convention.
1534 * libdw.h: Update decl.
1536 * dwarf_frame_register.c: Change calling/return-value convention for
1537 value-only results and undefined/same_value.
1538 * libdw.h: Update decl.
1540 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1541 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1542 return that value instead.
1543 (getlocation): Update caller.
1544 * dwarf_frame_cfa.c: Likewise.
1545 * libdwP.h: Update decl.
1547 2009-07-21 Roland McGrath <roland@redhat.com>
1549 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1550 Fix loop iteration after skipping a bogus or useless CU.
1552 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1553 absence, not DWARF_E_NO_DEBUG_LINE.
1555 2009-07-20 Roland McGrath <roland@redhat.com>
1557 * dwarf_getlocation.c (__libdw_intern_expression):
1558 Handle DW_OP_stack_value.
1560 2009-07-16 Roland McGrath <roland@redhat.com>
1562 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1563 reject others when CU's version > 3.
1565 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1567 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1568 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1569 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1570 and DW_AT_const_expr.
1571 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1572 and DW_FORM_ref_sig8.
1574 2009-07-15 Roland McGrath <roland@redhat.com>
1576 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1577 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1579 2009-07-13 Roland McGrath <roland@redhat.com>
1581 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1583 2009-07-08 Roland McGrath <roland@redhat.com>
1585 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1588 * libdwP.h (struct Dwarf): Add member `cfi'.
1589 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1590 * dwarf_getcfi.c: New file.
1591 * dwarf_getcfi_elf.c: New file.
1592 * dwarf_cfi_end.c: New file.
1593 * dwarf_cfi_addrframe.c: New file.
1594 * dwarf_frame_cfa.c: New file.
1595 * dwarf_frame_register.c: New file.
1596 * dwarf_frame_return_address_register.c: New file.
1597 * Makefile.am (libdw_a_SOURCES): Add them.
1598 * unwind.h: Declare those functions.
1599 * libdw.map (ELFUTILS_0.142): Export them.
1601 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1603 (getlocation): ... here, call it.
1604 * libdwP.h: Declare it.
1608 * frame-cache.c: New file.
1611 * encoded-value.h: New file.
1612 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1613 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1614 * dwarf_error.c (errmsgs): Add element for it.
1616 * dwarf_next_cfi.c: New file.
1617 * Makefile.am (libdw_a_SOURCES): Add it.
1618 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1619 Declare dwarf_next_cfi.
1620 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1623 * memory-access.h [! ALLOW_UNALIGNED]
1624 (read_2ubyte_unaligned): Renamed to ...
1625 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1626 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1627 (read_2sbyte_unaligned): Likewise.
1628 (read_4ubyte_unaligned): Likewise.
1629 (read_4sbyte_unaligned): Likewise.
1630 (read_8ubyte_unaligned): Likewise.
1631 (read_8sbyte_unaligned): Likewise.
1633 * libdwP.h (IDX_eh_frame): Remove it.
1634 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1636 2009-07-08 Roland McGrath <roland@redhat.com>
1638 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1640 * dwarf_getlocation.c (check_constant_offset): New function.
1641 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1642 handle DW_AT_data_member_location of data[48] as constant offset.
1644 2009-06-18 Roland McGrath <roland@redhat.com>
1646 * libdwP.h (__libdw_read_address_inc): Constify.
1647 (__libdw_read_offset_inc): Likewise.
1648 * dwarf_getaranges.c: Likewise.
1649 * dwarf_getlocation.c: Likewise.
1650 * dwarf_getsrclines.c: Likewise.
1651 * dwarf_nextcu.c: Likewise.
1653 2009-05-05 Petr Machata <pmachata@redhat.com>
1655 * libdwP.h (__libdw_formptr): Declare new function.
1656 * dwarf_formudata.c: Implement it here.
1657 * dwarf_getlocation.c (dwarf_getlocation_addr):
1658 Call it instead of hand-rolled offset handling code.
1659 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1660 * dwarf_ranges.c (dwarf_ranges): Likewise.
1662 2009-05-04 Petr Machata <pmachata@redhat.com>
1664 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1665 * dwarf_ranges.c: Implement it here.
1666 (dwarf_ranges): Call it.
1667 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1669 2009-04-23 Petr Machata <pmachata@redhat.com>
1671 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1672 of read_*ubyte_unaligned.
1673 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1674 * dwarf_formstring.c (dwarf_formstring): Likewise.
1675 * dwarf_formudate.c (dwarf_formudata): Likewise.
1676 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1677 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1678 * dwarf_getpubnames.c (get_offsets): Likewise.
1679 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1681 2009-04-23 Petr Machata <pmachata@redhat.com>
1683 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1684 __libdw_read_addr, __libdw_read_off): Add four new internal
1687 2009-05-07 Roland McGrath <roland@redhat.com>
1689 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1690 return value and OFFSET argument, not CU-relative. Only fetch the
1691 attribute data when called with OFFSET of 0.
1693 2009-05-07 Petr Machata <pmachata@redhat.com>
1695 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1696 DW_AT_macro_info attribute of CU DIE.
1698 2009-04-15 Roland McGrath <roland@redhat.com>
1700 * dwarf.h (DW_CIE_ID): Removed.
1701 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1703 2009-04-01 Roland McGrath <roland@redhat.com>
1705 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1707 2009-01-28 Roland McGrath <roland@redhat.com>
1709 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1710 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1712 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1714 2009-01-26 Roland McGrath <roland@redhat.com>
1716 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1718 2009-01-25 Roland McGrath <roland@redhat.com>
1720 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1722 2009-01-23 Roland McGrath <roland@redhat.com>
1724 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1725 Put these rules under if MAINTAINER_MODE.
1727 2009-01-22 Roland McGrath <roland@redhat.com>
1729 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1731 2009-01-21 Roland McGrath <roland@redhat.com>
1733 * Makefile.am (CLEANFILES): Renamed to ...
1734 (MOSTLYCLEANFILES): ... here.
1735 (CLEANFILES): New variable, add known-dwarf.h.
1737 2009-01-17 Roland McGrath <roland@redhat.com>
1739 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1740 Make it unconditional.
1741 (BUILT_SOURCES): Updated.
1743 * dwarf.h: Add description comments for DW_LANG_* values.
1745 * Makefile.am [MAINTAINER_MODE]
1746 ($(srcdir)/known-dwarf.h): New target.
1747 (BUILT_SOURCES): Add it.
1749 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1751 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1753 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1755 2009-01-08 Roland McGrath <roland@redhat.com>
1757 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1759 2008-01-06 Roland McGrath <roland@redhat.com>
1761 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1763 * dwarf_haschildren.c: Return -1 for error case, not 0.
1765 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1767 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1769 * dwarf.h: Add definition for unwind and call frame information.
1771 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1772 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1774 2008-08-15 Roland McGrath <roland@redhat.com>
1776 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1777 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1779 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1781 * dwarf_child.c: Minor optimizations.
1782 * dwarf_getattrs.c: Likewise.
1783 * dwarf_getpubnames.c: Likewise.
1784 * dwarf_siblingof.c: Likewise.
1785 * dwarf_tag.c: Likewise.
1787 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1789 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1790 of DWARF_VERSION comparison, just fail if the file's version is newer.
1792 2008-01-17 Nick Clifton <nickc@redhat.com>
1794 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1795 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1796 (DWARF3_LENGTH_64_BIT): New define.
1797 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1798 * dwarf_getpubnames: Include dwarf.h.
1799 (get_offsets): Use the new definitions.
1800 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1801 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1802 (dwarf_nextcu): Use the new definitions.
1804 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1805 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1806 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1807 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1809 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1812 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1814 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1815 Set the address in the return structure to the address of the next
1816 non-sibling die, if there is no sibling and the return pointer is
1817 not the same as the die pointer.
1818 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1820 * dwarf_child.c: Fix typo in comment.
1822 * libdwP.h (DWARF_VERSION): Change to 3.
1824 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1825 not have a initialised valp pointer.
1827 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1828 the end of the attributes is reached. When the callback fails,
1829 return the address of the failing attribute, not the address of
1831 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1833 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1834 (dwarf_child): Likewise.
1835 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1836 (dwarf_tag): Likewise.
1838 2008-01-08 Roland McGrath <roland@redhat.com>
1840 * Makefile.am (euinclude): Variable removed.
1841 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1842 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1844 2007-10-17 Roland McGrath <roland@redhat.com>
1846 * libdw.h (__deprecated_attribute__): New macro.
1847 (dwarf_formref): Mark it deprecated.
1848 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1849 (dwarf_formref): ... here. Call it. Remove INTDEF.
1850 * libdwP.h: Remove INTDECL.
1851 Declare __libdw_formref.
1852 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1853 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1855 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1856 needs to check CU->version.
1858 * libdwP.h (struct Dwarf_CU): New member `version'.
1859 * libdw_findcu.c (__libdw_findcu): Initialize it.
1861 * dwarf_child.c: Return 1 for null entry as first child.
1863 2007-10-05 Roland McGrath <roland@redhat.com>
1865 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1867 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1868 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1870 2007-10-03 Roland McGrath <roland@redhat.com>
1872 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1873 and dwfl_build_id_find_debuginfo.
1875 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1876 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1878 2007-10-02 Roland McGrath <roland@redhat.com>
1880 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1883 2007-08-07 Roland McGrath <roland@redhat.com>
1885 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1886 error code is DWARF_E_NOERROR (0).
1888 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1889 Fix typo in __libdw_visit_scopes argument.
1891 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1892 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1894 2007-07-03 Roland McGrath <roland@redhat.com>
1896 * libdw.h (__extern_inline): New macro.
1897 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1899 2007-04-16 Roland McGrath <roland@redhat.com>
1901 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1903 2007-04-05 Roland McGrath <roland@redhat.com>
1905 * dwarf_getsrcdirs.c: New file.
1906 * Makefile.am (libdw_a_SOURCES): Add it.
1907 * libdw.h: Declare dwarf_getsrcdirs.
1908 * libdw.map (ELFUTILS_0.127): Add it.
1910 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1911 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1912 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1913 Save DIRARRAY in the Dwarf_Files.
1915 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1916 address to check for all-ones base address entry. Check directly.
1917 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1919 2007-03-25 Roland McGrath <roland@redhat.com>
1921 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1922 Return NULL when freeing RESULT on error.
1923 (global_read, scngrp_read): Check return value from check_section,
1924 break out of loop after it has freed RESULT.
1925 (valid_p): Handle null argument.
1927 2007-03-12 Roland McGrath <roland@redhat.com>
1929 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1931 2007-03-04 Roland McGrath <roland@redhat.com>
1933 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1934 ELFUTILS_0.126. Add dwfl_module_addrsym.
1936 2007-02-10 Roland McGrath <roland@redhat.com>
1938 * dwarf.h (DW_OP_fbreg): Comment fix.
1940 2007-02-03 Roland McGrath <roland@redhat.com>
1942 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1943 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1944 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1945 exported in the past.
1947 2006-12-17 Roland McGrath <roland@redhat.com>
1949 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1950 address when the CU is missing attributes due to buggy GCC.
1952 2006-08-29 Roland McGrath <roland@redhat.com>
1954 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1956 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1957 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1959 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1960 result is aligned. Adjust NEWP->remaining here for this allocation.
1961 * libdwP.h: Update decl.
1962 (libdw_alloc): Update caller.
1964 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1966 * dwarf_child.c: Adjust for internal_function_def removal.
1967 * dwarf_getabbrev.c: Likewise.
1968 * dwarf_tag.c: Likewise.
1969 * libdw_form.c: Likewise.
1970 * memory-access.c: Likewise.
1972 2006-06-28 Roland McGrath <roland@redhat.com>
1974 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1976 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1979 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1981 * libdw.h: Add extern "C".
1983 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1985 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1986 aranges information.
1988 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1990 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1993 2006-02-28 Roland McGrath <roland@redhat.com>
1995 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1996 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1997 values from DWARF 3.0.
1999 2006-02-22 Roland McGrath <roland@redhat.com>
2001 * libdw.map: Bump to 0.120; export dwfl_version.
2003 2005-12-22 Roland McGrath <roland@redhat.com>
2005 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2007 2005-12-12 Roland McGrath <roland@redhat.com>
2009 * dwarf_ranges.c: Copy CU base address-finding code from
2012 2005-12-09 Roland McGrath <roland@redhat.com>
2014 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2015 Delay CU base lookup until it's needed.
2016 If CU base lookup fails with no error, flag invalid DWARF.
2018 2005-11-25 Roland McGrath <roland@redhat.com>
2020 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2022 2005-11-15 Roland McGrath <roland@redhat.com>
2024 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2026 2005-11-13 Roland McGrath <roland@redhat.com>
2028 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2030 2005-10-27 Roland McGrath <roland@redhat.com>
2032 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2033 don't match end_sequence markers.
2035 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2036 before normal records at the same address.
2037 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2040 2005-10-26 Roland McGrath <roland@redhat.com>
2042 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2043 * dwarf_func_file.c: Renamed to ...
2044 * dwarf_decl_file.c: ... here.
2045 * dwarf_func_col.c: Renamed to ...
2046 * dwarf_decl_column.c: ... here.
2047 * dwarf_func_line.c: Renamed to ...
2048 * dwarf_decl_line.c: ... here.
2049 (dwarf_func_line): Renamed to ...
2050 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2051 (__libdw_func_intval): Renamed __libdw_attr_intval.
2052 * dwarf_func_name.c: File removed.
2053 * dwarf_func_lowpc.c: File removed.
2054 * dwarf_func_highpc.c: File removed.
2055 * dwarf_func_entrypc.c: File removed.
2056 * dwarf_func_die.c: File removed.
2057 * Makefile.am (libdw_a_SOURCES): Updated.
2058 * libdw.h: Update decls.
2059 (Dwarf_Func): Type removed.
2060 * libdwP.h: Update decls.
2061 (struct Dwarf_Func_s): Type removed.
2062 * libdw.map: Updated.
2064 * libdwP.h (CUDIE): New macro.
2065 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2066 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2067 * dwarf_ranges.c (dwarf_ranges): Likewise.
2069 * dwarf_getloclist.c: Renamed to ...
2070 * dwarf_getlocation.c: ... here.
2071 (getloclist): Renamed to getlocation.
2072 (dwarf_getloclist): Renamed to dwarf_getlocation.
2073 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2074 * Makefile.am (libdw_a_SOURCES): Updated.
2075 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2076 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2077 (Dwarf_Loc): Renamed Dwarf_Op.
2078 * libdwP.h (struct loc_s): Update use.
2079 * libdw.map: Update map.
2081 * dwarf_entry_breakpoints.c: Use the second line record within the
2082 function, regardless of its source location data.
2084 2005-10-25 Roland McGrath <roland@redhat.com>
2086 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2088 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2090 2005-10-14 Roland McGrath <roland@redhat.com>
2092 * dwarf_diecu.c (dwarf_diecu): New file.
2093 * Makefile.am (libdw_a_SOURCES): Add it.
2094 * libdw.h: Declare dwarf_diecu.
2095 * libdw.map: Export it.
2097 * libdw.map: Bump to 0.116; export dwarf_ranges.
2099 2005-09-20 Roland McGrath <roland@redhat.com>
2101 * dwarf_haspc.c: Use dwarf_ranges.
2102 * dwarf_entry_breakpoints.c: Likewise.
2104 * dwarf_ranges.c: New file.
2105 * Makefile.am (libdw_a_SOURCES): Add it.
2106 * libdw.h: Declare dwarf_ranges.
2107 * libdwP.h: Add INTDECL.
2109 2005-09-14 Roland McGrath <roland@redhat.com>
2111 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2112 prologue_end marker scanning loop.
2114 2005-09-11 Roland McGrath <roland@redhat.com>
2116 * dwarf.h: Comment typo fix.
2118 2005-09-07 Roland McGrath <roland@redhat.com>
2120 * dwarf_entry_breakpoints.c: New file.
2121 * Makefile.am (libdw_a_SOURCES): Add it.
2122 * libdw.h: Declare dwarf_entry_breakpoints.
2124 * dwarf_entrypc.c: New file.
2125 * Makefile.am (libdw_a_SOURCES): Add it.
2126 * libdw.h: Declare dwarf_entrypc.
2127 * libdwP.h: Add INTDECL.
2129 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2131 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2132 (%.os): Use COMPILE.os.
2133 (COMPILE.os): Filter out gconv options.
2135 2005-08-27 Roland McGrath <roland@redhat.com>
2137 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2138 __libdw_visit_scopes.
2140 * dwarf_getscopes_die.c: New file.
2141 * Makefile.am (libdw_a_SOURCES): Add it.
2142 * libdw.h: Declare dwarf_getscopes_die.
2143 * libdw.map: Bump to 0.115 and add it.
2145 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2146 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2147 Take two functions for both preorder and postorder visitors.
2148 * libdwP.h: Update decl.
2149 (struct Dwarf_Die_Chain): New type.
2150 * dwarf_func_inline.c: Update uses.
2152 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2154 * libdwP.h: Add INTDECL.
2155 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2157 2005-08-23 Roland McGrath <roland@redhat.com>
2159 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2160 DW_AT_specification the same as DW_AT_abstract_origin.
2162 2005-08-20 Roland McGrath <roland@redhat.com>
2164 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2165 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2166 and dwfl_report_offline.
2168 2005-08-19 Roland McGrath <roland@redhat.com>
2170 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2171 Add dwfl_module_relocate_address, dwfl_module_relocations,
2172 dwfl_module_relocation_info.
2174 2005-08-18 Roland McGrath <roland@redhat.com>
2176 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2177 outermost scope in the results.
2179 2005-08-15 Roland McGrath <roland@redhat.com>
2181 * dwarf_func_inline.c: New file.
2182 * Makefile.am (libdw_a_SOURCES): Add it.
2183 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2184 * libdw.map: Add them.
2186 * dwarf_func_die.c: New file.
2187 * Makefile.am (libdw_a_SOURCES): Add it.
2188 * libdw.h: Declare dwarf_func_die.
2189 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2191 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2193 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2194 of DW_LNS_set_epilog_begin.
2196 2005-08-09 Roland McGrath <roland@redhat.com>
2198 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2200 * dwarf_end.c: Add INTDEF.
2201 * dwarf_error.c (dwarf_errmsg): Likewise.
2202 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2204 2005-08-01 Roland McGrath <roland@redhat.com>
2206 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2207 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2209 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2211 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2212 (libdw_a_LIBADD): Add all files from libdwfl.a.
2214 2005-07-27 Roland McGrath <roland@redhat.com>
2216 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2217 along with ../libebl/libebl.a and ../lib/libeu.a;
2218 depend on ../libelf/libelf.so.
2219 (libdw_so_LDADD): New variable.
2220 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2222 * libdw.map: Define an empty base version and move all symbols to
2223 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2225 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2227 * dwarf_error.c: Add internal alias for dwarf_errno.
2228 * libdwP.h: Declare __dwarf_errno_internal.
2229 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2231 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2234 2005-06-01 Roland McGrath <roland@redhat.com>
2236 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2237 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2239 2005-06-08 Roland McGrath <roland@redhat.com>
2241 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2242 (get_sleb128_step, get_sleb128): Likewise.
2243 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2244 * dwarf_getloclist.c (getloclist): Likewise.
2245 * dwarf_formblock.c (dwarf_formblock): Likewise.
2246 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2247 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2248 * dwarf_formref.c (dwarf_formref): Likewise.
2249 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2250 * dwarf_formudata.c (dwarf_formudata): Likewise.
2251 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2252 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2253 * dwarf_tag.c (dwarf_tag): Likewise.
2254 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2255 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2256 * libdw_form.c (__libdw_form_val_len): Likewise.
2257 * libdwP.h: Update decl.
2259 2005-06-04 Roland McGrath <roland@redhat.com>
2261 * memory-access.h (get_uleb128_rest_return): New macro.
2262 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2263 (get_sleb128_rest_return): New macro.
2264 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2265 * memory-access.c: New file.
2266 * Makefile.am (libdw_a_SOURCES): Add it.
2267 (DEFS): Add -DIS_LIBDW.
2269 2005-05-31 Roland McGrath <roland@redhat.com>
2271 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2274 2005-05-30 Roland McGrath <roland@redhat.com>
2276 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2277 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2279 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2280 BEGIN value. Instead, match base address entries separately for
2283 2005-05-28 Roland McGrath <roland@redhat.com>
2285 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2286 past location expression contents.
2288 2005-05-23 Roland McGrath <roland@redhat.com>
2290 * dwarf_getsrclines.c: Comment typo fix.
2292 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2293 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2295 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2297 * libdwP.h: Only use INTDECL for alias prototypes.
2299 2005-05-19 Roland McGrath <roland@redhat.com>
2301 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2303 * dwarf_getscopevar.c: New file.
2304 * Makefile.am (libdw_a_SOURCES): Add it.
2305 * libdw.h: Declare dwarf_getscopevar.
2307 * dwarf_getsrcfiles.c: Add INTDEF.
2308 * dwarf_haschildren.c: Likewise.
2309 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2311 * dwarf_getscopes.c: New file.
2312 * Makefile.am (libdw_a_SOURCES): Add it.
2313 * libdw.h: Declare dwarf_getscopes.
2314 * libdw.map: Add it.
2316 2005-05-18 Roland McGrath <roland@redhat.com>
2318 * libdwP.h (IDX_debug_ranges): New enum constant.
2319 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2320 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2321 * dwarf_error.c (errmsgs): Add it.
2322 * dwarf_haspc.c: New file.
2323 * libdw.h: Declare dwarf_haspc.
2324 * libdw.map: Add it.
2325 * libdwP.h: Add INTDECL.
2327 * dwarf_attr_integrate.c: New file.
2328 * dwarf_hasattr_integrate.c: New file.
2329 * Makefile.am (libdw_a_SOURCES): Add them.
2330 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2331 * libdw.map: Add them.
2333 * dwarf_hasattr.c: Add INTDEF.
2334 * libdwP.h: Add INTDECL for it.
2336 * dwarf_formref_die.c: New file.
2337 * Makefile.am (libdw_a_SOURCES): Add it.
2338 * libdw.h (dwarf_formref_die): Declare it.
2339 * libdwP.h (dwarf_formref_die): Add INTDECL.
2340 * libdw.map: Add it.
2342 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2344 (dwarf_getloclist): ... here. Call them.
2345 (dwarf_addrloclists): New function.
2346 * libdw.h: Declare it.
2347 * libdw.map: Add it.
2349 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2350 DW_MACINFO_end_file. Recognize type 0 as terminator.
2352 2005-05-05 Roland McGrath <roland@redhat.com>
2354 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2356 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2357 the line program does not produce all entries in ascending order.
2359 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2361 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2362 occurences (e.g., inlines) better.
2364 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2366 * libdw.h (DWARF_END_ABBREV): Define.
2367 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2369 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2371 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2372 as error of __libdw_getabbrev.
2374 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2376 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2378 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2379 results back to caller.
2381 2005-04-04 Roland McGrath <roland@redhat.com>
2383 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2385 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2388 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2390 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2392 * dwarf_getsrc_file.c: New file.
2393 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2394 * libdw.h: Declare dwarf_getsrc_file.
2395 * libdw.map: Add dwarf_getsrc_file.
2397 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2399 * dwarf_func_entrypc.c: New file.
2400 * dwarf_func_col.c: New file.
2401 * dwarf_func_line.c: New file.
2402 * dwarf_func_file.c: New file.
2403 * libdw.h: Add prototypes for new functions.
2404 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2406 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2407 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2408 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2409 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2410 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2411 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2413 * dwarf.h: Add some DWARF3 definitions.
2415 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2417 * dwarf_getfuncs.c: New file.
2418 * dwarf_func_highpc.c: New file.
2419 * dwarf_func_lowpc.c: New file.
2420 * dwarf_func_name.c: New file.
2421 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2422 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2423 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2424 and dwarf_func_name.
2425 * libdw.h: Add prototypes for new functions.
2426 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2427 * dwarf_siblingof.c: Likewise.
2428 * dwarf_dieoffset.c: Likewise.
2429 * dwarf_highpc.c: Likewise.
2430 * dwarf_lowpc.c: Likewise.
2431 * libdwP.h: Add prototypes for internal functions.
2432 Define Dwarf_Func_s structure.
2434 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2436 * libdw.h: Add padding in Dwarf_die.
2438 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2439 * dwarf_attr.c: Likewise.
2440 * dwarf_begin.c: Likewise.
2441 * dwarf_begin_elf.c: Likewise.
2442 * dwarf_bitoffset.c: Likewise.
2443 * dwarf_bitsize.c: Likewise.
2444 * dwarf_bytesize.c: Likewise.
2445 * dwarf_diename.c: Likewise.
2446 * dwarf_formaddr.c: Likewise.
2447 * dwarf_formblock.c: Likewise.
2448 * dwarf_formref.c: Likewise.
2449 * dwarf_formstring.c: Likewise.
2450 * dwarf_formudata.c: Likewise.
2451 * dwarf_getarange_addr.c: Likewise.
2452 * dwarf_getarangeinfo.c: Likewise.
2453 * dwarf_getaranges.c: Likewise.
2454 * dwarf_getloclist.c: Likewise.
2455 * dwarf_getmacros.c: Likewise.
2456 * dwarf_getsrc_die.c: Likewise.
2457 * dwarf_getsrcfiles.c: Likewise.
2458 * dwarf_getsrclines.c: Likewise.
2459 * dwarf_highpc.c: Likewise.
2460 * dwarf_lowpc.c: Likewise.
2461 * dwarf_nextcu.c: Likewise.
2462 * dwarf_offdie.c: Likewise.
2463 * dwarf_siblingof.c: Likewise.
2464 * dwarf_srclang.c: Likewise.
2465 * dwarf_tag.c: Likewise.
2466 * libdw_findcu.c: Likewise.
2467 * libdwP.h: Add prototypes for internal functions.
2469 * dwarf_addrdie.c: New file.
2470 * dwarf_macro_opcode.c: New file.
2471 * dwarf_macro_param1.c: New file.
2472 * dwarf_macro_param2.c: New file.
2473 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2474 * libdwP.h: Remove Dwarf_Macro definition.
2475 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2476 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2477 * libdw.map: Add entries for new functions.
2479 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2481 * libdw.h: Handle broken gcc < 4.
2483 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2485 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2487 * dwarf_begin_elf.c: Fix warnings.
2488 * dwarf_dieoffset.c: Likewise.
2489 * dwarf_end.c: Likewise.
2490 * dwarf_error.c: Likewise.
2491 * dwarf_getpubnames.c: Likewise.
2493 * libdwP.h: Add new error values.
2494 * dwarf_error.c: Support new error values.
2495 * dwarf_getpubnames.c: Check parameter value.
2497 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2499 * Makefile.am: Check for text relocations in constructed DSO.
2501 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2503 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2505 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2506 checks to not read over buffer boundaries for ill-formed DWARF data.
2508 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2510 * dwarf_child.c: Make compile with gcc 4.0.
2511 * dwarf_error.c: Likewise.
2512 * dwarf_formblock.c: Likewise.
2513 * dwarf_getabbrev.c: Likewise.
2514 * dwarf_getattrs.c: Likewise.
2515 * dwarf_getsrclines.c: Likewise.
2516 * dwarf_tag.c: Likewise.
2517 * libdw_form.c: Likewise.
2519 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2521 * Makefile.am: Support building with mudflap.
2523 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2524 * dwarf_getsrclines.c: Likewise.
2525 * dwarf_memory-access.h: Likewise.
2527 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2529 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2531 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2532 Third parameter of dwarf_getsrcfiles can be NULL.
2534 * libdw.map: Add dwarf_getmacros.
2535 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2536 * dwarf_getmacros.c: New file.
2538 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2540 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2542 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2544 * dwarf_getsrclines.c:
2545 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2547 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2549 * libdwP.h (_): Use elfutils domain.
2551 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2553 * dwarf_getsrclines.c: Fix typo in comment.
2555 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2557 * Makefile.am: Support building with mudflap.
2559 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2561 * memory-access.h: Add lots of const in case a pointer passed is const.
2563 * dwarf_formflag.c: New file.
2564 * dwarf_getattrs.c: New file.
2565 * dwarf_error.c: Add new error value.
2566 * libdw.h: Add prototypes for new functions. Adjust prototype for
2568 * libdw.map: Add new functions.
2569 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2571 * libdwP.h: Add new error value.
2572 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2575 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2577 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2579 * dwarf_getarange_addr.c: New file
2580 * dwarf_getarangeinfo.c: New file.
2581 * dwarf_getaranges.c: New file.
2582 * dwarf_onerange.c: New file.
2583 * libdw.h: Declare new functions. Define Dwarf_Arange and
2585 * libdw.map: Add new functions.
2586 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2587 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2588 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2589 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2590 * dwarf_error.c: Add new message.
2592 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2594 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2595 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2596 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2597 * dwarf_error.c: Add another message.
2598 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2600 * dwarf_filesrc.c: Likewise.
2601 * dwarf_getsrcfiles.c: Likewise.
2602 * dwarf_getsrclines.c: Likewise.
2603 * dwarf_lineaddr.c: New file.
2604 * dwarf_linebeginstatement.c: New file.
2605 * dwarf_lineblock.c: New file.
2606 * dwarf_linecol.c: New file.
2607 * dwarf_lineendsequence.c: New file.
2608 * dwarf_lineepiloguebegin.c: New file.
2609 * dwarf_lineno.c: New file.
2610 * dwarf_lineprologueend.c: New file.
2611 * dwarf_onesrcline.c: New file.
2612 * dwarf_lineno.c: Change interface to store result in object pointed
2613 to by second parameter.
2614 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2615 prototype. Define Dwarf_Files and Dwarf_Lines.
2616 * libdw.map: Add new functions.
2617 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2618 * libdw_findcu.c: Don't initialize nlines field.
2620 * dwarf_siblingof: Little optimization.
2622 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2623 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2624 * libdwP.h (struct Dwarf): Add free_elf field.
2626 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2628 * dwarf_getstring.c: New file.
2629 * dwarf_offabbrev.c: New file.
2630 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2631 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2632 parameters. Don't allocate memory if not necessary and don't lookup
2633 previous results if no CU given.
2634 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2635 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2636 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2637 * libdwP.h: Change prototype for __libdw_getabbrev.
2639 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2640 returning if this is wanted.
2642 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2644 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2645 with offset_size value.
2646 * libdw.h: Adjust dwarf_nextcu prototype.
2647 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2648 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2649 member of new CU struct.
2650 * dwarf_formstring.c: Depend on offset_size not address_size for
2651 DW_FORM_strp handling.
2652 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2654 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2656 (dwarf_tag): Correctly recognize failed lookup.
2658 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2660 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2661 * dwarf_formblock.c: New file.
2662 * dwarf_getloclist.c: Rewrite to handle a single block.
2663 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2664 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2665 dwarf_getloclistent declaration.
2666 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2667 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2668 Add locs member to struct Dwarf_CU.
2669 * libdw_fundcu.c: Initialize locs member of new CU.
2670 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2671 Remove dwarf_getloclistent.c.
2673 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2675 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2676 * libdwP.h: Likewise.
2678 * dwarf_getloclist.c: New file.
2679 * dwarf_getloclistent.c: New file.
2680 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2681 Declare dwarf_getloclistent and dwarf_getloclist.
2682 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2683 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2684 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2687 * dwarf_error.c: More error messages.
2689 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2691 * dwarf_getsrclines.c: Remove debugging support.
2693 * dwarf_getsrcfiles.c: New file.
2694 * dwarf_filesrc.c: New file.
2695 * libdw.h: Declare these functions. Define Dwarf_File.
2696 * libdwP.c: Adjust Dwarf_File_s definition.
2697 * libdw.map: Add these functions.
2698 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2700 * dwarf_getsrclines.c: Initialize cu->files.
2702 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2704 * libdw.h: Add more nonnull function attributes.
2706 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2707 * dwarf_end.c (cu_free): New function.
2708 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2709 * dwarf_error.c (errmsgs): Add new messages.
2710 * dwarf_getsrc_die.c: New file.
2711 * dwarf_getsrclines.c: New file.
2712 * dwarf_lineno.c: New file.
2713 * dwarf_linesrc.c: New file.
2714 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2715 instead of the *_inc-less variants.
2716 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2717 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2718 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2720 * libdwP.h: Add more error codes.
2721 (struct Dwarf): Remove mem_tail.next member.
2722 (Dwarf_File): Define type.
2723 (struct Dwarf_Line_s): Define type.
2724 (struct Dwarf_CU): Add lines and nlines members.
2725 (libdw_alloc): Define local variable _tail and use it.
2726 Add some function attributes.
2727 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2728 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2729 * memory-access.h: Add unlikely for the endian conversion paths.
2730 * Makefile.am (AM_CFLAGS): Add -std parameter.
2731 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2732 dwarf_lineno, and dwarf_linesrc.
2734 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2736 * Moved to CVS archive.