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