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