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