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