1 2015-10-13 Chih-Hung Hsieh <chh@google.com>
3 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
4 function 'file_matches' to file scope.
6 2015-10-16 Mark Wielaard <mjw@redhat.com>
8 * Makefile.am (libdw.so): Add -lz.
10 2015-10-14 Chih-Hung Hsieh <chh@google.com>
12 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
13 and 'require_cfa_offset' to file scope.
15 2015-10-09 Josh Stone <jistone@redhat.com>
17 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
20 2015-10-05 Josh Stone <jistone@redhat.com>
22 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
24 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
26 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
27 relocation overflows in some platforms.
29 2015-09-23 Mark Wielaard <mjw@redhat.com>
31 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
32 * dwarf_formref.c (__libdw_formref): Likewise.
33 * libdw_findcu.c (__libdw_findcu): Likewise.
34 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
36 2015-09-22 Mark Wielaard <mjw@redhat.com>
38 * *.c: Remove old-style function definitions.
40 2015-09-15 Mark Wielaard <mjw@redhat.com>
42 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
44 2015-09-09 Chih-Hung Hsieh <chh@google.com>
46 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
47 redundant NULL tests on parameters declared with __nonnull_attribute__.
48 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
49 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
51 2015-09-04 Chih-Hung Hsieh <chh@google.com>
52 Mark Wielaard <mjw@redhat.com>
54 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
55 definition with ansi-C definition and add const qualifier to
58 2015-09-04 Chih-Hung Hsieh <chh@google.com>
60 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
61 definition with ansi-C definitions.
62 (__libdw_findcu): Likewise.
64 2015-08-25 Mark Wielaard <mjw@redhat.com>
66 * dwarf.h: Add DW_LANG_Haskell.
68 2015-06-18 Mark Wielaard <mjw@redhat.com>
70 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
73 2015-06-18 Mark Wielaard <mjw@redhat.com>
75 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
77 2015-06-18 Mark Wielaard <mjw@redhat.com>
79 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
80 dwarf_formudata reports an error.
81 (get_table_for_offset): Likewise.
83 2015-06-08 Mark Wielaard <mjw@redhat.com>
85 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
87 2015-06-06 Mark Wielaard <mjw@redhat.com>
89 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
91 2015-05-27 Mark Wielaard <mjw@redhat.com>
93 * encoded-value.h (read_encoded_value): Check data d_size contains
94 at least enough data to hold a pointer for DW_EH_PE_indirect.
96 2015-05-22 Mark Wielaard <mjw@redhat.com>
98 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
99 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
100 MAX_STACK_DIRS. Calculate number of dirs needed first, then
101 create dirarray directly, without needing the next field. Free
102 not stack allocated lines and files at the end.
104 2015-05-19 Mark Wielaard <mjw@redhat.com>
106 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
107 allocated array to hold locs. Allocate locs bigger than the array
108 with malloc and free them when done.
110 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
112 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
113 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
114 * dwarf_begin_elf.c (inflate_section): New static function, lifted
116 (check_section): ... here. Call inflate_section, set libdw errno to
117 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
119 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
121 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
122 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
124 2015-05-06 Mark Wielaard <mjw@redhat.com>
126 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
127 check the line number.
129 2015-05-05 Mark Wielaard <mjw@redhat.com>
131 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
132 left before reading values.
134 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
136 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
139 2015-04-22 Mark Wielaard <mjw@redhat.com>
141 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
142 (__libdw_max_len_uleb128): New function.
143 (__libdw_max_len_sleb128): Likewise.
144 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
145 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
147 2015-04-21 Mark Wielaard <mjw@redhat.com>
149 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
150 when there are more than 8.
152 2015-04-01 Petr Machata <pmachata@redhat.com>
154 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
155 (is_cudie): New function.
156 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
157 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
158 of white-listing valid tags.
159 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
161 2015-03-18 Petr Machata <pmachata@redhat.com>
163 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
164 (EXTRA_DIST): Remove known-dwarf.h.
166 2015-02-09 Mark Wielaard <mjw@redhat.com>
168 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
169 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
170 for new Fortran language codes is 1.
172 2015-02-09 Mark Wielaard <mjw@redhat.com>
174 * dwarf.h: Add DW_TAG_atomic_type.
175 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
176 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
178 2015-02-11 Josh Stone <jistone@redhat.com>
180 * encoded-value.h (read_encoded_value): Initialize value.
182 2015-02-11 Petr Machata <pmachata@redhat.com>
184 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
185 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
186 the fact in *BASEP and bail out later if it hasn't been updated by
187 __libdw_read_begin_end_pair_inc.
189 2014-12-24 Mark Wielaard <mjw@redhat.com>
191 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
192 smaller than or equal to addr, rather than returning immediately on
195 2015-01-07 Mark Wielaard <mjw@redhat.com>
197 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
198 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
199 room in the search table for all entries. Store search_table_len.
200 (getcfi_scn_eh_frame): Likewise.
201 * encoded-value.h (encoded_value_size): Don't abort, return zero.
202 (__libdw_cfi_read_address_inc): Check there is enough room to read
203 values. Pass other byte order to read functions.
204 (read_encoded_value): Check encoded_value_size. Don't abort, but
205 set libdw errno and report failure. Check there is enough room to
207 * fde.c (binary_search_fde): Check encoded value size. Add hdr
208 data buf and size to dummy_cfi.
210 2015-01-04 Mark Wielaard <mjw@redhat.com>
212 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
213 is after current DIE.
215 2015-01-04 Mark Wielaard <mjw@redhat.com>
217 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
218 (dwarf_frame_register).
220 2015-01-02 Mark Wielaard <mjw@redhat.com>
222 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
223 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
224 (getcfi_scn_eh_frame): Check d_buf is not NULL.
226 2015-01-02 Mark Wielaard <mjw@redhat.com>
228 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
229 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
230 DW_OP_addr if dbg is NULL then read argument directly.
232 2015-01-14 Jason P. Leasure <jpleasu@super.org>
234 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
237 2014-12-27 Mark Wielaard <mjw@redhat.com>
239 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
240 still falls inside CU data.
242 2015-01-11 Mark Wielaard <mjw@redhat.com>
244 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
245 __libdw_visit_scopes with NULL imports.
246 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
247 * dwarf_getscopes.c (pc_record): Likewise.
248 (dwarf_getscopes): Likewise.
249 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
250 * libdwP.h (__libdw_visit_scopes): Add imports argument.
251 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
252 function imports_contains. Push and pop imports around walk_children
253 when processing DW_TAG_imported_unit.
255 2014-12-18 Ulrich Drepper <drepper@gmail.com>
257 * Makefile.am: Suppress output of textrel_check command.
259 2014-12-16 Mark Wielaard <mjw@redhat.com>
261 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
264 2014-12-16 Mark Wielaard <mjw@redhat.com>
266 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
267 space to read die offset.
269 2014-12-16 Mark Wielaard <mjw@redhat.com>
271 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
274 2014-12-15 Mark Wielaard <mjw@redhat.com>
276 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
277 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
278 (dwarf_getpubnames): Make sure section data contains string zero
281 2014-12-16 Mark Wielaard <mjw@redhat.com>
283 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
284 the compiler optimize for the common single-byte case.
286 2014-12-15 Josh Stone <jistone@redhat.com>
288 * memory-access.h (__libdw_max_len_leb128): New.
289 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
290 (__libdw_get_sleb128): Likewise.
292 2014-12-14 Mark Wielaard <mjw@redhat.com>
294 * cfi.c (execute_cfi): Add program bounds checks.
295 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
296 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
297 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
298 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
299 * dwarf_formudata.c (dwarf_formudata): Likewise.
300 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
301 with end of data buf.
302 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
303 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
304 call gets enough data.
305 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
306 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
308 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
310 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
311 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
312 get_uleb128 with lineendp.
313 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
314 get_uleb128 with endp.
315 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
316 get_uleb128/get_sleb128 with limit.
317 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
318 get_sleb128 get called with enough data.
319 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
320 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
321 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
323 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
324 Don't call get_uleb128_step if out of data.
325 (__libdw_get_sleb128): Likewise for get_sleb128_step.
327 2014-12-12 Mark Wielaard <mjw@redhat.com>
329 * libdwP.h (struct Dwarf): Add fake_loc_cu.
331 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
332 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
333 (__libdw_form_val_len): Likewise.
334 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
335 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
336 the already found data buffer directly.
337 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
338 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
339 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
341 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
342 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
343 * dwarf_getlocation_attr.c (attr_form_cu): New function.
344 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
345 (getlocation): Handle empty blocks immediately.
346 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
347 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
348 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
350 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
351 fake_cu. Call __libdw_form_val_len with just fake_cu.
352 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
353 datap and size directly from cu startp and endp.
355 2014-12-11 Mark Wielaard <mjw@redhat.com>
357 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
359 2014-12-13 Mark Wielaard <mjw@redhat.com>
361 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
362 difference doesn't wrap around before returning as int.
364 2014-12-11 Josh Stone <jistone@redhat.com>
366 * dwarf_getsrclines.c (struct linelist): Add sequence.
367 (compare_lines): Take linelists, and break ties by sequence.
368 (read_srclines): Use linelists for sorting.
369 (read_srclines::add_new_line): Set sequence.
371 2014-12-10 Josh Stone <jistone@redhat.com>
373 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
374 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
375 * dwarf_child.c (dwarf_child): Use cu->endp.
376 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
377 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
378 * dwarf_siblingof.c (dwarf_siblingof): Use both.
380 2014-12-10 Josh Stone <jistone@redhat.com>
382 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
384 2014-12-10 Josh Stone <jistone@redhat.com>
386 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
387 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
388 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
389 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
390 * dwarf_tag.c (dwarf_tag): Likewise.
392 2014-12-04 Mark Wielaard <mjw@redhat.com>
394 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
395 (__libdw_form_val_len): Likewise and check len doesn't overflow.
396 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
397 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
399 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
400 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
402 2014-12-02 Petr Machata <pmachata@redhat.com>
404 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
406 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
407 * libdw.h (DWARF_GETMACROS_START): New macro.
409 2014-11-27 Mark Wielaard <mjw@redhat.com>
411 * Makefile.am (libdw.so): Use textrel_check.
413 2014-11-27 Mark Wielaard <mjw@redhat.com>
415 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
416 search_table_entries and search_table_encoding.
418 2014-11-24 Mark Wielaard <mjw@redhat.com>
420 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
423 2014-11-23 Mark Wielaard <mjw@redhat.com>
425 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
426 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
427 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
429 2014-11-23 Mark Wielaard <mjw@redhat.com>
431 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
432 Set libdw errno and return NULL.
434 2014-11-24 Mark Wielaard <mjw@redhat.com>
436 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
437 (DW_LANG_C11): Likewise.
438 (DW_LANG_C_plus_plus_14): Likewise.
439 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
440 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
442 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
445 2014-11-26 Mark Wielaard <mjw@redhat.com>
447 * dwarf.h (DW_AT_noreturn): Added.
449 2014-11-11 Mark Wielaard <mjw@redhat.com>
451 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
452 explicitly as uint8_t.
453 (__libdw_getsrclines): Add internal_function to declaration.
455 2014-09-10 Petr Machata <pmachata@redhat.com>
457 * dwarf_macro_getparamcnt.c: New file.
458 * dwarf_macro_param.c: New file.
459 * dwarf_macro_getsrcfiles.c: New file.
460 * Makefile.am (libdw_a_SOURCES): Add the new files.
461 * libdwP.h (struct files_lines_s): New structure.
462 (DWARF_E_INVALID_OPCODE): New enumerator.
463 (struct Dwarf): New fields macro_ops, files_lines.
464 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
465 keeping macro opcode prototypes in.
466 (Dwarf_Macro_s): Redefine from scratch.
467 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
469 * dwarf_error.c (errmsgs): Add a message for
470 DWARF_E_INVALID_OPCODE.
471 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
473 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
474 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
476 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
477 (get_offset_from, macro_op_compare, build_table)
478 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
479 (cache_op_table, read_macros, gnu_macros_getmacros_off)
480 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
482 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
483 * dwarf_getsrclines.c (read_srclines): New function with guts
484 taken from dwarf_getsrclines.
485 (__libdw_getsrclines): Likewise.
486 (__libdw_getcompdir, files_lines_compare): New functions.
487 (dwarf_getsrclines): Make it dispatch to the new interfaces.
488 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
490 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
491 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
492 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
494 2014-10-06 Mark Wielaard <mjw@redhat.com>
496 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
497 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
498 (aggregate_size): Likewise. Add old and new version.
499 * dwarf_peel_type.c: New file.
500 * libdw.h (dwarf_peel_type): New function declaration.
501 * libdwP.h (dwarf_peel_type): New internal declaration.
502 * libdw.map (ELFUTILS_0.161): New section.
504 2014-10-15 Petr Machata <pmachata@redhat.com>
506 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
507 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
509 2014-10-05 Mark Wielaard <mjw@redhat.com>
511 * dwarf.h: Add DW_AT_GNU_deleted.
513 2014-10-02 Mark Wielaard <mjw@redhat.com>
515 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
516 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
517 DW_TAG_rvalue_reference_type.
519 2014-09-12 Petr Machata <pmachata@redhat.com>
521 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
522 8-byte quantities. Consequently, rename to...
523 (read_addr_unaligned_inc): ... this.
524 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
525 (read_sbyte_unaligned): Drop.
527 2014-09-10 Petr Machata <pmachata@redhat.com>
529 * dwarf_getlocation.c (attr_ok): Also accept
530 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
531 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
533 2014-08-15 Mark Wielaard <mjw@redhat.com>
535 * dwarf_cu_die.c: New file.
536 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
537 * libdw.h (dwarf_cu_die): New function declaration.
538 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
540 2014-08-15 Mark Wielaard <mjw@redhat.com>
542 * dwarf_cu_getdwarf.c: New file.
543 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
544 * libdw.h (Dwarf_CU): New typedef.
545 (dwarf_cu_getdwarf): New function declaration.
546 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
548 2014-06-18 Mark Wielaard <mjw@redhat.com>
550 * dwarf.h: Remove DW_TAG_mutable_type.
552 2014-05-02 Mark Wielaard <mjw@redhat.com>
554 * libdwP.h (__check_build_id): Removed now unused.
556 2014-05-01 Mark Wielaard <mjw@redhat.com>
558 * libdwP.h (struct Dwarf): Remove free_alt.
559 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
560 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
562 2014-04-30 Mark Wielaard <mjw@redhat.com>
564 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
566 2014-04-15 Florian Weimer <fweimer@redhat.com>
568 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
569 (open_debugaltlink): Move to libdwfl.
570 (check_section): Do not locate alternate debuginfo.
572 2014-04-24 Florian Weimer <fweimer@redhat.com>
574 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
576 2014-04-22 Florian Weimer <fweimer@redhat.com>
578 * dwarf_getalt.c, dwarf_setalt.c: New files.
579 * Makefile.am (libdw_a_SOURCES): Add them.
580 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
581 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
583 * libdw.map (ELFUTILS_0.159): Export the two new functions.
585 2014-04-15 Florian Weimer <fweimer@redhat.com>
587 * libdwP.h (enum IDX_gnu_debugaltlink): New.
588 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
590 (check_section): Obtain .gnu_debugaltlink section from the
593 2014-04-11 Mark Wielaard <mjw@redhat.com>
595 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
596 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
597 (libdwelf_objects): New variable.
598 (libdw_a_LIBADD): Add libdwelf objects.
600 2014-04-22 Mark Wielaard <mjw@redhat.com>
602 * memory-access.h (get_sleb128_step): Remove undefined behavior
603 of left shifting a signed value. Replace it with a multiplication.
605 2014-04-13 Mark Wielaard <mjw@redhat.com>
607 * Makefile.am: Remove !MUDFLAP conditions.
609 2014-04-09 Mark Wielaard <mjw@redhat.com>
611 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
612 before calling malloc to uncompress data.
614 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
616 Fix abort() on missing section headers.
617 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
618 New label err to return NULL.
620 2014-02-05 Josh Stone <jistone@redhat.com>
622 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
623 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
624 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
626 2013-12-30 Mark Wielaard <mjw@redhat.com>
628 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
629 dwfl_linux_proc_attach.
631 2013-12-20 Mark Wielaard <mjw@redhat.com>
633 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
635 2013-12-18 Mark Wielaard <mjw@redhat.com>
637 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
638 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
639 dwfl_module_getsym_info.
641 2013-12-16 Mark Wielaard <mjw@redhat.com>
643 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
645 2013-12-10 Josh Stone <jistone@redhat.com>
647 * memory-access.h (get_uleb128_rest_return): Removed.
648 (get_sleb128_rest_return): Removed.
649 (get_uleb128_step): Make this a self-contained block.
650 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
651 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
652 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
653 (__libdw_get_uleb128): Simplify and inline for all callers.
654 (__libdw_get_sleb128): Ditto.
655 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
656 * memory-access.c: Delete file.
657 * Makefile.am (libdw_a_SOURCES): Remove it.
658 (DEFS): Remove the now unused -DIS_LIBDW.
660 2013-12-09 Josh Stone <jistone@redhat.com>
662 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
663 __libdw_form_val_len, now handling only non-constant form lengths.
664 * libdwP.h (__libdw_form_val_len): New inlined function.
666 2013-12-09 Mark Wielaard <mjw@redhat.com>
668 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
669 location expressions.
670 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
671 location found, return empty location expression.
672 * dwarf_getlocation_implicit_pointer.c
673 (dwarf_getlocation_implicit_pointer): Likewise.
674 (__libdw_empty_loc_attr): New internal function.
675 * libdwP.h (__libdw_empty_loc_attr): Define.
677 2013-11-27 Mark Wielaard <mjw@redhat.com>
679 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
680 dwfl_module_getsym_elf.
682 2013-11-26 Mark Wielaard <mjw@redhat.com>
684 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
685 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
686 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
687 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
688 (ELFUTILS_0.158): ... here.
690 2013-11-09 Mark Wielaard <mjw@redhat.com>
692 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
693 check that it is zero.
695 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
697 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
698 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
699 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
700 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
701 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
703 2013-11-01 Michael Forney <mforney@mforney.org>
705 * Makefile.am (libdwfl_objects): New definition.
706 (libdw_a_LIBADD): Use libdwfl_objects.
708 2013-11-01 Michael Forney <mforney@mforney.org>
710 * Makefile.am: Use READELF.
712 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
714 * libdw.map (ELFUTILS_0.158): New.
716 2013-10-10 Mark Wielaard <mjw@redhat.com>
718 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
719 start_addr and rename last_offset to last_addr. Now both void *.
720 (tree_visitor): Use start_add and die_addr instead of start_offset
722 (dwarf_getfuncs): Use last_addr instead of last_offset.
724 2013-10-06 Mark Wielaard <mjw@redhat.com>
726 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
727 DW_CFA_val_expression are not used with abi_cfi.
729 2013-10-03 Josh Stone <jistone@redhat.com>
731 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
732 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
733 a unit, make sure to always hash the sig8 here, so none are missed.
735 2013-09-29 Mark Wielaard <mjw@redhat.com>
737 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
738 uintptr_t before casting to char *.
739 (__libdw_intern_expression): Cast data to uintptr_t before casting
741 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
742 op->number2 to uintptr_t before casting to char *.
744 2013-09-24 Josh Stone <jistone@redhat.com>
746 * libdw_visit_scopes.c (classify_die): Removed.
747 (may_have_scopes): New function to replace classify_die. There's no
748 need for full classification; just find tags that may contain scopes.
749 (__libdw_visit_scopes): Use a direct tag comparison for imported
750 units, and use may_have_scopes to test if recursion is needed.
752 2013-09-20 Mark Wielaard <mjw@redhat.com>
754 * dwarf_getfuncs.c (visitor_info): New struct.
755 (tree_visitor): New function.
756 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
757 * libdw.h (dwarf_getfuncs): Expand function documentation.
759 2013-09-12 Mark Wielaard <mjw@redhat.com>
761 * fde.c (intern_fde): Free fde and set libdw errno when start
762 or end could not be read.
764 2013-08-24 Mark Wielaard <mjw@redhat.com>
766 * dwarf_getlocation.c (store_implicit_value): Don't take data
767 as argument, get block data from op number2. Return false when
768 block data length and op number don't match up.
769 (__libdw_intern_expression): Store start of block for
770 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
771 relative data offset. Also store block start (including length)
772 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
773 * dwarf_getlocation_attr.c: New file.
774 * dwarf_getlocation_die.c: Likewise.
775 * libdw.h (dwarf_getlocation_die): New function definition.
776 (dwarf_getlocation_attr): Likewise.
777 * libdwP.h: Declare internal dwarf_getlocation_die.
778 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
779 dwarf_getlocation_attr.
780 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
781 dwarf_getlocation_attr.c.
783 2013-08-23 Mark Wielaard <mjw@redhat.com>
785 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
786 (attr_base_address): New function.
787 (initial_offset_base): New function.
788 (getlocations_addr): New function. Taken from...
789 (dwarf_getlocation_addr): here. Use new initial_offset_base and
791 (dwarf_getlocations): New function.
792 * libdw.h (dwarf_getlocations): New function definition.
793 * libdw.map (ELFUTILS_0.157): New.
795 2013-07-02 Mark Wielaard <mjw@redhat.com>
797 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
798 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
799 NEW_LINE macro. Free malloced line records if any at the end.
801 2013-07-02 Mark Wielaard <mjw@redhat.com>
803 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
805 2013-06-26 Mark Wielaard <mjw@redhat.com>
807 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
808 DIEs without children. Return an error whenever dwarf_child or
809 dwarf_siblingof return an error. Don't call recurse and increase
810 the depth for an imported unit. Walk the children of an imported
811 unit as if they are logical children of the parent root DIE.
813 2013-05-03 Mark Wielaard <mjw@redhat.com>
815 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
818 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
820 * libdw.map (ELFUTILS_0.156): New.
822 2013-04-24 Mark Wielaard <mjw@redhat.com>
824 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
826 2013-04-10 Mark Wielaard <mjw@redhat.com>
828 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
829 equal to address size when we have a DW_FORM_ref_addr for DWARF
832 2013-03-25 Mark Wielaard <mjw@redhat.com>
834 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
837 2013-03-12 Mark Wielaard <mjw@redhat.com>
839 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
840 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
842 2013-02-15 Mark Wielaard <mjw@redhat.com>
844 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
845 not dbg->sectiondata.
847 2013-01-07 Roland McGrath <roland@hack.frob.com>
850 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
851 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
853 2012-12-18 Mark Wielaard <mjw@redhat.com>
855 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
856 (check_section): Likewise on error.
857 (scngrp_read): Likewise.
858 (dwarf_begin_elf): Likewise.
860 2012-10-09 Petr Machata <pmachata@redhat.com>
862 * dwarf_getlocation.c (__libdw_intern_expression): Handle
863 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
864 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
865 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
867 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
869 * cfi.c: New include system.h.
870 (execute_cfi) (enough_registers): Clear new memory after realloc.
872 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
874 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
875 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
878 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
880 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
881 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
882 Remove the later DW_OP_call_frame_cfa push to RESULT.
884 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
887 * fde.c (binary_search_fde): Remove always true <address >= start>
888 conditional. Move L initialization upwards.
890 2012-08-24 Mark Wielaard <mjw@redhat.com>
892 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
893 when ENABLE_DWZ is defined.
894 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
897 2012-08-16 Mark Wielaard <mjw@redhat.com>
899 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
900 * dwarf.h (DW_LANG_Go): Update comment.
901 (DW_LANG_Mips_Assembler): Likewise.
903 2012-06-27 Mark Wielaard <mjw@redhat.com>
905 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
906 * dwarf_begin.c (dwarf_begin): Add INTDEF.
907 * dwarf_begin_elf.c (__check_build_id): New internal_function.
908 (try_debugaltlink): New function.
909 (open_debugaltlink): Likewise.
910 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
911 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
913 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
914 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
916 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
917 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
918 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
920 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
921 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
922 (struct Dwarf): Add alt_dwarf and free_alt fields.
923 (__libdw_read_offset): Add dbg_ret argument, use to check with
924 __libdw_offset_in_section.
925 (__check_build_id): New function declaration.
926 (dwarf_begin): Define as INTDECL.
927 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
928 and DW_FORM_GNU_strp_alt.
930 2012-07-19 Mark Wielaard <mjw@redhat.com>
932 * dwarf.h: Add DW_OP_GNU_parameter_ref.
934 2012-07-24 Mark Wielaard <mjw@redhat.com>
936 * dwarf.h: Correct spelling of DW_LANG_ObjC.
937 * dwarf_aggregate_size.c (array_size): Use correct spelling of
940 2012-07-24 Mark Wielaard <mjw@redhat.com>
942 * dwarf.h: Add DW_ATE_UTF.
944 2012-06-27 Mark Wielaard <mjw@redhat.com>
946 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
948 2012-06-26 Mark Wielaard <mjw@redhat.com>
950 * libdwP.h: Add IDX_debug_macro.
951 * dwarf.h: Add DW_AT_GNU_macros.
952 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
953 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
955 2012-04-27 Mark Wielaard <mjw@redhat.com>
957 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
958 a constant offset from DW_AT_low_pc.
960 2012-03-19 Tom Tromey <tromey@redhat.com>
962 * libdw_findcu.c (findcu_cb): Move earlier.
963 (__libdw_intern_next_unit): Add new CU to search tree here...
964 (__libdw_findcu): ... not here.
966 2012-01-31 Mark Wielaard <mjw@redhat.com>
968 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
970 2011-11-31 Mark Wielaard <mjw@redhat.com>
972 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
974 2011-07-14 Mark Wielaard <mjw@redhat.com>
976 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
978 2011-05-16 Jakub Jelinek <jakub@redhat.com>
980 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
981 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
984 2011-04-26 Mark Wielaard <mjw@redhat.com>
986 * dwarf_child (dwarf_child): Sanity check end of section against
987 cu_data () of die->cu.
989 2011-03-22 Mark Wielaard <mjw@redhat.com>
991 * dwarf.h: Add DW_TAG_GNU_call_site,
992 DW_TAG_GNU_call_site_parameter,
993 DW_AT_GNU_call_site_value,
994 DW_AT_GNU_call_site_data_value,
995 DW_AT_GNU_call_site_target,
996 DW_AT_GNU_call_site_target_clobbered,
998 DW_AT_GNU_all_tail_call_sites,
999 DW_AT_GNU_all_call_sites,
1000 DW_AT_GNU_all_source_call_sites,
1001 and DW_OP_GNU_entry_value.
1003 2011-03-10 Petr Machata <pmachata@redhat.com>
1005 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1006 abbreviation with code 0.
1008 2011-03-09 Petr Machata <pmachata@redhat.com>
1010 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1012 2011-02-23 Roland McGrath <roland@redhat.com>
1014 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1015 Declare __libdw_free_zdata.
1016 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1017 (dwarf_end): Call it.
1019 * dwarf_begin_elf.c (valid_p): Likewise.
1020 (check_section, scngrp_read): Likewise.
1021 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1023 2010-10-13 Roland McGrath <roland@redhat.com>
1025 * dwarf.h: Add DW_LANG_Go.
1027 2010-10-05 Roland McGrath <roland@redhat.com>
1029 * dwarf_getaranges.c: Use malloc rather than alloca,
1030 since the total number of elements can be quite huge.
1032 2010-07-26 Roland McGrath <roland@redhat.com>
1034 * dwarf_getlocation_implicit_pointer.c: New file.
1035 * Makefile.am (libdw_a_SOURCES): Add it.
1036 * libdw.map (ELFUTILS_0.149): New set.
1037 Add dwarf_getlocation_implicit_pointer.
1038 * libdw.h: Declare it.
1040 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1041 (dwarf_offdie, dwarf_offdie_types): Update callers.
1042 * libdwP.h: Declare it.
1044 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1045 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1047 2010-08-24 Roland McGrath <roland@redhat.com>
1049 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1051 2010-07-27 Roland McGrath <roland@redhat.com>
1053 * dwarf_formref_die.c: Fix sig8 hash insertion.
1055 2010-06-23 Roland McGrath <roland@redhat.com>
1057 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1058 * libdw.h: Remove it.
1059 * libdw.map: Likewise.
1061 2010-06-22 Roland McGrath <roland@redhat.com>
1063 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1065 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1068 2010-06-21 Roland McGrath <roland@redhat.com>
1070 * dwarf.h: Add DW_TAG_GNU_* constants.
1072 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1075 2010-06-20 Roland McGrath <roland@redhat.com>
1077 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1078 to search TUs instead of CUs.
1079 * libdwP.h: Update decl.
1080 (struct Dwarf): New member tu_tree.
1081 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1082 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1083 (dwarf_offdie): ... here.
1084 (dwarf_offdie_types): New function.
1085 * libdw.h: Declare it.
1086 * libdw.map (ELFUTILS_0.148): Add it.
1088 * libdwP.h (CUDIE): Use cu_data.
1089 * dwarf_formblock.c: Likewise.
1090 * dwarf_formref_die.c: Likewise.
1091 * dwarf_diecu.c: Use CUDIE macro.
1092 * dwarf_formaddr.c: Use cu_sec_idx.
1094 2010-06-16 Roland McGrath <roland@redhat.com>
1096 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1097 we don't repeat a CU lookup we've already done. Handle
1098 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1100 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1102 (__libdw_findcu): ... here. Call it.
1103 * libdwP.h: Declare it.
1104 (struct Dwarf): New member next_tu_offset.
1106 * dwarf_sig8_hash.c: New file.
1107 * dwarf_sig8_hash.h: New file.
1108 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1109 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1111 * libdwP.h (struct Dwarf): New member sig8_hash.
1112 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1113 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1115 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1116 (dwarf_nextcu): ... here. Call it.
1117 * libdw.h: Declare it.
1118 * libdwP.h: Add INTDECL.
1119 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1120 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1122 * libdwP.h (cu_sec_idx, cu_data): New functions.
1123 Use .debug_types when CU is a TU.
1124 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1125 * dwarf_siblingof.c: Likewise.
1126 * dwarf_formstring.c: Likewise.
1127 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1128 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1129 (dwarf_getlocation_addr): Likewise.
1131 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1132 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1133 .debug_types header size instead of .debug_info header size.
1135 * dwarf_diecu.c: Update caller.
1136 * dwarf_getaranges.c: Likewise.
1137 * dwarf_nextcu.c: Likewise.
1138 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1140 * fde.c (fde_by_offset): Renamed to ...
1141 (__libdw_fde_by_offset): ... this, made global and internal_function.
1142 Don't take ADDRESS argument.
1143 (__libdw_find_fde): Update caller. Do address sanity check here.
1144 * cfi.h: Declare __libdw_fde_by_offset.
1145 * cfi.c (dwarf_cfi_validate_fde): New function.
1146 * libdw.h: Declare it.
1147 * libdw.map (ELFUTILS_0.148): Add it.
1149 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1150 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1152 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1153 Don't assume DW_EH_PE_aligned refers to native address size.
1155 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1158 2010-06-17 Roland McGrath <roland@redhat.com>
1160 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1162 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1163 into an inner inline function. Set new fields. Check all fields for
1164 overflow when setting.
1165 * dwarf_lineisa.c: New file.
1166 * dwarf_linediscriminator.c: New file.
1167 * dwarf_lineop_index.c: New file.
1168 * Makefile.am (libdw_a_SOURCES): Add them.
1169 * libdw.map (ELFUTILS_0.148): Add them.
1170 * libdw.h: Declare them.
1172 2010-06-16 Roland McGrath <roland@redhat.com>
1174 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1176 * fde.c (fde_by_offset): Renamed to ...
1177 (__libdw_fde_by_offset): ... this, made global and internal_function.
1178 Don't take ADDRESS argument.
1179 (__libdw_find_fde): Update caller. Do address sanity check here.
1180 * cfi.h: Declare __libdw_fde_by_offset.
1181 * cfi.c (dwarf_cfi_validate_fde): New function.
1182 * libdw.h: Declare it.
1183 * libdw.map (ELFUTILS_0.148): Add it.
1185 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1186 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1188 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1189 Don't assume DW_EH_PE_aligned refers to native address size.
1191 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1194 2010-06-15 Roland McGrath <roland@redhat.com>
1196 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1198 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1199 here, since we don't support it yet.
1201 * dwarf_next_cfi.c: Handle version 4 format.
1203 * dwarf_getsrclines.c: Handle version 4 format.
1205 2010-06-01 Roland McGrath <roland@redhat.com>
1207 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1208 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1210 * libdwP.h (CIE_VERSION): Remove unused macro.
1212 * dwarf_getsrclines.c: Fix version field test.
1213 * libdwP.h (DWARF_VERSION): Remove useless macro.
1215 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1217 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1219 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1221 2010-05-31 Mark Wielaard <mjw@redhat.com>
1223 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1224 * libdw.h (dwarf_cfi_cie_p): ... here.
1226 2010-05-31 Mark Wielaard <mjw@redhat.com>
1228 * dwarf.h: Fix DW_LANG_Python constant.
1230 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1232 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1235 2010-05-27 Roland McGrath <roland@redhat.com>
1237 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1238 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1240 2010-05-08 Roland McGrath <roland@redhat.com>
1242 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1243 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1244 (getlocation): Update caller.
1245 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1246 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1247 * libdwP.h: Update decl.
1249 2010-04-26 Roland McGrath <roland@redhat.com>
1251 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1252 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1253 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1254 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1256 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1257 Prepend DW_OP_call_frame_cfa if true.
1258 (getlocation): Update caller.
1259 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1260 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1261 * libdwP.h: Update decl.
1263 2010-04-22 Roland McGrath <roland@redhat.com>
1265 * cfi.c (execute_cfi): Never return without cleanup.
1267 (cie_cache_initial_state): Adjust caller to expect that free.
1268 (__libdw_frame_at_address): Likewise.
1270 2010-03-10 Roland McGrath <roland@redhat.com>
1272 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1274 2010-02-15 Roland McGrath <roland@redhat.com>
1276 * Makefile.am: Use config/eu.am for common stuff.
1278 2010-02-02 Mark Wielaard <mjw@redhat.com>
1280 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1282 2010-01-07 Roland McGrath <roland@redhat.com>
1284 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1286 2010-01-05 Roland McGrath <roland@redhat.com>
1288 * dwarf_aggregate_size.c: New file.
1289 * Makefile.am (libdw_a_SOURCES): Add it.
1290 * libdw.h: Declare it.
1291 * libdwP.h: Add INTDECL.
1292 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1294 * dwarf_srclang.c: Add INTDEF.
1295 * libdwP.h: Add INTDECL.
1297 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1299 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1301 2009-11-21 Roland McGrath <roland@redhat.com>
1303 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1306 2009-10-15 Roland McGrath <roland@redhat.com>
1308 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1309 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1311 2009-09-17 Roland McGrath <roland@redhat.com>
1313 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1314 argument a pointer to const.
1315 * libdw.h: Update decl.
1317 2009-09-10 Roland McGrath <roland@redhat.com>
1319 * dwarf_getlocation.c (store_implicit_value): New function.
1320 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1321 (dwarf_getlocation_implicit_value): New function.
1322 * libdw.h: Declare it.
1323 * libdw.map (ELFUTILS_0.143): Add it.
1325 2009-09-09 Mark Wielaard <mjw@redhat.com>
1327 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1329 2009-08-21 Josh Stone <jistone@redhat.com>
1331 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1333 2009-08-10 Roland McGrath <roland@redhat.com>
1335 * dwarf_getscopevar.c: Use dwarf_diename.
1337 2009-08-09 Roland McGrath <roland@redhat.com>
1339 * libdw.map (ELFUTILS_0.143): New version set,
1340 inherits from ELFUTILS_0.142.
1341 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1342 alias in the ELFUTILS_0.122 version set and the default in the new set.
1343 * dwarf_srclang.c: Likewise.
1344 * dwarf_decl_file.c: Likewise.
1345 * dwarf_decl_line.c: Likewise.
1346 * dwarf_decl_column.c: Likewise.
1347 * dwarf_bytesize.c: Likewise.
1348 * dwarf_bitsize.c: Likewise.
1349 * dwarf_bitoffset.c: Likewise.
1351 2009-08-07 Roland McGrath <roland@redhat.com>
1353 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1354 * dwarf_srclang.c: Likewise.
1355 * dwarf_decl_file.c: Likewise.
1356 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1357 * dwarf_bytesize.c: Likewise.
1358 * dwarf_bitsize.c: Likewise.
1359 * dwarf_bitoffset.c: Likewise.
1361 2009-07-22 Roland McGrath <roland@redhat.com>
1363 * dwarf_frame_cfa.c: Change calling convention.
1364 * libdw.h: Update decl.
1366 * dwarf_frame_register.c: Change calling/return-value convention for
1367 value-only results and undefined/same_value.
1368 * libdw.h: Update decl.
1370 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1371 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1372 return that value instead.
1373 (getlocation): Update caller.
1374 * dwarf_frame_cfa.c: Likewise.
1375 * libdwP.h: Update decl.
1377 2009-07-21 Roland McGrath <roland@redhat.com>
1379 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1380 Fix loop iteration after skipping a bogus or useless CU.
1382 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1383 absence, not DWARF_E_NO_DEBUG_LINE.
1385 2009-07-20 Roland McGrath <roland@redhat.com>
1387 * dwarf_getlocation.c (__libdw_intern_expression):
1388 Handle DW_OP_stack_value.
1390 2009-07-16 Roland McGrath <roland@redhat.com>
1392 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1393 reject others when CU's version > 3.
1395 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1397 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1398 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1399 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1400 and DW_AT_const_expr.
1401 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1402 and DW_FORM_ref_sig8.
1404 2009-07-15 Roland McGrath <roland@redhat.com>
1406 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1407 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1409 2009-07-13 Roland McGrath <roland@redhat.com>
1411 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1413 2009-07-08 Roland McGrath <roland@redhat.com>
1415 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1418 * libdwP.h (struct Dwarf): Add member `cfi'.
1419 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1420 * dwarf_getcfi.c: New file.
1421 * dwarf_getcfi_elf.c: New file.
1422 * dwarf_cfi_end.c: New file.
1423 * dwarf_cfi_addrframe.c: New file.
1424 * dwarf_frame_cfa.c: New file.
1425 * dwarf_frame_register.c: New file.
1426 * dwarf_frame_return_address_register.c: New file.
1427 * Makefile.am (libdw_a_SOURCES): Add them.
1428 * unwind.h: Declare those functions.
1429 * libdw.map (ELFUTILS_0.142): Export them.
1431 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1433 (getlocation): ... here, call it.
1434 * libdwP.h: Declare it.
1438 * frame-cache.c: New file.
1441 * encoded-value.h: New file.
1442 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1443 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1444 * dwarf_error.c (errmsgs): Add element for it.
1446 * dwarf_next_cfi.c: New file.
1447 * Makefile.am (libdw_a_SOURCES): Add it.
1448 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1449 Declare dwarf_next_cfi.
1450 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1453 * memory-access.h [! ALLOW_UNALIGNED]
1454 (read_2ubyte_unaligned): Renamed to ...
1455 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1456 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1457 (read_2sbyte_unaligned): Likewise.
1458 (read_4ubyte_unaligned): Likewise.
1459 (read_4sbyte_unaligned): Likewise.
1460 (read_8ubyte_unaligned): Likewise.
1461 (read_8sbyte_unaligned): Likewise.
1463 * libdwP.h (IDX_eh_frame): Remove it.
1464 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1466 2009-07-08 Roland McGrath <roland@redhat.com>
1468 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1470 * dwarf_getlocation.c (check_constant_offset): New function.
1471 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1472 handle DW_AT_data_member_location of data[48] as constant offset.
1474 2009-06-18 Roland McGrath <roland@redhat.com>
1476 * libdwP.h (__libdw_read_address_inc): Constify.
1477 (__libdw_read_offset_inc): Likewise.
1478 * dwarf_getaranges.c: Likewise.
1479 * dwarf_getlocation.c: Likewise.
1480 * dwarf_getsrclines.c: Likewise.
1481 * dwarf_nextcu.c: Likewise.
1483 2009-05-05 Petr Machata <pmachata@redhat.com>
1485 * libdwP.h (__libdw_formptr): Declare new function.
1486 * dwarf_formudata.c: Implement it here.
1487 * dwarf_getlocation.c (dwarf_getlocation_addr):
1488 Call it instead of hand-rolled offset handling code.
1489 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1490 * dwarf_ranges.c (dwarf_ranges): Likewise.
1492 2009-05-04 Petr Machata <pmachata@redhat.com>
1494 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1495 * dwarf_ranges.c: Implement it here.
1496 (dwarf_ranges): Call it.
1497 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1499 2009-04-23 Petr Machata <pmachata@redhat.com>
1501 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1502 of read_*ubyte_unaligned.
1503 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1504 * dwarf_formstring.c (dwarf_formstring): Likewise.
1505 * dwarf_formudate.c (dwarf_formudata): Likewise.
1506 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1507 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1508 * dwarf_getpubnames.c (get_offsets): Likewise.
1509 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1511 2009-04-23 Petr Machata <pmachata@redhat.com>
1513 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1514 __libdw_read_addr, __libdw_read_off): Add four new internal
1517 2009-05-07 Roland McGrath <roland@redhat.com>
1519 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1520 return value and OFFSET argument, not CU-relative. Only fetch the
1521 attribute data when called with OFFSET of 0.
1523 2009-05-07 Petr Machata <pmachata@redhat.com>
1525 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1526 DW_AT_macro_info attribute of CU DIE.
1528 2009-04-15 Roland McGrath <roland@redhat.com>
1530 * dwarf.h (DW_CIE_ID): Removed.
1531 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1533 2009-04-01 Roland McGrath <roland@redhat.com>
1535 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1537 2009-01-28 Roland McGrath <roland@redhat.com>
1539 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1540 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1542 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1544 2009-01-26 Roland McGrath <roland@redhat.com>
1546 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1548 2009-01-25 Roland McGrath <roland@redhat.com>
1550 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1552 2009-01-23 Roland McGrath <roland@redhat.com>
1554 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1555 Put these rules under if MAINTAINER_MODE.
1557 2009-01-22 Roland McGrath <roland@redhat.com>
1559 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1561 2009-01-21 Roland McGrath <roland@redhat.com>
1563 * Makefile.am (CLEANFILES): Renamed to ...
1564 (MOSTLYCLEANFILES): ... here.
1565 (CLEANFILES): New variable, add known-dwarf.h.
1567 2009-01-17 Roland McGrath <roland@redhat.com>
1569 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1570 Make it unconditional.
1571 (BUILT_SOURCES): Updated.
1573 * dwarf.h: Add description comments for DW_LANG_* values.
1575 * Makefile.am [MAINTAINER_MODE]
1576 ($(srcdir)/known-dwarf.h): New target.
1577 (BUILT_SOURCES): Add it.
1579 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1581 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1583 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1585 2009-01-08 Roland McGrath <roland@redhat.com>
1587 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1589 2008-01-06 Roland McGrath <roland@redhat.com>
1591 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1593 * dwarf_haschildren.c: Return -1 for error case, not 0.
1595 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1597 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1599 * dwarf.h: Add definition for unwind and call frame information.
1601 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1602 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1604 2008-08-15 Roland McGrath <roland@redhat.com>
1606 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1607 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1609 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1611 * dwarf_child.c: Minor optimizations.
1612 * dwarf_getattrs.c: Likewise.
1613 * dwarf_getpubnames.c: Likewise.
1614 * dwarf_siblingof.c: Likewise.
1615 * dwarf_tag.c: Likewise.
1617 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1619 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1620 of DWARF_VERSION comparison, just fail if the file's version is newer.
1622 2008-01-17 Nick Clifton <nickc@redhat.com>
1624 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1625 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1626 (DWARF3_LENGTH_64_BIT): New define.
1627 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1628 * dwarf_getpubnames: Include dwarf.h.
1629 (get_offsets): Use the new definitions.
1630 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1631 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1632 (dwarf_nextcu): Use the new definitions.
1634 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1635 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1636 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1637 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1639 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1642 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1644 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1645 Set the address in the return structure to the address of the next
1646 non-sibling die, if there is no sibling and the return pointer is
1647 not the same as the die pointer.
1648 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1650 * dwarf_child.c: Fix typo in comment.
1652 * libdwP.h (DWARF_VERSION): Change to 3.
1654 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1655 not have a initialised valp pointer.
1657 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1658 the end of the attributes is reached. When the callback fails,
1659 return the address of the failing attribute, not the address of
1661 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1663 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1664 (dwarf_child): Likewise.
1665 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1666 (dwarf_tag): Likewise.
1668 2008-01-08 Roland McGrath <roland@redhat.com>
1670 * Makefile.am (euinclude): Variable removed.
1671 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1672 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1674 2007-10-17 Roland McGrath <roland@redhat.com>
1676 * libdw.h (__deprecated_attribute__): New macro.
1677 (dwarf_formref): Mark it deprecated.
1678 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1679 (dwarf_formref): ... here. Call it. Remove INTDEF.
1680 * libdwP.h: Remove INTDECL.
1681 Declare __libdw_formref.
1682 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1683 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1685 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1686 needs to check CU->version.
1688 * libdwP.h (struct Dwarf_CU): New member `version'.
1689 * libdw_findcu.c (__libdw_findcu): Initialize it.
1691 * dwarf_child.c: Return 1 for null entry as first child.
1693 2007-10-05 Roland McGrath <roland@redhat.com>
1695 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1697 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1698 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1700 2007-10-03 Roland McGrath <roland@redhat.com>
1702 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1703 and dwfl_build_id_find_debuginfo.
1705 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1706 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1708 2007-10-02 Roland McGrath <roland@redhat.com>
1710 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1713 2007-08-07 Roland McGrath <roland@redhat.com>
1715 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1716 error code is DWARF_E_NOERROR (0).
1718 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1719 Fix typo in __libdw_visit_scopes argument.
1721 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1722 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1724 2007-07-03 Roland McGrath <roland@redhat.com>
1726 * libdw.h (__extern_inline): New macro.
1727 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1729 2007-04-16 Roland McGrath <roland@redhat.com>
1731 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1733 2007-04-05 Roland McGrath <roland@redhat.com>
1735 * dwarf_getsrcdirs.c: New file.
1736 * Makefile.am (libdw_a_SOURCES): Add it.
1737 * libdw.h: Declare dwarf_getsrcdirs.
1738 * libdw.map (ELFUTILS_0.127): Add it.
1740 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1741 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1742 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1743 Save DIRARRAY in the Dwarf_Files.
1745 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1746 address to check for all-ones base address entry. Check directly.
1747 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1749 2007-03-25 Roland McGrath <roland@redhat.com>
1751 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1752 Return NULL when freeing RESULT on error.
1753 (global_read, scngrp_read): Check return value from check_section,
1754 break out of loop after it has freed RESULT.
1755 (valid_p): Handle null argument.
1757 2007-03-12 Roland McGrath <roland@redhat.com>
1759 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1761 2007-03-04 Roland McGrath <roland@redhat.com>
1763 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1764 ELFUTILS_0.126. Add dwfl_module_addrsym.
1766 2007-02-10 Roland McGrath <roland@redhat.com>
1768 * dwarf.h (DW_OP_fbreg): Comment fix.
1770 2007-02-03 Roland McGrath <roland@redhat.com>
1772 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1773 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1774 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1775 exported in the past.
1777 2006-12-17 Roland McGrath <roland@redhat.com>
1779 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1780 address when the CU is missing attributes due to buggy GCC.
1782 2006-08-29 Roland McGrath <roland@redhat.com>
1784 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1786 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1787 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1789 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1790 result is aligned. Adjust NEWP->remaining here for this allocation.
1791 * libdwP.h: Update decl.
1792 (libdw_alloc): Update caller.
1794 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1796 * dwarf_child.c: Adjust for internal_function_def removal.
1797 * dwarf_getabbrev.c: Likewise.
1798 * dwarf_tag.c: Likewise.
1799 * libdw_form.c: Likewise.
1800 * memory-access.c: Likewise.
1802 2006-06-28 Roland McGrath <roland@redhat.com>
1804 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1806 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1809 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1811 * libdw.h: Add extern "C".
1813 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1815 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1816 aranges information.
1818 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1820 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1823 2006-02-28 Roland McGrath <roland@redhat.com>
1825 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1826 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1827 values from DWARF 3.0.
1829 2006-02-22 Roland McGrath <roland@redhat.com>
1831 * libdw.map: Bump to 0.120; export dwfl_version.
1833 2005-12-22 Roland McGrath <roland@redhat.com>
1835 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1837 2005-12-12 Roland McGrath <roland@redhat.com>
1839 * dwarf_ranges.c: Copy CU base address-finding code from
1842 2005-12-09 Roland McGrath <roland@redhat.com>
1844 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1845 Delay CU base lookup until it's needed.
1846 If CU base lookup fails with no error, flag invalid DWARF.
1848 2005-11-25 Roland McGrath <roland@redhat.com>
1850 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1852 2005-11-15 Roland McGrath <roland@redhat.com>
1854 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1856 2005-11-13 Roland McGrath <roland@redhat.com>
1858 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1860 2005-10-27 Roland McGrath <roland@redhat.com>
1862 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1863 don't match end_sequence markers.
1865 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1866 before normal records at the same address.
1867 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1870 2005-10-26 Roland McGrath <roland@redhat.com>
1872 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1873 * dwarf_func_file.c: Renamed to ...
1874 * dwarf_decl_file.c: ... here.
1875 * dwarf_func_col.c: Renamed to ...
1876 * dwarf_decl_column.c: ... here.
1877 * dwarf_func_line.c: Renamed to ...
1878 * dwarf_decl_line.c: ... here.
1879 (dwarf_func_line): Renamed to ...
1880 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1881 (__libdw_func_intval): Renamed __libdw_attr_intval.
1882 * dwarf_func_name.c: File removed.
1883 * dwarf_func_lowpc.c: File removed.
1884 * dwarf_func_highpc.c: File removed.
1885 * dwarf_func_entrypc.c: File removed.
1886 * dwarf_func_die.c: File removed.
1887 * Makefile.am (libdw_a_SOURCES): Updated.
1888 * libdw.h: Update decls.
1889 (Dwarf_Func): Type removed.
1890 * libdwP.h: Update decls.
1891 (struct Dwarf_Func_s): Type removed.
1892 * libdw.map: Updated.
1894 * libdwP.h (CUDIE): New macro.
1895 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1896 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1897 * dwarf_ranges.c (dwarf_ranges): Likewise.
1899 * dwarf_getloclist.c: Renamed to ...
1900 * dwarf_getlocation.c: ... here.
1901 (getloclist): Renamed to getlocation.
1902 (dwarf_getloclist): Renamed to dwarf_getlocation.
1903 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1904 * Makefile.am (libdw_a_SOURCES): Updated.
1905 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1906 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1907 (Dwarf_Loc): Renamed Dwarf_Op.
1908 * libdwP.h (struct loc_s): Update use.
1909 * libdw.map: Update map.
1911 * dwarf_entry_breakpoints.c: Use the second line record within the
1912 function, regardless of its source location data.
1914 2005-10-25 Roland McGrath <roland@redhat.com>
1916 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1918 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1920 2005-10-14 Roland McGrath <roland@redhat.com>
1922 * dwarf_diecu.c (dwarf_diecu): New file.
1923 * Makefile.am (libdw_a_SOURCES): Add it.
1924 * libdw.h: Declare dwarf_diecu.
1925 * libdw.map: Export it.
1927 * libdw.map: Bump to 0.116; export dwarf_ranges.
1929 2005-09-20 Roland McGrath <roland@redhat.com>
1931 * dwarf_haspc.c: Use dwarf_ranges.
1932 * dwarf_entry_breakpoints.c: Likewise.
1934 * dwarf_ranges.c: New file.
1935 * Makefile.am (libdw_a_SOURCES): Add it.
1936 * libdw.h: Declare dwarf_ranges.
1937 * libdwP.h: Add INTDECL.
1939 2005-09-14 Roland McGrath <roland@redhat.com>
1941 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1942 prologue_end marker scanning loop.
1944 2005-09-11 Roland McGrath <roland@redhat.com>
1946 * dwarf.h: Comment typo fix.
1948 2005-09-07 Roland McGrath <roland@redhat.com>
1950 * dwarf_entry_breakpoints.c: New file.
1951 * Makefile.am (libdw_a_SOURCES): Add it.
1952 * libdw.h: Declare dwarf_entry_breakpoints.
1954 * dwarf_entrypc.c: New file.
1955 * Makefile.am (libdw_a_SOURCES): Add it.
1956 * libdw.h: Declare dwarf_entrypc.
1957 * libdwP.h: Add INTDECL.
1959 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1961 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1962 (%.os): Use COMPILE.os.
1963 (COMPILE.os): Filter out gconv options.
1965 2005-08-27 Roland McGrath <roland@redhat.com>
1967 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1968 __libdw_visit_scopes.
1970 * dwarf_getscopes_die.c: New file.
1971 * Makefile.am (libdw_a_SOURCES): Add it.
1972 * libdw.h: Declare dwarf_getscopes_die.
1973 * libdw.map: Bump to 0.115 and add it.
1975 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1976 containing a DIE and its parent pointer, instead of just Dwarf_Die.
1977 Take two functions for both preorder and postorder visitors.
1978 * libdwP.h: Update decl.
1979 (struct Dwarf_Die_Chain): New type.
1980 * dwarf_func_inline.c: Update uses.
1982 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1984 * libdwP.h: Add INTDECL.
1985 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1987 2005-08-23 Roland McGrath <roland@redhat.com>
1989 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1990 DW_AT_specification the same as DW_AT_abstract_origin.
1992 2005-08-20 Roland McGrath <roland@redhat.com>
1994 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1995 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1996 and dwfl_report_offline.
1998 2005-08-19 Roland McGrath <roland@redhat.com>
2000 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2001 Add dwfl_module_relocate_address, dwfl_module_relocations,
2002 dwfl_module_relocation_info.
2004 2005-08-18 Roland McGrath <roland@redhat.com>
2006 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2007 outermost scope in the results.
2009 2005-08-15 Roland McGrath <roland@redhat.com>
2011 * dwarf_func_inline.c: New file.
2012 * Makefile.am (libdw_a_SOURCES): Add it.
2013 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2014 * libdw.map: Add them.
2016 * dwarf_func_die.c: New file.
2017 * Makefile.am (libdw_a_SOURCES): Add it.
2018 * libdw.h: Declare dwarf_func_die.
2019 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2021 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2023 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2024 of DW_LNS_set_epilog_begin.
2026 2005-08-09 Roland McGrath <roland@redhat.com>
2028 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2030 * dwarf_end.c: Add INTDEF.
2031 * dwarf_error.c (dwarf_errmsg): Likewise.
2032 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2034 2005-08-01 Roland McGrath <roland@redhat.com>
2036 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2037 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2039 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2041 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2042 (libdw_a_LIBADD): Add all files from libdwfl.a.
2044 2005-07-27 Roland McGrath <roland@redhat.com>
2046 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2047 along with ../libebl/libebl.a and ../lib/libeu.a;
2048 depend on ../libelf/libelf.so.
2049 (libdw_so_LDADD): New variable.
2050 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2052 * libdw.map: Define an empty base version and move all symbols to
2053 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2055 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2057 * dwarf_error.c: Add internal alias for dwarf_errno.
2058 * libdwP.h: Declare __dwarf_errno_internal.
2059 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2061 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2064 2005-06-01 Roland McGrath <roland@redhat.com>
2066 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2067 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2069 2005-06-08 Roland McGrath <roland@redhat.com>
2071 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2072 (get_sleb128_step, get_sleb128): Likewise.
2073 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2074 * dwarf_getloclist.c (getloclist): Likewise.
2075 * dwarf_formblock.c (dwarf_formblock): Likewise.
2076 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2077 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2078 * dwarf_formref.c (dwarf_formref): Likewise.
2079 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2080 * dwarf_formudata.c (dwarf_formudata): Likewise.
2081 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2082 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2083 * dwarf_tag.c (dwarf_tag): Likewise.
2084 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2085 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2086 * libdw_form.c (__libdw_form_val_len): Likewise.
2087 * libdwP.h: Update decl.
2089 2005-06-04 Roland McGrath <roland@redhat.com>
2091 * memory-access.h (get_uleb128_rest_return): New macro.
2092 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2093 (get_sleb128_rest_return): New macro.
2094 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2095 * memory-access.c: New file.
2096 * Makefile.am (libdw_a_SOURCES): Add it.
2097 (DEFS): Add -DIS_LIBDW.
2099 2005-05-31 Roland McGrath <roland@redhat.com>
2101 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2104 2005-05-30 Roland McGrath <roland@redhat.com>
2106 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2107 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2109 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2110 BEGIN value. Instead, match base address entries separately for
2113 2005-05-28 Roland McGrath <roland@redhat.com>
2115 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2116 past location expression contents.
2118 2005-05-23 Roland McGrath <roland@redhat.com>
2120 * dwarf_getsrclines.c: Comment typo fix.
2122 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2123 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2125 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2127 * libdwP.h: Only use INTDECL for alias prototypes.
2129 2005-05-19 Roland McGrath <roland@redhat.com>
2131 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2133 * dwarf_getscopevar.c: New file.
2134 * Makefile.am (libdw_a_SOURCES): Add it.
2135 * libdw.h: Declare dwarf_getscopevar.
2137 * dwarf_getsrcfiles.c: Add INTDEF.
2138 * dwarf_haschildren.c: Likewise.
2139 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2141 * dwarf_getscopes.c: New file.
2142 * Makefile.am (libdw_a_SOURCES): Add it.
2143 * libdw.h: Declare dwarf_getscopes.
2144 * libdw.map: Add it.
2146 2005-05-18 Roland McGrath <roland@redhat.com>
2148 * libdwP.h (IDX_debug_ranges): New enum constant.
2149 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2150 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2151 * dwarf_error.c (errmsgs): Add it.
2152 * dwarf_haspc.c: New file.
2153 * libdw.h: Declare dwarf_haspc.
2154 * libdw.map: Add it.
2155 * libdwP.h: Add INTDECL.
2157 * dwarf_attr_integrate.c: New file.
2158 * dwarf_hasattr_integrate.c: New file.
2159 * Makefile.am (libdw_a_SOURCES): Add them.
2160 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2161 * libdw.map: Add them.
2163 * dwarf_hasattr.c: Add INTDEF.
2164 * libdwP.h: Add INTDECL for it.
2166 * dwarf_formref_die.c: New file.
2167 * Makefile.am (libdw_a_SOURCES): Add it.
2168 * libdw.h (dwarf_formref_die): Declare it.
2169 * libdwP.h (dwarf_formref_die): Add INTDECL.
2170 * libdw.map: Add it.
2172 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2174 (dwarf_getloclist): ... here. Call them.
2175 (dwarf_addrloclists): New function.
2176 * libdw.h: Declare it.
2177 * libdw.map: Add it.
2179 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2180 DW_MACINFO_end_file. Recognize type 0 as terminator.
2182 2005-05-05 Roland McGrath <roland@redhat.com>
2184 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2186 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2187 the line program does not produce all entries in ascending order.
2189 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2191 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2192 occurences (e.g., inlines) better.
2194 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2196 * libdw.h (DWARF_END_ABBREV): Define.
2197 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2199 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2201 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2202 as error of __libdw_getabbrev.
2204 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2206 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2208 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2209 results back to caller.
2211 2005-04-04 Roland McGrath <roland@redhat.com>
2213 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2215 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2218 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2220 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2222 * dwarf_getsrc_file.c: New file.
2223 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2224 * libdw.h: Declare dwarf_getsrc_file.
2225 * libdw.map: Add dwarf_getsrc_file.
2227 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2229 * dwarf_func_entrypc.c: New file.
2230 * dwarf_func_col.c: New file.
2231 * dwarf_func_line.c: New file.
2232 * dwarf_func_file.c: New file.
2233 * libdw.h: Add prototypes for new functions.
2234 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2236 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2237 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2238 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2239 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2240 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2241 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2243 * dwarf.h: Add some DWARF3 definitions.
2245 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2247 * dwarf_getfuncs.c: New file.
2248 * dwarf_func_highpc.c: New file.
2249 * dwarf_func_lowpc.c: New file.
2250 * dwarf_func_name.c: New file.
2251 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2252 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2253 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2254 and dwarf_func_name.
2255 * libdw.h: Add prototypes for new functions.
2256 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2257 * dwarf_siblingof.c: Likewise.
2258 * dwarf_dieoffset.c: Likewise.
2259 * dwarf_highpc.c: Likewise.
2260 * dwarf_lowpc.c: Likewise.
2261 * libdwP.h: Add prototypes for internal functions.
2262 Define Dwarf_Func_s structure.
2264 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2266 * libdw.h: Add padding in Dwarf_die.
2268 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2269 * dwarf_attr.c: Likewise.
2270 * dwarf_begin.c: Likewise.
2271 * dwarf_begin_elf.c: Likewise.
2272 * dwarf_bitoffset.c: Likewise.
2273 * dwarf_bitsize.c: Likewise.
2274 * dwarf_bytesize.c: Likewise.
2275 * dwarf_diename.c: Likewise.
2276 * dwarf_formaddr.c: Likewise.
2277 * dwarf_formblock.c: Likewise.
2278 * dwarf_formref.c: Likewise.
2279 * dwarf_formstring.c: Likewise.
2280 * dwarf_formudata.c: Likewise.
2281 * dwarf_getarange_addr.c: Likewise.
2282 * dwarf_getarangeinfo.c: Likewise.
2283 * dwarf_getaranges.c: Likewise.
2284 * dwarf_getloclist.c: Likewise.
2285 * dwarf_getmacros.c: Likewise.
2286 * dwarf_getsrc_die.c: Likewise.
2287 * dwarf_getsrcfiles.c: Likewise.
2288 * dwarf_getsrclines.c: Likewise.
2289 * dwarf_highpc.c: Likewise.
2290 * dwarf_lowpc.c: Likewise.
2291 * dwarf_nextcu.c: Likewise.
2292 * dwarf_offdie.c: Likewise.
2293 * dwarf_siblingof.c: Likewise.
2294 * dwarf_srclang.c: Likewise.
2295 * dwarf_tag.c: Likewise.
2296 * libdw_findcu.c: Likewise.
2297 * libdwP.h: Add prototypes for internal functions.
2299 * dwarf_addrdie.c: New file.
2300 * dwarf_macro_opcode.c: New file.
2301 * dwarf_macro_param1.c: New file.
2302 * dwarf_macro_param2.c: New file.
2303 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2304 * libdwP.h: Remove Dwarf_Macro definition.
2305 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2306 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2307 * libdw.map: Add entries for new functions.
2309 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2311 * libdw.h: Handle broken gcc < 4.
2313 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2315 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2317 * dwarf_begin_elf.c: Fix warnings.
2318 * dwarf_dieoffset.c: Likewise.
2319 * dwarf_end.c: Likewise.
2320 * dwarf_error.c: Likewise.
2321 * dwarf_getpubnames.c: Likewise.
2323 * libdwP.h: Add new error values.
2324 * dwarf_error.c: Support new error values.
2325 * dwarf_getpubnames.c: Check parameter value.
2327 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2329 * Makefile.am: Check for text relocations in constructed DSO.
2331 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2333 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2335 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2336 checks to not read over buffer boundaries for ill-formed DWARF data.
2338 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2340 * dwarf_child.c: Make compile with gcc 4.0.
2341 * dwarf_error.c: Likewise.
2342 * dwarf_formblock.c: Likewise.
2343 * dwarf_getabbrev.c: Likewise.
2344 * dwarf_getattrs.c: Likewise.
2345 * dwarf_getsrclines.c: Likewise.
2346 * dwarf_tag.c: Likewise.
2347 * libdw_form.c: Likewise.
2349 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2351 * Makefile.am: Support building with mudflap.
2353 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2354 * dwarf_getsrclines.c: Likewise.
2355 * dwarf_memory-access.h: Likewise.
2357 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2359 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2361 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2362 Third parameter of dwarf_getsrcfiles can be NULL.
2364 * libdw.map: Add dwarf_getmacros.
2365 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2366 * dwarf_getmacros.c: New file.
2368 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2370 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2372 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2374 * dwarf_getsrclines.c:
2375 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2377 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2379 * libdwP.h (_): Use elfutils domain.
2381 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2383 * dwarf_getsrclines.c: Fix typo in comment.
2385 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2387 * Makefile.am: Support building with mudflap.
2389 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2391 * memory-access.h: Add lots of const in case a pointer passed is const.
2393 * dwarf_formflag.c: New file.
2394 * dwarf_getattrs.c: New file.
2395 * dwarf_error.c: Add new error value.
2396 * libdw.h: Add prototypes for new functions. Adjust prototype for
2398 * libdw.map: Add new functions.
2399 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2401 * libdwP.h: Add new error value.
2402 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2405 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2407 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2409 * dwarf_getarange_addr.c: New file
2410 * dwarf_getarangeinfo.c: New file.
2411 * dwarf_getaranges.c: New file.
2412 * dwarf_onerange.c: New file.
2413 * libdw.h: Declare new functions. Define Dwarf_Arange and
2415 * libdw.map: Add new functions.
2416 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2417 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2418 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2419 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2420 * dwarf_error.c: Add new message.
2422 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2424 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2425 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2426 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2427 * dwarf_error.c: Add another message.
2428 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2430 * dwarf_filesrc.c: Likewise.
2431 * dwarf_getsrcfiles.c: Likewise.
2432 * dwarf_getsrclines.c: Likewise.
2433 * dwarf_lineaddr.c: New file.
2434 * dwarf_linebeginstatement.c: New file.
2435 * dwarf_lineblock.c: New file.
2436 * dwarf_linecol.c: New file.
2437 * dwarf_lineendsequence.c: New file.
2438 * dwarf_lineepiloguebegin.c: New file.
2439 * dwarf_lineno.c: New file.
2440 * dwarf_lineprologueend.c: New file.
2441 * dwarf_onesrcline.c: New file.
2442 * dwarf_lineno.c: Change interface to store result in object pointed
2443 to by second parameter.
2444 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2445 prototype. Define Dwarf_Files and Dwarf_Lines.
2446 * libdw.map: Add new functions.
2447 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2448 * libdw_findcu.c: Don't initialize nlines field.
2450 * dwarf_siblingof: Little optimization.
2452 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2453 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2454 * libdwP.h (struct Dwarf): Add free_elf field.
2456 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2458 * dwarf_getstring.c: New file.
2459 * dwarf_offabbrev.c: New file.
2460 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2461 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2462 parameters. Don't allocate memory if not necessary and don't lookup
2463 previous results if no CU given.
2464 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2465 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2466 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2467 * libdwP.h: Change prototype for __libdw_getabbrev.
2469 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2470 returning if this is wanted.
2472 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2474 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2475 with offset_size value.
2476 * libdw.h: Adjust dwarf_nextcu prototype.
2477 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2478 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2479 member of new CU struct.
2480 * dwarf_formstring.c: Depend on offset_size not address_size for
2481 DW_FORM_strp handling.
2482 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2484 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2486 (dwarf_tag): Correctly recognize failed lookup.
2488 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2490 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2491 * dwarf_formblock.c: New file.
2492 * dwarf_getloclist.c: Rewrite to handle a single block.
2493 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2494 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2495 dwarf_getloclistent declaration.
2496 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2497 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2498 Add locs member to struct Dwarf_CU.
2499 * libdw_fundcu.c: Initialize locs member of new CU.
2500 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2501 Remove dwarf_getloclistent.c.
2503 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2505 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2506 * libdwP.h: Likewise.
2508 * dwarf_getloclist.c: New file.
2509 * dwarf_getloclistent.c: New file.
2510 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2511 Declare dwarf_getloclistent and dwarf_getloclist.
2512 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2513 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2514 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2517 * dwarf_error.c: More error messages.
2519 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2521 * dwarf_getsrclines.c: Remove debugging support.
2523 * dwarf_getsrcfiles.c: New file.
2524 * dwarf_filesrc.c: New file.
2525 * libdw.h: Declare these functions. Define Dwarf_File.
2526 * libdwP.c: Adjust Dwarf_File_s definition.
2527 * libdw.map: Add these functions.
2528 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2530 * dwarf_getsrclines.c: Initialize cu->files.
2532 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2534 * libdw.h: Add more nonnull function attributes.
2536 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2537 * dwarf_end.c (cu_free): New function.
2538 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2539 * dwarf_error.c (errmsgs): Add new messages.
2540 * dwarf_getsrc_die.c: New file.
2541 * dwarf_getsrclines.c: New file.
2542 * dwarf_lineno.c: New file.
2543 * dwarf_linesrc.c: New file.
2544 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2545 instead of the *_inc-less variants.
2546 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2547 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2548 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2550 * libdwP.h: Add more error codes.
2551 (struct Dwarf): Remove mem_tail.next member.
2552 (Dwarf_File): Define type.
2553 (struct Dwarf_Line_s): Define type.
2554 (struct Dwarf_CU): Add lines and nlines members.
2555 (libdw_alloc): Define local variable _tail and use it.
2556 Add some function attributes.
2557 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2558 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2559 * memory-access.h: Add unlikely for the endian conversion paths.
2560 * Makefile.am (AM_CFLAGS): Add -std parameter.
2561 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2562 dwarf_lineno, and dwarf_linesrc.
2564 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2566 * Moved to CVS archive.