blob: 6533eb5019d65e084dddd7c7cea8b1377e6417e7 [file] [log] [blame]
Mark Wielaard2d906d82017-07-26 17:38:22 +020012017-07-26 Mark Wielaard <mark@klomp.org>
2
Mark Wielaardf9d791a2017-07-26 23:02:18 +02003 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
4 * dwarf_getmacros.c (get_table_for_offset): Accept either version
5 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
6 (read_macros): Use table version for fake_cu.
7
82017-07-26 Mark Wielaard <mark@klomp.org>
9
Mark Wielaard274f28c2017-07-26 22:54:59 +020010 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
11 DW_TAG_packed_type and DW_TAG_shared_type.
12 * libdw.h (dwarf_peel_type): Extend documentation.
13
142017-07-26 Mark Wielaard <mark@klomp.org>
15
Mark Wielaard02e30932017-07-26 18:32:27 +020016 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
17 DW_DEFAULTED_out_of_class.
18
192017-07-26 Mark Wielaard <mark@klomp.org>
20
Mark Wielaard75834f32017-07-26 18:15:20 +020021 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
22
232017-07-26 Mark Wielaard <mark@klomp.org>
24
Mark Wielaard2eb1e342017-07-26 18:06:21 +020025 * dwarf_default_lower_bound.c: New file.
26 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
27 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
28 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
29 * libdw.h: Add dwarf_default_lower_bound.
30 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
31 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
32 dwarf_default_lower_bound INTDECL.
33
342017-07-26 Mark Wielaard <mark@klomp.org>
35
Mark Wielaardd14fd3b2017-07-26 17:44:29 +020036 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
37 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
38 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
39 * dwarf_aggregate_size.c (array_size): Add lower bound for
40 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
41 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
42 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
43 DW_LANG_Julia and DW_LANG_BLISS.
44
452017-07-26 Mark Wielaard <mark@klomp.org>
46
Mark Wielaard2d906d82017-07-26 17:38:22 +020047 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
48
Mark Wielaard8e9c76b2017-07-25 15:29:10 +0200492017-07-25 Mark Wielaard <mark@klomp.org>
50
Mark Wielaard9619d342017-07-26 17:06:07 +020051 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
52 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
53 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
54 for currently unused numbers.
55
562017-07-25 Mark Wielaard <mark@klomp.org>
57
Mark Wielaard8e9c76b2017-07-25 15:29:10 +020058 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
59 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
60 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
61
Mark Wielaardc24b9002017-07-21 21:23:07 +0200622017-07-21 Mark Wielaard <mark@klomp.org>
63
64 * dwarf_line_file.c: New file.
65 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
66 * libdw.h (dwarf_line_file): New function declaration.
67 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
68
Ulf Hermann8abf0b52017-02-17 16:11:28 +0100692017-02-17 Ulf Hermann <ulf.hermann@qt.io>
70
71 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
72 made of, libdw_so_DEPS for libraries it depends on (including
73 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
74 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
75 library dependencies, use libdw_so_LIBS rather than relying on the
76 order of dependencies specified, add -z,relro.
77
Ulf Hermann037be822017-04-20 17:07:37 +0200782017-04-20 Ulf Hermann <ulf.hermann@qt.io>
79
Ulf Hermannc73a00d2017-04-20 15:55:47 +020080 * libdw.h: Remove attribute macro declarations and use
81 __noreturn_attribute__ as defined in libelf.h.
82
832017-04-20 Ulf Hermann <ulf.hermann@qt.io>
84
Ulf Hermann037be822017-04-20 17:07:37 +020085 * dwarf_begin_elf.c: Include endian.h.
86
Mark Wielaardf339da92017-03-30 12:19:53 +0200872017-03-30 Mark Wielaard <mjw@redhat.com>
88
89 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
90 result.
91
Mark Wielaardee38b262016-10-22 19:18:51 +0200922016-10-22 Mark Wielaard <mjw@redhat.com>
93
94 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
95 * dwarf_aggregate_size.c (array_size): Use correct spelling of
96 DW_LANG_PLI.
97
Mark Wielaarda3cc8182016-11-02 13:29:26 +0100982016-11-02 Mark Wielaard <mjw@redhat.com>
99
100 * cfi.c (execute_cfi): Add fallthrough comments.
101 * encoded-value.h (encoded_value_size): Add explicit return instead
102 of relying on fallthrough.
103 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
104 comment.
105
1062016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Akihiko Odaki60b2bf12016-10-11 23:06:48 +0900107
108 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
109 * libdw_alloc.c: Likewise.
110
Mark Wielaarddd906c12016-07-08 14:08:22 +02001112016-07-08 Mark Wielaard <mjw@redhat.com>
112
113 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
114 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
115 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
116
Mark Wielaarde93e6f92016-02-13 19:36:50 +01001172016-02-13 Mark Wielaard <mjw@redhat.com>
118
119 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
120 assign to ndirlist.
121
Mark Wielaardc495d752015-12-30 14:18:40 +01001222015-12-18 Mark Wielaard <mjw@redhat.com>
123
124 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
125 (__libdw_free_zdata): Remove.
126 * dwarf_begin_elf.c (inflate_section): Remove.
127 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
128 and elf_compress_gnu to decompress if necessary.
129 (valid_p): Remove __libdw_free_zdata calls.
130 (scngrp_read): Use elf_compress if section is compressed. Remove
131 __libdw_free_zdata calls.
132 * dwarf_end.c (__libdw_free_zdata): Remove.
133 (dwarf_end): Don't call __libdw_free_zdata.
134
Mark Wielaard0c32b6f2015-11-17 23:52:39 +01001352015-10-28 Mark Wielaard <mjw@redhat.com>
136
137 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
138
Mark Wielaard8bbfc552015-12-02 17:07:40 +01001392015-12-02 Mark Wielaard <mjw@redhat.com>
140
141 * fde.c (intern_fde): Don't leak duplicate FDEs.
142
Mark Wielaarddb30f8b2015-12-01 15:21:55 +01001432015-12-01 Mark Wielaard <mjw@redhat.com>
144
Mark Wielaarde04da0e2015-12-02 00:21:07 +0100145 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
146 valid code range.
147
1482015-12-01 Mark Wielaard <mjw@redhat.com>
149
Mark Wielaarddb30f8b2015-12-01 15:21:55 +0100150 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
151
Chih-Hung Hsieh454a8282015-10-14 12:23:34 -07001522015-10-14 Chih-Hung Hsieh <chh@google.com>
153
Chih-Hung Hsiehe0b020f2015-10-14 12:30:11 -0700154 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
155 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
156
1572015-10-14 Chih-Hung Hsieh <chh@google.com>
158
Chih-Hung Hsieh454a8282015-10-14 12:23:34 -0700159 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
160 function 'walk_children' to file scope; inline 'recurse' at its call
161 site.
162
Mark Wielaarde2cf85c2015-11-19 12:37:08 +01001632015-10-19 Mark Wielaard <mjw@redhat.com>
164
165 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
166 if necessary.
167
Dmitry V. Levinb47fb232015-11-16 18:11:23 +03001682015-10-16 Dmitry V. Levin <ldv@altlinux.org>
169
170 * dwarf_getsrclines.c (read_srclines): Initialize state early.
171
Chih-Hung Hsiehb926e562015-10-13 15:26:14 -07001722015-10-13 Chih-Hung Hsieh <chh@google.com>
173
Chih-Hung Hsiehf8443bd2015-10-13 15:26:14 -0700174 * dwarf_getsrclines.c (read_srclines): Move nested functions
175 'advance_pc' and 'add_new_line' to file scope and keep many
176 local state variables within one structure.
177
1782015-10-13 Chih-Hung Hsieh <chh@google.com>
179
Chih-Hung Hsiehb926e562015-10-13 15:26:14 -0700180 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
181 function 'file_matches' to file scope.
182
Mark Wielaard528cb452015-10-16 23:07:12 +02001832015-10-16 Mark Wielaard <mjw@redhat.com>
184
185 * Makefile.am (libdw.so): Add -lz.
186
Chih-Hung Hsieh34bb96a2015-10-14 11:59:53 -07001872015-10-14 Chih-Hung Hsieh <chh@google.com>
188
189 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
190 and 'require_cfa_offset' to file scope.
191
Josh Stone34254542015-10-09 10:10:37 -07001922015-10-09 Josh Stone <jistone@redhat.com>
193
194 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
195 and fstat.
196
Josh Stonedaee4712015-10-05 11:04:15 -07001972015-10-05 Josh Stone <jistone@redhat.com>
198
199 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
200
Jose E. Marchesi133509f2015-10-05 17:36:30 +02002012015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
202
203 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
204 relocation overflows in some platforms.
205
Mark Wielaardd8698e52015-09-23 20:44:06 +02002062015-09-23 Mark Wielaard <mjw@redhat.com>
207
208 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
209 * dwarf_formref.c (__libdw_formref): Likewise.
210 * libdw_findcu.c (__libdw_findcu): Likewise.
211 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
212
Mark Wielaard1ccdfb62015-09-22 22:27:01 +02002132015-09-22 Mark Wielaard <mjw@redhat.com>
214
215 * *.c: Remove old-style function definitions.
216
Mark Wielaarddd8bd912015-09-15 10:55:10 +02002172015-09-15 Mark Wielaard <mjw@redhat.com>
218
219 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
220
Chih-Hung Hsieh2d982862015-09-09 12:32:07 -07002212015-09-09 Chih-Hung Hsieh <chh@google.com>
222
223 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
224 redundant NULL tests on parameters declared with __nonnull_attribute__.
225 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
226 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
227
Chih-Hung Hsiehaa1c2ca2015-09-04 12:04:11 -07002282015-09-04 Chih-Hung Hsieh <chh@google.com>
Chih-Hung Hsiehf6b93912015-09-04 12:04:11 -0700229 Mark Wielaard <mjw@redhat.com>
230
231 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
232 definition with ansi-C definition and add const qualifier to
233 locs argument.
234
2352015-09-04 Chih-Hung Hsieh <chh@google.com>
Chih-Hung Hsiehaa1c2ca2015-09-04 12:04:11 -0700236
237 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
238 definition with ansi-C definitions.
239 (__libdw_findcu): Likewise.
240
Mark Wielaarda74bdbd2015-08-25 15:11:01 +02002412015-08-25 Mark Wielaard <mjw@redhat.com>
242
243 * dwarf.h: Add DW_LANG_Haskell.
244
Mark Wielaard1dcbe0c2015-06-18 10:38:12 +02002452015-06-18 Mark Wielaard <mjw@redhat.com>
246
Mark Wielaard85cc9c62015-06-18 11:50:50 +0200247 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
248 to hold a Dwarf.
249
2502015-06-18 Mark Wielaard <mjw@redhat.com>
251
Mark Wielaard65e58822015-06-18 10:41:42 +0200252 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
253
2542015-06-18 Mark Wielaard <mjw@redhat.com>
255
Mark Wielaard1dcbe0c2015-06-18 10:38:12 +0200256 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
257 dwarf_formudata reports an error.
258 (get_table_for_offset): Likewise.
259
Mark Wielaard9e3d5c22015-06-09 00:31:25 +02002602015-06-08 Mark Wielaard <mjw@redhat.com>
261
262 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
263
Mark Wielaard20956b82015-06-03 17:42:38 +02002642015-06-06 Mark Wielaard <mjw@redhat.com>
265
266 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
267
Mark Wielaard1ae83ee2015-05-27 14:05:15 +02002682015-05-27 Mark Wielaard <mjw@redhat.com>
269
270 * encoded-value.h (read_encoded_value): Check data d_size contains
271 at least enough data to hold a pointer for DW_EH_PE_indirect.
272
Mark Wielaarde69f59c2015-05-22 23:33:56 +02002732015-05-22 Mark Wielaard <mjw@redhat.com>
274
275 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
276 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
277 MAX_STACK_DIRS. Calculate number of dirs needed first, then
278 create dirarray directly, without needing the next field. Free
279 not stack allocated lines and files at the end.
280
Mark Wielaard720f83a2015-05-19 11:52:58 +02002812015-05-19 Mark Wielaard <mjw@redhat.com>
282
283 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
284 allocated array to hold locs. Allocate locs bigger than the array
285 with malloc and free them when done.
286
Jonathan Lebon90659072015-05-11 15:38:13 -04002872015-05-11 Jonathan Lebon <jlebon@redhat.com>
288
Jonathan Lebon987e3d72015-05-11 15:38:14 -0400289 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
290 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
291 * dwarf_begin_elf.c (inflate_section): New static function, lifted
292 from...
293 (check_section): ... here. Call inflate_section, set libdw errno to
294 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
295
2962015-05-11 Jonathan Lebon <jlebon@redhat.com>
297
Jonathan Lebon90659072015-05-11 15:38:13 -0400298 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
299 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
300
Mark Wielaarddedb5e72015-05-06 12:55:21 +02003012015-05-06 Mark Wielaard <mjw@redhat.com>
302
303 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
304 check the line number.
305
Mark Wielaardae029162015-05-05 10:16:42 +02003062015-05-05 Mark Wielaard <mjw@redhat.com>
307
308 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
309 left before reading values.
310
Anthony G. Basile1ab3c2b2015-05-04 02:25:39 +03003112015-05-04 Anthony G. Basile <blueness@gentoo.org>
312
313 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
314 command.
315
Mark Wielaard65a211f2015-04-22 12:28:30 +02003162015-04-22 Mark Wielaard <mjw@redhat.com>
317
318 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
319 (__libdw_max_len_uleb128): New function.
320 (__libdw_max_len_sleb128): Likewise.
321 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
322 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
323
Mark Wielaardf98b99d2015-04-21 15:46:01 +02003242015-04-21 Mark Wielaard <mjw@redhat.com>
325
326 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
327 when there are more than 8.
328
Petr Machata71de1d22015-04-01 21:44:32 +02003292015-04-01 Petr Machata <pmachata@redhat.com>
330
331 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
332 (is_cudie): New function.
333 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
334 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
335 of white-listing valid tags.
336 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
337
Petr Machata7f617342015-03-18 19:42:02 +01003382015-03-18 Petr Machata <pmachata@redhat.com>
339
340 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
341 (EXTRA_DIST): Remove known-dwarf.h.
342
Mark Wielaard7fb80312015-02-09 16:24:04 +01003432015-02-09 Mark Wielaard <mjw@redhat.com>
344
Mark Wielaardd3c816d2015-02-09 16:47:08 +0100345 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
346 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
347 for new Fortran language codes is 1.
348
3492015-02-09 Mark Wielaard <mjw@redhat.com>
350
Mark Wielaard7fb80312015-02-09 16:24:04 +0100351 * dwarf.h: Add DW_TAG_atomic_type.
352 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
353 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
354
Josh Stone031db7c2015-02-11 13:53:14 -08003552015-02-11 Josh Stone <jistone@redhat.com>
356
357 * encoded-value.h (read_encoded_value): Initialize value.
358
Petr Machatab4da85d2015-02-11 22:11:46 +01003592015-02-11 Petr Machata <pmachata@redhat.com>
360
361 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
362 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
363 the fact in *BASEP and bail out later if it hasn't been updated by
364 __libdw_read_begin_end_pair_inc.
365
Mark Wielaardddbf23a2014-12-24 13:17:23 +01003662014-12-24 Mark Wielaard <mjw@redhat.com>
367
368 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
369 smaller than or equal to addr, rather than returning immediately on
370 a match.
371
Mark Wielaardb4b2de92015-01-07 23:39:28 +01003722015-01-07 Mark Wielaard <mjw@redhat.com>
373
374 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
375 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
376 room in the search table for all entries. Store search_table_len.
377 (getcfi_scn_eh_frame): Likewise.
378 * encoded-value.h (encoded_value_size): Don't abort, return zero.
379 (__libdw_cfi_read_address_inc): Check there is enough room to read
380 values. Pass other byte order to read functions.
381 (read_encoded_value): Check encoded_value_size. Don't abort, but
382 set libdw errno and report failure. Check there is enough room to
383 read values.
384 * fde.c (binary_search_fde): Check encoded value size. Add hdr
385 data buf and size to dummy_cfi.
386
Mark Wielaarda1ea2422015-01-04 16:08:22 +01003872015-01-04 Mark Wielaard <mjw@redhat.com>
388
Mark Wielaard43e924e2015-01-05 00:03:03 +0100389 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
390 is after current DIE.
391
3922015-01-04 Mark Wielaard <mjw@redhat.com>
393
Mark Wielaarda1ea2422015-01-04 16:08:22 +0100394 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
395 (dwarf_frame_register).
396
Mark Wielaard5316e412015-01-03 00:09:45 +01003972015-01-02 Mark Wielaard <mjw@redhat.com>
398
Mark Wielaard9ceebe62015-01-03 00:27:58 +0100399 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
400 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
401 (getcfi_scn_eh_frame): Check d_buf is not NULL.
402
4032015-01-02 Mark Wielaard <mjw@redhat.com>
404
Mark Wielaard5316e412015-01-03 00:09:45 +0100405 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
406 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
407 DW_OP_addr if dbg is NULL then read argument directly.
408
Jason P. Leasure7c713822015-01-14 09:26:55 -05004092015-01-14 Jason P. Leasure <jpleasu@super.org>
410
411 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
412 plus cu->start.
413
Mark Wielaard3fa17962014-12-27 12:13:50 +01004142014-12-27 Mark Wielaard <mjw@redhat.com>
415
416 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
417 still falls inside CU data.
418
Mark Wielaarddaf278f2015-01-11 15:00:52 +01004192015-01-11 Mark Wielaard <mjw@redhat.com>
420
421 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
422 __libdw_visit_scopes with NULL imports.
423 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
424 * dwarf_getscopes.c (pc_record): Likewise.
425 (dwarf_getscopes): Likewise.
426 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
427 * libdwP.h (__libdw_visit_scopes): Add imports argument.
428 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
429 function imports_contains. Push and pop imports around walk_children
430 when processing DW_TAG_imported_unit.
431
Ulrich Drepper898ed262014-12-18 12:32:39 -05004322014-12-18 Ulrich Drepper <drepper@gmail.com>
433
434 * Makefile.am: Suppress output of textrel_check command.
435
Mark Wielaardff1ce972014-12-16 16:10:28 +01004362014-12-16 Mark Wielaard <mjw@redhat.com>
437
Mark Wielaardecd78d32014-12-16 22:47:39 +0100438 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
439 DW_LNE_define_file.
440
4412014-12-16 Mark Wielaard <mjw@redhat.com>
442
Mark Wielaard7f9ea702014-12-16 16:41:19 +0100443 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
444 space to read die offset.
445
4462014-12-16 Mark Wielaard <mjw@redhat.com>
447
Mark Wielaardff1ce972014-12-16 16:10:28 +0100448 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
449 unit_length.
450
Mark Wielaard38648042014-12-15 14:56:07 +01004512014-12-15 Mark Wielaard <mjw@redhat.com>
452
453 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
Mark Wielaard138a9ba2014-12-15 16:56:49 +0100454 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
Mark Wielaard38648042014-12-15 14:56:07 +0100455 (dwarf_getpubnames): Make sure section data contains string zero
456 terminator.
457
Mark Wielaard1b5477d2014-12-16 10:53:22 +01004582014-12-16 Mark Wielaard <mjw@redhat.com>
459
460 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
461 the compiler optimize for the common single-byte case.
462
Josh Stone54662f12014-12-15 12:18:25 -08004632014-12-15 Josh Stone <jistone@redhat.com>
464
465 * memory-access.h (__libdw_max_len_leb128): New.
466 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
467 (__libdw_get_sleb128): Likewise.
468
Mark Wielaard7a053472014-12-14 21:48:23 +01004692014-12-14 Mark Wielaard <mjw@redhat.com>
470
471 * cfi.c (execute_cfi): Add program bounds checks.
472 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
473 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
474 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
475 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
476 * dwarf_formudata.c (dwarf_formudata): Likewise.
477 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
478 with end of data buf.
479 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
480 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
481 call gets enough data.
482 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
483 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
484 with enough data.
485 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
486 end_data.
487 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
488 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
489 get_uleb128 with lineendp.
490 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
491 get_uleb128 with endp.
492 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
493 get_uleb128/get_sleb128 with limit.
494 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
495 get_sleb128 get called with enough data.
496 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
497 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
498 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
499 endp.
500 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
501 Don't call get_uleb128_step if out of data.
502 (__libdw_get_sleb128): Likewise for get_sleb128_step.
503
Mark Wielaard92026652014-12-12 16:43:04 +01005042014-12-12 Mark Wielaard <mjw@redhat.com>
505
506 * libdwP.h (struct Dwarf): Add fake_loc_cu.
507 (cu_data): Removed.
508 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
509 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
510 (__libdw_form_val_len): Likewise.
511 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
512 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
513 the already found data buffer directly.
514 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
515 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
516 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
517 just cu.
518 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
519 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
520 * dwarf_getlocation_attr.c (attr_form_cu): New function.
521 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
522 (getlocation): Handle empty blocks immediately.
523 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
524 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
525 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
526 one argument.
527 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
528 fake_cu. Call __libdw_form_val_len with just fake_cu.
529 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
530 datap and size directly from cu startp and endp.
531
Mark Wielaardf73385e2014-12-12 00:22:31 +01005322014-12-11 Mark Wielaard <mjw@redhat.com>
533
534 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
535
Mark Wielaard4a330f62014-12-14 00:09:29 +01005362014-12-13 Mark Wielaard <mjw@redhat.com>
537
538 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
539 difference doesn't wrap around before returning as int.
540
Josh Stone6e1c0d92014-12-11 16:22:48 -08005412014-12-11 Josh Stone <jistone@redhat.com>
542
543 * dwarf_getsrclines.c (struct linelist): Add sequence.
544 (compare_lines): Take linelists, and break ties by sequence.
545 (read_srclines): Use linelists for sorting.
546 (read_srclines::add_new_line): Set sequence.
547
Josh Stoneb849f812014-12-10 18:28:04 -08005482014-12-10 Josh Stone <jistone@redhat.com>
549
Josh Stone8d200b52014-12-10 18:41:43 -0800550 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
551 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
552 * dwarf_child.c (dwarf_child): Use cu->endp.
553 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
554 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
555 * dwarf_siblingof.c (dwarf_siblingof): Use both.
556
5572014-12-10 Josh Stone <jistone@redhat.com>
558
Josh Stone64e44df2014-12-10 18:33:34 -0800559 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
560
5612014-12-10 Josh Stone <jistone@redhat.com>
562
Josh Stoneb849f812014-12-10 18:28:04 -0800563 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
564 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
565 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
566 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
567 * dwarf_tag.c (dwarf_tag): Likewise.
568
Mark Wielaardcb73b5a2014-12-04 21:43:44 +01005692014-12-04 Mark Wielaard <mjw@redhat.com>
570
571 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
572 (__libdw_form_val_len): Likewise and check len doesn't overflow.
573 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
574 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
575 with endp.
576 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
577 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
578
Petr Machataedb079a2014-12-02 21:22:14 +01005792014-12-02 Petr Machata <pmachata@redhat.com>
580
581 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
582 helper functions.
583 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
584 * libdw.h (DWARF_GETMACROS_START): New macro.
585
Mark Wielaard12ab7002014-11-27 23:41:57 +01005862014-11-27 Mark Wielaard <mjw@redhat.com>
587
Mark Wielaard805ec832014-11-27 23:53:30 +0100588 * Makefile.am (libdw.so): Use textrel_check.
589
5902014-11-27 Mark Wielaard <mjw@redhat.com>
591
Mark Wielaard12ab7002014-11-27 23:41:57 +0100592 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
593 search_table_entries and search_table_encoding.
594
Mark Wielaard020fc022014-11-24 21:54:42 +01005952014-11-24 Mark Wielaard <mjw@redhat.com>
596
597 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
598 before usage.
599
Mark Wielaard04b61f82014-11-23 23:13:55 +01006002014-11-23 Mark Wielaard <mjw@redhat.com>
601
Mark Wielaard59480ba2014-11-23 23:21:05 +0100602 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
603 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
604 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
605
6062014-11-23 Mark Wielaard <mjw@redhat.com>
607
Mark Wielaard04b61f82014-11-23 23:13:55 +0100608 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
609 Set libdw errno and return NULL.
610
Mark Wielaard9f8c08e2014-11-24 22:17:51 +01006112014-11-24 Mark Wielaard <mjw@redhat.com>
612
613 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
614 (DW_LANG_C11): Likewise.
615 (DW_LANG_C_plus_plus_14): Likewise.
616 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
617 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
618 lower bound.
619 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
620 DW_LANG_C11.
621
Mark Wielaard03c033f2014-11-26 17:51:28 +01006222014-11-26 Mark Wielaard <mjw@redhat.com>
623
624 * dwarf.h (DW_AT_noreturn): Added.
625
Mark Wielaard09086232014-11-11 14:10:04 +01006262014-11-11 Mark Wielaard <mjw@redhat.com>
627
628 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
629 explicitly as uint8_t.
630 (__libdw_getsrclines): Add internal_function to declaration.
631
Petr Machatafb90bf32014-10-17 02:47:03 +02006322014-09-10 Petr Machata <pmachata@redhat.com>
633
634 * dwarf_macro_getparamcnt.c: New file.
635 * dwarf_macro_param.c: New file.
636 * dwarf_macro_getsrcfiles.c: New file.
637 * Makefile.am (libdw_a_SOURCES): Add the new files.
638 * libdwP.h (struct files_lines_s): New structure.
639 (DWARF_E_INVALID_OPCODE): New enumerator.
640 (struct Dwarf): New fields macro_ops, files_lines.
641 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
642 keeping macro opcode prototypes in.
643 (Dwarf_Macro_s): Redefine from scratch.
644 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
645 internal interfaces.
646 * dwarf_error.c (errmsgs): Add a message for
647 DWARF_E_INVALID_OPCODE.
648 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
649 files_lines.
650 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
651 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
652 interfaces.
653 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
654 (get_offset_from, macro_op_compare, build_table)
655 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
656 (cache_op_table, read_macros, gnu_macros_getmacros_off)
657 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
658 functions.
659 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
660 * dwarf_getsrclines.c (read_srclines): New function with guts
661 taken from dwarf_getsrclines.
662 (__libdw_getsrclines): Likewise.
663 (__libdw_getcompdir, files_lines_compare): New functions.
664 (dwarf_getsrclines): Make it dispatch to the new interfaces.
665 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
666 the new interfaces.
667 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
668 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
669 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
670
Mark Wielaard3a36e8a2014-10-06 22:00:16 +02006712014-10-06 Mark Wielaard <mjw@redhat.com>
672
673 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
674 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
675 (aggregate_size): Likewise. Add old and new version.
676 * dwarf_peel_type.c: New file.
677 * libdw.h (dwarf_peel_type): New function declaration.
678 * libdwP.h (dwarf_peel_type): New internal declaration.
679 * libdw.map (ELFUTILS_0.161): New section.
680
Petr Machata564cfbe2014-10-15 19:28:08 +02006812014-10-15 Petr Machata <pmachata@redhat.com>
682
683 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
684 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
685
Mark Wielaard2e83c642014-10-05 17:12:41 +02006862014-10-05 Mark Wielaard <mjw@redhat.com>
687
688 * dwarf.h: Add DW_AT_GNU_deleted.
689
Mark Wielaardb50014f2014-10-02 14:00:47 +02006902014-10-02 Mark Wielaard <mjw@redhat.com>
691
692 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
693 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
694 DW_TAG_rvalue_reference_type.
695
Petr Machata1498f542014-09-12 19:03:33 +02006962014-09-12 Petr Machata <pmachata@redhat.com>
697
698 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
699 8-byte quantities. Consequently, rename to...
700 (read_addr_unaligned_inc): ... this.
701 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
702 (read_sbyte_unaligned): Drop.
703
Petr Machata476feb12014-09-10 22:26:28 +02007042014-09-10 Petr Machata <pmachata@redhat.com>
705
706 * dwarf_getlocation.c (attr_ok): Also accept
707 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
708 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
709
Mark Wielaard209f1492014-08-15 13:08:24 +02007102014-08-15 Mark Wielaard <mjw@redhat.com>
711
Mark Wielaardf18f2332014-08-15 16:03:21 +0200712 * dwarf_cu_die.c: New file.
713 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
714 * libdw.h (dwarf_cu_die): New function declaration.
715 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
716
7172014-08-15 Mark Wielaard <mjw@redhat.com>
718
Mark Wielaard209f1492014-08-15 13:08:24 +0200719 * dwarf_cu_getdwarf.c: New file.
720 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
721 * libdw.h (Dwarf_CU): New typedef.
722 (dwarf_cu_getdwarf): New function declaration.
723 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
724
Mark Wielaardaf1e6ed2014-06-18 10:57:58 +02007252014-06-18 Mark Wielaard <mjw@redhat.com>
726
727 * dwarf.h: Remove DW_TAG_mutable_type.
728
Mark Wielaardbb096d02014-05-03 00:23:06 +02007292014-05-02 Mark Wielaard <mjw@redhat.com>
730
731 * libdwP.h (__check_build_id): Removed now unused.
732
Mark Wielaarddf85bf92014-05-01 14:48:27 +02007332014-05-01 Mark Wielaard <mjw@redhat.com>
734
735 * libdwP.h (struct Dwarf): Remove free_alt.
736 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
737 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
738
Mark Wielaardd81d32d2014-04-30 23:00:40 +02007392014-04-30 Mark Wielaard <mjw@redhat.com>
740
741 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
742
Florian Weimer920f03d2014-04-15 17:11:17 +02007432014-04-15 Florian Weimer <fweimer@redhat.com>
744
745 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
746 (open_debugaltlink): Move to libdwfl.
747 (check_section): Do not locate alternate debuginfo.
748
Florian Weimer4813dbb2014-04-24 14:06:43 +02007492014-04-24 Florian Weimer <fweimer@redhat.com>
750
751 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
752
Florian Weimer35e2a762014-04-15 14:31:55 +02007532014-04-22 Florian Weimer <fweimer@redhat.com>
754
755 * dwarf_getalt.c, dwarf_setalt.c: New files.
756 * Makefile.am (libdw_a_SOURCES): Add them.
757 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
758 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
759 declarations.
760 * libdw.map (ELFUTILS_0.159): Export the two new functions.
761
Florian Weimerefa72a02014-04-15 14:04:19 +02007622014-04-15 Florian Weimer <fweimer@redhat.com>
763
764 * libdwP.h (enum IDX_gnu_debugaltlink): New.
765 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
766 .gnu_debugaltlink.
767 (check_section): Obtain .gnu_debugaltlink section from the
768 setiondata array.
769
Mark Wielaard93802972014-04-11 23:52:47 +02007702014-04-11 Mark Wielaard <mjw@redhat.com>
771
772 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
773 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
774 (libdwelf_objects): New variable.
775 (libdw_a_LIBADD): Add libdwelf objects.
776
Mark Wielaardeb4da482014-04-22 16:43:11 +02007772014-04-22 Mark Wielaard <mjw@redhat.com>
778
779 * memory-access.h (get_sleb128_step): Remove undefined behavior
780 of left shifting a signed value. Replace it with a multiplication.
781
Mark Wielaard32324792014-04-13 17:39:57 +02007822014-04-13 Mark Wielaard <mjw@redhat.com>
783
784 * Makefile.am: Remove !MUDFLAP conditions.
785
Mark Wielaard7f1eec32014-04-09 11:33:23 +02007862014-04-09 Mark Wielaard <mjw@redhat.com>
787
788 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
789 before calling malloc to uncompress data.
790
Jan Kratochvildff2a992014-03-04 00:04:27 +01007912014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
792
793 Fix abort() on missing section headers.
794 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
795 New label err to return NULL.
796
Josh Stone50d5b2c2014-02-05 11:26:27 -08007972014-02-05 Josh Stone <jistone@redhat.com>
798
799 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
800 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
801 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
802
Mark Wielaard19108012013-12-30 22:00:57 +01008032013-12-30 Mark Wielaard <mjw@redhat.com>
804
805 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
806 dwfl_linux_proc_attach.
807
Mark Wielaarde962ec32013-12-20 10:09:12 +01008082013-12-20 Mark Wielaard <mjw@redhat.com>
809
810 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
811
Mark Wielaard159ac522013-12-18 11:05:54 +01008122013-12-18 Mark Wielaard <mjw@redhat.com>
813
814 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
815 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
816 dwfl_module_getsym_info.
817
Mark Wielaard14c2d9e2013-12-16 13:28:59 +01008182013-12-16 Mark Wielaard <mjw@redhat.com>
819
820 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
821
Josh Stone4e2787c2013-12-10 14:19:09 -08008222013-12-10 Josh Stone <jistone@redhat.com>
823
824 * memory-access.h (get_uleb128_rest_return): Removed.
825 (get_sleb128_rest_return): Removed.
826 (get_uleb128_step): Make this a self-contained block.
827 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
828 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
829 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
830 (__libdw_get_uleb128): Simplify and inline for all callers.
831 (__libdw_get_sleb128): Ditto.
832 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
833 * memory-access.c: Delete file.
834 * Makefile.am (libdw_a_SOURCES): Remove it.
835 (DEFS): Remove the now unused -DIS_LIBDW.
836
Josh Stonec0d2a0b2013-12-09 13:52:10 -08008372013-12-09 Josh Stone <jistone@redhat.com>
838
839 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
840 __libdw_form_val_len, now handling only non-constant form lengths.
841 * libdwP.h (__libdw_form_val_len): New inlined function.
842
Mark Wielaard3951f2e2013-12-09 16:33:26 +01008432013-12-09 Mark Wielaard <mjw@redhat.com>
844
845 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
846 location expressions.
847 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
848 location found, return empty location expression.
849 * dwarf_getlocation_implicit_pointer.c
850 (dwarf_getlocation_implicit_pointer): Likewise.
851 (__libdw_empty_loc_attr): New internal function.
852 * libdwP.h (__libdw_empty_loc_attr): Define.
853
Mark Wielaard819c3492013-11-27 16:45:44 +01008542013-11-27 Mark Wielaard <mjw@redhat.com>
855
856 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
857 dwfl_module_getsym_elf.
858
Mark Wielaard16bc4562013-11-26 15:13:22 +01008592013-11-26 Mark Wielaard <mjw@redhat.com>
860
861 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
862 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
863 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
864 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
865 (ELFUTILS_0.158): ... here.
866
Mark Wielaard03d76f42013-11-09 16:45:22 +01008672013-11-09 Mark Wielaard <mjw@redhat.com>
868
869 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
870 check that it is zero.
871
Jan Kratochvil0b867462013-05-30 14:37:38 +02008722013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
873
874 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
875 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
876 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
877 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
878 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
879
Michael Forneya45c8042013-11-01 00:51:04 -07008802013-11-01 Michael Forney <mforney@mforney.org>
881
Michael Forneycdc09432013-11-01 00:51:05 -0700882 * Makefile.am (libdwfl_objects): New definition.
883 (libdw_a_LIBADD): Use libdwfl_objects.
884
8852013-11-01 Michael Forney <mforney@mforney.org>
886
Michael Forneya45c8042013-11-01 00:51:04 -0700887 * Makefile.am: Use READELF.
888
Jan Kratochvil3cf491e2013-10-30 10:48:20 +01008892013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
890
891 * libdw.map (ELFUTILS_0.158): New.
892
Mark Wielaarde6a9bb82013-10-10 11:40:12 +02008932013-10-10 Mark Wielaard <mjw@redhat.com>
894
895 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
896 start_addr and rename last_offset to last_addr. Now both void *.
897 (tree_visitor): Use start_add and die_addr instead of start_offset
898 and die_offset.
899 (dwarf_getfuncs): Use last_addr instead of last_offset.
900
Mark Wielaard3dec3e12013-10-06 17:04:07 +02009012013-10-06 Mark Wielaard <mjw@redhat.com>
902
903 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
904 DW_CFA_val_expression are not used with abi_cfi.
905
Josh Stone5dbbc5e2013-10-03 12:38:25 -07009062013-10-03 Josh Stone <jistone@redhat.com>
907
908 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
909 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
910 a unit, make sure to always hash the sig8 here, so none are missed.
911
Mark Wielaard74f9b732013-09-30 00:39:07 +02009122013-09-29 Mark Wielaard <mjw@redhat.com>
913
914 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
915 uintptr_t before casting to char *.
916 (__libdw_intern_expression): Cast data to uintptr_t before casting
917 to Dwarf_Word.
918 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
919 op->number2 to uintptr_t before casting to char *.
920
Josh Stonef06c8582013-09-24 15:52:05 -07009212013-09-24 Josh Stone <jistone@redhat.com>
922
923 * libdw_visit_scopes.c (classify_die): Removed.
924 (may_have_scopes): New function to replace classify_die. There's no
925 need for full classification; just find tags that may contain scopes.
926 (__libdw_visit_scopes): Use a direct tag comparison for imported
927 units, and use may_have_scopes to test if recursion is needed.
928
Mark Wielaard1b734df2013-09-20 09:50:42 -04009292013-09-20 Mark Wielaard <mjw@redhat.com>
930
931 * dwarf_getfuncs.c (visitor_info): New struct.
932 (tree_visitor): New function.
933 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
934 * libdw.h (dwarf_getfuncs): Expand function documentation.
935
Mark Wielaard18b2c672013-09-12 15:49:47 +02009362013-09-12 Mark Wielaard <mjw@redhat.com>
937
938 * fde.c (intern_fde): Free fde and set libdw errno when start
939 or end could not be read.
940
Mark Wielaardb2535b62013-08-30 23:55:12 +02009412013-08-24 Mark Wielaard <mjw@redhat.com>
942
943 * dwarf_getlocation.c (store_implicit_value): Don't take data
944 as argument, get block data from op number2. Return false when
945 block data length and op number don't match up.
946 (__libdw_intern_expression): Store start of block for
947 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
948 relative data offset. Also store block start (including length)
949 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
950 * dwarf_getlocation_attr.c: New file.
951 * dwarf_getlocation_die.c: Likewise.
952 * libdw.h (dwarf_getlocation_die): New function definition.
953 (dwarf_getlocation_attr): Likewise.
954 * libdwP.h: Declare internal dwarf_getlocation_die.
955 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
956 dwarf_getlocation_attr.
957 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
958 dwarf_getlocation_attr.c.
959
Mark Wielaard66eaae92013-08-23 16:12:37 +02009602013-08-23 Mark Wielaard <mjw@redhat.com>
961
962 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
963 (attr_base_address): New function.
964 (initial_offset_base): New function.
965 (getlocations_addr): New function. Taken from...
966 (dwarf_getlocation_addr): here. Use new initial_offset_base and
967 getlocations_addr.
968 (dwarf_getlocations): New function.
969 * libdw.h (dwarf_getlocations): New function definition.
970 * libdw.map (ELFUTILS_0.157): New.
971
Mark Wielaard5704c8c2013-07-02 11:22:35 +02009722013-07-02 Mark Wielaard <mjw@redhat.com>
973
Mark Wielaard4aacfc12013-07-02 16:36:16 +0200974 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
975 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
976 NEW_LINE macro. Free malloced line records if any at the end.
977
9782013-07-02 Mark Wielaard <mjw@redhat.com>
979
Mark Wielaard5704c8c2013-07-02 11:22:35 +0200980 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
981
Mark Wielaard79277072013-06-26 11:42:52 -04009822013-06-26 Mark Wielaard <mjw@redhat.com>
983
984 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
985 DIEs without children. Return an error whenever dwarf_child or
986 dwarf_siblingof return an error. Don't call recurse and increase
987 the depth for an imported unit. Walk the children of an imported
988 unit as if they are logical children of the parent root DIE.
989
Mark Wielaard9affad32013-05-03 11:28:49 +02009902013-05-03 Mark Wielaard <mjw@redhat.com>
991
992 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
993 when nlinelist > 0.
994
Jan Kratochvil904aec22013-04-30 14:27:16 +02009952013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
996
997 * libdw.map (ELFUTILS_0.156): New.
998
Mark Wielaardcdaaf212013-04-25 16:50:11 -04009992013-04-24 Mark Wielaard <mjw@redhat.com>
1000
1001 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1002
Mark Wielaardd4744a72013-04-10 15:52:57 +020010032013-04-10 Mark Wielaard <mjw@redhat.com>
1004
1005 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1006 equal to address size when we have a DW_FORM_ref_addr for DWARF
1007 version 2.
1008
Mark Wielaard60ef9ab2013-03-25 17:07:21 +010010092013-03-25 Mark Wielaard <mjw@redhat.com>
1010
1011 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1012 end_sequence.
1013
Mark Wielaardf1b06b52013-03-12 12:02:51 +010010142013-03-12 Mark Wielaard <mjw@redhat.com>
1015
1016 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1017 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1018
Mark Wielaard443304e2013-02-15 22:45:22 +010010192013-02-15 Mark Wielaard <mjw@redhat.com>
1020
1021 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1022 not dbg->sectiondata.
1023
Roland McGrath3999ce12013-01-07 14:53:37 -080010242013-01-07 Roland McGrath <roland@hack.frob.com>
1025
1026 * memory-access.h
1027 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1028 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1029
Mark Wielaard59254422012-12-18 14:14:22 +010010302012-12-18 Mark Wielaard <mjw@redhat.com>
1031
1032 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1033 (check_section): Likewise on error.
1034 (scngrp_read): Likewise.
1035 (dwarf_begin_elf): Likewise.
1036
Petr Machatab5c0b032012-10-09 02:11:29 +020010372012-10-09 Petr Machata <pmachata@redhat.com>
1038
1039 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1040 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1041 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1042 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1043
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +020010442012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1045
Jan Kratochvil1d67c0c2012-10-08 23:51:31 +02001046 * cfi.c: New include system.h.
1047 (execute_cfi) (enough_registers): Clear new memory after realloc.
1048
10492012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1050
Jan Kratochvil07f35072012-10-08 23:34:35 +02001051 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1052 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1053 searched PC.
1054
10552012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1056
Jan Kratochvil96a9fc62012-10-08 23:08:01 +02001057 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1058 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1059 Remove the later DW_OP_call_frame_cfa push to RESULT.
1060
10612012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1062
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +02001063 Code cleanup.
1064 * fde.c (binary_search_fde): Remove always true <address >= start>
1065 conditional. Move L initialization upwards.
1066
Mark Wielaardf5519fc2012-08-24 13:54:52 +020010672012-08-24 Mark Wielaard <mjw@redhat.com>
1068
1069 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1070 when ENABLE_DWZ is defined.
1071 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1072 defined.
1073
Mark Wielaardf31c4412012-08-17 00:35:03 +020010742012-08-16 Mark Wielaard <mjw@redhat.com>
1075
1076 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1077 * dwarf.h (DW_LANG_Go): Update comment.
1078 (DW_LANG_Mips_Assembler): Likewise.
1079
Mark Wielaard775375e2012-06-22 12:02:45 +020010802012-06-27 Mark Wielaard <mjw@redhat.com>
1081
1082 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1083 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1084 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1085 (try_debugaltlink): New function.
1086 (open_debugaltlink): Likewise.
1087 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1088 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1089 necessary.
1090 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1091 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1092 is an error here.
1093 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1094 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1095 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1096 calls.
1097 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1098 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1099 (struct Dwarf): Add alt_dwarf and free_alt fields.
1100 (__libdw_read_offset): Add dbg_ret argument, use to check with
1101 __libdw_offset_in_section.
1102 (__check_build_id): New function declaration.
1103 (dwarf_begin): Define as INTDECL.
1104 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1105 and DW_FORM_GNU_strp_alt.
1106
Mark Wielaard515fba92012-07-20 00:09:56 +020011072012-07-19 Mark Wielaard <mjw@redhat.com>
1108
1109 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1110
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +020011112012-07-24 Mark Wielaard <mjw@redhat.com>
1112
Mark Wielaardc4010b82012-07-24 13:20:41 +02001113 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1114 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1115 DW_LANG_ObjC.
1116
11172012-07-24 Mark Wielaard <mjw@redhat.com>
1118
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +02001119 * dwarf.h: Add DW_ATE_UTF.
1120
Mark Wielaardef5688e2012-06-27 10:15:27 +020011212012-06-27 Mark Wielaard <mjw@redhat.com>
1122
1123 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1124
Mark Wielaarda0172d72012-06-25 17:18:53 +020011252012-06-26 Mark Wielaard <mjw@redhat.com>
1126
1127 * libdwP.h: Add IDX_debug_macro.
1128 * dwarf.h: Add DW_AT_GNU_macros.
1129 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1130 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1131
Mark Wielaard54797252012-04-27 13:00:50 +020011322012-04-27 Mark Wielaard <mjw@redhat.com>
1133
1134 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1135 a constant offset from DW_AT_low_pc.
1136
Tom Tromey581c3f62012-03-21 08:54:32 -060011372012-03-19 Tom Tromey <tromey@redhat.com>
1138
1139 * libdw_findcu.c (findcu_cb): Move earlier.
1140 (__libdw_intern_next_unit): Add new CU to search tree here...
1141 (__libdw_findcu): ... not here.
1142
Mark Wielaardcb643d62012-01-31 19:22:03 +010011432012-01-31 Mark Wielaard <mjw@redhat.com>
1144
1145 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1146
Mark Wielaard387998b2011-10-31 15:01:50 +010011472011-11-31 Mark Wielaard <mjw@redhat.com>
1148
1149 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1150
Mark Wielaard0b72b652011-07-14 12:59:26 +020011512011-07-14 Mark Wielaard <mjw@redhat.com>
1152
1153 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1154
Jakub Jelinek03124242011-05-17 17:00:14 +020011552011-05-16 Jakub Jelinek <jakub@redhat.com>
1156
1157 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1158 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1159 New.
1160
Mark Wielaardf4c39c72011-04-26 17:15:28 +020011612011-04-26 Mark Wielaard <mjw@redhat.com>
1162
1163 * dwarf_child (dwarf_child): Sanity check end of section against
1164 cu_data () of die->cu.
1165
Mark Wielaarde3368c52011-03-22 23:03:31 +010011662011-03-22 Mark Wielaard <mjw@redhat.com>
1167
1168 * dwarf.h: Add DW_TAG_GNU_call_site,
1169 DW_TAG_GNU_call_site_parameter,
1170 DW_AT_GNU_call_site_value,
1171 DW_AT_GNU_call_site_data_value,
1172 DW_AT_GNU_call_site_target,
1173 DW_AT_GNU_call_site_target_clobbered,
1174 DW_AT_GNU_tail_call,
1175 DW_AT_GNU_all_tail_call_sites,
1176 DW_AT_GNU_all_call_sites,
1177 DW_AT_GNU_all_source_call_sites,
1178 and DW_OP_GNU_entry_value.
1179
Petr Machata02c56192011-03-10 01:50:32 +010011802011-03-10 Petr Machata <pmachata@redhat.com>
1181
1182 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1183 abbreviation with code 0.
1184
Petr Machata35870872011-03-09 10:01:29 -080011852011-03-09 Petr Machata <pmachata@redhat.com>
1186
1187 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1188
Roland McGrath725aad52011-02-23 19:52:46 -080011892011-02-23 Roland McGrath <roland@redhat.com>
1190
1191 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1192 Declare __libdw_free_zdata.
1193 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1194 (dwarf_end): Call it.
1195
1196 * dwarf_begin_elf.c (valid_p): Likewise.
1197 (check_section, scngrp_read): Likewise.
1198 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1199
Roland McGrath8c0a3822010-10-13 11:21:17 -070012002010-10-13 Roland McGrath <roland@redhat.com>
1201
1202 * dwarf.h: Add DW_LANG_Go.
1203
Roland McGrath5f95e2b2010-10-05 00:56:30 -070012042010-10-05 Roland McGrath <roland@redhat.com>
1205
1206 * dwarf_getaranges.c: Use malloc rather than alloca,
1207 since the total number of elements can be quite huge.
1208
Roland McGrath932585d2010-05-08 04:01:14 -070012092010-07-26 Roland McGrath <roland@redhat.com>
1210
1211 * dwarf_getlocation_implicit_pointer.c: New file.
1212 * Makefile.am (libdw_a_SOURCES): Add it.
1213 * libdw.map (ELFUTILS_0.149): New set.
1214 Add dwarf_getlocation_implicit_pointer.
1215 * libdw.h: Declare it.
1216
1217 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1218 (dwarf_offdie, dwarf_offdie_types): Update callers.
1219 * libdwP.h: Declare it.
1220
1221 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1222 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1223
Roland McGrathde44f132010-08-24 15:38:42 -070012242010-08-24 Roland McGrath <roland@redhat.com>
1225
1226 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1227
Roland McGrath00aca7f2010-07-27 04:40:23 -070012282010-07-27 Roland McGrath <roland@redhat.com>
1229
1230 * dwarf_formref_die.c: Fix sig8 hash insertion.
1231
Roland McGrath9616b852010-06-23 03:17:28 -070012322010-06-23 Roland McGrath <roland@redhat.com>
1233
1234 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1235 * libdw.h: Remove it.
1236 * libdw.map: Likewise.
1237
Roland McGrath499b8ff2010-06-22 13:13:53 -070012382010-06-22 Roland McGrath <roland@redhat.com>
1239
Roland McGrathc16966a2010-06-22 17:08:43 -07001240 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1241
Roland McGrath499b8ff2010-06-22 13:13:53 -07001242 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1243 opcode parsing.
1244
Roland McGrath0c5638c2010-06-21 23:00:35 -070012452010-06-21 Roland McGrath <roland@redhat.com>
1246
Roland McGrath474cb482010-06-22 00:10:54 -07001247 * dwarf.h: Add DW_TAG_GNU_* constants.
1248
Roland McGrath0c5638c2010-06-21 23:00:35 -07001249 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1250 10-byte case.
1251
Roland McGrath5cc030d2010-06-20 17:25:35 -070012522010-06-20 Roland McGrath <roland@redhat.com>
1253
Roland McGrath2b1f0952010-06-20 17:55:50 -07001254 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1255 to search TUs instead of CUs.
1256 * libdwP.h: Update decl.
1257 (struct Dwarf): New member tu_tree.
1258 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1259 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1260 (dwarf_offdie): ... here.
1261 (dwarf_offdie_types): New function.
1262 * libdw.h: Declare it.
1263 * libdw.map (ELFUTILS_0.148): Add it.
1264
Roland McGrath5cc030d2010-06-20 17:25:35 -07001265 * libdwP.h (CUDIE): Use cu_data.
1266 * dwarf_formblock.c: Likewise.
1267 * dwarf_formref_die.c: Likewise.
1268 * dwarf_diecu.c: Use CUDIE macro.
1269 * dwarf_formaddr.c: Use cu_sec_idx.
1270
Roland McGrathc70ebc02010-06-16 02:21:26 -070012712010-06-16 Roland McGrath <roland@redhat.com>
1272
Roland McGrath3e0f7d12010-06-15 23:10:35 -07001273 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1274 we don't repeat a CU lookup we've already done. Handle
1275 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1276
1277 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1278 broken out of ...
1279 (__libdw_findcu): ... here. Call it.
1280 * libdwP.h: Declare it.
1281 (struct Dwarf): New member next_tu_offset.
1282
1283 * dwarf_sig8_hash.c: New file.
1284 * dwarf_sig8_hash.h: New file.
1285 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1286 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1287 defining NO_UNDEF.
1288 * libdwP.h (struct Dwarf): New member sig8_hash.
1289 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1290 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1291
1292 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1293 (dwarf_nextcu): ... here. Call it.
1294 * libdw.h: Declare it.
1295 * libdwP.h: Add INTDECL.
1296 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1297 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1298
1299 * libdwP.h (cu_sec_idx, cu_data): New functions.
1300 Use .debug_types when CU is a TU.
1301 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1302 * dwarf_siblingof.c: Likewise.
1303 * dwarf_formstring.c: Likewise.
1304 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1305 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1306 (dwarf_getlocation_addr): Likewise.
1307
1308 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1309 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1310 .debug_types header size instead of .debug_info header size.
1311 (CUDIE): Use it.
1312 * dwarf_diecu.c: Update caller.
1313 * dwarf_getaranges.c: Likewise.
1314 * dwarf_nextcu.c: Likewise.
1315 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1316
Roland McGrath3e4b5bb2010-06-16 03:40:56 -07001317 * fde.c (fde_by_offset): Renamed to ...
1318 (__libdw_fde_by_offset): ... this, made global and internal_function.
1319 Don't take ADDRESS argument.
1320 (__libdw_find_fde): Update caller. Do address sanity check here.
1321 * cfi.h: Declare __libdw_fde_by_offset.
1322 * cfi.c (dwarf_cfi_validate_fde): New function.
1323 * libdw.h: Declare it.
1324 * libdw.map (ELFUTILS_0.148): Add it.
1325
Roland McGrath5f4b5082010-06-16 03:11:57 -07001326 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1327 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1328
Roland McGrath7934ded2010-06-16 03:04:09 -07001329 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1330 Don't assume DW_EH_PE_aligned refers to native address size.
1331
Roland McGrathc70ebc02010-06-16 02:21:26 -07001332 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1333 address.
1334
Roland McGrathc70cf4e2010-06-18 17:01:05 -070013352010-06-17 Roland McGrath <roland@redhat.com>
1336
1337 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1338 op_index.
1339 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1340 into an inner inline function. Set new fields. Check all fields for
1341 overflow when setting.
1342 * dwarf_lineisa.c: New file.
1343 * dwarf_linediscriminator.c: New file.
1344 * dwarf_lineop_index.c: New file.
1345 * Makefile.am (libdw_a_SOURCES): Add them.
1346 * libdw.map (ELFUTILS_0.148): Add them.
1347 * libdw.h: Declare them.
1348
Roland McGrath3f633072010-06-15 22:17:04 -070013492010-06-16 Roland McGrath <roland@redhat.com>
1350
Roland McGrath4a87dfa2010-06-16 16:35:10 -07001351 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1352
Roland McGrathb75f4442010-06-15 22:24:19 -07001353 * fde.c (fde_by_offset): Renamed to ...
1354 (__libdw_fde_by_offset): ... this, made global and internal_function.
1355 Don't take ADDRESS argument.
1356 (__libdw_find_fde): Update caller. Do address sanity check here.
1357 * cfi.h: Declare __libdw_fde_by_offset.
Roland McGrath9bcd2652010-06-15 22:17:20 -07001358 * cfi.c (dwarf_cfi_validate_fde): New function.
1359 * libdw.h: Declare it.
Roland McGrath3f633072010-06-15 22:17:04 -07001360 * libdw.map (ELFUTILS_0.148): Add it.
1361
Roland McGrath0b3363e2010-06-01 15:42:14 -07001362 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1363 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
Roland McGrath827d4d12010-06-01 20:17:36 -07001364
1365 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1366 Don't assume DW_EH_PE_aligned refers to native address size.
Roland McGrath1a030b32010-06-01 20:11:40 -07001367
1368 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
Roland McGrath675229b2010-06-01 20:10:19 -07001369 address.
1370
13712010-06-15 Roland McGrath <roland@redhat.com>
Roland McGrath52123962010-06-01 19:05:08 -07001372
1373 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001374 DW_FORM_ref_addr.
1375 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
Roland McGrath0b3363e2010-06-01 15:42:14 -07001376 here, since we don't support it yet.
1377
Mark Wielaard3f507bd2010-05-31 15:06:31 +02001378 * dwarf_next_cfi.c: Handle version 4 format.
1379
Mark Wielaard08e71db2010-05-31 15:39:15 +02001380 * dwarf_getsrclines.c: Handle version 4 format.
1381
13822010-06-01 Roland McGrath <roland@redhat.com>
1383
1384 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
Mark Wielaard3f507bd2010-05-31 15:06:31 +02001385 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1386
Eduardo Santiagod2240bc2010-05-28 14:26:52 -07001387 * libdwP.h (CIE_VERSION): Remove unused macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07001388
Ulrich Drepper49fe7142010-05-28 20:32:37 -07001389 * dwarf_getsrclines.c: Fix version field test.
1390 * libdwP.h (DWARF_VERSION): Remove useless macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07001391
Roland McGrathcfa5da22010-05-27 13:49:25 -07001392 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1393
1394 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1395
1396 * libdw_findcu.c (__libdw_findcu): Accept version 4.
Roland McGrath688f7fc2010-05-08 03:22:59 -07001397
13982010-05-31 Mark Wielaard <mjw@redhat.com>
1399
1400 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1401 * libdw.h (dwarf_cfi_cie_p): ... here.
1402
14032010-05-31 Mark Wielaard <mjw@redhat.com>
1404
1405 * dwarf.h: Fix DW_LANG_Python constant.
Roland McGrath0ab97832010-04-26 11:50:27 -07001406
14072010-05-28 Eduardo Santiago <santiago@redhat.com>
Roland McGrath3b10ac02010-04-26 18:45:36 -07001408
1409 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1410 thing.
1411
14122010-05-27 Roland McGrath <roland@redhat.com>
Roland McGrath0ab97832010-04-26 11:50:27 -07001413
1414 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1415 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1416
14172010-05-08 Roland McGrath <roland@redhat.com>
1418
1419 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
Roland McGrath3f9d9552010-04-22 20:51:07 -07001420 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1421 (getlocation): Update caller.
1422 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1423 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1424 * libdwP.h: Update decl.
1425
14262010-04-26 Roland McGrath <roland@redhat.com>
Roland McGrath8068e062010-03-10 23:49:13 -08001427
1428 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1429 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1430 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
Roland McGrath22359e22010-02-15 15:57:03 -08001431 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1432
1433 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1434 Prepend DW_OP_call_frame_cfa if true.
Mark Wielaardee29a312010-02-02 20:44:53 +01001435 (getlocation): Update caller.
1436 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1437 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1438 * libdwP.h: Update decl.
Roland McGrathf95760a2010-01-07 20:24:34 -08001439
14402010-04-22 Roland McGrath <roland@redhat.com>
1441
1442 * cfi.c (execute_cfi): Never return without cleanup.
Roland McGrath019d9fb2010-01-05 13:36:07 -08001443 Free FS on failure.
1444 (cie_cache_initial_state): Adjust caller to expect that free.
Roland McGrathebc5c882010-01-05 22:53:31 -08001445 (__libdw_frame_at_address): Likewise.
1446
14472010-03-10 Roland McGrath <roland@redhat.com>
1448
1449 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1450
14512010-02-15 Roland McGrath <roland@redhat.com>
1452
1453 * Makefile.am: Use config/eu.am for common stuff.
Roland McGrath0cb19832010-01-05 13:38:15 -08001454
14552010-02-02 Mark Wielaard <mjw@redhat.com>
Roland McGrath019d9fb2010-01-05 13:36:07 -08001456
1457 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
Roland McGrath888381b2009-11-21 17:03:34 -08001458
14592010-01-07 Roland McGrath <roland@redhat.com>
1460
1461 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1462
Roland McGrath9ca7bc42009-10-15 12:26:49 -070014632010-01-05 Roland McGrath <roland@redhat.com>
1464
1465 * dwarf_aggregate_size.c: New file.
1466 * Makefile.am (libdw_a_SOURCES): Add it.
1467 * libdw.h: Declare it.
Roland McGrath7e0aecd2009-09-17 15:02:34 -07001468 * libdwP.h: Add INTDECL.
1469 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1470
1471 * dwarf_srclang.c: Add INTDEF.
1472 * libdwP.h: Add INTDECL.
1473
Roland McGrathf0371042009-09-10 12:39:09 -07001474 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1475
1476 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1477
14782009-11-21 Roland McGrath <roland@redhat.com>
1479
1480 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1481 non-constant forms.
Mark Wielaard418ae4c2009-09-09 20:59:26 +02001482
14832009-10-15 Roland McGrath <roland@redhat.com>
1484
1485 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
Josh Stonecc93cc42009-08-21 18:04:44 -07001486 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1487
14882009-09-17 Roland McGrath <roland@redhat.com>
1489
Roland McGrath08277ba2009-08-10 15:08:08 -07001490 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1491 argument a pointer to const.
1492 * libdw.h: Update decl.
1493
Roland McGrathebfb6482009-08-09 15:40:52 -070014942009-09-10 Roland McGrath <roland@redhat.com>
1495
1496 * dwarf_getlocation.c (store_implicit_value): New function.
1497 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1498 (dwarf_getlocation_implicit_value): New function.
1499 * libdw.h: Declare it.
1500 * libdw.map (ELFUTILS_0.143): Add it.
1501
15022009-09-09 Mark Wielaard <mjw@redhat.com>
1503
1504 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1505
15062009-08-21 Josh Stone <jistone@redhat.com>
1507
Roland McGrathde69d522009-08-07 18:26:19 -07001508 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1509
15102009-08-10 Roland McGrath <roland@redhat.com>
1511
1512 * dwarf_getscopevar.c: Use dwarf_diename.
1513
15142009-08-09 Roland McGrath <roland@redhat.com>
1515
1516 * libdw.map (ELFUTILS_0.143): New version set,
1517 inherits from ELFUTILS_0.142.
Roland McGrathaf800142009-07-22 13:55:50 -07001518 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1519 alias in the ELFUTILS_0.122 version set and the default in the new set.
1520 * dwarf_srclang.c: Likewise.
1521 * dwarf_decl_file.c: Likewise.
1522 * dwarf_decl_line.c: Likewise.
1523 * dwarf_decl_column.c: Likewise.
1524 * dwarf_bytesize.c: Likewise.
1525 * dwarf_bitsize.c: Likewise.
1526 * dwarf_bitoffset.c: Likewise.
1527
15282009-08-07 Roland McGrath <roland@redhat.com>
1529
1530 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1531 * dwarf_srclang.c: Likewise.
1532 * dwarf_decl_file.c: Likewise.
1533 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
Roland McGrathe23e9e72009-07-21 18:14:52 -07001534 * dwarf_bytesize.c: Likewise.
1535 * dwarf_bitsize.c: Likewise.
1536 * dwarf_bitoffset.c: Likewise.
1537
15382009-07-22 Roland McGrath <roland@redhat.com>
1539
1540 * dwarf_frame_cfa.c: Change calling convention.
1541 * libdw.h: Update decl.
Roland McGrath96349ff2009-07-20 11:51:41 -07001542
1543 * dwarf_frame_register.c: Change calling/return-value convention for
1544 value-only results and undefined/same_value.
1545 * libdw.h: Update decl.
1546
Roland McGratha6abdfd2009-07-16 17:40:19 -07001547 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1548 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
Roland McGrathe160cc92009-07-16 17:48:27 -07001549 return that value instead.
1550 (getlocation): Update caller.
1551 * dwarf_frame_cfa.c: Likewise.
1552 * libdwP.h: Update decl.
1553
Roland McGratha6abdfd2009-07-16 17:40:19 -070015542009-07-21 Roland McGrath <roland@redhat.com>
1555
1556 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1557 Fix loop iteration after skipping a bogus or useless CU.
1558
1559 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1560 absence, not DWARF_E_NO_DEBUG_LINE.
Roland McGrath7dd94642009-07-15 11:14:23 -07001561
15622009-07-20 Roland McGrath <roland@redhat.com>
1563
1564 * dwarf_getlocation.c (__libdw_intern_expression):
1565 Handle DW_OP_stack_value.
Roland McGrath80893432009-07-13 12:08:55 -07001566
15672009-07-16 Roland McGrath <roland@redhat.com>
1568
1569 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001570 reject others when CU's version > 3.
1571
Roland McGrath3c84db32009-06-24 17:41:40 -07001572 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1573
1574 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1575 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1576 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1577 and DW_AT_const_expr.
1578 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1579 and DW_FORM_ref_sig8.
1580
15812009-07-15 Roland McGrath <roland@redhat.com>
1582
1583 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1584 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1585
15862009-07-13 Roland McGrath <roland@redhat.com>
1587
1588 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1589
15902009-07-08 Roland McGrath <roland@redhat.com>
1591
1592 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1593 dwfl_module_eh_cfi.
1594
1595 * libdwP.h (struct Dwarf): Add member `cfi'.
1596 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1597 * dwarf_getcfi.c: New file.
1598 * dwarf_getcfi_elf.c: New file.
1599 * dwarf_cfi_end.c: New file.
1600 * dwarf_cfi_addrframe.c: New file.
1601 * dwarf_frame_cfa.c: New file.
1602 * dwarf_frame_register.c: New file.
1603 * dwarf_frame_return_address_register.c: New file.
1604 * Makefile.am (libdw_a_SOURCES): Add them.
1605 * unwind.h: Declare those functions.
1606 * libdw.map (ELFUTILS_0.142): Export them.
1607
1608 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1609 broken out of ...
1610 (getlocation): ... here, call it.
1611 * libdwP.h: Declare it.
1612
1613 * cie.c: New file.
1614 * fde.c: New file.
1615 * frame-cache.c: New file.
1616 * cfi.c: New file.
1617 * cfi.h: New file.
1618 * encoded-value.h: New file.
1619 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1620 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1621 * dwarf_error.c (errmsgs): Add element for it.
1622
1623 * dwarf_next_cfi.c: New file.
1624 * Makefile.am (libdw_a_SOURCES): Add it.
Roland McGrath6e1f4652009-07-08 14:48:34 -07001625 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1626 Declare dwarf_next_cfi.
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001627 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1628 Add dwarf_next_cfi.
1629
1630 * memory-access.h [! ALLOW_UNALIGNED]
Roland McGrath05c4e042009-06-18 13:56:02 -07001631 (read_2ubyte_unaligned): Renamed to ...
1632 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1633 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1634 (read_2sbyte_unaligned): Likewise.
1635 (read_4ubyte_unaligned): Likewise.
1636 (read_4sbyte_unaligned): Likewise.
1637 (read_8ubyte_unaligned): Likewise.
1638 (read_8sbyte_unaligned): Likewise.
1639
Ulrich Drepper99d23722009-06-14 20:19:45 -07001640 * libdwP.h (IDX_eh_frame): Remove it.
1641 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1642
16432009-07-08 Roland McGrath <roland@redhat.com>
1644
1645 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1646
1647 * dwarf_getlocation.c (check_constant_offset): New function.
1648 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1649 handle DW_AT_data_member_location of data[48] as constant offset.
1650
16512009-06-18 Roland McGrath <roland@redhat.com>
1652
1653 * libdwP.h (__libdw_read_address_inc): Constify.
1654 (__libdw_read_offset_inc): Likewise.
1655 * dwarf_getaranges.c: Likewise.
1656 * dwarf_getlocation.c: Likewise.
1657 * dwarf_getsrclines.c: Likewise.
1658 * dwarf_nextcu.c: Likewise.
1659
16602009-05-05 Petr Machata <pmachata@redhat.com>
1661
1662 * libdwP.h (__libdw_formptr): Declare new function.
1663 * dwarf_formudata.c: Implement it here.
1664 * dwarf_getlocation.c (dwarf_getlocation_addr):
1665 Call it instead of hand-rolled offset handling code.
1666 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1667 * dwarf_ranges.c (dwarf_ranges): Likewise.
1668
16692009-05-04 Petr Machata <pmachata@redhat.com>
1670
1671 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1672 * dwarf_ranges.c: Implement it here.
1673 (dwarf_ranges): Call it.
Roland McGrathe2eabd82009-05-07 18:54:52 -07001674 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1675
16762009-04-23 Petr Machata <pmachata@redhat.com>
1677
1678 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1679 of read_*ubyte_unaligned.
Petr Machataf3df61f2009-05-07 21:02:33 +02001680 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1681 * dwarf_formstring.c (dwarf_formstring): Likewise.
1682 * dwarf_formudate.c (dwarf_formudata): Likewise.
1683 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1684 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
Roland McGrath2fb90512009-04-15 14:47:13 -07001685 * dwarf_getpubnames.c (get_offsets): Likewise.
1686 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1687
16882009-04-23 Petr Machata <pmachata@redhat.com>
1689
Roland McGrath6a4bdd92009-04-01 14:25:29 -07001690 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1691 __libdw_read_addr, __libdw_read_off): Add four new internal
1692 functions.
1693
Roland McGrathc5acb302009-01-28 18:28:52 -080016942009-05-07 Roland McGrath <roland@redhat.com>
1695
Roland McGrath03288f02009-01-28 22:00:54 -08001696 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1697 return value and OFFSET argument, not CU-relative. Only fetch the
1698 attribute data when called with OFFSET of 0.
Roland McGrathc5acb302009-01-28 18:28:52 -08001699
17002009-05-07 Petr Machata <pmachata@redhat.com>
Roland McGrathf46272a2009-01-26 18:36:16 -08001701
1702 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1703 DW_AT_macro_info attribute of CU DIE.
1704
Roland McGrathd31505f2009-01-25 19:37:33 -080017052009-04-15 Roland McGrath <roland@redhat.com>
1706
1707 * dwarf.h (DW_CIE_ID): Removed.
1708 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
Roland McGrath3bf7a092009-01-23 16:34:07 -08001709
17102009-04-01 Roland McGrath <roland@redhat.com>
1711
1712 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1713
Roland McGrathafdd51e2009-01-22 02:26:24 -080017142009-01-28 Roland McGrath <roland@redhat.com>
1715
1716 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1717 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
Roland McGrath1ea4fdc2009-01-21 19:14:37 -08001718
1719 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1720
17212009-01-26 Roland McGrath <roland@redhat.com>
1722
1723 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
Roland McGrath24b03302009-01-17 14:34:13 -08001724
17252009-01-25 Roland McGrath <roland@redhat.com>
Roland McGrath54456d82009-01-17 14:39:35 -08001726
1727 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1728
Roland McGrath5513e642009-01-11 01:35:11 -080017292009-01-23 Roland McGrath <roland@redhat.com>
1730
1731 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1732 Put these rules under if MAINTAINER_MODE.
1733
17342009-01-22 Roland McGrath <roland@redhat.com>
1735
Roland McGrath24b03302009-01-17 14:34:13 -08001736 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1737
Ulrich Drepper7e678fa2009-01-10 18:02:05 -080017382009-01-21 Roland McGrath <roland@redhat.com>
1739
1740 * Makefile.am (CLEANFILES): Renamed to ...
1741 (MOSTLYCLEANFILES): ... here.
Roland McGrathe06762c2009-01-08 13:39:08 -08001742 (CLEANFILES): New variable, add known-dwarf.h.
1743
17442009-01-17 Roland McGrath <roland@redhat.com>
1745
Roland McGrath7e827f22009-01-06 02:09:50 -08001746 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
Roland McGrath1f6d2012008-12-31 00:21:04 -08001747 Make it unconditional.
1748 (BUILT_SOURCES): Updated.
1749
1750 * dwarf.h: Add description comments for DW_LANG_* values.
Roland McGrathbca43152009-01-05 23:59:32 -08001751
1752 * Makefile.am [MAINTAINER_MODE]
1753 ($(srcdir)/known-dwarf.h): New target.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001754 (BUILT_SOURCES): Add it.
1755
Roland McGrathc462c632009-01-06 01:04:31 -08001756 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001757
17582009-01-10 Ulrich Drepper <drepper@redhat.com>
1759
1760 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00001761
17622009-01-08 Roland McGrath <roland@redhat.com>
1763
1764 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1765
Ulrich Drepper8d358d92008-01-22 06:34:31 +000017662008-01-06 Roland McGrath <roland@redhat.com>
1767
1768 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1769 Reorder members.
1770 * dwarf_haschildren.c: Return -1 for error case, not 0.
1771
1772 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1773
Ulrich Drepperb27ce002008-01-18 20:08:54 +000017742009-01-06 Ulrich Drepper <drepper@redhat.com>
1775
1776 * dwarf.h: Add definition for unwind and call frame information.
1777
1778 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
Ulrich Drepper35f08c42008-01-18 19:59:08 +00001779 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1780
17812008-08-15 Roland McGrath <roland@redhat.com>
1782
1783 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1784 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1785
17862008-01-21 Ulrich Drepper <drepper@redhat.com>
1787
1788 * dwarf_child.c: Minor optimizations.
1789 * dwarf_getattrs.c: Likewise.
1790 * dwarf_getpubnames.c: Likewise.
1791 * dwarf_siblingof.c: Likewise.
Ulrich Dreppera969d8e2008-01-22 06:15:00 +00001792 * dwarf_tag.c: Likewise.
Ulrich Drepper35f08c42008-01-18 19:59:08 +00001793
17942008-01-18 Ulrich Drepper <drepper@redhat.com>
1795
1796 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1797 of DWARF_VERSION comparison, just fail if the file's version is newer.
1798
17992008-01-17 Nick Clifton <nickc@redhat.com>
1800
1801 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1802 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1803 (DWARF3_LENGTH_64_BIT): New define.
1804 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1805 * dwarf_getpubnames: Include dwarf.h.
1806 (get_offsets): Use the new definitions.
1807 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1808 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1809 (dwarf_nextcu): Use the new definitions.
1810
1811 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1812 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1813 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1814 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1815
1816 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1817 error return.
1818
1819 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1820
1821 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1822 Set the address in the return structure to the address of the next
1823 non-sibling die, if there is no sibling and the return pointer is
1824 not the same as the die pointer.
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001825 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1826
1827 * dwarf_child.c: Fix typo in comment.
1828
1829 * libdwP.h (DWARF_VERSION): Change to 3.
1830
Roland McGrathe4c22ea2007-10-23 13:07:39 +00001831 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1832 not have a initialised valp pointer.
1833
1834 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1835 the end of the attributes is reached. When the callback fails,
1836 return the address of the failing attribute, not the address of
1837 its successor.
1838 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1839
1840 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1841 (dwarf_child): Likewise.
1842 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1843 (dwarf_tag): Likewise.
1844
18452008-01-08 Roland McGrath <roland@redhat.com>
1846
1847 * Makefile.am (euinclude): Variable removed.
1848 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1849 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00001850
18512007-10-17 Roland McGrath <roland@redhat.com>
1852
1853 * libdw.h (__deprecated_attribute__): New macro.
1854 (dwarf_formref): Mark it deprecated.
1855 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1856 (dwarf_formref): ... here. Call it. Remove INTDEF.
Roland McGrath59ea7f32007-10-04 08:50:09 +00001857 * libdwP.h: Remove INTDECL.
1858 Declare __libdw_formref.
1859 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1860 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1861
1862 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1863 needs to check CU->version.
1864
Roland McGrath057ec6b2007-10-02 20:55:05 +00001865 * libdwP.h (struct Dwarf_CU): New member `version'.
1866 * libdw_findcu.c (__libdw_findcu): Initialize it.
1867
1868 * dwarf_child.c: Return 1 for null entry as first child.
1869
Roland McGrathd1a48172007-08-07 19:51:01 +000018702007-10-05 Roland McGrath <roland@redhat.com>
1871
1872 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1873
1874 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1875 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1876
18772007-10-03 Roland McGrath <roland@redhat.com>
1878
1879 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1880 and dwfl_build_id_find_debuginfo.
Roland McGrath87d47802007-07-16 22:23:37 +00001881
1882 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1883 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1884
18852007-10-02 Roland McGrath <roland@redhat.com>
Roland McGrath43da9892007-04-16 23:13:37 +00001886
1887 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1888 structure_type.
1889
Roland McGrathbf2ee482007-04-05 09:27:36 +000018902007-08-07 Roland McGrath <roland@redhat.com>
1891
Roland McGrath43da9892007-04-16 23:13:37 +00001892 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1893 error code is DWARF_E_NOERROR (0).
1894
1895 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1896 Fix typo in __libdw_visit_scopes argument.
1897
1898 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1899 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1900
19012007-07-03 Roland McGrath <roland@redhat.com>
Roland McGrathbf2ee482007-04-05 09:27:36 +00001902
1903 * libdw.h (__extern_inline): New macro.
1904 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1905
Ulrich Drepperc07fbb32007-03-30 19:14:59 +000019062007-04-16 Roland McGrath <roland@redhat.com>
1907
1908 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1909
19102007-04-05 Roland McGrath <roland@redhat.com>
1911
1912 * dwarf_getsrcdirs.c: New file.
1913 * Makefile.am (libdw_a_SOURCES): Add it.
Ulrich Drepper6258e742007-03-13 06:22:40 +00001914 * libdw.h: Declare dwarf_getsrcdirs.
1915 * libdw.map (ELFUTILS_0.127): Add it.
1916
1917 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1918 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1919 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1920 Save DIRARRAY in the Dwarf_Files.
1921
1922 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
Ulrich Drepper903c1162007-02-15 19:40:37 +00001923 address to check for all-ones base address entry. Check directly.
1924 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1925
19262007-03-25 Roland McGrath <roland@redhat.com>
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00001927
1928 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1929 Return NULL when freeing RESULT on error.
1930 (global_read, scngrp_read): Check return value from check_section,
1931 break out of loop after it has freed RESULT.
1932 (valid_p): Handle null argument.
1933
Roland McGrath8190db62006-12-17 23:56:51 +000019342007-03-12 Roland McGrath <roland@redhat.com>
1935
1936 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1937
19382007-03-04 Roland McGrath <roland@redhat.com>
Roland McGrathc373d852006-10-10 00:25:21 +00001939
1940 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1941 ELFUTILS_0.126. Add dwfl_module_addrsym.
1942
19432007-02-10 Roland McGrath <roland@redhat.com>
1944
1945 * dwarf.h (DW_OP_fbreg): Comment fix.
1946
19472007-02-03 Roland McGrath <roland@redhat.com>
1948
1949 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1950 * libdw.map (ELFUTILS_0.126): New version set, inherits from
Ulrich Drepper077c65f2006-07-12 19:54:51 +00001951 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1952 exported in the past.
1953
19542006-12-17 Roland McGrath <roland@redhat.com>
1955
1956 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1957 address when the CU is missing attributes due to buggy GCC.
1958
Ulrich Dreppere1812e12006-07-12 07:46:03 +000019592006-08-29 Roland McGrath <roland@redhat.com>
1960
1961 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1962
1963 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1964 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1965
Ulrich Drepper3be74472006-05-27 18:15:40 +00001966 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1967 result is aligned. Adjust NEWP->remaining here for this allocation.
1968 * libdwP.h: Update decl.
1969 (libdw_alloc): Update caller.
Ulrich Dreppere7a73172006-05-22 18:16:45 +00001970
19712006-07-12 Ulrich Drepper <drepper@redhat.com>
1972
1973 * dwarf_child.c: Adjust for internal_function_def removal.
1974 * dwarf_getabbrev.c: Likewise.
Ulrich Drepper4f3d2a22006-05-22 01:30:56 +00001975 * dwarf_tag.c: Likewise.
1976 * libdw_form.c: Likewise.
1977 * memory-access.c: Likewise.
1978
19792006-06-28 Roland McGrath <roland@redhat.com>
Roland McGrath2dade662006-02-28 22:13:20 +00001980
1981 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1982
1983 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1984 dwfl_module_getsym.
1985
Roland McGrath08333122006-02-27 04:54:26 +000019862006-05-27 Ulrich Drepper <drepper@redhat.com>
1987
1988 * libdw.h: Add extern "C".
1989
Roland McGrath50ffcbf2005-12-23 01:51:43 +000019902006-05-22 Ulrich Drepper <drepper@redhat.com>
1991
1992 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1993 aranges information.
Roland McGrathdec3a242005-12-12 08:35:55 +00001994
19952006-05-21 Ulrich Drepper <drepper@redhat.com>
1996
1997 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1998 dwarf_haschildren.
Roland McGrathf64a4422005-12-09 23:40:30 +00001999
20002006-02-28 Roland McGrath <roland@redhat.com>
2001
2002 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2003 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2004 values from DWARF 3.0.
Roland McGrath994b4892005-12-05 22:46:21 +00002005
20062006-02-22 Roland McGrath <roland@redhat.com>
2007
2008 * libdw.map: Bump to 0.120; export dwfl_version.
Roland McGrathe47ab762005-11-17 03:16:00 +00002009
20102005-12-22 Roland McGrath <roland@redhat.com>
2011
2012 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2013
20142005-12-12 Roland McGrath <roland@redhat.com>
2015
2016 * dwarf_ranges.c: Copy CU base address-finding code from
Roland McGrath07d4f2f2005-10-28 06:56:24 +00002017 dwarf_getlocation.
2018
20192005-12-09 Roland McGrath <roland@redhat.com>
2020
2021 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2022 Delay CU base lookup until it's needed.
2023 If CU base lookup fails with no error, flag invalid DWARF.
2024
20252005-11-25 Roland McGrath <roland@redhat.com>
2026
2027 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2028
Roland McGrath6724c902005-10-28 07:07:19 +000020292005-11-15 Roland McGrath <roland@redhat.com>
2030
2031 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2032
20332005-11-13 Roland McGrath <roland@redhat.com>
2034
2035 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2036
20372005-10-27 Roland McGrath <roland@redhat.com>
2038
2039 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2040 don't match end_sequence markers.
2041
2042 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2043 before normal records at the same address.
2044 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2045 marker.
2046
20472005-10-26 Roland McGrath <roland@redhat.com>
2048
2049 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2050 * dwarf_func_file.c: Renamed to ...
2051 * dwarf_decl_file.c: ... here.
2052 * dwarf_func_col.c: Renamed to ...
2053 * dwarf_decl_column.c: ... here.
2054 * dwarf_func_line.c: Renamed to ...
2055 * dwarf_decl_line.c: ... here.
2056 (dwarf_func_line): Renamed to ...
2057 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2058 (__libdw_func_intval): Renamed __libdw_attr_intval.
2059 * dwarf_func_name.c: File removed.
2060 * dwarf_func_lowpc.c: File removed.
2061 * dwarf_func_highpc.c: File removed.
2062 * dwarf_func_entrypc.c: File removed.
2063 * dwarf_func_die.c: File removed.
2064 * Makefile.am (libdw_a_SOURCES): Updated.
2065 * libdw.h: Update decls.
2066 (Dwarf_Func): Type removed.
2067 * libdwP.h: Update decls.
Roland McGrath07d4f2f2005-10-28 06:56:24 +00002068 (struct Dwarf_Func_s): Type removed.
2069 * libdw.map: Updated.
2070
2071 * libdwP.h (CUDIE): New macro.
2072 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2073 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2074 * dwarf_ranges.c (dwarf_ranges): Likewise.
2075
2076 * dwarf_getloclist.c: Renamed to ...
2077 * dwarf_getlocation.c: ... here.
2078 (getloclist): Renamed to getlocation.
2079 (dwarf_getloclist): Renamed to dwarf_getlocation.
2080 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2081 * Makefile.am (libdw_a_SOURCES): Updated.
2082 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2083 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2084 (Dwarf_Loc): Renamed Dwarf_Op.
2085 * libdwP.h (struct loc_s): Update use.
2086 * libdw.map: Update map.
2087
2088 * dwarf_entry_breakpoints.c: Use the second line record within the
2089 function, regardless of its source location data.
2090
20912005-10-25 Roland McGrath <roland@redhat.com>
2092
2093 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2094
2095 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2096
20972005-10-14 Roland McGrath <roland@redhat.com>
2098
2099 * dwarf_diecu.c (dwarf_diecu): New file.
2100 * Makefile.am (libdw_a_SOURCES): Add it.
2101 * libdw.h: Declare dwarf_diecu.
2102 * libdw.map: Export it.
2103
2104 * libdw.map: Bump to 0.116; export dwarf_ranges.
2105
21062005-09-20 Roland McGrath <roland@redhat.com>
2107
2108 * dwarf_haspc.c: Use dwarf_ranges.
2109 * dwarf_entry_breakpoints.c: Likewise.
2110
2111 * dwarf_ranges.c: New file.
2112 * Makefile.am (libdw_a_SOURCES): Add it.
2113 * libdw.h: Declare dwarf_ranges.
2114 * libdwP.h: Add INTDECL.
2115
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000021162005-09-14 Roland McGrath <roland@redhat.com>
2117
2118 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2119 prologue_end marker scanning loop.
2120
21212005-09-11 Roland McGrath <roland@redhat.com>
Roland McGrath71e15a02005-08-27 10:33:26 +00002122
2123 * dwarf.h: Comment typo fix.
2124
21252005-09-07 Roland McGrath <roland@redhat.com>
2126
2127 * dwarf_entry_breakpoints.c: New file.
2128 * Makefile.am (libdw_a_SOURCES): Add it.
2129 * libdw.h: Declare dwarf_entry_breakpoints.
2130
2131 * dwarf_entrypc.c: New file.
2132 * Makefile.am (libdw_a_SOURCES): Add it.
2133 * libdw.h: Declare dwarf_entrypc.
2134 * libdwP.h: Add INTDECL.
2135
21362005-08-28 Ulrich Drepper <drepper@redhat.com>
2137
2138 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2139 (%.os): Use COMPILE.os.
2140 (COMPILE.os): Filter out gconv options.
2141
21422005-08-27 Roland McGrath <roland@redhat.com>
2143
Roland McGrathd17fac72005-08-23 08:20:21 +00002144 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2145 __libdw_visit_scopes.
2146
2147 * dwarf_getscopes_die.c: New file.
2148 * Makefile.am (libdw_a_SOURCES): Add it.
2149 * libdw.h: Declare dwarf_getscopes_die.
2150 * libdw.map: Bump to 0.115 and add it.
2151
2152 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2153 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2154 Take two functions for both preorder and postorder visitors.
2155 * libdwP.h: Update decl.
2156 (struct Dwarf_Die_Chain): New type.
2157 * dwarf_func_inline.c: Update uses.
2158
2159 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2160 Add INTDEF.
Roland McGrathf5fda7d2005-08-18 22:01:57 +00002161 * libdwP.h: Add INTDECL.
2162 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2163
21642005-08-23 Roland McGrath <roland@redhat.com>
2165
Roland McGrath1ecb6062005-08-15 09:53:04 +00002166 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2167 DW_AT_specification the same as DW_AT_abstract_origin.
2168
21692005-08-20 Roland McGrath <roland@redhat.com>
2170
2171 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2172 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2173 and dwfl_report_offline.
2174
21752005-08-19 Roland McGrath <roland@redhat.com>
2176
2177 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
Roland McGrath1c83bf12005-08-11 07:03:55 +00002178 Add dwfl_module_relocate_address, dwfl_module_relocations,
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002179 dwfl_module_relocation_info.
Roland McGrath1c83bf12005-08-11 07:03:55 +00002180
21812005-08-18 Roland McGrath <roland@redhat.com>
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002182
Roland McGrath4959bf82005-08-09 10:31:08 +00002183 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2184 outermost scope in the results.
Roland McGrathb6312e12005-08-09 10:36:01 +00002185
21862005-08-15 Roland McGrath <roland@redhat.com>
Roland McGrath4959bf82005-08-09 10:31:08 +00002187
2188 * dwarf_func_inline.c: New file.
2189 * Makefile.am (libdw_a_SOURCES): Add it.
2190 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
Roland McGratha5a89682005-08-02 01:24:01 +00002191 * libdw.map: Add them.
2192
2193 * dwarf_func_die.c: New file.
2194 * Makefile.am (libdw_a_SOURCES): Add it.
2195 * libdw.h: Declare dwarf_func_die.
Ulrich Drepper18618fd2005-07-28 21:29:22 +00002196 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2197
21982005-08-10 Ulrich Drepper <drepper@redhat.com>
2199
2200 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
Roland McGrath366784a2005-07-28 06:20:53 +00002201 of DW_LNS_set_epilog_begin.
2202
Roland McGrath18385902005-07-28 07:12:38 +000022032005-08-09 Roland McGrath <roland@redhat.com>
2204
2205 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2206
2207 * dwarf_end.c: Add INTDEF.
2208 * dwarf_error.c (dwarf_errmsg): Likewise.
Roland McGrath366784a2005-07-28 06:20:53 +00002209 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2210
22112005-08-01 Roland McGrath <roland@redhat.com>
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00002212
2213 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2214 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2215
22162005-07-28 Ulrich Drepper <drepper@redhat.com>
2217
2218 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2219 (libdw_a_LIBADD): Add all files from libdwfl.a.
2220
22212005-07-27 Roland McGrath <roland@redhat.com>
2222
2223 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2224 along with ../libebl/libebl.a and ../lib/libeu.a;
2225 depend on ../libelf/libelf.so.
2226 (libdw_so_LDADD): New variable.
2227 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2228
2229 * libdw.map: Define an empty base version and move all symbols to
2230 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2231
22322005-07-23 Ulrich Drepper <drepper@redhat.com>
2233
2234 * dwarf_error.c: Add internal alias for dwarf_errno.
2235 * libdwP.h: Declare __dwarf_errno_internal.
2236 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2237
2238 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2239 global_error.
2240
22412005-06-01 Roland McGrath <roland@redhat.com>
2242
2243 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2244 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2245
22462005-06-08 Roland McGrath <roland@redhat.com>
2247
2248 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2249 (get_sleb128_step, get_sleb128): Likewise.
2250 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2251 * dwarf_getloclist.c (getloclist): Likewise.
2252 * dwarf_formblock.c (dwarf_formblock): Likewise.
2253 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2254 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2255 * dwarf_formref.c (dwarf_formref): Likewise.
2256 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2257 * dwarf_formudata.c (dwarf_formudata): Likewise.
2258 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2259 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2260 * dwarf_tag.c (dwarf_tag): Likewise.
2261 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2262 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2263 * libdw_form.c (__libdw_form_val_len): Likewise.
2264 * libdwP.h: Update decl.
2265
22662005-06-04 Roland McGrath <roland@redhat.com>
2267
2268 * memory-access.h (get_uleb128_rest_return): New macro.
2269 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2270 (get_sleb128_rest_return): New macro.
2271 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2272 * memory-access.c: New file.
2273 * Makefile.am (libdw_a_SOURCES): Add it.
2274 (DEFS): Add -DIS_LIBDW.
2275
22762005-05-31 Roland McGrath <roland@redhat.com>
2277
2278 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2279 formref offset.
2280
22812005-05-30 Roland McGrath <roland@redhat.com>
2282
2283 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2284 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2285
2286 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2287 BEGIN value. Instead, match base address entries separately for
2288 32/64 size cases.
2289
22902005-05-28 Roland McGrath <roland@redhat.com>
2291
2292 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2293 past location expression contents.
2294
22952005-05-23 Roland McGrath <roland@redhat.com>
2296
2297 * dwarf_getsrclines.c: Comment typo fix.
2298
2299 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2300 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2301
23022005-05-22 Ulrich Drepper <drepper@redhat.com>
2303
2304 * libdwP.h: Only use INTDECL for alias prototypes.
2305
23062005-05-19 Roland McGrath <roland@redhat.com>
2307
2308 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2309
2310 * dwarf_getscopevar.c: New file.
2311 * Makefile.am (libdw_a_SOURCES): Add it.
2312 * libdw.h: Declare dwarf_getscopevar.
2313
2314 * dwarf_getsrcfiles.c: Add INTDEF.
2315 * dwarf_haschildren.c: Likewise.
2316 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2317
2318 * dwarf_getscopes.c: New file.
2319 * Makefile.am (libdw_a_SOURCES): Add it.
2320 * libdw.h: Declare dwarf_getscopes.
2321 * libdw.map: Add it.
2322
23232005-05-18 Roland McGrath <roland@redhat.com>
2324
2325 * libdwP.h (IDX_debug_ranges): New enum constant.
2326 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2327 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2328 * dwarf_error.c (errmsgs): Add it.
2329 * dwarf_haspc.c: New file.
2330 * libdw.h: Declare dwarf_haspc.
2331 * libdw.map: Add it.
2332 * libdwP.h: Add INTDECL.
2333
2334 * dwarf_attr_integrate.c: New file.
2335 * dwarf_hasattr_integrate.c: New file.
2336 * Makefile.am (libdw_a_SOURCES): Add them.
2337 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2338 * libdw.map: Add them.
2339
2340 * dwarf_hasattr.c: Add INTDEF.
2341 * libdwP.h: Add INTDECL for it.
2342
2343 * dwarf_formref_die.c: New file.
2344 * Makefile.am (libdw_a_SOURCES): Add it.
2345 * libdw.h (dwarf_formref_die): Declare it.
2346 * libdwP.h (dwarf_formref_die): Add INTDECL.
2347 * libdw.map: Add it.
2348
2349 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2350 of ...
2351 (dwarf_getloclist): ... here. Call them.
2352 (dwarf_addrloclists): New function.
2353 * libdw.h: Declare it.
2354 * libdw.map: Add it.
2355
2356 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2357 DW_MACINFO_end_file. Recognize type 0 as terminator.
2358
23592005-05-05 Roland McGrath <roland@redhat.com>
2360
2361 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2362
2363 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2364 the line program does not produce all entries in ascending order.
2365
23662005-04-25 Ulrich Drepper <drepper@redhat.com>
2367
2368 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2369 occurences (e.g., inlines) better.
2370
23712005-04-24 Ulrich Drepper <drepper@redhat.com>
2372
2373 * libdw.h (DWARF_END_ABBREV): Define.
2374 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2375 end is reached.
2376 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2377 of records reached.
2378 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2379 as error of __libdw_getabbrev.
2380
23812005-04-04 Ulrich Drepper <drepper@redhat.com>
2382
2383 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2384
2385 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2386 results back to caller.
2387
23882005-04-04 Roland McGrath <roland@redhat.com>
2389
2390 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2391
2392 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2393 defn.
2394
23952005-04-04 Ulrich Drepper <drepper@redhat.com>
2396
2397 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2398
2399 * dwarf_getsrc_file.c: New file.
2400 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2401 * libdw.h: Declare dwarf_getsrc_file.
2402 * libdw.map: Add dwarf_getsrc_file.
2403
24042005-04-02 Ulrich Drepper <drepper@redhat.com>
2405
2406 * dwarf_func_entrypc.c: New file.
2407 * dwarf_func_col.c: New file.
2408 * dwarf_func_line.c: New file.
2409 * dwarf_func_file.c: New file.
2410 * libdw.h: Add prototypes for new functions.
2411 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2412 dwarf_func_file.
2413 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2414 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2415 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2416 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2417 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2418 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2419
2420 * dwarf.h: Add some DWARF3 definitions.
2421
24222005-04-01 Ulrich Drepper <drepper@redhat.com>
2423
2424 * dwarf_getfuncs.c: New file.
2425 * dwarf_func_highpc.c: New file.
2426 * dwarf_func_lowpc.c: New file.
2427 * dwarf_func_name.c: New file.
2428 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2429 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2430 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2431 and dwarf_func_name.
2432 * libdw.h: Add prototypes for new functions.
2433 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2434 * dwarf_siblingof.c: Likewise.
2435 * dwarf_dieoffset.c: Likewise.
2436 * dwarf_highpc.c: Likewise.
2437 * dwarf_lowpc.c: Likewise.
2438 * libdwP.h: Add prototypes for internal functions.
2439 Define Dwarf_Func_s structure.
2440
24412005-03-29 Ulrich Drepper <drepper@redhat.com>
2442
2443 * libdw.h: Add padding in Dwarf_die.
2444
2445 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2446 * dwarf_attr.c: Likewise.
2447 * dwarf_begin.c: Likewise.
2448 * dwarf_begin_elf.c: Likewise.
2449 * dwarf_bitoffset.c: Likewise.
2450 * dwarf_bitsize.c: Likewise.
2451 * dwarf_bytesize.c: Likewise.
2452 * dwarf_diename.c: Likewise.
2453 * dwarf_formaddr.c: Likewise.
2454 * dwarf_formblock.c: Likewise.
2455 * dwarf_formref.c: Likewise.
2456 * dwarf_formstring.c: Likewise.
2457 * dwarf_formudata.c: Likewise.
2458 * dwarf_getarange_addr.c: Likewise.
2459 * dwarf_getarangeinfo.c: Likewise.
2460 * dwarf_getaranges.c: Likewise.
2461 * dwarf_getloclist.c: Likewise.
2462 * dwarf_getmacros.c: Likewise.
2463 * dwarf_getsrc_die.c: Likewise.
2464 * dwarf_getsrcfiles.c: Likewise.
2465 * dwarf_getsrclines.c: Likewise.
2466 * dwarf_highpc.c: Likewise.
2467 * dwarf_lowpc.c: Likewise.
2468 * dwarf_nextcu.c: Likewise.
2469 * dwarf_offdie.c: Likewise.
2470 * dwarf_siblingof.c: Likewise.
2471 * dwarf_srclang.c: Likewise.
2472 * dwarf_tag.c: Likewise.
2473 * libdw_findcu.c: Likewise.
2474 * libdwP.h: Add prototypes for internal functions.
2475
2476 * dwarf_addrdie.c: New file.
2477 * dwarf_macro_opcode.c: New file.
2478 * dwarf_macro_param1.c: New file.
2479 * dwarf_macro_param2.c: New file.
2480 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2481 * libdwP.h: Remove Dwarf_Macro definition.
2482 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2483 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2484 * libdw.map: Add entries for new functions.
2485
24862005-03-21 Ulrich Drepper <drepper@redhat.com>
2487
2488 * libdw.h: Handle broken gcc < 4.
2489
24902005-02-15 Ulrich Drepper <drepper@redhat.com>
2491
2492 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2493
2494 * dwarf_begin_elf.c: Fix warnings.
2495 * dwarf_dieoffset.c: Likewise.
2496 * dwarf_end.c: Likewise.
2497 * dwarf_error.c: Likewise.
2498 * dwarf_getpubnames.c: Likewise.
2499
2500 * libdwP.h: Add new error values.
2501 * dwarf_error.c: Support new error values.
2502 * dwarf_getpubnames.c: Check parameter value.
2503
25042005-02-05 Ulrich Drepper <drepper@redhat.com>
2505
2506 * Makefile.am: Check for text relocations in constructed DSO.
2507
2508 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2509
25102005-02-04 Ulrich Drepper <drepper@redhat.com>
2511
2512 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2513 checks to not read over buffer boundaries for ill-formed DWARF data.
2514
25152004-09-25 Ulrich Drepper <drepper@redhat.com>
2516
2517 * dwarf_child.c: Make compile with gcc 4.0.
2518 * dwarf_error.c: Likewise.
2519 * dwarf_formblock.c: Likewise.
2520 * dwarf_getabbrev.c: Likewise.
2521 * dwarf_getattrs.c: Likewise.
2522 * dwarf_getsrclines.c: Likewise.
2523 * dwarf_tag.c: Likewise.
2524 * libdw_form.c: Likewise.
2525
25262004-01-20 Ulrich Drepper <drepper@redhat.com>
2527
2528 * Makefile.am: Support building with mudflap.
2529
2530 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2531 * dwarf_getsrclines.c: Likewise.
2532 * dwarf_memory-access.h: Likewise.
2533
25342004-01-19 Ulrich Drepper <drepper@redhat.com>
2535
2536 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2537
2538 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2539 Third parameter of dwarf_getsrcfiles can be NULL.
2540
2541 * libdw.map: Add dwarf_getmacros.
2542 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2543 * dwarf_getmacros.c: New file.
2544
25452004-01-18 Ulrich Drepper <drepper@redhat.com>
2546
2547 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2548
2549 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2550
2551 * dwarf_getsrclines.c:
2552 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2553
2554 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2555
2556 * libdwP.h (_): Use elfutils domain.
2557
2558 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2559
2560 * dwarf_getsrclines.c: Fix typo in comment.
2561
25622004-01-17 Ulrich Drepper <drepper@redhat.com>
2563
2564 * Makefile.am: Support building with mudflap.
2565
25662004-01-16 Ulrich Drepper <drepper@redhat.com>
2567
2568 * memory-access.h: Add lots of const in case a pointer passed is const.
2569
2570 * dwarf_formflag.c: New file.
2571 * dwarf_getattrs.c: New file.
2572 * dwarf_error.c: Add new error value.
2573 * libdw.h: Add prototypes for new functions. Adjust prototype for
2574 dwarf_getpubnames.
2575 * libdw.map: Add new functions.
2576 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2577 to ptrdiff_t.
2578 * libdwP.h: Add new error value.
2579 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2580 dwarf_formflag.c.
2581
2582 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2583
25842004-01-12 Ulrich Drepper <drepper@redhat.com>
2585
2586 * dwarf_getarange_addr.c: New file
2587 * dwarf_getarangeinfo.c: New file.
2588 * dwarf_getaranges.c: New file.
2589 * dwarf_onerange.c: New file.
2590 * libdw.h: Declare new functions. Define Dwarf_Arange and
2591 Dwarf_Aranges.
2592 * libdw.map: Add new functions.
2593 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2594 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2595 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2596 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2597 * dwarf_error.c: Add new message.
2598
25992004-01-11 Ulrich Drepper <drepper@redhat.com>
2600
2601 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2602 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2603 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2604 * dwarf_error.c: Add another message.
2605 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2606 introduction.
2607 * dwarf_filesrc.c: Likewise.
2608 * dwarf_getsrcfiles.c: Likewise.
2609 * dwarf_getsrclines.c: Likewise.
2610 * dwarf_lineaddr.c: New file.
2611 * dwarf_linebeginstatement.c: New file.
2612 * dwarf_lineblock.c: New file.
2613 * dwarf_linecol.c: New file.
2614 * dwarf_lineendsequence.c: New file.
2615 * dwarf_lineepiloguebegin.c: New file.
2616 * dwarf_lineno.c: New file.
2617 * dwarf_lineprologueend.c: New file.
2618 * dwarf_onesrcline.c: New file.
2619 * dwarf_lineno.c: Change interface to store result in object pointed
2620 to by second parameter.
2621 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2622 prototype. Define Dwarf_Files and Dwarf_Lines.
2623 * libdw.map: Add new functions.
2624 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2625 * libdw_findcu.c: Don't initialize nlines field.
2626
2627 * dwarf_siblingof: Little optimization.
2628
2629 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2630 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2631 * libdwP.h (struct Dwarf): Add free_elf field.
2632
2633 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2634 dwarf_offabbrev.c.
2635 * dwarf_getstring.c: New file.
2636 * dwarf_offabbrev.c: New file.
2637 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2638 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2639 parameters. Don't allocate memory if not necessary and don't lookup
2640 previous results if no CU given.
2641 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2642 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2643 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2644 * libdwP.h: Change prototype for __libdw_getabbrev.
2645
2646 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2647 returning if this is wanted.
2648
26492004-01-09 Ulrich Drepper <drepper@redhat.com>
2650
2651 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2652 with offset_size value.
2653 * libdw.h: Adjust dwarf_nextcu prototype.
2654 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2655 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2656 member of new CU struct.
2657 * dwarf_formstring.c: Depend on offset_size not address_size for
2658 DW_FORM_strp handling.
2659 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2660
2661 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2662 failing lookup.
2663 (dwarf_tag): Correctly recognize failed lookup.
2664
2665 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2666 function noop_free.
2667 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2668 * dwarf_formblock.c: New file.
2669 * dwarf_getloclist.c: Rewrite to handle a single block.
2670 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2671 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2672 dwarf_getloclistent declaration.
2673 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2674 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2675 Add locs member to struct Dwarf_CU.
2676 * libdw_fundcu.c: Initialize locs member of new CU.
2677 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2678 Remove dwarf_getloclistent.c.
2679
26802004-01-07 Ulrich Drepper <drepper@redhat.com>
2681
2682 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2683 * libdwP.h: Likewise.
2684
2685 * dwarf_getloclist.c: New file.
2686 * dwarf_getloclistent.c: New file.
2687 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2688 Declare dwarf_getloclistent and dwarf_getloclist.
2689 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2690 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2691 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2692 dwarf_getloclist.c.
2693
2694 * dwarf_error.c: More error messages.
2695
26962004-01-06 Ulrich Drepper <drepper@redhat.com>
2697
2698 * dwarf_getsrclines.c: Remove debugging support.
2699
2700 * dwarf_getsrcfiles.c: New file.
2701 * dwarf_filesrc.c: New file.
2702 * libdw.h: Declare these functions. Define Dwarf_File.
2703 * libdwP.c: Adjust Dwarf_File_s definition.
2704 * libdw.map: Add these functions.
2705 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2706 dwarf_filesrc.c.
2707 * dwarf_getsrclines.c: Initialize cu->files.
2708
27092004-01-05 Ulrich Drepper <drepper@redhat.com>
2710
2711 * libdw.h: Add more nonnull function attributes.
2712
2713 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2714 * dwarf_end.c (cu_free): New function.
2715 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2716 * dwarf_error.c (errmsgs): Add new messages.
2717 * dwarf_getsrc_die.c: New file.
2718 * dwarf_getsrclines.c: New file.
2719 * dwarf_lineno.c: New file.
2720 * dwarf_linesrc.c: New file.
2721 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2722 instead of the *_inc-less variants.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07002723 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00002724 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2725 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2726 and dwarf_linesrc.
2727 * libdwP.h: Add more error codes.
2728 (struct Dwarf): Remove mem_tail.next member.
2729 (Dwarf_File): Define type.
2730 (struct Dwarf_Line_s): Define type.
2731 (struct Dwarf_CU): Add lines and nlines members.
2732 (libdw_alloc): Define local variable _tail and use it.
2733 Add some function attributes.
2734 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2735 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2736 * memory-access.h: Add unlikely for the endian conversion paths.
2737 * Makefile.am (AM_CFLAGS): Add -std parameter.
2738 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2739 dwarf_lineno, and dwarf_linesrc.
2740
27412003-08-11 Ulrich Drepper <drepper@redhat.com>
2742
2743 * Moved to CVS archive.