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