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