Add configure --disable-textrelcheck option to enable CC=afl-fuzz on 32bit.
[platform/upstream/elfutils.git] / libdw / ChangeLog
1 2014-11-27  Mark Wielaard  <mjw@redhat.com>
2
3         * Makefile.am (libdw.so): Use textrel_check.
4
5 2014-11-27  Mark Wielaard  <mjw@redhat.com>
6
7         * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
8         search_table_entries and search_table_encoding.
9
10 2014-11-24  Mark Wielaard  <mjw@redhat.com>
11
12         * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
13         before usage.
14
15 2014-11-23  Mark Wielaard  <mjw@redhat.com>
16
17         * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
18         * dwarf_hasattr.c (dwarf_hasattr): Likewise.
19         * dwarf_siblingof.c (dwarf_siblingof): Likewise.
20
21 2014-11-23  Mark Wielaard  <mjw@redhat.com>
22
23         * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
24         Set libdw errno and return NULL.
25
26 2014-11-24  Mark Wielaard  <mjw@redhat.com>
27
28         * dwarf.h (DW_LANG_C_plus_plus_11): Added.
29         (DW_LANG_C11): Likewise.
30         (DW_LANG_C_plus_plus_14): Likewise.
31         * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
32         DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
33         lower bound.
34         * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
35         DW_LANG_C11.
36
37 2014-11-26  Mark Wielaard  <mjw@redhat.com>
38
39         * dwarf.h (DW_AT_noreturn): Added.
40
41 2014-11-11  Mark Wielaard  <mjw@redhat.com>
42
43         * dwarf_getsrclines.c (read_srclines): Do address_size comparison
44         explicitly as uint8_t.
45         (__libdw_getsrclines): Add internal_function to declaration.
46
47 2014-09-10  Petr Machata  <pmachata@redhat.com>
48
49         * dwarf_macro_getparamcnt.c: New file.
50         * dwarf_macro_param.c: New file.
51         * dwarf_macro_getsrcfiles.c: New file.
52         * Makefile.am (libdw_a_SOURCES): Add the new files.
53         * libdwP.h (struct files_lines_s): New structure.
54         (DWARF_E_INVALID_OPCODE): New enumerator.
55         (struct Dwarf): New fields macro_ops, files_lines.
56         (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
57         keeping macro opcode prototypes in.
58         (Dwarf_Macro_s): Redefine from scratch.
59         (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
60         internal interfaces.
61         * dwarf_error.c (errmsgs): Add a message for
62         DWARF_E_INVALID_OPCODE.
63         * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
64         files_lines.
65         * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
66         (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
67         interfaces.
68         * dwarf_getmacros.c (dwarf_getmacros_off): New function,
69         (get_offset_from, macro_op_compare, build_table)
70         (init_macinfo_table, get_macinfo_table, get_table_for_offset)
71         (cache_op_table, read_macros, gnu_macros_getmacros_off)
72         (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
73         functions.
74         (dwarf_getmacros): Adjust to dispatch to the new interfaces.
75         * dwarf_getsrclines.c (read_srclines): New function with guts
76         taken from dwarf_getsrclines.
77         (__libdw_getsrclines): Likewise.
78         (__libdw_getcompdir, files_lines_compare): New functions.
79         (dwarf_getsrclines): Make it dispatch to the new interfaces.
80         * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
81         the new interfaces.
82         * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
83         * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
84         dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
85
86 2014-10-06  Mark Wielaard  <mjw@redhat.com>
87
88         * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
89         * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
90         (aggregate_size): Likewise. Add old and new version.
91         * dwarf_peel_type.c: New file.
92         * libdw.h (dwarf_peel_type): New function declaration.
93         * libdwP.h (dwarf_peel_type): New internal declaration.
94         * libdw.map (ELFUTILS_0.161): New section.
95
96 2014-10-15  Petr Machata  <pmachata@redhat.com>
97
98         * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
99         * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
100
101 2014-10-05  Mark Wielaard  <mjw@redhat.com>
102
103         * dwarf.h: Add DW_AT_GNU_deleted.
104
105 2014-10-02  Mark Wielaard  <mjw@redhat.com>
106
107         * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
108         for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
109         DW_TAG_rvalue_reference_type.
110
111 2014-09-12  Petr Machata  <pmachata@redhat.com>
112
113         * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
114         8-byte quantities.  Consequently, rename to...
115         (read_addr_unaligned_inc): ... this.
116         (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
117         (read_sbyte_unaligned): Drop.
118
119 2014-09-10  Petr Machata  <pmachata@redhat.com>
120
121         * dwarf_getlocation.c (attr_ok): Also accept
122         DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
123         DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
124
125 2014-08-15  Mark Wielaard  <mjw@redhat.com>
126
127         * dwarf_cu_die.c: New file.
128         * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
129         * libdw.h (dwarf_cu_die): New function declaration.
130         * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
131
132 2014-08-15  Mark Wielaard  <mjw@redhat.com>
133
134         * dwarf_cu_getdwarf.c: New file.
135         * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
136         * libdw.h (Dwarf_CU): New typedef.
137         (dwarf_cu_getdwarf): New function declaration.
138         * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
139
140 2014-06-18  Mark Wielaard  <mjw@redhat.com>
141
142         * dwarf.h: Remove DW_TAG_mutable_type.
143
144 2014-05-02  Mark Wielaard  <mjw@redhat.com>
145
146         * libdwP.h (__check_build_id): Removed now unused.
147
148 2014-05-01  Mark Wielaard  <mjw@redhat.com>
149
150         * libdwP.h (struct Dwarf): Remove free_alt.
151         * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
152         * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
153
154 2014-04-30  Mark Wielaard  <mjw@redhat.com>
155
156         * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
157
158 2014-04-15  Florian Weimer  <fweimer@redhat.com>
159
160         * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
161         (open_debugaltlink): Move to libdwfl.
162         (check_section): Do not locate alternate debuginfo.
163
164 2014-04-24  Florian Weimer  <fweimer@redhat.com>
165
166         * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
167
168 2014-04-22  Florian Weimer  <fweimer@redhat.com>
169
170         * dwarf_getalt.c, dwarf_setalt.c: New files.
171         * Makefile.am (libdw_a_SOURCES): Add them.
172         * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
173         * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
174         declarations.
175         * libdw.map (ELFUTILS_0.159): Export the two new functions.
176
177 2014-04-15  Florian Weimer  <fweimer@redhat.com>
178
179         * libdwP.h (enum IDX_gnu_debugaltlink): New.
180         * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
181         .gnu_debugaltlink.
182         (check_section): Obtain .gnu_debugaltlink section from the
183         setiondata array.
184
185 2014-04-11  Mark Wielaard  <mjw@redhat.com>
186
187         * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
188         * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
189         (libdwelf_objects): New variable.
190         (libdw_a_LIBADD): Add libdwelf objects.
191
192 2014-04-22  Mark Wielaard  <mjw@redhat.com>
193
194         * memory-access.h (get_sleb128_step): Remove undefined behavior
195         of left shifting a signed value. Replace it with a multiplication.
196
197 2014-04-13  Mark Wielaard  <mjw@redhat.com>
198
199         * Makefile.am: Remove !MUDFLAP conditions.
200
201 2014-04-09  Mark Wielaard  <mjw@redhat.com>
202
203         * dwarf_begin_elf.c (check_section): Check for unsigned overflow
204         before calling malloc to uncompress data.
205
206 2014-03-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
207
208         Fix abort() on missing section headers.
209         * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
210         New label err to return NULL.
211
212 2014-02-05  Josh Stone  <jistone@redhat.com>
213
214         * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
215         * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
216         unsigned.  Change the range assert to DWARF_E_INVALID_DWARF.
217
218 2013-12-30  Mark Wielaard  <mjw@redhat.com>
219
220         * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
221         dwfl_linux_proc_attach.
222
223 2013-12-20  Mark Wielaard  <mjw@redhat.com>
224
225         * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
226
227 2013-12-18  Mark Wielaard  <mjw@redhat.com>
228
229         * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
230         dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
231         dwfl_module_getsym_info.
232
233 2013-12-16  Mark Wielaard  <mjw@redhat.com>
234
235         * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
236
237 2013-12-10  Josh Stone  <jistone@redhat.com>
238
239         * memory-access.h (get_uleb128_rest_return): Removed.
240         (get_sleb128_rest_return): Removed.
241         (get_uleb128_step): Make this a self-contained block.
242         (get_sleb128_step): Ditto, and use a bitfield to extend signs.
243         (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
244         (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
245         (__libdw_get_uleb128): Simplify and inline for all callers.
246         (__libdw_get_sleb128): Ditto.
247         * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
248         * memory-access.c: Delete file.
249         * Makefile.am (libdw_a_SOURCES): Remove it.
250         (DEFS): Remove the now unused -DIS_LIBDW.
251
252 2013-12-09  Josh Stone  <jistone@redhat.com>
253
254         * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
255         __libdw_form_val_len, now handling only non-constant form lengths.
256         * libdwP.h (__libdw_form_val_len): New inlined function.
257
258 2013-12-09  Mark Wielaard  <mjw@redhat.com>
259
260         * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
261         location expressions.
262         * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
263         location found, return empty location expression.
264         * dwarf_getlocation_implicit_pointer.c
265         (dwarf_getlocation_implicit_pointer): Likewise.
266         (__libdw_empty_loc_attr): New internal function.
267         * libdwP.h (__libdw_empty_loc_attr): Define.
268
269 2013-11-27  Mark Wielaard  <mjw@redhat.com>
270
271         * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
272         dwfl_module_getsym_elf.
273
274 2013-11-26  Mark Wielaard  <mjw@redhat.com>
275
276         * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
277         dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
278         dwfl_thread_state_registers, dwfl_thread_state_register_pc,
279         dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
280         (ELFUTILS_0.158): ... here.
281
282 2013-11-09  Mark Wielaard  <mjw@redhat.com>
283
284         * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
285         check that it is zero.
286
287 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
288
289         * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
290         * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
291         dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
292         dwfl_thread_state_registers, dwfl_thread_state_register_pc,
293         dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
294
295 2013-11-01  Michael Forney  <mforney@mforney.org>
296
297         * Makefile.am (libdwfl_objects): New definition.
298         (libdw_a_LIBADD): Use libdwfl_objects.
299
300 2013-11-01  Michael Forney  <mforney@mforney.org>
301
302         * Makefile.am: Use READELF.
303
304 2013-10-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
305
306         * libdw.map (ELFUTILS_0.158): New.
307
308 2013-10-10  Mark Wielaard  <mjw@redhat.com>
309
310         * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
311         start_addr and rename last_offset to last_addr. Now both void *.
312         (tree_visitor): Use start_add and die_addr instead of start_offset
313         and die_offset.
314         (dwarf_getfuncs): Use last_addr instead of last_offset.
315
316 2013-10-06  Mark Wielaard  <mjw@redhat.com>
317
318         * cfi.c (execute_cfi): Make sure DW_CFA_expression and
319         DW_CFA_val_expression are not used with abi_cfi.
320
321 2013-10-03  Josh Stone  <jistone@redhat.com>
322
323         * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
324         * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
325         a unit, make sure to always hash the sig8 here, so none are missed.
326
327 2013-09-29  Mark Wielaard  <mjw@redhat.com>
328
329         * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
330         uintptr_t before casting to char *.
331         (__libdw_intern_expression): Cast data to uintptr_t before casting
332         to Dwarf_Word.
333         * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
334         op->number2 to uintptr_t before casting to char *.
335
336 2013-09-24  Josh Stone  <jistone@redhat.com>
337
338         * libdw_visit_scopes.c (classify_die): Removed.
339         (may_have_scopes): New function to replace classify_die.  There's no
340         need for full classification; just find tags that may contain scopes.
341         (__libdw_visit_scopes): Use a direct tag comparison for imported
342         units, and use may_have_scopes to test if recursion is needed.
343
344 2013-09-20  Mark Wielaard  <mjw@redhat.com>
345
346         * dwarf_getfuncs.c (visitor_info): New struct.
347         (tree_visitor): New function.
348         (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
349         * libdw.h (dwarf_getfuncs): Expand function documentation.
350
351 2013-09-12  Mark Wielaard  <mjw@redhat.com>
352
353         * fde.c (intern_fde): Free fde and set libdw errno when start
354         or end could not be read.
355
356 2013-08-24  Mark Wielaard  <mjw@redhat.com>
357
358         * dwarf_getlocation.c (store_implicit_value): Don't take data
359         as argument, get block data from op number2. Return false when
360         block data length and op number don't match up.
361         (__libdw_intern_expression): Store start of block for
362         DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
363         relative data offset. Also store block start (including length)
364         for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
365         * dwarf_getlocation_attr.c: New file.
366         * dwarf_getlocation_die.c: Likewise.
367         * libdw.h (dwarf_getlocation_die): New function definition.
368         (dwarf_getlocation_attr): Likewise.
369         * libdwP.h: Declare internal dwarf_getlocation_die.
370         * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
371         dwarf_getlocation_attr.
372         * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
373         dwarf_getlocation_attr.c.
374
375 2013-08-23  Mark Wielaard  <mjw@redhat.com>
376
377         * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
378         (attr_base_address): New function.
379         (initial_offset_base): New function.
380         (getlocations_addr): New function. Taken from...
381         (dwarf_getlocation_addr): here. Use new initial_offset_base and
382         getlocations_addr.
383         (dwarf_getlocations): New function.
384         * libdw.h (dwarf_getlocations): New function definition.
385         * libdw.map (ELFUTILS_0.157): New.
386
387 2013-07-02  Mark Wielaard  <mjw@redhat.com>
388
389         * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
390         limit MAX_STACK_ALLOC.  After MAX_STACK_ALLOC lines use malloc in
391         NEW_LINE macro.  Free malloced line records if any at the end.
392
393 2013-07-02  Mark Wielaard  <mjw@redhat.com>
394
395         * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
396
397 2013-06-26  Mark Wielaard  <mjw@redhat.com>
398
399         * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
400         DIEs without children. Return an error whenever dwarf_child or
401         dwarf_siblingof return an error. Don't call recurse and increase
402         the depth for an imported unit. Walk the children of an imported
403         unit as if they are logical children of the parent root DIE.
404
405 2013-05-03  Mark Wielaard  <mjw@redhat.com>
406
407         * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
408         when nlinelist > 0.
409
410 2013-04-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
411
412         * libdw.map (ELFUTILS_0.156): New.
413
414 2013-04-24  Mark Wielaard  <mjw@redhat.com>
415
416         * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
417
418 2013-04-10  Mark Wielaard  <mjw@redhat.com>
419
420         * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
421         equal to address size when we have a DW_FORM_ref_addr for DWARF
422         version 2.
423
424 2013-03-25  Mark Wielaard  <mjw@redhat.com>
425
426         * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
427         end_sequence.
428
429 2013-03-12  Mark Wielaard  <mjw@redhat.com>
430
431         * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
432         * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
433
434 2013-02-15  Mark Wielaard  <mjw@redhat.com>
435
436         * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
437         not dbg->sectiondata.
438
439 2013-01-07  Roland McGrath  <roland@hack.frob.com>
440
441         * memory-access.h
442         [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
443         [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
444
445 2012-12-18  Mark Wielaard  <mjw@redhat.com>
446
447         * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
448         (check_section): Likewise on error.
449         (scngrp_read): Likewise.
450         (dwarf_begin_elf): Likewise.
451
452 2012-10-09  Petr Machata  <pmachata@redhat.com>
453
454         * dwarf_getlocation.c (__libdw_intern_expression): Handle
455         DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
456         DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
457         DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
458
459 2012-10-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
460
461         * cfi.c: New include system.h.
462         (execute_cfi) (enough_registers): Clear new memory after realloc.
463
464 2012-10-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
465
466         * fde.c (__libdw_find_fde): Change <fde != NULL> to likely.  Return
467         DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
468         searched PC.
469
470 2012-10-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
471
472         * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
473         loclist element DW_OP_call_frame_cfa before decoding the opcodes.
474         Remove the later DW_OP_call_frame_cfa push to RESULT.
475
476 2012-10-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
477
478         Code cleanup.
479         * fde.c (binary_search_fde): Remove always true <address >= start>
480         conditional.  Move L initialization upwards.
481
482 2012-08-24  Mark Wielaard  <mjw@redhat.com>
483
484         * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
485         when ENABLE_DWZ is defined.
486         * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
487         defined.
488
489 2012-08-16  Mark Wielaard  <mjw@redhat.com>
490
491         * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
492         * dwarf.h (DW_LANG_Go): Update comment.
493         (DW_LANG_Mips_Assembler): Likewise.
494
495 2012-06-27  Mark Wielaard  <mjw@redhat.com>
496
497         * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
498         * dwarf_begin.c (dwarf_begin): Add INTDEF.
499         * dwarf_begin_elf.c (__check_build_id): New internal_function.
500         (try_debugaltlink): New function.
501         (open_debugaltlink): Likewise.
502         (check_section): Try open_debugaltlink for .gnu_debugaltlink.
503         * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
504         necessary.
505         * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
506         * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
507         is an error here.
508         * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
509         * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
510         * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
511         calls.
512         * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
513         * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
514         (struct Dwarf): Add alt_dwarf and free_alt fields.
515         (__libdw_read_offset): Add dbg_ret argument, use to check with
516         __libdw_offset_in_section.
517         (__check_build_id): New function declaration.
518         (dwarf_begin): Define as INTDECL.
519         * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
520         and DW_FORM_GNU_strp_alt.
521
522 2012-07-19  Mark Wielaard  <mjw@redhat.com>
523
524         * dwarf.h: Add DW_OP_GNU_parameter_ref.
525
526 2012-07-24  Mark Wielaard  <mjw@redhat.com>
527
528         * dwarf.h: Correct spelling of DW_LANG_ObjC.
529         * dwarf_aggregate_size.c (array_size): Use correct spelling of
530         DW_LANG_ObjC.
531
532 2012-07-24  Mark Wielaard  <mjw@redhat.com>
533
534         * dwarf.h: Add DW_ATE_UTF.
535
536 2012-06-27  Mark Wielaard  <mjw@redhat.com>
537
538         * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
539
540 2012-06-26  Mark Wielaard  <mjw@redhat.com>
541
542         * libdwP.h: Add IDX_debug_macro.
543         * dwarf.h: Add DW_AT_GNU_macros.
544         * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
545         * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
546
547 2012-04-27  Mark Wielaard  <mjw@redhat.com>
548
549         * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
550         a constant offset from DW_AT_low_pc.
551
552 2012-03-19  Tom Tromey  <tromey@redhat.com>
553
554         * libdw_findcu.c (findcu_cb): Move earlier.
555         (__libdw_intern_next_unit): Add new CU to search tree here...
556         (__libdw_findcu): ... not here.
557
558 2012-01-31  Mark Wielaard  <mjw@redhat.com>
559
560         * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
561
562 2011-11-31  Mark Wielaard  <mjw@redhat.com>
563
564         * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
565
566 2011-07-14  Mark Wielaard  <mjw@redhat.com>
567
568         * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
569
570 2011-05-16  Jakub Jelinek  <jakub@redhat.com>
571
572         * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
573         DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
574         New.
575
576 2011-04-26  Mark Wielaard  <mjw@redhat.com>
577
578         * dwarf_child (dwarf_child): Sanity check end of section against
579         cu_data () of die->cu.
580
581 2011-03-22  Mark Wielaard  <mjw@redhat.com>
582
583         * dwarf.h: Add DW_TAG_GNU_call_site,
584         DW_TAG_GNU_call_site_parameter,
585         DW_AT_GNU_call_site_value,
586         DW_AT_GNU_call_site_data_value,
587         DW_AT_GNU_call_site_target,
588         DW_AT_GNU_call_site_target_clobbered,
589         DW_AT_GNU_tail_call,
590         DW_AT_GNU_all_tail_call_sites,
591         DW_AT_GNU_all_call_sites,
592         DW_AT_GNU_all_source_call_sites,
593         and DW_OP_GNU_entry_value.
594
595 2011-03-10  Petr Machata  <pmachata@redhat.com>
596
597         * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
598         abbreviation with code 0.
599
600 2011-03-09  Petr Machata  <pmachata@redhat.com>
601
602         * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
603
604 2011-02-23  Roland McGrath  <roland@redhat.com>
605
606         * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
607         Declare __libdw_free_zdata.
608         * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
609         (dwarf_end): Call it.
610
611         * dwarf_begin_elf.c (valid_p): Likewise.
612         (check_section, scngrp_read): Likewise.
613         (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
614
615 2010-10-13  Roland McGrath  <roland@redhat.com>
616
617         * dwarf.h: Add DW_LANG_Go.
618
619 2010-10-05  Roland McGrath  <roland@redhat.com>
620
621         * dwarf_getaranges.c: Use malloc rather than alloca,
622         since the total number of elements can be quite huge.
623
624 2010-07-26  Roland McGrath  <roland@redhat.com>
625
626         * dwarf_getlocation_implicit_pointer.c: New file.
627         * Makefile.am (libdw_a_SOURCES): Add it.
628         * libdw.map (ELFUTILS_0.149): New set.
629         Add dwarf_getlocation_implicit_pointer.
630         * libdw.h: Declare it.
631
632         * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
633         (dwarf_offdie, dwarf_offdie_types): Update callers.
634         * libdwP.h: Declare it.
635
636         * dwarf.h: Add DW_OP_GNU_implicit_pointer.
637         * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
638
639 2010-08-24  Roland McGrath  <roland@redhat.com>
640
641         * libdw.map (ELFUTILS_0.149): New set.  Add dwfl_dwarf_line.
642
643 2010-07-27  Roland McGrath  <roland@redhat.com>
644
645         * dwarf_formref_die.c: Fix sig8 hash insertion.
646
647 2010-06-23  Roland McGrath  <roland@redhat.com>
648
649         * cfi.c (dwarf_cfi_validate_fde): Function removed.
650         * libdw.h: Remove it.
651         * libdw.map: Likewise.
652
653 2010-06-22  Roland McGrath  <roland@redhat.com>
654
655         * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
656
657         * dwarf_getsrclines.c: Fix signed comparison warning in extended
658         opcode parsing.
659
660 2010-06-21  Roland McGrath  <roland@redhat.com>
661
662         * dwarf.h: Add DW_TAG_GNU_* constants.
663
664         * memory-access.h (get_sleb128_rest_return): Fix sign extension for
665         10-byte case.
666
667 2010-06-20  Roland McGrath  <roland@redhat.com>
668
669         * libdw_findcu.c (__libdw_findcu): Take new flag argument,
670         to search TUs instead of CUs.
671         * libdwP.h: Update decl.
672         (struct Dwarf): New member tu_tree.
673         * dwarf_end.c (dwarf_end): Clean up tu_tree.
674         * dwarf_offdie.c (do_offdie): New function, broken out of ...
675         (dwarf_offdie): ... here.
676         (dwarf_offdie_types): New function.
677         * libdw.h: Declare it.
678         * libdw.map (ELFUTILS_0.148): Add it.
679
680         * libdwP.h (CUDIE): Use cu_data.
681         * dwarf_formblock.c: Likewise.
682         * dwarf_formref_die.c: Likewise.
683         * dwarf_diecu.c: Use CUDIE macro.
684         * dwarf_formaddr.c: Use cu_sec_idx.
685
686 2010-06-16  Roland McGrath  <roland@redhat.com>
687
688         * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
689         we don't repeat a CU lookup we've already done.  Handle
690         DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
691
692         * libdw_findcu.c (__libdw_intern_next_unit): New function,
693         broken out of ...
694         (__libdw_findcu): ... here.  Call it.
695         * libdwP.h: Declare it.
696         (struct Dwarf): New member next_tu_offset.
697
698         * dwarf_sig8_hash.c: New file.
699         * dwarf_sig8_hash.h: New file.
700         * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
701         * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
702         defining NO_UNDEF.
703         * libdwP.h (struct Dwarf): New member sig8_hash.
704         * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
705         * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
706
707         * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
708         (dwarf_nextcu): ... here.  Call it.
709         * libdw.h: Declare it.
710         * libdwP.h: Add INTDECL.
711         * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
712         * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
713
714         * libdwP.h (cu_sec_idx, cu_data): New functions.
715         Use .debug_types when CU is a TU.
716         * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
717         * dwarf_siblingof.c: Likewise.
718         * dwarf_formstring.c: Likewise.
719         * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
720         * dwarf_getlocation.c (dwarf_getlocation): Likewise.
721         (dwarf_getlocation_addr): Likewise.
722
723         * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
724         (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
725         .debug_types header size instead of .debug_info header size.
726         (CUDIE): Use it.
727         * dwarf_diecu.c: Update caller.
728         * dwarf_getaranges.c: Likewise.
729         * dwarf_nextcu.c: Likewise.
730         * libdw_findcu.c (__libdw_findcu): Initialize new members.
731
732         * fde.c (fde_by_offset): Renamed to ...
733         (__libdw_fde_by_offset): ... this, made global and internal_function.
734         Don't take ADDRESS argument.
735         (__libdw_find_fde): Update caller.  Do address sanity check here.
736         * cfi.h: Declare __libdw_fde_by_offset.
737         * cfi.c (dwarf_cfi_validate_fde): New function.
738         * libdw.h: Declare it.
739         * libdw.map (ELFUTILS_0.148): Add it.
740
741         * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
742         either DW_EH_PE_udata8 or DW_EH_PE_udata4.
743
744         * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
745         Don't assume DW_EH_PE_aligned refers to native address size.
746
747         * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
748         address.
749
750 2010-06-17  Roland McGrath  <roland@redhat.com>
751
752         * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
753         op_index.
754         * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
755         into an inner inline function.  Set new fields.  Check all fields for
756         overflow when setting.
757         * dwarf_lineisa.c: New file.
758         * dwarf_linediscriminator.c: New file.
759         * dwarf_lineop_index.c: New file.
760         * Makefile.am (libdw_a_SOURCES): Add them.
761         * libdw.map (ELFUTILS_0.148): Add them.
762         * libdw.h: Declare them.
763
764 2010-06-16  Roland McGrath  <roland@redhat.com>
765
766         * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
767
768         * fde.c (fde_by_offset): Renamed to ...
769         (__libdw_fde_by_offset): ... this, made global and internal_function.
770         Don't take ADDRESS argument.
771         (__libdw_find_fde): Update caller.  Do address sanity check here.
772         * cfi.h: Declare __libdw_fde_by_offset.
773         * cfi.c (dwarf_cfi_validate_fde): New function.
774         * libdw.h: Declare it.
775         * libdw.map (ELFUTILS_0.148): Add it.
776
777         * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
778         either DW_EH_PE_udata8 or DW_EH_PE_udata4.
779
780         * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
781         Don't assume DW_EH_PE_aligned refers to native address size.
782
783         * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
784         address.
785
786 2010-06-15  Roland McGrath  <roland@redhat.com>
787
788         * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
789         DW_FORM_ref_addr.
790         * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
791         here, since we don't support it yet.
792
793         * dwarf_next_cfi.c: Handle version 4 format.
794
795         * dwarf_getsrclines.c: Handle version 4 format.
796
797 2010-06-01  Roland McGrath  <roland@redhat.com>
798
799         * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
800         * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
801
802         * libdwP.h (CIE_VERSION): Remove unused macro.
803
804         * dwarf_getsrclines.c: Fix version field test.
805         * libdwP.h (DWARF_VERSION): Remove useless macro.
806
807         * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
808
809         * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
810
811         * libdw_findcu.c (__libdw_findcu): Accept version 4.
812
813 2010-05-31  Mark Wielaard  <mjw@redhat.com>
814
815         * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
816         * libdw.h (dwarf_cfi_cie_p): ... here.
817
818 2010-05-31  Mark Wielaard  <mjw@redhat.com>
819
820         * dwarf.h: Fix DW_LANG_Python constant.
821
822 2010-05-28  Eduardo Santiago  <santiago@redhat.com>
823
824         * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
825         thing.
826
827 2010-05-27  Roland McGrath  <roland@redhat.com>
828
829         * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
830         DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
831
832 2010-05-08  Roland McGrath  <roland@redhat.com>
833
834         * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
835         REF_SIZE.  Use that to handle DW_OP_call_ref correctly.
836         (getlocation): Update caller.
837         * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
838         * dwarf_frame_register.c (dwarf_frame_register): Likewise.
839         * libdwP.h: Update decl.
840
841 2010-04-26  Roland McGrath  <roland@redhat.com>
842
843         * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
844         * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
845         DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
846         * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
847
848         * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
849         Prepend DW_OP_call_frame_cfa if true.
850         (getlocation): Update caller.
851         * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
852         * dwarf_frame_register.c (dwarf_frame_register): Likewise.
853         * libdwP.h: Update decl.
854
855 2010-04-22  Roland McGrath  <roland@redhat.com>
856
857         * cfi.c (execute_cfi): Never return without cleanup.
858         Free FS on failure.
859         (cie_cache_initial_state): Adjust caller to expect that free.
860         (__libdw_frame_at_address): Likewise.
861
862 2010-03-10  Roland McGrath  <roland@redhat.com>
863
864         * libdw.map (ELFUTILS_0.146): New set.  Add dwfl_core_file_report.
865
866 2010-02-15  Roland McGrath  <roland@redhat.com>
867
868         * Makefile.am: Use config/eu.am for common stuff.
869
870 2010-02-02  Mark Wielaard  <mjw@redhat.com>
871
872         * fde.c (intern_fde): Fix length check for sized_augmentation_data.
873
874 2010-01-07  Roland McGrath  <roland@redhat.com>
875
876         * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
877
878 2010-01-05  Roland McGrath  <roland@redhat.com>
879
880         * dwarf_aggregate_size.c: New file.
881         * Makefile.am (libdw_a_SOURCES): Add it.
882         * libdw.h: Declare it.
883         * libdwP.h: Add INTDECL.
884         * libdw.map (ELFUTILS_0.144): New set.  Add dwarf_aggregate_size.
885
886         * dwarf_srclang.c: Add INTDEF.
887         * libdwP.h: Add INTDECL.
888
889         * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
890
891         * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
892
893 2009-11-21  Roland McGrath  <roland@redhat.com>
894
895         * dwarf_getlocation.c (check_constant_offset): Return 1 for all
896         non-constant forms.
897
898 2009-10-15  Roland McGrath  <roland@redhat.com>
899
900         * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
901         DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
902
903 2009-09-17  Roland McGrath  <roland@redhat.com>
904
905         * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
906         argument a pointer to const.
907         * libdw.h: Update decl.
908
909 2009-09-10  Roland McGrath  <roland@redhat.com>
910
911         * dwarf_getlocation.c (store_implicit_value): New function.
912         (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
913         (dwarf_getlocation_implicit_value): New function.
914         * libdw.h: Declare it.
915         * libdw.map (ELFUTILS_0.143): Add it.
916
917 2009-09-09  Mark Wielaard  <mjw@redhat.com>
918
919         * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
920
921 2009-08-21  Josh Stone  <jistone@redhat.com>
922
923         * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
924
925 2009-08-10  Roland McGrath  <roland@redhat.com>
926
927         * dwarf_getscopevar.c: Use dwarf_diename.
928
929 2009-08-09  Roland McGrath  <roland@redhat.com>
930
931         * libdw.map (ELFUTILS_0.143): New version set,
932         inherits from ELFUTILS_0.142.
933         * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
934         alias in the ELFUTILS_0.122 version set and the default in the new set.
935         * dwarf_srclang.c: Likewise.
936         * dwarf_decl_file.c: Likewise.
937         * dwarf_decl_line.c: Likewise.
938         * dwarf_decl_column.c: Likewise.
939         * dwarf_bytesize.c: Likewise.
940         * dwarf_bitsize.c: Likewise.
941         * dwarf_bitoffset.c: Likewise.
942
943 2009-08-07  Roland McGrath  <roland@redhat.com>
944
945         * dwarf_arrayorder.c: Use dwarf_attr_integrate.
946         * dwarf_srclang.c: Likewise.
947         * dwarf_decl_file.c: Likewise.
948         * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
949         * dwarf_bytesize.c: Likewise.
950         * dwarf_bitsize.c: Likewise.
951         * dwarf_bitoffset.c: Likewise.
952
953 2009-07-22  Roland McGrath  <roland@redhat.com>
954
955         * dwarf_frame_cfa.c: Change calling convention.
956         * libdw.h: Update decl.
957
958         * dwarf_frame_register.c: Change calling/return-value convention for
959         value-only results and undefined/same_value.
960         * libdw.h: Update decl.
961
962         * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
963         argument, append DW_OP_stack_value if set.  Don't take NOPS argument,
964         return that value instead.
965         (getlocation): Update caller.
966         * dwarf_frame_cfa.c: Likewise.
967         * libdwP.h: Update decl.
968
969 2009-07-21  Roland McGrath  <roland@redhat.com>
970
971         * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
972         Fix loop iteration after skipping a bogus or useless CU.
973
974         * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
975         absence, not DWARF_E_NO_DEBUG_LINE.
976
977 2009-07-20  Roland McGrath  <roland@redhat.com>
978
979         * dwarf_getlocation.c (__libdw_intern_expression):
980         Handle DW_OP_stack_value.
981
982 2009-07-16  Roland McGrath  <roland@redhat.com>
983
984         * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
985         reject others when CU's version > 3.
986
987         * dwarf_formflag.c: Handle DW_FORM_flag_present.
988
989         * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
990         Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
991         Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
992         and DW_AT_const_expr.
993         Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
994         and DW_FORM_ref_sig8.
995
996 2009-07-15  Roland McGrath  <roland@redhat.com>
997
998         * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
999         DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1000
1001 2009-07-13  Roland McGrath  <roland@redhat.com>
1002
1003         * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1004
1005 2009-07-08  Roland McGrath  <roland@redhat.com>
1006
1007         * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1008         dwfl_module_eh_cfi.
1009
1010         * libdwP.h (struct Dwarf): Add member `cfi'.
1011         * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1012         * dwarf_getcfi.c: New file.
1013         * dwarf_getcfi_elf.c: New file.
1014         * dwarf_cfi_end.c: New file.
1015         * dwarf_cfi_addrframe.c: New file.
1016         * dwarf_frame_cfa.c: New file.
1017         * dwarf_frame_register.c: New file.
1018         * dwarf_frame_return_address_register.c: New file.
1019         * Makefile.am (libdw_a_SOURCES): Add them.
1020         * unwind.h: Declare those functions.
1021         * libdw.map (ELFUTILS_0.142): Export them.
1022
1023         * dwarf_getlocation.c (__libdw_intern_expression): New function,
1024         broken out of ...
1025         (getlocation): ... here, call it.
1026         * libdwP.h: Declare it.
1027
1028         * cie.c: New file.
1029         * fde.c: New file.
1030         * frame-cache.c: New file.
1031         * cfi.c: New file.
1032         * cfi.h: New file.
1033         * encoded-value.h: New file.
1034         * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1035         * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1036         * dwarf_error.c (errmsgs): Add element for it.
1037
1038         * dwarf_next_cfi.c: New file.
1039         * Makefile.am (libdw_a_SOURCES): Add it.
1040         * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1041         Declare dwarf_next_cfi.
1042         * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1043         Add dwarf_next_cfi.
1044
1045         * memory-access.h [! ALLOW_UNALIGNED]
1046         (read_2ubyte_unaligned): Renamed to ...
1047         (read_2ubyte_unaligned_1): ... this.  Take bool rather than Dwarf *.
1048         (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1049         (read_2sbyte_unaligned): Likewise.
1050         (read_4ubyte_unaligned): Likewise.
1051         (read_4sbyte_unaligned): Likewise.
1052         (read_8ubyte_unaligned): Likewise.
1053         (read_8sbyte_unaligned): Likewise.
1054
1055         * libdwP.h (IDX_eh_frame): Remove it.
1056         * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1057
1058 2009-07-08  Roland McGrath  <roland@redhat.com>
1059
1060         * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1061
1062         * dwarf_getlocation.c (check_constant_offset): New function.
1063         (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1064         handle DW_AT_data_member_location of data[48] as constant offset.
1065
1066 2009-06-18  Roland McGrath  <roland@redhat.com>
1067
1068         * libdwP.h (__libdw_read_address_inc): Constify.
1069         (__libdw_read_offset_inc): Likewise.
1070         * dwarf_getaranges.c: Likewise.
1071         * dwarf_getlocation.c: Likewise.
1072         * dwarf_getsrclines.c: Likewise.
1073         * dwarf_nextcu.c: Likewise.
1074
1075 2009-05-05  Petr Machata  <pmachata@redhat.com>
1076
1077         * libdwP.h (__libdw_formptr): Declare new function.
1078         * dwarf_formudata.c: Implement it here.
1079         * dwarf_getlocation.c (dwarf_getlocation_addr):
1080         Call it instead of hand-rolled offset handling code.
1081         * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1082         * dwarf_ranges.c (dwarf_ranges): Likewise.
1083
1084 2009-05-04  Petr Machata  <pmachata@redhat.com>
1085
1086         * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1087         * dwarf_ranges.c: Implement it here.
1088         (dwarf_ranges): Call it.
1089         * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1090
1091 2009-04-23  Petr Machata  <pmachata@redhat.com>
1092
1093         * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1094         of read_*ubyte_unaligned.
1095         * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1096         * dwarf_formstring.c (dwarf_formstring): Likewise.
1097         * dwarf_formudate.c (dwarf_formudata): Likewise.
1098         * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1099         * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
1100         * dwarf_getpubnames.c (get_offsets): Likewise.
1101         * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1102
1103 2009-04-23  Petr Machata  <pmachata@redhat.com>
1104
1105         * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1106         __libdw_read_addr, __libdw_read_off): Add four new internal
1107         functions.
1108
1109 2009-05-07  Roland McGrath  <roland@redhat.com>
1110
1111         * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1112         return value and OFFSET argument, not CU-relative.  Only fetch the
1113         attribute data when called with OFFSET of 0.
1114
1115 2009-05-07  Petr Machata  <pmachata@redhat.com>
1116
1117         * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1118         DW_AT_macro_info attribute of CU DIE.
1119
1120 2009-04-15  Roland McGrath  <roland@redhat.com>
1121
1122         * dwarf.h (DW_CIE_ID): Removed.
1123         (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
1124
1125 2009-04-01  Roland McGrath  <roland@redhat.com>
1126
1127         * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1128
1129 2009-01-28  Roland McGrath  <roland@redhat.com>
1130
1131         * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1132         defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
1133
1134         * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1135
1136 2009-01-26  Roland McGrath  <roland@redhat.com>
1137
1138         * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
1139
1140 2009-01-25  Roland McGrath  <roland@redhat.com>
1141
1142         * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1143
1144 2009-01-23  Roland McGrath  <roland@redhat.com>
1145
1146         * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1147         Put these rules under if MAINTAINER_MODE.
1148
1149 2009-01-22  Roland McGrath  <roland@redhat.com>
1150
1151         * dwarf.h: Add DW_OP_GNU_encoded_addr.
1152
1153 2009-01-21  Roland McGrath  <roland@redhat.com>
1154
1155         * Makefile.am (CLEANFILES): Renamed to ...
1156         (MOSTLYCLEANFILES): ... here.
1157         (CLEANFILES): New variable, add known-dwarf.h.
1158
1159 2009-01-17  Roland McGrath  <roland@redhat.com>
1160
1161         * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
1162         Make it unconditional.
1163         (BUILT_SOURCES): Updated.
1164
1165         * dwarf.h: Add description comments for DW_LANG_* values.
1166
1167         * Makefile.am [MAINTAINER_MODE]
1168         ($(srcdir)/known-dwarf.h): New target.
1169         (BUILT_SOURCES): Add it.
1170
1171         * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
1172
1173 2009-01-10  Ulrich Drepper  <drepper@redhat.com>
1174
1175         * dwarf_error.c: Always use __thread.  Remove all !USE_TLS code.
1176
1177 2009-01-08  Roland McGrath  <roland@redhat.com>
1178
1179         * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1180
1181 2008-01-06  Roland McGrath  <roland@redhat.com>
1182
1183         * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1184         Reorder members.
1185         * dwarf_haschildren.c: Return -1 for error case, not 0.
1186
1187         * Makefile.am (libdw.so): Link in $(zip_LIBS).
1188
1189 2009-01-06  Ulrich Drepper  <drepper@redhat.com>
1190
1191         * dwarf.h: Add definition for unwind and call frame information.
1192
1193         * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
1194         read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1195
1196 2008-08-15  Roland McGrath  <roland@redhat.com>
1197
1198         * libdw.map (ELFUTILS_0.136): New version set, inherits from
1199         ELFUTILS_0.130.  Add dwfl_addrsegment, dwfl_report_segment.
1200
1201 2008-01-21  Ulrich Drepper  <drepper@redhat.com>
1202
1203         * dwarf_child.c: Minor optimizations.
1204         * dwarf_getattrs.c: Likewise.
1205         * dwarf_getpubnames.c: Likewise.
1206         * dwarf_siblingof.c: Likewise.
1207         * dwarf_tag.c: Likewise.
1208
1209 2008-01-18  Ulrich Drepper  <drepper@redhat.com>
1210
1211         * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1212         of DWARF_VERSION comparison, just fail if the file's version is newer.
1213
1214 2008-01-17  Nick Clifton  <nickc@redhat.com>
1215
1216         * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1217         (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1218         (DWARF3_LENGTH_64_BIT): New define.
1219         * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1220         * dwarf_getpubnames: Include dwarf.h.
1221         (get_offsets): Use the new definitions.
1222         * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1223         * dwarf_nextcu.c: Include dwarf.h.  Correct comment.
1224         (dwarf_nextcu): Use the new definitions.
1225
1226         * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1227         * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1228         * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1229         * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1230
1231         * dwarf_getpubnames (get_offsets): Replace assertion with test and
1232         error return.
1233
1234         * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1235
1236         * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1237         Set the address in the return structure to the address of the next
1238         non-sibling die, if there is no sibling and the return pointer is
1239         not the same as the die pointer.
1240         * libdw.h: Expand the description of the dwarf_siblingof prototype.
1241
1242         * dwarf_child.c: Fix typo in comment.
1243
1244         * libdwP.h (DWARF_VERSION): Change to 3.
1245
1246         * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1247         not have a initialised valp pointer.
1248
1249         * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1250         the end of the attributes is reached.  When the callback fails,
1251         return the address of the failing attribute, not the address of
1252         its successor.
1253         * libdw.h: Expand the description of the dwarf_getattrs prototype.
1254
1255         * dwarf_child.c (__libdw_find_attr): Use the new definition.
1256         (dwarf_child): Likewise.
1257         * dwarf_tag.c (__libdw_findabbrev): Likewise.
1258         (dwarf_tag): Likewise.
1259
1260 2008-01-08  Roland McGrath  <roland@redhat.com>
1261
1262         * Makefile.am (euinclude): Variable removed.
1263         (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1264         (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
1265
1266 2007-10-17  Roland McGrath  <roland@redhat.com>
1267
1268         * libdw.h (__deprecated_attribute__): New macro.
1269         (dwarf_formref): Mark it deprecated.
1270         * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1271         (dwarf_formref): ... here.  Call it.  Remove INTDEF.
1272         * libdwP.h: Remove INTDECL.
1273         Declare __libdw_formref.
1274         * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1275         * dwarf_formref_die.c: Likewise.  Handle DW_FORM_ref_addr here.
1276
1277         * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1278         needs to check CU->version.
1279
1280         * libdwP.h (struct Dwarf_CU): New member `version'.
1281         * libdw_findcu.c (__libdw_findcu): Initialize it.
1282
1283         * dwarf_child.c: Return 1 for null entry as first child.
1284
1285 2007-10-05  Roland McGrath  <roland@redhat.com>
1286
1287         * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1288
1289         * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1290         [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1291
1292 2007-10-03  Roland McGrath  <roland@redhat.com>
1293
1294         * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1295         and dwfl_build_id_find_debuginfo.
1296
1297         * libdw.map (ELFUTILS_0.130): New version set, inherits from
1298         ELFUTILS_0.127.  Add dwfl_module_build_id, dwfl_module_report_build_id.
1299
1300 2007-10-02  Roland McGrath  <roland@redhat.com>
1301
1302         * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1303         structure_type.
1304
1305 2007-08-07  Roland McGrath  <roland@redhat.com>
1306
1307         * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1308         error code is DWARF_E_NOERROR (0).
1309
1310         * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1311         Fix typo in __libdw_visit_scopes argument.
1312
1313         * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1314         swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1315
1316 2007-07-03  Roland McGrath  <roland@redhat.com>
1317
1318         * libdw.h (__extern_inline): New macro.
1319         [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1320
1321 2007-04-16  Roland McGrath  <roland@redhat.com>
1322
1323         * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1324
1325 2007-04-05  Roland McGrath  <roland@redhat.com>
1326
1327         * dwarf_getsrcdirs.c: New file.
1328         * Makefile.am (libdw_a_SOURCES): Add it.
1329         * libdw.h: Declare dwarf_getsrcdirs.
1330         * libdw.map (ELFUTILS_0.127): Add it.
1331
1332         * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1333         * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1334         zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1335         Save DIRARRAY in the Dwarf_Files.
1336
1337         * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
1338         address to check for all-ones base address entry.  Check directly.
1339         Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1340
1341 2007-03-25  Roland McGrath  <roland@redhat.com>
1342
1343         * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1344         Return NULL when freeing RESULT on error.
1345         (global_read, scngrp_read): Check return value from check_section,
1346         break out of loop after it has freed RESULT.
1347         (valid_p): Handle null argument.
1348
1349 2007-03-12  Roland McGrath  <roland@redhat.com>
1350
1351         * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1352
1353 2007-03-04  Roland McGrath  <roland@redhat.com>
1354
1355         * libdw.map (ELFUTILS_0.127): New version set, inherits from
1356         ELFUTILS_0.126.  Add dwfl_module_addrsym.
1357
1358 2007-02-10  Roland McGrath  <roland@redhat.com>
1359
1360         * dwarf.h (DW_OP_fbreg): Comment fix.
1361
1362 2007-02-03  Roland McGrath  <roland@redhat.com>
1363
1364         * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1365         * libdw.map (ELFUTILS_0.126): New version set, inherits from
1366         ELFUTILS_0.122.  Move dwarf_getelf there; it was never truly
1367         exported in the past.
1368
1369 2006-12-17  Roland McGrath  <roland@redhat.com>
1370
1371         * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1372         address when the CU is missing attributes due to buggy GCC.
1373
1374 2006-08-29  Roland McGrath  <roland@redhat.com>
1375
1376         * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1377
1378         * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1379         (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1380
1381         * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1382         result is aligned.  Adjust NEWP->remaining here for this allocation.
1383         * libdwP.h: Update decl.
1384         (libdw_alloc): Update caller.
1385
1386 2006-07-12  Ulrich Drepper  <drepper@redhat.com>
1387
1388         * dwarf_child.c: Adjust for internal_function_def removal.
1389         * dwarf_getabbrev.c: Likewise.
1390         * dwarf_tag.c: Likewise.
1391         * libdw_form.c: Likewise.
1392         * memory-access.c: Likewise.
1393
1394 2006-06-28  Roland McGrath  <roland@redhat.com>
1395
1396         * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1397
1398         * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1399         dwfl_module_getsym.
1400
1401 2006-05-27  Ulrich Drepper  <drepper@redhat.com>
1402
1403         * libdw.h: Add extern "C".
1404
1405 2006-05-22  Ulrich Drepper  <drepper@redhat.com>
1406
1407         * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1408         aranges information.
1409
1410 2006-05-21  Ulrich Drepper  <drepper@redhat.com>
1411
1412         * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1413         dwarf_haschildren.
1414
1415 2006-02-28  Roland McGrath  <roland@redhat.com>
1416
1417         * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1418         DW_OP_* values, to match DWARF 3.0.  Add new DW_DS_*, DW_END_*
1419         values from DWARF 3.0.
1420
1421 2006-02-22  Roland McGrath  <roland@redhat.com>
1422
1423         * libdw.map: Bump to 0.120; export dwfl_version.
1424
1425 2005-12-22  Roland McGrath  <roland@redhat.com>
1426
1427         * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1428
1429 2005-12-12  Roland McGrath  <roland@redhat.com>
1430
1431         * dwarf_ranges.c: Copy CU base address-finding code from
1432         dwarf_getlocation.
1433
1434 2005-12-09  Roland McGrath  <roland@redhat.com>
1435
1436         * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1437         Delay CU base lookup until it's needed.
1438         If CU base lookup fails with no error, flag invalid DWARF.
1439
1440 2005-11-25  Roland McGrath  <roland@redhat.com>
1441
1442         * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1443
1444 2005-11-15  Roland McGrath  <roland@redhat.com>
1445
1446         * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1447
1448 2005-11-13  Roland McGrath  <roland@redhat.com>
1449
1450         * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1451
1452 2005-10-27  Roland McGrath  <roland@redhat.com>
1453
1454         * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1455         don't match end_sequence markers.
1456
1457         * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1458         before normal records at the same address.
1459         * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1460         marker.
1461
1462 2005-10-26  Roland McGrath  <roland@redhat.com>
1463
1464         * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1465         * dwarf_func_file.c: Renamed to ...
1466         * dwarf_decl_file.c: ... here.
1467         * dwarf_func_col.c: Renamed to ...
1468         * dwarf_decl_column.c: ... here.
1469         * dwarf_func_line.c: Renamed to ...
1470         * dwarf_decl_line.c: ... here.
1471         (dwarf_func_line): Renamed to ...
1472         (dwarf_decl_line): ... this.  Take a Dwarf_Die * argument.
1473         (__libdw_func_intval): Renamed __libdw_attr_intval.
1474         * dwarf_func_name.c: File removed.
1475         * dwarf_func_lowpc.c: File removed.
1476         * dwarf_func_highpc.c: File removed.
1477         * dwarf_func_entrypc.c: File removed.
1478         * dwarf_func_die.c: File removed.
1479         * Makefile.am (libdw_a_SOURCES): Updated.
1480         * libdw.h: Update decls.
1481         (Dwarf_Func): Type removed.
1482         * libdwP.h: Update decls.
1483         (struct Dwarf_Func_s): Type removed.
1484         * libdw.map: Updated.
1485
1486         * libdwP.h (CUDIE): New macro.
1487         * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1488         * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1489         * dwarf_ranges.c (dwarf_ranges): Likewise.
1490
1491         * dwarf_getloclist.c: Renamed to ...
1492         * dwarf_getlocation.c: ... here.
1493         (getloclist): Renamed to getlocation.
1494         (dwarf_getloclist): Renamed to dwarf_getlocation.
1495         (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1496         * Makefile.am (libdw_a_SOURCES): Updated.
1497         * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1498         (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1499         (Dwarf_Loc): Renamed Dwarf_Op.
1500         * libdwP.h (struct loc_s): Update use.
1501         * libdw.map: Update map.
1502
1503         * dwarf_entry_breakpoints.c: Use the second line record within the
1504         function, regardless of its source location data.
1505
1506 2005-10-25  Roland McGrath  <roland@redhat.com>
1507
1508         * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1509
1510         * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1511
1512 2005-10-14  Roland McGrath  <roland@redhat.com>
1513
1514         * dwarf_diecu.c (dwarf_diecu): New file.
1515         * Makefile.am (libdw_a_SOURCES): Add it.
1516         * libdw.h: Declare dwarf_diecu.
1517         * libdw.map: Export it.
1518
1519         * libdw.map: Bump to 0.116; export dwarf_ranges.
1520
1521 2005-09-20  Roland McGrath  <roland@redhat.com>
1522
1523         * dwarf_haspc.c: Use dwarf_ranges.
1524         * dwarf_entry_breakpoints.c: Likewise.
1525
1526         * dwarf_ranges.c: New file.
1527         * Makefile.am (libdw_a_SOURCES): Add it.
1528         * libdw.h: Declare dwarf_ranges.
1529         * libdwP.h: Add INTDECL.
1530
1531 2005-09-14  Roland McGrath  <roland@redhat.com>
1532
1533         * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1534         prologue_end marker scanning loop.
1535
1536 2005-09-11  Roland McGrath  <roland@redhat.com>
1537
1538         * dwarf.h: Comment typo fix.
1539
1540 2005-09-07  Roland McGrath  <roland@redhat.com>
1541
1542         * dwarf_entry_breakpoints.c: New file.
1543         * Makefile.am (libdw_a_SOURCES): Add it.
1544         * libdw.h: Declare dwarf_entry_breakpoints.
1545
1546         * dwarf_entrypc.c: New file.
1547         * Makefile.am (libdw_a_SOURCES): Add it.
1548         * libdw.h: Declare dwarf_entrypc.
1549         * libdwP.h: Add INTDECL.
1550
1551 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
1552
1553         * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1554         (%.os): Use COMPILE.os.
1555         (COMPILE.os): Filter out gconv options.
1556
1557 2005-08-27  Roland McGrath  <roland@redhat.com>
1558
1559         * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1560         __libdw_visit_scopes.
1561
1562         * dwarf_getscopes_die.c: New file.
1563         * Makefile.am (libdw_a_SOURCES): Add it.
1564         * libdw.h: Declare dwarf_getscopes_die.
1565         * libdw.map: Bump to 0.115 and add it.
1566
1567         * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1568         containing a DIE and its parent pointer, instead of just Dwarf_Die.
1569         Take two functions for both preorder and postorder visitors.
1570         * libdwP.h: Update decl.
1571         (struct Dwarf_Die_Chain): New type.
1572         * dwarf_func_inline.c: Update uses.
1573
1574         * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1575         Add INTDEF.
1576         * libdwP.h: Add INTDECL.
1577         * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1578
1579 2005-08-23  Roland McGrath  <roland@redhat.com>
1580
1581         * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1582         DW_AT_specification the same as DW_AT_abstract_origin.
1583
1584 2005-08-20  Roland McGrath  <roland@redhat.com>
1585
1586         * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1587         Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1588         and dwfl_report_offline.
1589
1590 2005-08-19  Roland McGrath  <roland@redhat.com>
1591
1592         * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
1593         Add dwfl_module_relocate_address, dwfl_module_relocations,
1594         dwfl_module_relocation_info.
1595
1596 2005-08-18  Roland McGrath  <roland@redhat.com>
1597
1598         * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
1599         outermost scope in the results.
1600
1601 2005-08-15  Roland McGrath  <roland@redhat.com>
1602
1603         * dwarf_func_inline.c: New file.
1604         * Makefile.am (libdw_a_SOURCES): Add it.
1605         * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
1606         * libdw.map: Add them.
1607
1608         * dwarf_func_die.c: New file.
1609         * Makefile.am (libdw_a_SOURCES): Add it.
1610         * libdw.h: Declare dwarf_func_die.
1611         * libdw.map: Add it.  Bump version to ELFUTILS_0.114.
1612
1613 2005-08-10  Ulrich Drepper  <drepper@redhat.com>
1614
1615         * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
1616         of DW_LNS_set_epilog_begin.
1617
1618 2005-08-09  Roland McGrath  <roland@redhat.com>
1619
1620         * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
1621
1622         * dwarf_end.c: Add INTDEF.
1623         * dwarf_error.c (dwarf_errmsg): Likewise.
1624         * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
1625
1626 2005-08-01  Roland McGrath  <roland@redhat.com>
1627
1628         * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
1629         * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1630
1631 2005-07-28  Ulrich Drepper  <drepper@redhat.com>
1632
1633         * Makefile.am (libdw.so): No need to link with libeu.a anymore.
1634         (libdw_a_LIBADD): Add all files from libdwfl.a.
1635
1636 2005-07-27  Roland McGrath  <roland@redhat.com>
1637
1638         * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
1639         along with ../libebl/libebl.a and ../lib/libeu.a;
1640         depend on ../libelf/libelf.so.
1641         (libdw_so_LDADD): New variable.
1642         * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
1643
1644         * libdw.map: Define an empty base version and move all symbols to
1645         version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
1646
1647 2005-07-23  Ulrich Drepper  <drepper@redhat.com>
1648
1649         * dwarf_error.c: Add internal alias for dwarf_errno.
1650         * libdwP.h: Declare __dwarf_errno_internal.
1651         * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
1652
1653         * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
1654         global_error.
1655
1656 2005-06-01  Roland McGrath  <roland@redhat.com>
1657
1658         * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
1659         * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
1660
1661 2005-06-08  Roland McGrath  <roland@redhat.com>
1662
1663         * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
1664         (get_sleb128_step, get_sleb128): Likewise.
1665         * dwarf_getattrs.c (dwarf_getattrs): Add consts.
1666         * dwarf_getloclist.c (getloclist): Likewise.
1667         * dwarf_formblock.c (dwarf_formblock): Likewise.
1668         * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1669         * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
1670         * dwarf_formref.c (dwarf_formref): Likewise.
1671         * dwarf_formsdata.c (dwarf_formsdata): Likewise.
1672         * dwarf_formudata.c (dwarf_formudata): Likewise.
1673         * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1674         * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
1675         * dwarf_tag.c (dwarf_tag): Likewise.
1676         * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1677         * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
1678         * libdw_form.c (__libdw_form_val_len): Likewise.
1679         * libdwP.h: Update decl.
1680
1681 2005-06-04  Roland McGrath  <roland@redhat.com>
1682
1683         * memory-access.h (get_uleb128_rest_return): New macro.
1684         [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
1685         (get_sleb128_rest_return): New macro.
1686         [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
1687         * memory-access.c: New file.
1688         * Makefile.am (libdw_a_SOURCES): Add it.
1689         (DEFS): Add -DIS_LIBDW.
1690
1691 2005-05-31  Roland McGrath  <roland@redhat.com>
1692
1693         * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
1694         formref offset.
1695
1696 2005-05-30  Roland McGrath  <roland@redhat.com>
1697
1698         * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
1699         address if DW_AT_low_pc is missing.  Not to spec, but GCC generates it.
1700
1701         * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
1702         BEGIN value.  Instead, match base address entries separately for
1703         32/64 size cases.
1704
1705 2005-05-28  Roland McGrath  <roland@redhat.com>
1706
1707         * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
1708         past location expression contents.
1709
1710 2005-05-23  Roland McGrath  <roland@redhat.com>
1711
1712         * dwarf_getsrclines.c: Comment typo fix.
1713
1714         * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
1715         * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
1716
1717 2005-05-22  Ulrich Drepper  <drepper@redhat.com>
1718
1719         * libdwP.h: Only use INTDECL for alias prototypes.
1720
1721 2005-05-19  Roland McGrath  <roland@redhat.com>
1722
1723         * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
1724
1725         * dwarf_getscopevar.c: New file.
1726         * Makefile.am (libdw_a_SOURCES): Add it.
1727         * libdw.h: Declare dwarf_getscopevar.
1728
1729         * dwarf_getsrcfiles.c: Add INTDEF.
1730         * dwarf_haschildren.c: Likewise.
1731         * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
1732
1733         * dwarf_getscopes.c: New file.
1734         * Makefile.am (libdw_a_SOURCES): Add it.
1735         * libdw.h: Declare dwarf_getscopes.
1736         * libdw.map: Add it.
1737
1738 2005-05-18  Roland McGrath  <roland@redhat.com>
1739
1740         * libdwP.h (IDX_debug_ranges): New enum constant.
1741         * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
1742         * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
1743         * dwarf_error.c (errmsgs): Add it.
1744         * dwarf_haspc.c: New file.
1745         * libdw.h: Declare dwarf_haspc.
1746         * libdw.map: Add it.
1747         * libdwP.h: Add INTDECL.
1748
1749         * dwarf_attr_integrate.c: New file.
1750         * dwarf_hasattr_integrate.c: New file.
1751         * Makefile.am (libdw_a_SOURCES): Add them.
1752         * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
1753         * libdw.map: Add them.
1754
1755         * dwarf_hasattr.c: Add INTDEF.
1756         * libdwP.h: Add INTDECL for it.
1757
1758         * dwarf_formref_die.c: New file.
1759         * Makefile.am (libdw_a_SOURCES): Add it.
1760         * libdw.h (dwarf_formref_die): Declare it.
1761         * libdwP.h (dwarf_formref_die): Add INTDECL.
1762         * libdw.map: Add it.
1763
1764         * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
1765         of ...
1766         (dwarf_getloclist): ... here.  Call them.
1767         (dwarf_addrloclists): New function.
1768         * libdw.h: Declare it.
1769         * libdw.map: Add it.
1770
1771         * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
1772         DW_MACINFO_end_file.  Recognize type 0 as terminator.
1773
1774 2005-05-05  Roland McGrath  <roland@redhat.com>
1775
1776         * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
1777
1778         * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
1779         the line program does not produce all entries in ascending order.
1780
1781 2005-04-25  Ulrich Drepper  <drepper@redhat.com>
1782
1783         * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
1784         occurences (e.g., inlines) better.
1785
1786 2005-04-24  Ulrich Drepper  <drepper@redhat.com>
1787
1788         * libdw.h (DWARF_END_ABBREV): Define.
1789         * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
1790         end is reached.
1791         * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
1792         of records reached.
1793         * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
1794         as error of __libdw_getabbrev.
1795
1796 2005-04-04  Ulrich Drepper  <drepper@redhat.com>
1797
1798         * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
1799
1800         * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
1801         results back to caller.
1802
1803 2005-04-04  Roland McGrath  <roland@redhat.com>
1804
1805         * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
1806
1807         * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
1808         defn.
1809
1810 2005-04-04  Ulrich Drepper  <drepper@redhat.com>
1811
1812         * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
1813
1814         * dwarf_getsrc_file.c: New file.
1815         * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
1816         * libdw.h: Declare dwarf_getsrc_file.
1817         * libdw.map: Add dwarf_getsrc_file.
1818
1819 2005-04-02  Ulrich Drepper  <drepper@redhat.com>
1820
1821         * dwarf_func_entrypc.c: New file.
1822         * dwarf_func_col.c: New file.
1823         * dwarf_func_line.c: New file.
1824         * dwarf_func_file.c: New file.
1825         * libdw.h: Add prototypes for new functions.
1826         * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
1827         dwarf_func_file.
1828         * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
1829         dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
1830         * libdwP.h (struct Dwarf_Func_s): Add cudie element.
1831         Declare __libdw_func_intval and __dwarf_formsdata_internal.
1832         * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
1833         * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
1834
1835         * dwarf.h: Add some DWARF3 definitions.
1836
1837 2005-04-01  Ulrich Drepper  <drepper@redhat.com>
1838
1839         * dwarf_getfuncs.c: New file.
1840         * dwarf_func_highpc.c: New file.
1841         * dwarf_func_lowpc.c: New file.
1842         * dwarf_func_name.c: New file.
1843         * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
1844         dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
1845         * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
1846         and dwarf_func_name.
1847         * libdw.h: Add prototypes for new functions.
1848         * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
1849         * dwarf_siblingof.c: Likewise.
1850         * dwarf_dieoffset.c: Likewise.
1851         * dwarf_highpc.c: Likewise.
1852         * dwarf_lowpc.c: Likewise.
1853         * libdwP.h: Add prototypes for internal functions.
1854         Define Dwarf_Func_s structure.
1855
1856 2005-03-29  Ulrich Drepper  <drepper@redhat.com>
1857
1858         * libdw.h: Add padding in Dwarf_die.
1859
1860         * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
1861         * dwarf_attr.c: Likewise.
1862         * dwarf_begin.c: Likewise.
1863         * dwarf_begin_elf.c: Likewise.
1864         * dwarf_bitoffset.c: Likewise.
1865         * dwarf_bitsize.c: Likewise.
1866         * dwarf_bytesize.c: Likewise.
1867         * dwarf_diename.c: Likewise.
1868         * dwarf_formaddr.c: Likewise.
1869         * dwarf_formblock.c: Likewise.
1870         * dwarf_formref.c: Likewise.
1871         * dwarf_formstring.c: Likewise.
1872         * dwarf_formudata.c: Likewise.
1873         * dwarf_getarange_addr.c: Likewise.
1874         * dwarf_getarangeinfo.c: Likewise.
1875         * dwarf_getaranges.c: Likewise.
1876         * dwarf_getloclist.c: Likewise.
1877         * dwarf_getmacros.c: Likewise.
1878         * dwarf_getsrc_die.c: Likewise.
1879         * dwarf_getsrcfiles.c: Likewise.
1880         * dwarf_getsrclines.c: Likewise.
1881         * dwarf_highpc.c: Likewise.
1882         * dwarf_lowpc.c: Likewise.
1883         * dwarf_nextcu.c: Likewise.
1884         * dwarf_offdie.c: Likewise.
1885         * dwarf_siblingof.c: Likewise.
1886         * dwarf_srclang.c: Likewise.
1887         * dwarf_tag.c: Likewise.
1888         * libdw_findcu.c: Likewise.
1889         * libdwP.h: Add prototypes for internal functions.
1890
1891         * dwarf_addrdie.c: New file.
1892         * dwarf_macro_opcode.c: New file.
1893         * dwarf_macro_param1.c: New file.
1894         * dwarf_macro_param2.c: New file.
1895         * libdw.h: Add declarations.  Move Dwarf_Macro definition to libdwP.h.
1896         * libdwP.h: Remove Dwarf_Macro definition.
1897         * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
1898         dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
1899         * libdw.map: Add entries for new functions.
1900
1901 2005-03-21  Ulrich Drepper  <drepper@redhat.com>
1902
1903         * libdw.h: Handle broken gcc < 4.
1904
1905 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
1906
1907         * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
1908
1909         * dwarf_begin_elf.c: Fix warnings.
1910         * dwarf_dieoffset.c: Likewise.
1911         * dwarf_end.c: Likewise.
1912         * dwarf_error.c: Likewise.
1913         * dwarf_getpubnames.c: Likewise.
1914
1915         * libdwP.h: Add new error values.
1916         * dwarf_error.c: Support new error values.
1917         * dwarf_getpubnames.c: Check parameter value.
1918
1919 2005-02-05  Ulrich Drepper  <drepper@redhat.com>
1920
1921         * Makefile.am: Check for text relocations in constructed DSO.
1922
1923         * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
1924
1925 2005-02-04  Ulrich Drepper  <drepper@redhat.com>
1926
1927         * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
1928         checks to not read over buffer boundaries for ill-formed DWARF data.
1929
1930 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1931
1932         * dwarf_child.c: Make compile with gcc 4.0.
1933         * dwarf_error.c: Likewise.
1934         * dwarf_formblock.c: Likewise.
1935         * dwarf_getabbrev.c: Likewise.
1936         * dwarf_getattrs.c: Likewise.
1937         * dwarf_getsrclines.c: Likewise.
1938         * dwarf_tag.c: Likewise.
1939         * libdw_form.c: Likewise.
1940
1941 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
1942
1943         * Makefile.am: Support building with mudflap.
1944
1945         * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
1946         * dwarf_getsrclines.c: Likewise.
1947         * dwarf_memory-access.h: Likewise.
1948
1949 2004-01-19  Ulrich Drepper  <drepper@redhat.com>
1950
1951         * dwarf_getsrcfiles.c: Third parameter can be NULL.
1952
1953         * libdw.h: Define Dwarf_macro.  Declare dwarf_getmacros.
1954         Third parameter of dwarf_getsrcfiles can be NULL.
1955
1956         * libdw.map: Add dwarf_getmacros.
1957         * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
1958         * dwarf_getmacros.c: New file.
1959
1960 2004-01-18  Ulrich Drepper  <drepper@redhat.com>
1961
1962         * libdw.h: Second parameter of dwarf_getaranges can be NULL.
1963
1964         * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
1965
1966         * dwarf_getsrclines.c:
1967         Use read_2ubyte_unaligned_inc instead of _inc-less variant.
1968
1969         * dwarf_getaranges.c: Allow naranges parameter to be NULL.
1970
1971         * libdwP.h (_): Use elfutils domain.
1972
1973         * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
1974
1975         * dwarf_getsrclines.c: Fix typo in comment.
1976
1977 2004-01-17  Ulrich Drepper  <drepper@redhat.com>
1978
1979         * Makefile.am: Support building with mudflap.
1980
1981 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
1982
1983         * memory-access.h: Add lots of const in case a pointer passed is const.
1984
1985         * dwarf_formflag.c: New file.
1986         * dwarf_getattrs.c: New file.
1987         * dwarf_error.c: Add new error value.
1988         * libdw.h: Add prototypes for new functions.  Adjust prototype for
1989         dwarf_getpubnames.
1990         * libdw.map: Add new functions.
1991         * dwarf_getpubnames.c: Change type of return value and fourth parameter
1992         to ptrdiff_t.
1993         * libdwP.h: Add new error value.
1994         * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
1995         dwarf_formflag.c.
1996
1997         * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
1998
1999 2004-01-12  Ulrich Drepper  <drepper@redhat.com>
2000
2001         * dwarf_getarange_addr.c: New file
2002         * dwarf_getarangeinfo.c: New file.
2003         * dwarf_getaranges.c: New file.
2004         * dwarf_onerange.c: New file.
2005         * libdw.h: Declare new functions.  Define Dwarf_Arange and
2006         Dwarf_Aranges.
2007         * libdw.map: Add new functions.
2008         * libdwP.h: Add new errors.  Add aranges member to struct Dwarf.
2009         Define Dwarf_Aranges_s and Dwarf_Arange_s.
2010         * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2011         dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2012         * dwarf_error.c: Add new message.
2013
2014 2004-01-11  Ulrich Drepper  <drepper@redhat.com>
2015
2016         * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2017         dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2018         dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2019         * dwarf_error.c: Add another message.
2020         * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2021         introduction.
2022         * dwarf_filesrc.c: Likewise.
2023         * dwarf_getsrcfiles.c: Likewise.
2024         * dwarf_getsrclines.c: Likewise.
2025         * dwarf_lineaddr.c: New file.
2026         * dwarf_linebeginstatement.c: New file.
2027         * dwarf_lineblock.c: New file.
2028         * dwarf_linecol.c: New file.
2029         * dwarf_lineendsequence.c: New file.
2030         * dwarf_lineepiloguebegin.c: New file.
2031         * dwarf_lineno.c: New file.
2032         * dwarf_lineprologueend.c: New file.
2033         * dwarf_onesrcline.c: New file.
2034         * dwarf_lineno.c: Change interface to store result in object pointed
2035         to by second parameter.
2036         * libdw.h: Add prototypes for new functions.  Change dwarf_lineno
2037         prototype.  Define Dwarf_Files and Dwarf_Lines.
2038         * libdw.map: Add new functions.
2039         * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2040         * libdw_findcu.c: Don't initialize nlines field.
2041
2042         * dwarf_siblingof: Little optimization.
2043
2044         * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2045         * dwarf_end.c: Close ELF descriptor if free_elf is set.
2046         * libdwP.h (struct Dwarf): Add free_elf field.
2047
2048         * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2049         dwarf_offabbrev.c.
2050         * dwarf_getstring.c: New file.
2051         * dwarf_offabbrev.c: New file.
2052         * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2053         * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2054         parameters.  Don't allocate memory if not necessary and don't lookup
2055         previous results if no CU given.
2056         (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2057         * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2058         * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2059         * libdwP.h: Change prototype for __libdw_getabbrev.
2060
2061         * dwarf_getabbrevattr.c: Add offsetp parameter.  Fill in before
2062         returning if this is wanted.
2063
2064 2004-01-09  Ulrich Drepper  <drepper@redhat.com>
2065
2066         * dwarf_nextcu.c: Add new parameter offset_sizep.  Initialize it
2067         with offset_size value.
2068         * libdw.h: Adjust dwarf_nextcu prototype.
2069         * libdwP.h (struct Dwarf_CU): Add offset_size member.
2070         * libdw_findcu.c: Adjust dwarf_nextcu call.  Initialize offset_size
2071         member of new CU struct.
2072         * dwarf_formstring.c: Depend on offset_size not address_size for
2073         DW_FORM_strp handling.
2074         * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2075
2076         * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2077         failing lookup.
2078         (dwarf_tag): Correctly recognize failed lookup.
2079
2080         * dwarf_end.c (cu_free):  Call tdestroy for locs member.  Use new
2081         function noop_free.
2082         * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2083         * dwarf_formblock.c: New file.
2084         * dwarf_getloclist.c: Rewrite to handle a single block.
2085         * libdw.h: Define Dwarf_Block.  Rename Dwarf_Loc members.  Remove
2086         Dwarf_Locdesc definition.  Declare dwarf_formblock.  Remove
2087         dwarf_getloclistent declaration.
2088         * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2089         * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2090         Add locs member to struct Dwarf_CU.
2091         * libdw_fundcu.c: Initialize locs member of new CU.
2092         * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2093         Remove dwarf_getloclistent.c.
2094
2095 2004-01-07  Ulrich Drepper  <drepper@redhat.com>
2096
2097         * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2098         * libdwP.h: Likewise.
2099
2100         * dwarf_getloclist.c: New file.
2101         * dwarf_getloclistent.c: New file.
2102         * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2103         Declare dwarf_getloclistent and dwarf_getloclist.
2104         * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2105         * libdwP.h: Define DWARF_E_NO_LOCLIST.
2106         * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2107         dwarf_getloclist.c.
2108
2109         * dwarf_error.c: More error messages.
2110
2111 2004-01-06  Ulrich Drepper  <drepper@redhat.com>
2112
2113         * dwarf_getsrclines.c: Remove debugging support.
2114
2115         * dwarf_getsrcfiles.c: New file.
2116         * dwarf_filesrc.c: New file.
2117         * libdw.h: Declare these functions.  Define Dwarf_File.
2118         * libdwP.c: Adjust Dwarf_File_s definition.
2119         * libdw.map: Add these functions.
2120         * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2121         dwarf_filesrc.c.
2122         * dwarf_getsrclines.c: Initialize cu->files.
2123
2124 2004-01-05  Ulrich Drepper  <drepper@redhat.com>
2125
2126         * libdw.h: Add more nonnull function attributes.
2127
2128         * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2129         * dwarf_end.c (cu_free): New function.
2130         (dwarf_end): Also free CU tree.  Correct freeing of memory blocks.
2131         * dwarf_error.c (errmsgs): Add new messages.
2132         * dwarf_getsrc_die.c: New file.
2133         * dwarf_getsrclines.c: New file.
2134         * dwarf_lineno.c: New file.
2135         * dwarf_linesrc.c: New file.
2136         * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2137         instead of the *_inc-less variants.
2138         * libdw.h: Define Dwarf_Line.  Add some function attributes.  Declare
2139         dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2140         * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2141         and dwarf_linesrc.
2142         * libdwP.h: Add more error codes.
2143         (struct Dwarf): Remove mem_tail.next member.
2144         (Dwarf_File): Define type.
2145         (struct Dwarf_Line_s): Define type.
2146         (struct Dwarf_CU): Add lines and nlines members.
2147         (libdw_alloc): Define local variable _tail and use it.
2148         Add some function attributes.
2149         * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2150         * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2151         * memory-access.h: Add unlikely for the endian conversion paths.
2152         * Makefile.am (AM_CFLAGS): Add -std parameter.
2153         (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2154         dwarf_lineno, and dwarf_linesrc.
2155
2156 2003-08-11  Ulrich Drepper  <drepper@redhat.com>
2157
2158         * Moved to CVS archive.