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