blob: 7a6d3110e6aa8f8aaed0bbc68ca078bc6c8b1b8e [file] [log] [blame]
Brian Silverman86497922018-02-10 19:28:39 -050012018-02-09 Joshua Watt <JPEWhacker@gmail.com>
2
3 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
4 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
5
62018-01-22 Mark Wielaard <mark@klomp.org>
7
8 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
9 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
10 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
11 and alt_fd if we allocated them.
12 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
13 * dwarf_formstring.c (dwarf_formstring): Likewise.
14 * dwarf_getalt.c (__libdw_filepath): New internal function.
15 (find_debug_altlink): New static function.
16 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
17 Cache result.
18 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
19 if we allocated.
20 * libdw.h (dwarf_getalt): Extend documentation.
21 (dwarf_setalt): Likewise.
22 * libdwP.h (struct Dwarf): Add alt_fd field.
23 (filepath): Declare new internal function.
24
252018-01-14 Petr Machata <pmachata@gmail.com>
26
27 * dwarf_formsdata.c (dwarf_formsdata):
28 <DW_FORM_data1>: Cast to signed char.
29 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
30 read_*ubyte_unaligned.
31
322017-12-26 Mark Wielaard <mark@klomp.org>
33
34 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
35 use bitfields for has_children and code.
36 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
37 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
38
392017-12-26 Mark Wielaard <mark@klomp.org>
40
41 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
42 (get_uleb128_unchecked): New define.
43 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
44 read attr name and form.
45 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
46 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
47 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
48
492017-12-28 Mark Wielaard <mark@klomp.org>
50
51 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
52
532017-05-09 Ulf Hermann <ulf.hermann@qt.io>
54 Mark Wielaard <mark@klomp.org>
55
56 * libdwP.h (__libdw_in_section): Fix check for the upper border of
57 the range.
58 (__libdw_offset_in_section): Likewise.
59
602017-12-20 Mark Wielaard <mark@klomp.org>
61
62 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
63 (cu_sec_idx): Return cu->sec_idx.
64 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
65 IDX_debug_info or IDX_debug_types.
66 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
67 IDX_debug_loc.
68 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
69 IDX_debug_macro or IDX_debug_macinfo.
70
712017-12-12 Mark Wielaard <mark@klomp.org>
72
73 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
74 given DIE. Reserve memory for a new DIE first.
75
762017-12-11 Dima Kogan <dima@secretsauce.net>
77
78 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
79 arrays properly.
80
812017-11-03 Mark Wielaard <mark@klomp.org>
82
83 * dwarf_getlocation.c (__libdw_intern_expression): Handle
84 DW_OP_GNU_variable_value.
85 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
86 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
87
882017-11-03 Mark Wielaard <mark@klomp.org>
89
90 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
91 Update list of acceptable attribute codes based on DWARF5.
92
932017-11-03 Mark Wielaard <mark@klomp.org>
94
95 * dwarf.h: Add DW_OP_GNU_variable_value.
96
972017-10-03 Mark Wielaard <mark@klomp.org>
98
99 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
100
1012017-08-18 Ulf Hermann <ulf.hermann@qt.io>
102
103 * memory-access.h: Use attribute_packed.
104
1052017-02-27 Ulf Hermann <ulf.hermann@qt.io>
106
107 * libdwP.h: Use attribute_hidden.
108 * libdw_alloc.c: Likewise.
109
1102017-02-27 Ulf Hermann <ulf.hermann@qt.io>
111
112 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
113
1142017-07-26 Mark Wielaard <mark@klomp.org>
115
116 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
117 * dwarf_getmacros.c (get_table_for_offset): Accept either version
118 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
119 (read_macros): Use table version for fake_cu.
120
1212017-07-26 Mark Wielaard <mark@klomp.org>
122
123 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
124 DW_TAG_packed_type and DW_TAG_shared_type.
125 * libdw.h (dwarf_peel_type): Extend documentation.
126
1272017-07-26 Mark Wielaard <mark@klomp.org>
128
129 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
130 DW_DEFAULTED_out_of_class.
131
1322017-07-26 Mark Wielaard <mark@klomp.org>
133
134 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
135
1362017-07-26 Mark Wielaard <mark@klomp.org>
137
138 * dwarf_default_lower_bound.c: New file.
139 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
140 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
141 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
142 * libdw.h: Add dwarf_default_lower_bound.
143 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
144 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
145 dwarf_default_lower_bound INTDECL.
146
1472017-07-26 Mark Wielaard <mark@klomp.org>
148
149 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
150 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
151 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
152 * dwarf_aggregate_size.c (array_size): Add lower bound for
153 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
154 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
155 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
156 DW_LANG_Julia and DW_LANG_BLISS.
157
1582017-07-26 Mark Wielaard <mark@klomp.org>
159
160 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
161
1622017-07-25 Mark Wielaard <mark@klomp.org>
163
164 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
165 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
166 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
167 for currently unused numbers.
168
1692017-07-25 Mark Wielaard <mark@klomp.org>
170
171 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
172 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
173 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
174
1752017-07-21 Mark Wielaard <mark@klomp.org>
176
177 * dwarf_line_file.c: New file.
178 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
179 * libdw.h (dwarf_line_file): New function declaration.
180 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
181
1822017-02-17 Ulf Hermann <ulf.hermann@qt.io>
183
184 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
185 made of, libdw_so_DEPS for libraries it depends on (including
186 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
187 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
188 library dependencies, use libdw_so_LIBS rather than relying on the
189 order of dependencies specified, add -z,relro.
190
1912017-04-20 Ulf Hermann <ulf.hermann@qt.io>
192
193 * libdw.h: Remove attribute macro declarations and use
194 __noreturn_attribute__ as defined in libelf.h.
195
1962017-04-20 Ulf Hermann <ulf.hermann@qt.io>
197
198 * dwarf_begin_elf.c: Include endian.h.
199
2002017-03-30 Mark Wielaard <mjw@redhat.com>
201
202 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
203 result.
204
2052016-10-22 Mark Wielaard <mjw@redhat.com>
206
207 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
208 * dwarf_aggregate_size.c (array_size): Use correct spelling of
209 DW_LANG_PLI.
210
2112016-11-02 Mark Wielaard <mjw@redhat.com>
212
213 * cfi.c (execute_cfi): Add fallthrough comments.
214 * encoded-value.h (encoded_value_size): Add explicit return instead
215 of relying on fallthrough.
216 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
217 comment.
218
2192016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
220
221 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
222 * libdw_alloc.c: Likewise.
223
2242016-07-08 Mark Wielaard <mjw@redhat.com>
225
226 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
227 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
228 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
229
2302016-02-13 Mark Wielaard <mjw@redhat.com>
231
232 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
233 assign to ndirlist.
234
2352015-12-18 Mark Wielaard <mjw@redhat.com>
236
237 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
238 (__libdw_free_zdata): Remove.
239 * dwarf_begin_elf.c (inflate_section): Remove.
240 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
241 and elf_compress_gnu to decompress if necessary.
242 (valid_p): Remove __libdw_free_zdata calls.
243 (scngrp_read): Use elf_compress if section is compressed. Remove
244 __libdw_free_zdata calls.
245 * dwarf_end.c (__libdw_free_zdata): Remove.
246 (dwarf_end): Don't call __libdw_free_zdata.
247
2482015-10-28 Mark Wielaard <mjw@redhat.com>
249
250 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
251
2522015-12-02 Mark Wielaard <mjw@redhat.com>
253
254 * fde.c (intern_fde): Don't leak duplicate FDEs.
255
2562015-12-01 Mark Wielaard <mjw@redhat.com>
257
258 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
259 valid code range.
260
2612015-12-01 Mark Wielaard <mjw@redhat.com>
262
263 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
264
2652015-10-14 Chih-Hung Hsieh <chh@google.com>
266
267 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
268 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
269
2702015-10-14 Chih-Hung Hsieh <chh@google.com>
271
272 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
273 function 'walk_children' to file scope; inline 'recurse' at its call
274 site.
275
2762015-10-19 Mark Wielaard <mjw@redhat.com>
277
278 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
279 if necessary.
280
2812015-10-16 Dmitry V. Levin <ldv@altlinux.org>
282
283 * dwarf_getsrclines.c (read_srclines): Initialize state early.
284
2852015-10-13 Chih-Hung Hsieh <chh@google.com>
286
287 * dwarf_getsrclines.c (read_srclines): Move nested functions
288 'advance_pc' and 'add_new_line' to file scope and keep many
289 local state variables within one structure.
290
2912015-10-13 Chih-Hung Hsieh <chh@google.com>
292
293 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
294 function 'file_matches' to file scope.
295
2962015-10-16 Mark Wielaard <mjw@redhat.com>
297
298 * Makefile.am (libdw.so): Add -lz.
299
3002015-10-14 Chih-Hung Hsieh <chh@google.com>
301
302 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
303 and 'require_cfa_offset' to file scope.
304
3052015-10-09 Josh Stone <jistone@redhat.com>
306
307 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
308 and fstat.
309
3102015-10-05 Josh Stone <jistone@redhat.com>
311
312 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
313
3142015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
315
316 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
317 relocation overflows in some platforms.
318
3192015-09-23 Mark Wielaard <mjw@redhat.com>
320
321 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
322 * dwarf_formref.c (__libdw_formref): Likewise.
323 * libdw_findcu.c (__libdw_findcu): Likewise.
324 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
325
3262015-09-22 Mark Wielaard <mjw@redhat.com>
327
328 * *.c: Remove old-style function definitions.
329
3302015-09-15 Mark Wielaard <mjw@redhat.com>
331
332 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
333
3342015-09-09 Chih-Hung Hsieh <chh@google.com>
335
336 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
337 redundant NULL tests on parameters declared with __nonnull_attribute__.
338 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
339 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
340
3412015-09-04 Chih-Hung Hsieh <chh@google.com>
342 Mark Wielaard <mjw@redhat.com>
343
344 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
345 definition with ansi-C definition and add const qualifier to
346 locs argument.
347
3482015-09-04 Chih-Hung Hsieh <chh@google.com>
349
350 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
351 definition with ansi-C definitions.
352 (__libdw_findcu): Likewise.
353
3542015-08-25 Mark Wielaard <mjw@redhat.com>
355
356 * dwarf.h: Add DW_LANG_Haskell.
357
3582015-06-18 Mark Wielaard <mjw@redhat.com>
359
360 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
361 to hold a Dwarf.
362
3632015-06-18 Mark Wielaard <mjw@redhat.com>
364
365 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
366
3672015-06-18 Mark Wielaard <mjw@redhat.com>
368
369 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
370 dwarf_formudata reports an error.
371 (get_table_for_offset): Likewise.
372
3732015-06-08 Mark Wielaard <mjw@redhat.com>
374
375 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
376
3772015-06-06 Mark Wielaard <mjw@redhat.com>
378
379 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
380
3812015-05-27 Mark Wielaard <mjw@redhat.com>
382
383 * encoded-value.h (read_encoded_value): Check data d_size contains
384 at least enough data to hold a pointer for DW_EH_PE_indirect.
385
3862015-05-22 Mark Wielaard <mjw@redhat.com>
387
388 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
389 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
390 MAX_STACK_DIRS. Calculate number of dirs needed first, then
391 create dirarray directly, without needing the next field. Free
392 not stack allocated lines and files at the end.
393
3942015-05-19 Mark Wielaard <mjw@redhat.com>
395
396 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
397 allocated array to hold locs. Allocate locs bigger than the array
398 with malloc and free them when done.
399
4002015-05-11 Jonathan Lebon <jlebon@redhat.com>
401
402 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
403 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
404 * dwarf_begin_elf.c (inflate_section): New static function, lifted
405 from...
406 (check_section): ... here. Call inflate_section, set libdw errno to
407 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
408
4092015-05-11 Jonathan Lebon <jlebon@redhat.com>
410
411 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
412 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
413
4142015-05-06 Mark Wielaard <mjw@redhat.com>
415
416 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
417 check the line number.
418
4192015-05-05 Mark Wielaard <mjw@redhat.com>
420
421 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
422 left before reading values.
423
4242015-05-04 Anthony G. Basile <blueness@gentoo.org>
425
426 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
427 command.
428
4292015-04-22 Mark Wielaard <mjw@redhat.com>
430
431 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
432 (__libdw_max_len_uleb128): New function.
433 (__libdw_max_len_sleb128): Likewise.
434 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
435 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
436
4372015-04-21 Mark Wielaard <mjw@redhat.com>
438
439 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
440 when there are more than 8.
441
4422015-04-01 Petr Machata <pmachata@redhat.com>
443
444 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
445 (is_cudie): New function.
446 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
447 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
448 of white-listing valid tags.
449 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
450
4512015-03-18 Petr Machata <pmachata@redhat.com>
452
453 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
454 (EXTRA_DIST): Remove known-dwarf.h.
455
4562015-02-09 Mark Wielaard <mjw@redhat.com>
457
458 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
459 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
460 for new Fortran language codes is 1.
461
4622015-02-09 Mark Wielaard <mjw@redhat.com>
463
464 * dwarf.h: Add DW_TAG_atomic_type.
465 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
466 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
467
4682015-02-11 Josh Stone <jistone@redhat.com>
469
470 * encoded-value.h (read_encoded_value): Initialize value.
471
4722015-02-11 Petr Machata <pmachata@redhat.com>
473
474 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
475 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
476 the fact in *BASEP and bail out later if it hasn't been updated by
477 __libdw_read_begin_end_pair_inc.
478
4792014-12-24 Mark Wielaard <mjw@redhat.com>
480
481 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
482 smaller than or equal to addr, rather than returning immediately on
483 a match.
484
4852015-01-07 Mark Wielaard <mjw@redhat.com>
486
487 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
488 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
489 room in the search table for all entries. Store search_table_len.
490 (getcfi_scn_eh_frame): Likewise.
491 * encoded-value.h (encoded_value_size): Don't abort, return zero.
492 (__libdw_cfi_read_address_inc): Check there is enough room to read
493 values. Pass other byte order to read functions.
494 (read_encoded_value): Check encoded_value_size. Don't abort, but
495 set libdw errno and report failure. Check there is enough room to
496 read values.
497 * fde.c (binary_search_fde): Check encoded value size. Add hdr
498 data buf and size to dummy_cfi.
499
5002015-01-04 Mark Wielaard <mjw@redhat.com>
501
502 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
503 is after current DIE.
504
5052015-01-04 Mark Wielaard <mjw@redhat.com>
506
507 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
508 (dwarf_frame_register).
509
5102015-01-02 Mark Wielaard <mjw@redhat.com>
511
512 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
513 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
514 (getcfi_scn_eh_frame): Check d_buf is not NULL.
515
5162015-01-02 Mark Wielaard <mjw@redhat.com>
517
518 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
519 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
520 DW_OP_addr if dbg is NULL then read argument directly.
521
5222015-01-14 Jason P. Leasure <jpleasu@super.org>
523
524 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
525 plus cu->start.
526
5272014-12-27 Mark Wielaard <mjw@redhat.com>
528
529 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
530 still falls inside CU data.
531
5322015-01-11 Mark Wielaard <mjw@redhat.com>
533
534 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
535 __libdw_visit_scopes with NULL imports.
536 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
537 * dwarf_getscopes.c (pc_record): Likewise.
538 (dwarf_getscopes): Likewise.
539 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
540 * libdwP.h (__libdw_visit_scopes): Add imports argument.
541 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
542 function imports_contains. Push and pop imports around walk_children
543 when processing DW_TAG_imported_unit.
544
5452014-12-18 Ulrich Drepper <drepper@gmail.com>
546
547 * Makefile.am: Suppress output of textrel_check command.
548
5492014-12-16 Mark Wielaard <mjw@redhat.com>
550
551 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
552 DW_LNE_define_file.
553
5542014-12-16 Mark Wielaard <mjw@redhat.com>
555
556 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
557 space to read die offset.
558
5592014-12-16 Mark Wielaard <mjw@redhat.com>
560
561 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
562 unit_length.
563
5642014-12-15 Mark Wielaard <mjw@redhat.com>
565
566 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
567 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
568 (dwarf_getpubnames): Make sure section data contains string zero
569 terminator.
570
5712014-12-16 Mark Wielaard <mjw@redhat.com>
572
573 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
574 the compiler optimize for the common single-byte case.
575
5762014-12-15 Josh Stone <jistone@redhat.com>
577
578 * memory-access.h (__libdw_max_len_leb128): New.
579 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
580 (__libdw_get_sleb128): Likewise.
581
5822014-12-14 Mark Wielaard <mjw@redhat.com>
583
584 * cfi.c (execute_cfi): Add program bounds checks.
585 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
586 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
587 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
588 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
589 * dwarf_formudata.c (dwarf_formudata): Likewise.
590 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
591 with end of data buf.
592 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
593 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
594 call gets enough data.
595 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
596 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
597 with enough data.
598 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
599 end_data.
600 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
601 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
602 get_uleb128 with lineendp.
603 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
604 get_uleb128 with endp.
605 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
606 get_uleb128/get_sleb128 with limit.
607 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
608 get_sleb128 get called with enough data.
609 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
610 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
611 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
612 endp.
613 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
614 Don't call get_uleb128_step if out of data.
615 (__libdw_get_sleb128): Likewise for get_sleb128_step.
616
6172014-12-12 Mark Wielaard <mjw@redhat.com>
618
619 * libdwP.h (struct Dwarf): Add fake_loc_cu.
620 (cu_data): Removed.
621 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
622 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
623 (__libdw_form_val_len): Likewise.
624 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
625 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
626 the already found data buffer directly.
627 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
628 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
629 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
630 just cu.
631 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
632 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
633 * dwarf_getlocation_attr.c (attr_form_cu): New function.
634 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
635 (getlocation): Handle empty blocks immediately.
636 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
637 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
638 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
639 one argument.
640 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
641 fake_cu. Call __libdw_form_val_len with just fake_cu.
642 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
643 datap and size directly from cu startp and endp.
644
6452014-12-11 Mark Wielaard <mjw@redhat.com>
646
647 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
648
6492014-12-13 Mark Wielaard <mjw@redhat.com>
650
651 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
652 difference doesn't wrap around before returning as int.
653
6542014-12-11 Josh Stone <jistone@redhat.com>
655
656 * dwarf_getsrclines.c (struct linelist): Add sequence.
657 (compare_lines): Take linelists, and break ties by sequence.
658 (read_srclines): Use linelists for sorting.
659 (read_srclines::add_new_line): Set sequence.
660
6612014-12-10 Josh Stone <jistone@redhat.com>
662
663 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
664 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
665 * dwarf_child.c (dwarf_child): Use cu->endp.
666 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
667 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
668 * dwarf_siblingof.c (dwarf_siblingof): Use both.
669
6702014-12-10 Josh Stone <jistone@redhat.com>
671
672 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
673
6742014-12-10 Josh Stone <jistone@redhat.com>
675
676 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
677 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
678 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
679 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
680 * dwarf_tag.c (dwarf_tag): Likewise.
681
6822014-12-04 Mark Wielaard <mjw@redhat.com>
683
684 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
685 (__libdw_form_val_len): Likewise and check len doesn't overflow.
686 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
687 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
688 with endp.
689 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
690 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
691
6922014-12-02 Petr Machata <pmachata@redhat.com>
693
694 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
695 helper functions.
696 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
697 * libdw.h (DWARF_GETMACROS_START): New macro.
698
6992014-11-27 Mark Wielaard <mjw@redhat.com>
700
701 * Makefile.am (libdw.so): Use textrel_check.
702
7032014-11-27 Mark Wielaard <mjw@redhat.com>
704
705 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
706 search_table_entries and search_table_encoding.
707
7082014-11-24 Mark Wielaard <mjw@redhat.com>
709
710 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
711 before usage.
712
7132014-11-23 Mark Wielaard <mjw@redhat.com>
714
715 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
716 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
717 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
718
7192014-11-23 Mark Wielaard <mjw@redhat.com>
720
721 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
722 Set libdw errno and return NULL.
723
7242014-11-24 Mark Wielaard <mjw@redhat.com>
725
726 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
727 (DW_LANG_C11): Likewise.
728 (DW_LANG_C_plus_plus_14): Likewise.
729 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
730 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
731 lower bound.
732 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
733 DW_LANG_C11.
734
7352014-11-26 Mark Wielaard <mjw@redhat.com>
736
737 * dwarf.h (DW_AT_noreturn): Added.
738
7392014-11-11 Mark Wielaard <mjw@redhat.com>
740
741 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
742 explicitly as uint8_t.
743 (__libdw_getsrclines): Add internal_function to declaration.
744
7452014-09-10 Petr Machata <pmachata@redhat.com>
746
747 * dwarf_macro_getparamcnt.c: New file.
748 * dwarf_macro_param.c: New file.
749 * dwarf_macro_getsrcfiles.c: New file.
750 * Makefile.am (libdw_a_SOURCES): Add the new files.
751 * libdwP.h (struct files_lines_s): New structure.
752 (DWARF_E_INVALID_OPCODE): New enumerator.
753 (struct Dwarf): New fields macro_ops, files_lines.
754 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
755 keeping macro opcode prototypes in.
756 (Dwarf_Macro_s): Redefine from scratch.
757 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
758 internal interfaces.
759 * dwarf_error.c (errmsgs): Add a message for
760 DWARF_E_INVALID_OPCODE.
761 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
762 files_lines.
763 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
764 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
765 interfaces.
766 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
767 (get_offset_from, macro_op_compare, build_table)
768 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
769 (cache_op_table, read_macros, gnu_macros_getmacros_off)
770 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
771 functions.
772 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
773 * dwarf_getsrclines.c (read_srclines): New function with guts
774 taken from dwarf_getsrclines.
775 (__libdw_getsrclines): Likewise.
776 (__libdw_getcompdir, files_lines_compare): New functions.
777 (dwarf_getsrclines): Make it dispatch to the new interfaces.
778 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
779 the new interfaces.
780 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
781 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
782 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
783
7842014-10-06 Mark Wielaard <mjw@redhat.com>
785
786 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
787 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
788 (aggregate_size): Likewise. Add old and new version.
789 * dwarf_peel_type.c: New file.
790 * libdw.h (dwarf_peel_type): New function declaration.
791 * libdwP.h (dwarf_peel_type): New internal declaration.
792 * libdw.map (ELFUTILS_0.161): New section.
793
7942014-10-15 Petr Machata <pmachata@redhat.com>
795
796 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
797 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
798
7992014-10-05 Mark Wielaard <mjw@redhat.com>
800
801 * dwarf.h: Add DW_AT_GNU_deleted.
802
8032014-10-02 Mark Wielaard <mjw@redhat.com>
804
805 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
806 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
807 DW_TAG_rvalue_reference_type.
808
8092014-09-12 Petr Machata <pmachata@redhat.com>
810
811 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
812 8-byte quantities. Consequently, rename to...
813 (read_addr_unaligned_inc): ... this.
814 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
815 (read_sbyte_unaligned): Drop.
816
8172014-09-10 Petr Machata <pmachata@redhat.com>
818
819 * dwarf_getlocation.c (attr_ok): Also accept
820 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
821 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
822
8232014-08-15 Mark Wielaard <mjw@redhat.com>
824
825 * dwarf_cu_die.c: New file.
826 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
827 * libdw.h (dwarf_cu_die): New function declaration.
828 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
829
8302014-08-15 Mark Wielaard <mjw@redhat.com>
831
832 * dwarf_cu_getdwarf.c: New file.
833 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
834 * libdw.h (Dwarf_CU): New typedef.
835 (dwarf_cu_getdwarf): New function declaration.
836 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
837
8382014-06-18 Mark Wielaard <mjw@redhat.com>
839
840 * dwarf.h: Remove DW_TAG_mutable_type.
841
8422014-05-02 Mark Wielaard <mjw@redhat.com>
843
844 * libdwP.h (__check_build_id): Removed now unused.
845
8462014-05-01 Mark Wielaard <mjw@redhat.com>
847
848 * libdwP.h (struct Dwarf): Remove free_alt.
849 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
850 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
851
8522014-04-30 Mark Wielaard <mjw@redhat.com>
853
854 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
855
8562014-04-15 Florian Weimer <fweimer@redhat.com>
857
858 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
859 (open_debugaltlink): Move to libdwfl.
860 (check_section): Do not locate alternate debuginfo.
861
8622014-04-24 Florian Weimer <fweimer@redhat.com>
863
864 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
865
8662014-04-22 Florian Weimer <fweimer@redhat.com>
867
868 * dwarf_getalt.c, dwarf_setalt.c: New files.
869 * Makefile.am (libdw_a_SOURCES): Add them.
870 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
871 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
872 declarations.
873 * libdw.map (ELFUTILS_0.159): Export the two new functions.
874
8752014-04-15 Florian Weimer <fweimer@redhat.com>
876
877 * libdwP.h (enum IDX_gnu_debugaltlink): New.
878 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
879 .gnu_debugaltlink.
880 (check_section): Obtain .gnu_debugaltlink section from the
881 setiondata array.
882
8832014-04-11 Mark Wielaard <mjw@redhat.com>
884
885 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
886 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
887 (libdwelf_objects): New variable.
888 (libdw_a_LIBADD): Add libdwelf objects.
889
8902014-04-22 Mark Wielaard <mjw@redhat.com>
891
892 * memory-access.h (get_sleb128_step): Remove undefined behavior
893 of left shifting a signed value. Replace it with a multiplication.
894
8952014-04-13 Mark Wielaard <mjw@redhat.com>
896
897 * Makefile.am: Remove !MUDFLAP conditions.
898
8992014-04-09 Mark Wielaard <mjw@redhat.com>
900
901 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
902 before calling malloc to uncompress data.
903
9042014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
905
906 Fix abort() on missing section headers.
907 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
908 New label err to return NULL.
909
9102014-02-05 Josh Stone <jistone@redhat.com>
911
912 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
913 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
914 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
915
9162013-12-30 Mark Wielaard <mjw@redhat.com>
917
918 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
919 dwfl_linux_proc_attach.
920
9212013-12-20 Mark Wielaard <mjw@redhat.com>
922
923 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
924
9252013-12-18 Mark Wielaard <mjw@redhat.com>
926
927 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
928 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
929 dwfl_module_getsym_info.
930
9312013-12-16 Mark Wielaard <mjw@redhat.com>
932
933 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
934
9352013-12-10 Josh Stone <jistone@redhat.com>
936
937 * memory-access.h (get_uleb128_rest_return): Removed.
938 (get_sleb128_rest_return): Removed.
939 (get_uleb128_step): Make this a self-contained block.
940 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
941 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
942 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
943 (__libdw_get_uleb128): Simplify and inline for all callers.
944 (__libdw_get_sleb128): Ditto.
945 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
946 * memory-access.c: Delete file.
947 * Makefile.am (libdw_a_SOURCES): Remove it.
948 (DEFS): Remove the now unused -DIS_LIBDW.
949
9502013-12-09 Josh Stone <jistone@redhat.com>
951
952 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
953 __libdw_form_val_len, now handling only non-constant form lengths.
954 * libdwP.h (__libdw_form_val_len): New inlined function.
955
9562013-12-09 Mark Wielaard <mjw@redhat.com>
957
958 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
959 location expressions.
960 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
961 location found, return empty location expression.
962 * dwarf_getlocation_implicit_pointer.c
963 (dwarf_getlocation_implicit_pointer): Likewise.
964 (__libdw_empty_loc_attr): New internal function.
965 * libdwP.h (__libdw_empty_loc_attr): Define.
966
9672013-11-27 Mark Wielaard <mjw@redhat.com>
968
969 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
970 dwfl_module_getsym_elf.
971
9722013-11-26 Mark Wielaard <mjw@redhat.com>
973
974 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
975 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
976 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
977 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
978 (ELFUTILS_0.158): ... here.
979
9802013-11-09 Mark Wielaard <mjw@redhat.com>
981
982 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
983 check that it is zero.
984
9852013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
986
987 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
988 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
989 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
990 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
991 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
992
9932013-11-01 Michael Forney <mforney@mforney.org>
994
995 * Makefile.am (libdwfl_objects): New definition.
996 (libdw_a_LIBADD): Use libdwfl_objects.
997
9982013-11-01 Michael Forney <mforney@mforney.org>
999
1000 * Makefile.am: Use READELF.
1001
10022013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1003
1004 * libdw.map (ELFUTILS_0.158): New.
1005
10062013-10-10 Mark Wielaard <mjw@redhat.com>
1007
1008 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1009 start_addr and rename last_offset to last_addr. Now both void *.
1010 (tree_visitor): Use start_add and die_addr instead of start_offset
1011 and die_offset.
1012 (dwarf_getfuncs): Use last_addr instead of last_offset.
1013
10142013-10-06 Mark Wielaard <mjw@redhat.com>
1015
1016 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1017 DW_CFA_val_expression are not used with abi_cfi.
1018
10192013-10-03 Josh Stone <jistone@redhat.com>
1020
1021 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1022 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1023 a unit, make sure to always hash the sig8 here, so none are missed.
1024
10252013-09-29 Mark Wielaard <mjw@redhat.com>
1026
1027 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1028 uintptr_t before casting to char *.
1029 (__libdw_intern_expression): Cast data to uintptr_t before casting
1030 to Dwarf_Word.
1031 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1032 op->number2 to uintptr_t before casting to char *.
1033
10342013-09-24 Josh Stone <jistone@redhat.com>
1035
1036 * libdw_visit_scopes.c (classify_die): Removed.
1037 (may_have_scopes): New function to replace classify_die. There's no
1038 need for full classification; just find tags that may contain scopes.
1039 (__libdw_visit_scopes): Use a direct tag comparison for imported
1040 units, and use may_have_scopes to test if recursion is needed.
1041
10422013-09-20 Mark Wielaard <mjw@redhat.com>
1043
1044 * dwarf_getfuncs.c (visitor_info): New struct.
1045 (tree_visitor): New function.
1046 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1047 * libdw.h (dwarf_getfuncs): Expand function documentation.
1048
10492013-09-12 Mark Wielaard <mjw@redhat.com>
1050
1051 * fde.c (intern_fde): Free fde and set libdw errno when start
1052 or end could not be read.
1053
10542013-08-24 Mark Wielaard <mjw@redhat.com>
1055
1056 * dwarf_getlocation.c (store_implicit_value): Don't take data
1057 as argument, get block data from op number2. Return false when
1058 block data length and op number don't match up.
1059 (__libdw_intern_expression): Store start of block for
1060 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1061 relative data offset. Also store block start (including length)
1062 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1063 * dwarf_getlocation_attr.c: New file.
1064 * dwarf_getlocation_die.c: Likewise.
1065 * libdw.h (dwarf_getlocation_die): New function definition.
1066 (dwarf_getlocation_attr): Likewise.
1067 * libdwP.h: Declare internal dwarf_getlocation_die.
1068 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1069 dwarf_getlocation_attr.
1070 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1071 dwarf_getlocation_attr.c.
1072
10732013-08-23 Mark Wielaard <mjw@redhat.com>
1074
1075 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1076 (attr_base_address): New function.
1077 (initial_offset_base): New function.
1078 (getlocations_addr): New function. Taken from...
1079 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1080 getlocations_addr.
1081 (dwarf_getlocations): New function.
1082 * libdw.h (dwarf_getlocations): New function definition.
1083 * libdw.map (ELFUTILS_0.157): New.
1084
10852013-07-02 Mark Wielaard <mjw@redhat.com>
1086
1087 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1088 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1089 NEW_LINE macro. Free malloced line records if any at the end.
1090
10912013-07-02 Mark Wielaard <mjw@redhat.com>
1092
1093 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1094
10952013-06-26 Mark Wielaard <mjw@redhat.com>
1096
1097 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1098 DIEs without children. Return an error whenever dwarf_child or
1099 dwarf_siblingof return an error. Don't call recurse and increase
1100 the depth for an imported unit. Walk the children of an imported
1101 unit as if they are logical children of the parent root DIE.
1102
11032013-05-03 Mark Wielaard <mjw@redhat.com>
1104
1105 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1106 when nlinelist > 0.
1107
11082013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1109
1110 * libdw.map (ELFUTILS_0.156): New.
1111
11122013-04-24 Mark Wielaard <mjw@redhat.com>
1113
1114 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1115
11162013-04-10 Mark Wielaard <mjw@redhat.com>
1117
1118 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1119 equal to address size when we have a DW_FORM_ref_addr for DWARF
1120 version 2.
1121
11222013-03-25 Mark Wielaard <mjw@redhat.com>
1123
1124 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1125 end_sequence.
1126
11272013-03-12 Mark Wielaard <mjw@redhat.com>
1128
1129 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1130 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1131
11322013-02-15 Mark Wielaard <mjw@redhat.com>
1133
1134 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1135 not dbg->sectiondata.
1136
11372013-01-07 Roland McGrath <roland@hack.frob.com>
1138
1139 * memory-access.h
1140 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1141 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1142
11432012-12-18 Mark Wielaard <mjw@redhat.com>
1144
1145 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1146 (check_section): Likewise on error.
1147 (scngrp_read): Likewise.
1148 (dwarf_begin_elf): Likewise.
1149
11502012-10-09 Petr Machata <pmachata@redhat.com>
1151
1152 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1153 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1154 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1155 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1156
11572012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1158
1159 * cfi.c: New include system.h.
1160 (execute_cfi) (enough_registers): Clear new memory after realloc.
1161
11622012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1163
1164 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1165 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1166 searched PC.
1167
11682012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1169
1170 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1171 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1172 Remove the later DW_OP_call_frame_cfa push to RESULT.
1173
11742012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1175
1176 Code cleanup.
1177 * fde.c (binary_search_fde): Remove always true <address >= start>
1178 conditional. Move L initialization upwards.
1179
11802012-08-24 Mark Wielaard <mjw@redhat.com>
1181
1182 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1183 when ENABLE_DWZ is defined.
1184 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1185 defined.
1186
11872012-08-16 Mark Wielaard <mjw@redhat.com>
1188
1189 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1190 * dwarf.h (DW_LANG_Go): Update comment.
1191 (DW_LANG_Mips_Assembler): Likewise.
1192
11932012-06-27 Mark Wielaard <mjw@redhat.com>
1194
1195 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1196 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1197 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1198 (try_debugaltlink): New function.
1199 (open_debugaltlink): Likewise.
1200 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1201 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1202 necessary.
1203 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1204 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1205 is an error here.
1206 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1207 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1208 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1209 calls.
1210 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1211 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1212 (struct Dwarf): Add alt_dwarf and free_alt fields.
1213 (__libdw_read_offset): Add dbg_ret argument, use to check with
1214 __libdw_offset_in_section.
1215 (__check_build_id): New function declaration.
1216 (dwarf_begin): Define as INTDECL.
1217 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1218 and DW_FORM_GNU_strp_alt.
1219
12202012-07-19 Mark Wielaard <mjw@redhat.com>
1221
1222 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1223
12242012-07-24 Mark Wielaard <mjw@redhat.com>
1225
1226 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1227 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1228 DW_LANG_ObjC.
1229
12302012-07-24 Mark Wielaard <mjw@redhat.com>
1231
1232 * dwarf.h: Add DW_ATE_UTF.
1233
12342012-06-27 Mark Wielaard <mjw@redhat.com>
1235
1236 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1237
12382012-06-26 Mark Wielaard <mjw@redhat.com>
1239
1240 * libdwP.h: Add IDX_debug_macro.
1241 * dwarf.h: Add DW_AT_GNU_macros.
1242 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1243 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1244
12452012-04-27 Mark Wielaard <mjw@redhat.com>
1246
1247 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1248 a constant offset from DW_AT_low_pc.
1249
12502012-03-19 Tom Tromey <tromey@redhat.com>
1251
1252 * libdw_findcu.c (findcu_cb): Move earlier.
1253 (__libdw_intern_next_unit): Add new CU to search tree here...
1254 (__libdw_findcu): ... not here.
1255
12562012-01-31 Mark Wielaard <mjw@redhat.com>
1257
1258 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1259
12602011-11-31 Mark Wielaard <mjw@redhat.com>
1261
1262 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1263
12642011-07-14 Mark Wielaard <mjw@redhat.com>
1265
1266 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1267
12682011-05-16 Jakub Jelinek <jakub@redhat.com>
1269
1270 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1271 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1272 New.
1273
12742011-04-26 Mark Wielaard <mjw@redhat.com>
1275
1276 * dwarf_child (dwarf_child): Sanity check end of section against
1277 cu_data () of die->cu.
1278
12792011-03-22 Mark Wielaard <mjw@redhat.com>
1280
1281 * dwarf.h: Add DW_TAG_GNU_call_site,
1282 DW_TAG_GNU_call_site_parameter,
1283 DW_AT_GNU_call_site_value,
1284 DW_AT_GNU_call_site_data_value,
1285 DW_AT_GNU_call_site_target,
1286 DW_AT_GNU_call_site_target_clobbered,
1287 DW_AT_GNU_tail_call,
1288 DW_AT_GNU_all_tail_call_sites,
1289 DW_AT_GNU_all_call_sites,
1290 DW_AT_GNU_all_source_call_sites,
1291 and DW_OP_GNU_entry_value.
1292
12932011-03-10 Petr Machata <pmachata@redhat.com>
1294
1295 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1296 abbreviation with code 0.
1297
12982011-03-09 Petr Machata <pmachata@redhat.com>
1299
1300 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1301
13022011-02-23 Roland McGrath <roland@redhat.com>
1303
1304 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1305 Declare __libdw_free_zdata.
1306 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1307 (dwarf_end): Call it.
1308
1309 * dwarf_begin_elf.c (valid_p): Likewise.
1310 (check_section, scngrp_read): Likewise.
1311 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1312
13132010-10-13 Roland McGrath <roland@redhat.com>
1314
1315 * dwarf.h: Add DW_LANG_Go.
1316
13172010-10-05 Roland McGrath <roland@redhat.com>
1318
1319 * dwarf_getaranges.c: Use malloc rather than alloca,
1320 since the total number of elements can be quite huge.
1321
13222010-07-26 Roland McGrath <roland@redhat.com>
1323
1324 * dwarf_getlocation_implicit_pointer.c: New file.
1325 * Makefile.am (libdw_a_SOURCES): Add it.
1326 * libdw.map (ELFUTILS_0.149): New set.
1327 Add dwarf_getlocation_implicit_pointer.
1328 * libdw.h: Declare it.
1329
1330 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1331 (dwarf_offdie, dwarf_offdie_types): Update callers.
1332 * libdwP.h: Declare it.
1333
1334 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1335 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1336
13372010-08-24 Roland McGrath <roland@redhat.com>
1338
1339 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1340
13412010-07-27 Roland McGrath <roland@redhat.com>
1342
1343 * dwarf_formref_die.c: Fix sig8 hash insertion.
1344
13452010-06-23 Roland McGrath <roland@redhat.com>
1346
1347 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1348 * libdw.h: Remove it.
1349 * libdw.map: Likewise.
1350
13512010-06-22 Roland McGrath <roland@redhat.com>
1352
1353 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1354
1355 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1356 opcode parsing.
1357
13582010-06-21 Roland McGrath <roland@redhat.com>
1359
1360 * dwarf.h: Add DW_TAG_GNU_* constants.
1361
1362 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1363 10-byte case.
1364
13652010-06-20 Roland McGrath <roland@redhat.com>
1366
1367 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1368 to search TUs instead of CUs.
1369 * libdwP.h: Update decl.
1370 (struct Dwarf): New member tu_tree.
1371 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1372 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1373 (dwarf_offdie): ... here.
1374 (dwarf_offdie_types): New function.
1375 * libdw.h: Declare it.
1376 * libdw.map (ELFUTILS_0.148): Add it.
1377
1378 * libdwP.h (CUDIE): Use cu_data.
1379 * dwarf_formblock.c: Likewise.
1380 * dwarf_formref_die.c: Likewise.
1381 * dwarf_diecu.c: Use CUDIE macro.
1382 * dwarf_formaddr.c: Use cu_sec_idx.
1383
13842010-06-16 Roland McGrath <roland@redhat.com>
1385
1386 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1387 we don't repeat a CU lookup we've already done. Handle
1388 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1389
1390 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1391 broken out of ...
1392 (__libdw_findcu): ... here. Call it.
1393 * libdwP.h: Declare it.
1394 (struct Dwarf): New member next_tu_offset.
1395
1396 * dwarf_sig8_hash.c: New file.
1397 * dwarf_sig8_hash.h: New file.
1398 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1399 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1400 defining NO_UNDEF.
1401 * libdwP.h (struct Dwarf): New member sig8_hash.
1402 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1403 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1404
1405 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1406 (dwarf_nextcu): ... here. Call it.
1407 * libdw.h: Declare it.
1408 * libdwP.h: Add INTDECL.
1409 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1410 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1411
1412 * libdwP.h (cu_sec_idx, cu_data): New functions.
1413 Use .debug_types when CU is a TU.
1414 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1415 * dwarf_siblingof.c: Likewise.
1416 * dwarf_formstring.c: Likewise.
1417 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1418 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1419 (dwarf_getlocation_addr): Likewise.
1420
1421 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1422 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1423 .debug_types header size instead of .debug_info header size.
1424 (CUDIE): Use it.
1425 * dwarf_diecu.c: Update caller.
1426 * dwarf_getaranges.c: Likewise.
1427 * dwarf_nextcu.c: Likewise.
1428 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1429
1430 * fde.c (fde_by_offset): Renamed to ...
1431 (__libdw_fde_by_offset): ... this, made global and internal_function.
1432 Don't take ADDRESS argument.
1433 (__libdw_find_fde): Update caller. Do address sanity check here.
1434 * cfi.h: Declare __libdw_fde_by_offset.
1435 * cfi.c (dwarf_cfi_validate_fde): New function.
1436 * libdw.h: Declare it.
1437 * libdw.map (ELFUTILS_0.148): Add it.
1438
1439 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1440 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1441
1442 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1443 Don't assume DW_EH_PE_aligned refers to native address size.
1444
1445 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1446 address.
1447
14482010-06-17 Roland McGrath <roland@redhat.com>
1449
1450 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1451 op_index.
1452 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1453 into an inner inline function. Set new fields. Check all fields for
1454 overflow when setting.
1455 * dwarf_lineisa.c: New file.
1456 * dwarf_linediscriminator.c: New file.
1457 * dwarf_lineop_index.c: New file.
1458 * Makefile.am (libdw_a_SOURCES): Add them.
1459 * libdw.map (ELFUTILS_0.148): Add them.
1460 * libdw.h: Declare them.
1461
14622010-06-16 Roland McGrath <roland@redhat.com>
1463
1464 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1465
1466 * fde.c (fde_by_offset): Renamed to ...
1467 (__libdw_fde_by_offset): ... this, made global and internal_function.
1468 Don't take ADDRESS argument.
1469 (__libdw_find_fde): Update caller. Do address sanity check here.
1470 * cfi.h: Declare __libdw_fde_by_offset.
1471 * cfi.c (dwarf_cfi_validate_fde): New function.
1472 * libdw.h: Declare it.
1473 * libdw.map (ELFUTILS_0.148): Add it.
1474
1475 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1476 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1477
1478 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1479 Don't assume DW_EH_PE_aligned refers to native address size.
1480
1481 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1482 address.
1483
14842010-06-15 Roland McGrath <roland@redhat.com>
1485
1486 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
1487 DW_FORM_ref_addr.
1488 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
1489 here, since we don't support it yet.
1490
1491 * dwarf_next_cfi.c: Handle version 4 format.
1492
1493 * dwarf_getsrclines.c: Handle version 4 format.
1494
14952010-06-01 Roland McGrath <roland@redhat.com>
1496
1497 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
1498 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1499
1500 * libdwP.h (CIE_VERSION): Remove unused macro.
1501
1502 * dwarf_getsrclines.c: Fix version field test.
1503 * libdwP.h (DWARF_VERSION): Remove useless macro.
1504
1505 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1506
1507 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1508
1509 * libdw_findcu.c (__libdw_findcu): Accept version 4.
1510
15112010-05-31 Mark Wielaard <mjw@redhat.com>
1512
1513 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1514 * libdw.h (dwarf_cfi_cie_p): ... here.
1515
15162010-05-31 Mark Wielaard <mjw@redhat.com>
1517
1518 * dwarf.h: Fix DW_LANG_Python constant.
1519
15202010-05-28 Eduardo Santiago <santiago@redhat.com>
1521
1522 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1523 thing.
1524
15252010-05-27 Roland McGrath <roland@redhat.com>
1526
1527 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1528 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1529
15302010-05-08 Roland McGrath <roland@redhat.com>
1531
1532 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
1533 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1534 (getlocation): Update caller.
1535 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1536 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1537 * libdwP.h: Update decl.
1538
15392010-04-26 Roland McGrath <roland@redhat.com>
1540
1541 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1542 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1543 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
1544 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1545
1546 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1547 Prepend DW_OP_call_frame_cfa if true.
1548 (getlocation): Update caller.
1549 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1550 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1551 * libdwP.h: Update decl.
1552
15532010-04-22 Roland McGrath <roland@redhat.com>
1554
1555 * cfi.c (execute_cfi): Never return without cleanup.
1556 Free FS on failure.
1557 (cie_cache_initial_state): Adjust caller to expect that free.
1558 (__libdw_frame_at_address): Likewise.
1559
15602010-03-10 Roland McGrath <roland@redhat.com>
1561
1562 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1563
15642010-02-15 Roland McGrath <roland@redhat.com>
1565
1566 * Makefile.am: Use config/eu.am for common stuff.
1567
15682010-02-02 Mark Wielaard <mjw@redhat.com>
1569
1570 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
1571
15722010-01-07 Roland McGrath <roland@redhat.com>
1573
1574 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1575
15762010-01-05 Roland McGrath <roland@redhat.com>
1577
1578 * dwarf_aggregate_size.c: New file.
1579 * Makefile.am (libdw_a_SOURCES): Add it.
1580 * libdw.h: Declare it.
1581 * libdwP.h: Add INTDECL.
1582 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1583
1584 * dwarf_srclang.c: Add INTDEF.
1585 * libdwP.h: Add INTDECL.
1586
1587 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1588
1589 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1590
15912009-11-21 Roland McGrath <roland@redhat.com>
1592
1593 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1594 non-constant forms.
1595
15962009-10-15 Roland McGrath <roland@redhat.com>
1597
1598 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
1599 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1600
16012009-09-17 Roland McGrath <roland@redhat.com>
1602
1603 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1604 argument a pointer to const.
1605 * libdw.h: Update decl.
1606
16072009-09-10 Roland McGrath <roland@redhat.com>
1608
1609 * dwarf_getlocation.c (store_implicit_value): New function.
1610 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1611 (dwarf_getlocation_implicit_value): New function.
1612 * libdw.h: Declare it.
1613 * libdw.map (ELFUTILS_0.143): Add it.
1614
16152009-09-09 Mark Wielaard <mjw@redhat.com>
1616
1617 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1618
16192009-08-21 Josh Stone <jistone@redhat.com>
1620
1621 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1622
16232009-08-10 Roland McGrath <roland@redhat.com>
1624
1625 * dwarf_getscopevar.c: Use dwarf_diename.
1626
16272009-08-09 Roland McGrath <roland@redhat.com>
1628
1629 * libdw.map (ELFUTILS_0.143): New version set,
1630 inherits from ELFUTILS_0.142.
1631 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1632 alias in the ELFUTILS_0.122 version set and the default in the new set.
1633 * dwarf_srclang.c: Likewise.
1634 * dwarf_decl_file.c: Likewise.
1635 * dwarf_decl_line.c: Likewise.
1636 * dwarf_decl_column.c: Likewise.
1637 * dwarf_bytesize.c: Likewise.
1638 * dwarf_bitsize.c: Likewise.
1639 * dwarf_bitoffset.c: Likewise.
1640
16412009-08-07 Roland McGrath <roland@redhat.com>
1642
1643 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1644 * dwarf_srclang.c: Likewise.
1645 * dwarf_decl_file.c: Likewise.
1646 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
1647 * dwarf_bytesize.c: Likewise.
1648 * dwarf_bitsize.c: Likewise.
1649 * dwarf_bitoffset.c: Likewise.
1650
16512009-07-22 Roland McGrath <roland@redhat.com>
1652
1653 * dwarf_frame_cfa.c: Change calling convention.
1654 * libdw.h: Update decl.
1655
1656 * dwarf_frame_register.c: Change calling/return-value convention for
1657 value-only results and undefined/same_value.
1658 * libdw.h: Update decl.
1659
1660 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1661 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
1662 return that value instead.
1663 (getlocation): Update caller.
1664 * dwarf_frame_cfa.c: Likewise.
1665 * libdwP.h: Update decl.
1666
16672009-07-21 Roland McGrath <roland@redhat.com>
1668
1669 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1670 Fix loop iteration after skipping a bogus or useless CU.
1671
1672 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1673 absence, not DWARF_E_NO_DEBUG_LINE.
1674
16752009-07-20 Roland McGrath <roland@redhat.com>
1676
1677 * dwarf_getlocation.c (__libdw_intern_expression):
1678 Handle DW_OP_stack_value.
1679
16802009-07-16 Roland McGrath <roland@redhat.com>
1681
1682 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
1683 reject others when CU's version > 3.
1684
1685 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1686
1687 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1688 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1689 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1690 and DW_AT_const_expr.
1691 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1692 and DW_FORM_ref_sig8.
1693
16942009-07-15 Roland McGrath <roland@redhat.com>
1695
1696 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1697 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1698
16992009-07-13 Roland McGrath <roland@redhat.com>
1700
1701 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1702
17032009-07-08 Roland McGrath <roland@redhat.com>
1704
1705 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1706 dwfl_module_eh_cfi.
1707
1708 * libdwP.h (struct Dwarf): Add member `cfi'.
1709 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1710 * dwarf_getcfi.c: New file.
1711 * dwarf_getcfi_elf.c: New file.
1712 * dwarf_cfi_end.c: New file.
1713 * dwarf_cfi_addrframe.c: New file.
1714 * dwarf_frame_cfa.c: New file.
1715 * dwarf_frame_register.c: New file.
1716 * dwarf_frame_return_address_register.c: New file.
1717 * Makefile.am (libdw_a_SOURCES): Add them.
1718 * unwind.h: Declare those functions.
1719 * libdw.map (ELFUTILS_0.142): Export them.
1720
1721 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1722 broken out of ...
1723 (getlocation): ... here, call it.
1724 * libdwP.h: Declare it.
1725
1726 * cie.c: New file.
1727 * fde.c: New file.
1728 * frame-cache.c: New file.
1729 * cfi.c: New file.
1730 * cfi.h: New file.
1731 * encoded-value.h: New file.
1732 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1733 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1734 * dwarf_error.c (errmsgs): Add element for it.
1735
1736 * dwarf_next_cfi.c: New file.
1737 * Makefile.am (libdw_a_SOURCES): Add it.
1738 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1739 Declare dwarf_next_cfi.
1740 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1741 Add dwarf_next_cfi.
1742
1743 * memory-access.h [! ALLOW_UNALIGNED]
1744 (read_2ubyte_unaligned): Renamed to ...
1745 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1746 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1747 (read_2sbyte_unaligned): Likewise.
1748 (read_4ubyte_unaligned): Likewise.
1749 (read_4sbyte_unaligned): Likewise.
1750 (read_8ubyte_unaligned): Likewise.
1751 (read_8sbyte_unaligned): Likewise.
1752
1753 * libdwP.h (IDX_eh_frame): Remove it.
1754 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1755
17562009-07-08 Roland McGrath <roland@redhat.com>
1757
1758 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1759
1760 * dwarf_getlocation.c (check_constant_offset): New function.
1761 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1762 handle DW_AT_data_member_location of data[48] as constant offset.
1763
17642009-06-18 Roland McGrath <roland@redhat.com>
1765
1766 * libdwP.h (__libdw_read_address_inc): Constify.
1767 (__libdw_read_offset_inc): Likewise.
1768 * dwarf_getaranges.c: Likewise.
1769 * dwarf_getlocation.c: Likewise.
1770 * dwarf_getsrclines.c: Likewise.
1771 * dwarf_nextcu.c: Likewise.
1772
17732009-05-05 Petr Machata <pmachata@redhat.com>
1774
1775 * libdwP.h (__libdw_formptr): Declare new function.
1776 * dwarf_formudata.c: Implement it here.
1777 * dwarf_getlocation.c (dwarf_getlocation_addr):
1778 Call it instead of hand-rolled offset handling code.
1779 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1780 * dwarf_ranges.c (dwarf_ranges): Likewise.
1781
17822009-05-04 Petr Machata <pmachata@redhat.com>
1783
1784 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1785 * dwarf_ranges.c: Implement it here.
1786 (dwarf_ranges): Call it.
1787 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1788
17892009-04-23 Petr Machata <pmachata@redhat.com>
1790
1791 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1792 of read_*ubyte_unaligned.
1793 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1794 * dwarf_formstring.c (dwarf_formstring): Likewise.
1795 * dwarf_formudate.c (dwarf_formudata): Likewise.
1796 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1797 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1798 * dwarf_getpubnames.c (get_offsets): Likewise.
1799 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1800
18012009-04-23 Petr Machata <pmachata@redhat.com>
1802
1803 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1804 __libdw_read_addr, __libdw_read_off): Add four new internal
1805 functions.
1806
18072009-05-07 Roland McGrath <roland@redhat.com>
1808
1809 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1810 return value and OFFSET argument, not CU-relative. Only fetch the
1811 attribute data when called with OFFSET of 0.
1812
18132009-05-07 Petr Machata <pmachata@redhat.com>
1814
1815 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1816 DW_AT_macro_info attribute of CU DIE.
1817
18182009-04-15 Roland McGrath <roland@redhat.com>
1819
1820 * dwarf.h (DW_CIE_ID): Removed.
1821 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1822
18232009-04-01 Roland McGrath <roland@redhat.com>
1824
1825 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1826
18272009-01-28 Roland McGrath <roland@redhat.com>
1828
1829 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1830 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1831
1832 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1833
18342009-01-26 Roland McGrath <roland@redhat.com>
1835
1836 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1837
18382009-01-25 Roland McGrath <roland@redhat.com>
1839
1840 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1841
18422009-01-23 Roland McGrath <roland@redhat.com>
1843
1844 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1845 Put these rules under if MAINTAINER_MODE.
1846
18472009-01-22 Roland McGrath <roland@redhat.com>
1848
1849 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1850
18512009-01-21 Roland McGrath <roland@redhat.com>
1852
1853 * Makefile.am (CLEANFILES): Renamed to ...
1854 (MOSTLYCLEANFILES): ... here.
1855 (CLEANFILES): New variable, add known-dwarf.h.
1856
18572009-01-17 Roland McGrath <roland@redhat.com>
1858
1859 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1860 Make it unconditional.
1861 (BUILT_SOURCES): Updated.
1862
1863 * dwarf.h: Add description comments for DW_LANG_* values.
1864
1865 * Makefile.am [MAINTAINER_MODE]
1866 ($(srcdir)/known-dwarf.h): New target.
1867 (BUILT_SOURCES): Add it.
1868
1869 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1870
18712009-01-10 Ulrich Drepper <drepper@redhat.com>
1872
1873 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
1874
18752009-01-08 Roland McGrath <roland@redhat.com>
1876
1877 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1878
18792008-01-06 Roland McGrath <roland@redhat.com>
1880
1881 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1882 Reorder members.
1883 * dwarf_haschildren.c: Return -1 for error case, not 0.
1884
1885 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1886
18872009-01-06 Ulrich Drepper <drepper@redhat.com>
1888
1889 * dwarf.h: Add definition for unwind and call frame information.
1890
1891 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1892 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1893
18942008-08-15 Roland McGrath <roland@redhat.com>
1895
1896 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1897 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1898
18992008-01-21 Ulrich Drepper <drepper@redhat.com>
1900
1901 * dwarf_child.c: Minor optimizations.
1902 * dwarf_getattrs.c: Likewise.
1903 * dwarf_getpubnames.c: Likewise.
1904 * dwarf_siblingof.c: Likewise.
1905 * dwarf_tag.c: Likewise.
1906
19072008-01-18 Ulrich Drepper <drepper@redhat.com>
1908
1909 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1910 of DWARF_VERSION comparison, just fail if the file's version is newer.
1911
19122008-01-17 Nick Clifton <nickc@redhat.com>
1913
1914 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1915 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1916 (DWARF3_LENGTH_64_BIT): New define.
1917 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1918 * dwarf_getpubnames: Include dwarf.h.
1919 (get_offsets): Use the new definitions.
1920 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1921 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1922 (dwarf_nextcu): Use the new definitions.
1923
1924 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1925 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1926 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1927 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1928
1929 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1930 error return.
1931
1932 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1933
1934 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1935 Set the address in the return structure to the address of the next
1936 non-sibling die, if there is no sibling and the return pointer is
1937 not the same as the die pointer.
1938 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1939
1940 * dwarf_child.c: Fix typo in comment.
1941
1942 * libdwP.h (DWARF_VERSION): Change to 3.
1943
1944 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1945 not have a initialised valp pointer.
1946
1947 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1948 the end of the attributes is reached. When the callback fails,
1949 return the address of the failing attribute, not the address of
1950 its successor.
1951 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1952
1953 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1954 (dwarf_child): Likewise.
1955 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1956 (dwarf_tag): Likewise.
1957
19582008-01-08 Roland McGrath <roland@redhat.com>
1959
1960 * Makefile.am (euinclude): Variable removed.
1961 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1962 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1963
19642007-10-17 Roland McGrath <roland@redhat.com>
1965
1966 * libdw.h (__deprecated_attribute__): New macro.
1967 (dwarf_formref): Mark it deprecated.
1968 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1969 (dwarf_formref): ... here. Call it. Remove INTDEF.
1970 * libdwP.h: Remove INTDECL.
1971 Declare __libdw_formref.
1972 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1973 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1974
1975 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1976 needs to check CU->version.
1977
1978 * libdwP.h (struct Dwarf_CU): New member `version'.
1979 * libdw_findcu.c (__libdw_findcu): Initialize it.
1980
1981 * dwarf_child.c: Return 1 for null entry as first child.
1982
19832007-10-05 Roland McGrath <roland@redhat.com>
1984
1985 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1986
1987 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1988 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1989
19902007-10-03 Roland McGrath <roland@redhat.com>
1991
1992 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1993 and dwfl_build_id_find_debuginfo.
1994
1995 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1996 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1997
19982007-10-02 Roland McGrath <roland@redhat.com>
1999
2000 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2001 structure_type.
2002
20032007-08-07 Roland McGrath <roland@redhat.com>
2004
2005 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2006 error code is DWARF_E_NOERROR (0).
2007
2008 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2009 Fix typo in __libdw_visit_scopes argument.
2010
2011 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2012 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2013
20142007-07-03 Roland McGrath <roland@redhat.com>
2015
2016 * libdw.h (__extern_inline): New macro.
2017 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2018
20192007-04-16 Roland McGrath <roland@redhat.com>
2020
2021 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2022
20232007-04-05 Roland McGrath <roland@redhat.com>
2024
2025 * dwarf_getsrcdirs.c: New file.
2026 * Makefile.am (libdw_a_SOURCES): Add it.
2027 * libdw.h: Declare dwarf_getsrcdirs.
2028 * libdw.map (ELFUTILS_0.127): Add it.
2029
2030 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2031 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2032 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2033 Save DIRARRAY in the Dwarf_Files.
2034
2035 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
2036 address to check for all-ones base address entry. Check directly.
2037 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2038
20392007-03-25 Roland McGrath <roland@redhat.com>
2040
2041 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2042 Return NULL when freeing RESULT on error.
2043 (global_read, scngrp_read): Check return value from check_section,
2044 break out of loop after it has freed RESULT.
2045 (valid_p): Handle null argument.
2046
20472007-03-12 Roland McGrath <roland@redhat.com>
2048
2049 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2050
20512007-03-04 Roland McGrath <roland@redhat.com>
2052
2053 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2054 ELFUTILS_0.126. Add dwfl_module_addrsym.
2055
20562007-02-10 Roland McGrath <roland@redhat.com>
2057
2058 * dwarf.h (DW_OP_fbreg): Comment fix.
2059
20602007-02-03 Roland McGrath <roland@redhat.com>
2061
2062 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2063 * libdw.map (ELFUTILS_0.126): New version set, inherits from
2064 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2065 exported in the past.
2066
20672006-12-17 Roland McGrath <roland@redhat.com>
2068
2069 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2070 address when the CU is missing attributes due to buggy GCC.
2071
20722006-08-29 Roland McGrath <roland@redhat.com>
2073
2074 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2075
2076 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2077 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2078
2079 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2080 result is aligned. Adjust NEWP->remaining here for this allocation.
2081 * libdwP.h: Update decl.
2082 (libdw_alloc): Update caller.
2083
20842006-07-12 Ulrich Drepper <drepper@redhat.com>
2085
2086 * dwarf_child.c: Adjust for internal_function_def removal.
2087 * dwarf_getabbrev.c: Likewise.
2088 * dwarf_tag.c: Likewise.
2089 * libdw_form.c: Likewise.
2090 * memory-access.c: Likewise.
2091
20922006-06-28 Roland McGrath <roland@redhat.com>
2093
2094 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2095
2096 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2097 dwfl_module_getsym.
2098
20992006-05-27 Ulrich Drepper <drepper@redhat.com>
2100
2101 * libdw.h: Add extern "C".
2102
21032006-05-22 Ulrich Drepper <drepper@redhat.com>
2104
2105 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2106 aranges information.
2107
21082006-05-21 Ulrich Drepper <drepper@redhat.com>
2109
2110 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2111 dwarf_haschildren.
2112
21132006-02-28 Roland McGrath <roland@redhat.com>
2114
2115 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2116 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2117 values from DWARF 3.0.
2118
21192006-02-22 Roland McGrath <roland@redhat.com>
2120
2121 * libdw.map: Bump to 0.120; export dwfl_version.
2122
21232005-12-22 Roland McGrath <roland@redhat.com>
2124
2125 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2126
21272005-12-12 Roland McGrath <roland@redhat.com>
2128
2129 * dwarf_ranges.c: Copy CU base address-finding code from
2130 dwarf_getlocation.
2131
21322005-12-09 Roland McGrath <roland@redhat.com>
2133
2134 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2135 Delay CU base lookup until it's needed.
2136 If CU base lookup fails with no error, flag invalid DWARF.
2137
21382005-11-25 Roland McGrath <roland@redhat.com>
2139
2140 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2141
21422005-11-15 Roland McGrath <roland@redhat.com>
2143
2144 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2145
21462005-11-13 Roland McGrath <roland@redhat.com>
2147
2148 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2149
21502005-10-27 Roland McGrath <roland@redhat.com>
2151
2152 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2153 don't match end_sequence markers.
2154
2155 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2156 before normal records at the same address.
2157 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2158 marker.
2159
21602005-10-26 Roland McGrath <roland@redhat.com>
2161
2162 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2163 * dwarf_func_file.c: Renamed to ...
2164 * dwarf_decl_file.c: ... here.
2165 * dwarf_func_col.c: Renamed to ...
2166 * dwarf_decl_column.c: ... here.
2167 * dwarf_func_line.c: Renamed to ...
2168 * dwarf_decl_line.c: ... here.
2169 (dwarf_func_line): Renamed to ...
2170 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2171 (__libdw_func_intval): Renamed __libdw_attr_intval.
2172 * dwarf_func_name.c: File removed.
2173 * dwarf_func_lowpc.c: File removed.
2174 * dwarf_func_highpc.c: File removed.
2175 * dwarf_func_entrypc.c: File removed.
2176 * dwarf_func_die.c: File removed.
2177 * Makefile.am (libdw_a_SOURCES): Updated.
2178 * libdw.h: Update decls.
2179 (Dwarf_Func): Type removed.
2180 * libdwP.h: Update decls.
2181 (struct Dwarf_Func_s): Type removed.
2182 * libdw.map: Updated.
2183
2184 * libdwP.h (CUDIE): New macro.
2185 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2186 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2187 * dwarf_ranges.c (dwarf_ranges): Likewise.
2188
2189 * dwarf_getloclist.c: Renamed to ...
2190 * dwarf_getlocation.c: ... here.
2191 (getloclist): Renamed to getlocation.
2192 (dwarf_getloclist): Renamed to dwarf_getlocation.
2193 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2194 * Makefile.am (libdw_a_SOURCES): Updated.
2195 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2196 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2197 (Dwarf_Loc): Renamed Dwarf_Op.
2198 * libdwP.h (struct loc_s): Update use.
2199 * libdw.map: Update map.
2200
2201 * dwarf_entry_breakpoints.c: Use the second line record within the
2202 function, regardless of its source location data.
2203
22042005-10-25 Roland McGrath <roland@redhat.com>
2205
2206 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2207
2208 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2209
22102005-10-14 Roland McGrath <roland@redhat.com>
2211
2212 * dwarf_diecu.c (dwarf_diecu): New file.
2213 * Makefile.am (libdw_a_SOURCES): Add it.
2214 * libdw.h: Declare dwarf_diecu.
2215 * libdw.map: Export it.
2216
2217 * libdw.map: Bump to 0.116; export dwarf_ranges.
2218
22192005-09-20 Roland McGrath <roland@redhat.com>
2220
2221 * dwarf_haspc.c: Use dwarf_ranges.
2222 * dwarf_entry_breakpoints.c: Likewise.
2223
2224 * dwarf_ranges.c: New file.
2225 * Makefile.am (libdw_a_SOURCES): Add it.
2226 * libdw.h: Declare dwarf_ranges.
2227 * libdwP.h: Add INTDECL.
2228
22292005-09-14 Roland McGrath <roland@redhat.com>
2230
2231 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2232 prologue_end marker scanning loop.
2233
22342005-09-11 Roland McGrath <roland@redhat.com>
2235
2236 * dwarf.h: Comment typo fix.
2237
22382005-09-07 Roland McGrath <roland@redhat.com>
2239
2240 * dwarf_entry_breakpoints.c: New file.
2241 * Makefile.am (libdw_a_SOURCES): Add it.
2242 * libdw.h: Declare dwarf_entry_breakpoints.
2243
2244 * dwarf_entrypc.c: New file.
2245 * Makefile.am (libdw_a_SOURCES): Add it.
2246 * libdw.h: Declare dwarf_entrypc.
2247 * libdwP.h: Add INTDECL.
2248
22492005-08-28 Ulrich Drepper <drepper@redhat.com>
2250
2251 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2252 (%.os): Use COMPILE.os.
2253 (COMPILE.os): Filter out gconv options.
2254
22552005-08-27 Roland McGrath <roland@redhat.com>
2256
2257 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2258 __libdw_visit_scopes.
2259
2260 * dwarf_getscopes_die.c: New file.
2261 * Makefile.am (libdw_a_SOURCES): Add it.
2262 * libdw.h: Declare dwarf_getscopes_die.
2263 * libdw.map: Bump to 0.115 and add it.
2264
2265 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2266 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2267 Take two functions for both preorder and postorder visitors.
2268 * libdwP.h: Update decl.
2269 (struct Dwarf_Die_Chain): New type.
2270 * dwarf_func_inline.c: Update uses.
2271
2272 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2273 Add INTDEF.
2274 * libdwP.h: Add INTDECL.
2275 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2276
22772005-08-23 Roland McGrath <roland@redhat.com>
2278
2279 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2280 DW_AT_specification the same as DW_AT_abstract_origin.
2281
22822005-08-20 Roland McGrath <roland@redhat.com>
2283
2284 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2285 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2286 and dwfl_report_offline.
2287
22882005-08-19 Roland McGrath <roland@redhat.com>
2289
2290 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
2291 Add dwfl_module_relocate_address, dwfl_module_relocations,
2292 dwfl_module_relocation_info.
2293
22942005-08-18 Roland McGrath <roland@redhat.com>
2295
2296 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2297 outermost scope in the results.
2298
22992005-08-15 Roland McGrath <roland@redhat.com>
2300
2301 * dwarf_func_inline.c: New file.
2302 * Makefile.am (libdw_a_SOURCES): Add it.
2303 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
2304 * libdw.map: Add them.
2305
2306 * dwarf_func_die.c: New file.
2307 * Makefile.am (libdw_a_SOURCES): Add it.
2308 * libdw.h: Declare dwarf_func_die.
2309 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2310
23112005-08-10 Ulrich Drepper <drepper@redhat.com>
2312
2313 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
2314 of DW_LNS_set_epilog_begin.
2315
23162005-08-09 Roland McGrath <roland@redhat.com>
2317
2318 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2319
2320 * dwarf_end.c: Add INTDEF.
2321 * dwarf_error.c (dwarf_errmsg): Likewise.
2322 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2323
23242005-08-01 Roland McGrath <roland@redhat.com>
2325
2326 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2327 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2328
23292005-07-28 Ulrich Drepper <drepper@redhat.com>
2330
2331 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2332 (libdw_a_LIBADD): Add all files from libdwfl.a.
2333
23342005-07-27 Roland McGrath <roland@redhat.com>
2335
2336 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2337 along with ../libebl/libebl.a and ../lib/libeu.a;
2338 depend on ../libelf/libelf.so.
2339 (libdw_so_LDADD): New variable.
2340 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2341
2342 * libdw.map: Define an empty base version and move all symbols to
2343 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2344
23452005-07-23 Ulrich Drepper <drepper@redhat.com>
2346
2347 * dwarf_error.c: Add internal alias for dwarf_errno.
2348 * libdwP.h: Declare __dwarf_errno_internal.
2349 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2350
2351 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2352 global_error.
2353
23542005-06-01 Roland McGrath <roland@redhat.com>
2355
2356 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2357 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2358
23592005-06-08 Roland McGrath <roland@redhat.com>
2360
2361 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2362 (get_sleb128_step, get_sleb128): Likewise.
2363 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2364 * dwarf_getloclist.c (getloclist): Likewise.
2365 * dwarf_formblock.c (dwarf_formblock): Likewise.
2366 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2367 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2368 * dwarf_formref.c (dwarf_formref): Likewise.
2369 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2370 * dwarf_formudata.c (dwarf_formudata): Likewise.
2371 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2372 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2373 * dwarf_tag.c (dwarf_tag): Likewise.
2374 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2375 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2376 * libdw_form.c (__libdw_form_val_len): Likewise.
2377 * libdwP.h: Update decl.
2378
23792005-06-04 Roland McGrath <roland@redhat.com>
2380
2381 * memory-access.h (get_uleb128_rest_return): New macro.
2382 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2383 (get_sleb128_rest_return): New macro.
2384 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2385 * memory-access.c: New file.
2386 * Makefile.am (libdw_a_SOURCES): Add it.
2387 (DEFS): Add -DIS_LIBDW.
2388
23892005-05-31 Roland McGrath <roland@redhat.com>
2390
2391 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2392 formref offset.
2393
23942005-05-30 Roland McGrath <roland@redhat.com>
2395
2396 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2397 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2398
2399 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2400 BEGIN value. Instead, match base address entries separately for
2401 32/64 size cases.
2402
24032005-05-28 Roland McGrath <roland@redhat.com>
2404
2405 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2406 past location expression contents.
2407
24082005-05-23 Roland McGrath <roland@redhat.com>
2409
2410 * dwarf_getsrclines.c: Comment typo fix.
2411
2412 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2413 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2414
24152005-05-22 Ulrich Drepper <drepper@redhat.com>
2416
2417 * libdwP.h: Only use INTDECL for alias prototypes.
2418
24192005-05-19 Roland McGrath <roland@redhat.com>
2420
2421 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2422
2423 * dwarf_getscopevar.c: New file.
2424 * Makefile.am (libdw_a_SOURCES): Add it.
2425 * libdw.h: Declare dwarf_getscopevar.
2426
2427 * dwarf_getsrcfiles.c: Add INTDEF.
2428 * dwarf_haschildren.c: Likewise.
2429 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2430
2431 * dwarf_getscopes.c: New file.
2432 * Makefile.am (libdw_a_SOURCES): Add it.
2433 * libdw.h: Declare dwarf_getscopes.
2434 * libdw.map: Add it.
2435
24362005-05-18 Roland McGrath <roland@redhat.com>
2437
2438 * libdwP.h (IDX_debug_ranges): New enum constant.
2439 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2440 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2441 * dwarf_error.c (errmsgs): Add it.
2442 * dwarf_haspc.c: New file.
2443 * libdw.h: Declare dwarf_haspc.
2444 * libdw.map: Add it.
2445 * libdwP.h: Add INTDECL.
2446
2447 * dwarf_attr_integrate.c: New file.
2448 * dwarf_hasattr_integrate.c: New file.
2449 * Makefile.am (libdw_a_SOURCES): Add them.
2450 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2451 * libdw.map: Add them.
2452
2453 * dwarf_hasattr.c: Add INTDEF.
2454 * libdwP.h: Add INTDECL for it.
2455
2456 * dwarf_formref_die.c: New file.
2457 * Makefile.am (libdw_a_SOURCES): Add it.
2458 * libdw.h (dwarf_formref_die): Declare it.
2459 * libdwP.h (dwarf_formref_die): Add INTDECL.
2460 * libdw.map: Add it.
2461
2462 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2463 of ...
2464 (dwarf_getloclist): ... here. Call them.
2465 (dwarf_addrloclists): New function.
2466 * libdw.h: Declare it.
2467 * libdw.map: Add it.
2468
2469 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2470 DW_MACINFO_end_file. Recognize type 0 as terminator.
2471
24722005-05-05 Roland McGrath <roland@redhat.com>
2473
2474 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2475
2476 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2477 the line program does not produce all entries in ascending order.
2478
24792005-04-25 Ulrich Drepper <drepper@redhat.com>
2480
2481 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2482 occurences (e.g., inlines) better.
2483
24842005-04-24 Ulrich Drepper <drepper@redhat.com>
2485
2486 * libdw.h (DWARF_END_ABBREV): Define.
2487 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2488 end is reached.
2489 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2490 of records reached.
2491 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2492 as error of __libdw_getabbrev.
2493
24942005-04-04 Ulrich Drepper <drepper@redhat.com>
2495
2496 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2497
2498 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2499 results back to caller.
2500
25012005-04-04 Roland McGrath <roland@redhat.com>
2502
2503 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2504
2505 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2506 defn.
2507
25082005-04-04 Ulrich Drepper <drepper@redhat.com>
2509
2510 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2511
2512 * dwarf_getsrc_file.c: New file.
2513 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2514 * libdw.h: Declare dwarf_getsrc_file.
2515 * libdw.map: Add dwarf_getsrc_file.
2516
25172005-04-02 Ulrich Drepper <drepper@redhat.com>
2518
2519 * dwarf_func_entrypc.c: New file.
2520 * dwarf_func_col.c: New file.
2521 * dwarf_func_line.c: New file.
2522 * dwarf_func_file.c: New file.
2523 * libdw.h: Add prototypes for new functions.
2524 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2525 dwarf_func_file.
2526 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2527 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2528 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2529 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2530 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2531 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2532
2533 * dwarf.h: Add some DWARF3 definitions.
2534
25352005-04-01 Ulrich Drepper <drepper@redhat.com>
2536
2537 * dwarf_getfuncs.c: New file.
2538 * dwarf_func_highpc.c: New file.
2539 * dwarf_func_lowpc.c: New file.
2540 * dwarf_func_name.c: New file.
2541 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2542 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2543 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2544 and dwarf_func_name.
2545 * libdw.h: Add prototypes for new functions.
2546 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2547 * dwarf_siblingof.c: Likewise.
2548 * dwarf_dieoffset.c: Likewise.
2549 * dwarf_highpc.c: Likewise.
2550 * dwarf_lowpc.c: Likewise.
2551 * libdwP.h: Add prototypes for internal functions.
2552 Define Dwarf_Func_s structure.
2553
25542005-03-29 Ulrich Drepper <drepper@redhat.com>
2555
2556 * libdw.h: Add padding in Dwarf_die.
2557
2558 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2559 * dwarf_attr.c: Likewise.
2560 * dwarf_begin.c: Likewise.
2561 * dwarf_begin_elf.c: Likewise.
2562 * dwarf_bitoffset.c: Likewise.
2563 * dwarf_bitsize.c: Likewise.
2564 * dwarf_bytesize.c: Likewise.
2565 * dwarf_diename.c: Likewise.
2566 * dwarf_formaddr.c: Likewise.
2567 * dwarf_formblock.c: Likewise.
2568 * dwarf_formref.c: Likewise.
2569 * dwarf_formstring.c: Likewise.
2570 * dwarf_formudata.c: Likewise.
2571 * dwarf_getarange_addr.c: Likewise.
2572 * dwarf_getarangeinfo.c: Likewise.
2573 * dwarf_getaranges.c: Likewise.
2574 * dwarf_getloclist.c: Likewise.
2575 * dwarf_getmacros.c: Likewise.
2576 * dwarf_getsrc_die.c: Likewise.
2577 * dwarf_getsrcfiles.c: Likewise.
2578 * dwarf_getsrclines.c: Likewise.
2579 * dwarf_highpc.c: Likewise.
2580 * dwarf_lowpc.c: Likewise.
2581 * dwarf_nextcu.c: Likewise.
2582 * dwarf_offdie.c: Likewise.
2583 * dwarf_siblingof.c: Likewise.
2584 * dwarf_srclang.c: Likewise.
2585 * dwarf_tag.c: Likewise.
2586 * libdw_findcu.c: Likewise.
2587 * libdwP.h: Add prototypes for internal functions.
2588
2589 * dwarf_addrdie.c: New file.
2590 * dwarf_macro_opcode.c: New file.
2591 * dwarf_macro_param1.c: New file.
2592 * dwarf_macro_param2.c: New file.
2593 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2594 * libdwP.h: Remove Dwarf_Macro definition.
2595 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2596 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2597 * libdw.map: Add entries for new functions.
2598
25992005-03-21 Ulrich Drepper <drepper@redhat.com>
2600
2601 * libdw.h: Handle broken gcc < 4.
2602
26032005-02-15 Ulrich Drepper <drepper@redhat.com>
2604
2605 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2606
2607 * dwarf_begin_elf.c: Fix warnings.
2608 * dwarf_dieoffset.c: Likewise.
2609 * dwarf_end.c: Likewise.
2610 * dwarf_error.c: Likewise.
2611 * dwarf_getpubnames.c: Likewise.
2612
2613 * libdwP.h: Add new error values.
2614 * dwarf_error.c: Support new error values.
2615 * dwarf_getpubnames.c: Check parameter value.
2616
26172005-02-05 Ulrich Drepper <drepper@redhat.com>
2618
2619 * Makefile.am: Check for text relocations in constructed DSO.
2620
2621 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2622
26232005-02-04 Ulrich Drepper <drepper@redhat.com>
2624
2625 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2626 checks to not read over buffer boundaries for ill-formed DWARF data.
2627
26282004-09-25 Ulrich Drepper <drepper@redhat.com>
2629
2630 * dwarf_child.c: Make compile with gcc 4.0.
2631 * dwarf_error.c: Likewise.
2632 * dwarf_formblock.c: Likewise.
2633 * dwarf_getabbrev.c: Likewise.
2634 * dwarf_getattrs.c: Likewise.
2635 * dwarf_getsrclines.c: Likewise.
2636 * dwarf_tag.c: Likewise.
2637 * libdw_form.c: Likewise.
2638
26392004-01-20 Ulrich Drepper <drepper@redhat.com>
2640
2641 * Makefile.am: Support building with mudflap.
2642
2643 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2644 * dwarf_getsrclines.c: Likewise.
2645 * dwarf_memory-access.h: Likewise.
2646
26472004-01-19 Ulrich Drepper <drepper@redhat.com>
2648
2649 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2650
2651 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2652 Third parameter of dwarf_getsrcfiles can be NULL.
2653
2654 * libdw.map: Add dwarf_getmacros.
2655 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2656 * dwarf_getmacros.c: New file.
2657
26582004-01-18 Ulrich Drepper <drepper@redhat.com>
2659
2660 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2661
2662 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2663
2664 * dwarf_getsrclines.c:
2665 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2666
2667 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2668
2669 * libdwP.h (_): Use elfutils domain.
2670
2671 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2672
2673 * dwarf_getsrclines.c: Fix typo in comment.
2674
26752004-01-17 Ulrich Drepper <drepper@redhat.com>
2676
2677 * Makefile.am: Support building with mudflap.
2678
26792004-01-16 Ulrich Drepper <drepper@redhat.com>
2680
2681 * memory-access.h: Add lots of const in case a pointer passed is const.
2682
2683 * dwarf_formflag.c: New file.
2684 * dwarf_getattrs.c: New file.
2685 * dwarf_error.c: Add new error value.
2686 * libdw.h: Add prototypes for new functions. Adjust prototype for
2687 dwarf_getpubnames.
2688 * libdw.map: Add new functions.
2689 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2690 to ptrdiff_t.
2691 * libdwP.h: Add new error value.
2692 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2693 dwarf_formflag.c.
2694
2695 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2696
26972004-01-12 Ulrich Drepper <drepper@redhat.com>
2698
2699 * dwarf_getarange_addr.c: New file
2700 * dwarf_getarangeinfo.c: New file.
2701 * dwarf_getaranges.c: New file.
2702 * dwarf_onerange.c: New file.
2703 * libdw.h: Declare new functions. Define Dwarf_Arange and
2704 Dwarf_Aranges.
2705 * libdw.map: Add new functions.
2706 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2707 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2708 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2709 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2710 * dwarf_error.c: Add new message.
2711
27122004-01-11 Ulrich Drepper <drepper@redhat.com>
2713
2714 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2715 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2716 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2717 * dwarf_error.c: Add another message.
2718 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2719 introduction.
2720 * dwarf_filesrc.c: Likewise.
2721 * dwarf_getsrcfiles.c: Likewise.
2722 * dwarf_getsrclines.c: Likewise.
2723 * dwarf_lineaddr.c: New file.
2724 * dwarf_linebeginstatement.c: New file.
2725 * dwarf_lineblock.c: New file.
2726 * dwarf_linecol.c: New file.
2727 * dwarf_lineendsequence.c: New file.
2728 * dwarf_lineepiloguebegin.c: New file.
2729 * dwarf_lineno.c: New file.
2730 * dwarf_lineprologueend.c: New file.
2731 * dwarf_onesrcline.c: New file.
2732 * dwarf_lineno.c: Change interface to store result in object pointed
2733 to by second parameter.
2734 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2735 prototype. Define Dwarf_Files and Dwarf_Lines.
2736 * libdw.map: Add new functions.
2737 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2738 * libdw_findcu.c: Don't initialize nlines field.
2739
2740 * dwarf_siblingof: Little optimization.
2741
2742 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2743 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2744 * libdwP.h (struct Dwarf): Add free_elf field.
2745
2746 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2747 dwarf_offabbrev.c.
2748 * dwarf_getstring.c: New file.
2749 * dwarf_offabbrev.c: New file.
2750 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2751 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2752 parameters. Don't allocate memory if not necessary and don't lookup
2753 previous results if no CU given.
2754 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2755 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2756 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2757 * libdwP.h: Change prototype for __libdw_getabbrev.
2758
2759 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2760 returning if this is wanted.
2761
27622004-01-09 Ulrich Drepper <drepper@redhat.com>
2763
2764 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2765 with offset_size value.
2766 * libdw.h: Adjust dwarf_nextcu prototype.
2767 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2768 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2769 member of new CU struct.
2770 * dwarf_formstring.c: Depend on offset_size not address_size for
2771 DW_FORM_strp handling.
2772 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2773
2774 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2775 failing lookup.
2776 (dwarf_tag): Correctly recognize failed lookup.
2777
2778 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2779 function noop_free.
2780 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2781 * dwarf_formblock.c: New file.
2782 * dwarf_getloclist.c: Rewrite to handle a single block.
2783 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2784 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2785 dwarf_getloclistent declaration.
2786 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2787 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2788 Add locs member to struct Dwarf_CU.
2789 * libdw_fundcu.c: Initialize locs member of new CU.
2790 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2791 Remove dwarf_getloclistent.c.
2792
27932004-01-07 Ulrich Drepper <drepper@redhat.com>
2794
2795 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2796 * libdwP.h: Likewise.
2797
2798 * dwarf_getloclist.c: New file.
2799 * dwarf_getloclistent.c: New file.
2800 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2801 Declare dwarf_getloclistent and dwarf_getloclist.
2802 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2803 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2804 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2805 dwarf_getloclist.c.
2806
2807 * dwarf_error.c: More error messages.
2808
28092004-01-06 Ulrich Drepper <drepper@redhat.com>
2810
2811 * dwarf_getsrclines.c: Remove debugging support.
2812
2813 * dwarf_getsrcfiles.c: New file.
2814 * dwarf_filesrc.c: New file.
2815 * libdw.h: Declare these functions. Define Dwarf_File.
2816 * libdwP.c: Adjust Dwarf_File_s definition.
2817 * libdw.map: Add these functions.
2818 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2819 dwarf_filesrc.c.
2820 * dwarf_getsrclines.c: Initialize cu->files.
2821
28222004-01-05 Ulrich Drepper <drepper@redhat.com>
2823
2824 * libdw.h: Add more nonnull function attributes.
2825
2826 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2827 * dwarf_end.c (cu_free): New function.
2828 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2829 * dwarf_error.c (errmsgs): Add new messages.
2830 * dwarf_getsrc_die.c: New file.
2831 * dwarf_getsrclines.c: New file.
2832 * dwarf_lineno.c: New file.
2833 * dwarf_linesrc.c: New file.
2834 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2835 instead of the *_inc-less variants.
2836 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
2837 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2838 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2839 and dwarf_linesrc.
2840 * libdwP.h: Add more error codes.
2841 (struct Dwarf): Remove mem_tail.next member.
2842 (Dwarf_File): Define type.
2843 (struct Dwarf_Line_s): Define type.
2844 (struct Dwarf_CU): Add lines and nlines members.
2845 (libdw_alloc): Define local variable _tail and use it.
2846 Add some function attributes.
2847 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2848 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2849 * memory-access.h: Add unlikely for the endian conversion paths.
2850 * Makefile.am (AM_CFLAGS): Add -std parameter.
2851 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2852 dwarf_lineno, and dwarf_linesrc.
2853
28542003-08-11 Ulrich Drepper <drepper@redhat.com>
2855
2856 * Moved to CVS archive.