blob: fd59a2472b47b36d6afd9feb7fbd4bb3fda94a42 [file] [log] [blame]
Mark Wielaard059b6b12018-05-25 15:46:09 +020012018-05-25 Mark Wielaard <mark@klomp.org>
2
3 * dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to
4 uintptr_t before returning as pointer.
5
Mark Wielaarde7765da2018-05-22 14:34:06 +020062018-05-22 Mark Wielaard <mark@klomp.org>
7
8 * dwarf_getlocation.c (__libdw_cu_base_address): Treat errors of
9 getting lowpc or entrypc the same as missing base address (zero).
10 * dwarf_highpc (dwarf_highpc): Handle any address form. Always set
11 error when attribute could not be found.
12
Mark Wielaard6e3d2522018-05-20 23:30:01 +0200132018-05-21 Mark Wielaard <mark@klomp.org>
14
15 * dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result.
16 * dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split
17 dwarf if shared with skeleton.
18 (dwarf_end): release fake_addr_cu.
19 * dwarf_formaddr.c (__libdw_cu_addr_base): Move to...
20 * libdwP.h (__libdw_cu_addr_base): ... here.
21 (struct Dwarf): Add fake_addr_cu field.
22 * dwarf_formudata.c (dwarf_formudata): Handle
23 DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
24 * dwarf_getlocation_attr.c (addr_valp): New static function.
25 (dwarf_getlocation_attr): Create attribute for values of
26 DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and
27 DW_OP_addrx.
28 * libdw_find_split_unit.c (__libdw_find_split_unit): Connect
29 IDX_debug_addr sectiondata and fake_addr_cu between split and
30 skeleton.
31
Mark Wielaardac6960d2018-05-20 10:35:34 +0200322018-05-20 Mark Wielaard <mark@klomp.org>
33
34 * dwarf_cu_info.c: New file.
35 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c.
36 * libdw.h (dwarf_cu_info): New function declaration.
37 * libdw.map (ELFUTILS_0.171): Add dwarf_cu_info.
38
Mark Wielaardc2d14cc2018-05-24 15:20:25 +0200392018-05-24 Mark Wielaard <mark@klomp.org>
40
41 * dwarf_ranges.c (dwarf_ranges): Check for NULL cu.
42 * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base.
43
Mark Wielaarda4c74cc2018-05-18 00:26:56 +0200442018-05-18 Mark Wielaard <mark@klomp.org>
45
Mark Wielaard144b73c2018-05-19 00:46:02 +020046 * dwarf_formudata.c (__libdw_formptr): Handle the special case
47 of IDX_debug_ranges for DW_UT_split_compile with version < 5.
48 * dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for
49 split compile cudie.
50 * dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie.
51 * dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for
52 split compile units.
53 * libdwP.h (struct Dwarf_CU): Add ranges_base field.
54 (__libdw_cu_ranges_base): New static inline function.
55
562018-05-18 Mark Wielaard <mark@klomp.org>
57
Mark Wielaarda4c74cc2018-05-18 00:26:56 +020058 * libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL.
59 * dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by
60 taking the line table from the skeleton.
61 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by
62 only taking the files from .debug_line offset zero (if it exists),
63 otherwise fall back to the skeleton.
64
Mark Wielaard3d4998a2018-05-14 23:58:25 +0200652018-05-17 Mark Wielaard <mark@klomp.org>
66
Mark Wielaard46d55232018-05-17 19:23:46 +020067 * dwarf_begin_elf.c (__libdw_debugdir): New function.
68 (valid_p): Call __libdw_debugdir.
69 * dwarf_end.c (dwarf_end.c): Free debugdir.
70 * dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic.
71 take debugdir as argument instead of fd.
72 (find_debug_altlink): Call __libdw_filepath with debugdir.
73 * libdwP.h (struct Dwarf): Add debugdir field.
74 (__libdw_debugdir): New function prototype.
75 (__libdw_filepath): Adjust prototype to take a const char * instead of
76 an int.
77 * libdw_find_split_unit.c (__libdw_find_split_unit): Call
78 __libdw_filepath with debugdir.
79
802018-05-17 Mark Wielaard <mark@klomp.org>
81
Mark Wielaard3d4998a2018-05-14 23:58:25 +020082 * dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile
83 unit DIE, search skeleton_compile unit DIE.
84 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
85 * libdwP.h (is_cudie): Check cu is not NULL.
86
Mark Wielaard38ab8452018-05-19 18:35:51 +0200872018-05-19 Mark Wielaard <mark@klomp.org>
88
89 * libdwP.h (__libdw_find_split_unit): Mark as internal_function.
90
Mark Wielaard77cbbbd2018-05-14 17:29:05 +0200912018-05-15 Mark Wielaard <mark@klomp.org>
92
Mark Wielaard383eef42018-01-18 15:03:43 +010093 * Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c.
94 * dwarf_end.c (cu_free): Free split Dwarf.
95 * dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by
96 calling __libdw_find_split_unit.
97 * libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field.
98 (__libdw_find_split_unit): New function prototype.
99 (str_offsets_base_off): Use cu Dwarf if dbg is NULL.
100 (filepath): Rename to ...
101 (__libdw_filepath): This. Which is the actual function name in
102 dwarf_getalt.c.
103 (libdw_find_split_unit.c): New file.
104 * libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1.
105
1062018-05-15 Mark Wielaard <mark@klomp.org>
107
Mark Wielaard77cbbbd2018-05-14 17:29:05 +0200108 * libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out
109 asserts.
110 * libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if
111 the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to
112 DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has
113 child DIEs and a DW_AT_GNU_dwo_name attribute.
114
Mark Wielaarde9585372018-05-14 17:18:11 +02001152018-05-14 Mark Wielaard <mark@klomp.org>
116
117 * dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name,
118 DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base,
119 DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index,
120 DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index.
121 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index
122 as DW_FORM_addrx.
123 (__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and
124 DW_AT_addr_base.
125 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index
126 as DW_FORM_strx.
127 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base
128 as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr.
129 * dwarf_getlocation.c (__libdw_intern_expression): Handle
130 DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as
131 DW_OP_constx.
132 * libdw_form.c (__libdw_form_val_compute_len): Handle
133 DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128.
134
Mark Wielaarda7bcf432018-05-13 00:05:10 +02001352018-05-12 Mark Wielaard <mark@klomp.org>
136
137 * dwarf_begin_elf.c (check_section): Also recognize .dwo section
138 name variants.
139
Mark Wielaardcdf865b2017-12-06 12:30:12 +01001402018-05-11 Mark Wielaard <mark@klomp.org>
141
142 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr.
143 * dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup,
144 DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and
145 DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with
146 DW_AT_macros. Use libdw_valid_user_form.
147
Mark Wielaard6ed8b942018-04-26 11:53:49 +02001482018-05-09 Mark Wielaard <mark@klomp.org>
149
150 * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to...
151 * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline.
152 (str_offsets_base_off): New internal function that also parses
153 .debug_str_offsets header if necessary.
154
Mark Wielaardb9c76de2018-05-09 23:27:12 +02001552018-05-11 Mark Wielaard <mark@klomp.org>
156
157 * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is
158 known the Dwarf_Die is came from is valid.
159 * libdwP.h (__libdw_dieabbrev): Check cu is not NULL.
160
Mark Wielaardaf143802018-05-08 15:34:03 +02001612018-05-08 Mark Wielaard <mark@klomp.org>
162
163 * dwarf_formref.c (__libdw_formref): Explicitly don't handle
164 DW_FORM_ref_sup4 and DW_FORM_ref_sup8.
165 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4
166 and DW_FORM_ref_sup8.
167 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup
168 as DW_FORM_GNU_strp_alt.
169
Mark Wielaard982b6fe2018-05-06 00:33:27 +02001702018-05-05 Mark Wielaard <mark@klomp.org>
171
172 * dwarf.h: Add DWARF line content descriptions.
173 * libdwP.h (libdw_valid_user_form): New static function.
174 * dwarf_getsrclines.c (read_srclines): Check and parse version 5
175 DWARF header, dir and file tables separately from older versions
176 where different.
177
Mark Wielaard5db81032018-04-25 12:31:42 +02001782018-04-24 Mark Wielaard <mark@klomp.org>
179
180 * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str".
181 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and
182 DWARF_E_NO_DEBUG_LINE_STR.
183 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp.
184 Get data from either .debug_str or .debug_line_str.
185 * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and
186 DWARF_E_NO_DEBUG_LINE_STR.
187
Mark Wielaarda46d8d52018-04-02 23:08:40 +02001882018-04-03 Mark Wielaard <mark@klomp.org>
189
190 * dwarf_formudata.c (__libdw_formptr): Take and return const
191 unsigned char pointers.
192 * dwarf_getlocation.c (attr_base_address): Rename to...
193 (__libdw_cu_base_address): this. Take Dwarf_CU, check and set
194 base_address.
195 (initial_offset_base): Renamed to...
196 (initial_offset): this. Only provide offset.
197 (getlocations_addr): Move data size check and
198 address base addition into __libdw_read_begin_end_pair_inc. Use
199 __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL
200 check (already done by initial_offset, through __libdw_formptr).
201 (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset.
202 Drop Elf_Data NULL check.
203 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument
204 type of readp to Add readend argument. Check data size. Include base
205 in begin and end result.
206 (initial_offset): New static function.
207 (dwarf_ranges): Don't check Elf_Data being NULL (already done by
208 initial_offset, through __libdw_formptr). Use __libdw_cu_base_address
209 and initial_offset. Remove base check and addition (already done by
210 __libdw_read_begin_end_pair_inc.
211 * libdwP.h (Dwarf_CU): Add base_address field.
212 (__libdw_read_begin_end_pair_inc): Change argument type of readp to
213 const. Add readend argument.
214 (__libdw_formptr): Take and return const unsigned char pointers.
215 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
216 base_address.
217
Mark Wielaard7f3934c2018-04-04 16:43:38 +02002182018-04-04 Mark Wielaard <mark@klomp.org>
219
220 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
221 addr_base and str_off_base.
222
Mark Wielaard9535e6b2018-03-14 22:45:56 +01002232018-03-23 Mark Wielaard <mark@klomp.org>
224
225 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
226 increase size.
227 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
228 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
229 (__libdw_cu_str_off_base): New function.
230 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
231 as stroffsetsptr.
232 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
233 (struct Dwarf_CU): Add str_off_base field.
234 (__libdw_cu_str_off_base): New function declaration.
235
Mark Wielaard4a97eb02017-11-24 11:18:39 +01002362018-03-22 Mark Wielaard <mark@klomp.org>
237
238 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
239 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
240 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
241 (__libdw_cu_addr_base): New function.
242 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
243 addrptr.
244 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
245 (struct Dwarf_CU): Add addr_base field.
246 (__libdw_cu_addr_base): New function definition.
247 * memory-access.h (file_byte_order): New static function.
248 (read_3ubyte_unaligned): New inline function.
249
Mark Wielaard402b7f72018-03-29 14:09:12 +02002502018-03-29 Mark Wielaard <mark@klomp.org>
251
252 * libdw.h (dwarf_decl_file): Extend documentation.
253 (dwarf_linesrc): Likewise.
254 (dwarf_filesrc): Likewise.
255
Mark Wielaard86fbef92017-11-15 12:13:38 +01002562018-03-06 Mark Wielaard <mark@klomp.org>
257
258 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
259 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
260 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
261 DW_OP_reinterpret.
262 * dwarf_getlocation.c (__libdw_intern_expression): Handle
263 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
264 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
265 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
266 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
267 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
268 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
269 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
270 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
271 DW_OP_xderef_type.
272 * dwarf_getlocation_implicit_pointer.c
273 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
274
Mark Wielaardfd0cee62018-03-01 00:14:52 +01002752018-03-01 Mark Wielaard <mark@klomp.org>
276
277 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
278 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
279 as a loclistptr.
280
Mark Wielaard8961f332017-11-26 17:51:11 +01002812018-02-09 Mark Wielaard <mark@klomp.org>
282
Mark Wielaard8e5e7892017-12-28 17:44:06 +0100283 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
284 16 byte block.
285
2862018-02-09 Mark Wielaard <mark@klomp.org>
287
Mark Wielaard8961f332017-11-26 17:51:11 +0100288 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
289 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
290 * dwarf_formudata.c (dwarf_formudata): Likewise.
291 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
292 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
293 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
294 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
295 that will also return any data associated with the abbrev. Which
296 currently is only for DW_FORM_implicit_const. Based on...
297 (dwarf_getabbrevattr): ... this function. Which now just calls
298 dwarf_getabbrevattr_data.
299 * libdw.h (dwarf_getabbrevattr_data): Declare new function.
300 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
301 * libdwP.h (dwarf_getabbrevattr_data): INTDECL.
302 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined
303 function based on __libdw_get_uleb128_unchecked.
304
Mark Wielaardeb11b0f2017-11-26 17:40:56 +01003052018-02-08 Mark Wielaard <mark@klomp.org>
306
307 * dwarf.h: Add DWARF5 DW_FORMs.
308 * libdwP.h (__libdw_form_val_compute_len): Handle fix length
309 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
310 DW_FORM_ref_sup[48] and DW_FORM_data16.
311 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
312 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
313 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
314
Mark Wielaard79f0e622018-01-30 12:05:57 +01003152018-01-30 Mark Wielaard <mark@klomp.org>
316
317 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
318 * dwarf_get_units.c: New file.
319 * libdw.h (dwarf_get_units): New function declaration.
320 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
321
Mark Wielaard532ab1e2018-01-29 15:59:05 +01003222018-01-29 Mark Wielaard <mark@klomp.org>
323
324 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
325 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
326 is now called unit_idp. type_offsetp is now called subdie_offsetp.
327 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
328 and .debug_types sections for type units when type signature ref
329 not found.
330 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
331 __libdw_first_die_off_from_cu instead of trying by hand.
332 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
333 instead of checking type_offset by hand.
334 * dwarf_getlocation_implicit_pointer.c
335 (dwarf_getlocation_implicit_pointer): Likewise.
336 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
337 (__libdw_next_unit): New function based on dwarf_next_unit with
338 DWARF5 header support.
339 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
340 and type_sig8 to unit_id8.
341 (ISV4TU): New macro to determine whether a CU is a version 4 type
342 unit (which comes from the .debug_types section).
343 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
344 (__libdw_first_die_from_cu_start): ... that also handles DWARF5
345 unit headers.
346 (__libdw_first_die_off_from_cu): New function that calls the above
347 using the CU fields.
348 (CUDIE): Use __libdw_first_die_off_from_cu.
349 (SUBDIE): New macro that provides the DIE for a CU using the
350 subdie_offset.
351 (__libdw_next_unit): New internal function declaration.
352 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
353 Accept DWARF version 5 headers. Setup unit_type.
354 (__libdw_findcu): Rename debug_types argument to v4_debug_types
355 argument (to indicate that we are looking in the .debug_types
356 section). Support finding the exact offset (unit header start).
357
Mark Wielaard212b4e32018-01-25 01:13:10 +01003582018-01-25 Mark Wielaard <mark@klomp.org>
359
360 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
361 * dwarf_die_addr_die.c: New file.
362 * libdw.h (dwarf_die_addr_die): New function declaration.
363 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
364 * libdwP.h (__libdw_findcu_addr): New internal function declaration.
365 * libdw_findcu.c (__libdw_findcu_addr): New internal function.
366
Joshua Watt555e15e2018-02-09 10:27:18 -06003672018-02-09 Joshua Watt <JPEWhacker@gmail.com>
368
369 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
370 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
371
Mark Wielaard240a0682018-01-19 23:59:21 +01003722018-01-22 Mark Wielaard <mark@klomp.org>
373
374 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
375 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
376 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
377 and alt_fd if we allocated them.
378 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
379 * dwarf_formstring.c (dwarf_formstring): Likewise.
380 * dwarf_getalt.c (__libdw_filepath): New internal function.
381 (find_debug_altlink): New static function.
382 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
383 Cache result.
384 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
385 if we allocated.
386 * libdw.h (dwarf_getalt): Extend documentation.
387 (dwarf_setalt): Likewise.
388 * libdwP.h (struct Dwarf): Add alt_fd field.
389 (filepath): Declare new internal function.
390
Petr Machata1e2c8862018-01-14 03:22:05 +01003912018-01-14 Petr Machata <pmachata@gmail.com>
392
393 * dwarf_formsdata.c (dwarf_formsdata):
394 <DW_FORM_data1>: Cast to signed char.
395 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
396 read_*ubyte_unaligned.
397
Mark Wielaardbfb21172017-12-26 11:52:06 +01003982017-12-26 Mark Wielaard <mark@klomp.org>
399
Mark Wielaardc09d6112017-12-26 16:49:46 +0100400 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
401 use bitfields for has_children and code.
402 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
403 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
404
4052017-12-26 Mark Wielaard <mark@klomp.org>
406
Mark Wielaardbfb21172017-12-26 11:52:06 +0100407 * memory-access.h (__libdw_get_uleb128_unchecked): New function.
408 (get_uleb128_unchecked): New define.
409 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
410 read attr name and form.
411 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
412 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
413 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
414
Mark Wielaard4af2f2e2017-12-29 00:34:14 +01004152017-12-28 Mark Wielaard <mark@klomp.org>
416
417 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
418
Ulf Hermann0d100f62017-05-09 18:28:33 +02004192017-05-09 Ulf Hermann <ulf.hermann@qt.io>
420 Mark Wielaard <mark@klomp.org>
421
422 * libdwP.h (__libdw_in_section): Fix check for the upper border of
423 the range.
424 (__libdw_offset_in_section): Likewise.
425
Mark Wielaard51a72922017-12-20 16:50:57 +01004262017-12-20 Mark Wielaard <mark@klomp.org>
427
428 * libdwP.h (struct Dwarf_CU): Add sec_idx field.
429 (cu_sec_idx): Return cu->sec_idx.
430 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
431 IDX_debug_info or IDX_debug_types.
432 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
433 IDX_debug_loc.
434 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
435 IDX_debug_macro or IDX_debug_macinfo.
436
Mark Wielaardc25dc622017-12-11 23:58:34 +01004372017-12-12 Mark Wielaard <mark@klomp.org>
438
439 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
440 given DIE. Reserve memory for a new DIE first.
441
Dima Kogana2246aa2017-12-08 01:45:10 -08004422017-12-11 Dima Kogan <dima@secretsauce.net>
443
444 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
445 arrays properly.
446
Mark Wielaarde23c7132017-11-02 16:23:24 +01004472017-11-03 Mark Wielaard <mark@klomp.org>
448
Mark Wielaardafda91c2017-11-02 16:24:41 +0100449 * dwarf_getlocation.c (__libdw_intern_expression): Handle
450 DW_OP_GNU_variable_value.
451 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
452 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
453
4542017-11-03 Mark Wielaard <mark@klomp.org>
455
Mark Wielaard7286e5c2017-11-02 16:24:17 +0100456 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
457 Update list of acceptable attribute codes based on DWARF5.
458
4592017-11-03 Mark Wielaard <mark@klomp.org>
460
Mark Wielaarde23c7132017-11-02 16:23:24 +0100461 * dwarf.h: Add DW_OP_GNU_variable_value.
462
Mark Wielaard73411842017-10-03 23:08:01 +02004632017-10-03 Mark Wielaard <mark@klomp.org>
464
465 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
466
Ulf Hermann17d71942017-08-18 14:05:10 +02004672017-08-18 Ulf Hermann <ulf.hermann@qt.io>
468
469 * memory-access.h: Use attribute_packed.
470
Ulf Hermann07737582017-08-18 12:41:11 +02004712017-02-27 Ulf Hermann <ulf.hermann@qt.io>
472
Ulf Hermann11274702017-08-18 13:06:36 +0200473 * libdwP.h: Use attribute_hidden.
474 * libdw_alloc.c: Likewise.
475
4762017-02-27 Ulf Hermann <ulf.hermann@qt.io>
477
Ulf Hermann07737582017-08-18 12:41:11 +0200478 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
479
Mark Wielaard2d906d82017-07-26 17:38:22 +02004802017-07-26 Mark Wielaard <mark@klomp.org>
481
Mark Wielaardf9d791a2017-07-26 23:02:18 +0200482 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
483 * dwarf_getmacros.c (get_table_for_offset): Accept either version
484 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
485 (read_macros): Use table version for fake_cu.
486
4872017-07-26 Mark Wielaard <mark@klomp.org>
488
Mark Wielaard274f28c2017-07-26 22:54:59 +0200489 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
490 DW_TAG_packed_type and DW_TAG_shared_type.
491 * libdw.h (dwarf_peel_type): Extend documentation.
492
4932017-07-26 Mark Wielaard <mark@klomp.org>
494
Mark Wielaard02e30932017-07-26 18:32:27 +0200495 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
496 DW_DEFAULTED_out_of_class.
497
4982017-07-26 Mark Wielaard <mark@klomp.org>
499
Mark Wielaard75834f32017-07-26 18:15:20 +0200500 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
501
5022017-07-26 Mark Wielaard <mark@klomp.org>
503
Mark Wielaard2eb1e342017-07-26 18:06:21 +0200504 * dwarf_default_lower_bound.c: New file.
505 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
506 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
507 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
508 * libdw.h: Add dwarf_default_lower_bound.
509 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
510 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
511 dwarf_default_lower_bound INTDECL.
512
5132017-07-26 Mark Wielaard <mark@klomp.org>
514
Mark Wielaardd14fd3b2017-07-26 17:44:29 +0200515 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
516 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
517 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
518 * dwarf_aggregate_size.c (array_size): Add lower bound for
519 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
520 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
521 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
522 DW_LANG_Julia and DW_LANG_BLISS.
523
5242017-07-26 Mark Wielaard <mark@klomp.org>
525
Mark Wielaard2d906d82017-07-26 17:38:22 +0200526 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
527
Mark Wielaard8e9c76b2017-07-25 15:29:10 +02005282017-07-25 Mark Wielaard <mark@klomp.org>
529
Mark Wielaard9619d342017-07-26 17:06:07 +0200530 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
531 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
532 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
533 for currently unused numbers.
534
5352017-07-25 Mark Wielaard <mark@klomp.org>
536
Mark Wielaard8e9c76b2017-07-25 15:29:10 +0200537 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
538 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
539 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
540
Mark Wielaardc24b9002017-07-21 21:23:07 +02005412017-07-21 Mark Wielaard <mark@klomp.org>
542
543 * dwarf_line_file.c: New file.
544 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
545 * libdw.h (dwarf_line_file): New function declaration.
546 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
547
Ulf Hermann8abf0b52017-02-17 16:11:28 +01005482017-02-17 Ulf Hermann <ulf.hermann@qt.io>
549
550 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
551 made of, libdw_so_DEPS for libraries it depends on (including
552 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
553 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
554 library dependencies, use libdw_so_LIBS rather than relying on the
555 order of dependencies specified, add -z,relro.
556
Ulf Hermann037be822017-04-20 17:07:37 +02005572017-04-20 Ulf Hermann <ulf.hermann@qt.io>
558
Ulf Hermannc73a00d2017-04-20 15:55:47 +0200559 * libdw.h: Remove attribute macro declarations and use
560 __noreturn_attribute__ as defined in libelf.h.
561
5622017-04-20 Ulf Hermann <ulf.hermann@qt.io>
563
Ulf Hermann037be822017-04-20 17:07:37 +0200564 * dwarf_begin_elf.c: Include endian.h.
565
Mark Wielaardf339da92017-03-30 12:19:53 +02005662017-03-30 Mark Wielaard <mjw@redhat.com>
567
568 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
569 result.
570
Mark Wielaardee38b262016-10-22 19:18:51 +02005712016-10-22 Mark Wielaard <mjw@redhat.com>
572
573 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
574 * dwarf_aggregate_size.c (array_size): Use correct spelling of
575 DW_LANG_PLI.
576
Mark Wielaarda3cc8182016-11-02 13:29:26 +01005772016-11-02 Mark Wielaard <mjw@redhat.com>
578
579 * cfi.c (execute_cfi): Add fallthrough comments.
580 * encoded-value.h (encoded_value_size): Add explicit return instead
581 of relying on fallthrough.
582 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
583 comment.
584
5852016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Akihiko Odaki60b2bf12016-10-11 23:06:48 +0900586
587 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
588 * libdw_alloc.c: Likewise.
589
Mark Wielaarddd906c12016-07-08 14:08:22 +02005902016-07-08 Mark Wielaard <mjw@redhat.com>
591
592 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
593 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
594 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
595
Mark Wielaarde93e6f92016-02-13 19:36:50 +01005962016-02-13 Mark Wielaard <mjw@redhat.com>
597
598 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
599 assign to ndirlist.
600
Mark Wielaardc495d752015-12-30 14:18:40 +01006012015-12-18 Mark Wielaard <mjw@redhat.com>
602
603 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
604 (__libdw_free_zdata): Remove.
605 * dwarf_begin_elf.c (inflate_section): Remove.
606 (check_section): Remove __libdw_free_zdata calls. Use elf_compress
607 and elf_compress_gnu to decompress if necessary.
608 (valid_p): Remove __libdw_free_zdata calls.
609 (scngrp_read): Use elf_compress if section is compressed. Remove
610 __libdw_free_zdata calls.
611 * dwarf_end.c (__libdw_free_zdata): Remove.
612 (dwarf_end): Don't call __libdw_free_zdata.
613
Mark Wielaard0c32b6f2015-11-17 23:52:39 +01006142015-10-28 Mark Wielaard <mjw@redhat.com>
615
616 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
617
Mark Wielaard8bbfc552015-12-02 17:07:40 +01006182015-12-02 Mark Wielaard <mjw@redhat.com>
619
620 * fde.c (intern_fde): Don't leak duplicate FDEs.
621
Mark Wielaarddb30f8b2015-12-01 15:21:55 +01006222015-12-01 Mark Wielaard <mjw@redhat.com>
623
Mark Wielaarde04da0e2015-12-02 00:21:07 +0100624 * fde.c (intern_fde): Don't intern an fde that doesn't cover a
625 valid code range.
626
6272015-12-01 Mark Wielaard <mjw@redhat.com>
628
Mark Wielaarddb30f8b2015-12-01 15:21:55 +0100629 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
630
Chih-Hung Hsieh454a8282015-10-14 12:23:34 -07006312015-10-14 Chih-Hung Hsieh <chh@google.com>
632
Chih-Hung Hsiehe0b020f2015-10-14 12:30:11 -0700633 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
634 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
635
6362015-10-14 Chih-Hung Hsieh <chh@google.com>
637
Chih-Hung Hsieh454a8282015-10-14 12:23:34 -0700638 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
639 function 'walk_children' to file scope; inline 'recurse' at its call
640 site.
641
Mark Wielaarde2cf85c2015-11-19 12:37:08 +01006422015-10-19 Mark Wielaard <mjw@redhat.com>
643
644 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
645 if necessary.
646
Dmitry V. Levinb47fb232015-11-16 18:11:23 +03006472015-10-16 Dmitry V. Levin <ldv@altlinux.org>
648
649 * dwarf_getsrclines.c (read_srclines): Initialize state early.
650
Chih-Hung Hsiehb926e562015-10-13 15:26:14 -07006512015-10-13 Chih-Hung Hsieh <chh@google.com>
652
Chih-Hung Hsiehf8443bd2015-10-13 15:26:14 -0700653 * dwarf_getsrclines.c (read_srclines): Move nested functions
654 'advance_pc' and 'add_new_line' to file scope and keep many
655 local state variables within one structure.
656
6572015-10-13 Chih-Hung Hsieh <chh@google.com>
658
Chih-Hung Hsiehb926e562015-10-13 15:26:14 -0700659 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested
660 function 'file_matches' to file scope.
661
Mark Wielaard528cb452015-10-16 23:07:12 +02006622015-10-16 Mark Wielaard <mjw@redhat.com>
663
664 * Makefile.am (libdw.so): Add -lz.
665
Chih-Hung Hsieh34bb96a2015-10-14 11:59:53 -07006662015-10-14 Chih-Hung Hsieh <chh@google.com>
667
668 * cfi.c (execute_cfi): Move nested functions 'enough_registers'
669 and 'require_cfa_offset' to file scope.
670
Josh Stone34254542015-10-09 10:10:37 -07006712015-10-09 Josh Stone <jistone@redhat.com>
672
673 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
674 and fstat.
675
Josh Stonedaee4712015-10-05 11:04:15 -07006762015-10-05 Josh Stone <jistone@redhat.com>
677
678 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
679
Jose E. Marchesi133509f2015-10-05 17:36:30 +02006802015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
681
682 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
683 relocation overflows in some platforms.
684
Mark Wielaardd8698e52015-09-23 20:44:06 +02006852015-09-23 Mark Wielaard <mjw@redhat.com>
686
687 * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
688 * dwarf_formref.c (__libdw_formref): Likewise.
689 * libdw_findcu.c (__libdw_findcu): Likewise.
690 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
691
Mark Wielaard1ccdfb62015-09-22 22:27:01 +02006922015-09-22 Mark Wielaard <mjw@redhat.com>
693
694 * *.c: Remove old-style function definitions.
695
Mark Wielaarddd8bd912015-09-15 10:55:10 +02006962015-09-15 Mark Wielaard <mjw@redhat.com>
697
698 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
699
Chih-Hung Hsieh2d982862015-09-09 12:32:07 -07007002015-09-09 Chih-Hung Hsieh <chh@google.com>
701
702 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
703 redundant NULL tests on parameters declared with __nonnull_attribute__.
704 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
705 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
706
Chih-Hung Hsiehaa1c2ca2015-09-04 12:04:11 -07007072015-09-04 Chih-Hung Hsieh <chh@google.com>
Chih-Hung Hsiehf6b93912015-09-04 12:04:11 -0700708 Mark Wielaard <mjw@redhat.com>
709
710 * dwarf_getlocation.c (getlocations_addr): Replace K&R function
711 definition with ansi-C definition and add const qualifier to
712 locs argument.
713
7142015-09-04 Chih-Hung Hsieh <chh@google.com>
Chih-Hung Hsiehaa1c2ca2015-09-04 12:04:11 -0700715
716 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
717 definition with ansi-C definitions.
718 (__libdw_findcu): Likewise.
719
Mark Wielaarda74bdbd2015-08-25 15:11:01 +02007202015-08-25 Mark Wielaard <mjw@redhat.com>
721
722 * dwarf.h: Add DW_LANG_Haskell.
723
Mark Wielaard1dcbe0c2015-06-18 10:38:12 +02007242015-06-18 Mark Wielaard <mjw@redhat.com>
725
Mark Wielaard85cc9c62015-06-18 11:50:50 +0200726 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
727 to hold a Dwarf.
728
7292015-06-18 Mark Wielaard <mjw@redhat.com>
730
Mark Wielaard65e58822015-06-18 10:41:42 +0200731 * dwarf_getpubnames.c (get_offsets): Always free mem on error.
732
7332015-06-18 Mark Wielaard <mjw@redhat.com>
734
Mark Wielaard1dcbe0c2015-06-18 10:38:12 +0200735 * dwarf_getmacros.c (get_macinfo_table): Return NULL when
736 dwarf_formudata reports an error.
737 (get_table_for_offset): Likewise.
738
Mark Wielaard9e3d5c22015-06-09 00:31:25 +02007392015-06-08 Mark Wielaard <mjw@redhat.com>
740
741 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
742
Mark Wielaard20956b82015-06-03 17:42:38 +02007432015-06-06 Mark Wielaard <mjw@redhat.com>
744
745 * dwarf_getsrclines.c (read_srclines): Initialize filelist early.
746
Mark Wielaard1ae83ee2015-05-27 14:05:15 +02007472015-05-27 Mark Wielaard <mjw@redhat.com>
748
749 * encoded-value.h (read_encoded_value): Check data d_size contains
750 at least enough data to hold a pointer for DW_EH_PE_indirect.
751
Mark Wielaarde69f59c2015-05-22 23:33:56 +02007522015-05-22 Mark Wielaard <mjw@redhat.com>
753
754 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
755 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
756 MAX_STACK_DIRS. Calculate number of dirs needed first, then
757 create dirarray directly, without needing the next field. Free
758 not stack allocated lines and files at the end.
759
Mark Wielaard720f83a2015-05-19 11:52:58 +02007602015-05-19 Mark Wielaard <mjw@redhat.com>
761
762 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack
763 allocated array to hold locs. Allocate locs bigger than the array
764 with malloc and free them when done.
765
Jonathan Lebon90659072015-05-11 15:38:13 -04007662015-05-11 Jonathan Lebon <jlebon@redhat.com>
767
Jonathan Lebon987e3d72015-05-11 15:38:14 -0400768 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
769 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
770 * dwarf_begin_elf.c (inflate_section): New static function, lifted
771 from...
772 (check_section): ... here. Call inflate_section, set libdw errno to
773 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
774
7752015-05-11 Jonathan Lebon <jlebon@redhat.com>
776
Jonathan Lebon90659072015-05-11 15:38:13 -0400777 * dwarf_begin_elf.c (check_section): Add compressed flag. Always
778 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
779
Mark Wielaarddedb5e72015-05-06 12:55:21 +02007802015-05-06 Mark Wielaard <mjw@redhat.com>
781
782 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
783 check the line number.
784
Mark Wielaardae029162015-05-05 10:16:42 +02007852015-05-05 Mark Wielaard <mjw@redhat.com>
786
787 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
788 left before reading values.
789
Anthony G. Basile1ab3c2b2015-05-04 02:25:39 +03007902015-05-04 Anthony G. Basile <blueness@gentoo.org>
791
792 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
793 command.
794
Mark Wielaard65a211f2015-04-22 12:28:30 +02007952015-04-22 Mark Wielaard <mjw@redhat.com>
796
797 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
798 (__libdw_max_len_uleb128): New function.
799 (__libdw_max_len_sleb128): Likewise.
800 (__libdw_get_uleb128): Use __libdw_max_len_uleb128.
801 (__libdw_get_sleb128): Use __libdw_max_len_sleb128.
802
Mark Wielaardf98b99d2015-04-21 15:46:01 +02008032015-04-21 Mark Wielaard <mjw@redhat.com>
804
805 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically
806 when there are more than 8.
807
Petr Machata71de1d22015-04-01 21:44:32 +02008082015-04-01 Petr Machata <pmachata@redhat.com>
809
810 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
811 (is_cudie): New function.
812 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
813 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
814 of white-listing valid tags.
815 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
816
Petr Machata7f617342015-03-18 19:42:02 +01008172015-03-18 Petr Machata <pmachata@redhat.com>
818
819 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
820 (EXTRA_DIST): Remove known-dwarf.h.
821
Mark Wielaard7fb80312015-02-09 16:24:04 +01008222015-02-09 Mark Wielaard <mjw@redhat.com>
823
Mark Wielaardd3c816d2015-02-09 16:47:08 +0100824 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
825 * dwarf_aggregate_size.c (array_size): Recognize array lower bound
826 for new Fortran language codes is 1.
827
8282015-02-09 Mark Wielaard <mjw@redhat.com>
829
Mark Wielaard7fb80312015-02-09 16:24:04 +0100830 * dwarf.h: Add DW_TAG_atomic_type.
831 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
832 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
833
Josh Stone031db7c2015-02-11 13:53:14 -08008342015-02-11 Josh Stone <jistone@redhat.com>
835
836 * encoded-value.h (read_encoded_value): Initialize value.
837
Petr Machatab4da85d2015-02-11 22:11:46 +01008382015-02-11 Petr Machata <pmachata@redhat.com>
839
840 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
841 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember
842 the fact in *BASEP and bail out later if it hasn't been updated by
843 __libdw_read_begin_end_pair_inc.
844
Mark Wielaardddbf23a2014-12-24 13:17:23 +01008452014-12-24 Mark Wielaard <mjw@redhat.com>
846
847 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
848 smaller than or equal to addr, rather than returning immediately on
849 a match.
850
Mark Wielaardb4b2de92015-01-07 23:39:28 +01008512015-01-07 Mark Wielaard <mjw@redhat.com>
852
853 * cfi.h (struct Dwarf_CFI_s): Add search_table_len.
854 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
855 room in the search table for all entries. Store search_table_len.
856 (getcfi_scn_eh_frame): Likewise.
857 * encoded-value.h (encoded_value_size): Don't abort, return zero.
858 (__libdw_cfi_read_address_inc): Check there is enough room to read
859 values. Pass other byte order to read functions.
860 (read_encoded_value): Check encoded_value_size. Don't abort, but
861 set libdw errno and report failure. Check there is enough room to
862 read values.
863 * fde.c (binary_search_fde): Check encoded value size. Add hdr
864 data buf and size to dummy_cfi.
865
Mark Wielaarda1ea2422015-01-04 16:08:22 +01008662015-01-04 Mark Wielaard <mjw@redhat.com>
867
Mark Wielaard43e924e2015-01-05 00:03:03 +0100868 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
869 is after current DIE.
870
8712015-01-04 Mark Wielaard <mjw@redhat.com>
872
Mark Wielaarda1ea2422015-01-04 16:08:22 +0100873 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
874 (dwarf_frame_register).
875
Mark Wielaard5316e412015-01-03 00:09:45 +01008762015-01-02 Mark Wielaard <mjw@redhat.com>
877
Mark Wielaard9ceebe62015-01-03 00:27:58 +0100878 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
879 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
880 (getcfi_scn_eh_frame): Check d_buf is not NULL.
881
8822015-01-02 Mark Wielaard <mjw@redhat.com>
883
Mark Wielaard5316e412015-01-03 00:09:45 +0100884 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
885 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
886 DW_OP_addr if dbg is NULL then read argument directly.
887
Jason P. Leasure7c713822015-01-14 09:26:55 -05008882015-01-14 Jason P. Leasure <jpleasu@super.org>
889
890 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
891 plus cu->start.
892
Mark Wielaard3fa17962014-12-27 12:13:50 +01008932014-12-27 Mark Wielaard <mjw@redhat.com>
894
895 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
896 still falls inside CU data.
897
Mark Wielaarddaf278f2015-01-11 15:00:52 +01008982015-01-11 Mark Wielaard <mjw@redhat.com>
899
900 * dwarf_func_inline.c (dwarf_func_inline_instances): Call
901 __libdw_visit_scopes with NULL imports.
902 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
903 * dwarf_getscopes.c (pc_record): Likewise.
904 (dwarf_getscopes): Likewise.
905 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
906 * libdwP.h (__libdw_visit_scopes): Add imports argument.
907 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
908 function imports_contains. Push and pop imports around walk_children
909 when processing DW_TAG_imported_unit.
910
Ulrich Drepper898ed262014-12-18 12:32:39 -05009112014-12-18 Ulrich Drepper <drepper@gmail.com>
912
913 * Makefile.am: Suppress output of textrel_check command.
914
Mark Wielaardff1ce972014-12-16 16:10:28 +01009152014-12-16 Mark Wielaard <mjw@redhat.com>
916
Mark Wielaardecd78d32014-12-16 22:47:39 +0100917 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
918 DW_LNE_define_file.
919
9202014-12-16 Mark Wielaard <mjw@redhat.com>
921
Mark Wielaard7f9ea702014-12-16 16:41:19 +0100922 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
923 space to read die offset.
924
9252014-12-16 Mark Wielaard <mjw@redhat.com>
926
Mark Wielaardff1ce972014-12-16 16:10:28 +0100927 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
928 unit_length.
929
Mark Wielaard38648042014-12-15 14:56:07 +01009302014-12-15 Mark Wielaard <mjw@redhat.com>
931
932 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
Mark Wielaard138a9ba2014-12-15 16:56:49 +0100933 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
Mark Wielaard38648042014-12-15 14:56:07 +0100934 (dwarf_getpubnames): Make sure section data contains string zero
935 terminator.
936
Mark Wielaard1b5477d2014-12-16 10:53:22 +01009372014-12-16 Mark Wielaard <mjw@redhat.com>
938
939 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
940 the compiler optimize for the common single-byte case.
941
Josh Stone54662f12014-12-15 12:18:25 -08009422014-12-15 Josh Stone <jistone@redhat.com>
943
944 * memory-access.h (__libdw_max_len_leb128): New.
945 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
946 (__libdw_get_sleb128): Likewise.
947
Mark Wielaard7a053472014-12-14 21:48:23 +01009482014-12-14 Mark Wielaard <mjw@redhat.com>
949
950 * cfi.c (execute_cfi): Add program bounds checks.
951 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
952 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
953 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
954 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
955 * dwarf_formudata.c (dwarf_formudata): Likewise.
956 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
957 with end of data buf.
958 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
959 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
960 call gets enough data.
961 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
962 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
963 with enough data.
964 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
965 end_data.
966 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
967 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
968 get_uleb128 with lineendp.
969 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
970 get_uleb128 with endp.
971 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
972 get_uleb128/get_sleb128 with limit.
973 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
974 get_sleb128 get called with enough data.
975 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
976 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
977 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
978 endp.
979 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
980 Don't call get_uleb128_step if out of data.
981 (__libdw_get_sleb128): Likewise for get_sleb128_step.
982
Mark Wielaard92026652014-12-12 16:43:04 +01009832014-12-12 Mark Wielaard <mjw@redhat.com>
984
985 * libdwP.h (struct Dwarf): Add fake_loc_cu.
986 (cu_data): Removed.
987 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
988 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
989 (__libdw_form_val_len): Likewise.
990 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
991 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
992 the already found data buffer directly.
993 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
994 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
995 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
996 just cu.
997 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
998 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
999 * dwarf_getlocation_attr.c (attr_form_cu): New function.
1000 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
1001 (getlocation): Handle empty blocks immediately.
1002 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
1003 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
1004 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
1005 one argument.
1006 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
1007 fake_cu. Call __libdw_form_val_len with just fake_cu.
1008 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
1009 datap and size directly from cu startp and endp.
1010
Mark Wielaardf73385e2014-12-12 00:22:31 +010010112014-12-11 Mark Wielaard <mjw@redhat.com>
1012
1013 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
1014
Mark Wielaard4a330f62014-12-14 00:09:29 +010010152014-12-13 Mark Wielaard <mjw@redhat.com>
1016
1017 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
1018 difference doesn't wrap around before returning as int.
1019
Josh Stone6e1c0d92014-12-11 16:22:48 -080010202014-12-11 Josh Stone <jistone@redhat.com>
1021
1022 * dwarf_getsrclines.c (struct linelist): Add sequence.
1023 (compare_lines): Take linelists, and break ties by sequence.
1024 (read_srclines): Use linelists for sorting.
1025 (read_srclines::add_new_line): Set sequence.
1026
Josh Stoneb849f812014-12-10 18:28:04 -080010272014-12-10 Josh Stone <jistone@redhat.com>
1028
Josh Stone8d200b52014-12-10 18:41:43 -08001029 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
1030 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
1031 * dwarf_child.c (dwarf_child): Use cu->endp.
1032 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
1033 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
1034 * dwarf_siblingof.c (dwarf_siblingof): Use both.
1035
10362014-12-10 Josh Stone <jistone@redhat.com>
1037
Josh Stone64e44df2014-12-10 18:33:34 -08001038 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
1039
10402014-12-10 Josh Stone <jistone@redhat.com>
1041
Josh Stoneb849f812014-12-10 18:28:04 -08001042 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
1043 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
1044 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1045 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1046 * dwarf_tag.c (dwarf_tag): Likewise.
1047
Mark Wielaardcb73b5a2014-12-04 21:43:44 +010010482014-12-04 Mark Wielaard <mjw@redhat.com>
1049
1050 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
1051 (__libdw_form_val_len): Likewise and check len doesn't overflow.
1052 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
1053 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
1054 with endp.
1055 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
1056 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
1057
Petr Machataedb079a2014-12-02 21:22:14 +010010582014-12-02 Petr Machata <pmachata@redhat.com>
1059
1060 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
1061 helper functions.
1062 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
1063 * libdw.h (DWARF_GETMACROS_START): New macro.
1064
Mark Wielaard12ab7002014-11-27 23:41:57 +010010652014-11-27 Mark Wielaard <mjw@redhat.com>
1066
Mark Wielaard805ec832014-11-27 23:53:30 +01001067 * Makefile.am (libdw.so): Use textrel_check.
1068
10692014-11-27 Mark Wielaard <mjw@redhat.com>
1070
Mark Wielaard12ab7002014-11-27 23:41:57 +01001071 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
1072 search_table_entries and search_table_encoding.
1073
Mark Wielaard020fc022014-11-24 21:54:42 +010010742014-11-24 Mark Wielaard <mjw@redhat.com>
1075
1076 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
1077 before usage.
1078
Mark Wielaard04b61f82014-11-23 23:13:55 +010010792014-11-23 Mark Wielaard <mjw@redhat.com>
1080
Mark Wielaard59480ba2014-11-23 23:21:05 +01001081 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
1082 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
1083 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
1084
10852014-11-23 Mark Wielaard <mjw@redhat.com>
1086
Mark Wielaard04b61f82014-11-23 23:13:55 +01001087 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
1088 Set libdw errno and return NULL.
1089
Mark Wielaard9f8c08e2014-11-24 22:17:51 +010010902014-11-24 Mark Wielaard <mjw@redhat.com>
1091
1092 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
1093 (DW_LANG_C11): Likewise.
1094 (DW_LANG_C_plus_plus_14): Likewise.
1095 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
1096 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
1097 lower bound.
1098 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
1099 DW_LANG_C11.
1100
Mark Wielaard03c033f2014-11-26 17:51:28 +010011012014-11-26 Mark Wielaard <mjw@redhat.com>
1102
1103 * dwarf.h (DW_AT_noreturn): Added.
1104
Mark Wielaard09086232014-11-11 14:10:04 +010011052014-11-11 Mark Wielaard <mjw@redhat.com>
1106
1107 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
1108 explicitly as uint8_t.
1109 (__libdw_getsrclines): Add internal_function to declaration.
1110
Petr Machatafb90bf32014-10-17 02:47:03 +020011112014-09-10 Petr Machata <pmachata@redhat.com>
1112
1113 * dwarf_macro_getparamcnt.c: New file.
1114 * dwarf_macro_param.c: New file.
1115 * dwarf_macro_getsrcfiles.c: New file.
1116 * Makefile.am (libdw_a_SOURCES): Add the new files.
1117 * libdwP.h (struct files_lines_s): New structure.
1118 (DWARF_E_INVALID_OPCODE): New enumerator.
1119 (struct Dwarf): New fields macro_ops, files_lines.
1120 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
1121 keeping macro opcode prototypes in.
1122 (Dwarf_Macro_s): Redefine from scratch.
1123 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
1124 internal interfaces.
1125 * dwarf_error.c (errmsgs): Add a message for
1126 DWARF_E_INVALID_OPCODE.
1127 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
1128 files_lines.
1129 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
1130 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
1131 interfaces.
1132 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
1133 (get_offset_from, macro_op_compare, build_table)
1134 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
1135 (cache_op_table, read_macros, gnu_macros_getmacros_off)
1136 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
1137 functions.
1138 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
1139 * dwarf_getsrclines.c (read_srclines): New function with guts
1140 taken from dwarf_getsrclines.
1141 (__libdw_getsrclines): Likewise.
1142 (__libdw_getcompdir, files_lines_compare): New functions.
1143 (dwarf_getsrclines): Make it dispatch to the new interfaces.
1144 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
1145 the new interfaces.
1146 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
1147 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
1148 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
1149
Mark Wielaard3a36e8a2014-10-06 22:00:16 +020011502014-10-06 Mark Wielaard <mjw@redhat.com>
1151
1152 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
1153 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
1154 (aggregate_size): Likewise. Add old and new version.
1155 * dwarf_peel_type.c: New file.
1156 * libdw.h (dwarf_peel_type): New function declaration.
1157 * libdwP.h (dwarf_peel_type): New internal declaration.
1158 * libdw.map (ELFUTILS_0.161): New section.
1159
Petr Machata564cfbe2014-10-15 19:28:08 +020011602014-10-15 Petr Machata <pmachata@redhat.com>
1161
1162 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
1163 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
1164
Mark Wielaard2e83c642014-10-05 17:12:41 +020011652014-10-05 Mark Wielaard <mjw@redhat.com>
1166
1167 * dwarf.h: Add DW_AT_GNU_deleted.
1168
Mark Wielaardb50014f2014-10-02 14:00:47 +020011692014-10-02 Mark Wielaard <mjw@redhat.com>
1170
1171 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
1172 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
1173 DW_TAG_rvalue_reference_type.
1174
Petr Machata1498f542014-09-12 19:03:33 +020011752014-09-12 Petr Machata <pmachata@redhat.com>
1176
1177 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
1178 8-byte quantities. Consequently, rename to...
1179 (read_addr_unaligned_inc): ... this.
1180 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
1181 (read_sbyte_unaligned): Drop.
1182
Petr Machata476feb12014-09-10 22:26:28 +020011832014-09-10 Petr Machata <pmachata@redhat.com>
1184
1185 * dwarf_getlocation.c (attr_ok): Also accept
1186 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
1187 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
1188
Mark Wielaard209f1492014-08-15 13:08:24 +020011892014-08-15 Mark Wielaard <mjw@redhat.com>
1190
Mark Wielaardf18f2332014-08-15 16:03:21 +02001191 * dwarf_cu_die.c: New file.
1192 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
1193 * libdw.h (dwarf_cu_die): New function declaration.
1194 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
1195
11962014-08-15 Mark Wielaard <mjw@redhat.com>
1197
Mark Wielaard209f1492014-08-15 13:08:24 +02001198 * dwarf_cu_getdwarf.c: New file.
1199 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
1200 * libdw.h (Dwarf_CU): New typedef.
1201 (dwarf_cu_getdwarf): New function declaration.
1202 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
1203
Mark Wielaardaf1e6ed2014-06-18 10:57:58 +020012042014-06-18 Mark Wielaard <mjw@redhat.com>
1205
1206 * dwarf.h: Remove DW_TAG_mutable_type.
1207
Mark Wielaardbb096d02014-05-03 00:23:06 +020012082014-05-02 Mark Wielaard <mjw@redhat.com>
1209
1210 * libdwP.h (__check_build_id): Removed now unused.
1211
Mark Wielaarddf85bf92014-05-01 14:48:27 +020012122014-05-01 Mark Wielaard <mjw@redhat.com>
1213
1214 * libdwP.h (struct Dwarf): Remove free_alt.
1215 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
1216 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1217
Mark Wielaardd81d32d2014-04-30 23:00:40 +020012182014-04-30 Mark Wielaard <mjw@redhat.com>
1219
1220 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1221
Florian Weimer920f03d2014-04-15 17:11:17 +020012222014-04-15 Florian Weimer <fweimer@redhat.com>
1223
1224 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1225 (open_debugaltlink): Move to libdwfl.
1226 (check_section): Do not locate alternate debuginfo.
1227
Florian Weimer4813dbb2014-04-24 14:06:43 +020012282014-04-24 Florian Weimer <fweimer@redhat.com>
1229
1230 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1231
Florian Weimer35e2a762014-04-15 14:31:55 +020012322014-04-22 Florian Weimer <fweimer@redhat.com>
1233
1234 * dwarf_getalt.c, dwarf_setalt.c: New files.
1235 * Makefile.am (libdw_a_SOURCES): Add them.
1236 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1237 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1238 declarations.
1239 * libdw.map (ELFUTILS_0.159): Export the two new functions.
1240
Florian Weimerefa72a02014-04-15 14:04:19 +020012412014-04-15 Florian Weimer <fweimer@redhat.com>
1242
1243 * libdwP.h (enum IDX_gnu_debugaltlink): New.
1244 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1245 .gnu_debugaltlink.
1246 (check_section): Obtain .gnu_debugaltlink section from the
1247 setiondata array.
1248
Mark Wielaard93802972014-04-11 23:52:47 +020012492014-04-11 Mark Wielaard <mjw@redhat.com>
1250
1251 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1252 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1253 (libdwelf_objects): New variable.
1254 (libdw_a_LIBADD): Add libdwelf objects.
1255
Mark Wielaardeb4da482014-04-22 16:43:11 +020012562014-04-22 Mark Wielaard <mjw@redhat.com>
1257
1258 * memory-access.h (get_sleb128_step): Remove undefined behavior
1259 of left shifting a signed value. Replace it with a multiplication.
1260
Mark Wielaard32324792014-04-13 17:39:57 +020012612014-04-13 Mark Wielaard <mjw@redhat.com>
1262
1263 * Makefile.am: Remove !MUDFLAP conditions.
1264
Mark Wielaard7f1eec32014-04-09 11:33:23 +020012652014-04-09 Mark Wielaard <mjw@redhat.com>
1266
1267 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
1268 before calling malloc to uncompress data.
1269
Jan Kratochvildff2a992014-03-04 00:04:27 +010012702014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1271
1272 Fix abort() on missing section headers.
1273 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
1274 New label err to return NULL.
1275
Josh Stone50d5b2c2014-02-05 11:26:27 -080012762014-02-05 Josh Stone <jistone@redhat.com>
1277
1278 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
1279 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
1280 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
1281
Mark Wielaard19108012013-12-30 22:00:57 +010012822013-12-30 Mark Wielaard <mjw@redhat.com>
1283
1284 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
1285 dwfl_linux_proc_attach.
1286
Mark Wielaarde962ec32013-12-20 10:09:12 +010012872013-12-20 Mark Wielaard <mjw@redhat.com>
1288
1289 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
1290
Mark Wielaard159ac522013-12-18 11:05:54 +010012912013-12-18 Mark Wielaard <mjw@redhat.com>
1292
1293 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
1294 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
1295 dwfl_module_getsym_info.
1296
Mark Wielaard14c2d9e2013-12-16 13:28:59 +010012972013-12-16 Mark Wielaard <mjw@redhat.com>
1298
1299 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
1300
Josh Stone4e2787c2013-12-10 14:19:09 -080013012013-12-10 Josh Stone <jistone@redhat.com>
1302
1303 * memory-access.h (get_uleb128_rest_return): Removed.
1304 (get_sleb128_rest_return): Removed.
1305 (get_uleb128_step): Make this a self-contained block.
1306 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
1307 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
1308 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
1309 (__libdw_get_uleb128): Simplify and inline for all callers.
1310 (__libdw_get_sleb128): Ditto.
1311 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
1312 * memory-access.c: Delete file.
1313 * Makefile.am (libdw_a_SOURCES): Remove it.
1314 (DEFS): Remove the now unused -DIS_LIBDW.
1315
Josh Stonec0d2a0b2013-12-09 13:52:10 -080013162013-12-09 Josh Stone <jistone@redhat.com>
1317
1318 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
1319 __libdw_form_val_len, now handling only non-constant form lengths.
1320 * libdwP.h (__libdw_form_val_len): New inlined function.
1321
Mark Wielaard3951f2e2013-12-09 16:33:26 +010013222013-12-09 Mark Wielaard <mjw@redhat.com>
1323
1324 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
1325 location expressions.
1326 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
1327 location found, return empty location expression.
1328 * dwarf_getlocation_implicit_pointer.c
1329 (dwarf_getlocation_implicit_pointer): Likewise.
1330 (__libdw_empty_loc_attr): New internal function.
1331 * libdwP.h (__libdw_empty_loc_attr): Define.
1332
Mark Wielaard819c3492013-11-27 16:45:44 +010013332013-11-27 Mark Wielaard <mjw@redhat.com>
1334
1335 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
1336 dwfl_module_getsym_elf.
1337
Mark Wielaard16bc4562013-11-26 15:13:22 +010013382013-11-26 Mark Wielaard <mjw@redhat.com>
1339
1340 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
1341 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1342 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1343 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
1344 (ELFUTILS_0.158): ... here.
1345
Mark Wielaard03d76f42013-11-09 16:45:22 +010013462013-11-09 Mark Wielaard <mjw@redhat.com>
1347
1348 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
1349 check that it is zero.
1350
Jan Kratochvil0b867462013-05-30 14:37:38 +020013512013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1352
1353 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
1354 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
1355 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
1356 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
1357 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
1358
Michael Forneya45c8042013-11-01 00:51:04 -070013592013-11-01 Michael Forney <mforney@mforney.org>
1360
Michael Forneycdc09432013-11-01 00:51:05 -07001361 * Makefile.am (libdwfl_objects): New definition.
1362 (libdw_a_LIBADD): Use libdwfl_objects.
1363
13642013-11-01 Michael Forney <mforney@mforney.org>
1365
Michael Forneya45c8042013-11-01 00:51:04 -07001366 * Makefile.am: Use READELF.
1367
Jan Kratochvil3cf491e2013-10-30 10:48:20 +010013682013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
1369
1370 * libdw.map (ELFUTILS_0.158): New.
1371
Mark Wielaarde6a9bb82013-10-10 11:40:12 +020013722013-10-10 Mark Wielaard <mjw@redhat.com>
1373
1374 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
1375 start_addr and rename last_offset to last_addr. Now both void *.
1376 (tree_visitor): Use start_add and die_addr instead of start_offset
1377 and die_offset.
1378 (dwarf_getfuncs): Use last_addr instead of last_offset.
1379
Mark Wielaard3dec3e12013-10-06 17:04:07 +020013802013-10-06 Mark Wielaard <mjw@redhat.com>
1381
1382 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
1383 DW_CFA_val_expression are not used with abi_cfi.
1384
Josh Stone5dbbc5e2013-10-03 12:38:25 -070013852013-10-03 Josh Stone <jistone@redhat.com>
1386
1387 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
1388 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
1389 a unit, make sure to always hash the sig8 here, so none are missed.
1390
Mark Wielaard74f9b732013-09-30 00:39:07 +020013912013-09-29 Mark Wielaard <mjw@redhat.com>
1392
1393 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
1394 uintptr_t before casting to char *.
1395 (__libdw_intern_expression): Cast data to uintptr_t before casting
1396 to Dwarf_Word.
1397 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
1398 op->number2 to uintptr_t before casting to char *.
1399
Josh Stonef06c8582013-09-24 15:52:05 -070014002013-09-24 Josh Stone <jistone@redhat.com>
1401
1402 * libdw_visit_scopes.c (classify_die): Removed.
1403 (may_have_scopes): New function to replace classify_die. There's no
1404 need for full classification; just find tags that may contain scopes.
1405 (__libdw_visit_scopes): Use a direct tag comparison for imported
1406 units, and use may_have_scopes to test if recursion is needed.
1407
Mark Wielaard1b734df2013-09-20 09:50:42 -040014082013-09-20 Mark Wielaard <mjw@redhat.com>
1409
1410 * dwarf_getfuncs.c (visitor_info): New struct.
1411 (tree_visitor): New function.
1412 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
1413 * libdw.h (dwarf_getfuncs): Expand function documentation.
1414
Mark Wielaard18b2c672013-09-12 15:49:47 +020014152013-09-12 Mark Wielaard <mjw@redhat.com>
1416
1417 * fde.c (intern_fde): Free fde and set libdw errno when start
1418 or end could not be read.
1419
Mark Wielaardb2535b62013-08-30 23:55:12 +020014202013-08-24 Mark Wielaard <mjw@redhat.com>
1421
1422 * dwarf_getlocation.c (store_implicit_value): Don't take data
1423 as argument, get block data from op number2. Return false when
1424 block data length and op number don't match up.
1425 (__libdw_intern_expression): Store start of block for
1426 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
1427 relative data offset. Also store block start (including length)
1428 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
1429 * dwarf_getlocation_attr.c: New file.
1430 * dwarf_getlocation_die.c: Likewise.
1431 * libdw.h (dwarf_getlocation_die): New function definition.
1432 (dwarf_getlocation_attr): Likewise.
1433 * libdwP.h: Declare internal dwarf_getlocation_die.
1434 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
1435 dwarf_getlocation_attr.
1436 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
1437 dwarf_getlocation_attr.c.
1438
Mark Wielaard66eaae92013-08-23 16:12:37 +020014392013-08-23 Mark Wielaard <mjw@redhat.com>
1440
1441 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
1442 (attr_base_address): New function.
1443 (initial_offset_base): New function.
1444 (getlocations_addr): New function. Taken from...
1445 (dwarf_getlocation_addr): here. Use new initial_offset_base and
1446 getlocations_addr.
1447 (dwarf_getlocations): New function.
1448 * libdw.h (dwarf_getlocations): New function definition.
1449 * libdw.map (ELFUTILS_0.157): New.
1450
Mark Wielaard5704c8c2013-07-02 11:22:35 +020014512013-07-02 Mark Wielaard <mjw@redhat.com>
1452
Mark Wielaard4aacfc12013-07-02 16:36:16 +02001453 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
1454 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
1455 NEW_LINE macro. Free malloced line records if any at the end.
1456
14572013-07-02 Mark Wielaard <mjw@redhat.com>
1458
Mark Wielaard5704c8c2013-07-02 11:22:35 +02001459 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
1460
Mark Wielaard79277072013-06-26 11:42:52 -040014612013-06-26 Mark Wielaard <mjw@redhat.com>
1462
1463 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
1464 DIEs without children. Return an error whenever dwarf_child or
1465 dwarf_siblingof return an error. Don't call recurse and increase
1466 the depth for an imported unit. Walk the children of an imported
1467 unit as if they are logical children of the parent root DIE.
1468
Mark Wielaard9affad32013-05-03 11:28:49 +020014692013-05-03 Mark Wielaard <mjw@redhat.com>
1470
1471 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
1472 when nlinelist > 0.
1473
Jan Kratochvil904aec22013-04-30 14:27:16 +020014742013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1475
1476 * libdw.map (ELFUTILS_0.156): New.
1477
Mark Wielaardcdaaf212013-04-25 16:50:11 -040014782013-04-24 Mark Wielaard <mjw@redhat.com>
1479
1480 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1481
Mark Wielaardd4744a72013-04-10 15:52:57 +020014822013-04-10 Mark Wielaard <mjw@redhat.com>
1483
1484 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
1485 equal to address size when we have a DW_FORM_ref_addr for DWARF
1486 version 2.
1487
Mark Wielaard60ef9ab2013-03-25 17:07:21 +010014882013-03-25 Mark Wielaard <mjw@redhat.com>
1489
1490 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
1491 end_sequence.
1492
Mark Wielaardf1b06b52013-03-12 12:02:51 +010014932013-03-12 Mark Wielaard <mjw@redhat.com>
1494
1495 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
1496 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1497
Mark Wielaard443304e2013-02-15 22:45:22 +010014982013-02-15 Mark Wielaard <mjw@redhat.com>
1499
1500 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
1501 not dbg->sectiondata.
1502
Roland McGrath3999ce12013-01-07 14:53:37 -080015032013-01-07 Roland McGrath <roland@hack.frob.com>
1504
1505 * memory-access.h
1506 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
1507 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
1508
Mark Wielaard59254422012-12-18 14:14:22 +010015092012-12-18 Mark Wielaard <mjw@redhat.com>
1510
1511 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
1512 (check_section): Likewise on error.
1513 (scngrp_read): Likewise.
1514 (dwarf_begin_elf): Likewise.
1515
Petr Machatab5c0b032012-10-09 02:11:29 +020015162012-10-09 Petr Machata <pmachata@redhat.com>
1517
1518 * dwarf_getlocation.c (__libdw_intern_expression): Handle
1519 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
1520 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
1521 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
1522
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +020015232012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1524
Jan Kratochvil1d67c0c2012-10-08 23:51:31 +02001525 * cfi.c: New include system.h.
1526 (execute_cfi) (enough_registers): Clear new memory after realloc.
1527
15282012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1529
Jan Kratochvil07f35072012-10-08 23:34:35 +02001530 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
1531 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
1532 searched PC.
1533
15342012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1535
Jan Kratochvil96a9fc62012-10-08 23:08:01 +02001536 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
1537 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
1538 Remove the later DW_OP_call_frame_cfa push to RESULT.
1539
15402012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1541
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +02001542 Code cleanup.
1543 * fde.c (binary_search_fde): Remove always true <address >= start>
1544 conditional. Move L initialization upwards.
1545
Mark Wielaardf5519fc2012-08-24 13:54:52 +020015462012-08-24 Mark Wielaard <mjw@redhat.com>
1547
1548 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
1549 when ENABLE_DWZ is defined.
1550 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
1551 defined.
1552
Mark Wielaardf31c4412012-08-17 00:35:03 +020015532012-08-16 Mark Wielaard <mjw@redhat.com>
1554
1555 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
1556 * dwarf.h (DW_LANG_Go): Update comment.
1557 (DW_LANG_Mips_Assembler): Likewise.
1558
Mark Wielaard775375e2012-06-22 12:02:45 +020015592012-06-27 Mark Wielaard <mjw@redhat.com>
1560
1561 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
1562 * dwarf_begin.c (dwarf_begin): Add INTDEF.
1563 * dwarf_begin_elf.c (__check_build_id): New internal_function.
1564 (try_debugaltlink): New function.
1565 (open_debugaltlink): Likewise.
1566 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
1567 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
1568 necessary.
1569 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
1570 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
1571 is an error here.
1572 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
1573 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
1574 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
1575 calls.
1576 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
1577 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
1578 (struct Dwarf): Add alt_dwarf and free_alt fields.
1579 (__libdw_read_offset): Add dbg_ret argument, use to check with
1580 __libdw_offset_in_section.
1581 (__check_build_id): New function declaration.
1582 (dwarf_begin): Define as INTDECL.
1583 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
1584 and DW_FORM_GNU_strp_alt.
1585
Mark Wielaard515fba92012-07-20 00:09:56 +020015862012-07-19 Mark Wielaard <mjw@redhat.com>
1587
1588 * dwarf.h: Add DW_OP_GNU_parameter_ref.
1589
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +020015902012-07-24 Mark Wielaard <mjw@redhat.com>
1591
Mark Wielaardc4010b82012-07-24 13:20:41 +02001592 * dwarf.h: Correct spelling of DW_LANG_ObjC.
1593 * dwarf_aggregate_size.c (array_size): Use correct spelling of
1594 DW_LANG_ObjC.
1595
15962012-07-24 Mark Wielaard <mjw@redhat.com>
1597
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +02001598 * dwarf.h: Add DW_ATE_UTF.
1599
Mark Wielaardef5688e2012-06-27 10:15:27 +020016002012-06-27 Mark Wielaard <mjw@redhat.com>
1601
1602 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
1603
Mark Wielaarda0172d72012-06-25 17:18:53 +020016042012-06-26 Mark Wielaard <mjw@redhat.com>
1605
1606 * libdwP.h: Add IDX_debug_macro.
1607 * dwarf.h: Add DW_AT_GNU_macros.
1608 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
1609 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
1610
Mark Wielaard54797252012-04-27 13:00:50 +020016112012-04-27 Mark Wielaard <mjw@redhat.com>
1612
1613 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
1614 a constant offset from DW_AT_low_pc.
1615
Tom Tromey581c3f62012-03-21 08:54:32 -060016162012-03-19 Tom Tromey <tromey@redhat.com>
1617
1618 * libdw_findcu.c (findcu_cb): Move earlier.
1619 (__libdw_intern_next_unit): Add new CU to search tree here...
1620 (__libdw_findcu): ... not here.
1621
Mark Wielaardcb643d62012-01-31 19:22:03 +010016222012-01-31 Mark Wielaard <mjw@redhat.com>
1623
1624 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
1625
Mark Wielaard387998b2011-10-31 15:01:50 +010016262011-11-31 Mark Wielaard <mjw@redhat.com>
1627
1628 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
1629
Mark Wielaard0b72b652011-07-14 12:59:26 +020016302011-07-14 Mark Wielaard <mjw@redhat.com>
1631
1632 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
1633
Jakub Jelinek03124242011-05-17 17:00:14 +020016342011-05-16 Jakub Jelinek <jakub@redhat.com>
1635
1636 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
1637 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
1638 New.
1639
Mark Wielaardf4c39c72011-04-26 17:15:28 +020016402011-04-26 Mark Wielaard <mjw@redhat.com>
1641
1642 * dwarf_child (dwarf_child): Sanity check end of section against
1643 cu_data () of die->cu.
1644
Mark Wielaarde3368c52011-03-22 23:03:31 +010016452011-03-22 Mark Wielaard <mjw@redhat.com>
1646
1647 * dwarf.h: Add DW_TAG_GNU_call_site,
1648 DW_TAG_GNU_call_site_parameter,
1649 DW_AT_GNU_call_site_value,
1650 DW_AT_GNU_call_site_data_value,
1651 DW_AT_GNU_call_site_target,
1652 DW_AT_GNU_call_site_target_clobbered,
1653 DW_AT_GNU_tail_call,
1654 DW_AT_GNU_all_tail_call_sites,
1655 DW_AT_GNU_all_call_sites,
1656 DW_AT_GNU_all_source_call_sites,
1657 and DW_OP_GNU_entry_value.
1658
Petr Machata02c56192011-03-10 01:50:32 +010016592011-03-10 Petr Machata <pmachata@redhat.com>
1660
1661 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
1662 abbreviation with code 0.
1663
Petr Machata35870872011-03-09 10:01:29 -080016642011-03-09 Petr Machata <pmachata@redhat.com>
1665
1666 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
1667
Roland McGrath725aad52011-02-23 19:52:46 -080016682011-02-23 Roland McGrath <roland@redhat.com>
1669
1670 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
1671 Declare __libdw_free_zdata.
1672 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
1673 (dwarf_end): Call it.
1674
1675 * dwarf_begin_elf.c (valid_p): Likewise.
1676 (check_section, scngrp_read): Likewise.
1677 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
1678
Roland McGrath8c0a3822010-10-13 11:21:17 -070016792010-10-13 Roland McGrath <roland@redhat.com>
1680
1681 * dwarf.h: Add DW_LANG_Go.
1682
Roland McGrath5f95e2b2010-10-05 00:56:30 -070016832010-10-05 Roland McGrath <roland@redhat.com>
1684
1685 * dwarf_getaranges.c: Use malloc rather than alloca,
1686 since the total number of elements can be quite huge.
1687
Roland McGrath932585d2010-05-08 04:01:14 -070016882010-07-26 Roland McGrath <roland@redhat.com>
1689
1690 * dwarf_getlocation_implicit_pointer.c: New file.
1691 * Makefile.am (libdw_a_SOURCES): Add it.
1692 * libdw.map (ELFUTILS_0.149): New set.
1693 Add dwarf_getlocation_implicit_pointer.
1694 * libdw.h: Declare it.
1695
1696 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
1697 (dwarf_offdie, dwarf_offdie_types): Update callers.
1698 * libdwP.h: Declare it.
1699
1700 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
1701 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
1702
Roland McGrathde44f132010-08-24 15:38:42 -070017032010-08-24 Roland McGrath <roland@redhat.com>
1704
1705 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
1706
Roland McGrath00aca7f2010-07-27 04:40:23 -070017072010-07-27 Roland McGrath <roland@redhat.com>
1708
1709 * dwarf_formref_die.c: Fix sig8 hash insertion.
1710
Roland McGrath9616b852010-06-23 03:17:28 -070017112010-06-23 Roland McGrath <roland@redhat.com>
1712
1713 * cfi.c (dwarf_cfi_validate_fde): Function removed.
1714 * libdw.h: Remove it.
1715 * libdw.map: Likewise.
1716
Roland McGrath499b8ff2010-06-22 13:13:53 -070017172010-06-22 Roland McGrath <roland@redhat.com>
1718
Roland McGrathc16966a2010-06-22 17:08:43 -07001719 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
1720
Roland McGrath499b8ff2010-06-22 13:13:53 -07001721 * dwarf_getsrclines.c: Fix signed comparison warning in extended
1722 opcode parsing.
1723
Roland McGrath0c5638c2010-06-21 23:00:35 -070017242010-06-21 Roland McGrath <roland@redhat.com>
1725
Roland McGrath474cb482010-06-22 00:10:54 -07001726 * dwarf.h: Add DW_TAG_GNU_* constants.
1727
Roland McGrath0c5638c2010-06-21 23:00:35 -07001728 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
1729 10-byte case.
1730
Roland McGrath5cc030d2010-06-20 17:25:35 -070017312010-06-20 Roland McGrath <roland@redhat.com>
1732
Roland McGrath2b1f0952010-06-20 17:55:50 -07001733 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
1734 to search TUs instead of CUs.
1735 * libdwP.h: Update decl.
1736 (struct Dwarf): New member tu_tree.
1737 * dwarf_end.c (dwarf_end): Clean up tu_tree.
1738 * dwarf_offdie.c (do_offdie): New function, broken out of ...
1739 (dwarf_offdie): ... here.
1740 (dwarf_offdie_types): New function.
1741 * libdw.h: Declare it.
1742 * libdw.map (ELFUTILS_0.148): Add it.
1743
Roland McGrath5cc030d2010-06-20 17:25:35 -07001744 * libdwP.h (CUDIE): Use cu_data.
1745 * dwarf_formblock.c: Likewise.
1746 * dwarf_formref_die.c: Likewise.
1747 * dwarf_diecu.c: Use CUDIE macro.
1748 * dwarf_formaddr.c: Use cu_sec_idx.
1749
Roland McGrathc70ebc02010-06-16 02:21:26 -070017502010-06-16 Roland McGrath <roland@redhat.com>
1751
Roland McGrath3e0f7d12010-06-15 23:10:35 -07001752 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
1753 we don't repeat a CU lookup we've already done. Handle
1754 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
1755
1756 * libdw_findcu.c (__libdw_intern_next_unit): New function,
1757 broken out of ...
1758 (__libdw_findcu): ... here. Call it.
1759 * libdwP.h: Declare it.
1760 (struct Dwarf): New member next_tu_offset.
1761
1762 * dwarf_sig8_hash.c: New file.
1763 * dwarf_sig8_hash.h: New file.
1764 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1765 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
1766 defining NO_UNDEF.
1767 * libdwP.h (struct Dwarf): New member sig8_hash.
1768 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
1769 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
1770
1771 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
1772 (dwarf_nextcu): ... here. Call it.
1773 * libdw.h: Declare it.
1774 * libdwP.h: Add INTDECL.
1775 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
1776 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
1777
1778 * libdwP.h (cu_sec_idx, cu_data): New functions.
1779 Use .debug_types when CU is a TU.
1780 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
1781 * dwarf_siblingof.c: Likewise.
1782 * dwarf_formstring.c: Likewise.
1783 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
1784 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
1785 (dwarf_getlocation_addr): Likewise.
1786
1787 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
1788 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
1789 .debug_types header size instead of .debug_info header size.
1790 (CUDIE): Use it.
1791 * dwarf_diecu.c: Update caller.
1792 * dwarf_getaranges.c: Likewise.
1793 * dwarf_nextcu.c: Likewise.
1794 * libdw_findcu.c (__libdw_findcu): Initialize new members.
1795
Roland McGrath3e4b5bb2010-06-16 03:40:56 -07001796 * fde.c (fde_by_offset): Renamed to ...
1797 (__libdw_fde_by_offset): ... this, made global and internal_function.
1798 Don't take ADDRESS argument.
1799 (__libdw_find_fde): Update caller. Do address sanity check here.
1800 * cfi.h: Declare __libdw_fde_by_offset.
1801 * cfi.c (dwarf_cfi_validate_fde): New function.
1802 * libdw.h: Declare it.
1803 * libdw.map (ELFUTILS_0.148): Add it.
1804
Roland McGrath5f4b5082010-06-16 03:11:57 -07001805 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1806 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
1807
Roland McGrath7934ded2010-06-16 03:04:09 -07001808 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1809 Don't assume DW_EH_PE_aligned refers to native address size.
1810
Roland McGrathc70ebc02010-06-16 02:21:26 -07001811 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
1812 address.
1813
Roland McGrathc70cf4e2010-06-18 17:01:05 -070018142010-06-17 Roland McGrath <roland@redhat.com>
1815
1816 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
1817 op_index.
1818 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
1819 into an inner inline function. Set new fields. Check all fields for
1820 overflow when setting.
1821 * dwarf_lineisa.c: New file.
1822 * dwarf_linediscriminator.c: New file.
1823 * dwarf_lineop_index.c: New file.
1824 * Makefile.am (libdw_a_SOURCES): Add them.
1825 * libdw.map (ELFUTILS_0.148): Add them.
1826 * libdw.h: Declare them.
1827
Roland McGrath3f633072010-06-15 22:17:04 -070018282010-06-16 Roland McGrath <roland@redhat.com>
1829
Roland McGrath4a87dfa2010-06-16 16:35:10 -07001830 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
1831
Roland McGrathb75f4442010-06-15 22:24:19 -07001832 * fde.c (fde_by_offset): Renamed to ...
1833 (__libdw_fde_by_offset): ... this, made global and internal_function.
1834 Don't take ADDRESS argument.
1835 (__libdw_find_fde): Update caller. Do address sanity check here.
1836 * cfi.h: Declare __libdw_fde_by_offset.
Roland McGrath9bcd2652010-06-15 22:17:20 -07001837 * cfi.c (dwarf_cfi_validate_fde): New function.
1838 * libdw.h: Declare it.
Roland McGrath3f633072010-06-15 22:17:04 -07001839 * libdw.map (ELFUTILS_0.148): Add it.
1840
Roland McGrath0b3363e2010-06-01 15:42:14 -07001841 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
1842 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
Roland McGrath827d4d12010-06-01 20:17:36 -07001843
1844 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
1845 Don't assume DW_EH_PE_aligned refers to native address size.
Roland McGrath1a030b32010-06-01 20:11:40 -07001846
1847 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
Roland McGrath675229b2010-06-01 20:10:19 -07001848 address.
1849
18502010-06-15 Roland McGrath <roland@redhat.com>
Roland McGrath52123962010-06-01 19:05:08 -07001851
1852 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
Roland McGrath7fac1ce2010-06-01 15:56:58 -07001853 DW_FORM_ref_addr.
1854 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
Roland McGrath0b3363e2010-06-01 15:42:14 -07001855 here, since we don't support it yet.
1856
Mark Wielaard3f507bd2010-05-31 15:06:31 +02001857 * dwarf_next_cfi.c: Handle version 4 format.
1858
Mark Wielaard08e71db2010-05-31 15:39:15 +02001859 * dwarf_getsrclines.c: Handle version 4 format.
1860
18612010-06-01 Roland McGrath <roland@redhat.com>
1862
1863 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
Mark Wielaard3f507bd2010-05-31 15:06:31 +02001864 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
1865
Eduardo Santiagod2240bc2010-05-28 14:26:52 -07001866 * libdwP.h (CIE_VERSION): Remove unused macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07001867
Ulrich Drepper49fe7142010-05-28 20:32:37 -07001868 * dwarf_getsrclines.c: Fix version field test.
1869 * libdwP.h (DWARF_VERSION): Remove useless macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07001870
Roland McGrathcfa5da22010-05-27 13:49:25 -07001871 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
1872
1873 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
1874
1875 * libdw_findcu.c (__libdw_findcu): Accept version 4.
Roland McGrath688f7fc2010-05-08 03:22:59 -07001876
18772010-05-31 Mark Wielaard <mjw@redhat.com>
1878
1879 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
1880 * libdw.h (dwarf_cfi_cie_p): ... here.
1881
18822010-05-31 Mark Wielaard <mjw@redhat.com>
1883
1884 * dwarf.h: Fix DW_LANG_Python constant.
Roland McGrath0ab97832010-04-26 11:50:27 -07001885
18862010-05-28 Eduardo Santiago <santiago@redhat.com>
Roland McGrath3b10ac02010-04-26 18:45:36 -07001887
1888 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
1889 thing.
1890
18912010-05-27 Roland McGrath <roland@redhat.com>
Roland McGrath0ab97832010-04-26 11:50:27 -07001892
1893 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
1894 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
1895
18962010-05-08 Roland McGrath <roland@redhat.com>
1897
1898 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
Roland McGrath3f9d9552010-04-22 20:51:07 -07001899 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
1900 (getlocation): Update caller.
1901 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1902 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1903 * libdwP.h: Update decl.
1904
19052010-04-26 Roland McGrath <roland@redhat.com>
Roland McGrath8068e062010-03-10 23:49:13 -08001906
1907 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
1908 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
1909 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
Roland McGrath22359e22010-02-15 15:57:03 -08001910 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
1911
1912 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
1913 Prepend DW_OP_call_frame_cfa if true.
Mark Wielaardee29a312010-02-02 20:44:53 +01001914 (getlocation): Update caller.
1915 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1916 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1917 * libdwP.h: Update decl.
Roland McGrathf95760a2010-01-07 20:24:34 -08001918
19192010-04-22 Roland McGrath <roland@redhat.com>
1920
1921 * cfi.c (execute_cfi): Never return without cleanup.
Roland McGrath019d9fb2010-01-05 13:36:07 -08001922 Free FS on failure.
1923 (cie_cache_initial_state): Adjust caller to expect that free.
Roland McGrathebc5c882010-01-05 22:53:31 -08001924 (__libdw_frame_at_address): Likewise.
1925
19262010-03-10 Roland McGrath <roland@redhat.com>
1927
1928 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1929
19302010-02-15 Roland McGrath <roland@redhat.com>
1931
1932 * Makefile.am: Use config/eu.am for common stuff.
Roland McGrath0cb19832010-01-05 13:38:15 -08001933
19342010-02-02 Mark Wielaard <mjw@redhat.com>
Roland McGrath019d9fb2010-01-05 13:36:07 -08001935
1936 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
Roland McGrath888381b2009-11-21 17:03:34 -08001937
19382010-01-07 Roland McGrath <roland@redhat.com>
1939
1940 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1941
Roland McGrath9ca7bc42009-10-15 12:26:49 -070019422010-01-05 Roland McGrath <roland@redhat.com>
1943
1944 * dwarf_aggregate_size.c: New file.
1945 * Makefile.am (libdw_a_SOURCES): Add it.
1946 * libdw.h: Declare it.
Roland McGrath7e0aecd2009-09-17 15:02:34 -07001947 * libdwP.h: Add INTDECL.
1948 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1949
1950 * dwarf_srclang.c: Add INTDEF.
1951 * libdwP.h: Add INTDECL.
1952
Roland McGrathf0371042009-09-10 12:39:09 -07001953 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1954
1955 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1956
19572009-11-21 Roland McGrath <roland@redhat.com>
1958
1959 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1960 non-constant forms.
Mark Wielaard418ae4c2009-09-09 20:59:26 +02001961
19622009-10-15 Roland McGrath <roland@redhat.com>
1963
1964 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
Josh Stonecc93cc42009-08-21 18:04:44 -07001965 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1966
19672009-09-17 Roland McGrath <roland@redhat.com>
1968
Roland McGrath08277ba2009-08-10 15:08:08 -07001969 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1970 argument a pointer to const.
1971 * libdw.h: Update decl.
1972
Roland McGrathebfb6482009-08-09 15:40:52 -070019732009-09-10 Roland McGrath <roland@redhat.com>
1974
1975 * dwarf_getlocation.c (store_implicit_value): New function.
1976 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1977 (dwarf_getlocation_implicit_value): New function.
1978 * libdw.h: Declare it.
1979 * libdw.map (ELFUTILS_0.143): Add it.
1980
19812009-09-09 Mark Wielaard <mjw@redhat.com>
1982
1983 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1984
19852009-08-21 Josh Stone <jistone@redhat.com>
1986
Roland McGrathde69d522009-08-07 18:26:19 -07001987 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1988
19892009-08-10 Roland McGrath <roland@redhat.com>
1990
1991 * dwarf_getscopevar.c: Use dwarf_diename.
1992
19932009-08-09 Roland McGrath <roland@redhat.com>
1994
1995 * libdw.map (ELFUTILS_0.143): New version set,
1996 inherits from ELFUTILS_0.142.
Roland McGrathaf800142009-07-22 13:55:50 -07001997 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1998 alias in the ELFUTILS_0.122 version set and the default in the new set.
1999 * dwarf_srclang.c: Likewise.
2000 * dwarf_decl_file.c: Likewise.
2001 * dwarf_decl_line.c: Likewise.
2002 * dwarf_decl_column.c: Likewise.
2003 * dwarf_bytesize.c: Likewise.
2004 * dwarf_bitsize.c: Likewise.
2005 * dwarf_bitoffset.c: Likewise.
2006
20072009-08-07 Roland McGrath <roland@redhat.com>
2008
2009 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
2010 * dwarf_srclang.c: Likewise.
2011 * dwarf_decl_file.c: Likewise.
2012 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
Roland McGrathe23e9e72009-07-21 18:14:52 -07002013 * dwarf_bytesize.c: Likewise.
2014 * dwarf_bitsize.c: Likewise.
2015 * dwarf_bitoffset.c: Likewise.
2016
20172009-07-22 Roland McGrath <roland@redhat.com>
2018
2019 * dwarf_frame_cfa.c: Change calling convention.
2020 * libdw.h: Update decl.
Roland McGrath96349ff2009-07-20 11:51:41 -07002021
2022 * dwarf_frame_register.c: Change calling/return-value convention for
2023 value-only results and undefined/same_value.
2024 * libdw.h: Update decl.
2025
Roland McGratha6abdfd2009-07-16 17:40:19 -07002026 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
2027 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
Roland McGrathe160cc92009-07-16 17:48:27 -07002028 return that value instead.
2029 (getlocation): Update caller.
2030 * dwarf_frame_cfa.c: Likewise.
2031 * libdwP.h: Update decl.
2032
Roland McGratha6abdfd2009-07-16 17:40:19 -070020332009-07-21 Roland McGrath <roland@redhat.com>
2034
2035 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
2036 Fix loop iteration after skipping a bogus or useless CU.
2037
2038 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
2039 absence, not DWARF_E_NO_DEBUG_LINE.
Roland McGrath7dd94642009-07-15 11:14:23 -07002040
20412009-07-20 Roland McGrath <roland@redhat.com>
2042
2043 * dwarf_getlocation.c (__libdw_intern_expression):
2044 Handle DW_OP_stack_value.
Roland McGrath80893432009-07-13 12:08:55 -07002045
20462009-07-16 Roland McGrath <roland@redhat.com>
2047
2048 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
Roland McGrathcfdd86e2009-07-08 13:15:07 -07002049 reject others when CU's version > 3.
2050
Roland McGrath3c84db32009-06-24 17:41:40 -07002051 * dwarf_formflag.c: Handle DW_FORM_flag_present.
2052
2053 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
2054 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
2055 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
2056 and DW_AT_const_expr.
2057 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
2058 and DW_FORM_ref_sig8.
2059
20602009-07-15 Roland McGrath <roland@redhat.com>
2061
2062 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
2063 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
2064
20652009-07-13 Roland McGrath <roland@redhat.com>
2066
2067 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
2068
20692009-07-08 Roland McGrath <roland@redhat.com>
2070
2071 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
2072 dwfl_module_eh_cfi.
2073
2074 * libdwP.h (struct Dwarf): Add member `cfi'.
2075 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
2076 * dwarf_getcfi.c: New file.
2077 * dwarf_getcfi_elf.c: New file.
2078 * dwarf_cfi_end.c: New file.
2079 * dwarf_cfi_addrframe.c: New file.
2080 * dwarf_frame_cfa.c: New file.
2081 * dwarf_frame_register.c: New file.
2082 * dwarf_frame_return_address_register.c: New file.
2083 * Makefile.am (libdw_a_SOURCES): Add them.
2084 * unwind.h: Declare those functions.
2085 * libdw.map (ELFUTILS_0.142): Export them.
2086
2087 * dwarf_getlocation.c (__libdw_intern_expression): New function,
2088 broken out of ...
2089 (getlocation): ... here, call it.
2090 * libdwP.h: Declare it.
2091
2092 * cie.c: New file.
2093 * fde.c: New file.
2094 * frame-cache.c: New file.
2095 * cfi.c: New file.
2096 * cfi.h: New file.
2097 * encoded-value.h: New file.
2098 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2099 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
2100 * dwarf_error.c (errmsgs): Add element for it.
2101
2102 * dwarf_next_cfi.c: New file.
2103 * Makefile.am (libdw_a_SOURCES): Add it.
Roland McGrath6e1f4652009-07-08 14:48:34 -07002104 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
2105 Declare dwarf_next_cfi.
Roland McGrathcfdd86e2009-07-08 13:15:07 -07002106 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
2107 Add dwarf_next_cfi.
2108
2109 * memory-access.h [! ALLOW_UNALIGNED]
Roland McGrath05c4e042009-06-18 13:56:02 -07002110 (read_2ubyte_unaligned): Renamed to ...
2111 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
2112 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
2113 (read_2sbyte_unaligned): Likewise.
2114 (read_4ubyte_unaligned): Likewise.
2115 (read_4sbyte_unaligned): Likewise.
2116 (read_8ubyte_unaligned): Likewise.
2117 (read_8sbyte_unaligned): Likewise.
2118
Ulrich Drepper99d23722009-06-14 20:19:45 -07002119 * libdwP.h (IDX_eh_frame): Remove it.
2120 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
2121
21222009-07-08 Roland McGrath <roland@redhat.com>
2123
2124 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
2125
2126 * dwarf_getlocation.c (check_constant_offset): New function.
2127 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
2128 handle DW_AT_data_member_location of data[48] as constant offset.
2129
21302009-06-18 Roland McGrath <roland@redhat.com>
2131
2132 * libdwP.h (__libdw_read_address_inc): Constify.
2133 (__libdw_read_offset_inc): Likewise.
2134 * dwarf_getaranges.c: Likewise.
2135 * dwarf_getlocation.c: Likewise.
2136 * dwarf_getsrclines.c: Likewise.
2137 * dwarf_nextcu.c: Likewise.
2138
21392009-05-05 Petr Machata <pmachata@redhat.com>
2140
2141 * libdwP.h (__libdw_formptr): Declare new function.
2142 * dwarf_formudata.c: Implement it here.
2143 * dwarf_getlocation.c (dwarf_getlocation_addr):
2144 Call it instead of hand-rolled offset handling code.
2145 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2146 * dwarf_ranges.c (dwarf_ranges): Likewise.
2147
21482009-05-04 Petr Machata <pmachata@redhat.com>
2149
2150 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
2151 * dwarf_ranges.c: Implement it here.
2152 (dwarf_ranges): Call it.
Roland McGrathe2eabd82009-05-07 18:54:52 -07002153 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
2154
21552009-04-23 Petr Machata <pmachata@redhat.com>
2156
2157 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
2158 of read_*ubyte_unaligned.
Petr Machataf3df61f2009-05-07 21:02:33 +02002159 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
2160 * dwarf_formstring.c (dwarf_formstring): Likewise.
2161 * dwarf_formudate.c (dwarf_formudata): Likewise.
2162 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
2163 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
Roland McGrath2fb90512009-04-15 14:47:13 -07002164 * dwarf_getpubnames.c (get_offsets): Likewise.
2165 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
2166
21672009-04-23 Petr Machata <pmachata@redhat.com>
2168
Roland McGrath6a4bdd92009-04-01 14:25:29 -07002169 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
2170 __libdw_read_addr, __libdw_read_off): Add four new internal
2171 functions.
2172
Roland McGrathc5acb302009-01-28 18:28:52 -080021732009-05-07 Roland McGrath <roland@redhat.com>
2174
Roland McGrath03288f02009-01-28 22:00:54 -08002175 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
2176 return value and OFFSET argument, not CU-relative. Only fetch the
2177 attribute data when called with OFFSET of 0.
Roland McGrathc5acb302009-01-28 18:28:52 -08002178
21792009-05-07 Petr Machata <pmachata@redhat.com>
Roland McGrathf46272a2009-01-26 18:36:16 -08002180
2181 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
2182 DW_AT_macro_info attribute of CU DIE.
2183
Roland McGrathd31505f2009-01-25 19:37:33 -080021842009-04-15 Roland McGrath <roland@redhat.com>
2185
2186 * dwarf.h (DW_CIE_ID): Removed.
2187 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
Roland McGrath3bf7a092009-01-23 16:34:07 -08002188
21892009-04-01 Roland McGrath <roland@redhat.com>
2190
2191 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
2192
Roland McGrathafdd51e2009-01-22 02:26:24 -080021932009-01-28 Roland McGrath <roland@redhat.com>
2194
2195 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
2196 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
Roland McGrath1ea4fdc2009-01-21 19:14:37 -08002197
2198 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
2199
22002009-01-26 Roland McGrath <roland@redhat.com>
2201
2202 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
Roland McGrath24b03302009-01-17 14:34:13 -08002203
22042009-01-25 Roland McGrath <roland@redhat.com>
Roland McGrath54456d82009-01-17 14:39:35 -08002205
2206 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
2207
Roland McGrath5513e642009-01-11 01:35:11 -080022082009-01-23 Roland McGrath <roland@redhat.com>
2209
2210 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
2211 Put these rules under if MAINTAINER_MODE.
2212
22132009-01-22 Roland McGrath <roland@redhat.com>
2214
Roland McGrath24b03302009-01-17 14:34:13 -08002215 * dwarf.h: Add DW_OP_GNU_encoded_addr.
2216
Ulrich Drepper7e678fa2009-01-10 18:02:05 -080022172009-01-21 Roland McGrath <roland@redhat.com>
2218
2219 * Makefile.am (CLEANFILES): Renamed to ...
2220 (MOSTLYCLEANFILES): ... here.
Roland McGrathe06762c2009-01-08 13:39:08 -08002221 (CLEANFILES): New variable, add known-dwarf.h.
2222
22232009-01-17 Roland McGrath <roland@redhat.com>
2224
Roland McGrath7e827f22009-01-06 02:09:50 -08002225 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
Roland McGrath1f6d2012008-12-31 00:21:04 -08002226 Make it unconditional.
2227 (BUILT_SOURCES): Updated.
2228
2229 * dwarf.h: Add description comments for DW_LANG_* values.
Roland McGrathbca43152009-01-05 23:59:32 -08002230
2231 * Makefile.am [MAINTAINER_MODE]
2232 ($(srcdir)/known-dwarf.h): New target.
Ulrich Drepperac194d02009-01-06 00:30:01 -08002233 (BUILT_SOURCES): Add it.
2234
Roland McGrathc462c632009-01-06 01:04:31 -08002235 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
Ulrich Drepperac194d02009-01-06 00:30:01 -08002236
22372009-01-10 Ulrich Drepper <drepper@redhat.com>
2238
2239 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00002240
22412009-01-08 Roland McGrath <roland@redhat.com>
2242
2243 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2244
Ulrich Drepper8d358d92008-01-22 06:34:31 +000022452008-01-06 Roland McGrath <roland@redhat.com>
2246
2247 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2248 Reorder members.
2249 * dwarf_haschildren.c: Return -1 for error case, not 0.
2250
2251 * Makefile.am (libdw.so): Link in $(zip_LIBS).
2252
Ulrich Drepperb27ce002008-01-18 20:08:54 +000022532009-01-06 Ulrich Drepper <drepper@redhat.com>
2254
2255 * dwarf.h: Add definition for unwind and call frame information.
2256
2257 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
Ulrich Drepper35f08c42008-01-18 19:59:08 +00002258 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2259
22602008-08-15 Roland McGrath <roland@redhat.com>
2261
2262 * libdw.map (ELFUTILS_0.136): New version set, inherits from
2263 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
2264
22652008-01-21 Ulrich Drepper <drepper@redhat.com>
2266
2267 * dwarf_child.c: Minor optimizations.
2268 * dwarf_getattrs.c: Likewise.
2269 * dwarf_getpubnames.c: Likewise.
2270 * dwarf_siblingof.c: Likewise.
Ulrich Dreppera969d8e2008-01-22 06:15:00 +00002271 * dwarf_tag.c: Likewise.
Ulrich Drepper35f08c42008-01-18 19:59:08 +00002272
22732008-01-18 Ulrich Drepper <drepper@redhat.com>
2274
2275 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
2276 of DWARF_VERSION comparison, just fail if the file's version is newer.
2277
22782008-01-17 Nick Clifton <nickc@redhat.com>
2279
2280 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
2281 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
2282 (DWARF3_LENGTH_64_BIT): New define.
2283 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
2284 * dwarf_getpubnames: Include dwarf.h.
2285 (get_offsets): Use the new definitions.
2286 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
2287 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
2288 (dwarf_nextcu): Use the new definitions.
2289
2290 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
2291 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
2292 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
2293 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
2294
2295 * dwarf_getpubnames (get_offsets): Replace assertion with test and
2296 error return.
2297
2298 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
2299
2300 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
2301 Set the address in the return structure to the address of the next
2302 non-sibling die, if there is no sibling and the return pointer is
2303 not the same as the die pointer.
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00002304 * libdw.h: Expand the description of the dwarf_siblingof prototype.
2305
2306 * dwarf_child.c: Fix typo in comment.
2307
2308 * libdwP.h (DWARF_VERSION): Change to 3.
2309
Roland McGrathe4c22ea2007-10-23 13:07:39 +00002310 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
2311 not have a initialised valp pointer.
2312
2313 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
2314 the end of the attributes is reached. When the callback fails,
2315 return the address of the failing attribute, not the address of
2316 its successor.
2317 * libdw.h: Expand the description of the dwarf_getattrs prototype.
2318
2319 * dwarf_child.c (__libdw_find_attr): Use the new definition.
2320 (dwarf_child): Likewise.
2321 * dwarf_tag.c (__libdw_findabbrev): Likewise.
2322 (dwarf_tag): Likewise.
2323
23242008-01-08 Roland McGrath <roland@redhat.com>
2325
2326 * Makefile.am (euinclude): Variable removed.
2327 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2328 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00002329
23302007-10-17 Roland McGrath <roland@redhat.com>
2331
2332 * libdw.h (__deprecated_attribute__): New macro.
2333 (dwarf_formref): Mark it deprecated.
2334 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
2335 (dwarf_formref): ... here. Call it. Remove INTDEF.
Roland McGrath59ea7f32007-10-04 08:50:09 +00002336 * libdwP.h: Remove INTDECL.
2337 Declare __libdw_formref.
2338 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
2339 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
2340
2341 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
2342 needs to check CU->version.
2343
Roland McGrath057ec6b2007-10-02 20:55:05 +00002344 * libdwP.h (struct Dwarf_CU): New member `version'.
2345 * libdw_findcu.c (__libdw_findcu): Initialize it.
2346
2347 * dwarf_child.c: Return 1 for null entry as first child.
2348
Roland McGrathd1a48172007-08-07 19:51:01 +000023492007-10-05 Roland McGrath <roland@redhat.com>
2350
2351 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
2352
2353 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
2354 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
2355
23562007-10-03 Roland McGrath <roland@redhat.com>
2357
2358 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
2359 and dwfl_build_id_find_debuginfo.
Roland McGrath87d47802007-07-16 22:23:37 +00002360
2361 * libdw.map (ELFUTILS_0.130): New version set, inherits from
2362 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
2363
23642007-10-02 Roland McGrath <roland@redhat.com>
Roland McGrath43da9892007-04-16 23:13:37 +00002365
2366 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
2367 structure_type.
2368
Roland McGrathbf2ee482007-04-05 09:27:36 +000023692007-08-07 Roland McGrath <roland@redhat.com>
2370
Roland McGrath43da9892007-04-16 23:13:37 +00002371 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
2372 error code is DWARF_E_NOERROR (0).
2373
2374 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
2375 Fix typo in __libdw_visit_scopes argument.
2376
2377 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
2378 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
2379
23802007-07-03 Roland McGrath <roland@redhat.com>
Roland McGrathbf2ee482007-04-05 09:27:36 +00002381
2382 * libdw.h (__extern_inline): New macro.
2383 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
2384
Ulrich Drepperc07fbb32007-03-30 19:14:59 +000023852007-04-16 Roland McGrath <roland@redhat.com>
2386
2387 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
2388
23892007-04-05 Roland McGrath <roland@redhat.com>
2390
2391 * dwarf_getsrcdirs.c: New file.
2392 * Makefile.am (libdw_a_SOURCES): Add it.
Ulrich Drepper6258e742007-03-13 06:22:40 +00002393 * libdw.h: Declare dwarf_getsrcdirs.
2394 * libdw.map (ELFUTILS_0.127): Add it.
2395
2396 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
2397 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
2398 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
2399 Save DIRARRAY in the Dwarf_Files.
2400
2401 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
Ulrich Drepper903c1162007-02-15 19:40:37 +00002402 address to check for all-ones base address entry. Check directly.
2403 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
2404
24052007-03-25 Roland McGrath <roland@redhat.com>
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00002406
2407 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
2408 Return NULL when freeing RESULT on error.
2409 (global_read, scngrp_read): Check return value from check_section,
2410 break out of loop after it has freed RESULT.
2411 (valid_p): Handle null argument.
2412
Roland McGrath8190db62006-12-17 23:56:51 +000024132007-03-12 Roland McGrath <roland@redhat.com>
2414
2415 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
2416
24172007-03-04 Roland McGrath <roland@redhat.com>
Roland McGrathc373d852006-10-10 00:25:21 +00002418
2419 * libdw.map (ELFUTILS_0.127): New version set, inherits from
2420 ELFUTILS_0.126. Add dwfl_module_addrsym.
2421
24222007-02-10 Roland McGrath <roland@redhat.com>
2423
2424 * dwarf.h (DW_OP_fbreg): Comment fix.
2425
24262007-02-03 Roland McGrath <roland@redhat.com>
2427
2428 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
2429 * libdw.map (ELFUTILS_0.126): New version set, inherits from
Ulrich Drepper077c65f2006-07-12 19:54:51 +00002430 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
2431 exported in the past.
2432
24332006-12-17 Roland McGrath <roland@redhat.com>
2434
2435 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
2436 address when the CU is missing attributes due to buggy GCC.
2437
Ulrich Dreppere1812e12006-07-12 07:46:03 +000024382006-08-29 Roland McGrath <roland@redhat.com>
2439
2440 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
2441
2442 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
2443 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
2444
Ulrich Drepper3be74472006-05-27 18:15:40 +00002445 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
2446 result is aligned. Adjust NEWP->remaining here for this allocation.
2447 * libdwP.h: Update decl.
2448 (libdw_alloc): Update caller.
Ulrich Dreppere7a73172006-05-22 18:16:45 +00002449
24502006-07-12 Ulrich Drepper <drepper@redhat.com>
2451
2452 * dwarf_child.c: Adjust for internal_function_def removal.
2453 * dwarf_getabbrev.c: Likewise.
Ulrich Drepper4f3d2a22006-05-22 01:30:56 +00002454 * dwarf_tag.c: Likewise.
2455 * libdw_form.c: Likewise.
2456 * memory-access.c: Likewise.
2457
24582006-06-28 Roland McGrath <roland@redhat.com>
Roland McGrath2dade662006-02-28 22:13:20 +00002459
2460 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
2461
2462 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
2463 dwfl_module_getsym.
2464
Roland McGrath08333122006-02-27 04:54:26 +000024652006-05-27 Ulrich Drepper <drepper@redhat.com>
2466
2467 * libdw.h: Add extern "C".
2468
Roland McGrath50ffcbf2005-12-23 01:51:43 +000024692006-05-22 Ulrich Drepper <drepper@redhat.com>
2470
2471 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
2472 aranges information.
Roland McGrathdec3a242005-12-12 08:35:55 +00002473
24742006-05-21 Ulrich Drepper <drepper@redhat.com>
2475
2476 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
2477 dwarf_haschildren.
Roland McGrathf64a4422005-12-09 23:40:30 +00002478
24792006-02-28 Roland McGrath <roland@redhat.com>
2480
2481 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
2482 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
2483 values from DWARF 3.0.
Roland McGrath994b4892005-12-05 22:46:21 +00002484
24852006-02-22 Roland McGrath <roland@redhat.com>
2486
2487 * libdw.map: Bump to 0.120; export dwfl_version.
Roland McGrathe47ab762005-11-17 03:16:00 +00002488
24892005-12-22 Roland McGrath <roland@redhat.com>
2490
2491 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
2492
24932005-12-12 Roland McGrath <roland@redhat.com>
2494
2495 * dwarf_ranges.c: Copy CU base address-finding code from
Roland McGrath07d4f2f2005-10-28 06:56:24 +00002496 dwarf_getlocation.
2497
24982005-12-09 Roland McGrath <roland@redhat.com>
2499
2500 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
2501 Delay CU base lookup until it's needed.
2502 If CU base lookup fails with no error, flag invalid DWARF.
2503
25042005-11-25 Roland McGrath <roland@redhat.com>
2505
2506 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
2507
Roland McGrath6724c902005-10-28 07:07:19 +000025082005-11-15 Roland McGrath <roland@redhat.com>
2509
2510 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
2511
25122005-11-13 Roland McGrath <roland@redhat.com>
2513
2514 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
2515
25162005-10-27 Roland McGrath <roland@redhat.com>
2517
2518 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
2519 don't match end_sequence markers.
2520
2521 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
2522 before normal records at the same address.
2523 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
2524 marker.
2525
25262005-10-26 Roland McGrath <roland@redhat.com>
2527
2528 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
2529 * dwarf_func_file.c: Renamed to ...
2530 * dwarf_decl_file.c: ... here.
2531 * dwarf_func_col.c: Renamed to ...
2532 * dwarf_decl_column.c: ... here.
2533 * dwarf_func_line.c: Renamed to ...
2534 * dwarf_decl_line.c: ... here.
2535 (dwarf_func_line): Renamed to ...
2536 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
2537 (__libdw_func_intval): Renamed __libdw_attr_intval.
2538 * dwarf_func_name.c: File removed.
2539 * dwarf_func_lowpc.c: File removed.
2540 * dwarf_func_highpc.c: File removed.
2541 * dwarf_func_entrypc.c: File removed.
2542 * dwarf_func_die.c: File removed.
2543 * Makefile.am (libdw_a_SOURCES): Updated.
2544 * libdw.h: Update decls.
2545 (Dwarf_Func): Type removed.
2546 * libdwP.h: Update decls.
Roland McGrath07d4f2f2005-10-28 06:56:24 +00002547 (struct Dwarf_Func_s): Type removed.
2548 * libdw.map: Updated.
2549
2550 * libdwP.h (CUDIE): New macro.
2551 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
2552 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
2553 * dwarf_ranges.c (dwarf_ranges): Likewise.
2554
2555 * dwarf_getloclist.c: Renamed to ...
2556 * dwarf_getlocation.c: ... here.
2557 (getloclist): Renamed to getlocation.
2558 (dwarf_getloclist): Renamed to dwarf_getlocation.
2559 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
2560 * Makefile.am (libdw_a_SOURCES): Updated.
2561 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
2562 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
2563 (Dwarf_Loc): Renamed Dwarf_Op.
2564 * libdwP.h (struct loc_s): Update use.
2565 * libdw.map: Update map.
2566
2567 * dwarf_entry_breakpoints.c: Use the second line record within the
2568 function, regardless of its source location data.
2569
25702005-10-25 Roland McGrath <roland@redhat.com>
2571
2572 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
2573
2574 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
2575
25762005-10-14 Roland McGrath <roland@redhat.com>
2577
2578 * dwarf_diecu.c (dwarf_diecu): New file.
2579 * Makefile.am (libdw_a_SOURCES): Add it.
2580 * libdw.h: Declare dwarf_diecu.
2581 * libdw.map: Export it.
2582
2583 * libdw.map: Bump to 0.116; export dwarf_ranges.
2584
25852005-09-20 Roland McGrath <roland@redhat.com>
2586
2587 * dwarf_haspc.c: Use dwarf_ranges.
2588 * dwarf_entry_breakpoints.c: Likewise.
2589
2590 * dwarf_ranges.c: New file.
2591 * Makefile.am (libdw_a_SOURCES): Add it.
2592 * libdw.h: Declare dwarf_ranges.
2593 * libdwP.h: Add INTDECL.
2594
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000025952005-09-14 Roland McGrath <roland@redhat.com>
2596
2597 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
2598 prologue_end marker scanning loop.
2599
26002005-09-11 Roland McGrath <roland@redhat.com>
Roland McGrath71e15a02005-08-27 10:33:26 +00002601
2602 * dwarf.h: Comment typo fix.
2603
26042005-09-07 Roland McGrath <roland@redhat.com>
2605
2606 * dwarf_entry_breakpoints.c: New file.
2607 * Makefile.am (libdw_a_SOURCES): Add it.
2608 * libdw.h: Declare dwarf_entry_breakpoints.
2609
2610 * dwarf_entrypc.c: New file.
2611 * Makefile.am (libdw_a_SOURCES): Add it.
2612 * libdw.h: Declare dwarf_entrypc.
2613 * libdwP.h: Add INTDECL.
2614
26152005-08-28 Ulrich Drepper <drepper@redhat.com>
2616
2617 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
2618 (%.os): Use COMPILE.os.
2619 (COMPILE.os): Filter out gconv options.
2620
26212005-08-27 Roland McGrath <roland@redhat.com>
2622
Roland McGrathd17fac72005-08-23 08:20:21 +00002623 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
2624 __libdw_visit_scopes.
2625
2626 * dwarf_getscopes_die.c: New file.
2627 * Makefile.am (libdw_a_SOURCES): Add it.
2628 * libdw.h: Declare dwarf_getscopes_die.
2629 * libdw.map: Bump to 0.115 and add it.
2630
2631 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
2632 containing a DIE and its parent pointer, instead of just Dwarf_Die.
2633 Take two functions for both preorder and postorder visitors.
2634 * libdwP.h: Update decl.
2635 (struct Dwarf_Die_Chain): New type.
2636 * dwarf_func_inline.c: Update uses.
2637
2638 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
2639 Add INTDEF.
Roland McGrathf5fda7d2005-08-18 22:01:57 +00002640 * libdwP.h: Add INTDECL.
2641 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
2642
26432005-08-23 Roland McGrath <roland@redhat.com>
2644
Roland McGrath1ecb6062005-08-15 09:53:04 +00002645 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
2646 DW_AT_specification the same as DW_AT_abstract_origin.
2647
26482005-08-20 Roland McGrath <roland@redhat.com>
2649
2650 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
2651 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
2652 and dwfl_report_offline.
2653
26542005-08-19 Roland McGrath <roland@redhat.com>
2655
2656 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
Roland McGrath1c83bf12005-08-11 07:03:55 +00002657 Add dwfl_module_relocate_address, dwfl_module_relocations,
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002658 dwfl_module_relocation_info.
Roland McGrath1c83bf12005-08-11 07:03:55 +00002659
26602005-08-18 Roland McGrath <roland@redhat.com>
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00002661
Roland McGrath4959bf82005-08-09 10:31:08 +00002662 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
2663 outermost scope in the results.
Roland McGrathb6312e12005-08-09 10:36:01 +00002664
26652005-08-15 Roland McGrath <roland@redhat.com>
Roland McGrath4959bf82005-08-09 10:31:08 +00002666
2667 * dwarf_func_inline.c: New file.
2668 * Makefile.am (libdw_a_SOURCES): Add it.
2669 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
Roland McGratha5a89682005-08-02 01:24:01 +00002670 * libdw.map: Add them.
2671
2672 * dwarf_func_die.c: New file.
2673 * Makefile.am (libdw_a_SOURCES): Add it.
2674 * libdw.h: Declare dwarf_func_die.
Ulrich Drepper18618fd2005-07-28 21:29:22 +00002675 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
2676
26772005-08-10 Ulrich Drepper <drepper@redhat.com>
2678
2679 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
Roland McGrath366784a2005-07-28 06:20:53 +00002680 of DW_LNS_set_epilog_begin.
2681
Roland McGrath18385902005-07-28 07:12:38 +000026822005-08-09 Roland McGrath <roland@redhat.com>
2683
2684 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
2685
2686 * dwarf_end.c: Add INTDEF.
2687 * dwarf_error.c (dwarf_errmsg): Likewise.
Roland McGrath366784a2005-07-28 06:20:53 +00002688 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
2689
26902005-08-01 Roland McGrath <roland@redhat.com>
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00002691
2692 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
2693 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2694
26952005-07-28 Ulrich Drepper <drepper@redhat.com>
2696
2697 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
2698 (libdw_a_LIBADD): Add all files from libdwfl.a.
2699
27002005-07-27 Roland McGrath <roland@redhat.com>
2701
2702 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
2703 along with ../libebl/libebl.a and ../lib/libeu.a;
2704 depend on ../libelf/libelf.so.
2705 (libdw_so_LDADD): New variable.
2706 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
2707
2708 * libdw.map: Define an empty base version and move all symbols to
2709 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
2710
27112005-07-23 Ulrich Drepper <drepper@redhat.com>
2712
2713 * dwarf_error.c: Add internal alias for dwarf_errno.
2714 * libdwP.h: Declare __dwarf_errno_internal.
2715 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
2716
2717 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
2718 global_error.
2719
27202005-06-01 Roland McGrath <roland@redhat.com>
2721
2722 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
2723 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
2724
27252005-06-08 Roland McGrath <roland@redhat.com>
2726
2727 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
2728 (get_sleb128_step, get_sleb128): Likewise.
2729 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
2730 * dwarf_getloclist.c (getloclist): Likewise.
2731 * dwarf_formblock.c (dwarf_formblock): Likewise.
2732 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2733 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
2734 * dwarf_formref.c (dwarf_formref): Likewise.
2735 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
2736 * dwarf_formudata.c (dwarf_formudata): Likewise.
2737 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
2738 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
2739 * dwarf_tag.c (dwarf_tag): Likewise.
2740 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
2741 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
2742 * libdw_form.c (__libdw_form_val_len): Likewise.
2743 * libdwP.h: Update decl.
2744
27452005-06-04 Roland McGrath <roland@redhat.com>
2746
2747 * memory-access.h (get_uleb128_rest_return): New macro.
2748 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
2749 (get_sleb128_rest_return): New macro.
2750 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
2751 * memory-access.c: New file.
2752 * Makefile.am (libdw_a_SOURCES): Add it.
2753 (DEFS): Add -DIS_LIBDW.
2754
27552005-05-31 Roland McGrath <roland@redhat.com>
2756
2757 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
2758 formref offset.
2759
27602005-05-30 Roland McGrath <roland@redhat.com>
2761
2762 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
2763 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
2764
2765 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
2766 BEGIN value. Instead, match base address entries separately for
2767 32/64 size cases.
2768
27692005-05-28 Roland McGrath <roland@redhat.com>
2770
2771 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
2772 past location expression contents.
2773
27742005-05-23 Roland McGrath <roland@redhat.com>
2775
2776 * dwarf_getsrclines.c: Comment typo fix.
2777
2778 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
2779 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
2780
27812005-05-22 Ulrich Drepper <drepper@redhat.com>
2782
2783 * libdwP.h: Only use INTDECL for alias prototypes.
2784
27852005-05-19 Roland McGrath <roland@redhat.com>
2786
2787 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
2788
2789 * dwarf_getscopevar.c: New file.
2790 * Makefile.am (libdw_a_SOURCES): Add it.
2791 * libdw.h: Declare dwarf_getscopevar.
2792
2793 * dwarf_getsrcfiles.c: Add INTDEF.
2794 * dwarf_haschildren.c: Likewise.
2795 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
2796
2797 * dwarf_getscopes.c: New file.
2798 * Makefile.am (libdw_a_SOURCES): Add it.
2799 * libdw.h: Declare dwarf_getscopes.
2800 * libdw.map: Add it.
2801
28022005-05-18 Roland McGrath <roland@redhat.com>
2803
2804 * libdwP.h (IDX_debug_ranges): New enum constant.
2805 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
2806 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
2807 * dwarf_error.c (errmsgs): Add it.
2808 * dwarf_haspc.c: New file.
2809 * libdw.h: Declare dwarf_haspc.
2810 * libdw.map: Add it.
2811 * libdwP.h: Add INTDECL.
2812
2813 * dwarf_attr_integrate.c: New file.
2814 * dwarf_hasattr_integrate.c: New file.
2815 * Makefile.am (libdw_a_SOURCES): Add them.
2816 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
2817 * libdw.map: Add them.
2818
2819 * dwarf_hasattr.c: Add INTDEF.
2820 * libdwP.h: Add INTDECL for it.
2821
2822 * dwarf_formref_die.c: New file.
2823 * Makefile.am (libdw_a_SOURCES): Add it.
2824 * libdw.h (dwarf_formref_die): Declare it.
2825 * libdwP.h (dwarf_formref_die): Add INTDECL.
2826 * libdw.map: Add it.
2827
2828 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
2829 of ...
2830 (dwarf_getloclist): ... here. Call them.
2831 (dwarf_addrloclists): New function.
2832 * libdw.h: Declare it.
2833 * libdw.map: Add it.
2834
2835 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
2836 DW_MACINFO_end_file. Recognize type 0 as terminator.
2837
28382005-05-05 Roland McGrath <roland@redhat.com>
2839
2840 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
2841
2842 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
2843 the line program does not produce all entries in ascending order.
2844
28452005-04-25 Ulrich Drepper <drepper@redhat.com>
2846
2847 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
2848 occurences (e.g., inlines) better.
2849
28502005-04-24 Ulrich Drepper <drepper@redhat.com>
2851
2852 * libdw.h (DWARF_END_ABBREV): Define.
2853 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
2854 end is reached.
2855 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
2856 of records reached.
2857 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
2858 as error of __libdw_getabbrev.
2859
28602005-04-04 Ulrich Drepper <drepper@redhat.com>
2861
2862 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
2863
2864 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
2865 results back to caller.
2866
28672005-04-04 Roland McGrath <roland@redhat.com>
2868
2869 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
2870
2871 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
2872 defn.
2873
28742005-04-04 Ulrich Drepper <drepper@redhat.com>
2875
2876 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
2877
2878 * dwarf_getsrc_file.c: New file.
2879 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
2880 * libdw.h: Declare dwarf_getsrc_file.
2881 * libdw.map: Add dwarf_getsrc_file.
2882
28832005-04-02 Ulrich Drepper <drepper@redhat.com>
2884
2885 * dwarf_func_entrypc.c: New file.
2886 * dwarf_func_col.c: New file.
2887 * dwarf_func_line.c: New file.
2888 * dwarf_func_file.c: New file.
2889 * libdw.h: Add prototypes for new functions.
2890 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
2891 dwarf_func_file.
2892 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
2893 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
2894 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
2895 Declare __libdw_func_intval and __dwarf_formsdata_internal.
2896 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
2897 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
2898
2899 * dwarf.h: Add some DWARF3 definitions.
2900
29012005-04-01 Ulrich Drepper <drepper@redhat.com>
2902
2903 * dwarf_getfuncs.c: New file.
2904 * dwarf_func_highpc.c: New file.
2905 * dwarf_func_lowpc.c: New file.
2906 * dwarf_func_name.c: New file.
2907 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
2908 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
2909 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
2910 and dwarf_func_name.
2911 * libdw.h: Add prototypes for new functions.
2912 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
2913 * dwarf_siblingof.c: Likewise.
2914 * dwarf_dieoffset.c: Likewise.
2915 * dwarf_highpc.c: Likewise.
2916 * dwarf_lowpc.c: Likewise.
2917 * libdwP.h: Add prototypes for internal functions.
2918 Define Dwarf_Func_s structure.
2919
29202005-03-29 Ulrich Drepper <drepper@redhat.com>
2921
2922 * libdw.h: Add padding in Dwarf_die.
2923
2924 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2925 * dwarf_attr.c: Likewise.
2926 * dwarf_begin.c: Likewise.
2927 * dwarf_begin_elf.c: Likewise.
2928 * dwarf_bitoffset.c: Likewise.
2929 * dwarf_bitsize.c: Likewise.
2930 * dwarf_bytesize.c: Likewise.
2931 * dwarf_diename.c: Likewise.
2932 * dwarf_formaddr.c: Likewise.
2933 * dwarf_formblock.c: Likewise.
2934 * dwarf_formref.c: Likewise.
2935 * dwarf_formstring.c: Likewise.
2936 * dwarf_formudata.c: Likewise.
2937 * dwarf_getarange_addr.c: Likewise.
2938 * dwarf_getarangeinfo.c: Likewise.
2939 * dwarf_getaranges.c: Likewise.
2940 * dwarf_getloclist.c: Likewise.
2941 * dwarf_getmacros.c: Likewise.
2942 * dwarf_getsrc_die.c: Likewise.
2943 * dwarf_getsrcfiles.c: Likewise.
2944 * dwarf_getsrclines.c: Likewise.
2945 * dwarf_highpc.c: Likewise.
2946 * dwarf_lowpc.c: Likewise.
2947 * dwarf_nextcu.c: Likewise.
2948 * dwarf_offdie.c: Likewise.
2949 * dwarf_siblingof.c: Likewise.
2950 * dwarf_srclang.c: Likewise.
2951 * dwarf_tag.c: Likewise.
2952 * libdw_findcu.c: Likewise.
2953 * libdwP.h: Add prototypes for internal functions.
2954
2955 * dwarf_addrdie.c: New file.
2956 * dwarf_macro_opcode.c: New file.
2957 * dwarf_macro_param1.c: New file.
2958 * dwarf_macro_param2.c: New file.
2959 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2960 * libdwP.h: Remove Dwarf_Macro definition.
2961 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2962 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2963 * libdw.map: Add entries for new functions.
2964
29652005-03-21 Ulrich Drepper <drepper@redhat.com>
2966
2967 * libdw.h: Handle broken gcc < 4.
2968
29692005-02-15 Ulrich Drepper <drepper@redhat.com>
2970
2971 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2972
2973 * dwarf_begin_elf.c: Fix warnings.
2974 * dwarf_dieoffset.c: Likewise.
2975 * dwarf_end.c: Likewise.
2976 * dwarf_error.c: Likewise.
2977 * dwarf_getpubnames.c: Likewise.
2978
2979 * libdwP.h: Add new error values.
2980 * dwarf_error.c: Support new error values.
2981 * dwarf_getpubnames.c: Check parameter value.
2982
29832005-02-05 Ulrich Drepper <drepper@redhat.com>
2984
2985 * Makefile.am: Check for text relocations in constructed DSO.
2986
2987 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2988
29892005-02-04 Ulrich Drepper <drepper@redhat.com>
2990
2991 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2992 checks to not read over buffer boundaries for ill-formed DWARF data.
2993
29942004-09-25 Ulrich Drepper <drepper@redhat.com>
2995
2996 * dwarf_child.c: Make compile with gcc 4.0.
2997 * dwarf_error.c: Likewise.
2998 * dwarf_formblock.c: Likewise.
2999 * dwarf_getabbrev.c: Likewise.
3000 * dwarf_getattrs.c: Likewise.
3001 * dwarf_getsrclines.c: Likewise.
3002 * dwarf_tag.c: Likewise.
3003 * libdw_form.c: Likewise.
3004
30052004-01-20 Ulrich Drepper <drepper@redhat.com>
3006
3007 * Makefile.am: Support building with mudflap.
3008
3009 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
3010 * dwarf_getsrclines.c: Likewise.
3011 * dwarf_memory-access.h: Likewise.
3012
30132004-01-19 Ulrich Drepper <drepper@redhat.com>
3014
3015 * dwarf_getsrcfiles.c: Third parameter can be NULL.
3016
3017 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
3018 Third parameter of dwarf_getsrcfiles can be NULL.
3019
3020 * libdw.map: Add dwarf_getmacros.
3021 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
3022 * dwarf_getmacros.c: New file.
3023
30242004-01-18 Ulrich Drepper <drepper@redhat.com>
3025
3026 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
3027
3028 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
3029
3030 * dwarf_getsrclines.c:
3031 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
3032
3033 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
3034
3035 * libdwP.h (_): Use elfutils domain.
3036
3037 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
3038
3039 * dwarf_getsrclines.c: Fix typo in comment.
3040
30412004-01-17 Ulrich Drepper <drepper@redhat.com>
3042
3043 * Makefile.am: Support building with mudflap.
3044
30452004-01-16 Ulrich Drepper <drepper@redhat.com>
3046
3047 * memory-access.h: Add lots of const in case a pointer passed is const.
3048
3049 * dwarf_formflag.c: New file.
3050 * dwarf_getattrs.c: New file.
3051 * dwarf_error.c: Add new error value.
3052 * libdw.h: Add prototypes for new functions. Adjust prototype for
3053 dwarf_getpubnames.
3054 * libdw.map: Add new functions.
3055 * dwarf_getpubnames.c: Change type of return value and fourth parameter
3056 to ptrdiff_t.
3057 * libdwP.h: Add new error value.
3058 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
3059 dwarf_formflag.c.
3060
3061 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
3062
30632004-01-12 Ulrich Drepper <drepper@redhat.com>
3064
3065 * dwarf_getarange_addr.c: New file
3066 * dwarf_getarangeinfo.c: New file.
3067 * dwarf_getaranges.c: New file.
3068 * dwarf_onerange.c: New file.
3069 * libdw.h: Declare new functions. Define Dwarf_Arange and
3070 Dwarf_Aranges.
3071 * libdw.map: Add new functions.
3072 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
3073 Define Dwarf_Aranges_s and Dwarf_Arange_s.
3074 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
3075 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
3076 * dwarf_error.c: Add new message.
3077
30782004-01-11 Ulrich Drepper <drepper@redhat.com>
3079
3080 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
3081 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
3082 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
3083 * dwarf_error.c: Add another message.
3084 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
3085 introduction.
3086 * dwarf_filesrc.c: Likewise.
3087 * dwarf_getsrcfiles.c: Likewise.
3088 * dwarf_getsrclines.c: Likewise.
3089 * dwarf_lineaddr.c: New file.
3090 * dwarf_linebeginstatement.c: New file.
3091 * dwarf_lineblock.c: New file.
3092 * dwarf_linecol.c: New file.
3093 * dwarf_lineendsequence.c: New file.
3094 * dwarf_lineepiloguebegin.c: New file.
3095 * dwarf_lineno.c: New file.
3096 * dwarf_lineprologueend.c: New file.
3097 * dwarf_onesrcline.c: New file.
3098 * dwarf_lineno.c: Change interface to store result in object pointed
3099 to by second parameter.
3100 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
3101 prototype. Define Dwarf_Files and Dwarf_Lines.
3102 * libdw.map: Add new functions.
3103 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
3104 * libdw_findcu.c: Don't initialize nlines field.
3105
3106 * dwarf_siblingof: Little optimization.
3107
3108 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
3109 * dwarf_end.c: Close ELF descriptor if free_elf is set.
3110 * libdwP.h (struct Dwarf): Add free_elf field.
3111
3112 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
3113 dwarf_offabbrev.c.
3114 * dwarf_getstring.c: New file.
3115 * dwarf_offabbrev.c: New file.
3116 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
3117 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
3118 parameters. Don't allocate memory if not necessary and don't lookup
3119 previous results if no CU given.
3120 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
3121 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
3122 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
3123 * libdwP.h: Change prototype for __libdw_getabbrev.
3124
3125 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
3126 returning if this is wanted.
3127
31282004-01-09 Ulrich Drepper <drepper@redhat.com>
3129
3130 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
3131 with offset_size value.
3132 * libdw.h: Adjust dwarf_nextcu prototype.
3133 * libdwP.h (struct Dwarf_CU): Add offset_size member.
3134 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
3135 member of new CU struct.
3136 * dwarf_formstring.c: Depend on offset_size not address_size for
3137 DW_FORM_strp handling.
3138 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
3139
3140 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
3141 failing lookup.
3142 (dwarf_tag): Correctly recognize failed lookup.
3143
3144 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
3145 function noop_free.
3146 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
3147 * dwarf_formblock.c: New file.
3148 * dwarf_getloclist.c: Rewrite to handle a single block.
3149 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
3150 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
3151 dwarf_getloclistent declaration.
3152 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
3153 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
3154 Add locs member to struct Dwarf_CU.
3155 * libdw_fundcu.c: Initialize locs member of new CU.
3156 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
3157 Remove dwarf_getloclistent.c.
3158
31592004-01-07 Ulrich Drepper <drepper@redhat.com>
3160
3161 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
3162 * libdwP.h: Likewise.
3163
3164 * dwarf_getloclist.c: New file.
3165 * dwarf_getloclistent.c: New file.
3166 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
3167 Declare dwarf_getloclistent and dwarf_getloclist.
3168 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
3169 * libdwP.h: Define DWARF_E_NO_LOCLIST.
3170 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
3171 dwarf_getloclist.c.
3172
3173 * dwarf_error.c: More error messages.
3174
31752004-01-06 Ulrich Drepper <drepper@redhat.com>
3176
3177 * dwarf_getsrclines.c: Remove debugging support.
3178
3179 * dwarf_getsrcfiles.c: New file.
3180 * dwarf_filesrc.c: New file.
3181 * libdw.h: Declare these functions. Define Dwarf_File.
3182 * libdwP.c: Adjust Dwarf_File_s definition.
3183 * libdw.map: Add these functions.
3184 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
3185 dwarf_filesrc.c.
3186 * dwarf_getsrclines.c: Initialize cu->files.
3187
31882004-01-05 Ulrich Drepper <drepper@redhat.com>
3189
3190 * libdw.h: Add more nonnull function attributes.
3191
3192 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
3193 * dwarf_end.c (cu_free): New function.
3194 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
3195 * dwarf_error.c (errmsgs): Add new messages.
3196 * dwarf_getsrc_die.c: New file.
3197 * dwarf_getsrclines.c: New file.
3198 * dwarf_lineno.c: New file.
3199 * dwarf_linesrc.c: New file.
3200 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
3201 instead of the *_inc-less variants.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07003202 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00003203 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
3204 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
3205 and dwarf_linesrc.
3206 * libdwP.h: Add more error codes.
3207 (struct Dwarf): Remove mem_tail.next member.
3208 (Dwarf_File): Define type.
3209 (struct Dwarf_Line_s): Define type.
3210 (struct Dwarf_CU): Add lines and nlines members.
3211 (libdw_alloc): Define local variable _tail and use it.
3212 Add some function attributes.
3213 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
3214 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
3215 * memory-access.h: Add unlikely for the endian conversion paths.
3216 * Makefile.am (AM_CFLAGS): Add -std parameter.
3217 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3218 dwarf_lineno, and dwarf_linesrc.
3219
32202003-08-11 Ulrich Drepper <drepper@redhat.com>
3221
3222 * Moved to CVS archive.