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