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