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