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