1 2015-09-15 Mark Wielaard <mjw@redhat.com>
3 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
5 2015-09-09 Chih-Hung Hsieh <chh@google.com>
7 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
8 redundant NULL tests on parameters declared with __nonnull_attribute__.
9 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
10 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
12 2015-09-04 Chih-Hung Hsieh <chh@google.com>
13 Mark Wielaard <mjw@redhat.com>
15 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
16 definition with ansi-C definition and add const qualifier to
19 2015-09-04 Chih-Hung Hsieh <chh@google.com>
21 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
22 definition with ansi-C definitions.
23 (__libdw_findcu): Likewise.
25 2015-08-25 Mark Wielaard <mjw@redhat.com>
27 * dwarf.h: Add DW_LANG_Haskell.
29 2015-06-18 Mark Wielaard <mjw@redhat.com>
31 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
34 2015-06-18 Mark Wielaard <mjw@redhat.com>
36 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
38 2015-06-18 Mark Wielaard <mjw@redhat.com>
40 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
41 dwarf_formudata reports an error.
42 (get_table_for_offset): Likewise.
44 2015-06-08 Mark Wielaard <mjw@redhat.com>
46 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
48 2015-06-06 Mark Wielaard <mjw@redhat.com>
50 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
52 2015-05-27 Mark Wielaard <mjw@redhat.com>
54 * encoded-value.h (read_encoded_value): Check data d_size contains
55 at least enough data to hold a pointer for DW_EH_PE_indirect.
57 2015-05-22 Mark Wielaard <mjw@redhat.com>
59 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
60 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
61 MAX_STACK_DIRS. Calculate number of dirs needed first, then
62 create dirarray directly, without needing the next field. Free
63 not stack allocated lines and files at the end.
65 2015-05-19 Mark Wielaard <mjw@redhat.com>
67 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
68 allocated array to hold locs. Allocate locs bigger than the array
69 with malloc and free them when done.
71 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
73 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
74 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
75 * dwarf_begin_elf.c (inflate_section): New static function, lifted
77 (check_section): ... here. Call inflate_section, set libdw errno to
78 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
80 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
82 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
83 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
85 2015-05-06 Mark Wielaard <mjw@redhat.com>
87 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
88 check the line number.
90 2015-05-05 Mark Wielaard <mjw@redhat.com>
92 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
93 left before reading values.
95 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
97 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
100 2015-04-22 Mark Wielaard <mjw@redhat.com>
102 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
103 (__libdw_max_len_uleb128): New function.
104 (__libdw_max_len_sleb128): Likewise.
105 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
106 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
108 2015-04-21 Mark Wielaard <mjw@redhat.com>
110 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
111 when there are more than 8.
113 2015-04-01 Petr Machata <pmachata@redhat.com>
115 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
116 (is_cudie): New function.
117 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
118 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
119 of white-listing valid tags.
120 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
122 2015-03-18 Petr Machata <pmachata@redhat.com>
124 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
125 (EXTRA_DIST): Remove known-dwarf.h.
127 2015-02-09 Mark Wielaard <mjw@redhat.com>
129 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
130 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
131 for new Fortran language codes is 1.
133 2015-02-09 Mark Wielaard <mjw@redhat.com>
135 * dwarf.h: Add DW_TAG_atomic_type.
136 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
137 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
139 2015-02-11 Josh Stone <jistone@redhat.com>
141 * encoded-value.h (read_encoded_value): Initialize value.
143 2015-02-11 Petr Machata <pmachata@redhat.com>
145 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
146 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
147 the fact in *BASEP and bail out later if it hasn't been updated by
148 __libdw_read_begin_end_pair_inc.
150 2014-12-24 Mark Wielaard <mjw@redhat.com>
152 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
153 smaller than or equal to addr, rather than returning immediately on
156 2015-01-07 Mark Wielaard <mjw@redhat.com>
158 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
159 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
160 room in the search table for all entries. Store search_table_len.
161 (getcfi_scn_eh_frame): Likewise.
162 * encoded-value.h (encoded_value_size): Don't abort, return zero.
163 (__libdw_cfi_read_address_inc): Check there is enough room to read
164 values. Pass other byte order to read functions.
165 (read_encoded_value): Check encoded_value_size. Don't abort, but
166 set libdw errno and report failure. Check there is enough room to
168 * fde.c (binary_search_fde): Check encoded value size. Add hdr
169 data buf and size to dummy_cfi.
171 2015-01-04 Mark Wielaard <mjw@redhat.com>
173 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
174 is after current DIE.
176 2015-01-04 Mark Wielaard <mjw@redhat.com>
178 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
179 (dwarf_frame_register).
181 2015-01-02 Mark Wielaard <mjw@redhat.com>
183 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
184 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
185 (getcfi_scn_eh_frame): Check d_buf is not NULL.
187 2015-01-02 Mark Wielaard <mjw@redhat.com>
189 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
190 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
191 DW_OP_addr if dbg is NULL then read argument directly.
193 2015-01-14 Jason P. Leasure <jpleasu@super.org>
195 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
198 2014-12-27 Mark Wielaard <mjw@redhat.com>
200 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
201 still falls inside CU data.
203 2015-01-11 Mark Wielaard <mjw@redhat.com>
205 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
206 __libdw_visit_scopes with NULL imports.
207 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
208 * dwarf_getscopes.c (pc_record): Likewise.
209 (dwarf_getscopes): Likewise.
210 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
211 * libdwP.h (__libdw_visit_scopes): Add imports argument.
212 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
213 function imports_contains. Push and pop imports around walk_children
214 when processing DW_TAG_imported_unit.
216 2014-12-18 Ulrich Drepper <drepper@gmail.com>
218 * Makefile.am: Suppress output of textrel_check command.
220 2014-12-16 Mark Wielaard <mjw@redhat.com>
222 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
225 2014-12-16 Mark Wielaard <mjw@redhat.com>
227 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
228 space to read die offset.
230 2014-12-16 Mark Wielaard <mjw@redhat.com>
232 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
235 2014-12-15 Mark Wielaard <mjw@redhat.com>
237 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
238 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
239 (dwarf_getpubnames): Make sure section data contains string zero
242 2014-12-16 Mark Wielaard <mjw@redhat.com>
244 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
245 the compiler optimize for the common single-byte case.
247 2014-12-15 Josh Stone <jistone@redhat.com>
249 * memory-access.h (__libdw_max_len_leb128): New.
250 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
251 (__libdw_get_sleb128): Likewise.
253 2014-12-14 Mark Wielaard <mjw@redhat.com>
255 * cfi.c (execute_cfi): Add program bounds checks.
256 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
257 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
258 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
259 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
260 * dwarf_formudata.c (dwarf_formudata): Likewise.
261 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
262 with end of data buf.
263 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
264 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
265 call gets enough data.
266 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
267 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
269 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
271 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
272 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
273 get_uleb128 with lineendp.
274 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
275 get_uleb128 with endp.
276 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
277 get_uleb128/get_sleb128 with limit.
278 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
279 get_sleb128 get called with enough data.
280 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
281 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
282 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
284 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
285 Don't call get_uleb128_step if out of data.
286 (__libdw_get_sleb128): Likewise for get_sleb128_step.
288 2014-12-12 Mark Wielaard <mjw@redhat.com>
290 * libdwP.h (struct Dwarf): Add fake_loc_cu.
292 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
293 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
294 (__libdw_form_val_len): Likewise.
295 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
296 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
297 the already found data buffer directly.
298 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
299 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
300 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
302 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
303 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
304 * dwarf_getlocation_attr.c (attr_form_cu): New function.
305 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
306 (getlocation): Handle empty blocks immediately.
307 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
308 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
309 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
311 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
312 fake_cu. Call __libdw_form_val_len with just fake_cu.
313 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
314 datap and size directly from cu startp and endp.
316 2014-12-11 Mark Wielaard <mjw@redhat.com>
318 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
320 2014-12-13 Mark Wielaard <mjw@redhat.com>
322 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
323 difference doesn't wrap around before returning as int.
325 2014-12-11 Josh Stone <jistone@redhat.com>
327 * dwarf_getsrclines.c (struct linelist): Add sequence.
328 (compare_lines): Take linelists, and break ties by sequence.
329 (read_srclines): Use linelists for sorting.
330 (read_srclines::add_new_line): Set sequence.
332 2014-12-10 Josh Stone <jistone@redhat.com>
334 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
335 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
336 * dwarf_child.c (dwarf_child): Use cu->endp.
337 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
338 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
339 * dwarf_siblingof.c (dwarf_siblingof): Use both.
341 2014-12-10 Josh Stone <jistone@redhat.com>
343 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
345 2014-12-10 Josh Stone <jistone@redhat.com>
347 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
348 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
349 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
350 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
351 * dwarf_tag.c (dwarf_tag): Likewise.
353 2014-12-04 Mark Wielaard <mjw@redhat.com>
355 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
356 (__libdw_form_val_len): Likewise and check len doesn't overflow.
357 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
358 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
360 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
361 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
363 2014-12-02 Petr Machata <pmachata@redhat.com>
365 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
367 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
368 * libdw.h (DWARF_GETMACROS_START): New macro.
370 2014-11-27 Mark Wielaard <mjw@redhat.com>
372 * Makefile.am (libdw.so): Use textrel_check.
374 2014-11-27 Mark Wielaard <mjw@redhat.com>
376 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
377 search_table_entries and search_table_encoding.
379 2014-11-24 Mark Wielaard <mjw@redhat.com>
381 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
384 2014-11-23 Mark Wielaard <mjw@redhat.com>
386 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
387 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
388 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
390 2014-11-23 Mark Wielaard <mjw@redhat.com>
392 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
393 Set libdw errno and return NULL.
395 2014-11-24 Mark Wielaard <mjw@redhat.com>
397 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
398 (DW_LANG_C11): Likewise.
399 (DW_LANG_C_plus_plus_14): Likewise.
400 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
401 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
403 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
406 2014-11-26 Mark Wielaard <mjw@redhat.com>
408 * dwarf.h (DW_AT_noreturn): Added.
410 2014-11-11 Mark Wielaard <mjw@redhat.com>
412 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
413 explicitly as uint8_t.
414 (__libdw_getsrclines): Add internal_function to declaration.
416 2014-09-10 Petr Machata <pmachata@redhat.com>
418 * dwarf_macro_getparamcnt.c: New file.
419 * dwarf_macro_param.c: New file.
420 * dwarf_macro_getsrcfiles.c: New file.
421 * Makefile.am (libdw_a_SOURCES): Add the new files.
422 * libdwP.h (struct files_lines_s): New structure.
423 (DWARF_E_INVALID_OPCODE): New enumerator.
424 (struct Dwarf): New fields macro_ops, files_lines.
425 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
426 keeping macro opcode prototypes in.
427 (Dwarf_Macro_s): Redefine from scratch.
428 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
430 * dwarf_error.c (errmsgs): Add a message for
431 DWARF_E_INVALID_OPCODE.
432 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
434 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
435 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
437 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
438 (get_offset_from, macro_op_compare, build_table)
439 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
440 (cache_op_table, read_macros, gnu_macros_getmacros_off)
441 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
443 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
444 * dwarf_getsrclines.c (read_srclines): New function with guts
445 taken from dwarf_getsrclines.
446 (__libdw_getsrclines): Likewise.
447 (__libdw_getcompdir, files_lines_compare): New functions.
448 (dwarf_getsrclines): Make it dispatch to the new interfaces.
449 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
451 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
452 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
453 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
455 2014-10-06 Mark Wielaard <mjw@redhat.com>
457 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
458 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
459 (aggregate_size): Likewise. Add old and new version.
460 * dwarf_peel_type.c: New file.
461 * libdw.h (dwarf_peel_type): New function declaration.
462 * libdwP.h (dwarf_peel_type): New internal declaration.
463 * libdw.map (ELFUTILS_0.161): New section.
465 2014-10-15 Petr Machata <pmachata@redhat.com>
467 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
468 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
470 2014-10-05 Mark Wielaard <mjw@redhat.com>
472 * dwarf.h: Add DW_AT_GNU_deleted.
474 2014-10-02 Mark Wielaard <mjw@redhat.com>
476 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
477 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
478 DW_TAG_rvalue_reference_type.
480 2014-09-12 Petr Machata <pmachata@redhat.com>
482 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
483 8-byte quantities. Consequently, rename to...
484 (read_addr_unaligned_inc): ... this.
485 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
486 (read_sbyte_unaligned): Drop.
488 2014-09-10 Petr Machata <pmachata@redhat.com>
490 * dwarf_getlocation.c (attr_ok): Also accept
491 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
492 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
494 2014-08-15 Mark Wielaard <mjw@redhat.com>
496 * dwarf_cu_die.c: New file.
497 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
498 * libdw.h (dwarf_cu_die): New function declaration.
499 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
501 2014-08-15 Mark Wielaard <mjw@redhat.com>
503 * dwarf_cu_getdwarf.c: New file.
504 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
505 * libdw.h (Dwarf_CU): New typedef.
506 (dwarf_cu_getdwarf): New function declaration.
507 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
509 2014-06-18 Mark Wielaard <mjw@redhat.com>
511 * dwarf.h: Remove DW_TAG_mutable_type.
513 2014-05-02 Mark Wielaard <mjw@redhat.com>
515 * libdwP.h (__check_build_id): Removed now unused.
517 2014-05-01 Mark Wielaard <mjw@redhat.com>
519 * libdwP.h (struct Dwarf): Remove free_alt.
520 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
521 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
523 2014-04-30 Mark Wielaard <mjw@redhat.com>
525 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
527 2014-04-15 Florian Weimer <fweimer@redhat.com>
529 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
530 (open_debugaltlink): Move to libdwfl.
531 (check_section): Do not locate alternate debuginfo.
533 2014-04-24 Florian Weimer <fweimer@redhat.com>
535 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
537 2014-04-22 Florian Weimer <fweimer@redhat.com>
539 * dwarf_getalt.c, dwarf_setalt.c: New files.
540 * Makefile.am (libdw_a_SOURCES): Add them.
541 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
542 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
544 * libdw.map (ELFUTILS_0.159): Export the two new functions.
546 2014-04-15 Florian Weimer <fweimer@redhat.com>
548 * libdwP.h (enum IDX_gnu_debugaltlink): New.
549 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
551 (check_section): Obtain .gnu_debugaltlink section from the
554 2014-04-11 Mark Wielaard <mjw@redhat.com>
556 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
557 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
558 (libdwelf_objects): New variable.
559 (libdw_a_LIBADD): Add libdwelf objects.
561 2014-04-22 Mark Wielaard <mjw@redhat.com>
563 * memory-access.h (get_sleb128_step): Remove undefined behavior
564 of left shifting a signed value. Replace it with a multiplication.
566 2014-04-13 Mark Wielaard <mjw@redhat.com>
568 * Makefile.am: Remove !MUDFLAP conditions.
570 2014-04-09 Mark Wielaard <mjw@redhat.com>
572 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
573 before calling malloc to uncompress data.
575 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
577 Fix abort() on missing section headers.
578 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
579 New label err to return NULL.
581 2014-02-05 Josh Stone <jistone@redhat.com>
583 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
584 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
585 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
587 2013-12-30 Mark Wielaard <mjw@redhat.com>
589 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
590 dwfl_linux_proc_attach.
592 2013-12-20 Mark Wielaard <mjw@redhat.com>
594 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
596 2013-12-18 Mark Wielaard <mjw@redhat.com>
598 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
599 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
600 dwfl_module_getsym_info.
602 2013-12-16 Mark Wielaard <mjw@redhat.com>
604 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
606 2013-12-10 Josh Stone <jistone@redhat.com>
608 * memory-access.h (get_uleb128_rest_return): Removed.
609 (get_sleb128_rest_return): Removed.
610 (get_uleb128_step): Make this a self-contained block.
611 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
612 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
613 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
614 (__libdw_get_uleb128): Simplify and inline for all callers.
615 (__libdw_get_sleb128): Ditto.
616 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
617 * memory-access.c: Delete file.
618 * Makefile.am (libdw_a_SOURCES): Remove it.
619 (DEFS): Remove the now unused -DIS_LIBDW.
621 2013-12-09 Josh Stone <jistone@redhat.com>
623 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
624 __libdw_form_val_len, now handling only non-constant form lengths.
625 * libdwP.h (__libdw_form_val_len): New inlined function.
627 2013-12-09 Mark Wielaard <mjw@redhat.com>
629 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
630 location expressions.
631 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
632 location found, return empty location expression.
633 * dwarf_getlocation_implicit_pointer.c
634 (dwarf_getlocation_implicit_pointer): Likewise.
635 (__libdw_empty_loc_attr): New internal function.
636 * libdwP.h (__libdw_empty_loc_attr): Define.
638 2013-11-27 Mark Wielaard <mjw@redhat.com>
640 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
641 dwfl_module_getsym_elf.
643 2013-11-26 Mark Wielaard <mjw@redhat.com>
645 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
646 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
647 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
648 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
649 (ELFUTILS_0.158): ... here.
651 2013-11-09 Mark Wielaard <mjw@redhat.com>
653 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
654 check that it is zero.
656 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
658 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
659 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
660 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
661 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
662 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
664 2013-11-01 Michael Forney <mforney@mforney.org>
666 * Makefile.am (libdwfl_objects): New definition.
667 (libdw_a_LIBADD): Use libdwfl_objects.
669 2013-11-01 Michael Forney <mforney@mforney.org>
671 * Makefile.am: Use READELF.
673 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
675 * libdw.map (ELFUTILS_0.158): New.
677 2013-10-10 Mark Wielaard <mjw@redhat.com>
679 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
680 start_addr and rename last_offset to last_addr. Now both void *.
681 (tree_visitor): Use start_add and die_addr instead of start_offset
683 (dwarf_getfuncs): Use last_addr instead of last_offset.
685 2013-10-06 Mark Wielaard <mjw@redhat.com>
687 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
688 DW_CFA_val_expression are not used with abi_cfi.
690 2013-10-03 Josh Stone <jistone@redhat.com>
692 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
693 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
694 a unit, make sure to always hash the sig8 here, so none are missed.
696 2013-09-29 Mark Wielaard <mjw@redhat.com>
698 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
699 uintptr_t before casting to char *.
700 (__libdw_intern_expression): Cast data to uintptr_t before casting
702 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
703 op->number2 to uintptr_t before casting to char *.
705 2013-09-24 Josh Stone <jistone@redhat.com>
707 * libdw_visit_scopes.c (classify_die): Removed.
708 (may_have_scopes): New function to replace classify_die. There's no
709 need for full classification; just find tags that may contain scopes.
710 (__libdw_visit_scopes): Use a direct tag comparison for imported
711 units, and use may_have_scopes to test if recursion is needed.
713 2013-09-20 Mark Wielaard <mjw@redhat.com>
715 * dwarf_getfuncs.c (visitor_info): New struct.
716 (tree_visitor): New function.
717 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
718 * libdw.h (dwarf_getfuncs): Expand function documentation.
720 2013-09-12 Mark Wielaard <mjw@redhat.com>
722 * fde.c (intern_fde): Free fde and set libdw errno when start
723 or end could not be read.
725 2013-08-24 Mark Wielaard <mjw@redhat.com>
727 * dwarf_getlocation.c (store_implicit_value): Don't take data
728 as argument, get block data from op number2. Return false when
729 block data length and op number don't match up.
730 (__libdw_intern_expression): Store start of block for
731 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
732 relative data offset. Also store block start (including length)
733 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
734 * dwarf_getlocation_attr.c: New file.
735 * dwarf_getlocation_die.c: Likewise.
736 * libdw.h (dwarf_getlocation_die): New function definition.
737 (dwarf_getlocation_attr): Likewise.
738 * libdwP.h: Declare internal dwarf_getlocation_die.
739 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
740 dwarf_getlocation_attr.
741 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
742 dwarf_getlocation_attr.c.
744 2013-08-23 Mark Wielaard <mjw@redhat.com>
746 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
747 (attr_base_address): New function.
748 (initial_offset_base): New function.
749 (getlocations_addr): New function. Taken from...
750 (dwarf_getlocation_addr): here. Use new initial_offset_base and
752 (dwarf_getlocations): New function.
753 * libdw.h (dwarf_getlocations): New function definition.
754 * libdw.map (ELFUTILS_0.157): New.
756 2013-07-02 Mark Wielaard <mjw@redhat.com>
758 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
759 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
760 NEW_LINE macro. Free malloced line records if any at the end.
762 2013-07-02 Mark Wielaard <mjw@redhat.com>
764 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
766 2013-06-26 Mark Wielaard <mjw@redhat.com>
768 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
769 DIEs without children. Return an error whenever dwarf_child or
770 dwarf_siblingof return an error. Don't call recurse and increase
771 the depth for an imported unit. Walk the children of an imported
772 unit as if they are logical children of the parent root DIE.
774 2013-05-03 Mark Wielaard <mjw@redhat.com>
776 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
779 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
781 * libdw.map (ELFUTILS_0.156): New.
783 2013-04-24 Mark Wielaard <mjw@redhat.com>
785 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
787 2013-04-10 Mark Wielaard <mjw@redhat.com>
789 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
790 equal to address size when we have a DW_FORM_ref_addr for DWARF
793 2013-03-25 Mark Wielaard <mjw@redhat.com>
795 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
798 2013-03-12 Mark Wielaard <mjw@redhat.com>
800 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
801 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
803 2013-02-15 Mark Wielaard <mjw@redhat.com>
805 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
806 not dbg->sectiondata.
808 2013-01-07 Roland McGrath <roland@hack.frob.com>
811 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
812 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
814 2012-12-18 Mark Wielaard <mjw@redhat.com>
816 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
817 (check_section): Likewise on error.
818 (scngrp_read): Likewise.
819 (dwarf_begin_elf): Likewise.
821 2012-10-09 Petr Machata <pmachata@redhat.com>
823 * dwarf_getlocation.c (__libdw_intern_expression): Handle
824 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
825 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
826 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
828 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
830 * cfi.c: New include system.h.
831 (execute_cfi) (enough_registers): Clear new memory after realloc.
833 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
835 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
836 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
839 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
841 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
842 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
843 Remove the later DW_OP_call_frame_cfa push to RESULT.
845 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
848 * fde.c (binary_search_fde): Remove always true <address >= start>
849 conditional. Move L initialization upwards.
851 2012-08-24 Mark Wielaard <mjw@redhat.com>
853 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
854 when ENABLE_DWZ is defined.
855 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
858 2012-08-16 Mark Wielaard <mjw@redhat.com>
860 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
861 * dwarf.h (DW_LANG_Go): Update comment.
862 (DW_LANG_Mips_Assembler): Likewise.
864 2012-06-27 Mark Wielaard <mjw@redhat.com>
866 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
867 * dwarf_begin.c (dwarf_begin): Add INTDEF.
868 * dwarf_begin_elf.c (__check_build_id): New internal_function.
869 (try_debugaltlink): New function.
870 (open_debugaltlink): Likewise.
871 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
872 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
874 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
875 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
877 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
878 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
879 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
881 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
882 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
883 (struct Dwarf): Add alt_dwarf and free_alt fields.
884 (__libdw_read_offset): Add dbg_ret argument, use to check with
885 __libdw_offset_in_section.
886 (__check_build_id): New function declaration.
887 (dwarf_begin): Define as INTDECL.
888 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
889 and DW_FORM_GNU_strp_alt.
891 2012-07-19 Mark Wielaard <mjw@redhat.com>
893 * dwarf.h: Add DW_OP_GNU_parameter_ref.
895 2012-07-24 Mark Wielaard <mjw@redhat.com>
897 * dwarf.h: Correct spelling of DW_LANG_ObjC.
898 * dwarf_aggregate_size.c (array_size): Use correct spelling of
901 2012-07-24 Mark Wielaard <mjw@redhat.com>
903 * dwarf.h: Add DW_ATE_UTF.
905 2012-06-27 Mark Wielaard <mjw@redhat.com>
907 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
909 2012-06-26 Mark Wielaard <mjw@redhat.com>
911 * libdwP.h: Add IDX_debug_macro.
912 * dwarf.h: Add DW_AT_GNU_macros.
913 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
914 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
916 2012-04-27 Mark Wielaard <mjw@redhat.com>
918 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
919 a constant offset from DW_AT_low_pc.
921 2012-03-19 Tom Tromey <tromey@redhat.com>
923 * libdw_findcu.c (findcu_cb): Move earlier.
924 (__libdw_intern_next_unit): Add new CU to search tree here...
925 (__libdw_findcu): ... not here.
927 2012-01-31 Mark Wielaard <mjw@redhat.com>
929 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
931 2011-11-31 Mark Wielaard <mjw@redhat.com>
933 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
935 2011-07-14 Mark Wielaard <mjw@redhat.com>
937 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
939 2011-05-16 Jakub Jelinek <jakub@redhat.com>
941 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
942 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
945 2011-04-26 Mark Wielaard <mjw@redhat.com>
947 * dwarf_child (dwarf_child): Sanity check end of section against
948 cu_data () of die->cu.
950 2011-03-22 Mark Wielaard <mjw@redhat.com>
952 * dwarf.h: Add DW_TAG_GNU_call_site,
953 DW_TAG_GNU_call_site_parameter,
954 DW_AT_GNU_call_site_value,
955 DW_AT_GNU_call_site_data_value,
956 DW_AT_GNU_call_site_target,
957 DW_AT_GNU_call_site_target_clobbered,
959 DW_AT_GNU_all_tail_call_sites,
960 DW_AT_GNU_all_call_sites,
961 DW_AT_GNU_all_source_call_sites,
962 and DW_OP_GNU_entry_value.
964 2011-03-10 Petr Machata <pmachata@redhat.com>
966 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
967 abbreviation with code 0.
969 2011-03-09 Petr Machata <pmachata@redhat.com>
971 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
973 2011-02-23 Roland McGrath <roland@redhat.com>
975 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
976 Declare __libdw_free_zdata.
977 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
978 (dwarf_end): Call it.
980 * dwarf_begin_elf.c (valid_p): Likewise.
981 (check_section, scngrp_read): Likewise.
982 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
984 2010-10-13 Roland McGrath <roland@redhat.com>
986 * dwarf.h: Add DW_LANG_Go.
988 2010-10-05 Roland McGrath <roland@redhat.com>
990 * dwarf_getaranges.c: Use malloc rather than alloca,
991 since the total number of elements can be quite huge.
993 2010-07-26 Roland McGrath <roland@redhat.com>
995 * dwarf_getlocation_implicit_pointer.c: New file.
996 * Makefile.am (libdw_a_SOURCES): Add it.
997 * libdw.map (ELFUTILS_0.149): New set.
998 Add dwarf_getlocation_implicit_pointer.
999 * libdw.h: Declare it.
1001 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1002 (dwarf_offdie, dwarf_offdie_types): Update callers.
1003 * libdwP.h: Declare it.
1005 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1006 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1008 2010-08-24 Roland McGrath <roland@redhat.com>
1010 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1012 2010-07-27 Roland McGrath <roland@redhat.com>
1014 * dwarf_formref_die.c: Fix sig8 hash insertion.
1016 2010-06-23 Roland McGrath <roland@redhat.com>
1018 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1019 * libdw.h: Remove it.
1020 * libdw.map: Likewise.
1022 2010-06-22 Roland McGrath <roland@redhat.com>
1024 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1026 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1029 2010-06-21 Roland McGrath <roland@redhat.com>
1031 * dwarf.h: Add DW_TAG_GNU_* constants.
1033 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1036 2010-06-20 Roland McGrath <roland@redhat.com>
1038 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1039 to search TUs instead of CUs.
1040 * libdwP.h: Update decl.
1041 (struct Dwarf): New member tu_tree.
1042 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1043 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1044 (dwarf_offdie): ... here.
1045 (dwarf_offdie_types): New function.
1046 * libdw.h: Declare it.
1047 * libdw.map (ELFUTILS_0.148): Add it.
1049 * libdwP.h (CUDIE): Use cu_data.
1050 * dwarf_formblock.c: Likewise.
1051 * dwarf_formref_die.c: Likewise.
1052 * dwarf_diecu.c: Use CUDIE macro.
1053 * dwarf_formaddr.c: Use cu_sec_idx.
1055 2010-06-16 Roland McGrath <roland@redhat.com>
1057 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1058 we don't repeat a CU lookup we've already done. Handle
1059 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1061 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1063 (__libdw_findcu): ... here. Call it.
1064 * libdwP.h: Declare it.
1065 (struct Dwarf): New member next_tu_offset.
1067 * dwarf_sig8_hash.c: New file.
1068 * dwarf_sig8_hash.h: New file.
1069 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1070 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1072 * libdwP.h (struct Dwarf): New member sig8_hash.
1073 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1074 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1076 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1077 (dwarf_nextcu): ... here. Call it.
1078 * libdw.h: Declare it.
1079 * libdwP.h: Add INTDECL.
1080 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1081 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1083 * libdwP.h (cu_sec_idx, cu_data): New functions.
1084 Use .debug_types when CU is a TU.
1085 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1086 * dwarf_siblingof.c: Likewise.
1087 * dwarf_formstring.c: Likewise.
1088 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1089 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1090 (dwarf_getlocation_addr): Likewise.
1092 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1093 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1094 .debug_types header size instead of .debug_info header size.
1096 * dwarf_diecu.c: Update caller.
1097 * dwarf_getaranges.c: Likewise.
1098 * dwarf_nextcu.c: Likewise.
1099 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1101 * fde.c (fde_by_offset): Renamed to ...
1102 (__libdw_fde_by_offset): ... this, made global and internal_function.
1103 Don't take ADDRESS argument.
1104 (__libdw_find_fde): Update caller. Do address sanity check here.
1105 * cfi.h: Declare __libdw_fde_by_offset.
1106 * cfi.c (dwarf_cfi_validate_fde): New function.
1107 * libdw.h: Declare it.
1108 * libdw.map (ELFUTILS_0.148): Add it.
1110 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1111 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1113 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1114 Don't assume DW_EH_PE_aligned refers to native address size.
1116 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1119 2010-06-17 Roland McGrath <roland@redhat.com>
1121 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1123 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1124 into an inner inline function. Set new fields. Check all fields for
1125 overflow when setting.
1126 * dwarf_lineisa.c: New file.
1127 * dwarf_linediscriminator.c: New file.
1128 * dwarf_lineop_index.c: New file.
1129 * Makefile.am (libdw_a_SOURCES): Add them.
1130 * libdw.map (ELFUTILS_0.148): Add them.
1131 * libdw.h: Declare them.
1133 2010-06-16 Roland McGrath <roland@redhat.com>
1135 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1137 * fde.c (fde_by_offset): Renamed to ...
1138 (__libdw_fde_by_offset): ... this, made global and internal_function.
1139 Don't take ADDRESS argument.
1140 (__libdw_find_fde): Update caller. Do address sanity check here.
1141 * cfi.h: Declare __libdw_fde_by_offset.
1142 * cfi.c (dwarf_cfi_validate_fde): New function.
1143 * libdw.h: Declare it.
1144 * libdw.map (ELFUTILS_0.148): Add it.
1146 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1147 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1149 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1150 Don't assume DW_EH_PE_aligned refers to native address size.
1152 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1155 2010-06-15 Roland McGrath <roland@redhat.com>
1157 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1159 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1160 here, since we don't support it yet.
1162 * dwarf_next_cfi.c: Handle version 4 format.
1164 * dwarf_getsrclines.c: Handle version 4 format.
1166 2010-06-01 Roland McGrath <roland@redhat.com>
1168 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1169 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1171 * libdwP.h (CIE_VERSION): Remove unused macro.
1173 * dwarf_getsrclines.c: Fix version field test.
1174 * libdwP.h (DWARF_VERSION): Remove useless macro.
1176 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1178 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1180 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1182 2010-05-31 Mark Wielaard <mjw@redhat.com>
1184 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1185 * libdw.h (dwarf_cfi_cie_p): ... here.
1187 2010-05-31 Mark Wielaard <mjw@redhat.com>
1189 * dwarf.h: Fix DW_LANG_Python constant.
1191 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1193 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1196 2010-05-27 Roland McGrath <roland@redhat.com>
1198 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1199 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1201 2010-05-08 Roland McGrath <roland@redhat.com>
1203 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1204 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1205 (getlocation): Update caller.
1206 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1207 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1208 * libdwP.h: Update decl.
1210 2010-04-26 Roland McGrath <roland@redhat.com>
1212 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1213 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1214 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1215 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1217 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1218 Prepend DW_OP_call_frame_cfa if true.
1219 (getlocation): Update caller.
1220 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1221 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1222 * libdwP.h: Update decl.
1224 2010-04-22 Roland McGrath <roland@redhat.com>
1226 * cfi.c (execute_cfi): Never return without cleanup.
1228 (cie_cache_initial_state): Adjust caller to expect that free.
1229 (__libdw_frame_at_address): Likewise.
1231 2010-03-10 Roland McGrath <roland@redhat.com>
1233 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1235 2010-02-15 Roland McGrath <roland@redhat.com>
1237 * Makefile.am: Use config/eu.am for common stuff.
1239 2010-02-02 Mark Wielaard <mjw@redhat.com>
1241 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1243 2010-01-07 Roland McGrath <roland@redhat.com>
1245 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1247 2010-01-05 Roland McGrath <roland@redhat.com>
1249 * dwarf_aggregate_size.c: New file.
1250 * Makefile.am (libdw_a_SOURCES): Add it.
1251 * libdw.h: Declare it.
1252 * libdwP.h: Add INTDECL.
1253 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1255 * dwarf_srclang.c: Add INTDEF.
1256 * libdwP.h: Add INTDECL.
1258 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1260 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1262 2009-11-21 Roland McGrath <roland@redhat.com>
1264 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1267 2009-10-15 Roland McGrath <roland@redhat.com>
1269 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1270 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1272 2009-09-17 Roland McGrath <roland@redhat.com>
1274 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1275 argument a pointer to const.
1276 * libdw.h: Update decl.
1278 2009-09-10 Roland McGrath <roland@redhat.com>
1280 * dwarf_getlocation.c (store_implicit_value): New function.
1281 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1282 (dwarf_getlocation_implicit_value): New function.
1283 * libdw.h: Declare it.
1284 * libdw.map (ELFUTILS_0.143): Add it.
1286 2009-09-09 Mark Wielaard <mjw@redhat.com>
1288 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1290 2009-08-21 Josh Stone <jistone@redhat.com>
1292 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1294 2009-08-10 Roland McGrath <roland@redhat.com>
1296 * dwarf_getscopevar.c: Use dwarf_diename.
1298 2009-08-09 Roland McGrath <roland@redhat.com>
1300 * libdw.map (ELFUTILS_0.143): New version set,
1301 inherits from ELFUTILS_0.142.
1302 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1303 alias in the ELFUTILS_0.122 version set and the default in the new set.
1304 * dwarf_srclang.c: Likewise.
1305 * dwarf_decl_file.c: Likewise.
1306 * dwarf_decl_line.c: Likewise.
1307 * dwarf_decl_column.c: Likewise.
1308 * dwarf_bytesize.c: Likewise.
1309 * dwarf_bitsize.c: Likewise.
1310 * dwarf_bitoffset.c: Likewise.
1312 2009-08-07 Roland McGrath <roland@redhat.com>
1314 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1315 * dwarf_srclang.c: Likewise.
1316 * dwarf_decl_file.c: Likewise.
1317 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1318 * dwarf_bytesize.c: Likewise.
1319 * dwarf_bitsize.c: Likewise.
1320 * dwarf_bitoffset.c: Likewise.
1322 2009-07-22 Roland McGrath <roland@redhat.com>
1324 * dwarf_frame_cfa.c: Change calling convention.
1325 * libdw.h: Update decl.
1327 * dwarf_frame_register.c: Change calling/return-value convention for
1328 value-only results and undefined/same_value.
1329 * libdw.h: Update decl.
1331 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1332 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1333 return that value instead.
1334 (getlocation): Update caller.
1335 * dwarf_frame_cfa.c: Likewise.
1336 * libdwP.h: Update decl.
1338 2009-07-21 Roland McGrath <roland@redhat.com>
1340 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1341 Fix loop iteration after skipping a bogus or useless CU.
1343 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1344 absence, not DWARF_E_NO_DEBUG_LINE.
1346 2009-07-20 Roland McGrath <roland@redhat.com>
1348 * dwarf_getlocation.c (__libdw_intern_expression):
1349 Handle DW_OP_stack_value.
1351 2009-07-16 Roland McGrath <roland@redhat.com>
1353 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1354 reject others when CU's version > 3.
1356 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1358 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1359 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1360 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1361 and DW_AT_const_expr.
1362 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1363 and DW_FORM_ref_sig8.
1365 2009-07-15 Roland McGrath <roland@redhat.com>
1367 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1368 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1370 2009-07-13 Roland McGrath <roland@redhat.com>
1372 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1374 2009-07-08 Roland McGrath <roland@redhat.com>
1376 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1379 * libdwP.h (struct Dwarf): Add member `cfi'.
1380 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1381 * dwarf_getcfi.c: New file.
1382 * dwarf_getcfi_elf.c: New file.
1383 * dwarf_cfi_end.c: New file.
1384 * dwarf_cfi_addrframe.c: New file.
1385 * dwarf_frame_cfa.c: New file.
1386 * dwarf_frame_register.c: New file.
1387 * dwarf_frame_return_address_register.c: New file.
1388 * Makefile.am (libdw_a_SOURCES): Add them.
1389 * unwind.h: Declare those functions.
1390 * libdw.map (ELFUTILS_0.142): Export them.
1392 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1394 (getlocation): ... here, call it.
1395 * libdwP.h: Declare it.
1399 * frame-cache.c: New file.
1402 * encoded-value.h: New file.
1403 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1404 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1405 * dwarf_error.c (errmsgs): Add element for it.
1407 * dwarf_next_cfi.c: New file.
1408 * Makefile.am (libdw_a_SOURCES): Add it.
1409 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1410 Declare dwarf_next_cfi.
1411 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1414 * memory-access.h [! ALLOW_UNALIGNED]
1415 (read_2ubyte_unaligned): Renamed to ...
1416 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1417 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1418 (read_2sbyte_unaligned): Likewise.
1419 (read_4ubyte_unaligned): Likewise.
1420 (read_4sbyte_unaligned): Likewise.
1421 (read_8ubyte_unaligned): Likewise.
1422 (read_8sbyte_unaligned): Likewise.
1424 * libdwP.h (IDX_eh_frame): Remove it.
1425 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1427 2009-07-08 Roland McGrath <roland@redhat.com>
1429 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1431 * dwarf_getlocation.c (check_constant_offset): New function.
1432 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1433 handle DW_AT_data_member_location of data[48] as constant offset.
1435 2009-06-18 Roland McGrath <roland@redhat.com>
1437 * libdwP.h (__libdw_read_address_inc): Constify.
1438 (__libdw_read_offset_inc): Likewise.
1439 * dwarf_getaranges.c: Likewise.
1440 * dwarf_getlocation.c: Likewise.
1441 * dwarf_getsrclines.c: Likewise.
1442 * dwarf_nextcu.c: Likewise.
1444 2009-05-05 Petr Machata <pmachata@redhat.com>
1446 * libdwP.h (__libdw_formptr): Declare new function.
1447 * dwarf_formudata.c: Implement it here.
1448 * dwarf_getlocation.c (dwarf_getlocation_addr):
1449 Call it instead of hand-rolled offset handling code.
1450 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1451 * dwarf_ranges.c (dwarf_ranges): Likewise.
1453 2009-05-04 Petr Machata <pmachata@redhat.com>
1455 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1456 * dwarf_ranges.c: Implement it here.
1457 (dwarf_ranges): Call it.
1458 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1460 2009-04-23 Petr Machata <pmachata@redhat.com>
1462 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1463 of read_*ubyte_unaligned.
1464 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1465 * dwarf_formstring.c (dwarf_formstring): Likewise.
1466 * dwarf_formudate.c (dwarf_formudata): Likewise.
1467 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1468 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1469 * dwarf_getpubnames.c (get_offsets): Likewise.
1470 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1472 2009-04-23 Petr Machata <pmachata@redhat.com>
1474 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1475 __libdw_read_addr, __libdw_read_off): Add four new internal
1478 2009-05-07 Roland McGrath <roland@redhat.com>
1480 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1481 return value and OFFSET argument, not CU-relative. Only fetch the
1482 attribute data when called with OFFSET of 0.
1484 2009-05-07 Petr Machata <pmachata@redhat.com>
1486 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1487 DW_AT_macro_info attribute of CU DIE.
1489 2009-04-15 Roland McGrath <roland@redhat.com>
1491 * dwarf.h (DW_CIE_ID): Removed.
1492 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1494 2009-04-01 Roland McGrath <roland@redhat.com>
1496 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1498 2009-01-28 Roland McGrath <roland@redhat.com>
1500 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1501 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1503 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1505 2009-01-26 Roland McGrath <roland@redhat.com>
1507 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1509 2009-01-25 Roland McGrath <roland@redhat.com>
1511 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1513 2009-01-23 Roland McGrath <roland@redhat.com>
1515 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1516 Put these rules under if MAINTAINER_MODE.
1518 2009-01-22 Roland McGrath <roland@redhat.com>
1520 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1522 2009-01-21 Roland McGrath <roland@redhat.com>
1524 * Makefile.am (CLEANFILES): Renamed to ...
1525 (MOSTLYCLEANFILES): ... here.
1526 (CLEANFILES): New variable, add known-dwarf.h.
1528 2009-01-17 Roland McGrath <roland@redhat.com>
1530 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1531 Make it unconditional.
1532 (BUILT_SOURCES): Updated.
1534 * dwarf.h: Add description comments for DW_LANG_* values.
1536 * Makefile.am [MAINTAINER_MODE]
1537 ($(srcdir)/known-dwarf.h): New target.
1538 (BUILT_SOURCES): Add it.
1540 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1542 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1544 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1546 2009-01-08 Roland McGrath <roland@redhat.com>
1548 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1550 2008-01-06 Roland McGrath <roland@redhat.com>
1552 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1554 * dwarf_haschildren.c: Return -1 for error case, not 0.
1556 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1558 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1560 * dwarf.h: Add definition for unwind and call frame information.
1562 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1563 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1565 2008-08-15 Roland McGrath <roland@redhat.com>
1567 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1568 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1570 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1572 * dwarf_child.c: Minor optimizations.
1573 * dwarf_getattrs.c: Likewise.
1574 * dwarf_getpubnames.c: Likewise.
1575 * dwarf_siblingof.c: Likewise.
1576 * dwarf_tag.c: Likewise.
1578 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1580 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1581 of DWARF_VERSION comparison, just fail if the file's version is newer.
1583 2008-01-17 Nick Clifton <nickc@redhat.com>
1585 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1586 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1587 (DWARF3_LENGTH_64_BIT): New define.
1588 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1589 * dwarf_getpubnames: Include dwarf.h.
1590 (get_offsets): Use the new definitions.
1591 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1592 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1593 (dwarf_nextcu): Use the new definitions.
1595 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1596 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1597 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1598 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1600 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1603 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1605 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1606 Set the address in the return structure to the address of the next
1607 non-sibling die, if there is no sibling and the return pointer is
1608 not the same as the die pointer.
1609 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1611 * dwarf_child.c: Fix typo in comment.
1613 * libdwP.h (DWARF_VERSION): Change to 3.
1615 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1616 not have a initialised valp pointer.
1618 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1619 the end of the attributes is reached. When the callback fails,
1620 return the address of the failing attribute, not the address of
1622 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1624 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1625 (dwarf_child): Likewise.
1626 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1627 (dwarf_tag): Likewise.
1629 2008-01-08 Roland McGrath <roland@redhat.com>
1631 * Makefile.am (euinclude): Variable removed.
1632 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1633 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1635 2007-10-17 Roland McGrath <roland@redhat.com>
1637 * libdw.h (__deprecated_attribute__): New macro.
1638 (dwarf_formref): Mark it deprecated.
1639 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1640 (dwarf_formref): ... here. Call it. Remove INTDEF.
1641 * libdwP.h: Remove INTDECL.
1642 Declare __libdw_formref.
1643 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1644 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1646 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1647 needs to check CU->version.
1649 * libdwP.h (struct Dwarf_CU): New member `version'.
1650 * libdw_findcu.c (__libdw_findcu): Initialize it.
1652 * dwarf_child.c: Return 1 for null entry as first child.
1654 2007-10-05 Roland McGrath <roland@redhat.com>
1656 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1658 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1659 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1661 2007-10-03 Roland McGrath <roland@redhat.com>
1663 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1664 and dwfl_build_id_find_debuginfo.
1666 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1667 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1669 2007-10-02 Roland McGrath <roland@redhat.com>
1671 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1674 2007-08-07 Roland McGrath <roland@redhat.com>
1676 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1677 error code is DWARF_E_NOERROR (0).
1679 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1680 Fix typo in __libdw_visit_scopes argument.
1682 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1683 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1685 2007-07-03 Roland McGrath <roland@redhat.com>
1687 * libdw.h (__extern_inline): New macro.
1688 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1690 2007-04-16 Roland McGrath <roland@redhat.com>
1692 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1694 2007-04-05 Roland McGrath <roland@redhat.com>
1696 * dwarf_getsrcdirs.c: New file.
1697 * Makefile.am (libdw_a_SOURCES): Add it.
1698 * libdw.h: Declare dwarf_getsrcdirs.
1699 * libdw.map (ELFUTILS_0.127): Add it.
1701 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1702 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1703 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1704 Save DIRARRAY in the Dwarf_Files.
1706 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1707 address to check for all-ones base address entry. Check directly.
1708 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1710 2007-03-25 Roland McGrath <roland@redhat.com>
1712 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1713 Return NULL when freeing RESULT on error.
1714 (global_read, scngrp_read): Check return value from check_section,
1715 break out of loop after it has freed RESULT.
1716 (valid_p): Handle null argument.
1718 2007-03-12 Roland McGrath <roland@redhat.com>
1720 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1722 2007-03-04 Roland McGrath <roland@redhat.com>
1724 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1725 ELFUTILS_0.126. Add dwfl_module_addrsym.
1727 2007-02-10 Roland McGrath <roland@redhat.com>
1729 * dwarf.h (DW_OP_fbreg): Comment fix.
1731 2007-02-03 Roland McGrath <roland@redhat.com>
1733 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1734 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1735 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1736 exported in the past.
1738 2006-12-17 Roland McGrath <roland@redhat.com>
1740 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1741 address when the CU is missing attributes due to buggy GCC.
1743 2006-08-29 Roland McGrath <roland@redhat.com>
1745 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1747 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1748 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1750 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1751 result is aligned. Adjust NEWP->remaining here for this allocation.
1752 * libdwP.h: Update decl.
1753 (libdw_alloc): Update caller.
1755 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1757 * dwarf_child.c: Adjust for internal_function_def removal.
1758 * dwarf_getabbrev.c: Likewise.
1759 * dwarf_tag.c: Likewise.
1760 * libdw_form.c: Likewise.
1761 * memory-access.c: Likewise.
1763 2006-06-28 Roland McGrath <roland@redhat.com>
1765 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1767 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1770 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1772 * libdw.h: Add extern "C".
1774 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1776 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1777 aranges information.
1779 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1781 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1784 2006-02-28 Roland McGrath <roland@redhat.com>
1786 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1787 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1788 values from DWARF 3.0.
1790 2006-02-22 Roland McGrath <roland@redhat.com>
1792 * libdw.map: Bump to 0.120; export dwfl_version.
1794 2005-12-22 Roland McGrath <roland@redhat.com>
1796 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1798 2005-12-12 Roland McGrath <roland@redhat.com>
1800 * dwarf_ranges.c: Copy CU base address-finding code from
1803 2005-12-09 Roland McGrath <roland@redhat.com>
1805 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1806 Delay CU base lookup until it's needed.
1807 If CU base lookup fails with no error, flag invalid DWARF.
1809 2005-11-25 Roland McGrath <roland@redhat.com>
1811 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1813 2005-11-15 Roland McGrath <roland@redhat.com>
1815 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1817 2005-11-13 Roland McGrath <roland@redhat.com>
1819 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1821 2005-10-27 Roland McGrath <roland@redhat.com>
1823 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1824 don't match end_sequence markers.
1826 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1827 before normal records at the same address.
1828 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1831 2005-10-26 Roland McGrath <roland@redhat.com>
1833 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1834 * dwarf_func_file.c: Renamed to ...
1835 * dwarf_decl_file.c: ... here.
1836 * dwarf_func_col.c: Renamed to ...
1837 * dwarf_decl_column.c: ... here.
1838 * dwarf_func_line.c: Renamed to ...
1839 * dwarf_decl_line.c: ... here.
1840 (dwarf_func_line): Renamed to ...
1841 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1842 (__libdw_func_intval): Renamed __libdw_attr_intval.
1843 * dwarf_func_name.c: File removed.
1844 * dwarf_func_lowpc.c: File removed.
1845 * dwarf_func_highpc.c: File removed.
1846 * dwarf_func_entrypc.c: File removed.
1847 * dwarf_func_die.c: File removed.
1848 * Makefile.am (libdw_a_SOURCES): Updated.
1849 * libdw.h: Update decls.
1850 (Dwarf_Func): Type removed.
1851 * libdwP.h: Update decls.
1852 (struct Dwarf_Func_s): Type removed.
1853 * libdw.map: Updated.
1855 * libdwP.h (CUDIE): New macro.
1856 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1857 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1858 * dwarf_ranges.c (dwarf_ranges): Likewise.
1860 * dwarf_getloclist.c: Renamed to ...
1861 * dwarf_getlocation.c: ... here.
1862 (getloclist): Renamed to getlocation.
1863 (dwarf_getloclist): Renamed to dwarf_getlocation.
1864 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1865 * Makefile.am (libdw_a_SOURCES): Updated.
1866 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1867 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1868 (Dwarf_Loc): Renamed Dwarf_Op.
1869 * libdwP.h (struct loc_s): Update use.
1870 * libdw.map: Update map.
1872 * dwarf_entry_breakpoints.c: Use the second line record within the
1873 function, regardless of its source location data.
1875 2005-10-25 Roland McGrath <roland@redhat.com>
1877 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1879 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1881 2005-10-14 Roland McGrath <roland@redhat.com>
1883 * dwarf_diecu.c (dwarf_diecu): New file.
1884 * Makefile.am (libdw_a_SOURCES): Add it.
1885 * libdw.h: Declare dwarf_diecu.
1886 * libdw.map: Export it.
1888 * libdw.map: Bump to 0.116; export dwarf_ranges.
1890 2005-09-20 Roland McGrath <roland@redhat.com>
1892 * dwarf_haspc.c: Use dwarf_ranges.
1893 * dwarf_entry_breakpoints.c: Likewise.
1895 * dwarf_ranges.c: New file.
1896 * Makefile.am (libdw_a_SOURCES): Add it.
1897 * libdw.h: Declare dwarf_ranges.
1898 * libdwP.h: Add INTDECL.
1900 2005-09-14 Roland McGrath <roland@redhat.com>
1902 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1903 prologue_end marker scanning loop.
1905 2005-09-11 Roland McGrath <roland@redhat.com>
1907 * dwarf.h: Comment typo fix.
1909 2005-09-07 Roland McGrath <roland@redhat.com>
1911 * dwarf_entry_breakpoints.c: New file.
1912 * Makefile.am (libdw_a_SOURCES): Add it.
1913 * libdw.h: Declare dwarf_entry_breakpoints.
1915 * dwarf_entrypc.c: New file.
1916 * Makefile.am (libdw_a_SOURCES): Add it.
1917 * libdw.h: Declare dwarf_entrypc.
1918 * libdwP.h: Add INTDECL.
1920 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1922 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1923 (%.os): Use COMPILE.os.
1924 (COMPILE.os): Filter out gconv options.
1926 2005-08-27 Roland McGrath <roland@redhat.com>
1928 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1929 __libdw_visit_scopes.
1931 * dwarf_getscopes_die.c: New file.
1932 * Makefile.am (libdw_a_SOURCES): Add it.
1933 * libdw.h: Declare dwarf_getscopes_die.
1934 * libdw.map: Bump to 0.115 and add it.
1936 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1937 containing a DIE and its parent pointer, instead of just Dwarf_Die.
1938 Take two functions for both preorder and postorder visitors.
1939 * libdwP.h: Update decl.
1940 (struct Dwarf_Die_Chain): New type.
1941 * dwarf_func_inline.c: Update uses.
1943 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1945 * libdwP.h: Add INTDECL.
1946 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1948 2005-08-23 Roland McGrath <roland@redhat.com>
1950 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1951 DW_AT_specification the same as DW_AT_abstract_origin.
1953 2005-08-20 Roland McGrath <roland@redhat.com>
1955 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1956 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1957 and dwfl_report_offline.
1959 2005-08-19 Roland McGrath <roland@redhat.com>
1961 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
1962 Add dwfl_module_relocate_address, dwfl_module_relocations,
1963 dwfl_module_relocation_info.
1965 2005-08-18 Roland McGrath <roland@redhat.com>
1967 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
1968 outermost scope in the results.
1970 2005-08-15 Roland McGrath <roland@redhat.com>
1972 * dwarf_func_inline.c: New file.
1973 * Makefile.am (libdw_a_SOURCES): Add it.
1974 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
1975 * libdw.map: Add them.
1977 * dwarf_func_die.c: New file.
1978 * Makefile.am (libdw_a_SOURCES): Add it.
1979 * libdw.h: Declare dwarf_func_die.
1980 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
1982 2005-08-10 Ulrich Drepper <drepper@redhat.com>
1984 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
1985 of DW_LNS_set_epilog_begin.
1987 2005-08-09 Roland McGrath <roland@redhat.com>
1989 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
1991 * dwarf_end.c: Add INTDEF.
1992 * dwarf_error.c (dwarf_errmsg): Likewise.
1993 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
1995 2005-08-01 Roland McGrath <roland@redhat.com>
1997 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
1998 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2000 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2002 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2003 (libdw_a_LIBADD): Add all files from libdwfl.a.
2005 2005-07-27 Roland McGrath <roland@redhat.com>
2007 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2008 along with ../libebl/libebl.a and ../lib/libeu.a;
2009 depend on ../libelf/libelf.so.
2010 (libdw_so_LDADD): New variable.
2011 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2013 * libdw.map: Define an empty base version and move all symbols to
2014 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2016 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2018 * dwarf_error.c: Add internal alias for dwarf_errno.
2019 * libdwP.h: Declare __dwarf_errno_internal.
2020 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2022 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2025 2005-06-01 Roland McGrath <roland@redhat.com>
2027 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2028 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2030 2005-06-08 Roland McGrath <roland@redhat.com>
2032 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2033 (get_sleb128_step, get_sleb128): Likewise.
2034 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2035 * dwarf_getloclist.c (getloclist): Likewise.
2036 * dwarf_formblock.c (dwarf_formblock): Likewise.
2037 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2038 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2039 * dwarf_formref.c (dwarf_formref): Likewise.
2040 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2041 * dwarf_formudata.c (dwarf_formudata): Likewise.
2042 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2043 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2044 * dwarf_tag.c (dwarf_tag): Likewise.
2045 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2046 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2047 * libdw_form.c (__libdw_form_val_len): Likewise.
2048 * libdwP.h: Update decl.
2050 2005-06-04 Roland McGrath <roland@redhat.com>
2052 * memory-access.h (get_uleb128_rest_return): New macro.
2053 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2054 (get_sleb128_rest_return): New macro.
2055 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2056 * memory-access.c: New file.
2057 * Makefile.am (libdw_a_SOURCES): Add it.
2058 (DEFS): Add -DIS_LIBDW.
2060 2005-05-31 Roland McGrath <roland@redhat.com>
2062 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2065 2005-05-30 Roland McGrath <roland@redhat.com>
2067 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2068 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2070 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2071 BEGIN value. Instead, match base address entries separately for
2074 2005-05-28 Roland McGrath <roland@redhat.com>
2076 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2077 past location expression contents.
2079 2005-05-23 Roland McGrath <roland@redhat.com>
2081 * dwarf_getsrclines.c: Comment typo fix.
2083 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2084 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2086 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2088 * libdwP.h: Only use INTDECL for alias prototypes.
2090 2005-05-19 Roland McGrath <roland@redhat.com>
2092 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2094 * dwarf_getscopevar.c: New file.
2095 * Makefile.am (libdw_a_SOURCES): Add it.
2096 * libdw.h: Declare dwarf_getscopevar.
2098 * dwarf_getsrcfiles.c: Add INTDEF.
2099 * dwarf_haschildren.c: Likewise.
2100 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2102 * dwarf_getscopes.c: New file.
2103 * Makefile.am (libdw_a_SOURCES): Add it.
2104 * libdw.h: Declare dwarf_getscopes.
2105 * libdw.map: Add it.
2107 2005-05-18 Roland McGrath <roland@redhat.com>
2109 * libdwP.h (IDX_debug_ranges): New enum constant.
2110 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2111 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2112 * dwarf_error.c (errmsgs): Add it.
2113 * dwarf_haspc.c: New file.
2114 * libdw.h: Declare dwarf_haspc.
2115 * libdw.map: Add it.
2116 * libdwP.h: Add INTDECL.
2118 * dwarf_attr_integrate.c: New file.
2119 * dwarf_hasattr_integrate.c: New file.
2120 * Makefile.am (libdw_a_SOURCES): Add them.
2121 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2122 * libdw.map: Add them.
2124 * dwarf_hasattr.c: Add INTDEF.
2125 * libdwP.h: Add INTDECL for it.
2127 * dwarf_formref_die.c: New file.
2128 * Makefile.am (libdw_a_SOURCES): Add it.
2129 * libdw.h (dwarf_formref_die): Declare it.
2130 * libdwP.h (dwarf_formref_die): Add INTDECL.
2131 * libdw.map: Add it.
2133 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2135 (dwarf_getloclist): ... here. Call them.
2136 (dwarf_addrloclists): New function.
2137 * libdw.h: Declare it.
2138 * libdw.map: Add it.
2140 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2141 DW_MACINFO_end_file. Recognize type 0 as terminator.
2143 2005-05-05 Roland McGrath <roland@redhat.com>
2145 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2147 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2148 the line program does not produce all entries in ascending order.
2150 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2152 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2153 occurences (e.g., inlines) better.
2155 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2157 * libdw.h (DWARF_END_ABBREV): Define.
2158 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2160 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2162 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2163 as error of __libdw_getabbrev.
2165 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2167 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2169 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2170 results back to caller.
2172 2005-04-04 Roland McGrath <roland@redhat.com>
2174 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2176 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2179 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2181 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2183 * dwarf_getsrc_file.c: New file.
2184 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2185 * libdw.h: Declare dwarf_getsrc_file.
2186 * libdw.map: Add dwarf_getsrc_file.
2188 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2190 * dwarf_func_entrypc.c: New file.
2191 * dwarf_func_col.c: New file.
2192 * dwarf_func_line.c: New file.
2193 * dwarf_func_file.c: New file.
2194 * libdw.h: Add prototypes for new functions.
2195 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2197 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2198 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2199 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2200 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2201 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2202 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2204 * dwarf.h: Add some DWARF3 definitions.
2206 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2208 * dwarf_getfuncs.c: New file.
2209 * dwarf_func_highpc.c: New file.
2210 * dwarf_func_lowpc.c: New file.
2211 * dwarf_func_name.c: New file.
2212 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2213 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2214 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2215 and dwarf_func_name.
2216 * libdw.h: Add prototypes for new functions.
2217 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2218 * dwarf_siblingof.c: Likewise.
2219 * dwarf_dieoffset.c: Likewise.
2220 * dwarf_highpc.c: Likewise.
2221 * dwarf_lowpc.c: Likewise.
2222 * libdwP.h: Add prototypes for internal functions.
2223 Define Dwarf_Func_s structure.
2225 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2227 * libdw.h: Add padding in Dwarf_die.
2229 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2230 * dwarf_attr.c: Likewise.
2231 * dwarf_begin.c: Likewise.
2232 * dwarf_begin_elf.c: Likewise.
2233 * dwarf_bitoffset.c: Likewise.
2234 * dwarf_bitsize.c: Likewise.
2235 * dwarf_bytesize.c: Likewise.
2236 * dwarf_diename.c: Likewise.
2237 * dwarf_formaddr.c: Likewise.
2238 * dwarf_formblock.c: Likewise.
2239 * dwarf_formref.c: Likewise.
2240 * dwarf_formstring.c: Likewise.
2241 * dwarf_formudata.c: Likewise.
2242 * dwarf_getarange_addr.c: Likewise.
2243 * dwarf_getarangeinfo.c: Likewise.
2244 * dwarf_getaranges.c: Likewise.
2245 * dwarf_getloclist.c: Likewise.
2246 * dwarf_getmacros.c: Likewise.
2247 * dwarf_getsrc_die.c: Likewise.
2248 * dwarf_getsrcfiles.c: Likewise.
2249 * dwarf_getsrclines.c: Likewise.
2250 * dwarf_highpc.c: Likewise.
2251 * dwarf_lowpc.c: Likewise.
2252 * dwarf_nextcu.c: Likewise.
2253 * dwarf_offdie.c: Likewise.
2254 * dwarf_siblingof.c: Likewise.
2255 * dwarf_srclang.c: Likewise.
2256 * dwarf_tag.c: Likewise.
2257 * libdw_findcu.c: Likewise.
2258 * libdwP.h: Add prototypes for internal functions.
2260 * dwarf_addrdie.c: New file.
2261 * dwarf_macro_opcode.c: New file.
2262 * dwarf_macro_param1.c: New file.
2263 * dwarf_macro_param2.c: New file.
2264 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2265 * libdwP.h: Remove Dwarf_Macro definition.
2266 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2267 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2268 * libdw.map: Add entries for new functions.
2270 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2272 * libdw.h: Handle broken gcc < 4.
2274 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2276 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2278 * dwarf_begin_elf.c: Fix warnings.
2279 * dwarf_dieoffset.c: Likewise.
2280 * dwarf_end.c: Likewise.
2281 * dwarf_error.c: Likewise.
2282 * dwarf_getpubnames.c: Likewise.
2284 * libdwP.h: Add new error values.
2285 * dwarf_error.c: Support new error values.
2286 * dwarf_getpubnames.c: Check parameter value.
2288 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2290 * Makefile.am: Check for text relocations in constructed DSO.
2292 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2294 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2296 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2297 checks to not read over buffer boundaries for ill-formed DWARF data.
2299 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2301 * dwarf_child.c: Make compile with gcc 4.0.
2302 * dwarf_error.c: Likewise.
2303 * dwarf_formblock.c: Likewise.
2304 * dwarf_getabbrev.c: Likewise.
2305 * dwarf_getattrs.c: Likewise.
2306 * dwarf_getsrclines.c: Likewise.
2307 * dwarf_tag.c: Likewise.
2308 * libdw_form.c: Likewise.
2310 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2312 * Makefile.am: Support building with mudflap.
2314 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2315 * dwarf_getsrclines.c: Likewise.
2316 * dwarf_memory-access.h: Likewise.
2318 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2320 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2322 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2323 Third parameter of dwarf_getsrcfiles can be NULL.
2325 * libdw.map: Add dwarf_getmacros.
2326 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2327 * dwarf_getmacros.c: New file.
2329 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2331 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2333 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2335 * dwarf_getsrclines.c:
2336 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2338 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2340 * libdwP.h (_): Use elfutils domain.
2342 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2344 * dwarf_getsrclines.c: Fix typo in comment.
2346 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2348 * Makefile.am: Support building with mudflap.
2350 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2352 * memory-access.h: Add lots of const in case a pointer passed is const.
2354 * dwarf_formflag.c: New file.
2355 * dwarf_getattrs.c: New file.
2356 * dwarf_error.c: Add new error value.
2357 * libdw.h: Add prototypes for new functions. Adjust prototype for
2359 * libdw.map: Add new functions.
2360 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2362 * libdwP.h: Add new error value.
2363 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2366 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2368 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2370 * dwarf_getarange_addr.c: New file
2371 * dwarf_getarangeinfo.c: New file.
2372 * dwarf_getaranges.c: New file.
2373 * dwarf_onerange.c: New file.
2374 * libdw.h: Declare new functions. Define Dwarf_Arange and
2376 * libdw.map: Add new functions.
2377 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2378 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2379 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2380 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2381 * dwarf_error.c: Add new message.
2383 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2385 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2386 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2387 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2388 * dwarf_error.c: Add another message.
2389 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2391 * dwarf_filesrc.c: Likewise.
2392 * dwarf_getsrcfiles.c: Likewise.
2393 * dwarf_getsrclines.c: Likewise.
2394 * dwarf_lineaddr.c: New file.
2395 * dwarf_linebeginstatement.c: New file.
2396 * dwarf_lineblock.c: New file.
2397 * dwarf_linecol.c: New file.
2398 * dwarf_lineendsequence.c: New file.
2399 * dwarf_lineepiloguebegin.c: New file.
2400 * dwarf_lineno.c: New file.
2401 * dwarf_lineprologueend.c: New file.
2402 * dwarf_onesrcline.c: New file.
2403 * dwarf_lineno.c: Change interface to store result in object pointed
2404 to by second parameter.
2405 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2406 prototype. Define Dwarf_Files and Dwarf_Lines.
2407 * libdw.map: Add new functions.
2408 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2409 * libdw_findcu.c: Don't initialize nlines field.
2411 * dwarf_siblingof: Little optimization.
2413 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2414 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2415 * libdwP.h (struct Dwarf): Add free_elf field.
2417 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2419 * dwarf_getstring.c: New file.
2420 * dwarf_offabbrev.c: New file.
2421 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2422 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2423 parameters. Don't allocate memory if not necessary and don't lookup
2424 previous results if no CU given.
2425 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2426 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2427 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2428 * libdwP.h: Change prototype for __libdw_getabbrev.
2430 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2431 returning if this is wanted.
2433 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2435 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2436 with offset_size value.
2437 * libdw.h: Adjust dwarf_nextcu prototype.
2438 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2439 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2440 member of new CU struct.
2441 * dwarf_formstring.c: Depend on offset_size not address_size for
2442 DW_FORM_strp handling.
2443 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2445 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2447 (dwarf_tag): Correctly recognize failed lookup.
2449 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2451 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2452 * dwarf_formblock.c: New file.
2453 * dwarf_getloclist.c: Rewrite to handle a single block.
2454 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2455 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2456 dwarf_getloclistent declaration.
2457 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2458 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2459 Add locs member to struct Dwarf_CU.
2460 * libdw_fundcu.c: Initialize locs member of new CU.
2461 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2462 Remove dwarf_getloclistent.c.
2464 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2466 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2467 * libdwP.h: Likewise.
2469 * dwarf_getloclist.c: New file.
2470 * dwarf_getloclistent.c: New file.
2471 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2472 Declare dwarf_getloclistent and dwarf_getloclist.
2473 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2474 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2475 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2478 * dwarf_error.c: More error messages.
2480 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2482 * dwarf_getsrclines.c: Remove debugging support.
2484 * dwarf_getsrcfiles.c: New file.
2485 * dwarf_filesrc.c: New file.
2486 * libdw.h: Declare these functions. Define Dwarf_File.
2487 * libdwP.c: Adjust Dwarf_File_s definition.
2488 * libdw.map: Add these functions.
2489 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2491 * dwarf_getsrclines.c: Initialize cu->files.
2493 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2495 * libdw.h: Add more nonnull function attributes.
2497 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2498 * dwarf_end.c (cu_free): New function.
2499 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2500 * dwarf_error.c (errmsgs): Add new messages.
2501 * dwarf_getsrc_die.c: New file.
2502 * dwarf_getsrclines.c: New file.
2503 * dwarf_lineno.c: New file.
2504 * dwarf_linesrc.c: New file.
2505 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2506 instead of the *_inc-less variants.
2507 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2508 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2509 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2511 * libdwP.h: Add more error codes.
2512 (struct Dwarf): Remove mem_tail.next member.
2513 (Dwarf_File): Define type.
2514 (struct Dwarf_Line_s): Define type.
2515 (struct Dwarf_CU): Add lines and nlines members.
2516 (libdw_alloc): Define local variable _tail and use it.
2517 Add some function attributes.
2518 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2519 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2520 * memory-access.h: Add unlikely for the endian conversion paths.
2521 * Makefile.am (AM_CFLAGS): Add -std parameter.
2522 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2523 dwarf_lineno, and dwarf_linesrc.
2525 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2527 * Moved to CVS archive.