1 2015-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
3 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
4 * libdw_alloc.c: Likewise.
6 2016-07-08 Mark Wielaard <mjw@redhat.com>
8 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
9 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
10 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
12 2016-02-13 Mark Wielaard <mjw@redhat.com>
14 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
17 2015-12-18 Mark Wielaard <mjw@redhat.com>
19 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
20 (__libdw_free_zdata): Remove.
21 * dwarf_begin_elf.c (inflate_section): Remove.
22 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
23 and elf_compress_gnu to decompress if necessary.
24 (valid_p): Remove __libdw_free_zdata calls.
25 (scngrp_read): Use elf_compress if section is compressed. Remove
26 __libdw_free_zdata calls.
27 * dwarf_end.c (__libdw_free_zdata): Remove.
28 (dwarf_end): Don't call __libdw_free_zdata.
30 2015-10-28 Mark Wielaard <mjw@redhat.com>
32 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
34 2015-12-02 Mark Wielaard <mjw@redhat.com>
36 * fde.c (intern_fde): Don't leak duplicate FDEs.
38 2015-12-01 Mark Wielaard <mjw@redhat.com>
40 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
43 2015-12-01 Mark Wielaard <mjw@redhat.com>
45 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
47 2015-10-14 Chih-Hung Hsieh <chh@google.com>
49 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
50 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
52 2015-10-14 Chih-Hung Hsieh <chh@google.com>
54 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
55 function 'walk_children' to file scope; inline 'recurse' at its call
58 2015-10-19 Mark Wielaard <mjw@redhat.com>
60 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
63 2015-10-16 Dmitry V. Levin <ldv@altlinux.org>
65 * dwarf_getsrclines.c (read_srclines): Initialize state early.
67 2015-10-13 Chih-Hung Hsieh <chh@google.com>
69 * dwarf_getsrclines.c (read_srclines): Move nested functions
70 'advance_pc' and 'add_new_line' to file scope and keep many
71 local state variables within one structure.
73 2015-10-13 Chih-Hung Hsieh <chh@google.com>
75 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
76 function 'file_matches' to file scope.
78 2015-10-16 Mark Wielaard <mjw@redhat.com>
80 * Makefile.am (libdw.so): Add -lz.
82 2015-10-14 Chih-Hung Hsieh <chh@google.com>
84 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
85 and 'require_cfa_offset' to file scope.
87 2015-10-09 Josh Stone <jistone@redhat.com>
89 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
92 2015-10-05 Josh Stone <jistone@redhat.com>
94 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
96 2015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
98 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
99 relocation overflows in some platforms.
101 2015-09-23 Mark Wielaard <mjw@redhat.com>
103 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
104 * dwarf_formref.c (__libdw_formref): Likewise.
105 * libdw_findcu.c (__libdw_findcu): Likewise.
106 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
108 2015-09-22 Mark Wielaard <mjw@redhat.com>
110 * *.c: Remove old-style function definitions.
112 2015-09-15 Mark Wielaard <mjw@redhat.com>
114 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
116 2015-09-09 Chih-Hung Hsieh <chh@google.com>
118 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
119 redundant NULL tests on parameters declared with __nonnull_attribute__.
120 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
121 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
123 2015-09-04 Chih-Hung Hsieh <chh@google.com>
124 Mark Wielaard <mjw@redhat.com>
126 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
127 definition with ansi-C definition and add const qualifier to
130 2015-09-04 Chih-Hung Hsieh <chh@google.com>
132 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
133 definition with ansi-C definitions.
134 (__libdw_findcu): Likewise.
136 2015-08-25 Mark Wielaard <mjw@redhat.com>
138 * dwarf.h: Add DW_LANG_Haskell.
140 2015-06-18 Mark Wielaard <mjw@redhat.com>
142 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
145 2015-06-18 Mark Wielaard <mjw@redhat.com>
147 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
149 2015-06-18 Mark Wielaard <mjw@redhat.com>
151 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
152 dwarf_formudata reports an error.
153 (get_table_for_offset): Likewise.
155 2015-06-08 Mark Wielaard <mjw@redhat.com>
157 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
159 2015-06-06 Mark Wielaard <mjw@redhat.com>
161 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
163 2015-05-27 Mark Wielaard <mjw@redhat.com>
165 * encoded-value.h (read_encoded_value): Check data d_size contains
166 at least enough data to hold a pointer for DW_EH_PE_indirect.
168 2015-05-22 Mark Wielaard <mjw@redhat.com>
170 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
171 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
172 MAX_STACK_DIRS. Calculate number of dirs needed first, then
173 create dirarray directly, without needing the next field. Free
174 not stack allocated lines and files at the end.
176 2015-05-19 Mark Wielaard <mjw@redhat.com>
178 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
179 allocated array to hold locs. Allocate locs bigger than the array
180 with malloc and free them when done.
182 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
184 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
185 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
186 * dwarf_begin_elf.c (inflate_section): New static function, lifted
188 (check_section): ... here. Call inflate_section, set libdw errno to
189 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
191 2015-05-11 Jonathan Lebon <jlebon@redhat.com>
193 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
194 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
196 2015-05-06 Mark Wielaard <mjw@redhat.com>
198 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
199 check the line number.
201 2015-05-05 Mark Wielaard <mjw@redhat.com>
203 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
204 left before reading values.
206 2015-05-04 Anthony G. Basile <blueness@gentoo.org>
208 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
211 2015-04-22 Mark Wielaard <mjw@redhat.com>
213 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
214 (__libdw_max_len_uleb128): New function.
215 (__libdw_max_len_sleb128): Likewise.
216 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
217 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
219 2015-04-21 Mark Wielaard <mjw@redhat.com>
221 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
222 when there are more than 8.
224 2015-04-01 Petr Machata <pmachata@redhat.com>
226 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
227 (is_cudie): New function.
228 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
229 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
230 of white-listing valid tags.
231 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
233 2015-03-18 Petr Machata <pmachata@redhat.com>
235 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
236 (EXTRA_DIST): Remove known-dwarf.h.
238 2015-02-09 Mark Wielaard <mjw@redhat.com>
240 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
241 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
242 for new Fortran language codes is 1.
244 2015-02-09 Mark Wielaard <mjw@redhat.com>
246 * dwarf.h: Add DW_TAG_atomic_type.
247 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
248 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
250 2015-02-11 Josh Stone <jistone@redhat.com>
252 * encoded-value.h (read_encoded_value): Initialize value.
254 2015-02-11 Petr Machata <pmachata@redhat.com>
256 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
257 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
258 the fact in *BASEP and bail out later if it hasn't been updated by
259 __libdw_read_begin_end_pair_inc.
261 2014-12-24 Mark Wielaard <mjw@redhat.com>
263 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
264 smaller than or equal to addr, rather than returning immediately on
267 2015-01-07 Mark Wielaard <mjw@redhat.com>
269 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
270 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
271 room in the search table for all entries. Store search_table_len.
272 (getcfi_scn_eh_frame): Likewise.
273 * encoded-value.h (encoded_value_size): Don't abort, return zero.
274 (__libdw_cfi_read_address_inc): Check there is enough room to read
275 values. Pass other byte order to read functions.
276 (read_encoded_value): Check encoded_value_size. Don't abort, but
277 set libdw errno and report failure. Check there is enough room to
279 * fde.c (binary_search_fde): Check encoded value size. Add hdr
280 data buf and size to dummy_cfi.
282 2015-01-04 Mark Wielaard <mjw@redhat.com>
284 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
285 is after current DIE.
287 2015-01-04 Mark Wielaard <mjw@redhat.com>
289 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
290 (dwarf_frame_register).
292 2015-01-02 Mark Wielaard <mjw@redhat.com>
294 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
295 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
296 (getcfi_scn_eh_frame): Check d_buf is not NULL.
298 2015-01-02 Mark Wielaard <mjw@redhat.com>
300 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
301 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
302 DW_OP_addr if dbg is NULL then read argument directly.
304 2015-01-14 Jason P. Leasure <jpleasu@super.org>
306 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
309 2014-12-27 Mark Wielaard <mjw@redhat.com>
311 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
312 still falls inside CU data.
314 2015-01-11 Mark Wielaard <mjw@redhat.com>
316 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
317 __libdw_visit_scopes with NULL imports.
318 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
319 * dwarf_getscopes.c (pc_record): Likewise.
320 (dwarf_getscopes): Likewise.
321 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
322 * libdwP.h (__libdw_visit_scopes): Add imports argument.
323 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
324 function imports_contains. Push and pop imports around walk_children
325 when processing DW_TAG_imported_unit.
327 2014-12-18 Ulrich Drepper <drepper@gmail.com>
329 * Makefile.am: Suppress output of textrel_check command.
331 2014-12-16 Mark Wielaard <mjw@redhat.com>
333 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
336 2014-12-16 Mark Wielaard <mjw@redhat.com>
338 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
339 space to read die offset.
341 2014-12-16 Mark Wielaard <mjw@redhat.com>
343 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
346 2014-12-15 Mark Wielaard <mjw@redhat.com>
348 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
349 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
350 (dwarf_getpubnames): Make sure section data contains string zero
353 2014-12-16 Mark Wielaard <mjw@redhat.com>
355 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
356 the compiler optimize for the common single-byte case.
358 2014-12-15 Josh Stone <jistone@redhat.com>
360 * memory-access.h (__libdw_max_len_leb128): New.
361 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
362 (__libdw_get_sleb128): Likewise.
364 2014-12-14 Mark Wielaard <mjw@redhat.com>
366 * cfi.c (execute_cfi): Add program bounds checks.
367 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
368 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
369 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
370 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
371 * dwarf_formudata.c (dwarf_formudata): Likewise.
372 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
373 with end of data buf.
374 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
375 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
376 call gets enough data.
377 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
378 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
380 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
382 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
383 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
384 get_uleb128 with lineendp.
385 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
386 get_uleb128 with endp.
387 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
388 get_uleb128/get_sleb128 with limit.
389 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
390 get_sleb128 get called with enough data.
391 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
392 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
393 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
395 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
396 Don't call get_uleb128_step if out of data.
397 (__libdw_get_sleb128): Likewise for get_sleb128_step.
399 2014-12-12 Mark Wielaard <mjw@redhat.com>
401 * libdwP.h (struct Dwarf): Add fake_loc_cu.
403 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
404 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
405 (__libdw_form_val_len): Likewise.
406 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
407 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
408 the already found data buffer directly.
409 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
410 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
411 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
413 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
414 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
415 * dwarf_getlocation_attr.c (attr_form_cu): New function.
416 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
417 (getlocation): Handle empty blocks immediately.
418 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
419 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
420 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
422 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
423 fake_cu. Call __libdw_form_val_len with just fake_cu.
424 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
425 datap and size directly from cu startp and endp.
427 2014-12-11 Mark Wielaard <mjw@redhat.com>
429 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
431 2014-12-13 Mark Wielaard <mjw@redhat.com>
433 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
434 difference doesn't wrap around before returning as int.
436 2014-12-11 Josh Stone <jistone@redhat.com>
438 * dwarf_getsrclines.c (struct linelist): Add sequence.
439 (compare_lines): Take linelists, and break ties by sequence.
440 (read_srclines): Use linelists for sorting.
441 (read_srclines::add_new_line): Set sequence.
443 2014-12-10 Josh Stone <jistone@redhat.com>
445 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
446 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
447 * dwarf_child.c (dwarf_child): Use cu->endp.
448 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
449 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
450 * dwarf_siblingof.c (dwarf_siblingof): Use both.
452 2014-12-10 Josh Stone <jistone@redhat.com>
454 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
456 2014-12-10 Josh Stone <jistone@redhat.com>
458 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
459 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
460 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
461 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
462 * dwarf_tag.c (dwarf_tag): Likewise.
464 2014-12-04 Mark Wielaard <mjw@redhat.com>
466 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
467 (__libdw_form_val_len): Likewise and check len doesn't overflow.
468 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
469 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
471 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
472 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
474 2014-12-02 Petr Machata <pmachata@redhat.com>
476 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
478 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
479 * libdw.h (DWARF_GETMACROS_START): New macro.
481 2014-11-27 Mark Wielaard <mjw@redhat.com>
483 * Makefile.am (libdw.so): Use textrel_check.
485 2014-11-27 Mark Wielaard <mjw@redhat.com>
487 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
488 search_table_entries and search_table_encoding.
490 2014-11-24 Mark Wielaard <mjw@redhat.com>
492 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
495 2014-11-23 Mark Wielaard <mjw@redhat.com>
497 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
498 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
499 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
501 2014-11-23 Mark Wielaard <mjw@redhat.com>
503 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
504 Set libdw errno and return NULL.
506 2014-11-24 Mark Wielaard <mjw@redhat.com>
508 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
509 (DW_LANG_C11): Likewise.
510 (DW_LANG_C_plus_plus_14): Likewise.
511 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
512 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
514 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
517 2014-11-26 Mark Wielaard <mjw@redhat.com>
519 * dwarf.h (DW_AT_noreturn): Added.
521 2014-11-11 Mark Wielaard <mjw@redhat.com>
523 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
524 explicitly as uint8_t.
525 (__libdw_getsrclines): Add internal_function to declaration.
527 2014-09-10 Petr Machata <pmachata@redhat.com>
529 * dwarf_macro_getparamcnt.c: New file.
530 * dwarf_macro_param.c: New file.
531 * dwarf_macro_getsrcfiles.c: New file.
532 * Makefile.am (libdw_a_SOURCES): Add the new files.
533 * libdwP.h (struct files_lines_s): New structure.
534 (DWARF_E_INVALID_OPCODE): New enumerator.
535 (struct Dwarf): New fields macro_ops, files_lines.
536 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
537 keeping macro opcode prototypes in.
538 (Dwarf_Macro_s): Redefine from scratch.
539 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
541 * dwarf_error.c (errmsgs): Add a message for
542 DWARF_E_INVALID_OPCODE.
543 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
545 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
546 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
548 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
549 (get_offset_from, macro_op_compare, build_table)
550 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
551 (cache_op_table, read_macros, gnu_macros_getmacros_off)
552 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
554 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
555 * dwarf_getsrclines.c (read_srclines): New function with guts
556 taken from dwarf_getsrclines.
557 (__libdw_getsrclines): Likewise.
558 (__libdw_getcompdir, files_lines_compare): New functions.
559 (dwarf_getsrclines): Make it dispatch to the new interfaces.
560 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
562 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
563 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
564 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
566 2014-10-06 Mark Wielaard <mjw@redhat.com>
568 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
569 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
570 (aggregate_size): Likewise. Add old and new version.
571 * dwarf_peel_type.c: New file.
572 * libdw.h (dwarf_peel_type): New function declaration.
573 * libdwP.h (dwarf_peel_type): New internal declaration.
574 * libdw.map (ELFUTILS_0.161): New section.
576 2014-10-15 Petr Machata <pmachata@redhat.com>
578 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
579 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
581 2014-10-05 Mark Wielaard <mjw@redhat.com>
583 * dwarf.h: Add DW_AT_GNU_deleted.
585 2014-10-02 Mark Wielaard <mjw@redhat.com>
587 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
588 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
589 DW_TAG_rvalue_reference_type.
591 2014-09-12 Petr Machata <pmachata@redhat.com>
593 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
594 8-byte quantities. Consequently, rename to...
595 (read_addr_unaligned_inc): ... this.
596 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
597 (read_sbyte_unaligned): Drop.
599 2014-09-10 Petr Machata <pmachata@redhat.com>
601 * dwarf_getlocation.c (attr_ok): Also accept
602 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
603 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
605 2014-08-15 Mark Wielaard <mjw@redhat.com>
607 * dwarf_cu_die.c: New file.
608 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
609 * libdw.h (dwarf_cu_die): New function declaration.
610 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
612 2014-08-15 Mark Wielaard <mjw@redhat.com>
614 * dwarf_cu_getdwarf.c: New file.
615 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
616 * libdw.h (Dwarf_CU): New typedef.
617 (dwarf_cu_getdwarf): New function declaration.
618 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
620 2014-06-18 Mark Wielaard <mjw@redhat.com>
622 * dwarf.h: Remove DW_TAG_mutable_type.
624 2014-05-02 Mark Wielaard <mjw@redhat.com>
626 * libdwP.h (__check_build_id): Removed now unused.
628 2014-05-01 Mark Wielaard <mjw@redhat.com>
630 * libdwP.h (struct Dwarf): Remove free_alt.
631 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
632 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
634 2014-04-30 Mark Wielaard <mjw@redhat.com>
636 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
638 2014-04-15 Florian Weimer <fweimer@redhat.com>
640 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
641 (open_debugaltlink): Move to libdwfl.
642 (check_section): Do not locate alternate debuginfo.
644 2014-04-24 Florian Weimer <fweimer@redhat.com>
646 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
648 2014-04-22 Florian Weimer <fweimer@redhat.com>
650 * dwarf_getalt.c, dwarf_setalt.c: New files.
651 * Makefile.am (libdw_a_SOURCES): Add them.
652 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
653 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
655 * libdw.map (ELFUTILS_0.159): Export the two new functions.
657 2014-04-15 Florian Weimer <fweimer@redhat.com>
659 * libdwP.h (enum IDX_gnu_debugaltlink): New.
660 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
662 (check_section): Obtain .gnu_debugaltlink section from the
665 2014-04-11 Mark Wielaard <mjw@redhat.com>
667 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
668 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
669 (libdwelf_objects): New variable.
670 (libdw_a_LIBADD): Add libdwelf objects.
672 2014-04-22 Mark Wielaard <mjw@redhat.com>
674 * memory-access.h (get_sleb128_step): Remove undefined behavior
675 of left shifting a signed value. Replace it with a multiplication.
677 2014-04-13 Mark Wielaard <mjw@redhat.com>
679 * Makefile.am: Remove !MUDFLAP conditions.
681 2014-04-09 Mark Wielaard <mjw@redhat.com>
683 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
684 before calling malloc to uncompress data.
686 2014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
688 Fix abort() on missing section headers.
689 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
690 New label err to return NULL.
692 2014-02-05 Josh Stone <jistone@redhat.com>
694 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
695 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
696 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
698 2013-12-30 Mark Wielaard <mjw@redhat.com>
700 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
701 dwfl_linux_proc_attach.
703 2013-12-20 Mark Wielaard <mjw@redhat.com>
705 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
707 2013-12-18 Mark Wielaard <mjw@redhat.com>
709 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
710 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
711 dwfl_module_getsym_info.
713 2013-12-16 Mark Wielaard <mjw@redhat.com>
715 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
717 2013-12-10 Josh Stone <jistone@redhat.com>
719 * memory-access.h (get_uleb128_rest_return): Removed.
720 (get_sleb128_rest_return): Removed.
721 (get_uleb128_step): Make this a self-contained block.
722 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
723 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
724 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
725 (__libdw_get_uleb128): Simplify and inline for all callers.
726 (__libdw_get_sleb128): Ditto.
727 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
728 * memory-access.c: Delete file.
729 * Makefile.am (libdw_a_SOURCES): Remove it.
730 (DEFS): Remove the now unused -DIS_LIBDW.
732 2013-12-09 Josh Stone <jistone@redhat.com>
734 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
735 __libdw_form_val_len, now handling only non-constant form lengths.
736 * libdwP.h (__libdw_form_val_len): New inlined function.
738 2013-12-09 Mark Wielaard <mjw@redhat.com>
740 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
741 location expressions.
742 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
743 location found, return empty location expression.
744 * dwarf_getlocation_implicit_pointer.c
745 (dwarf_getlocation_implicit_pointer): Likewise.
746 (__libdw_empty_loc_attr): New internal function.
747 * libdwP.h (__libdw_empty_loc_attr): Define.
749 2013-11-27 Mark Wielaard <mjw@redhat.com>
751 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
752 dwfl_module_getsym_elf.
754 2013-11-26 Mark Wielaard <mjw@redhat.com>
756 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
757 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
758 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
759 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
760 (ELFUTILS_0.158): ... here.
762 2013-11-09 Mark Wielaard <mjw@redhat.com>
764 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
765 check that it is zero.
767 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
769 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
770 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
771 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
772 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
773 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
775 2013-11-01 Michael Forney <mforney@mforney.org>
777 * Makefile.am (libdwfl_objects): New definition.
778 (libdw_a_LIBADD): Use libdwfl_objects.
780 2013-11-01 Michael Forney <mforney@mforney.org>
782 * Makefile.am: Use READELF.
784 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
786 * libdw.map (ELFUTILS_0.158): New.
788 2013-10-10 Mark Wielaard <mjw@redhat.com>
790 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
791 start_addr and rename last_offset to last_addr. Now both void *.
792 (tree_visitor): Use start_add and die_addr instead of start_offset
794 (dwarf_getfuncs): Use last_addr instead of last_offset.
796 2013-10-06 Mark Wielaard <mjw@redhat.com>
798 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
799 DW_CFA_val_expression are not used with abi_cfi.
801 2013-10-03 Josh Stone <jistone@redhat.com>
803 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
804 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
805 a unit, make sure to always hash the sig8 here, so none are missed.
807 2013-09-29 Mark Wielaard <mjw@redhat.com>
809 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
810 uintptr_t before casting to char *.
811 (__libdw_intern_expression): Cast data to uintptr_t before casting
813 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
814 op->number2 to uintptr_t before casting to char *.
816 2013-09-24 Josh Stone <jistone@redhat.com>
818 * libdw_visit_scopes.c (classify_die): Removed.
819 (may_have_scopes): New function to replace classify_die. There's no
820 need for full classification; just find tags that may contain scopes.
821 (__libdw_visit_scopes): Use a direct tag comparison for imported
822 units, and use may_have_scopes to test if recursion is needed.
824 2013-09-20 Mark Wielaard <mjw@redhat.com>
826 * dwarf_getfuncs.c (visitor_info): New struct.
827 (tree_visitor): New function.
828 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
829 * libdw.h (dwarf_getfuncs): Expand function documentation.
831 2013-09-12 Mark Wielaard <mjw@redhat.com>
833 * fde.c (intern_fde): Free fde and set libdw errno when start
834 or end could not be read.
836 2013-08-24 Mark Wielaard <mjw@redhat.com>
838 * dwarf_getlocation.c (store_implicit_value): Don't take data
839 as argument, get block data from op number2. Return false when
840 block data length and op number don't match up.
841 (__libdw_intern_expression): Store start of block for
842 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
843 relative data offset. Also store block start (including length)
844 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
845 * dwarf_getlocation_attr.c: New file.
846 * dwarf_getlocation_die.c: Likewise.
847 * libdw.h (dwarf_getlocation_die): New function definition.
848 (dwarf_getlocation_attr): Likewise.
849 * libdwP.h: Declare internal dwarf_getlocation_die.
850 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
851 dwarf_getlocation_attr.
852 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
853 dwarf_getlocation_attr.c.
855 2013-08-23 Mark Wielaard <mjw@redhat.com>
857 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
858 (attr_base_address): New function.
859 (initial_offset_base): New function.
860 (getlocations_addr): New function. Taken from...
861 (dwarf_getlocation_addr): here. Use new initial_offset_base and
863 (dwarf_getlocations): New function.
864 * libdw.h (dwarf_getlocations): New function definition.
865 * libdw.map (ELFUTILS_0.157): New.
867 2013-07-02 Mark Wielaard <mjw@redhat.com>
869 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
870 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
871 NEW_LINE macro. Free malloced line records if any at the end.
873 2013-07-02 Mark Wielaard <mjw@redhat.com>
875 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
877 2013-06-26 Mark Wielaard <mjw@redhat.com>
879 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
880 DIEs without children. Return an error whenever dwarf_child or
881 dwarf_siblingof return an error. Don't call recurse and increase
882 the depth for an imported unit. Walk the children of an imported
883 unit as if they are logical children of the parent root DIE.
885 2013-05-03 Mark Wielaard <mjw@redhat.com>
887 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
890 2013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
892 * libdw.map (ELFUTILS_0.156): New.
894 2013-04-24 Mark Wielaard <mjw@redhat.com>
896 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
898 2013-04-10 Mark Wielaard <mjw@redhat.com>
900 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
901 equal to address size when we have a DW_FORM_ref_addr for DWARF
904 2013-03-25 Mark Wielaard <mjw@redhat.com>
906 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
909 2013-03-12 Mark Wielaard <mjw@redhat.com>
911 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
912 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
914 2013-02-15 Mark Wielaard <mjw@redhat.com>
916 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
917 not dbg->sectiondata.
919 2013-01-07 Roland McGrath <roland@hack.frob.com>
922 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
923 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
925 2012-12-18 Mark Wielaard <mjw@redhat.com>
927 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
928 (check_section): Likewise on error.
929 (scngrp_read): Likewise.
930 (dwarf_begin_elf): Likewise.
932 2012-10-09 Petr Machata <pmachata@redhat.com>
934 * dwarf_getlocation.c (__libdw_intern_expression): Handle
935 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
936 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
937 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
939 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
941 * cfi.c: New include system.h.
942 (execute_cfi) (enough_registers): Clear new memory after realloc.
944 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
946 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
947 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
950 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
952 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
953 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
954 Remove the later DW_OP_call_frame_cfa push to RESULT.
956 2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
959 * fde.c (binary_search_fde): Remove always true <address >= start>
960 conditional. Move L initialization upwards.
962 2012-08-24 Mark Wielaard <mjw@redhat.com>
964 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
965 when ENABLE_DWZ is defined.
966 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
969 2012-08-16 Mark Wielaard <mjw@redhat.com>
971 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
972 * dwarf.h (DW_LANG_Go): Update comment.
973 (DW_LANG_Mips_Assembler): Likewise.
975 2012-06-27 Mark Wielaard <mjw@redhat.com>
977 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
978 * dwarf_begin.c (dwarf_begin): Add INTDEF.
979 * dwarf_begin_elf.c (__check_build_id): New internal_function.
980 (try_debugaltlink): New function.
981 (open_debugaltlink): Likewise.
982 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
983 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
985 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
986 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
988 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
989 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
990 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
992 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
993 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
994 (struct Dwarf): Add alt_dwarf and free_alt fields.
995 (__libdw_read_offset): Add dbg_ret argument, use to check with
996 __libdw_offset_in_section.
997 (__check_build_id): New function declaration.
998 (dwarf_begin): Define as INTDECL.
999 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1000 and DW_FORM_GNU_strp_alt.
1002 2012-07-19 Mark Wielaard <mjw@redhat.com>
1004 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1006 2012-07-24 Mark Wielaard <mjw@redhat.com>
1008 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1009 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1012 2012-07-24 Mark Wielaard <mjw@redhat.com>
1014 * dwarf.h: Add DW_ATE_UTF.
1016 2012-06-27 Mark Wielaard <mjw@redhat.com>
1018 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1020 2012-06-26 Mark Wielaard <mjw@redhat.com>
1022 * libdwP.h: Add IDX_debug_macro.
1023 * dwarf.h: Add DW_AT_GNU_macros.
1024 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1025 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1027 2012-04-27 Mark Wielaard <mjw@redhat.com>
1029 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1030 a constant offset from DW_AT_low_pc.
1032 2012-03-19 Tom Tromey <tromey@redhat.com>
1034 * libdw_findcu.c (findcu_cb): Move earlier.
1035 (__libdw_intern_next_unit): Add new CU to search tree here...
1036 (__libdw_findcu): ... not here.
1038 2012-01-31 Mark Wielaard <mjw@redhat.com>
1040 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1042 2011-11-31 Mark Wielaard <mjw@redhat.com>
1044 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1046 2011-07-14 Mark Wielaard <mjw@redhat.com>
1048 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1050 2011-05-16 Jakub Jelinek <jakub@redhat.com>
1052 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1053 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1056 2011-04-26 Mark Wielaard <mjw@redhat.com>
1058 * dwarf_child (dwarf_child): Sanity check end of section against
1059 cu_data () of die->cu.
1061 2011-03-22 Mark Wielaard <mjw@redhat.com>
1063 * dwarf.h: Add DW_TAG_GNU_call_site,
1064 DW_TAG_GNU_call_site_parameter,
1065 DW_AT_GNU_call_site_value,
1066 DW_AT_GNU_call_site_data_value,
1067 DW_AT_GNU_call_site_target,
1068 DW_AT_GNU_call_site_target_clobbered,
1069 DW_AT_GNU_tail_call,
1070 DW_AT_GNU_all_tail_call_sites,
1071 DW_AT_GNU_all_call_sites,
1072 DW_AT_GNU_all_source_call_sites,
1073 and DW_OP_GNU_entry_value.
1075 2011-03-10 Petr Machata <pmachata@redhat.com>
1077 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1078 abbreviation with code 0.
1080 2011-03-09 Petr Machata <pmachata@redhat.com>
1082 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1084 2011-02-23 Roland McGrath <roland@redhat.com>
1086 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1087 Declare __libdw_free_zdata.
1088 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1089 (dwarf_end): Call it.
1091 * dwarf_begin_elf.c (valid_p): Likewise.
1092 (check_section, scngrp_read): Likewise.
1093 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1095 2010-10-13 Roland McGrath <roland@redhat.com>
1097 * dwarf.h: Add DW_LANG_Go.
1099 2010-10-05 Roland McGrath <roland@redhat.com>
1101 * dwarf_getaranges.c: Use malloc rather than alloca,
1102 since the total number of elements can be quite huge.
1104 2010-07-26 Roland McGrath <roland@redhat.com>
1106 * dwarf_getlocation_implicit_pointer.c: New file.
1107 * Makefile.am (libdw_a_SOURCES): Add it.
1108 * libdw.map (ELFUTILS_0.149): New set.
1109 Add dwarf_getlocation_implicit_pointer.
1110 * libdw.h: Declare it.
1112 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1113 (dwarf_offdie, dwarf_offdie_types): Update callers.
1114 * libdwP.h: Declare it.
1116 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1117 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1119 2010-08-24 Roland McGrath <roland@redhat.com>
1121 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1123 2010-07-27 Roland McGrath <roland@redhat.com>
1125 * dwarf_formref_die.c: Fix sig8 hash insertion.
1127 2010-06-23 Roland McGrath <roland@redhat.com>
1129 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1130 * libdw.h: Remove it.
1131 * libdw.map: Likewise.
1133 2010-06-22 Roland McGrath <roland@redhat.com>
1135 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1137 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1140 2010-06-21 Roland McGrath <roland@redhat.com>
1142 * dwarf.h: Add DW_TAG_GNU_* constants.
1144 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1147 2010-06-20 Roland McGrath <roland@redhat.com>
1149 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1150 to search TUs instead of CUs.
1151 * libdwP.h: Update decl.
1152 (struct Dwarf): New member tu_tree.
1153 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1154 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1155 (dwarf_offdie): ... here.
1156 (dwarf_offdie_types): New function.
1157 * libdw.h: Declare it.
1158 * libdw.map (ELFUTILS_0.148): Add it.
1160 * libdwP.h (CUDIE): Use cu_data.
1161 * dwarf_formblock.c: Likewise.
1162 * dwarf_formref_die.c: Likewise.
1163 * dwarf_diecu.c: Use CUDIE macro.
1164 * dwarf_formaddr.c: Use cu_sec_idx.
1166 2010-06-16 Roland McGrath <roland@redhat.com>
1168 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1169 we don't repeat a CU lookup we've already done. Handle
1170 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1172 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1174 (__libdw_findcu): ... here. Call it.
1175 * libdwP.h: Declare it.
1176 (struct Dwarf): New member next_tu_offset.
1178 * dwarf_sig8_hash.c: New file.
1179 * dwarf_sig8_hash.h: New file.
1180 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1181 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1183 * libdwP.h (struct Dwarf): New member sig8_hash.
1184 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1185 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1187 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1188 (dwarf_nextcu): ... here. Call it.
1189 * libdw.h: Declare it.
1190 * libdwP.h: Add INTDECL.
1191 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1192 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1194 * libdwP.h (cu_sec_idx, cu_data): New functions.
1195 Use .debug_types when CU is a TU.
1196 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1197 * dwarf_siblingof.c: Likewise.
1198 * dwarf_formstring.c: Likewise.
1199 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1200 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1201 (dwarf_getlocation_addr): Likewise.
1203 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1204 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1205 .debug_types header size instead of .debug_info header size.
1207 * dwarf_diecu.c: Update caller.
1208 * dwarf_getaranges.c: Likewise.
1209 * dwarf_nextcu.c: Likewise.
1210 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1212 * fde.c (fde_by_offset): Renamed to ...
1213 (__libdw_fde_by_offset): ... this, made global and internal_function.
1214 Don't take ADDRESS argument.
1215 (__libdw_find_fde): Update caller. Do address sanity check here.
1216 * cfi.h: Declare __libdw_fde_by_offset.
1217 * cfi.c (dwarf_cfi_validate_fde): New function.
1218 * libdw.h: Declare it.
1219 * libdw.map (ELFUTILS_0.148): Add it.
1221 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1222 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1224 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1225 Don't assume DW_EH_PE_aligned refers to native address size.
1227 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1230 2010-06-17 Roland McGrath <roland@redhat.com>
1232 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1234 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1235 into an inner inline function. Set new fields. Check all fields for
1236 overflow when setting.
1237 * dwarf_lineisa.c: New file.
1238 * dwarf_linediscriminator.c: New file.
1239 * dwarf_lineop_index.c: New file.
1240 * Makefile.am (libdw_a_SOURCES): Add them.
1241 * libdw.map (ELFUTILS_0.148): Add them.
1242 * libdw.h: Declare them.
1244 2010-06-16 Roland McGrath <roland@redhat.com>
1246 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1248 * fde.c (fde_by_offset): Renamed to ...
1249 (__libdw_fde_by_offset): ... this, made global and internal_function.
1250 Don't take ADDRESS argument.
1251 (__libdw_find_fde): Update caller. Do address sanity check here.
1252 * cfi.h: Declare __libdw_fde_by_offset.
1253 * cfi.c (dwarf_cfi_validate_fde): New function.
1254 * libdw.h: Declare it.
1255 * libdw.map (ELFUTILS_0.148): Add it.
1257 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1258 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1260 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1261 Don't assume DW_EH_PE_aligned refers to native address size.
1263 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1266 2010-06-15 Roland McGrath <roland@redhat.com>
1268 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1270 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1271 here, since we don't support it yet.
1273 * dwarf_next_cfi.c: Handle version 4 format.
1275 * dwarf_getsrclines.c: Handle version 4 format.
1277 2010-06-01 Roland McGrath <roland@redhat.com>
1279 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1280 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1282 * libdwP.h (CIE_VERSION): Remove unused macro.
1284 * dwarf_getsrclines.c: Fix version field test.
1285 * libdwP.h (DWARF_VERSION): Remove useless macro.
1287 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1289 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1291 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1293 2010-05-31 Mark Wielaard <mjw@redhat.com>
1295 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1296 * libdw.h (dwarf_cfi_cie_p): ... here.
1298 2010-05-31 Mark Wielaard <mjw@redhat.com>
1300 * dwarf.h: Fix DW_LANG_Python constant.
1302 2010-05-28 Eduardo Santiago <santiago@redhat.com>
1304 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1307 2010-05-27 Roland McGrath <roland@redhat.com>
1309 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1310 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1312 2010-05-08 Roland McGrath <roland@redhat.com>
1314 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1315 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1316 (getlocation): Update caller.
1317 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1318 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1319 * libdwP.h: Update decl.
1321 2010-04-26 Roland McGrath <roland@redhat.com>
1323 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1324 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1325 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1326 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1328 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1329 Prepend DW_OP_call_frame_cfa if true.
1330 (getlocation): Update caller.
1331 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1332 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1333 * libdwP.h: Update decl.
1335 2010-04-22 Roland McGrath <roland@redhat.com>
1337 * cfi.c (execute_cfi): Never return without cleanup.
1339 (cie_cache_initial_state): Adjust caller to expect that free.
1340 (__libdw_frame_at_address): Likewise.
1342 2010-03-10 Roland McGrath <roland@redhat.com>
1344 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1346 2010-02-15 Roland McGrath <roland@redhat.com>
1348 * Makefile.am: Use config/eu.am for common stuff.
1350 2010-02-02 Mark Wielaard <mjw@redhat.com>
1352 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1354 2010-01-07 Roland McGrath <roland@redhat.com>
1356 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1358 2010-01-05 Roland McGrath <roland@redhat.com>
1360 * dwarf_aggregate_size.c: New file.
1361 * Makefile.am (libdw_a_SOURCES): Add it.
1362 * libdw.h: Declare it.
1363 * libdwP.h: Add INTDECL.
1364 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1366 * dwarf_srclang.c: Add INTDEF.
1367 * libdwP.h: Add INTDECL.
1369 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1371 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1373 2009-11-21 Roland McGrath <roland@redhat.com>
1375 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1378 2009-10-15 Roland McGrath <roland@redhat.com>
1380 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1381 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1383 2009-09-17 Roland McGrath <roland@redhat.com>
1385 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1386 argument a pointer to const.
1387 * libdw.h: Update decl.
1389 2009-09-10 Roland McGrath <roland@redhat.com>
1391 * dwarf_getlocation.c (store_implicit_value): New function.
1392 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1393 (dwarf_getlocation_implicit_value): New function.
1394 * libdw.h: Declare it.
1395 * libdw.map (ELFUTILS_0.143): Add it.
1397 2009-09-09 Mark Wielaard <mjw@redhat.com>
1399 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1401 2009-08-21 Josh Stone <jistone@redhat.com>
1403 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1405 2009-08-10 Roland McGrath <roland@redhat.com>
1407 * dwarf_getscopevar.c: Use dwarf_diename.
1409 2009-08-09 Roland McGrath <roland@redhat.com>
1411 * libdw.map (ELFUTILS_0.143): New version set,
1412 inherits from ELFUTILS_0.142.
1413 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1414 alias in the ELFUTILS_0.122 version set and the default in the new set.
1415 * dwarf_srclang.c: Likewise.
1416 * dwarf_decl_file.c: Likewise.
1417 * dwarf_decl_line.c: Likewise.
1418 * dwarf_decl_column.c: Likewise.
1419 * dwarf_bytesize.c: Likewise.
1420 * dwarf_bitsize.c: Likewise.
1421 * dwarf_bitoffset.c: Likewise.
1423 2009-08-07 Roland McGrath <roland@redhat.com>
1425 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1426 * dwarf_srclang.c: Likewise.
1427 * dwarf_decl_file.c: Likewise.
1428 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1429 * dwarf_bytesize.c: Likewise.
1430 * dwarf_bitsize.c: Likewise.
1431 * dwarf_bitoffset.c: Likewise.
1433 2009-07-22 Roland McGrath <roland@redhat.com>
1435 * dwarf_frame_cfa.c: Change calling convention.
1436 * libdw.h: Update decl.
1438 * dwarf_frame_register.c: Change calling/return-value convention for
1439 value-only results and undefined/same_value.
1440 * libdw.h: Update decl.
1442 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1443 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1444 return that value instead.
1445 (getlocation): Update caller.
1446 * dwarf_frame_cfa.c: Likewise.
1447 * libdwP.h: Update decl.
1449 2009-07-21 Roland McGrath <roland@redhat.com>
1451 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1452 Fix loop iteration after skipping a bogus or useless CU.
1454 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1455 absence, not DWARF_E_NO_DEBUG_LINE.
1457 2009-07-20 Roland McGrath <roland@redhat.com>
1459 * dwarf_getlocation.c (__libdw_intern_expression):
1460 Handle DW_OP_stack_value.
1462 2009-07-16 Roland McGrath <roland@redhat.com>
1464 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1465 reject others when CU's version > 3.
1467 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1469 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1470 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1471 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1472 and DW_AT_const_expr.
1473 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1474 and DW_FORM_ref_sig8.
1476 2009-07-15 Roland McGrath <roland@redhat.com>
1478 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1479 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1481 2009-07-13 Roland McGrath <roland@redhat.com>
1483 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1485 2009-07-08 Roland McGrath <roland@redhat.com>
1487 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1490 * libdwP.h (struct Dwarf): Add member `cfi'.
1491 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1492 * dwarf_getcfi.c: New file.
1493 * dwarf_getcfi_elf.c: New file.
1494 * dwarf_cfi_end.c: New file.
1495 * dwarf_cfi_addrframe.c: New file.
1496 * dwarf_frame_cfa.c: New file.
1497 * dwarf_frame_register.c: New file.
1498 * dwarf_frame_return_address_register.c: New file.
1499 * Makefile.am (libdw_a_SOURCES): Add them.
1500 * unwind.h: Declare those functions.
1501 * libdw.map (ELFUTILS_0.142): Export them.
1503 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1505 (getlocation): ... here, call it.
1506 * libdwP.h: Declare it.
1510 * frame-cache.c: New file.
1513 * encoded-value.h: New file.
1514 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1515 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1516 * dwarf_error.c (errmsgs): Add element for it.
1518 * dwarf_next_cfi.c: New file.
1519 * Makefile.am (libdw_a_SOURCES): Add it.
1520 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1521 Declare dwarf_next_cfi.
1522 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1525 * memory-access.h [! ALLOW_UNALIGNED]
1526 (read_2ubyte_unaligned): Renamed to ...
1527 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1528 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1529 (read_2sbyte_unaligned): Likewise.
1530 (read_4ubyte_unaligned): Likewise.
1531 (read_4sbyte_unaligned): Likewise.
1532 (read_8ubyte_unaligned): Likewise.
1533 (read_8sbyte_unaligned): Likewise.
1535 * libdwP.h (IDX_eh_frame): Remove it.
1536 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1538 2009-07-08 Roland McGrath <roland@redhat.com>
1540 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1542 * dwarf_getlocation.c (check_constant_offset): New function.
1543 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1544 handle DW_AT_data_member_location of data[48] as constant offset.
1546 2009-06-18 Roland McGrath <roland@redhat.com>
1548 * libdwP.h (__libdw_read_address_inc): Constify.
1549 (__libdw_read_offset_inc): Likewise.
1550 * dwarf_getaranges.c: Likewise.
1551 * dwarf_getlocation.c: Likewise.
1552 * dwarf_getsrclines.c: Likewise.
1553 * dwarf_nextcu.c: Likewise.
1555 2009-05-05 Petr Machata <pmachata@redhat.com>
1557 * libdwP.h (__libdw_formptr): Declare new function.
1558 * dwarf_formudata.c: Implement it here.
1559 * dwarf_getlocation.c (dwarf_getlocation_addr):
1560 Call it instead of hand-rolled offset handling code.
1561 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1562 * dwarf_ranges.c (dwarf_ranges): Likewise.
1564 2009-05-04 Petr Machata <pmachata@redhat.com>
1566 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1567 * dwarf_ranges.c: Implement it here.
1568 (dwarf_ranges): Call it.
1569 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1571 2009-04-23 Petr Machata <pmachata@redhat.com>
1573 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1574 of read_*ubyte_unaligned.
1575 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1576 * dwarf_formstring.c (dwarf_formstring): Likewise.
1577 * dwarf_formudate.c (dwarf_formudata): Likewise.
1578 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1579 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1580 * dwarf_getpubnames.c (get_offsets): Likewise.
1581 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1583 2009-04-23 Petr Machata <pmachata@redhat.com>
1585 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1586 __libdw_read_addr, __libdw_read_off): Add four new internal
1589 2009-05-07 Roland McGrath <roland@redhat.com>
1591 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1592 return value and OFFSET argument, not CU-relative. Only fetch the
1593 attribute data when called with OFFSET of 0.
1595 2009-05-07 Petr Machata <pmachata@redhat.com>
1597 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1598 DW_AT_macro_info attribute of CU DIE.
1600 2009-04-15 Roland McGrath <roland@redhat.com>
1602 * dwarf.h (DW_CIE_ID): Removed.
1603 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1605 2009-04-01 Roland McGrath <roland@redhat.com>
1607 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1609 2009-01-28 Roland McGrath <roland@redhat.com>
1611 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1612 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1614 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1616 2009-01-26 Roland McGrath <roland@redhat.com>
1618 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1620 2009-01-25 Roland McGrath <roland@redhat.com>
1622 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1624 2009-01-23 Roland McGrath <roland@redhat.com>
1626 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1627 Put these rules under if MAINTAINER_MODE.
1629 2009-01-22 Roland McGrath <roland@redhat.com>
1631 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1633 2009-01-21 Roland McGrath <roland@redhat.com>
1635 * Makefile.am (CLEANFILES): Renamed to ...
1636 (MOSTLYCLEANFILES): ... here.
1637 (CLEANFILES): New variable, add known-dwarf.h.
1639 2009-01-17 Roland McGrath <roland@redhat.com>
1641 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1642 Make it unconditional.
1643 (BUILT_SOURCES): Updated.
1645 * dwarf.h: Add description comments for DW_LANG_* values.
1647 * Makefile.am [MAINTAINER_MODE]
1648 ($(srcdir)/known-dwarf.h): New target.
1649 (BUILT_SOURCES): Add it.
1651 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1653 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1655 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1657 2009-01-08 Roland McGrath <roland@redhat.com>
1659 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1661 2008-01-06 Roland McGrath <roland@redhat.com>
1663 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1665 * dwarf_haschildren.c: Return -1 for error case, not 0.
1667 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1669 2009-01-06 Ulrich Drepper <drepper@redhat.com>
1671 * dwarf.h: Add definition for unwind and call frame information.
1673 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1674 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1676 2008-08-15 Roland McGrath <roland@redhat.com>
1678 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1679 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1681 2008-01-21 Ulrich Drepper <drepper@redhat.com>
1683 * dwarf_child.c: Minor optimizations.
1684 * dwarf_getattrs.c: Likewise.
1685 * dwarf_getpubnames.c: Likewise.
1686 * dwarf_siblingof.c: Likewise.
1687 * dwarf_tag.c: Likewise.
1689 2008-01-18 Ulrich Drepper <drepper@redhat.com>
1691 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1692 of DWARF_VERSION comparison, just fail if the file's version is newer.
1694 2008-01-17 Nick Clifton <nickc@redhat.com>
1696 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1697 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1698 (DWARF3_LENGTH_64_BIT): New define.
1699 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1700 * dwarf_getpubnames: Include dwarf.h.
1701 (get_offsets): Use the new definitions.
1702 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1703 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1704 (dwarf_nextcu): Use the new definitions.
1706 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1707 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1708 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1709 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1711 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1714 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1716 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1717 Set the address in the return structure to the address of the next
1718 non-sibling die, if there is no sibling and the return pointer is
1719 not the same as the die pointer.
1720 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1722 * dwarf_child.c: Fix typo in comment.
1724 * libdwP.h (DWARF_VERSION): Change to 3.
1726 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1727 not have a initialised valp pointer.
1729 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1730 the end of the attributes is reached. When the callback fails,
1731 return the address of the failing attribute, not the address of
1733 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1735 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1736 (dwarf_child): Likewise.
1737 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1738 (dwarf_tag): Likewise.
1740 2008-01-08 Roland McGrath <roland@redhat.com>
1742 * Makefile.am (euinclude): Variable removed.
1743 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1744 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1746 2007-10-17 Roland McGrath <roland@redhat.com>
1748 * libdw.h (__deprecated_attribute__): New macro.
1749 (dwarf_formref): Mark it deprecated.
1750 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1751 (dwarf_formref): ... here. Call it. Remove INTDEF.
1752 * libdwP.h: Remove INTDECL.
1753 Declare __libdw_formref.
1754 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1755 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1757 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1758 needs to check CU->version.
1760 * libdwP.h (struct Dwarf_CU): New member `version'.
1761 * libdw_findcu.c (__libdw_findcu): Initialize it.
1763 * dwarf_child.c: Return 1 for null entry as first child.
1765 2007-10-05 Roland McGrath <roland@redhat.com>
1767 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1769 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1770 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1772 2007-10-03 Roland McGrath <roland@redhat.com>
1774 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1775 and dwfl_build_id_find_debuginfo.
1777 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1778 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1780 2007-10-02 Roland McGrath <roland@redhat.com>
1782 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1785 2007-08-07 Roland McGrath <roland@redhat.com>
1787 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1788 error code is DWARF_E_NOERROR (0).
1790 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1791 Fix typo in __libdw_visit_scopes argument.
1793 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1794 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1796 2007-07-03 Roland McGrath <roland@redhat.com>
1798 * libdw.h (__extern_inline): New macro.
1799 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1801 2007-04-16 Roland McGrath <roland@redhat.com>
1803 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1805 2007-04-05 Roland McGrath <roland@redhat.com>
1807 * dwarf_getsrcdirs.c: New file.
1808 * Makefile.am (libdw_a_SOURCES): Add it.
1809 * libdw.h: Declare dwarf_getsrcdirs.
1810 * libdw.map (ELFUTILS_0.127): Add it.
1812 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1813 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1814 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1815 Save DIRARRAY in the Dwarf_Files.
1817 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1818 address to check for all-ones base address entry. Check directly.
1819 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1821 2007-03-25 Roland McGrath <roland@redhat.com>
1823 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1824 Return NULL when freeing RESULT on error.
1825 (global_read, scngrp_read): Check return value from check_section,
1826 break out of loop after it has freed RESULT.
1827 (valid_p): Handle null argument.
1829 2007-03-12 Roland McGrath <roland@redhat.com>
1831 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1833 2007-03-04 Roland McGrath <roland@redhat.com>
1835 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1836 ELFUTILS_0.126. Add dwfl_module_addrsym.
1838 2007-02-10 Roland McGrath <roland@redhat.com>
1840 * dwarf.h (DW_OP_fbreg): Comment fix.
1842 2007-02-03 Roland McGrath <roland@redhat.com>
1844 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1845 * libdw.map (ELFUTILS_0.126): New version set, inherits from
1846 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1847 exported in the past.
1849 2006-12-17 Roland McGrath <roland@redhat.com>
1851 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1852 address when the CU is missing attributes due to buggy GCC.
1854 2006-08-29 Roland McGrath <roland@redhat.com>
1856 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1858 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1859 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1861 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1862 result is aligned. Adjust NEWP->remaining here for this allocation.
1863 * libdwP.h: Update decl.
1864 (libdw_alloc): Update caller.
1866 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1868 * dwarf_child.c: Adjust for internal_function_def removal.
1869 * dwarf_getabbrev.c: Likewise.
1870 * dwarf_tag.c: Likewise.
1871 * libdw_form.c: Likewise.
1872 * memory-access.c: Likewise.
1874 2006-06-28 Roland McGrath <roland@redhat.com>
1876 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1878 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1881 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1883 * libdw.h: Add extern "C".
1885 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1887 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1888 aranges information.
1890 2006-05-21 Ulrich Drepper <drepper@redhat.com>
1892 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1895 2006-02-28 Roland McGrath <roland@redhat.com>
1897 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1898 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1899 values from DWARF 3.0.
1901 2006-02-22 Roland McGrath <roland@redhat.com>
1903 * libdw.map: Bump to 0.120; export dwfl_version.
1905 2005-12-22 Roland McGrath <roland@redhat.com>
1907 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1909 2005-12-12 Roland McGrath <roland@redhat.com>
1911 * dwarf_ranges.c: Copy CU base address-finding code from
1914 2005-12-09 Roland McGrath <roland@redhat.com>
1916 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1917 Delay CU base lookup until it's needed.
1918 If CU base lookup fails with no error, flag invalid DWARF.
1920 2005-11-25 Roland McGrath <roland@redhat.com>
1922 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1924 2005-11-15 Roland McGrath <roland@redhat.com>
1926 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1928 2005-11-13 Roland McGrath <roland@redhat.com>
1930 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1932 2005-10-27 Roland McGrath <roland@redhat.com>
1934 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1935 don't match end_sequence markers.
1937 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1938 before normal records at the same address.
1939 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1942 2005-10-26 Roland McGrath <roland@redhat.com>
1944 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1945 * dwarf_func_file.c: Renamed to ...
1946 * dwarf_decl_file.c: ... here.
1947 * dwarf_func_col.c: Renamed to ...
1948 * dwarf_decl_column.c: ... here.
1949 * dwarf_func_line.c: Renamed to ...
1950 * dwarf_decl_line.c: ... here.
1951 (dwarf_func_line): Renamed to ...
1952 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1953 (__libdw_func_intval): Renamed __libdw_attr_intval.
1954 * dwarf_func_name.c: File removed.
1955 * dwarf_func_lowpc.c: File removed.
1956 * dwarf_func_highpc.c: File removed.
1957 * dwarf_func_entrypc.c: File removed.
1958 * dwarf_func_die.c: File removed.
1959 * Makefile.am (libdw_a_SOURCES): Updated.
1960 * libdw.h: Update decls.
1961 (Dwarf_Func): Type removed.
1962 * libdwP.h: Update decls.
1963 (struct Dwarf_Func_s): Type removed.
1964 * libdw.map: Updated.
1966 * libdwP.h (CUDIE): New macro.
1967 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1968 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1969 * dwarf_ranges.c (dwarf_ranges): Likewise.
1971 * dwarf_getloclist.c: Renamed to ...
1972 * dwarf_getlocation.c: ... here.
1973 (getloclist): Renamed to getlocation.
1974 (dwarf_getloclist): Renamed to dwarf_getlocation.
1975 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1976 * Makefile.am (libdw_a_SOURCES): Updated.
1977 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1978 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1979 (Dwarf_Loc): Renamed Dwarf_Op.
1980 * libdwP.h (struct loc_s): Update use.
1981 * libdw.map: Update map.
1983 * dwarf_entry_breakpoints.c: Use the second line record within the
1984 function, regardless of its source location data.
1986 2005-10-25 Roland McGrath <roland@redhat.com>
1988 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1990 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1992 2005-10-14 Roland McGrath <roland@redhat.com>
1994 * dwarf_diecu.c (dwarf_diecu): New file.
1995 * Makefile.am (libdw_a_SOURCES): Add it.
1996 * libdw.h: Declare dwarf_diecu.
1997 * libdw.map: Export it.
1999 * libdw.map: Bump to 0.116; export dwarf_ranges.
2001 2005-09-20 Roland McGrath <roland@redhat.com>
2003 * dwarf_haspc.c: Use dwarf_ranges.
2004 * dwarf_entry_breakpoints.c: Likewise.
2006 * dwarf_ranges.c: New file.
2007 * Makefile.am (libdw_a_SOURCES): Add it.
2008 * libdw.h: Declare dwarf_ranges.
2009 * libdwP.h: Add INTDECL.
2011 2005-09-14 Roland McGrath <roland@redhat.com>
2013 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2014 prologue_end marker scanning loop.
2016 2005-09-11 Roland McGrath <roland@redhat.com>
2018 * dwarf.h: Comment typo fix.
2020 2005-09-07 Roland McGrath <roland@redhat.com>
2022 * dwarf_entry_breakpoints.c: New file.
2023 * Makefile.am (libdw_a_SOURCES): Add it.
2024 * libdw.h: Declare dwarf_entry_breakpoints.
2026 * dwarf_entrypc.c: New file.
2027 * Makefile.am (libdw_a_SOURCES): Add it.
2028 * libdw.h: Declare dwarf_entrypc.
2029 * libdwP.h: Add INTDECL.
2031 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2033 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2034 (%.os): Use COMPILE.os.
2035 (COMPILE.os): Filter out gconv options.
2037 2005-08-27 Roland McGrath <roland@redhat.com>
2039 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2040 __libdw_visit_scopes.
2042 * dwarf_getscopes_die.c: New file.
2043 * Makefile.am (libdw_a_SOURCES): Add it.
2044 * libdw.h: Declare dwarf_getscopes_die.
2045 * libdw.map: Bump to 0.115 and add it.
2047 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2048 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2049 Take two functions for both preorder and postorder visitors.
2050 * libdwP.h: Update decl.
2051 (struct Dwarf_Die_Chain): New type.
2052 * dwarf_func_inline.c: Update uses.
2054 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2056 * libdwP.h: Add INTDECL.
2057 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2059 2005-08-23 Roland McGrath <roland@redhat.com>
2061 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2062 DW_AT_specification the same as DW_AT_abstract_origin.
2064 2005-08-20 Roland McGrath <roland@redhat.com>
2066 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2067 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2068 and dwfl_report_offline.
2070 2005-08-19 Roland McGrath <roland@redhat.com>
2072 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2073 Add dwfl_module_relocate_address, dwfl_module_relocations,
2074 dwfl_module_relocation_info.
2076 2005-08-18 Roland McGrath <roland@redhat.com>
2078 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2079 outermost scope in the results.
2081 2005-08-15 Roland McGrath <roland@redhat.com>
2083 * dwarf_func_inline.c: New file.
2084 * Makefile.am (libdw_a_SOURCES): Add it.
2085 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2086 * libdw.map: Add them.
2088 * dwarf_func_die.c: New file.
2089 * Makefile.am (libdw_a_SOURCES): Add it.
2090 * libdw.h: Declare dwarf_func_die.
2091 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2093 2005-08-10 Ulrich Drepper <drepper@redhat.com>
2095 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2096 of DW_LNS_set_epilog_begin.
2098 2005-08-09 Roland McGrath <roland@redhat.com>
2100 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2102 * dwarf_end.c: Add INTDEF.
2103 * dwarf_error.c (dwarf_errmsg): Likewise.
2104 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2106 2005-08-01 Roland McGrath <roland@redhat.com>
2108 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2109 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2111 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2113 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2114 (libdw_a_LIBADD): Add all files from libdwfl.a.
2116 2005-07-27 Roland McGrath <roland@redhat.com>
2118 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2119 along with ../libebl/libebl.a and ../lib/libeu.a;
2120 depend on ../libelf/libelf.so.
2121 (libdw_so_LDADD): New variable.
2122 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2124 * libdw.map: Define an empty base version and move all symbols to
2125 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2127 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2129 * dwarf_error.c: Add internal alias for dwarf_errno.
2130 * libdwP.h: Declare __dwarf_errno_internal.
2131 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2133 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2136 2005-06-01 Roland McGrath <roland@redhat.com>
2138 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2139 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2141 2005-06-08 Roland McGrath <roland@redhat.com>
2143 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2144 (get_sleb128_step, get_sleb128): Likewise.
2145 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2146 * dwarf_getloclist.c (getloclist): Likewise.
2147 * dwarf_formblock.c (dwarf_formblock): Likewise.
2148 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2149 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2150 * dwarf_formref.c (dwarf_formref): Likewise.
2151 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2152 * dwarf_formudata.c (dwarf_formudata): Likewise.
2153 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2154 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2155 * dwarf_tag.c (dwarf_tag): Likewise.
2156 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2157 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2158 * libdw_form.c (__libdw_form_val_len): Likewise.
2159 * libdwP.h: Update decl.
2161 2005-06-04 Roland McGrath <roland@redhat.com>
2163 * memory-access.h (get_uleb128_rest_return): New macro.
2164 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2165 (get_sleb128_rest_return): New macro.
2166 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2167 * memory-access.c: New file.
2168 * Makefile.am (libdw_a_SOURCES): Add it.
2169 (DEFS): Add -DIS_LIBDW.
2171 2005-05-31 Roland McGrath <roland@redhat.com>
2173 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2176 2005-05-30 Roland McGrath <roland@redhat.com>
2178 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2179 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2181 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2182 BEGIN value. Instead, match base address entries separately for
2185 2005-05-28 Roland McGrath <roland@redhat.com>
2187 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2188 past location expression contents.
2190 2005-05-23 Roland McGrath <roland@redhat.com>
2192 * dwarf_getsrclines.c: Comment typo fix.
2194 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2195 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2197 2005-05-22 Ulrich Drepper <drepper@redhat.com>
2199 * libdwP.h: Only use INTDECL for alias prototypes.
2201 2005-05-19 Roland McGrath <roland@redhat.com>
2203 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2205 * dwarf_getscopevar.c: New file.
2206 * Makefile.am (libdw_a_SOURCES): Add it.
2207 * libdw.h: Declare dwarf_getscopevar.
2209 * dwarf_getsrcfiles.c: Add INTDEF.
2210 * dwarf_haschildren.c: Likewise.
2211 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2213 * dwarf_getscopes.c: New file.
2214 * Makefile.am (libdw_a_SOURCES): Add it.
2215 * libdw.h: Declare dwarf_getscopes.
2216 * libdw.map: Add it.
2218 2005-05-18 Roland McGrath <roland@redhat.com>
2220 * libdwP.h (IDX_debug_ranges): New enum constant.
2221 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2222 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2223 * dwarf_error.c (errmsgs): Add it.
2224 * dwarf_haspc.c: New file.
2225 * libdw.h: Declare dwarf_haspc.
2226 * libdw.map: Add it.
2227 * libdwP.h: Add INTDECL.
2229 * dwarf_attr_integrate.c: New file.
2230 * dwarf_hasattr_integrate.c: New file.
2231 * Makefile.am (libdw_a_SOURCES): Add them.
2232 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2233 * libdw.map: Add them.
2235 * dwarf_hasattr.c: Add INTDEF.
2236 * libdwP.h: Add INTDECL for it.
2238 * dwarf_formref_die.c: New file.
2239 * Makefile.am (libdw_a_SOURCES): Add it.
2240 * libdw.h (dwarf_formref_die): Declare it.
2241 * libdwP.h (dwarf_formref_die): Add INTDECL.
2242 * libdw.map: Add it.
2244 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2246 (dwarf_getloclist): ... here. Call them.
2247 (dwarf_addrloclists): New function.
2248 * libdw.h: Declare it.
2249 * libdw.map: Add it.
2251 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2252 DW_MACINFO_end_file. Recognize type 0 as terminator.
2254 2005-05-05 Roland McGrath <roland@redhat.com>
2256 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2258 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2259 the line program does not produce all entries in ascending order.
2261 2005-04-25 Ulrich Drepper <drepper@redhat.com>
2263 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2264 occurences (e.g., inlines) better.
2266 2005-04-24 Ulrich Drepper <drepper@redhat.com>
2268 * libdw.h (DWARF_END_ABBREV): Define.
2269 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2271 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2273 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2274 as error of __libdw_getabbrev.
2276 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2278 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2280 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2281 results back to caller.
2283 2005-04-04 Roland McGrath <roland@redhat.com>
2285 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2287 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2290 2005-04-04 Ulrich Drepper <drepper@redhat.com>
2292 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2294 * dwarf_getsrc_file.c: New file.
2295 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2296 * libdw.h: Declare dwarf_getsrc_file.
2297 * libdw.map: Add dwarf_getsrc_file.
2299 2005-04-02 Ulrich Drepper <drepper@redhat.com>
2301 * dwarf_func_entrypc.c: New file.
2302 * dwarf_func_col.c: New file.
2303 * dwarf_func_line.c: New file.
2304 * dwarf_func_file.c: New file.
2305 * libdw.h: Add prototypes for new functions.
2306 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2308 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2309 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2310 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2311 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2312 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2313 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2315 * dwarf.h: Add some DWARF3 definitions.
2317 2005-04-01 Ulrich Drepper <drepper@redhat.com>
2319 * dwarf_getfuncs.c: New file.
2320 * dwarf_func_highpc.c: New file.
2321 * dwarf_func_lowpc.c: New file.
2322 * dwarf_func_name.c: New file.
2323 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2324 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2325 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2326 and dwarf_func_name.
2327 * libdw.h: Add prototypes for new functions.
2328 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2329 * dwarf_siblingof.c: Likewise.
2330 * dwarf_dieoffset.c: Likewise.
2331 * dwarf_highpc.c: Likewise.
2332 * dwarf_lowpc.c: Likewise.
2333 * libdwP.h: Add prototypes for internal functions.
2334 Define Dwarf_Func_s structure.
2336 2005-03-29 Ulrich Drepper <drepper@redhat.com>
2338 * libdw.h: Add padding in Dwarf_die.
2340 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2341 * dwarf_attr.c: Likewise.
2342 * dwarf_begin.c: Likewise.
2343 * dwarf_begin_elf.c: Likewise.
2344 * dwarf_bitoffset.c: Likewise.
2345 * dwarf_bitsize.c: Likewise.
2346 * dwarf_bytesize.c: Likewise.
2347 * dwarf_diename.c: Likewise.
2348 * dwarf_formaddr.c: Likewise.
2349 * dwarf_formblock.c: Likewise.
2350 * dwarf_formref.c: Likewise.
2351 * dwarf_formstring.c: Likewise.
2352 * dwarf_formudata.c: Likewise.
2353 * dwarf_getarange_addr.c: Likewise.
2354 * dwarf_getarangeinfo.c: Likewise.
2355 * dwarf_getaranges.c: Likewise.
2356 * dwarf_getloclist.c: Likewise.
2357 * dwarf_getmacros.c: Likewise.
2358 * dwarf_getsrc_die.c: Likewise.
2359 * dwarf_getsrcfiles.c: Likewise.
2360 * dwarf_getsrclines.c: Likewise.
2361 * dwarf_highpc.c: Likewise.
2362 * dwarf_lowpc.c: Likewise.
2363 * dwarf_nextcu.c: Likewise.
2364 * dwarf_offdie.c: Likewise.
2365 * dwarf_siblingof.c: Likewise.
2366 * dwarf_srclang.c: Likewise.
2367 * dwarf_tag.c: Likewise.
2368 * libdw_findcu.c: Likewise.
2369 * libdwP.h: Add prototypes for internal functions.
2371 * dwarf_addrdie.c: New file.
2372 * dwarf_macro_opcode.c: New file.
2373 * dwarf_macro_param1.c: New file.
2374 * dwarf_macro_param2.c: New file.
2375 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2376 * libdwP.h: Remove Dwarf_Macro definition.
2377 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2378 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2379 * libdw.map: Add entries for new functions.
2381 2005-03-21 Ulrich Drepper <drepper@redhat.com>
2383 * libdw.h: Handle broken gcc < 4.
2385 2005-02-15 Ulrich Drepper <drepper@redhat.com>
2387 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2389 * dwarf_begin_elf.c: Fix warnings.
2390 * dwarf_dieoffset.c: Likewise.
2391 * dwarf_end.c: Likewise.
2392 * dwarf_error.c: Likewise.
2393 * dwarf_getpubnames.c: Likewise.
2395 * libdwP.h: Add new error values.
2396 * dwarf_error.c: Support new error values.
2397 * dwarf_getpubnames.c: Check parameter value.
2399 2005-02-05 Ulrich Drepper <drepper@redhat.com>
2401 * Makefile.am: Check for text relocations in constructed DSO.
2403 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2405 2005-02-04 Ulrich Drepper <drepper@redhat.com>
2407 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2408 checks to not read over buffer boundaries for ill-formed DWARF data.
2410 2004-09-25 Ulrich Drepper <drepper@redhat.com>
2412 * dwarf_child.c: Make compile with gcc 4.0.
2413 * dwarf_error.c: Likewise.
2414 * dwarf_formblock.c: Likewise.
2415 * dwarf_getabbrev.c: Likewise.
2416 * dwarf_getattrs.c: Likewise.
2417 * dwarf_getsrclines.c: Likewise.
2418 * dwarf_tag.c: Likewise.
2419 * libdw_form.c: Likewise.
2421 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2423 * Makefile.am: Support building with mudflap.
2425 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2426 * dwarf_getsrclines.c: Likewise.
2427 * dwarf_memory-access.h: Likewise.
2429 2004-01-19 Ulrich Drepper <drepper@redhat.com>
2431 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2433 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2434 Third parameter of dwarf_getsrcfiles can be NULL.
2436 * libdw.map: Add dwarf_getmacros.
2437 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2438 * dwarf_getmacros.c: New file.
2440 2004-01-18 Ulrich Drepper <drepper@redhat.com>
2442 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2444 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2446 * dwarf_getsrclines.c:
2447 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2449 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2451 * libdwP.h (_): Use elfutils domain.
2453 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2455 * dwarf_getsrclines.c: Fix typo in comment.
2457 2004-01-17 Ulrich Drepper <drepper@redhat.com>
2459 * Makefile.am: Support building with mudflap.
2461 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2463 * memory-access.h: Add lots of const in case a pointer passed is const.
2465 * dwarf_formflag.c: New file.
2466 * dwarf_getattrs.c: New file.
2467 * dwarf_error.c: Add new error value.
2468 * libdw.h: Add prototypes for new functions. Adjust prototype for
2470 * libdw.map: Add new functions.
2471 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2473 * libdwP.h: Add new error value.
2474 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2477 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2479 2004-01-12 Ulrich Drepper <drepper@redhat.com>
2481 * dwarf_getarange_addr.c: New file
2482 * dwarf_getarangeinfo.c: New file.
2483 * dwarf_getaranges.c: New file.
2484 * dwarf_onerange.c: New file.
2485 * libdw.h: Declare new functions. Define Dwarf_Arange and
2487 * libdw.map: Add new functions.
2488 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2489 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2490 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2491 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2492 * dwarf_error.c: Add new message.
2494 2004-01-11 Ulrich Drepper <drepper@redhat.com>
2496 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2497 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2498 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2499 * dwarf_error.c: Add another message.
2500 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2502 * dwarf_filesrc.c: Likewise.
2503 * dwarf_getsrcfiles.c: Likewise.
2504 * dwarf_getsrclines.c: Likewise.
2505 * dwarf_lineaddr.c: New file.
2506 * dwarf_linebeginstatement.c: New file.
2507 * dwarf_lineblock.c: New file.
2508 * dwarf_linecol.c: New file.
2509 * dwarf_lineendsequence.c: New file.
2510 * dwarf_lineepiloguebegin.c: New file.
2511 * dwarf_lineno.c: New file.
2512 * dwarf_lineprologueend.c: New file.
2513 * dwarf_onesrcline.c: New file.
2514 * dwarf_lineno.c: Change interface to store result in object pointed
2515 to by second parameter.
2516 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2517 prototype. Define Dwarf_Files and Dwarf_Lines.
2518 * libdw.map: Add new functions.
2519 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2520 * libdw_findcu.c: Don't initialize nlines field.
2522 * dwarf_siblingof: Little optimization.
2524 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2525 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2526 * libdwP.h (struct Dwarf): Add free_elf field.
2528 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2530 * dwarf_getstring.c: New file.
2531 * dwarf_offabbrev.c: New file.
2532 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2533 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2534 parameters. Don't allocate memory if not necessary and don't lookup
2535 previous results if no CU given.
2536 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2537 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2538 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2539 * libdwP.h: Change prototype for __libdw_getabbrev.
2541 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2542 returning if this is wanted.
2544 2004-01-09 Ulrich Drepper <drepper@redhat.com>
2546 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2547 with offset_size value.
2548 * libdw.h: Adjust dwarf_nextcu prototype.
2549 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2550 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2551 member of new CU struct.
2552 * dwarf_formstring.c: Depend on offset_size not address_size for
2553 DW_FORM_strp handling.
2554 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2556 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2558 (dwarf_tag): Correctly recognize failed lookup.
2560 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2562 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2563 * dwarf_formblock.c: New file.
2564 * dwarf_getloclist.c: Rewrite to handle a single block.
2565 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2566 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2567 dwarf_getloclistent declaration.
2568 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2569 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2570 Add locs member to struct Dwarf_CU.
2571 * libdw_fundcu.c: Initialize locs member of new CU.
2572 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2573 Remove dwarf_getloclistent.c.
2575 2004-01-07 Ulrich Drepper <drepper@redhat.com>
2577 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2578 * libdwP.h: Likewise.
2580 * dwarf_getloclist.c: New file.
2581 * dwarf_getloclistent.c: New file.
2582 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2583 Declare dwarf_getloclistent and dwarf_getloclist.
2584 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2585 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2586 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2589 * dwarf_error.c: More error messages.
2591 2004-01-06 Ulrich Drepper <drepper@redhat.com>
2593 * dwarf_getsrclines.c: Remove debugging support.
2595 * dwarf_getsrcfiles.c: New file.
2596 * dwarf_filesrc.c: New file.
2597 * libdw.h: Declare these functions. Define Dwarf_File.
2598 * libdwP.c: Adjust Dwarf_File_s definition.
2599 * libdw.map: Add these functions.
2600 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2602 * dwarf_getsrclines.c: Initialize cu->files.
2604 2004-01-05 Ulrich Drepper <drepper@redhat.com>
2606 * libdw.h: Add more nonnull function attributes.
2608 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2609 * dwarf_end.c (cu_free): New function.
2610 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2611 * dwarf_error.c (errmsgs): Add new messages.
2612 * dwarf_getsrc_die.c: New file.
2613 * dwarf_getsrclines.c: New file.
2614 * dwarf_lineno.c: New file.
2615 * dwarf_linesrc.c: New file.
2616 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2617 instead of the *_inc-less variants.
2618 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2619 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2620 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2622 * libdwP.h: Add more error codes.
2623 (struct Dwarf): Remove mem_tail.next member.
2624 (Dwarf_File): Define type.
2625 (struct Dwarf_Line_s): Define type.
2626 (struct Dwarf_CU): Add lines and nlines members.
2627 (libdw_alloc): Define local variable _tail and use it.
2628 Add some function attributes.
2629 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2630 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2631 * memory-access.h: Add unlikely for the endian conversion paths.
2632 * Makefile.am (AM_CFLAGS): Add -std parameter.
2633 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2634 dwarf_lineno, and dwarf_linesrc.
2636 2003-08-11 Ulrich Drepper <drepper@redhat.com>
2638 * Moved to CVS archive.