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