1 2015-05-27 Mark Wielaard <mjw@redhat.com>
3 * encoded-value.h (read_encoded_value): Check data d_size contains
4 at least enough data to hold a pointer for DW_EH_PE_indirect.
6 2015-05-22 Mark Wielaard <mjw@redhat.com>
8 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
9 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
10 MAX_STACK_DIRS. Calculate number of dirs needed first, then
11 create dirarray directly, without needing the next field. Free
12 not stack allocated lines and files at the end.
14 2015-05-19 Mark Wielaard <mjw@redhat.com>
16 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
17 allocated array to hold locs. Allocate locs bigger than the array
18 with malloc and free them when done.
20 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
22 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
23 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
24 * dwarf_begin_elf.c (inflate_section): New static function, lifted
26 (check_section): ... here. Call inflate_section, set libdw errno to
27 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
29 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
31 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
32 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
34 2015-05-06 Mark Wielaard <mjw@redhat.com>
36 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
37 check the line number.
39 2015-05-05 Mark Wielaard <mjw@redhat.com>
41 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
42 left before reading values.
44 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
46 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
49 2015-04-22 Mark Wielaard <mjw@redhat.com>
51 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
52 (__libdw_max_len_uleb128): New function.
53 (__libdw_max_len_sleb128): Likewise.
54 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
55 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
57 2015-04-21 Mark Wielaard <mjw@redhat.com>
59 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
60 when there are more than 8.
62 2015-04-01 Petr Machata <pmachata@redhat.com>
64 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
65 (is_cudie): New function.
66 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
67 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
68 of white-listing valid tags.
69 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
71 2015-03-18 Petr Machata <pmachata@redhat.com>
73 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
74 (EXTRA_DIST): Remove known-dwarf.h.
76 2015-02-09 Mark Wielaard <mjw@redhat.com>
78 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
79 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
80 for new Fortran language codes is 1.
82 2015-02-09 Mark Wielaard <mjw@redhat.com>
84 * dwarf.h: Add DW_TAG_atomic_type.
85 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
86 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
88 2015-02-11 Josh Stone <jistone@redhat.com>
90 * encoded-value.h (read_encoded_value): Initialize value.
92 2015-02-11 Petr Machata <pmachata@redhat.com>
94 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
95 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
96 the fact in *BASEP and bail out later if it hasn't been updated by
97 __libdw_read_begin_end_pair_inc.
99 2014-12-24 Mark Wielaard <mjw@redhat.com>
101 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
102 smaller than or equal to addr, rather than returning immediately on
105 2015-01-07 Mark Wielaard <mjw@redhat.com>
107 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
108 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
109 room in the search table for all entries. Store search_table_len.
110 (getcfi_scn_eh_frame): Likewise.
111 * encoded-value.h (encoded_value_size): Don't abort, return zero.
112 (__libdw_cfi_read_address_inc): Check there is enough room to read
113 values. Pass other byte order to read functions.
114 (read_encoded_value): Check encoded_value_size. Don't abort, but
115 set libdw errno and report failure. Check there is enough room to
117 * fde.c (binary_search_fde): Check encoded value size. Add hdr
118 data buf and size to dummy_cfi.
120 2015-01-04 Mark Wielaard <mjw@redhat.com>
122 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
123 is after current DIE.
125 2015-01-04 Mark Wielaard <mjw@redhat.com>
127 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
128 (dwarf_frame_register).
130 2015-01-02 Mark Wielaard <mjw@redhat.com>
132 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
133 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
134 (getcfi_scn_eh_frame): Check d_buf is not NULL.
136 2015-01-02 Mark Wielaard <mjw@redhat.com>
138 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
139 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
140 DW_OP_addr if dbg is NULL then read argument directly.
142 2015-01-14 Jason P. Leasure <jpleasu@super.org>
144 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
147 2014-12-27 Mark Wielaard <mjw@redhat.com>
149 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
150 still falls inside CU data.
152 2015-01-11 Mark Wielaard <mjw@redhat.com>
154 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
155 __libdw_visit_scopes with NULL imports.
156 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
157 * dwarf_getscopes.c (pc_record): Likewise.
158 (dwarf_getscopes): Likewise.
159 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
160 * libdwP.h (__libdw_visit_scopes): Add imports argument.
161 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
162 function imports_contains. Push and pop imports around walk_children
163 when processing DW_TAG_imported_unit.
165 2014-12-18 Ulrich Drepper <drepper@gmail.com>
167 * Makefile.am: Suppress output of textrel_check command.
169 2014-12-16 Mark Wielaard <mjw@redhat.com>
171 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
174 2014-12-16 Mark Wielaard <mjw@redhat.com>
176 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
177 space to read die offset.
179 2014-12-16 Mark Wielaard <mjw@redhat.com>
181 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
184 2014-12-15 Mark Wielaard <mjw@redhat.com>
186 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
187 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
188 (dwarf_getpubnames): Make sure section data contains string zero
191 2014-12-16 Mark Wielaard <mjw@redhat.com>
193 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
194 the compiler optimize for the common single-byte case.
196 2014-12-15 Josh Stone <jistone@redhat.com>
198 * memory-access.h (__libdw_max_len_leb128): New.
199 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
200 (__libdw_get_sleb128): Likewise.
202 2014-12-14 Mark Wielaard <mjw@redhat.com>
204 * cfi.c (execute_cfi): Add program bounds checks.
205 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
206 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
207 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
208 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
209 * dwarf_formudata.c (dwarf_formudata): Likewise.
210 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
211 with end of data buf.
212 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
213 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
214 call gets enough data.
215 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
216 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
218 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
220 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
221 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
222 get_uleb128 with lineendp.
223 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
224 get_uleb128 with endp.
225 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
226 get_uleb128/get_sleb128 with limit.
227 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
228 get_sleb128 get called with enough data.
229 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
230 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
231 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
233 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
234 Don't call get_uleb128_step if out of data.
235 (__libdw_get_sleb128): Likewise for get_sleb128_step.
237 2014-12-12 Mark Wielaard <mjw@redhat.com>
239 * libdwP.h (struct Dwarf): Add fake_loc_cu.
241 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
242 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
243 (__libdw_form_val_len): Likewise.
244 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
245 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
246 the already found data buffer directly.
247 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
248 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
249 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
251 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
252 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
253 * dwarf_getlocation_attr.c (attr_form_cu): New function.
254 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
255 (getlocation): Handle empty blocks immediately.
256 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
257 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
258 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
260 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
261 fake_cu. Call __libdw_form_val_len with just fake_cu.
262 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
263 datap and size directly from cu startp and endp.
265 2014-12-11 Mark Wielaard <mjw@redhat.com>
267 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
269 2014-12-13 Mark Wielaard <mjw@redhat.com>
271 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
272 difference doesn't wrap around before returning as int.
274 2014-12-11 Josh Stone <jistone@redhat.com>
276 * dwarf_getsrclines.c (struct linelist): Add sequence.
277 (compare_lines): Take linelists, and break ties by sequence.
278 (read_srclines): Use linelists for sorting.
279 (read_srclines::add_new_line): Set sequence.
281 2014-12-10 Josh Stone <jistone@redhat.com>
283 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
284 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
285 * dwarf_child.c (dwarf_child): Use cu->endp.
286 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
287 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
288 * dwarf_siblingof.c (dwarf_siblingof): Use both.
290 2014-12-10 Josh Stone <jistone@redhat.com>
292 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
294 2014-12-10 Josh Stone <jistone@redhat.com>
296 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
297 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
298 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
299 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
300 * dwarf_tag.c (dwarf_tag): Likewise.
302 2014-12-04 Mark Wielaard <mjw@redhat.com>
304 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
305 (__libdw_form_val_len): Likewise and check len doesn't overflow.
306 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
307 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
309 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
310 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
312 2014-12-02 Petr Machata <pmachata@redhat.com>
314 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
316 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
317 * libdw.h (DWARF_GETMACROS_START): New macro.
319 2014-11-27 Mark Wielaard <mjw@redhat.com>
321 * Makefile.am (libdw.so): Use textrel_check.
323 2014-11-27 Mark Wielaard <mjw@redhat.com>
325 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
326 search_table_entries and search_table_encoding.
328 2014-11-24 Mark Wielaard <mjw@redhat.com>
330 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
333 2014-11-23 Mark Wielaard <mjw@redhat.com>
335 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
336 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
337 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
339 2014-11-23 Mark Wielaard <mjw@redhat.com>
341 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
342 Set libdw errno and return NULL.
344 2014-11-24 Mark Wielaard <mjw@redhat.com>
346 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
347 (DW_LANG_C11): Likewise.
348 (DW_LANG_C_plus_plus_14): Likewise.
349 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
350 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
352 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
355 2014-11-26 Mark Wielaard <mjw@redhat.com>
357 * dwarf.h (DW_AT_noreturn): Added.
359 2014-11-11 Mark Wielaard <mjw@redhat.com>
361 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
362 explicitly as uint8_t.
363 (__libdw_getsrclines): Add internal_function to declaration.
365 2014-09-10 Petr Machata <pmachata@redhat.com>
367 * dwarf_macro_getparamcnt.c: New file.
368 * dwarf_macro_param.c: New file.
369 * dwarf_macro_getsrcfiles.c: New file.
370 * Makefile.am (libdw_a_SOURCES): Add the new files.
371 * libdwP.h (struct files_lines_s): New structure.
372 (DWARF_E_INVALID_OPCODE): New enumerator.
373 (struct Dwarf): New fields macro_ops, files_lines.
374 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
375 keeping macro opcode prototypes in.
376 (Dwarf_Macro_s): Redefine from scratch.
377 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
379 * dwarf_error.c (errmsgs): Add a message for
380 DWARF_E_INVALID_OPCODE.
381 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
383 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
384 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
386 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
387 (get_offset_from, macro_op_compare, build_table)
388 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
389 (cache_op_table, read_macros, gnu_macros_getmacros_off)
390 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
392 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
393 * dwarf_getsrclines.c (read_srclines): New function with guts
394 taken from dwarf_getsrclines.
395 (__libdw_getsrclines): Likewise.
396 (__libdw_getcompdir, files_lines_compare): New functions.
397 (dwarf_getsrclines): Make it dispatch to the new interfaces.
398 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
400 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
401 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
402 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
404 2014-10-06 Mark Wielaard <mjw@redhat.com>
406 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
407 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
408 (aggregate_size): Likewise. Add old and new version.
409 * dwarf_peel_type.c: New file.
410 * libdw.h (dwarf_peel_type): New function declaration.
411 * libdwP.h (dwarf_peel_type): New internal declaration.
412 * libdw.map (ELFUTILS_0.161): New section.
414 2014-10-15 Petr Machata <pmachata@redhat.com>
416 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
417 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
419 2014-10-05 Mark Wielaard <mjw@redhat.com>
421 * dwarf.h: Add DW_AT_GNU_deleted.
423 2014-10-02 Mark Wielaard <mjw@redhat.com>
425 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
426 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
427 DW_TAG_rvalue_reference_type.
429 2014-09-12 Petr Machata <pmachata@redhat.com>
431 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
432 8-byte quantities. Consequently, rename to...
433 (read_addr_unaligned_inc): ... this.
434 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
435 (read_sbyte_unaligned): Drop.
437 2014-09-10 Petr Machata <pmachata@redhat.com>
439 * dwarf_getlocation.c (attr_ok): Also accept
440 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
441 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
443 2014-08-15 Mark Wielaard <mjw@redhat.com>
445 * dwarf_cu_die.c: New file.
446 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
447 * libdw.h (dwarf_cu_die): New function declaration.
448 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
450 2014-08-15 Mark Wielaard <mjw@redhat.com>
452 * dwarf_cu_getdwarf.c: New file.
453 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
454 * libdw.h (Dwarf_CU): New typedef.
455 (dwarf_cu_getdwarf): New function declaration.
456 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
458 2014-06-18 Mark Wielaard <mjw@redhat.com>
460 * dwarf.h: Remove DW_TAG_mutable_type.
462 2014-05-02 Mark Wielaard <mjw@redhat.com>
464 * libdwP.h (__check_build_id): Removed now unused.
466 2014-05-01 Mark Wielaard <mjw@redhat.com>
468 * libdwP.h (struct Dwarf): Remove free_alt.
469 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
470 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
472 2014-04-30 Mark Wielaard <mjw@redhat.com>
474 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
476 2014-04-15 Florian Weimer <fweimer@redhat.com>
478 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
479 (open_debugaltlink): Move to libdwfl.
480 (check_section): Do not locate alternate debuginfo.
482 2014-04-24 Florian Weimer <fweimer@redhat.com>
484 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
486 2014-04-22 Florian Weimer <fweimer@redhat.com>
488 * dwarf_getalt.c, dwarf_setalt.c: New files.
489 * Makefile.am (libdw_a_SOURCES): Add them.
490 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
491 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
493 * libdw.map (ELFUTILS_0.159): Export the two new functions.
495 2014-04-15 Florian Weimer <fweimer@redhat.com>
497 * libdwP.h (enum IDX_gnu_debugaltlink): New.
498 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
500 (check_section): Obtain .gnu_debugaltlink section from the
503 2014-04-11 Mark Wielaard <mjw@redhat.com>
505 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
506 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
507 (libdwelf_objects): New variable.
508 (libdw_a_LIBADD): Add libdwelf objects.
510 2014-04-22 Mark Wielaard <mjw@redhat.com>
512 * memory-access.h (get_sleb128_step): Remove undefined behavior
513 of left shifting a signed value. Replace it with a multiplication.
515 2014-04-13 Mark Wielaard <mjw@redhat.com>
517 * Makefile.am: Remove !MUDFLAP conditions.
519 2014-04-09 Mark Wielaard <mjw@redhat.com>
521 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
522 before calling malloc to uncompress data.
524 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
526 Fix abort() on missing section headers.
527 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
528 New label err to return NULL.
530 2014-02-05 Josh Stone <jistone@redhat.com>
532 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
533 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
534 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
536 2013-12-30 Mark Wielaard <mjw@redhat.com>
538 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
539 dwfl_linux_proc_attach.
541 2013-12-20 Mark Wielaard <mjw@redhat.com>
543 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
545 2013-12-18 Mark Wielaard <mjw@redhat.com>
547 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
548 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
549 dwfl_module_getsym_info.
551 2013-12-16 Mark Wielaard <mjw@redhat.com>
553 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
555 2013-12-10 Josh Stone <jistone@redhat.com>
557 * memory-access.h (get_uleb128_rest_return): Removed.
558 (get_sleb128_rest_return): Removed.
559 (get_uleb128_step): Make this a self-contained block.
560 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
561 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
562 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
563 (__libdw_get_uleb128): Simplify and inline for all callers.
564 (__libdw_get_sleb128): Ditto.
565 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
566 * memory-access.c: Delete file.
567 * Makefile.am (libdw_a_SOURCES): Remove it.
568 (DEFS): Remove the now unused -DIS_LIBDW.
570 2013-12-09 Josh Stone <jistone@redhat.com>
572 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
573 __libdw_form_val_len, now handling only non-constant form lengths.
574 * libdwP.h (__libdw_form_val_len): New inlined function.
576 2013-12-09 Mark Wielaard <mjw@redhat.com>
578 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
579 location expressions.
580 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
581 location found, return empty location expression.
582 * dwarf_getlocation_implicit_pointer.c
583 (dwarf_getlocation_implicit_pointer): Likewise.
584 (__libdw_empty_loc_attr): New internal function.
585 * libdwP.h (__libdw_empty_loc_attr): Define.
587 2013-11-27 Mark Wielaard <mjw@redhat.com>
589 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
590 dwfl_module_getsym_elf.
592 2013-11-26 Mark Wielaard <mjw@redhat.com>
594 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
595 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
596 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
597 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
598 (ELFUTILS_0.158): ... here.
600 2013-11-09 Mark Wielaard <mjw@redhat.com>
602 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
603 check that it is zero.
605 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
607 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
608 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
609 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
610 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
611 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
613 2013-11-01 Michael Forney <mforney@mforney.org>
615 * Makefile.am (libdwfl_objects): New definition.
616 (libdw_a_LIBADD): Use libdwfl_objects.
618 2013-11-01 Michael Forney <mforney@mforney.org>
620 * Makefile.am: Use READELF.
622 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
624 * libdw.map (ELFUTILS_0.158): New.
626 2013-10-10 Mark Wielaard <mjw@redhat.com>
628 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
629 start_addr and rename last_offset to last_addr. Now both void *.
630 (tree_visitor): Use start_add and die_addr instead of start_offset
632 (dwarf_getfuncs): Use last_addr instead of last_offset.
634 2013-10-06 Mark Wielaard <mjw@redhat.com>
636 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
637 DW_CFA_val_expression are not used with abi_cfi.
639 2013-10-03 Josh Stone <jistone@redhat.com>
641 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
642 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
643 a unit, make sure to always hash the sig8 here, so none are missed.
645 2013-09-29 Mark Wielaard <mjw@redhat.com>
647 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
648 uintptr_t before casting to char *.
649 (__libdw_intern_expression): Cast data to uintptr_t before casting
651 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
652 op->number2 to uintptr_t before casting to char *.
654 2013-09-24 Josh Stone <jistone@redhat.com>
656 * libdw_visit_scopes.c (classify_die): Removed.
657 (may_have_scopes): New function to replace classify_die. There's no
658 need for full classification; just find tags that may contain scopes.
659 (__libdw_visit_scopes): Use a direct tag comparison for imported
660 units, and use may_have_scopes to test if recursion is needed.
662 2013-09-20 Mark Wielaard <mjw@redhat.com>
664 * dwarf_getfuncs.c (visitor_info): New struct.
665 (tree_visitor): New function.
666 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
667 * libdw.h (dwarf_getfuncs): Expand function documentation.
669 2013-09-12 Mark Wielaard <mjw@redhat.com>
671 * fde.c (intern_fde): Free fde and set libdw errno when start
672 or end could not be read.
674 2013-08-24 Mark Wielaard <mjw@redhat.com>
676 * dwarf_getlocation.c (store_implicit_value): Don't take data
677 as argument, get block data from op number2. Return false when
678 block data length and op number don't match up.
679 (__libdw_intern_expression): Store start of block for
680 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
681 relative data offset. Also store block start (including length)
682 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
683 * dwarf_getlocation_attr.c: New file.
684 * dwarf_getlocation_die.c: Likewise.
685 * libdw.h (dwarf_getlocation_die): New function definition.
686 (dwarf_getlocation_attr): Likewise.
687 * libdwP.h: Declare internal dwarf_getlocation_die.
688 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
689 dwarf_getlocation_attr.
690 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
691 dwarf_getlocation_attr.c.
693 2013-08-23 Mark Wielaard <mjw@redhat.com>
695 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
696 (attr_base_address): New function.
697 (initial_offset_base): New function.
698 (getlocations_addr): New function. Taken from...
699 (dwarf_getlocation_addr): here. Use new initial_offset_base and
701 (dwarf_getlocations): New function.
702 * libdw.h (dwarf_getlocations): New function definition.
703 * libdw.map (ELFUTILS_0.157): New.
705 2013-07-02 Mark Wielaard <mjw@redhat.com>
707 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
708 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
709 NEW_LINE macro. Free malloced line records if any at the end.
711 2013-07-02 Mark Wielaard <mjw@redhat.com>
713 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
715 2013-06-26 Mark Wielaard <mjw@redhat.com>
717 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
718 DIEs without children. Return an error whenever dwarf_child or
719 dwarf_siblingof return an error. Don't call recurse and increase
720 the depth for an imported unit. Walk the children of an imported
721 unit as if they are logical children of the parent root DIE.
723 2013-05-03 Mark Wielaard <mjw@redhat.com>
725 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
728 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
730 * libdw.map (ELFUTILS_0.156): New.
732 2013-04-24 Mark Wielaard <mjw@redhat.com>
734 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
736 2013-04-10 Mark Wielaard <mjw@redhat.com>
738 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
739 equal to address size when we have a DW_FORM_ref_addr for DWARF
742 2013-03-25 Mark Wielaard <mjw@redhat.com>
744 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
747 2013-03-12 Mark Wielaard <mjw@redhat.com>
749 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
750 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
752 2013-02-15 Mark Wielaard <mjw@redhat.com>
754 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
755 not dbg->sectiondata.
757 2013-01-07 Roland McGrath <roland@hack.frob.com>
760 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
761 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
763 2012-12-18 Mark Wielaard <mjw@redhat.com>
765 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
766 (check_section): Likewise on error.
767 (scngrp_read): Likewise.
768 (dwarf_begin_elf): Likewise.
770 2012-10-09 Petr Machata <pmachata@redhat.com>
772 * dwarf_getlocation.c (__libdw_intern_expression): Handle
773 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
774 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
775 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
777 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
779 * cfi.c: New include system.h.
780 (execute_cfi) (enough_registers): Clear new memory after realloc.
782 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
784 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
785 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
788 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
790 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
791 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
792 Remove the later DW_OP_call_frame_cfa push to RESULT.
794 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
797 * fde.c (binary_search_fde): Remove always true <address >= start>
798 conditional. Move L initialization upwards.
800 2012-08-24 Mark Wielaard <mjw@redhat.com>
802 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
803 when ENABLE_DWZ is defined.
804 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
807 2012-08-16 Mark Wielaard <mjw@redhat.com>
809 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
810 * dwarf.h (DW_LANG_Go): Update comment.
811 (DW_LANG_Mips_Assembler): Likewise.
813 2012-06-27 Mark Wielaard <mjw@redhat.com>
815 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
816 * dwarf_begin.c (dwarf_begin): Add INTDEF.
817 * dwarf_begin_elf.c (__check_build_id): New internal_function.
818 (try_debugaltlink): New function.
819 (open_debugaltlink): Likewise.
820 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
821 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
823 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
824 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
826 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
827 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
828 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
830 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
831 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
832 (struct Dwarf): Add alt_dwarf and free_alt fields.
833 (__libdw_read_offset): Add dbg_ret argument, use to check with
834 __libdw_offset_in_section.
835 (__check_build_id): New function declaration.
836 (dwarf_begin): Define as INTDECL.
837 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
838 and DW_FORM_GNU_strp_alt.
840 2012-07-19 Mark Wielaard <mjw@redhat.com>
842 * dwarf.h: Add DW_OP_GNU_parameter_ref.
844 2012-07-24 Mark Wielaard <mjw@redhat.com>
846 * dwarf.h: Correct spelling of DW_LANG_ObjC.
847 * dwarf_aggregate_size.c (array_size): Use correct spelling of
850 2012-07-24 Mark Wielaard <mjw@redhat.com>
852 * dwarf.h: Add DW_ATE_UTF.
854 2012-06-27 Mark Wielaard <mjw@redhat.com>
856 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
858 2012-06-26 Mark Wielaard <mjw@redhat.com>
860 * libdwP.h: Add IDX_debug_macro.
861 * dwarf.h: Add DW_AT_GNU_macros.
862 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
863 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
865 2012-04-27 Mark Wielaard <mjw@redhat.com>
867 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
868 a constant offset from DW_AT_low_pc.
870 2012-03-19 Tom Tromey <tromey@redhat.com>
872 * libdw_findcu.c (findcu_cb): Move earlier.
873 (__libdw_intern_next_unit): Add new CU to search tree here...
874 (__libdw_findcu): ... not here.
876 2012-01-31 Mark Wielaard <mjw@redhat.com>
878 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
880 2011-11-31 Mark Wielaard <mjw@redhat.com>
882 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
884 2011-07-14 Mark Wielaard <mjw@redhat.com>
886 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
888 2011-05-16 Jakub Jelinek <jakub@redhat.com>
890 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
891 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
894 2011-04-26 Mark Wielaard <mjw@redhat.com>
896 * dwarf_child (dwarf_child): Sanity check end of section against
897 cu_data () of die->cu.
899 2011-03-22 Mark Wielaard <mjw@redhat.com>
901 * dwarf.h: Add DW_TAG_GNU_call_site,
902 DW_TAG_GNU_call_site_parameter,
903 DW_AT_GNU_call_site_value,
904 DW_AT_GNU_call_site_data_value,
905 DW_AT_GNU_call_site_target,
906 DW_AT_GNU_call_site_target_clobbered,
908 DW_AT_GNU_all_tail_call_sites,
909 DW_AT_GNU_all_call_sites,
910 DW_AT_GNU_all_source_call_sites,
911 and DW_OP_GNU_entry_value.
913 2011-03-10 Petr Machata <pmachata@redhat.com>
915 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
916 abbreviation with code 0.
918 2011-03-09 Petr Machata <pmachata@redhat.com>
920 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
922 2011-02-23 Roland McGrath <roland@redhat.com>
924 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
925 Declare __libdw_free_zdata.
926 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
927 (dwarf_end): Call it.
929 * dwarf_begin_elf.c (valid_p): Likewise.
930 (check_section, scngrp_read): Likewise.
931 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
933 2010-10-13 Roland McGrath <roland@redhat.com>
935 * dwarf.h: Add DW_LANG_Go.
937 2010-10-05 Roland McGrath <roland@redhat.com>
939 * dwarf_getaranges.c: Use malloc rather than alloca,
940 since the total number of elements can be quite huge.
942 2010-07-26 Roland McGrath <roland@redhat.com>
944 * dwarf_getlocation_implicit_pointer.c: New file.
945 * Makefile.am (libdw_a_SOURCES): Add it.
946 * libdw.map (ELFUTILS_0.149): New set.
947 Add dwarf_getlocation_implicit_pointer.
948 * libdw.h: Declare it.
950 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
951 (dwarf_offdie, dwarf_offdie_types): Update callers.
952 * libdwP.h: Declare it.
954 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
955 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
957 2010-08-24 Roland McGrath <roland@redhat.com>
959 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
961 2010-07-27 Roland McGrath <roland@redhat.com>
963 * dwarf_formref_die.c: Fix sig8 hash insertion.
965 2010-06-23 Roland McGrath <roland@redhat.com>
967 * cfi.c (dwarf_cfi_validate_fde): Function removed.
968 * libdw.h: Remove it.
969 * libdw.map: Likewise.
971 2010-06-22 Roland McGrath <roland@redhat.com>
973 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
975 * dwarf_getsrclines.c: Fix signed comparison warning in extended
978 2010-06-21 Roland McGrath <roland@redhat.com>
980 * dwarf.h: Add DW_TAG_GNU_* constants.
982 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
985 2010-06-20 Roland McGrath <roland@redhat.com>
987 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
988 to search TUs instead of CUs.
989 * libdwP.h: Update decl.
990 (struct Dwarf): New member tu_tree.
991 * dwarf_end.c (dwarf_end): Clean up tu_tree.
992 * dwarf_offdie.c (do_offdie): New function, broken out of ...
993 (dwarf_offdie): ... here.
994 (dwarf_offdie_types): New function.
995 * libdw.h: Declare it.
996 * libdw.map (ELFUTILS_0.148): Add it.
998 * libdwP.h (CUDIE): Use cu_data.
999 * dwarf_formblock.c: Likewise.
1000 * dwarf_formref_die.c: Likewise.
1001 * dwarf_diecu.c: Use CUDIE macro.
1002 * dwarf_formaddr.c: Use cu_sec_idx.
1004 2010-06-16 Roland McGrath <roland@redhat.com>
1006 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1007 we don't repeat a CU lookup we've already done. Handle
1008 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1010 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1012 (__libdw_findcu): ... here. Call it.
1013 * libdwP.h: Declare it.
1014 (struct Dwarf): New member next_tu_offset.
1016 * dwarf_sig8_hash.c: New file.
1017 * dwarf_sig8_hash.h: New file.
1018 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1019 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1021 * libdwP.h (struct Dwarf): New member sig8_hash.
1022 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1023 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1025 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1026 (dwarf_nextcu): ... here. Call it.
1027 * libdw.h: Declare it.
1028 * libdwP.h: Add INTDECL.
1029 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1030 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1032 * libdwP.h (cu_sec_idx, cu_data): New functions.
1033 Use .debug_types when CU is a TU.
1034 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1035 * dwarf_siblingof.c: Likewise.
1036 * dwarf_formstring.c: Likewise.
1037 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1038 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1039 (dwarf_getlocation_addr): Likewise.
1041 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1042 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1043 .debug_types header size instead of .debug_info header size.
1045 * dwarf_diecu.c: Update caller.
1046 * dwarf_getaranges.c: Likewise.
1047 * dwarf_nextcu.c: Likewise.
1048 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1050 * fde.c (fde_by_offset): Renamed to ...
1051 (__libdw_fde_by_offset): ... this, made global and internal_function.
1052 Don't take ADDRESS argument.
1053 (__libdw_find_fde): Update caller. Do address sanity check here.
1054 * cfi.h: Declare __libdw_fde_by_offset.
1055 * cfi.c (dwarf_cfi_validate_fde): New function.
1056 * libdw.h: Declare it.
1057 * libdw.map (ELFUTILS_0.148): Add it.
1059 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1060 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1062 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1063 Don't assume DW_EH_PE_aligned refers to native address size.
1065 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1068 2010-06-17 Roland McGrath <roland@redhat.com>
1070 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1072 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1073 into an inner inline function. Set new fields. Check all fields for
1074 overflow when setting.
1075 * dwarf_lineisa.c: New file.
1076 * dwarf_linediscriminator.c: New file.
1077 * dwarf_lineop_index.c: New file.
1078 * Makefile.am (libdw_a_SOURCES): Add them.
1079 * libdw.map (ELFUTILS_0.148): Add them.
1080 * libdw.h: Declare them.
1082 2010-06-16 Roland McGrath <roland@redhat.com>
1084 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1086 * fde.c (fde_by_offset): Renamed to ...
1087 (__libdw_fde_by_offset): ... this, made global and internal_function.
1088 Don't take ADDRESS argument.
1089 (__libdw_find_fde): Update caller. Do address sanity check here.
1090 * cfi.h: Declare __libdw_fde_by_offset.
1091 * cfi.c (dwarf_cfi_validate_fde): New function.
1092 * libdw.h: Declare it.
1093 * libdw.map (ELFUTILS_0.148): Add it.
1095 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1096 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1098 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1099 Don't assume DW_EH_PE_aligned refers to native address size.
1101 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1104 2010-06-15 Roland McGrath <roland@redhat.com>
1106 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1108 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1109 here, since we don't support it yet.
1111 * dwarf_next_cfi.c: Handle version 4 format.
1113 * dwarf_getsrclines.c: Handle version 4 format.
1115 2010-06-01 Roland McGrath <roland@redhat.com>
1117 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1118 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1120 * libdwP.h (CIE_VERSION): Remove unused macro.
1122 * dwarf_getsrclines.c: Fix version field test.
1123 * libdwP.h (DWARF_VERSION): Remove useless macro.
1125 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1127 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1129 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1131 2010-05-31 Mark Wielaard <mjw@redhat.com>
1133 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1134 * libdw.h (dwarf_cfi_cie_p): ... here.
1136 2010-05-31 Mark Wielaard <mjw@redhat.com>
1138 * dwarf.h: Fix DW_LANG_Python constant.
1140 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1142 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1145 2010-05-27 Roland McGrath <roland@redhat.com>
1147 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1148 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1150 2010-05-08 Roland McGrath <roland@redhat.com>
1152 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1153 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1154 (getlocation): Update caller.
1155 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1156 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1157 * libdwP.h: Update decl.
1159 2010-04-26 Roland McGrath <roland@redhat.com>
1161 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1162 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1163 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1164 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1166 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1167 Prepend DW_OP_call_frame_cfa if true.
1168 (getlocation): Update caller.
1169 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1170 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1171 * libdwP.h: Update decl.
1173 2010-04-22 Roland McGrath <roland@redhat.com>
1175 * cfi.c (execute_cfi): Never return without cleanup.
1177 (cie_cache_initial_state): Adjust caller to expect that free.
1178 (__libdw_frame_at_address): Likewise.
1180 2010-03-10 Roland McGrath <roland@redhat.com>
1182 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1184 2010-02-15 Roland McGrath <roland@redhat.com>
1186 * Makefile.am: Use config/eu.am for common stuff.
1188 2010-02-02 Mark Wielaard <mjw@redhat.com>
1190 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1192 2010-01-07 Roland McGrath <roland@redhat.com>
1194 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1196 2010-01-05 Roland McGrath <roland@redhat.com>
1198 * dwarf_aggregate_size.c: New file.
1199 * Makefile.am (libdw_a_SOURCES): Add it.
1200 * libdw.h: Declare it.
1201 * libdwP.h: Add INTDECL.
1202 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1204 * dwarf_srclang.c: Add INTDEF.
1205 * libdwP.h: Add INTDECL.
1207 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1209 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1211 2009-11-21 Roland McGrath <roland@redhat.com>
1213 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1216 2009-10-15 Roland McGrath <roland@redhat.com>
1218 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1219 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1221 2009-09-17 Roland McGrath <roland@redhat.com>
1223 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1224 argument a pointer to const.
1225 * libdw.h: Update decl.
1227 2009-09-10 Roland McGrath <roland@redhat.com>
1229 * dwarf_getlocation.c (store_implicit_value): New function.
1230 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1231 (dwarf_getlocation_implicit_value): New function.
1232 * libdw.h: Declare it.
1233 * libdw.map (ELFUTILS_0.143): Add it.
1235 2009-09-09 Mark Wielaard <mjw@redhat.com>
1237 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1239 2009-08-21 Josh Stone <jistone@redhat.com>
1241 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1243 2009-08-10 Roland McGrath <roland@redhat.com>
1245 * dwarf_getscopevar.c: Use dwarf_diename.
1247 2009-08-09 Roland McGrath <roland@redhat.com>
1249 * libdw.map (ELFUTILS_0.143): New version set,
1250 inherits from ELFUTILS_0.142.
1251 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1252 alias in the ELFUTILS_0.122 version set and the default in the new set.
1253 * dwarf_srclang.c: Likewise.
1254 * dwarf_decl_file.c: Likewise.
1255 * dwarf_decl_line.c: Likewise.
1256 * dwarf_decl_column.c: Likewise.
1257 * dwarf_bytesize.c: Likewise.
1258 * dwarf_bitsize.c: Likewise.
1259 * dwarf_bitoffset.c: Likewise.
1261 2009-08-07 Roland McGrath <roland@redhat.com>
1263 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1264 * dwarf_srclang.c: Likewise.
1265 * dwarf_decl_file.c: Likewise.
1266 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1267 * dwarf_bytesize.c: Likewise.
1268 * dwarf_bitsize.c: Likewise.
1269 * dwarf_bitoffset.c: Likewise.
1271 2009-07-22 Roland McGrath <roland@redhat.com>
1273 * dwarf_frame_cfa.c: Change calling convention.
1274 * libdw.h: Update decl.
1276 * dwarf_frame_register.c: Change calling/return-value convention for
1277 value-only results and undefined/same_value.
1278 * libdw.h: Update decl.
1280 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1281 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1282 return that value instead.
1283 (getlocation): Update caller.
1284 * dwarf_frame_cfa.c: Likewise.
1285 * libdwP.h: Update decl.
1287 2009-07-21 Roland McGrath <roland@redhat.com>
1289 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1290 Fix loop iteration after skipping a bogus or useless CU.
1292 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1293 absence, not DWARF_E_NO_DEBUG_LINE.
1295 2009-07-20 Roland McGrath <roland@redhat.com>
1297 * dwarf_getlocation.c (__libdw_intern_expression):
1298 Handle DW_OP_stack_value.
1300 2009-07-16 Roland McGrath <roland@redhat.com>
1302 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1303 reject others when CU's version > 3.
1305 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1307 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1308 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1309 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1310 and DW_AT_const_expr.
1311 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1312 and DW_FORM_ref_sig8.
1314 2009-07-15 Roland McGrath <roland@redhat.com>
1316 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1317 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1319 2009-07-13 Roland McGrath <roland@redhat.com>
1321 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1323 2009-07-08 Roland McGrath <roland@redhat.com>
1325 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1328 * libdwP.h (struct Dwarf): Add member `cfi'.
1329 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1330 * dwarf_getcfi.c: New file.
1331 * dwarf_getcfi_elf.c: New file.
1332 * dwarf_cfi_end.c: New file.
1333 * dwarf_cfi_addrframe.c: New file.
1334 * dwarf_frame_cfa.c: New file.
1335 * dwarf_frame_register.c: New file.
1336 * dwarf_frame_return_address_register.c: New file.
1337 * Makefile.am (libdw_a_SOURCES): Add them.
1338 * unwind.h: Declare those functions.
1339 * libdw.map (ELFUTILS_0.142): Export them.
1341 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1343 (getlocation): ... here, call it.
1344 * libdwP.h: Declare it.
1348 * frame-cache.c: New file.
1351 * encoded-value.h: New file.
1352 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1353 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1354 * dwarf_error.c (errmsgs): Add element for it.
1356 * dwarf_next_cfi.c: New file.
1357 * Makefile.am (libdw_a_SOURCES): Add it.
1358 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1359 Declare dwarf_next_cfi.
1360 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1363 * memory-access.h [! ALLOW_UNALIGNED]
1364 (read_2ubyte_unaligned): Renamed to ...
1365 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1366 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1367 (read_2sbyte_unaligned): Likewise.
1368 (read_4ubyte_unaligned): Likewise.
1369 (read_4sbyte_unaligned): Likewise.
1370 (read_8ubyte_unaligned): Likewise.
1371 (read_8sbyte_unaligned): Likewise.
1373 * libdwP.h (IDX_eh_frame): Remove it.
1374 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1376 2009-07-08 Roland McGrath <roland@redhat.com>
1378 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1380 * dwarf_getlocation.c (check_constant_offset): New function.
1381 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1382 handle DW_AT_data_member_location of data[48] as constant offset.
1384 2009-06-18 Roland McGrath <roland@redhat.com>
1386 * libdwP.h (__libdw_read_address_inc): Constify.
1387 (__libdw_read_offset_inc): Likewise.
1388 * dwarf_getaranges.c: Likewise.
1389 * dwarf_getlocation.c: Likewise.
1390 * dwarf_getsrclines.c: Likewise.
1391 * dwarf_nextcu.c: Likewise.
1393 2009-05-05 Petr Machata <pmachata@redhat.com>
1395 * libdwP.h (__libdw_formptr): Declare new function.
1396 * dwarf_formudata.c: Implement it here.
1397 * dwarf_getlocation.c (dwarf_getlocation_addr):
1398 Call it instead of hand-rolled offset handling code.
1399 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1400 * dwarf_ranges.c (dwarf_ranges): Likewise.
1402 2009-05-04 Petr Machata <pmachata@redhat.com>
1404 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1405 * dwarf_ranges.c: Implement it here.
1406 (dwarf_ranges): Call it.
1407 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1409 2009-04-23 Petr Machata <pmachata@redhat.com>
1411 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1412 of read_*ubyte_unaligned.
1413 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1414 * dwarf_formstring.c (dwarf_formstring): Likewise.
1415 * dwarf_formudate.c (dwarf_formudata): Likewise.
1416 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1417 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1418 * dwarf_getpubnames.c (get_offsets): Likewise.
1419 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1421 2009-04-23 Petr Machata <pmachata@redhat.com>
1423 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1424 __libdw_read_addr, __libdw_read_off): Add four new internal
1427 2009-05-07 Roland McGrath <roland@redhat.com>
1429 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1430 return value and OFFSET argument, not CU-relative. Only fetch the
1431 attribute data when called with OFFSET of 0.
1433 2009-05-07 Petr Machata <pmachata@redhat.com>
1435 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1436 DW_AT_macro_info attribute of CU DIE.
1438 2009-04-15 Roland McGrath <roland@redhat.com>
1440 * dwarf.h (DW_CIE_ID): Removed.
1441 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1443 2009-04-01 Roland McGrath <roland@redhat.com>
1445 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1447 2009-01-28 Roland McGrath <roland@redhat.com>
1449 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1450 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1452 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1454 2009-01-26 Roland McGrath <roland@redhat.com>
1456 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1458 2009-01-25 Roland McGrath <roland@redhat.com>
1460 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1462 2009-01-23 Roland McGrath <roland@redhat.com>
1464 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1465 Put these rules under if MAINTAINER_MODE.
1467 2009-01-22 Roland McGrath <roland@redhat.com>
1469 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1471 2009-01-21 Roland McGrath <roland@redhat.com>
1473 * Makefile.am (CLEANFILES): Renamed to ...
1474 (MOSTLYCLEANFILES): ... here.
1475 (CLEANFILES): New variable, add known-dwarf.h.
1477 2009-01-17 Roland McGrath <roland@redhat.com>
1479 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1480 Make it unconditional.
1481 (BUILT_SOURCES): Updated.
1483 * dwarf.h: Add description comments for DW_LANG_* values.
1485 * Makefile.am [MAINTAINER_MODE]
1486 ($(srcdir)/known-dwarf.h): New target.
1487 (BUILT_SOURCES): Add it.
1489 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1491 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1493 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1495 2009-01-08 Roland McGrath <roland@redhat.com>
1497 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1499 2008-01-06 Roland McGrath <roland@redhat.com>
1501 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1503 * dwarf_haschildren.c: Return -1 for error case, not 0.
1505 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1507 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1509 * dwarf.h: Add definition for unwind and call frame information.
1511 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1512 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1514 2008-08-15 Roland McGrath <roland@redhat.com>
1516 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1517 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1519 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1521 * dwarf_child.c: Minor optimizations.
1522 * dwarf_getattrs.c: Likewise.
1523 * dwarf_getpubnames.c: Likewise.
1524 * dwarf_siblingof.c: Likewise.
1525 * dwarf_tag.c: Likewise.
1527 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1529 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1530 of DWARF_VERSION comparison, just fail if the file's version is newer.
1532 2008-01-17 Nick Clifton <nickc@redhat.com>
1534 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1535 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1536 (DWARF3_LENGTH_64_BIT): New define.
1537 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1538 * dwarf_getpubnames: Include dwarf.h.
1539 (get_offsets): Use the new definitions.
1540 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1541 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1542 (dwarf_nextcu): Use the new definitions.
1544 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1545 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1546 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1547 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1549 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1552 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1554 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1555 Set the address in the return structure to the address of the next
1556 non-sibling die, if there is no sibling and the return pointer is
1557 not the same as the die pointer.
1558 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1560 * dwarf_child.c: Fix typo in comment.
1562 * libdwP.h (DWARF_VERSION): Change to 3.
1564 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1565 not have a initialised valp pointer.
1567 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1568 the end of the attributes is reached. When the callback fails,
1569 return the address of the failing attribute, not the address of
1571 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1573 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1574 (dwarf_child): Likewise.
1575 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1576 (dwarf_tag): Likewise.
1578 2008-01-08 Roland McGrath <roland@redhat.com>
1580 * Makefile.am (euinclude): Variable removed.
1581 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1582 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1584 2007-10-17 Roland McGrath <roland@redhat.com>
1586 * libdw.h (__deprecated_attribute__): New macro.
1587 (dwarf_formref): Mark it deprecated.
1588 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1589 (dwarf_formref): ... here. Call it. Remove INTDEF.
1590 * libdwP.h: Remove INTDECL.
1591 Declare __libdw_formref.
1592 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1593 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1595 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1596 needs to check CU->version.
1598 * libdwP.h (struct Dwarf_CU): New member `version'.
1599 * libdw_findcu.c (__libdw_findcu): Initialize it.
1601 * dwarf_child.c: Return 1 for null entry as first child.
1603 2007-10-05 Roland McGrath <roland@redhat.com>
1605 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1607 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1608 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1610 2007-10-03 Roland McGrath <roland@redhat.com>
1612 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1613 and dwfl_build_id_find_debuginfo.
1615 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1616 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1618 2007-10-02 Roland McGrath <roland@redhat.com>
1620 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1623 2007-08-07 Roland McGrath <roland@redhat.com>
1625 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1626 error code is DWARF_E_NOERROR (0).
1628 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1629 Fix typo in __libdw_visit_scopes argument.
1631 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1632 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1634 2007-07-03 Roland McGrath <roland@redhat.com>
1636 * libdw.h (__extern_inline): New macro.
1637 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1639 2007-04-16 Roland McGrath <roland@redhat.com>
1641 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1643 2007-04-05 Roland McGrath <roland@redhat.com>
1645 * dwarf_getsrcdirs.c: New file.
1646 * Makefile.am (libdw_a_SOURCES): Add it.
1647 * libdw.h: Declare dwarf_getsrcdirs.
1648 * libdw.map (ELFUTILS_0.127): Add it.
1650 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1651 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1652 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1653 Save DIRARRAY in the Dwarf_Files.
1655 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1656 address to check for all-ones base address entry. Check directly.
1657 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1659 2007-03-25 Roland McGrath <roland@redhat.com>
1661 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1662 Return NULL when freeing RESULT on error.
1663 (global_read, scngrp_read): Check return value from check_section,
1664 break out of loop after it has freed RESULT.
1665 (valid_p): Handle null argument.
1667 2007-03-12 Roland McGrath <roland@redhat.com>
1669 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1671 2007-03-04 Roland McGrath <roland@redhat.com>
1673 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1674 ELFUTILS_0.126. Add dwfl_module_addrsym.
1676 2007-02-10 Roland McGrath <roland@redhat.com>
1678 * dwarf.h (DW_OP_fbreg): Comment fix.
1680 2007-02-03 Roland McGrath <roland@redhat.com>
1682 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1683 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1684 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1685 exported in the past.
1687 2006-12-17 Roland McGrath <roland@redhat.com>
1689 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1690 address when the CU is missing attributes due to buggy GCC.
1692 2006-08-29 Roland McGrath <roland@redhat.com>
1694 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1696 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1697 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1699 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1700 result is aligned. Adjust NEWP->remaining here for this allocation.
1701 * libdwP.h: Update decl.
1702 (libdw_alloc): Update caller.
1704 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1706 * dwarf_child.c: Adjust for internal_function_def removal.
1707 * dwarf_getabbrev.c: Likewise.
1708 * dwarf_tag.c: Likewise.
1709 * libdw_form.c: Likewise.
1710 * memory-access.c: Likewise.
1712 2006-06-28 Roland McGrath <roland@redhat.com>
1714 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1716 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1719 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1721 * libdw.h: Add extern "C".
1723 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1725 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1726 aranges information.
1728 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1730 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1733 2006-02-28 Roland McGrath <roland@redhat.com>
1735 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1736 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1737 values from DWARF 3.0.
1739 2006-02-22 Roland McGrath <roland@redhat.com>
1741 * libdw.map: Bump to 0.120; export dwfl_version.
1743 2005-12-22 Roland McGrath <roland@redhat.com>
1745 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1747 2005-12-12 Roland McGrath <roland@redhat.com>
1749 * dwarf_ranges.c: Copy CU base address-finding code from
1752 2005-12-09 Roland McGrath <roland@redhat.com>
1754 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1755 Delay CU base lookup until it's needed.
1756 If CU base lookup fails with no error, flag invalid DWARF.
1758 2005-11-25 Roland McGrath <roland@redhat.com>
1760 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1762 2005-11-15 Roland McGrath <roland@redhat.com>
1764 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1766 2005-11-13 Roland McGrath <roland@redhat.com>
1768 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1770 2005-10-27 Roland McGrath <roland@redhat.com>
1772 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1773 don't match end_sequence markers.
1775 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1776 before normal records at the same address.
1777 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1780 2005-10-26 Roland McGrath <roland@redhat.com>
1782 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1783 * dwarf_func_file.c: Renamed to ...
1784 * dwarf_decl_file.c: ... here.
1785 * dwarf_func_col.c: Renamed to ...
1786 * dwarf_decl_column.c: ... here.
1787 * dwarf_func_line.c: Renamed to ...
1788 * dwarf_decl_line.c: ... here.
1789 (dwarf_func_line): Renamed to ...
1790 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1791 (__libdw_func_intval): Renamed __libdw_attr_intval.
1792 * dwarf_func_name.c: File removed.
1793 * dwarf_func_lowpc.c: File removed.
1794 * dwarf_func_highpc.c: File removed.
1795 * dwarf_func_entrypc.c: File removed.
1796 * dwarf_func_die.c: File removed.
1797 * Makefile.am (libdw_a_SOURCES): Updated.
1798 * libdw.h: Update decls.
1799 (Dwarf_Func): Type removed.
1800 * libdwP.h: Update decls.
1801 (struct Dwarf_Func_s): Type removed.
1802 * libdw.map: Updated.
1804 * libdwP.h (CUDIE): New macro.
1805 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1806 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1807 * dwarf_ranges.c (dwarf_ranges): Likewise.
1809 * dwarf_getloclist.c: Renamed to ...
1810 * dwarf_getlocation.c: ... here.
1811 (getloclist): Renamed to getlocation.
1812 (dwarf_getloclist): Renamed to dwarf_getlocation.
1813 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1814 * Makefile.am (libdw_a_SOURCES): Updated.
1815 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1816 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1817 (Dwarf_Loc): Renamed Dwarf_Op.
1818 * libdwP.h (struct loc_s): Update use.
1819 * libdw.map: Update map.
1821 * dwarf_entry_breakpoints.c: Use the second line record within the
1822 function, regardless of its source location data.
1824 2005-10-25 Roland McGrath <roland@redhat.com>
1826 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1828 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1830 2005-10-14 Roland McGrath <roland@redhat.com>
1832 * dwarf_diecu.c (dwarf_diecu): New file.
1833 * Makefile.am (libdw_a_SOURCES): Add it.
1834 * libdw.h: Declare dwarf_diecu.
1835 * libdw.map: Export it.
1837 * libdw.map: Bump to 0.116; export dwarf_ranges.
1839 2005-09-20 Roland McGrath <roland@redhat.com>
1841 * dwarf_haspc.c: Use dwarf_ranges.
1842 * dwarf_entry_breakpoints.c: Likewise.
1844 * dwarf_ranges.c: New file.
1845 * Makefile.am (libdw_a_SOURCES): Add it.
1846 * libdw.h: Declare dwarf_ranges.
1847 * libdwP.h: Add INTDECL.
1849 2005-09-14 Roland McGrath <roland@redhat.com>
1851 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1852 prologue_end marker scanning loop.
1854 2005-09-11 Roland McGrath <roland@redhat.com>
1856 * dwarf.h: Comment typo fix.
1858 2005-09-07 Roland McGrath <roland@redhat.com>
1860 * dwarf_entry_breakpoints.c: New file.
1861 * Makefile.am (libdw_a_SOURCES): Add it.
1862 * libdw.h: Declare dwarf_entry_breakpoints.
1864 * dwarf_entrypc.c: New file.
1865 * Makefile.am (libdw_a_SOURCES): Add it.
1866 * libdw.h: Declare dwarf_entrypc.
1867 * libdwP.h: Add INTDECL.
1869 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1871 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1872 (%.os): Use COMPILE.os.
1873 (COMPILE.os): Filter out gconv options.
1875 2005-08-27 Roland McGrath <roland@redhat.com>
1877 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1878 __libdw_visit_scopes.
1880 * dwarf_getscopes_die.c: New file.
1881 * Makefile.am (libdw_a_SOURCES): Add it.
1882 * libdw.h: Declare dwarf_getscopes_die.
1883 * libdw.map: Bump to 0.115 and add it.
1885 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1886 containing a DIE and its parent pointer, instead of just Dwarf_Die.
1887 Take two functions for both preorder and postorder visitors.
1888 * libdwP.h: Update decl.
1889 (struct Dwarf_Die_Chain): New type.
1890 * dwarf_func_inline.c: Update uses.
1892 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1894 * libdwP.h: Add INTDECL.
1895 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1897 2005-08-23 Roland McGrath <roland@redhat.com>
1899 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1900 DW_AT_specification the same as DW_AT_abstract_origin.
1902 2005-08-20 Roland McGrath <roland@redhat.com>
1904 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1905 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1906 and dwfl_report_offline.
1908 2005-08-19 Roland McGrath <roland@redhat.com>
1910 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
1911 Add dwfl_module_relocate_address, dwfl_module_relocations,
1912 dwfl_module_relocation_info.
1914 2005-08-18 Roland McGrath <roland@redhat.com>
1916 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
1917 outermost scope in the results.
1919 2005-08-15 Roland McGrath <roland@redhat.com>
1921 * dwarf_func_inline.c: New file.
1922 * Makefile.am (libdw_a_SOURCES): Add it.
1923 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
1924 * libdw.map: Add them.
1926 * dwarf_func_die.c: New file.
1927 * Makefile.am (libdw_a_SOURCES): Add it.
1928 * libdw.h: Declare dwarf_func_die.
1929 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
1931 2005-08-10 Ulrich Drepper <drepper@redhat.com>
1933 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
1934 of DW_LNS_set_epilog_begin.
1936 2005-08-09 Roland McGrath <roland@redhat.com>
1938 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
1940 * dwarf_end.c: Add INTDEF.
1941 * dwarf_error.c (dwarf_errmsg): Likewise.
1942 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
1944 2005-08-01 Roland McGrath <roland@redhat.com>
1946 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
1947 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1949 2005-07-28 Ulrich Drepper <drepper@redhat.com>
1951 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
1952 (libdw_a_LIBADD): Add all files from libdwfl.a.
1954 2005-07-27 Roland McGrath <roland@redhat.com>
1956 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
1957 along with ../libebl/libebl.a and ../lib/libeu.a;
1958 depend on ../libelf/libelf.so.
1959 (libdw_so_LDADD): New variable.
1960 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
1962 * libdw.map: Define an empty base version and move all symbols to
1963 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
1965 2005-07-23 Ulrich Drepper <drepper@redhat.com>
1967 * dwarf_error.c: Add internal alias for dwarf_errno.
1968 * libdwP.h: Declare __dwarf_errno_internal.
1969 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
1971 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
1974 2005-06-01 Roland McGrath <roland@redhat.com>
1976 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
1977 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
1979 2005-06-08 Roland McGrath <roland@redhat.com>
1981 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
1982 (get_sleb128_step, get_sleb128): Likewise.
1983 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
1984 * dwarf_getloclist.c (getloclist): Likewise.
1985 * dwarf_formblock.c (dwarf_formblock): Likewise.
1986 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1987 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
1988 * dwarf_formref.c (dwarf_formref): Likewise.
1989 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
1990 * dwarf_formudata.c (dwarf_formudata): Likewise.
1991 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1992 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
1993 * dwarf_tag.c (dwarf_tag): Likewise.
1994 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1995 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
1996 * libdw_form.c (__libdw_form_val_len): Likewise.
1997 * libdwP.h: Update decl.
1999 2005-06-04 Roland McGrath <roland@redhat.com>
2001 * memory-access.h (get_uleb128_rest_return): New macro.
2002 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2003 (get_sleb128_rest_return): New macro.
2004 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2005 * memory-access.c: New file.
2006 * Makefile.am (libdw_a_SOURCES): Add it.
2007 (DEFS): Add -DIS_LIBDW.
2009 2005-05-31 Roland McGrath <roland@redhat.com>
2011 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2014 2005-05-30 Roland McGrath <roland@redhat.com>
2016 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2017 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2019 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2020 BEGIN value. Instead, match base address entries separately for
2023 2005-05-28 Roland McGrath <roland@redhat.com>
2025 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2026 past location expression contents.
2028 2005-05-23 Roland McGrath <roland@redhat.com>
2030 * dwarf_getsrclines.c: Comment typo fix.
2032 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2033 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2035 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2037 * libdwP.h: Only use INTDECL for alias prototypes.
2039 2005-05-19 Roland McGrath <roland@redhat.com>
2041 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2043 * dwarf_getscopevar.c: New file.
2044 * Makefile.am (libdw_a_SOURCES): Add it.
2045 * libdw.h: Declare dwarf_getscopevar.
2047 * dwarf_getsrcfiles.c: Add INTDEF.
2048 * dwarf_haschildren.c: Likewise.
2049 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2051 * dwarf_getscopes.c: New file.
2052 * Makefile.am (libdw_a_SOURCES): Add it.
2053 * libdw.h: Declare dwarf_getscopes.
2054 * libdw.map: Add it.
2056 2005-05-18 Roland McGrath <roland@redhat.com>
2058 * libdwP.h (IDX_debug_ranges): New enum constant.
2059 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2060 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2061 * dwarf_error.c (errmsgs): Add it.
2062 * dwarf_haspc.c: New file.
2063 * libdw.h: Declare dwarf_haspc.
2064 * libdw.map: Add it.
2065 * libdwP.h: Add INTDECL.
2067 * dwarf_attr_integrate.c: New file.
2068 * dwarf_hasattr_integrate.c: New file.
2069 * Makefile.am (libdw_a_SOURCES): Add them.
2070 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2071 * libdw.map: Add them.
2073 * dwarf_hasattr.c: Add INTDEF.
2074 * libdwP.h: Add INTDECL for it.
2076 * dwarf_formref_die.c: New file.
2077 * Makefile.am (libdw_a_SOURCES): Add it.
2078 * libdw.h (dwarf_formref_die): Declare it.
2079 * libdwP.h (dwarf_formref_die): Add INTDECL.
2080 * libdw.map: Add it.
2082 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2084 (dwarf_getloclist): ... here. Call them.
2085 (dwarf_addrloclists): New function.
2086 * libdw.h: Declare it.
2087 * libdw.map: Add it.
2089 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2090 DW_MACINFO_end_file. Recognize type 0 as terminator.
2092 2005-05-05 Roland McGrath <roland@redhat.com>
2094 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2096 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2097 the line program does not produce all entries in ascending order.
2099 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2101 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2102 occurences (e.g., inlines) better.
2104 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2106 * libdw.h (DWARF_END_ABBREV): Define.
2107 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2109 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2111 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2112 as error of __libdw_getabbrev.
2114 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2116 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2118 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2119 results back to caller.
2121 2005-04-04 Roland McGrath <roland@redhat.com>
2123 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2125 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2128 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2130 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2132 * dwarf_getsrc_file.c: New file.
2133 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2134 * libdw.h: Declare dwarf_getsrc_file.
2135 * libdw.map: Add dwarf_getsrc_file.
2137 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2139 * dwarf_func_entrypc.c: New file.
2140 * dwarf_func_col.c: New file.
2141 * dwarf_func_line.c: New file.
2142 * dwarf_func_file.c: New file.
2143 * libdw.h: Add prototypes for new functions.
2144 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2146 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2147 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2148 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2149 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2150 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2151 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2153 * dwarf.h: Add some DWARF3 definitions.
2155 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2157 * dwarf_getfuncs.c: New file.
2158 * dwarf_func_highpc.c: New file.
2159 * dwarf_func_lowpc.c: New file.
2160 * dwarf_func_name.c: New file.
2161 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2162 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2163 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2164 and dwarf_func_name.
2165 * libdw.h: Add prototypes for new functions.
2166 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2167 * dwarf_siblingof.c: Likewise.
2168 * dwarf_dieoffset.c: Likewise.
2169 * dwarf_highpc.c: Likewise.
2170 * dwarf_lowpc.c: Likewise.
2171 * libdwP.h: Add prototypes for internal functions.
2172 Define Dwarf_Func_s structure.
2174 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2176 * libdw.h: Add padding in Dwarf_die.
2178 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2179 * dwarf_attr.c: Likewise.
2180 * dwarf_begin.c: Likewise.
2181 * dwarf_begin_elf.c: Likewise.
2182 * dwarf_bitoffset.c: Likewise.
2183 * dwarf_bitsize.c: Likewise.
2184 * dwarf_bytesize.c: Likewise.
2185 * dwarf_diename.c: Likewise.
2186 * dwarf_formaddr.c: Likewise.
2187 * dwarf_formblock.c: Likewise.
2188 * dwarf_formref.c: Likewise.
2189 * dwarf_formstring.c: Likewise.
2190 * dwarf_formudata.c: Likewise.
2191 * dwarf_getarange_addr.c: Likewise.
2192 * dwarf_getarangeinfo.c: Likewise.
2193 * dwarf_getaranges.c: Likewise.
2194 * dwarf_getloclist.c: Likewise.
2195 * dwarf_getmacros.c: Likewise.
2196 * dwarf_getsrc_die.c: Likewise.
2197 * dwarf_getsrcfiles.c: Likewise.
2198 * dwarf_getsrclines.c: Likewise.
2199 * dwarf_highpc.c: Likewise.
2200 * dwarf_lowpc.c: Likewise.
2201 * dwarf_nextcu.c: Likewise.
2202 * dwarf_offdie.c: Likewise.
2203 * dwarf_siblingof.c: Likewise.
2204 * dwarf_srclang.c: Likewise.
2205 * dwarf_tag.c: Likewise.
2206 * libdw_findcu.c: Likewise.
2207 * libdwP.h: Add prototypes for internal functions.
2209 * dwarf_addrdie.c: New file.
2210 * dwarf_macro_opcode.c: New file.
2211 * dwarf_macro_param1.c: New file.
2212 * dwarf_macro_param2.c: New file.
2213 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2214 * libdwP.h: Remove Dwarf_Macro definition.
2215 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2216 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2217 * libdw.map: Add entries for new functions.
2219 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2221 * libdw.h: Handle broken gcc < 4.
2223 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2225 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2227 * dwarf_begin_elf.c: Fix warnings.
2228 * dwarf_dieoffset.c: Likewise.
2229 * dwarf_end.c: Likewise.
2230 * dwarf_error.c: Likewise.
2231 * dwarf_getpubnames.c: Likewise.
2233 * libdwP.h: Add new error values.
2234 * dwarf_error.c: Support new error values.
2235 * dwarf_getpubnames.c: Check parameter value.
2237 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2239 * Makefile.am: Check for text relocations in constructed DSO.
2241 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2243 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2245 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2246 checks to not read over buffer boundaries for ill-formed DWARF data.
2248 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2250 * dwarf_child.c: Make compile with gcc 4.0.
2251 * dwarf_error.c: Likewise.
2252 * dwarf_formblock.c: Likewise.
2253 * dwarf_getabbrev.c: Likewise.
2254 * dwarf_getattrs.c: Likewise.
2255 * dwarf_getsrclines.c: Likewise.
2256 * dwarf_tag.c: Likewise.
2257 * libdw_form.c: Likewise.
2259 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2261 * Makefile.am: Support building with mudflap.
2263 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2264 * dwarf_getsrclines.c: Likewise.
2265 * dwarf_memory-access.h: Likewise.
2267 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2269 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2271 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2272 Third parameter of dwarf_getsrcfiles can be NULL.
2274 * libdw.map: Add dwarf_getmacros.
2275 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2276 * dwarf_getmacros.c: New file.
2278 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2280 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2282 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2284 * dwarf_getsrclines.c:
2285 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2287 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2289 * libdwP.h (_): Use elfutils domain.
2291 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2293 * dwarf_getsrclines.c: Fix typo in comment.
2295 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2297 * Makefile.am: Support building with mudflap.
2299 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2301 * memory-access.h: Add lots of const in case a pointer passed is const.
2303 * dwarf_formflag.c: New file.
2304 * dwarf_getattrs.c: New file.
2305 * dwarf_error.c: Add new error value.
2306 * libdw.h: Add prototypes for new functions. Adjust prototype for
2308 * libdw.map: Add new functions.
2309 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2311 * libdwP.h: Add new error value.
2312 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2315 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2317 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2319 * dwarf_getarange_addr.c: New file
2320 * dwarf_getarangeinfo.c: New file.
2321 * dwarf_getaranges.c: New file.
2322 * dwarf_onerange.c: New file.
2323 * libdw.h: Declare new functions. Define Dwarf_Arange and
2325 * libdw.map: Add new functions.
2326 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2327 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2328 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2329 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2330 * dwarf_error.c: Add new message.
2332 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2334 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2335 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2336 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2337 * dwarf_error.c: Add another message.
2338 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2340 * dwarf_filesrc.c: Likewise.
2341 * dwarf_getsrcfiles.c: Likewise.
2342 * dwarf_getsrclines.c: Likewise.
2343 * dwarf_lineaddr.c: New file.
2344 * dwarf_linebeginstatement.c: New file.
2345 * dwarf_lineblock.c: New file.
2346 * dwarf_linecol.c: New file.
2347 * dwarf_lineendsequence.c: New file.
2348 * dwarf_lineepiloguebegin.c: New file.
2349 * dwarf_lineno.c: New file.
2350 * dwarf_lineprologueend.c: New file.
2351 * dwarf_onesrcline.c: New file.
2352 * dwarf_lineno.c: Change interface to store result in object pointed
2353 to by second parameter.
2354 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2355 prototype. Define Dwarf_Files and Dwarf_Lines.
2356 * libdw.map: Add new functions.
2357 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2358 * libdw_findcu.c: Don't initialize nlines field.
2360 * dwarf_siblingof: Little optimization.
2362 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2363 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2364 * libdwP.h (struct Dwarf): Add free_elf field.
2366 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2368 * dwarf_getstring.c: New file.
2369 * dwarf_offabbrev.c: New file.
2370 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2371 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2372 parameters. Don't allocate memory if not necessary and don't lookup
2373 previous results if no CU given.
2374 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2375 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2376 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2377 * libdwP.h: Change prototype for __libdw_getabbrev.
2379 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2380 returning if this is wanted.
2382 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2384 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2385 with offset_size value.
2386 * libdw.h: Adjust dwarf_nextcu prototype.
2387 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2388 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2389 member of new CU struct.
2390 * dwarf_formstring.c: Depend on offset_size not address_size for
2391 DW_FORM_strp handling.
2392 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2394 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2396 (dwarf_tag): Correctly recognize failed lookup.
2398 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2400 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2401 * dwarf_formblock.c: New file.
2402 * dwarf_getloclist.c: Rewrite to handle a single block.
2403 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2404 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2405 dwarf_getloclistent declaration.
2406 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2407 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2408 Add locs member to struct Dwarf_CU.
2409 * libdw_fundcu.c: Initialize locs member of new CU.
2410 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2411 Remove dwarf_getloclistent.c.
2413 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2415 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2416 * libdwP.h: Likewise.
2418 * dwarf_getloclist.c: New file.
2419 * dwarf_getloclistent.c: New file.
2420 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2421 Declare dwarf_getloclistent and dwarf_getloclist.
2422 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2423 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2424 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2427 * dwarf_error.c: More error messages.
2429 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2431 * dwarf_getsrclines.c: Remove debugging support.
2433 * dwarf_getsrcfiles.c: New file.
2434 * dwarf_filesrc.c: New file.
2435 * libdw.h: Declare these functions. Define Dwarf_File.
2436 * libdwP.c: Adjust Dwarf_File_s definition.
2437 * libdw.map: Add these functions.
2438 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2440 * dwarf_getsrclines.c: Initialize cu->files.
2442 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2444 * libdw.h: Add more nonnull function attributes.
2446 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2447 * dwarf_end.c (cu_free): New function.
2448 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2449 * dwarf_error.c (errmsgs): Add new messages.
2450 * dwarf_getsrc_die.c: New file.
2451 * dwarf_getsrclines.c: New file.
2452 * dwarf_lineno.c: New file.
2453 * dwarf_linesrc.c: New file.
2454 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2455 instead of the *_inc-less variants.
2456 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2457 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2458 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2460 * libdwP.h: Add more error codes.
2461 (struct Dwarf): Remove mem_tail.next member.
2462 (Dwarf_File): Define type.
2463 (struct Dwarf_Line_s): Define type.
2464 (struct Dwarf_CU): Add lines and nlines members.
2465 (libdw_alloc): Define local variable _tail and use it.
2466 Add some function attributes.
2467 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2468 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2469 * memory-access.h: Add unlikely for the endian conversion paths.
2470 * Makefile.am (AM_CFLAGS): Add -std parameter.
2471 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2472 dwarf_lineno, and dwarf_linesrc.
2474 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2476 * Moved to CVS archive.