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