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