1 2015-09-09 Chih-Hung Hsieh <chh@google.com>
3 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
4 redundant NULL tests on parameters declared with __nonnull_attribute__.
5 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
6 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
8 2015-09-04 Chih-Hung Hsieh <chh@google.com>
9 Mark Wielaard <mjw@redhat.com>
11 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
12 definition with ansi-C definition and add const qualifier to
15 2015-09-04 Chih-Hung Hsieh <chh@google.com>
17 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
18 definition with ansi-C definitions.
19 (__libdw_findcu): Likewise.
21 2015-08-25 Mark Wielaard <mjw@redhat.com>
23 * dwarf.h: Add DW_LANG_Haskell.
25 2015-06-18 Mark Wielaard <mjw@redhat.com>
27 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
30 2015-06-18 Mark Wielaard <mjw@redhat.com>
32 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
34 2015-06-18 Mark Wielaard <mjw@redhat.com>
36 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
37 dwarf_formudata reports an error.
38 (get_table_for_offset): Likewise.
40 2015-06-08 Mark Wielaard <mjw@redhat.com>
42 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
44 2015-06-06 Mark Wielaard <mjw@redhat.com>
46 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
48 2015-05-27 Mark Wielaard <mjw@redhat.com>
50 * encoded-value.h (read_encoded_value): Check data d_size contains
51 at least enough data to hold a pointer for DW_EH_PE_indirect.
53 2015-05-22 Mark Wielaard <mjw@redhat.com>
55 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
56 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
57 MAX_STACK_DIRS. Calculate number of dirs needed first, then
58 create dirarray directly, without needing the next field. Free
59 not stack allocated lines and files at the end.
61 2015-05-19 Mark Wielaard <mjw@redhat.com>
63 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
64 allocated array to hold locs. Allocate locs bigger than the array
65 with malloc and free them when done.
67 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
69 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
70 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
71 * dwarf_begin_elf.c (inflate_section): New static function, lifted
73 (check_section): ... here. Call inflate_section, set libdw errno to
74 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
76 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
78 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
79 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
81 2015-05-06 Mark Wielaard <mjw@redhat.com>
83 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
84 check the line number.
86 2015-05-05 Mark Wielaard <mjw@redhat.com>
88 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
89 left before reading values.
91 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
93 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
96 2015-04-22 Mark Wielaard <mjw@redhat.com>
98 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
99 (__libdw_max_len_uleb128): New function.
100 (__libdw_max_len_sleb128): Likewise.
101 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
102 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
104 2015-04-21 Mark Wielaard <mjw@redhat.com>
106 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
107 when there are more than 8.
109 2015-04-01 Petr Machata <pmachata@redhat.com>
111 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
112 (is_cudie): New function.
113 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
114 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
115 of white-listing valid tags.
116 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
118 2015-03-18 Petr Machata <pmachata@redhat.com>
120 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
121 (EXTRA_DIST): Remove known-dwarf.h.
123 2015-02-09 Mark Wielaard <mjw@redhat.com>
125 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
126 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
127 for new Fortran language codes is 1.
129 2015-02-09 Mark Wielaard <mjw@redhat.com>
131 * dwarf.h: Add DW_TAG_atomic_type.
132 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
133 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
135 2015-02-11 Josh Stone <jistone@redhat.com>
137 * encoded-value.h (read_encoded_value): Initialize value.
139 2015-02-11 Petr Machata <pmachata@redhat.com>
141 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
142 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
143 the fact in *BASEP and bail out later if it hasn't been updated by
144 __libdw_read_begin_end_pair_inc.
146 2014-12-24 Mark Wielaard <mjw@redhat.com>
148 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
149 smaller than or equal to addr, rather than returning immediately on
152 2015-01-07 Mark Wielaard <mjw@redhat.com>
154 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
155 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
156 room in the search table for all entries. Store search_table_len.
157 (getcfi_scn_eh_frame): Likewise.
158 * encoded-value.h (encoded_value_size): Don't abort, return zero.
159 (__libdw_cfi_read_address_inc): Check there is enough room to read
160 values. Pass other byte order to read functions.
161 (read_encoded_value): Check encoded_value_size. Don't abort, but
162 set libdw errno and report failure. Check there is enough room to
164 * fde.c (binary_search_fde): Check encoded value size. Add hdr
165 data buf and size to dummy_cfi.
167 2015-01-04 Mark Wielaard <mjw@redhat.com>
169 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
170 is after current DIE.
172 2015-01-04 Mark Wielaard <mjw@redhat.com>
174 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
175 (dwarf_frame_register).
177 2015-01-02 Mark Wielaard <mjw@redhat.com>
179 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
180 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
181 (getcfi_scn_eh_frame): Check d_buf is not NULL.
183 2015-01-02 Mark Wielaard <mjw@redhat.com>
185 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
186 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
187 DW_OP_addr if dbg is NULL then read argument directly.
189 2015-01-14 Jason P. Leasure <jpleasu@super.org>
191 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
194 2014-12-27 Mark Wielaard <mjw@redhat.com>
196 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
197 still falls inside CU data.
199 2015-01-11 Mark Wielaard <mjw@redhat.com>
201 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
202 __libdw_visit_scopes with NULL imports.
203 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
204 * dwarf_getscopes.c (pc_record): Likewise.
205 (dwarf_getscopes): Likewise.
206 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
207 * libdwP.h (__libdw_visit_scopes): Add imports argument.
208 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
209 function imports_contains. Push and pop imports around walk_children
210 when processing DW_TAG_imported_unit.
212 2014-12-18 Ulrich Drepper <drepper@gmail.com>
214 * Makefile.am: Suppress output of textrel_check command.
216 2014-12-16 Mark Wielaard <mjw@redhat.com>
218 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
221 2014-12-16 Mark Wielaard <mjw@redhat.com>
223 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
224 space to read die offset.
226 2014-12-16 Mark Wielaard <mjw@redhat.com>
228 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
231 2014-12-15 Mark Wielaard <mjw@redhat.com>
233 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
234 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
235 (dwarf_getpubnames): Make sure section data contains string zero
238 2014-12-16 Mark Wielaard <mjw@redhat.com>
240 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
241 the compiler optimize for the common single-byte case.
243 2014-12-15 Josh Stone <jistone@redhat.com>
245 * memory-access.h (__libdw_max_len_leb128): New.
246 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
247 (__libdw_get_sleb128): Likewise.
249 2014-12-14 Mark Wielaard <mjw@redhat.com>
251 * cfi.c (execute_cfi): Add program bounds checks.
252 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
253 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
254 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
255 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
256 * dwarf_formudata.c (dwarf_formudata): Likewise.
257 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
258 with end of data buf.
259 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
260 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
261 call gets enough data.
262 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
263 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
265 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
267 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
268 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
269 get_uleb128 with lineendp.
270 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
271 get_uleb128 with endp.
272 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
273 get_uleb128/get_sleb128 with limit.
274 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
275 get_sleb128 get called with enough data.
276 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
277 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
278 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
280 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
281 Don't call get_uleb128_step if out of data.
282 (__libdw_get_sleb128): Likewise for get_sleb128_step.
284 2014-12-12 Mark Wielaard <mjw@redhat.com>
286 * libdwP.h (struct Dwarf): Add fake_loc_cu.
288 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
289 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
290 (__libdw_form_val_len): Likewise.
291 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
292 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
293 the already found data buffer directly.
294 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
295 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
296 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
298 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
299 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
300 * dwarf_getlocation_attr.c (attr_form_cu): New function.
301 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
302 (getlocation): Handle empty blocks immediately.
303 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
304 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
305 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
307 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
308 fake_cu. Call __libdw_form_val_len with just fake_cu.
309 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
310 datap and size directly from cu startp and endp.
312 2014-12-11 Mark Wielaard <mjw@redhat.com>
314 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
316 2014-12-13 Mark Wielaard <mjw@redhat.com>
318 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
319 difference doesn't wrap around before returning as int.
321 2014-12-11 Josh Stone <jistone@redhat.com>
323 * dwarf_getsrclines.c (struct linelist): Add sequence.
324 (compare_lines): Take linelists, and break ties by sequence.
325 (read_srclines): Use linelists for sorting.
326 (read_srclines::add_new_line): Set sequence.
328 2014-12-10 Josh Stone <jistone@redhat.com>
330 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
331 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
332 * dwarf_child.c (dwarf_child): Use cu->endp.
333 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
334 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
335 * dwarf_siblingof.c (dwarf_siblingof): Use both.
337 2014-12-10 Josh Stone <jistone@redhat.com>
339 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
341 2014-12-10 Josh Stone <jistone@redhat.com>
343 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
344 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
345 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
346 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
347 * dwarf_tag.c (dwarf_tag): Likewise.
349 2014-12-04 Mark Wielaard <mjw@redhat.com>
351 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
352 (__libdw_form_val_len): Likewise and check len doesn't overflow.
353 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
354 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
356 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
357 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
359 2014-12-02 Petr Machata <pmachata@redhat.com>
361 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
363 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
364 * libdw.h (DWARF_GETMACROS_START): New macro.
366 2014-11-27 Mark Wielaard <mjw@redhat.com>
368 * Makefile.am (libdw.so): Use textrel_check.
370 2014-11-27 Mark Wielaard <mjw@redhat.com>
372 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
373 search_table_entries and search_table_encoding.
375 2014-11-24 Mark Wielaard <mjw@redhat.com>
377 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
380 2014-11-23 Mark Wielaard <mjw@redhat.com>
382 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
383 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
384 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
386 2014-11-23 Mark Wielaard <mjw@redhat.com>
388 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
389 Set libdw errno and return NULL.
391 2014-11-24 Mark Wielaard <mjw@redhat.com>
393 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
394 (DW_LANG_C11): Likewise.
395 (DW_LANG_C_plus_plus_14): Likewise.
396 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
397 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
399 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
402 2014-11-26 Mark Wielaard <mjw@redhat.com>
404 * dwarf.h (DW_AT_noreturn): Added.
406 2014-11-11 Mark Wielaard <mjw@redhat.com>
408 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
409 explicitly as uint8_t.
410 (__libdw_getsrclines): Add internal_function to declaration.
412 2014-09-10 Petr Machata <pmachata@redhat.com>
414 * dwarf_macro_getparamcnt.c: New file.
415 * dwarf_macro_param.c: New file.
416 * dwarf_macro_getsrcfiles.c: New file.
417 * Makefile.am (libdw_a_SOURCES): Add the new files.
418 * libdwP.h (struct files_lines_s): New structure.
419 (DWARF_E_INVALID_OPCODE): New enumerator.
420 (struct Dwarf): New fields macro_ops, files_lines.
421 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
422 keeping macro opcode prototypes in.
423 (Dwarf_Macro_s): Redefine from scratch.
424 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
426 * dwarf_error.c (errmsgs): Add a message for
427 DWARF_E_INVALID_OPCODE.
428 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
430 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
431 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
433 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
434 (get_offset_from, macro_op_compare, build_table)
435 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
436 (cache_op_table, read_macros, gnu_macros_getmacros_off)
437 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
439 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
440 * dwarf_getsrclines.c (read_srclines): New function with guts
441 taken from dwarf_getsrclines.
442 (__libdw_getsrclines): Likewise.
443 (__libdw_getcompdir, files_lines_compare): New functions.
444 (dwarf_getsrclines): Make it dispatch to the new interfaces.
445 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
447 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
448 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
449 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
451 2014-10-06 Mark Wielaard <mjw@redhat.com>
453 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
454 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
455 (aggregate_size): Likewise. Add old and new version.
456 * dwarf_peel_type.c: New file.
457 * libdw.h (dwarf_peel_type): New function declaration.
458 * libdwP.h (dwarf_peel_type): New internal declaration.
459 * libdw.map (ELFUTILS_0.161): New section.
461 2014-10-15 Petr Machata <pmachata@redhat.com>
463 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
464 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
466 2014-10-05 Mark Wielaard <mjw@redhat.com>
468 * dwarf.h: Add DW_AT_GNU_deleted.
470 2014-10-02 Mark Wielaard <mjw@redhat.com>
472 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
473 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
474 DW_TAG_rvalue_reference_type.
476 2014-09-12 Petr Machata <pmachata@redhat.com>
478 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
479 8-byte quantities. Consequently, rename to...
480 (read_addr_unaligned_inc): ... this.
481 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
482 (read_sbyte_unaligned): Drop.
484 2014-09-10 Petr Machata <pmachata@redhat.com>
486 * dwarf_getlocation.c (attr_ok): Also accept
487 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
488 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
490 2014-08-15 Mark Wielaard <mjw@redhat.com>
492 * dwarf_cu_die.c: New file.
493 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
494 * libdw.h (dwarf_cu_die): New function declaration.
495 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
497 2014-08-15 Mark Wielaard <mjw@redhat.com>
499 * dwarf_cu_getdwarf.c: New file.
500 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
501 * libdw.h (Dwarf_CU): New typedef.
502 (dwarf_cu_getdwarf): New function declaration.
503 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
505 2014-06-18 Mark Wielaard <mjw@redhat.com>
507 * dwarf.h: Remove DW_TAG_mutable_type.
509 2014-05-02 Mark Wielaard <mjw@redhat.com>
511 * libdwP.h (__check_build_id): Removed now unused.
513 2014-05-01 Mark Wielaard <mjw@redhat.com>
515 * libdwP.h (struct Dwarf): Remove free_alt.
516 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
517 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
519 2014-04-30 Mark Wielaard <mjw@redhat.com>
521 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
523 2014-04-15 Florian Weimer <fweimer@redhat.com>
525 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
526 (open_debugaltlink): Move to libdwfl.
527 (check_section): Do not locate alternate debuginfo.
529 2014-04-24 Florian Weimer <fweimer@redhat.com>
531 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
533 2014-04-22 Florian Weimer <fweimer@redhat.com>
535 * dwarf_getalt.c, dwarf_setalt.c: New files.
536 * Makefile.am (libdw_a_SOURCES): Add them.
537 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
538 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
540 * libdw.map (ELFUTILS_0.159): Export the two new functions.
542 2014-04-15 Florian Weimer <fweimer@redhat.com>
544 * libdwP.h (enum IDX_gnu_debugaltlink): New.
545 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
547 (check_section): Obtain .gnu_debugaltlink section from the
550 2014-04-11 Mark Wielaard <mjw@redhat.com>
552 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
553 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
554 (libdwelf_objects): New variable.
555 (libdw_a_LIBADD): Add libdwelf objects.
557 2014-04-22 Mark Wielaard <mjw@redhat.com>
559 * memory-access.h (get_sleb128_step): Remove undefined behavior
560 of left shifting a signed value. Replace it with a multiplication.
562 2014-04-13 Mark Wielaard <mjw@redhat.com>
564 * Makefile.am: Remove !MUDFLAP conditions.
566 2014-04-09 Mark Wielaard <mjw@redhat.com>
568 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
569 before calling malloc to uncompress data.
571 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
573 Fix abort() on missing section headers.
574 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
575 New label err to return NULL.
577 2014-02-05 Josh Stone <jistone@redhat.com>
579 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
580 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
581 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
583 2013-12-30 Mark Wielaard <mjw@redhat.com>
585 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
586 dwfl_linux_proc_attach.
588 2013-12-20 Mark Wielaard <mjw@redhat.com>
590 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
592 2013-12-18 Mark Wielaard <mjw@redhat.com>
594 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
595 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
596 dwfl_module_getsym_info.
598 2013-12-16 Mark Wielaard <mjw@redhat.com>
600 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
602 2013-12-10 Josh Stone <jistone@redhat.com>
604 * memory-access.h (get_uleb128_rest_return): Removed.
605 (get_sleb128_rest_return): Removed.
606 (get_uleb128_step): Make this a self-contained block.
607 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
608 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
609 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
610 (__libdw_get_uleb128): Simplify and inline for all callers.
611 (__libdw_get_sleb128): Ditto.
612 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
613 * memory-access.c: Delete file.
614 * Makefile.am (libdw_a_SOURCES): Remove it.
615 (DEFS): Remove the now unused -DIS_LIBDW.
617 2013-12-09 Josh Stone <jistone@redhat.com>
619 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
620 __libdw_form_val_len, now handling only non-constant form lengths.
621 * libdwP.h (__libdw_form_val_len): New inlined function.
623 2013-12-09 Mark Wielaard <mjw@redhat.com>
625 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
626 location expressions.
627 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
628 location found, return empty location expression.
629 * dwarf_getlocation_implicit_pointer.c
630 (dwarf_getlocation_implicit_pointer): Likewise.
631 (__libdw_empty_loc_attr): New internal function.
632 * libdwP.h (__libdw_empty_loc_attr): Define.
634 2013-11-27 Mark Wielaard <mjw@redhat.com>
636 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
637 dwfl_module_getsym_elf.
639 2013-11-26 Mark Wielaard <mjw@redhat.com>
641 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
642 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
643 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
644 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
645 (ELFUTILS_0.158): ... here.
647 2013-11-09 Mark Wielaard <mjw@redhat.com>
649 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
650 check that it is zero.
652 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
654 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
655 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
656 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
657 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
658 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
660 2013-11-01 Michael Forney <mforney@mforney.org>
662 * Makefile.am (libdwfl_objects): New definition.
663 (libdw_a_LIBADD): Use libdwfl_objects.
665 2013-11-01 Michael Forney <mforney@mforney.org>
667 * Makefile.am: Use READELF.
669 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
671 * libdw.map (ELFUTILS_0.158): New.
673 2013-10-10 Mark Wielaard <mjw@redhat.com>
675 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
676 start_addr and rename last_offset to last_addr. Now both void *.
677 (tree_visitor): Use start_add and die_addr instead of start_offset
679 (dwarf_getfuncs): Use last_addr instead of last_offset.
681 2013-10-06 Mark Wielaard <mjw@redhat.com>
683 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
684 DW_CFA_val_expression are not used with abi_cfi.
686 2013-10-03 Josh Stone <jistone@redhat.com>
688 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
689 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
690 a unit, make sure to always hash the sig8 here, so none are missed.
692 2013-09-29 Mark Wielaard <mjw@redhat.com>
694 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
695 uintptr_t before casting to char *.
696 (__libdw_intern_expression): Cast data to uintptr_t before casting
698 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
699 op->number2 to uintptr_t before casting to char *.
701 2013-09-24 Josh Stone <jistone@redhat.com>
703 * libdw_visit_scopes.c (classify_die): Removed.
704 (may_have_scopes): New function to replace classify_die. There's no
705 need for full classification; just find tags that may contain scopes.
706 (__libdw_visit_scopes): Use a direct tag comparison for imported
707 units, and use may_have_scopes to test if recursion is needed.
709 2013-09-20 Mark Wielaard <mjw@redhat.com>
711 * dwarf_getfuncs.c (visitor_info): New struct.
712 (tree_visitor): New function.
713 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
714 * libdw.h (dwarf_getfuncs): Expand function documentation.
716 2013-09-12 Mark Wielaard <mjw@redhat.com>
718 * fde.c (intern_fde): Free fde and set libdw errno when start
719 or end could not be read.
721 2013-08-24 Mark Wielaard <mjw@redhat.com>
723 * dwarf_getlocation.c (store_implicit_value): Don't take data
724 as argument, get block data from op number2. Return false when
725 block data length and op number don't match up.
726 (__libdw_intern_expression): Store start of block for
727 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
728 relative data offset. Also store block start (including length)
729 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
730 * dwarf_getlocation_attr.c: New file.
731 * dwarf_getlocation_die.c: Likewise.
732 * libdw.h (dwarf_getlocation_die): New function definition.
733 (dwarf_getlocation_attr): Likewise.
734 * libdwP.h: Declare internal dwarf_getlocation_die.
735 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
736 dwarf_getlocation_attr.
737 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
738 dwarf_getlocation_attr.c.
740 2013-08-23 Mark Wielaard <mjw@redhat.com>
742 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
743 (attr_base_address): New function.
744 (initial_offset_base): New function.
745 (getlocations_addr): New function. Taken from...
746 (dwarf_getlocation_addr): here. Use new initial_offset_base and
748 (dwarf_getlocations): New function.
749 * libdw.h (dwarf_getlocations): New function definition.
750 * libdw.map (ELFUTILS_0.157): New.
752 2013-07-02 Mark Wielaard <mjw@redhat.com>
754 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
755 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
756 NEW_LINE macro. Free malloced line records if any at the end.
758 2013-07-02 Mark Wielaard <mjw@redhat.com>
760 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
762 2013-06-26 Mark Wielaard <mjw@redhat.com>
764 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
765 DIEs without children. Return an error whenever dwarf_child or
766 dwarf_siblingof return an error. Don't call recurse and increase
767 the depth for an imported unit. Walk the children of an imported
768 unit as if they are logical children of the parent root DIE.
770 2013-05-03 Mark Wielaard <mjw@redhat.com>
772 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
775 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
777 * libdw.map (ELFUTILS_0.156): New.
779 2013-04-24 Mark Wielaard <mjw@redhat.com>
781 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
783 2013-04-10 Mark Wielaard <mjw@redhat.com>
785 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
786 equal to address size when we have a DW_FORM_ref_addr for DWARF
789 2013-03-25 Mark Wielaard <mjw@redhat.com>
791 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
794 2013-03-12 Mark Wielaard <mjw@redhat.com>
796 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
797 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
799 2013-02-15 Mark Wielaard <mjw@redhat.com>
801 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
802 not dbg->sectiondata.
804 2013-01-07 Roland McGrath <roland@hack.frob.com>
807 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
808 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
810 2012-12-18 Mark Wielaard <mjw@redhat.com>
812 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
813 (check_section): Likewise on error.
814 (scngrp_read): Likewise.
815 (dwarf_begin_elf): Likewise.
817 2012-10-09 Petr Machata <pmachata@redhat.com>
819 * dwarf_getlocation.c (__libdw_intern_expression): Handle
820 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
821 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
822 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
824 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
826 * cfi.c: New include system.h.
827 (execute_cfi) (enough_registers): Clear new memory after realloc.
829 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
831 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
832 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
835 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
837 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
838 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
839 Remove the later DW_OP_call_frame_cfa push to RESULT.
841 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
844 * fde.c (binary_search_fde): Remove always true <address >= start>
845 conditional. Move L initialization upwards.
847 2012-08-24 Mark Wielaard <mjw@redhat.com>
849 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
850 when ENABLE_DWZ is defined.
851 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
854 2012-08-16 Mark Wielaard <mjw@redhat.com>
856 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
857 * dwarf.h (DW_LANG_Go): Update comment.
858 (DW_LANG_Mips_Assembler): Likewise.
860 2012-06-27 Mark Wielaard <mjw@redhat.com>
862 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
863 * dwarf_begin.c (dwarf_begin): Add INTDEF.
864 * dwarf_begin_elf.c (__check_build_id): New internal_function.
865 (try_debugaltlink): New function.
866 (open_debugaltlink): Likewise.
867 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
868 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
870 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
871 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
873 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
874 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
875 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
877 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
878 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
879 (struct Dwarf): Add alt_dwarf and free_alt fields.
880 (__libdw_read_offset): Add dbg_ret argument, use to check with
881 __libdw_offset_in_section.
882 (__check_build_id): New function declaration.
883 (dwarf_begin): Define as INTDECL.
884 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
885 and DW_FORM_GNU_strp_alt.
887 2012-07-19 Mark Wielaard <mjw@redhat.com>
889 * dwarf.h: Add DW_OP_GNU_parameter_ref.
891 2012-07-24 Mark Wielaard <mjw@redhat.com>
893 * dwarf.h: Correct spelling of DW_LANG_ObjC.
894 * dwarf_aggregate_size.c (array_size): Use correct spelling of
897 2012-07-24 Mark Wielaard <mjw@redhat.com>
899 * dwarf.h: Add DW_ATE_UTF.
901 2012-06-27 Mark Wielaard <mjw@redhat.com>
903 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
905 2012-06-26 Mark Wielaard <mjw@redhat.com>
907 * libdwP.h: Add IDX_debug_macro.
908 * dwarf.h: Add DW_AT_GNU_macros.
909 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
910 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
912 2012-04-27 Mark Wielaard <mjw@redhat.com>
914 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
915 a constant offset from DW_AT_low_pc.
917 2012-03-19 Tom Tromey <tromey@redhat.com>
919 * libdw_findcu.c (findcu_cb): Move earlier.
920 (__libdw_intern_next_unit): Add new CU to search tree here...
921 (__libdw_findcu): ... not here.
923 2012-01-31 Mark Wielaard <mjw@redhat.com>
925 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
927 2011-11-31 Mark Wielaard <mjw@redhat.com>
929 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
931 2011-07-14 Mark Wielaard <mjw@redhat.com>
933 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
935 2011-05-16 Jakub Jelinek <jakub@redhat.com>
937 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
938 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
941 2011-04-26 Mark Wielaard <mjw@redhat.com>
943 * dwarf_child (dwarf_child): Sanity check end of section against
944 cu_data () of die->cu.
946 2011-03-22 Mark Wielaard <mjw@redhat.com>
948 * dwarf.h: Add DW_TAG_GNU_call_site,
949 DW_TAG_GNU_call_site_parameter,
950 DW_AT_GNU_call_site_value,
951 DW_AT_GNU_call_site_data_value,
952 DW_AT_GNU_call_site_target,
953 DW_AT_GNU_call_site_target_clobbered,
955 DW_AT_GNU_all_tail_call_sites,
956 DW_AT_GNU_all_call_sites,
957 DW_AT_GNU_all_source_call_sites,
958 and DW_OP_GNU_entry_value.
960 2011-03-10 Petr Machata <pmachata@redhat.com>
962 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
963 abbreviation with code 0.
965 2011-03-09 Petr Machata <pmachata@redhat.com>
967 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
969 2011-02-23 Roland McGrath <roland@redhat.com>
971 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
972 Declare __libdw_free_zdata.
973 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
974 (dwarf_end): Call it.
976 * dwarf_begin_elf.c (valid_p): Likewise.
977 (check_section, scngrp_read): Likewise.
978 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
980 2010-10-13 Roland McGrath <roland@redhat.com>
982 * dwarf.h: Add DW_LANG_Go.
984 2010-10-05 Roland McGrath <roland@redhat.com>
986 * dwarf_getaranges.c: Use malloc rather than alloca,
987 since the total number of elements can be quite huge.
989 2010-07-26 Roland McGrath <roland@redhat.com>
991 * dwarf_getlocation_implicit_pointer.c: New file.
992 * Makefile.am (libdw_a_SOURCES): Add it.
993 * libdw.map (ELFUTILS_0.149): New set.
994 Add dwarf_getlocation_implicit_pointer.
995 * libdw.h: Declare it.
997 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
998 (dwarf_offdie, dwarf_offdie_types): Update callers.
999 * libdwP.h: Declare it.
1001 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1002 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1004 2010-08-24 Roland McGrath <roland@redhat.com>
1006 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1008 2010-07-27 Roland McGrath <roland@redhat.com>
1010 * dwarf_formref_die.c: Fix sig8 hash insertion.
1012 2010-06-23 Roland McGrath <roland@redhat.com>
1014 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1015 * libdw.h: Remove it.
1016 * libdw.map: Likewise.
1018 2010-06-22 Roland McGrath <roland@redhat.com>
1020 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1022 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1025 2010-06-21 Roland McGrath <roland@redhat.com>
1027 * dwarf.h: Add DW_TAG_GNU_* constants.
1029 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1032 2010-06-20 Roland McGrath <roland@redhat.com>
1034 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1035 to search TUs instead of CUs.
1036 * libdwP.h: Update decl.
1037 (struct Dwarf): New member tu_tree.
1038 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1039 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1040 (dwarf_offdie): ... here.
1041 (dwarf_offdie_types): New function.
1042 * libdw.h: Declare it.
1043 * libdw.map (ELFUTILS_0.148): Add it.
1045 * libdwP.h (CUDIE): Use cu_data.
1046 * dwarf_formblock.c: Likewise.
1047 * dwarf_formref_die.c: Likewise.
1048 * dwarf_diecu.c: Use CUDIE macro.
1049 * dwarf_formaddr.c: Use cu_sec_idx.
1051 2010-06-16 Roland McGrath <roland@redhat.com>
1053 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1054 we don't repeat a CU lookup we've already done. Handle
1055 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1057 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1059 (__libdw_findcu): ... here. Call it.
1060 * libdwP.h: Declare it.
1061 (struct Dwarf): New member next_tu_offset.
1063 * dwarf_sig8_hash.c: New file.
1064 * dwarf_sig8_hash.h: New file.
1065 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1066 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1068 * libdwP.h (struct Dwarf): New member sig8_hash.
1069 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1070 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1072 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1073 (dwarf_nextcu): ... here. Call it.
1074 * libdw.h: Declare it.
1075 * libdwP.h: Add INTDECL.
1076 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1077 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1079 * libdwP.h (cu_sec_idx, cu_data): New functions.
1080 Use .debug_types when CU is a TU.
1081 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1082 * dwarf_siblingof.c: Likewise.
1083 * dwarf_formstring.c: Likewise.
1084 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1085 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1086 (dwarf_getlocation_addr): Likewise.
1088 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1089 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1090 .debug_types header size instead of .debug_info header size.
1092 * dwarf_diecu.c: Update caller.
1093 * dwarf_getaranges.c: Likewise.
1094 * dwarf_nextcu.c: Likewise.
1095 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1097 * fde.c (fde_by_offset): Renamed to ...
1098 (__libdw_fde_by_offset): ... this, made global and internal_function.
1099 Don't take ADDRESS argument.
1100 (__libdw_find_fde): Update caller. Do address sanity check here.
1101 * cfi.h: Declare __libdw_fde_by_offset.
1102 * cfi.c (dwarf_cfi_validate_fde): New function.
1103 * libdw.h: Declare it.
1104 * libdw.map (ELFUTILS_0.148): Add it.
1106 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1107 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1109 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1110 Don't assume DW_EH_PE_aligned refers to native address size.
1112 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1115 2010-06-17 Roland McGrath <roland@redhat.com>
1117 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1119 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1120 into an inner inline function. Set new fields. Check all fields for
1121 overflow when setting.
1122 * dwarf_lineisa.c: New file.
1123 * dwarf_linediscriminator.c: New file.
1124 * dwarf_lineop_index.c: New file.
1125 * Makefile.am (libdw_a_SOURCES): Add them.
1126 * libdw.map (ELFUTILS_0.148): Add them.
1127 * libdw.h: Declare them.
1129 2010-06-16 Roland McGrath <roland@redhat.com>
1131 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1133 * fde.c (fde_by_offset): Renamed to ...
1134 (__libdw_fde_by_offset): ... this, made global and internal_function.
1135 Don't take ADDRESS argument.
1136 (__libdw_find_fde): Update caller. Do address sanity check here.
1137 * cfi.h: Declare __libdw_fde_by_offset.
1138 * cfi.c (dwarf_cfi_validate_fde): New function.
1139 * libdw.h: Declare it.
1140 * libdw.map (ELFUTILS_0.148): Add it.
1142 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1143 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1145 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1146 Don't assume DW_EH_PE_aligned refers to native address size.
1148 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1151 2010-06-15 Roland McGrath <roland@redhat.com>
1153 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1155 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1156 here, since we don't support it yet.
1158 * dwarf_next_cfi.c: Handle version 4 format.
1160 * dwarf_getsrclines.c: Handle version 4 format.
1162 2010-06-01 Roland McGrath <roland@redhat.com>
1164 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1165 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1167 * libdwP.h (CIE_VERSION): Remove unused macro.
1169 * dwarf_getsrclines.c: Fix version field test.
1170 * libdwP.h (DWARF_VERSION): Remove useless macro.
1172 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1174 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1176 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1178 2010-05-31 Mark Wielaard <mjw@redhat.com>
1180 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1181 * libdw.h (dwarf_cfi_cie_p): ... here.
1183 2010-05-31 Mark Wielaard <mjw@redhat.com>
1185 * dwarf.h: Fix DW_LANG_Python constant.
1187 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1189 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1192 2010-05-27 Roland McGrath <roland@redhat.com>
1194 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1195 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1197 2010-05-08 Roland McGrath <roland@redhat.com>
1199 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1200 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1201 (getlocation): Update caller.
1202 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1203 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1204 * libdwP.h: Update decl.
1206 2010-04-26 Roland McGrath <roland@redhat.com>
1208 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1209 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1210 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1211 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1213 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1214 Prepend DW_OP_call_frame_cfa if true.
1215 (getlocation): Update caller.
1216 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1217 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1218 * libdwP.h: Update decl.
1220 2010-04-22 Roland McGrath <roland@redhat.com>
1222 * cfi.c (execute_cfi): Never return without cleanup.
1224 (cie_cache_initial_state): Adjust caller to expect that free.
1225 (__libdw_frame_at_address): Likewise.
1227 2010-03-10 Roland McGrath <roland@redhat.com>
1229 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1231 2010-02-15 Roland McGrath <roland@redhat.com>
1233 * Makefile.am: Use config/eu.am for common stuff.
1235 2010-02-02 Mark Wielaard <mjw@redhat.com>
1237 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1239 2010-01-07 Roland McGrath <roland@redhat.com>
1241 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1243 2010-01-05 Roland McGrath <roland@redhat.com>
1245 * dwarf_aggregate_size.c: New file.
1246 * Makefile.am (libdw_a_SOURCES): Add it.
1247 * libdw.h: Declare it.
1248 * libdwP.h: Add INTDECL.
1249 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1251 * dwarf_srclang.c: Add INTDEF.
1252 * libdwP.h: Add INTDECL.
1254 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1256 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1258 2009-11-21 Roland McGrath <roland@redhat.com>
1260 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1263 2009-10-15 Roland McGrath <roland@redhat.com>
1265 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1266 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1268 2009-09-17 Roland McGrath <roland@redhat.com>
1270 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1271 argument a pointer to const.
1272 * libdw.h: Update decl.
1274 2009-09-10 Roland McGrath <roland@redhat.com>
1276 * dwarf_getlocation.c (store_implicit_value): New function.
1277 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1278 (dwarf_getlocation_implicit_value): New function.
1279 * libdw.h: Declare it.
1280 * libdw.map (ELFUTILS_0.143): Add it.
1282 2009-09-09 Mark Wielaard <mjw@redhat.com>
1284 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1286 2009-08-21 Josh Stone <jistone@redhat.com>
1288 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1290 2009-08-10 Roland McGrath <roland@redhat.com>
1292 * dwarf_getscopevar.c: Use dwarf_diename.
1294 2009-08-09 Roland McGrath <roland@redhat.com>
1296 * libdw.map (ELFUTILS_0.143): New version set,
1297 inherits from ELFUTILS_0.142.
1298 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1299 alias in the ELFUTILS_0.122 version set and the default in the new set.
1300 * dwarf_srclang.c: Likewise.
1301 * dwarf_decl_file.c: Likewise.
1302 * dwarf_decl_line.c: Likewise.
1303 * dwarf_decl_column.c: Likewise.
1304 * dwarf_bytesize.c: Likewise.
1305 * dwarf_bitsize.c: Likewise.
1306 * dwarf_bitoffset.c: Likewise.
1308 2009-08-07 Roland McGrath <roland@redhat.com>
1310 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1311 * dwarf_srclang.c: Likewise.
1312 * dwarf_decl_file.c: Likewise.
1313 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1314 * dwarf_bytesize.c: Likewise.
1315 * dwarf_bitsize.c: Likewise.
1316 * dwarf_bitoffset.c: Likewise.
1318 2009-07-22 Roland McGrath <roland@redhat.com>
1320 * dwarf_frame_cfa.c: Change calling convention.
1321 * libdw.h: Update decl.
1323 * dwarf_frame_register.c: Change calling/return-value convention for
1324 value-only results and undefined/same_value.
1325 * libdw.h: Update decl.
1327 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1328 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1329 return that value instead.
1330 (getlocation): Update caller.
1331 * dwarf_frame_cfa.c: Likewise.
1332 * libdwP.h: Update decl.
1334 2009-07-21 Roland McGrath <roland@redhat.com>
1336 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1337 Fix loop iteration after skipping a bogus or useless CU.
1339 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1340 absence, not DWARF_E_NO_DEBUG_LINE.
1342 2009-07-20 Roland McGrath <roland@redhat.com>
1344 * dwarf_getlocation.c (__libdw_intern_expression):
1345 Handle DW_OP_stack_value.
1347 2009-07-16 Roland McGrath <roland@redhat.com>
1349 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1350 reject others when CU's version > 3.
1352 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1354 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1355 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1356 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1357 and DW_AT_const_expr.
1358 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1359 and DW_FORM_ref_sig8.
1361 2009-07-15 Roland McGrath <roland@redhat.com>
1363 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1364 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1366 2009-07-13 Roland McGrath <roland@redhat.com>
1368 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1370 2009-07-08 Roland McGrath <roland@redhat.com>
1372 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1375 * libdwP.h (struct Dwarf): Add member `cfi'.
1376 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1377 * dwarf_getcfi.c: New file.
1378 * dwarf_getcfi_elf.c: New file.
1379 * dwarf_cfi_end.c: New file.
1380 * dwarf_cfi_addrframe.c: New file.
1381 * dwarf_frame_cfa.c: New file.
1382 * dwarf_frame_register.c: New file.
1383 * dwarf_frame_return_address_register.c: New file.
1384 * Makefile.am (libdw_a_SOURCES): Add them.
1385 * unwind.h: Declare those functions.
1386 * libdw.map (ELFUTILS_0.142): Export them.
1388 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1390 (getlocation): ... here, call it.
1391 * libdwP.h: Declare it.
1395 * frame-cache.c: New file.
1398 * encoded-value.h: New file.
1399 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1400 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1401 * dwarf_error.c (errmsgs): Add element for it.
1403 * dwarf_next_cfi.c: New file.
1404 * Makefile.am (libdw_a_SOURCES): Add it.
1405 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1406 Declare dwarf_next_cfi.
1407 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1410 * memory-access.h [! ALLOW_UNALIGNED]
1411 (read_2ubyte_unaligned): Renamed to ...
1412 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1413 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1414 (read_2sbyte_unaligned): Likewise.
1415 (read_4ubyte_unaligned): Likewise.
1416 (read_4sbyte_unaligned): Likewise.
1417 (read_8ubyte_unaligned): Likewise.
1418 (read_8sbyte_unaligned): Likewise.
1420 * libdwP.h (IDX_eh_frame): Remove it.
1421 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1423 2009-07-08 Roland McGrath <roland@redhat.com>
1425 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1427 * dwarf_getlocation.c (check_constant_offset): New function.
1428 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1429 handle DW_AT_data_member_location of data[48] as constant offset.
1431 2009-06-18 Roland McGrath <roland@redhat.com>
1433 * libdwP.h (__libdw_read_address_inc): Constify.
1434 (__libdw_read_offset_inc): Likewise.
1435 * dwarf_getaranges.c: Likewise.
1436 * dwarf_getlocation.c: Likewise.
1437 * dwarf_getsrclines.c: Likewise.
1438 * dwarf_nextcu.c: Likewise.
1440 2009-05-05 Petr Machata <pmachata@redhat.com>
1442 * libdwP.h (__libdw_formptr): Declare new function.
1443 * dwarf_formudata.c: Implement it here.
1444 * dwarf_getlocation.c (dwarf_getlocation_addr):
1445 Call it instead of hand-rolled offset handling code.
1446 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1447 * dwarf_ranges.c (dwarf_ranges): Likewise.
1449 2009-05-04 Petr Machata <pmachata@redhat.com>
1451 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1452 * dwarf_ranges.c: Implement it here.
1453 (dwarf_ranges): Call it.
1454 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1456 2009-04-23 Petr Machata <pmachata@redhat.com>
1458 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1459 of read_*ubyte_unaligned.
1460 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1461 * dwarf_formstring.c (dwarf_formstring): Likewise.
1462 * dwarf_formudate.c (dwarf_formudata): Likewise.
1463 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1464 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1465 * dwarf_getpubnames.c (get_offsets): Likewise.
1466 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1468 2009-04-23 Petr Machata <pmachata@redhat.com>
1470 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1471 __libdw_read_addr, __libdw_read_off): Add four new internal
1474 2009-05-07 Roland McGrath <roland@redhat.com>
1476 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1477 return value and OFFSET argument, not CU-relative. Only fetch the
1478 attribute data when called with OFFSET of 0.
1480 2009-05-07 Petr Machata <pmachata@redhat.com>
1482 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1483 DW_AT_macro_info attribute of CU DIE.
1485 2009-04-15 Roland McGrath <roland@redhat.com>
1487 * dwarf.h (DW_CIE_ID): Removed.
1488 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1490 2009-04-01 Roland McGrath <roland@redhat.com>
1492 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1494 2009-01-28 Roland McGrath <roland@redhat.com>
1496 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1497 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1499 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1501 2009-01-26 Roland McGrath <roland@redhat.com>
1503 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1505 2009-01-25 Roland McGrath <roland@redhat.com>
1507 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1509 2009-01-23 Roland McGrath <roland@redhat.com>
1511 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1512 Put these rules under if MAINTAINER_MODE.
1514 2009-01-22 Roland McGrath <roland@redhat.com>
1516 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1518 2009-01-21 Roland McGrath <roland@redhat.com>
1520 * Makefile.am (CLEANFILES): Renamed to ...
1521 (MOSTLYCLEANFILES): ... here.
1522 (CLEANFILES): New variable, add known-dwarf.h.
1524 2009-01-17 Roland McGrath <roland@redhat.com>
1526 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1527 Make it unconditional.
1528 (BUILT_SOURCES): Updated.
1530 * dwarf.h: Add description comments for DW_LANG_* values.
1532 * Makefile.am [MAINTAINER_MODE]
1533 ($(srcdir)/known-dwarf.h): New target.
1534 (BUILT_SOURCES): Add it.
1536 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1538 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1540 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1542 2009-01-08 Roland McGrath <roland@redhat.com>
1544 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1546 2008-01-06 Roland McGrath <roland@redhat.com>
1548 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1550 * dwarf_haschildren.c: Return -1 for error case, not 0.
1552 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1554 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1556 * dwarf.h: Add definition for unwind and call frame information.
1558 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1559 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1561 2008-08-15 Roland McGrath <roland@redhat.com>
1563 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1564 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1566 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1568 * dwarf_child.c: Minor optimizations.
1569 * dwarf_getattrs.c: Likewise.
1570 * dwarf_getpubnames.c: Likewise.
1571 * dwarf_siblingof.c: Likewise.
1572 * dwarf_tag.c: Likewise.
1574 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1576 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1577 of DWARF_VERSION comparison, just fail if the file's version is newer.
1579 2008-01-17 Nick Clifton <nickc@redhat.com>
1581 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1582 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1583 (DWARF3_LENGTH_64_BIT): New define.
1584 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1585 * dwarf_getpubnames: Include dwarf.h.
1586 (get_offsets): Use the new definitions.
1587 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1588 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1589 (dwarf_nextcu): Use the new definitions.
1591 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1592 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1593 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1594 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1596 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1599 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1601 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1602 Set the address in the return structure to the address of the next
1603 non-sibling die, if there is no sibling and the return pointer is
1604 not the same as the die pointer.
1605 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1607 * dwarf_child.c: Fix typo in comment.
1609 * libdwP.h (DWARF_VERSION): Change to 3.
1611 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1612 not have a initialised valp pointer.
1614 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1615 the end of the attributes is reached. When the callback fails,
1616 return the address of the failing attribute, not the address of
1618 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1620 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1621 (dwarf_child): Likewise.
1622 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1623 (dwarf_tag): Likewise.
1625 2008-01-08 Roland McGrath <roland@redhat.com>
1627 * Makefile.am (euinclude): Variable removed.
1628 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1629 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1631 2007-10-17 Roland McGrath <roland@redhat.com>
1633 * libdw.h (__deprecated_attribute__): New macro.
1634 (dwarf_formref): Mark it deprecated.
1635 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1636 (dwarf_formref): ... here. Call it. Remove INTDEF.
1637 * libdwP.h: Remove INTDECL.
1638 Declare __libdw_formref.
1639 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1640 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1642 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1643 needs to check CU->version.
1645 * libdwP.h (struct Dwarf_CU): New member `version'.
1646 * libdw_findcu.c (__libdw_findcu): Initialize it.
1648 * dwarf_child.c: Return 1 for null entry as first child.
1650 2007-10-05 Roland McGrath <roland@redhat.com>
1652 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1654 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1655 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1657 2007-10-03 Roland McGrath <roland@redhat.com>
1659 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1660 and dwfl_build_id_find_debuginfo.
1662 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1663 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1665 2007-10-02 Roland McGrath <roland@redhat.com>
1667 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1670 2007-08-07 Roland McGrath <roland@redhat.com>
1672 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1673 error code is DWARF_E_NOERROR (0).
1675 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1676 Fix typo in __libdw_visit_scopes argument.
1678 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1679 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1681 2007-07-03 Roland McGrath <roland@redhat.com>
1683 * libdw.h (__extern_inline): New macro.
1684 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1686 2007-04-16 Roland McGrath <roland@redhat.com>
1688 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1690 2007-04-05 Roland McGrath <roland@redhat.com>
1692 * dwarf_getsrcdirs.c: New file.
1693 * Makefile.am (libdw_a_SOURCES): Add it.
1694 * libdw.h: Declare dwarf_getsrcdirs.
1695 * libdw.map (ELFUTILS_0.127): Add it.
1697 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1698 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1699 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1700 Save DIRARRAY in the Dwarf_Files.
1702 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1703 address to check for all-ones base address entry. Check directly.
1704 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1706 2007-03-25 Roland McGrath <roland@redhat.com>
1708 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1709 Return NULL when freeing RESULT on error.
1710 (global_read, scngrp_read): Check return value from check_section,
1711 break out of loop after it has freed RESULT.
1712 (valid_p): Handle null argument.
1714 2007-03-12 Roland McGrath <roland@redhat.com>
1716 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1718 2007-03-04 Roland McGrath <roland@redhat.com>
1720 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1721 ELFUTILS_0.126. Add dwfl_module_addrsym.
1723 2007-02-10 Roland McGrath <roland@redhat.com>
1725 * dwarf.h (DW_OP_fbreg): Comment fix.
1727 2007-02-03 Roland McGrath <roland@redhat.com>
1729 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1730 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1731 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1732 exported in the past.
1734 2006-12-17 Roland McGrath <roland@redhat.com>
1736 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1737 address when the CU is missing attributes due to buggy GCC.
1739 2006-08-29 Roland McGrath <roland@redhat.com>
1741 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1743 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1744 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1746 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1747 result is aligned. Adjust NEWP->remaining here for this allocation.
1748 * libdwP.h: Update decl.
1749 (libdw_alloc): Update caller.
1751 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1753 * dwarf_child.c: Adjust for internal_function_def removal.
1754 * dwarf_getabbrev.c: Likewise.
1755 * dwarf_tag.c: Likewise.
1756 * libdw_form.c: Likewise.
1757 * memory-access.c: Likewise.
1759 2006-06-28 Roland McGrath <roland@redhat.com>
1761 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1763 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1766 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1768 * libdw.h: Add extern "C".
1770 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1772 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1773 aranges information.
1775 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1777 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1780 2006-02-28 Roland McGrath <roland@redhat.com>
1782 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1783 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1784 values from DWARF 3.0.
1786 2006-02-22 Roland McGrath <roland@redhat.com>
1788 * libdw.map: Bump to 0.120; export dwfl_version.
1790 2005-12-22 Roland McGrath <roland@redhat.com>
1792 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1794 2005-12-12 Roland McGrath <roland@redhat.com>
1796 * dwarf_ranges.c: Copy CU base address-finding code from
1799 2005-12-09 Roland McGrath <roland@redhat.com>
1801 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1802 Delay CU base lookup until it's needed.
1803 If CU base lookup fails with no error, flag invalid DWARF.
1805 2005-11-25 Roland McGrath <roland@redhat.com>
1807 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1809 2005-11-15 Roland McGrath <roland@redhat.com>
1811 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1813 2005-11-13 Roland McGrath <roland@redhat.com>
1815 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1817 2005-10-27 Roland McGrath <roland@redhat.com>
1819 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1820 don't match end_sequence markers.
1822 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1823 before normal records at the same address.
1824 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1827 2005-10-26 Roland McGrath <roland@redhat.com>
1829 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1830 * dwarf_func_file.c: Renamed to ...
1831 * dwarf_decl_file.c: ... here.
1832 * dwarf_func_col.c: Renamed to ...
1833 * dwarf_decl_column.c: ... here.
1834 * dwarf_func_line.c: Renamed to ...
1835 * dwarf_decl_line.c: ... here.
1836 (dwarf_func_line): Renamed to ...
1837 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1838 (__libdw_func_intval): Renamed __libdw_attr_intval.
1839 * dwarf_func_name.c: File removed.
1840 * dwarf_func_lowpc.c: File removed.
1841 * dwarf_func_highpc.c: File removed.
1842 * dwarf_func_entrypc.c: File removed.
1843 * dwarf_func_die.c: File removed.
1844 * Makefile.am (libdw_a_SOURCES): Updated.
1845 * libdw.h: Update decls.
1846 (Dwarf_Func): Type removed.
1847 * libdwP.h: Update decls.
1848 (struct Dwarf_Func_s): Type removed.
1849 * libdw.map: Updated.
1851 * libdwP.h (CUDIE): New macro.
1852 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1853 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1854 * dwarf_ranges.c (dwarf_ranges): Likewise.
1856 * dwarf_getloclist.c: Renamed to ...
1857 * dwarf_getlocation.c: ... here.
1858 (getloclist): Renamed to getlocation.
1859 (dwarf_getloclist): Renamed to dwarf_getlocation.
1860 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1861 * Makefile.am (libdw_a_SOURCES): Updated.
1862 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1863 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1864 (Dwarf_Loc): Renamed Dwarf_Op.
1865 * libdwP.h (struct loc_s): Update use.
1866 * libdw.map: Update map.
1868 * dwarf_entry_breakpoints.c: Use the second line record within the
1869 function, regardless of its source location data.
1871 2005-10-25 Roland McGrath <roland@redhat.com>
1873 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1875 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1877 2005-10-14 Roland McGrath <roland@redhat.com>
1879 * dwarf_diecu.c (dwarf_diecu): New file.
1880 * Makefile.am (libdw_a_SOURCES): Add it.
1881 * libdw.h: Declare dwarf_diecu.
1882 * libdw.map: Export it.
1884 * libdw.map: Bump to 0.116; export dwarf_ranges.
1886 2005-09-20 Roland McGrath <roland@redhat.com>
1888 * dwarf_haspc.c: Use dwarf_ranges.
1889 * dwarf_entry_breakpoints.c: Likewise.
1891 * dwarf_ranges.c: New file.
1892 * Makefile.am (libdw_a_SOURCES): Add it.
1893 * libdw.h: Declare dwarf_ranges.
1894 * libdwP.h: Add INTDECL.
1896 2005-09-14 Roland McGrath <roland@redhat.com>
1898 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1899 prologue_end marker scanning loop.
1901 2005-09-11 Roland McGrath <roland@redhat.com>
1903 * dwarf.h: Comment typo fix.
1905 2005-09-07 Roland McGrath <roland@redhat.com>
1907 * dwarf_entry_breakpoints.c: New file.
1908 * Makefile.am (libdw_a_SOURCES): Add it.
1909 * libdw.h: Declare dwarf_entry_breakpoints.
1911 * dwarf_entrypc.c: New file.
1912 * Makefile.am (libdw_a_SOURCES): Add it.
1913 * libdw.h: Declare dwarf_entrypc.
1914 * libdwP.h: Add INTDECL.
1916 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1918 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1919 (%.os): Use COMPILE.os.
1920 (COMPILE.os): Filter out gconv options.
1922 2005-08-27 Roland McGrath <roland@redhat.com>
1924 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1925 __libdw_visit_scopes.
1927 * dwarf_getscopes_die.c: New file.
1928 * Makefile.am (libdw_a_SOURCES): Add it.
1929 * libdw.h: Declare dwarf_getscopes_die.
1930 * libdw.map: Bump to 0.115 and add it.
1932 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1933 containing a DIE and its parent pointer, instead of just Dwarf_Die.
1934 Take two functions for both preorder and postorder visitors.
1935 * libdwP.h: Update decl.
1936 (struct Dwarf_Die_Chain): New type.
1937 * dwarf_func_inline.c: Update uses.
1939 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1941 * libdwP.h: Add INTDECL.
1942 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1944 2005-08-23 Roland McGrath <roland@redhat.com>
1946 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1947 DW_AT_specification the same as DW_AT_abstract_origin.
1949 2005-08-20 Roland McGrath <roland@redhat.com>
1951 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1952 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1953 and dwfl_report_offline.
1955 2005-08-19 Roland McGrath <roland@redhat.com>
1957 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
1958 Add dwfl_module_relocate_address, dwfl_module_relocations,
1959 dwfl_module_relocation_info.
1961 2005-08-18 Roland McGrath <roland@redhat.com>
1963 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
1964 outermost scope in the results.
1966 2005-08-15 Roland McGrath <roland@redhat.com>
1968 * dwarf_func_inline.c: New file.
1969 * Makefile.am (libdw_a_SOURCES): Add it.
1970 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
1971 * libdw.map: Add them.
1973 * dwarf_func_die.c: New file.
1974 * Makefile.am (libdw_a_SOURCES): Add it.
1975 * libdw.h: Declare dwarf_func_die.
1976 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
1978 2005-08-10 Ulrich Drepper <drepper@redhat.com>
1980 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
1981 of DW_LNS_set_epilog_begin.
1983 2005-08-09 Roland McGrath <roland@redhat.com>
1985 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
1987 * dwarf_end.c: Add INTDEF.
1988 * dwarf_error.c (dwarf_errmsg): Likewise.
1989 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
1991 2005-08-01 Roland McGrath <roland@redhat.com>
1993 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
1994 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1996 2005-07-28 Ulrich Drepper <drepper@redhat.com>
1998 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
1999 (libdw_a_LIBADD): Add all files from libdwfl.a.
2001 2005-07-27 Roland McGrath <roland@redhat.com>
2003 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2004 along with ../libebl/libebl.a and ../lib/libeu.a;
2005 depend on ../libelf/libelf.so.
2006 (libdw_so_LDADD): New variable.
2007 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2009 * libdw.map: Define an empty base version and move all symbols to
2010 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2012 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2014 * dwarf_error.c: Add internal alias for dwarf_errno.
2015 * libdwP.h: Declare __dwarf_errno_internal.
2016 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2018 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2021 2005-06-01 Roland McGrath <roland@redhat.com>
2023 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2024 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2026 2005-06-08 Roland McGrath <roland@redhat.com>
2028 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2029 (get_sleb128_step, get_sleb128): Likewise.
2030 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2031 * dwarf_getloclist.c (getloclist): Likewise.
2032 * dwarf_formblock.c (dwarf_formblock): Likewise.
2033 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2034 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2035 * dwarf_formref.c (dwarf_formref): Likewise.
2036 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2037 * dwarf_formudata.c (dwarf_formudata): Likewise.
2038 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2039 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2040 * dwarf_tag.c (dwarf_tag): Likewise.
2041 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2042 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2043 * libdw_form.c (__libdw_form_val_len): Likewise.
2044 * libdwP.h: Update decl.
2046 2005-06-04 Roland McGrath <roland@redhat.com>
2048 * memory-access.h (get_uleb128_rest_return): New macro.
2049 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2050 (get_sleb128_rest_return): New macro.
2051 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2052 * memory-access.c: New file.
2053 * Makefile.am (libdw_a_SOURCES): Add it.
2054 (DEFS): Add -DIS_LIBDW.
2056 2005-05-31 Roland McGrath <roland@redhat.com>
2058 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2061 2005-05-30 Roland McGrath <roland@redhat.com>
2063 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2064 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2066 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2067 BEGIN value. Instead, match base address entries separately for
2070 2005-05-28 Roland McGrath <roland@redhat.com>
2072 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2073 past location expression contents.
2075 2005-05-23 Roland McGrath <roland@redhat.com>
2077 * dwarf_getsrclines.c: Comment typo fix.
2079 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2080 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2082 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2084 * libdwP.h: Only use INTDECL for alias prototypes.
2086 2005-05-19 Roland McGrath <roland@redhat.com>
2088 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2090 * dwarf_getscopevar.c: New file.
2091 * Makefile.am (libdw_a_SOURCES): Add it.
2092 * libdw.h: Declare dwarf_getscopevar.
2094 * dwarf_getsrcfiles.c: Add INTDEF.
2095 * dwarf_haschildren.c: Likewise.
2096 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2098 * dwarf_getscopes.c: New file.
2099 * Makefile.am (libdw_a_SOURCES): Add it.
2100 * libdw.h: Declare dwarf_getscopes.
2101 * libdw.map: Add it.
2103 2005-05-18 Roland McGrath <roland@redhat.com>
2105 * libdwP.h (IDX_debug_ranges): New enum constant.
2106 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2107 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2108 * dwarf_error.c (errmsgs): Add it.
2109 * dwarf_haspc.c: New file.
2110 * libdw.h: Declare dwarf_haspc.
2111 * libdw.map: Add it.
2112 * libdwP.h: Add INTDECL.
2114 * dwarf_attr_integrate.c: New file.
2115 * dwarf_hasattr_integrate.c: New file.
2116 * Makefile.am (libdw_a_SOURCES): Add them.
2117 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2118 * libdw.map: Add them.
2120 * dwarf_hasattr.c: Add INTDEF.
2121 * libdwP.h: Add INTDECL for it.
2123 * dwarf_formref_die.c: New file.
2124 * Makefile.am (libdw_a_SOURCES): Add it.
2125 * libdw.h (dwarf_formref_die): Declare it.
2126 * libdwP.h (dwarf_formref_die): Add INTDECL.
2127 * libdw.map: Add it.
2129 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2131 (dwarf_getloclist): ... here. Call them.
2132 (dwarf_addrloclists): New function.
2133 * libdw.h: Declare it.
2134 * libdw.map: Add it.
2136 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2137 DW_MACINFO_end_file. Recognize type 0 as terminator.
2139 2005-05-05 Roland McGrath <roland@redhat.com>
2141 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2143 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2144 the line program does not produce all entries in ascending order.
2146 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2148 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2149 occurences (e.g., inlines) better.
2151 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2153 * libdw.h (DWARF_END_ABBREV): Define.
2154 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2156 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2158 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2159 as error of __libdw_getabbrev.
2161 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2163 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2165 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2166 results back to caller.
2168 2005-04-04 Roland McGrath <roland@redhat.com>
2170 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2172 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2175 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2177 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2179 * dwarf_getsrc_file.c: New file.
2180 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2181 * libdw.h: Declare dwarf_getsrc_file.
2182 * libdw.map: Add dwarf_getsrc_file.
2184 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2186 * dwarf_func_entrypc.c: New file.
2187 * dwarf_func_col.c: New file.
2188 * dwarf_func_line.c: New file.
2189 * dwarf_func_file.c: New file.
2190 * libdw.h: Add prototypes for new functions.
2191 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2193 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2194 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2195 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2196 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2197 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2198 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2200 * dwarf.h: Add some DWARF3 definitions.
2202 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2204 * dwarf_getfuncs.c: New file.
2205 * dwarf_func_highpc.c: New file.
2206 * dwarf_func_lowpc.c: New file.
2207 * dwarf_func_name.c: New file.
2208 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2209 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2210 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2211 and dwarf_func_name.
2212 * libdw.h: Add prototypes for new functions.
2213 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2214 * dwarf_siblingof.c: Likewise.
2215 * dwarf_dieoffset.c: Likewise.
2216 * dwarf_highpc.c: Likewise.
2217 * dwarf_lowpc.c: Likewise.
2218 * libdwP.h: Add prototypes for internal functions.
2219 Define Dwarf_Func_s structure.
2221 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2223 * libdw.h: Add padding in Dwarf_die.
2225 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2226 * dwarf_attr.c: Likewise.
2227 * dwarf_begin.c: Likewise.
2228 * dwarf_begin_elf.c: Likewise.
2229 * dwarf_bitoffset.c: Likewise.
2230 * dwarf_bitsize.c: Likewise.
2231 * dwarf_bytesize.c: Likewise.
2232 * dwarf_diename.c: Likewise.
2233 * dwarf_formaddr.c: Likewise.
2234 * dwarf_formblock.c: Likewise.
2235 * dwarf_formref.c: Likewise.
2236 * dwarf_formstring.c: Likewise.
2237 * dwarf_formudata.c: Likewise.
2238 * dwarf_getarange_addr.c: Likewise.
2239 * dwarf_getarangeinfo.c: Likewise.
2240 * dwarf_getaranges.c: Likewise.
2241 * dwarf_getloclist.c: Likewise.
2242 * dwarf_getmacros.c: Likewise.
2243 * dwarf_getsrc_die.c: Likewise.
2244 * dwarf_getsrcfiles.c: Likewise.
2245 * dwarf_getsrclines.c: Likewise.
2246 * dwarf_highpc.c: Likewise.
2247 * dwarf_lowpc.c: Likewise.
2248 * dwarf_nextcu.c: Likewise.
2249 * dwarf_offdie.c: Likewise.
2250 * dwarf_siblingof.c: Likewise.
2251 * dwarf_srclang.c: Likewise.
2252 * dwarf_tag.c: Likewise.
2253 * libdw_findcu.c: Likewise.
2254 * libdwP.h: Add prototypes for internal functions.
2256 * dwarf_addrdie.c: New file.
2257 * dwarf_macro_opcode.c: New file.
2258 * dwarf_macro_param1.c: New file.
2259 * dwarf_macro_param2.c: New file.
2260 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2261 * libdwP.h: Remove Dwarf_Macro definition.
2262 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2263 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2264 * libdw.map: Add entries for new functions.
2266 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2268 * libdw.h: Handle broken gcc < 4.
2270 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2272 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2274 * dwarf_begin_elf.c: Fix warnings.
2275 * dwarf_dieoffset.c: Likewise.
2276 * dwarf_end.c: Likewise.
2277 * dwarf_error.c: Likewise.
2278 * dwarf_getpubnames.c: Likewise.
2280 * libdwP.h: Add new error values.
2281 * dwarf_error.c: Support new error values.
2282 * dwarf_getpubnames.c: Check parameter value.
2284 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2286 * Makefile.am: Check for text relocations in constructed DSO.
2288 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2290 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2292 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2293 checks to not read over buffer boundaries for ill-formed DWARF data.
2295 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2297 * dwarf_child.c: Make compile with gcc 4.0.
2298 * dwarf_error.c: Likewise.
2299 * dwarf_formblock.c: Likewise.
2300 * dwarf_getabbrev.c: Likewise.
2301 * dwarf_getattrs.c: Likewise.
2302 * dwarf_getsrclines.c: Likewise.
2303 * dwarf_tag.c: Likewise.
2304 * libdw_form.c: Likewise.
2306 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2308 * Makefile.am: Support building with mudflap.
2310 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2311 * dwarf_getsrclines.c: Likewise.
2312 * dwarf_memory-access.h: Likewise.
2314 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2316 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2318 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2319 Third parameter of dwarf_getsrcfiles can be NULL.
2321 * libdw.map: Add dwarf_getmacros.
2322 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2323 * dwarf_getmacros.c: New file.
2325 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2327 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2329 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2331 * dwarf_getsrclines.c:
2332 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2334 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2336 * libdwP.h (_): Use elfutils domain.
2338 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2340 * dwarf_getsrclines.c: Fix typo in comment.
2342 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2344 * Makefile.am: Support building with mudflap.
2346 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2348 * memory-access.h: Add lots of const in case a pointer passed is const.
2350 * dwarf_formflag.c: New file.
2351 * dwarf_getattrs.c: New file.
2352 * dwarf_error.c: Add new error value.
2353 * libdw.h: Add prototypes for new functions. Adjust prototype for
2355 * libdw.map: Add new functions.
2356 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2358 * libdwP.h: Add new error value.
2359 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2362 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2364 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2366 * dwarf_getarange_addr.c: New file
2367 * dwarf_getarangeinfo.c: New file.
2368 * dwarf_getaranges.c: New file.
2369 * dwarf_onerange.c: New file.
2370 * libdw.h: Declare new functions. Define Dwarf_Arange and
2372 * libdw.map: Add new functions.
2373 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2374 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2375 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2376 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2377 * dwarf_error.c: Add new message.
2379 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2381 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2382 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2383 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2384 * dwarf_error.c: Add another message.
2385 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2387 * dwarf_filesrc.c: Likewise.
2388 * dwarf_getsrcfiles.c: Likewise.
2389 * dwarf_getsrclines.c: Likewise.
2390 * dwarf_lineaddr.c: New file.
2391 * dwarf_linebeginstatement.c: New file.
2392 * dwarf_lineblock.c: New file.
2393 * dwarf_linecol.c: New file.
2394 * dwarf_lineendsequence.c: New file.
2395 * dwarf_lineepiloguebegin.c: New file.
2396 * dwarf_lineno.c: New file.
2397 * dwarf_lineprologueend.c: New file.
2398 * dwarf_onesrcline.c: New file.
2399 * dwarf_lineno.c: Change interface to store result in object pointed
2400 to by second parameter.
2401 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2402 prototype. Define Dwarf_Files and Dwarf_Lines.
2403 * libdw.map: Add new functions.
2404 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2405 * libdw_findcu.c: Don't initialize nlines field.
2407 * dwarf_siblingof: Little optimization.
2409 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2410 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2411 * libdwP.h (struct Dwarf): Add free_elf field.
2413 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2415 * dwarf_getstring.c: New file.
2416 * dwarf_offabbrev.c: New file.
2417 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2418 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2419 parameters. Don't allocate memory if not necessary and don't lookup
2420 previous results if no CU given.
2421 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2422 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2423 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2424 * libdwP.h: Change prototype for __libdw_getabbrev.
2426 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2427 returning if this is wanted.
2429 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2431 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2432 with offset_size value.
2433 * libdw.h: Adjust dwarf_nextcu prototype.
2434 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2435 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2436 member of new CU struct.
2437 * dwarf_formstring.c: Depend on offset_size not address_size for
2438 DW_FORM_strp handling.
2439 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2441 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2443 (dwarf_tag): Correctly recognize failed lookup.
2445 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2447 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2448 * dwarf_formblock.c: New file.
2449 * dwarf_getloclist.c: Rewrite to handle a single block.
2450 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2451 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2452 dwarf_getloclistent declaration.
2453 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2454 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2455 Add locs member to struct Dwarf_CU.
2456 * libdw_fundcu.c: Initialize locs member of new CU.
2457 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2458 Remove dwarf_getloclistent.c.
2460 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2462 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2463 * libdwP.h: Likewise.
2465 * dwarf_getloclist.c: New file.
2466 * dwarf_getloclistent.c: New file.
2467 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2468 Declare dwarf_getloclistent and dwarf_getloclist.
2469 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2470 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2471 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2474 * dwarf_error.c: More error messages.
2476 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2478 * dwarf_getsrclines.c: Remove debugging support.
2480 * dwarf_getsrcfiles.c: New file.
2481 * dwarf_filesrc.c: New file.
2482 * libdw.h: Declare these functions. Define Dwarf_File.
2483 * libdwP.c: Adjust Dwarf_File_s definition.
2484 * libdw.map: Add these functions.
2485 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2487 * dwarf_getsrclines.c: Initialize cu->files.
2489 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2491 * libdw.h: Add more nonnull function attributes.
2493 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2494 * dwarf_end.c (cu_free): New function.
2495 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2496 * dwarf_error.c (errmsgs): Add new messages.
2497 * dwarf_getsrc_die.c: New file.
2498 * dwarf_getsrclines.c: New file.
2499 * dwarf_lineno.c: New file.
2500 * dwarf_linesrc.c: New file.
2501 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2502 instead of the *_inc-less variants.
2503 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2504 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2505 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2507 * libdwP.h: Add more error codes.
2508 (struct Dwarf): Remove mem_tail.next member.
2509 (Dwarf_File): Define type.
2510 (struct Dwarf_Line_s): Define type.
2511 (struct Dwarf_CU): Add lines and nlines members.
2512 (libdw_alloc): Define local variable _tail and use it.
2513 Add some function attributes.
2514 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2515 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2516 * memory-access.h: Add unlikely for the endian conversion paths.
2517 * Makefile.am (AM_CFLAGS): Add -std parameter.
2518 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2519 dwarf_lineno, and dwarf_linesrc.
2521 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2523 * Moved to CVS archive.