blob: 66e774a1f507a9d317efcd95cb51f40cc0bbe8c5 [file] [log] [blame]
Roland McGrath688f7fc2010-05-08 03:22:59 -070012010-05-08 Roland McGrath <roland@redhat.com>
2
3 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
4 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
5 (getlocation): Update caller.
6 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
7 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
8 * libdwP.h: Update decl.
9
Roland McGrath0ab97832010-04-26 11:50:27 -0700102010-04-26 Roland McGrath <roland@redhat.com>
11
Roland McGrath3b10ac02010-04-26 18:45:36 -070012 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
13 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
14 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
15 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
16
Roland McGrath0ab97832010-04-26 11:50:27 -070017 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
18 Prepend DW_OP_call_frame_cfa if true.
19 (getlocation): Update caller.
20 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
21 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
22 * libdwP.h: Update decl.
23
Roland McGrath3f9d9552010-04-22 20:51:07 -0700242010-04-22 Roland McGrath <roland@redhat.com>
25
26 * cfi.c (execute_cfi): Never return without cleanup.
27 Free FS on failure.
28 (cie_cache_initial_state): Adjust caller to expect that free.
29 (__libdw_frame_at_address): Likewise.
30
Roland McGrath8068e062010-03-10 23:49:13 -0800312010-03-10 Roland McGrath <roland@redhat.com>
32
33 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
34
Roland McGrath22359e22010-02-15 15:57:03 -0800352010-02-15 Roland McGrath <roland@redhat.com>
36
37 * Makefile.am: Use config/eu.am for common stuff.
38
Mark Wielaardee29a312010-02-02 20:44:53 +0100392010-02-02 Mark Wielaard <mjw@redhat.com>
40
41 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
42
Roland McGrathf95760a2010-01-07 20:24:34 -0800432010-01-07 Roland McGrath <roland@redhat.com>
44
45 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
46
Roland McGrath019d9fb2010-01-05 13:36:07 -0800472010-01-05 Roland McGrath <roland@redhat.com>
48
Roland McGrathebc5c882010-01-05 22:53:31 -080049 * dwarf_aggregate_size.c: New file.
50 * Makefile.am (libdw_a_SOURCES): Add it.
51 * libdw.h: Declare it.
52 * libdwP.h: Add INTDECL.
53 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
54
55 * dwarf_srclang.c: Add INTDEF.
56 * libdwP.h: Add INTDECL.
57
Roland McGrath0cb19832010-01-05 13:38:15 -080058 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
59
Roland McGrath019d9fb2010-01-05 13:36:07 -080060 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
61
Roland McGrath888381b2009-11-21 17:03:34 -0800622009-11-21 Roland McGrath <roland@redhat.com>
63
64 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
65 non-constant forms.
66
Roland McGrath9ca7bc42009-10-15 12:26:49 -0700672009-10-15 Roland McGrath <roland@redhat.com>
68
69 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
70 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
71
Roland McGrath7e0aecd2009-09-17 15:02:34 -0700722009-09-17 Roland McGrath <roland@redhat.com>
73
74 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
75 argument a pointer to const.
76 * libdw.h: Update decl.
77
Roland McGrathf0371042009-09-10 12:39:09 -0700782009-09-10 Roland McGrath <roland@redhat.com>
79
80 * dwarf_getlocation.c (store_implicit_value): New function.
81 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
82 (dwarf_getlocation_implicit_value): New function.
83 * libdw.h: Declare it.
84 * libdw.map (ELFUTILS_0.143): Add it.
85
Mark Wielaard418ae4c2009-09-09 20:59:26 +0200862009-09-09 Mark Wielaard <mjw@redhat.com>
87
88 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
89
Josh Stonecc93cc42009-08-21 18:04:44 -0700902009-08-21 Josh Stone <jistone@redhat.com>
91
92 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
93
Roland McGrath08277ba2009-08-10 15:08:08 -0700942009-08-10 Roland McGrath <roland@redhat.com>
95
96 * dwarf_getscopevar.c: Use dwarf_diename.
97
Roland McGrathebfb6482009-08-09 15:40:52 -0700982009-08-09 Roland McGrath <roland@redhat.com>
99
100 * libdw.map (ELFUTILS_0.143): New version set,
101 inherits from ELFUTILS_0.142.
102 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
103 alias in the ELFUTILS_0.122 version set and the default in the new set.
104 * dwarf_srclang.c: Likewise.
105 * dwarf_decl_file.c: Likewise.
106 * dwarf_decl_line.c: Likewise.
107 * dwarf_decl_column.c: Likewise.
108 * dwarf_bytesize.c: Likewise.
109 * dwarf_bitsize.c: Likewise.
110 * dwarf_bitoffset.c: Likewise.
111
Roland McGrathde69d522009-08-07 18:26:19 -07001122009-08-07 Roland McGrath <roland@redhat.com>
113
114 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
115 * dwarf_srclang.c: Likewise.
116 * dwarf_decl_file.c: Likewise.
117 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
118 * dwarf_bytesize.c: Likewise.
119 * dwarf_bitsize.c: Likewise.
120 * dwarf_bitoffset.c: Likewise.
121
Roland McGrathaf800142009-07-22 13:55:50 -07001222009-07-22 Roland McGrath <roland@redhat.com>
123
124 * dwarf_frame_cfa.c: Change calling convention.
125 * libdw.h: Update decl.
126
127 * dwarf_frame_register.c: Change calling/return-value convention for
128 value-only results and undefined/same_value.
129 * libdw.h: Update decl.
130
131 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
132 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
133 return that value instead.
134 (getlocation): Update caller.
135 * dwarf_frame_cfa.c: Likewise.
136 * libdwP.h: Update decl.
137
Roland McGrathe23e9e72009-07-21 18:14:52 -07001382009-07-21 Roland McGrath <roland@redhat.com>
139
140 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
141 Fix loop iteration after skipping a bogus or useless CU.
142
143 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
144 absence, not DWARF_E_NO_DEBUG_LINE.
145
Roland McGrath96349ff2009-07-20 11:51:41 -07001462009-07-20 Roland McGrath <roland@redhat.com>
147
148 * dwarf_getlocation.c (__libdw_intern_expression):
149 Handle DW_OP_stack_value.
150
Roland McGratha6abdfd2009-07-16 17:40:19 -07001512009-07-16 Roland McGrath <roland@redhat.com>
152
Roland McGrathe160cc92009-07-16 17:48:27 -0700153 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
154 reject others when CU's version > 3.
155
156 * dwarf_formflag.c: Handle DW_FORM_flag_present.
157
Roland McGratha6abdfd2009-07-16 17:40:19 -0700158 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
159 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
160 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
161 and DW_AT_const_expr.
162 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
163 and DW_FORM_ref_sig8.
164
Roland McGrath7dd94642009-07-15 11:14:23 -07001652009-07-15 Roland McGrath <roland@redhat.com>
166
167 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
168 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
169
Roland McGrath80893432009-07-13 12:08:55 -07001702009-07-13 Roland McGrath <roland@redhat.com>
171
172 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
173
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001742009-07-08 Roland McGrath <roland@redhat.com>
175
Roland McGrath3c84db32009-06-24 17:41:40 -0700176 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
177 dwfl_module_eh_cfi.
178
179 * libdwP.h (struct Dwarf): Add member `cfi'.
180 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
181 * dwarf_getcfi.c: New file.
182 * dwarf_getcfi_elf.c: New file.
183 * dwarf_cfi_end.c: New file.
184 * dwarf_cfi_addrframe.c: New file.
185 * dwarf_frame_cfa.c: New file.
186 * dwarf_frame_register.c: New file.
187 * dwarf_frame_return_address_register.c: New file.
188 * Makefile.am (libdw_a_SOURCES): Add them.
189 * unwind.h: Declare those functions.
190 * libdw.map (ELFUTILS_0.142): Export them.
191
192 * dwarf_getlocation.c (__libdw_intern_expression): New function,
193 broken out of ...
194 (getlocation): ... here, call it.
195 * libdwP.h: Declare it.
196
197 * cie.c: New file.
198 * fde.c: New file.
199 * frame-cache.c: New file.
200 * cfi.c: New file.
201 * cfi.h: New file.
202 * encoded-value.h: New file.
203 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
204 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
205 * dwarf_error.c (errmsgs): Add element for it.
206
207 * dwarf_next_cfi.c: New file.
208 * Makefile.am (libdw_a_SOURCES): Add it.
209 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
210 Declare dwarf_next_cfi.
211 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
212 Add dwarf_next_cfi.
213
214 * memory-access.h [! ALLOW_UNALIGNED]
215 (read_2ubyte_unaligned): Renamed to ...
216 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
217 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
218 (read_2sbyte_unaligned): Likewise.
219 (read_4ubyte_unaligned): Likewise.
220 (read_4sbyte_unaligned): Likewise.
221 (read_8ubyte_unaligned): Likewise.
222 (read_8sbyte_unaligned): Likewise.
223
224 * libdwP.h (IDX_eh_frame): Remove it.
225 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
226
2272009-07-08 Roland McGrath <roland@redhat.com>
228
Roland McGrath6e1f4652009-07-08 14:48:34 -0700229 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
230
Roland McGrathcfdd86e2009-07-08 13:15:07 -0700231 * dwarf_getlocation.c (check_constant_offset): New function.
232 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
233 handle DW_AT_data_member_location of data[48] as constant offset.
234
Roland McGrath05c4e042009-06-18 13:56:02 -07002352009-06-18 Roland McGrath <roland@redhat.com>
236
237 * libdwP.h (__libdw_read_address_inc): Constify.
238 (__libdw_read_offset_inc): Likewise.
239 * dwarf_getaranges.c: Likewise.
240 * dwarf_getlocation.c: Likewise.
241 * dwarf_getsrclines.c: Likewise.
242 * dwarf_nextcu.c: Likewise.
243
Ulrich Drepper99d23722009-06-14 20:19:45 -07002442009-05-05 Petr Machata <pmachata@redhat.com>
245
246 * libdwP.h (__libdw_formptr): Declare new function.
247 * dwarf_formudata.c: Implement it here.
248 * dwarf_getlocation.c (dwarf_getlocation_addr):
249 Call it instead of hand-rolled offset handling code.
250 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
251 * dwarf_ranges.c (dwarf_ranges): Likewise.
252
2532009-05-04 Petr Machata <pmachata@redhat.com>
254
255 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
256 * dwarf_ranges.c: Implement it here.
257 (dwarf_ranges): Call it.
258 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
259
2602009-04-23 Petr Machata <pmachata@redhat.com>
261
262 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
263 of read_*ubyte_unaligned.
264 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
265 * dwarf_formstring.c (dwarf_formstring): Likewise.
266 * dwarf_formudate.c (dwarf_formudata): Likewise.
267 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
268 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
269 * dwarf_getpubnames.c (get_offsets): Likewise.
270 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
271
2722009-04-23 Petr Machata <pmachata@redhat.com>
273
274 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
275 __libdw_read_addr, __libdw_read_off): Add four new internal
276 functions.
277
Roland McGrathe2eabd82009-05-07 18:54:52 -07002782009-05-07 Roland McGrath <roland@redhat.com>
279
280 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
281 return value and OFFSET argument, not CU-relative. Only fetch the
282 attribute data when called with OFFSET of 0.
283
Petr Machataf3df61f2009-05-07 21:02:33 +02002842009-05-07 Petr Machata <pmachata@redhat.com>
285
286 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
287 DW_AT_macro_info attribute of CU DIE.
288
Roland McGrath2fb90512009-04-15 14:47:13 -07002892009-04-15 Roland McGrath <roland@redhat.com>
290
291 * dwarf.h (DW_CIE_ID): Removed.
292 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
293
Roland McGrath6a4bdd92009-04-01 14:25:29 -07002942009-04-01 Roland McGrath <roland@redhat.com>
295
296 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
297
Roland McGrathc5acb302009-01-28 18:28:52 -08002982009-01-28 Roland McGrath <roland@redhat.com>
299
Roland McGrath03288f02009-01-28 22:00:54 -0800300 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
301 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
302
Roland McGrathc5acb302009-01-28 18:28:52 -0800303 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
304
Roland McGrathf46272a2009-01-26 18:36:16 -08003052009-01-26 Roland McGrath <roland@redhat.com>
306
307 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
308
Roland McGrathd31505f2009-01-25 19:37:33 -08003092009-01-25 Roland McGrath <roland@redhat.com>
310
311 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
312
Roland McGrath3bf7a092009-01-23 16:34:07 -08003132009-01-23 Roland McGrath <roland@redhat.com>
314
315 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
316 Put these rules under if MAINTAINER_MODE.
317
Roland McGrathafdd51e2009-01-22 02:26:24 -08003182009-01-22 Roland McGrath <roland@redhat.com>
319
320 * dwarf.h: Add DW_OP_GNU_encoded_addr.
321
Roland McGrath1ea4fdc2009-01-21 19:14:37 -08003222009-01-21 Roland McGrath <roland@redhat.com>
323
324 * Makefile.am (CLEANFILES): Renamed to ...
325 (MOSTLYCLEANFILES): ... here.
326 (CLEANFILES): New variable, add known-dwarf.h.
327
Roland McGrath24b03302009-01-17 14:34:13 -08003282009-01-17 Roland McGrath <roland@redhat.com>
329
Roland McGrath54456d82009-01-17 14:39:35 -0800330 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
331 Make it unconditional.
332 (BUILT_SOURCES): Updated.
Roland McGrath5513e642009-01-11 01:35:11 -0800333
334 * dwarf.h: Add description comments for DW_LANG_* values.
335
336 * Makefile.am [MAINTAINER_MODE]
337 ($(srcdir)/known-dwarf.h): New target.
338 (BUILT_SOURCES): Add it.
339
Roland McGrath24b03302009-01-17 14:34:13 -0800340 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
341
Ulrich Drepper7e678fa2009-01-10 18:02:05 -08003422009-01-10 Ulrich Drepper <drepper@redhat.com>
343
344 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
345
Roland McGrathe06762c2009-01-08 13:39:08 -08003462009-01-08 Roland McGrath <roland@redhat.com>
347
348 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
349
Roland McGrath7e827f22009-01-06 02:09:50 -08003502008-01-06 Roland McGrath <roland@redhat.com>
Roland McGrath1f6d2012008-12-31 00:21:04 -0800351
352 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
353 Reorder members.
354 * dwarf_haschildren.c: Return -1 for error case, not 0.
Roland McGrathbca43152009-01-05 23:59:32 -0800355
356 * Makefile.am (libdw.so): Link in $(zip_LIBS).
357
Ulrich Drepperac194d02009-01-06 00:30:01 -08003582009-01-06 Ulrich Drepper <drepper@redhat.com>
359
Roland McGrathc462c632009-01-06 01:04:31 -0800360 * dwarf.h: Add definition for unwind and call frame information.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800361
362 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
363 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
364
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00003652008-08-15 Roland McGrath <roland@redhat.com>
366
367 * libdw.map (ELFUTILS_0.136): New version set, inherits from
368 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
369
Ulrich Drepper8d358d92008-01-22 06:34:31 +00003702008-01-21 Ulrich Drepper <drepper@redhat.com>
371
372 * dwarf_child.c: Minor optimizations.
373 * dwarf_getattrs.c: Likewise.
374 * dwarf_getpubnames.c: Likewise.
375 * dwarf_siblingof.c: Likewise.
376 * dwarf_tag.c: Likewise.
377
Ulrich Drepperb27ce002008-01-18 20:08:54 +00003782008-01-18 Ulrich Drepper <drepper@redhat.com>
379
380 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
381 of DWARF_VERSION comparison, just fail if the file's version is newer.
382
Ulrich Drepper35f08c42008-01-18 19:59:08 +00003832008-01-17 Nick Clifton <nickc@redhat.com>
384
385 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
386 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
387 (DWARF3_LENGTH_64_BIT): New define.
388 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
389 * dwarf_getpubnames: Include dwarf.h.
390 (get_offsets): Use the new definitions.
391 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
392 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
393 (dwarf_nextcu): Use the new definitions.
394
395 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
Ulrich Dreppera969d8e2008-01-22 06:15:00 +0000396 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
Ulrich Drepper35f08c42008-01-18 19:59:08 +0000397 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
398 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
399
400 * dwarf_getpubnames (get_offsets): Replace assertion with test and
401 error return.
402
403 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
404
405 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
406 Set the address in the return structure to the address of the next
407 non-sibling die, if there is no sibling and the return pointer is
408 not the same as the die pointer.
409 * libdw.h: Expand the description of the dwarf_siblingof prototype.
410
411 * dwarf_child.c: Fix typo in comment.
412
413 * libdwP.h (DWARF_VERSION): Change to 3.
414
415 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
416 not have a initialised valp pointer.
417
418 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
419 the end of the attributes is reached. When the callback fails,
420 return the address of the failing attribute, not the address of
421 its successor.
422 * libdw.h: Expand the description of the dwarf_getattrs prototype.
423
424 * dwarf_child.c (__libdw_find_attr): Use the new definition.
425 (dwarf_child): Likewise.
426 * dwarf_tag.c (__libdw_findabbrev): Likewise.
427 (dwarf_tag): Likewise.
428
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00004292008-01-08 Roland McGrath <roland@redhat.com>
430
431 * Makefile.am (euinclude): Variable removed.
432 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
433 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
434
Roland McGrathe4c22ea2007-10-23 13:07:39 +00004352007-10-17 Roland McGrath <roland@redhat.com>
436
437 * libdw.h (__deprecated_attribute__): New macro.
438 (dwarf_formref): Mark it deprecated.
439 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
440 (dwarf_formref): ... here. Call it. Remove INTDEF.
441 * libdwP.h: Remove INTDECL.
442 Declare __libdw_formref.
443 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
444 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
445
446 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
447 needs to check CU->version.
448
449 * libdwP.h (struct Dwarf_CU): New member `version'.
450 * libdw_findcu.c (__libdw_findcu): Initialize it.
451
452 * dwarf_child.c: Return 1 for null entry as first child.
453
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00004542007-10-05 Roland McGrath <roland@redhat.com>
455
456 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
457
458 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
459 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
460
Roland McGrath59ea7f32007-10-04 08:50:09 +00004612007-10-03 Roland McGrath <roland@redhat.com>
462
463 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
464 and dwfl_build_id_find_debuginfo.
465
466 * libdw.map (ELFUTILS_0.130): New version set, inherits from
467 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
468
Roland McGrath057ec6b2007-10-02 20:55:05 +00004692007-10-02 Roland McGrath <roland@redhat.com>
470
471 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
472 structure_type.
473
Roland McGrathd1a48172007-08-07 19:51:01 +00004742007-08-07 Roland McGrath <roland@redhat.com>
475
476 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
477 error code is DWARF_E_NOERROR (0).
478
479 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
480 Fix typo in __libdw_visit_scopes argument.
481
482 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
483 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
484
Roland McGrath87d47802007-07-16 22:23:37 +00004852007-07-03 Roland McGrath <roland@redhat.com>
486
487 * libdw.h (__extern_inline): New macro.
488 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
489
Roland McGrath43da9892007-04-16 23:13:37 +00004902007-04-16 Roland McGrath <roland@redhat.com>
491
492 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
493
Roland McGrathbf2ee482007-04-05 09:27:36 +00004942007-04-05 Roland McGrath <roland@redhat.com>
495
Roland McGrath43da9892007-04-16 23:13:37 +0000496 * dwarf_getsrcdirs.c: New file.
497 * Makefile.am (libdw_a_SOURCES): Add it.
498 * libdw.h: Declare dwarf_getsrcdirs.
499 * libdw.map (ELFUTILS_0.127): Add it.
500
501 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
502 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
503 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
504 Save DIRARRAY in the Dwarf_Files.
505
Roland McGrathbf2ee482007-04-05 09:27:36 +0000506 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
507 address to check for all-ones base address entry. Check directly.
508 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
509
Ulrich Drepperc07fbb32007-03-30 19:14:59 +00005102007-03-25 Roland McGrath <roland@redhat.com>
511
512 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
513 Return NULL when freeing RESULT on error.
514 (global_read, scngrp_read): Check return value from check_section,
515 break out of loop after it has freed RESULT.
516 (valid_p): Handle null argument.
517
Ulrich Drepper6258e742007-03-13 06:22:40 +00005182007-03-12 Roland McGrath <roland@redhat.com>
519
520 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
521
5222007-03-04 Roland McGrath <roland@redhat.com>
523
524 * libdw.map (ELFUTILS_0.127): New version set, inherits from
525 ELFUTILS_0.126. Add dwfl_module_addrsym.
526
Ulrich Drepper903c1162007-02-15 19:40:37 +00005272007-02-10 Roland McGrath <roland@redhat.com>
528
529 * dwarf.h (DW_OP_fbreg): Comment fix.
530
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00005312007-02-03 Roland McGrath <roland@redhat.com>
532
533 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
534 * libdw.map (ELFUTILS_0.126): New version set, inherits from
535 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
536 exported in the past.
537
Roland McGrath8190db62006-12-17 23:56:51 +00005382006-12-17 Roland McGrath <roland@redhat.com>
539
540 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
541 address when the CU is missing attributes due to buggy GCC.
542
Roland McGrathc373d852006-10-10 00:25:21 +00005432006-08-29 Roland McGrath <roland@redhat.com>
544
545 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
546
547 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
548 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
549
550 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
551 result is aligned. Adjust NEWP->remaining here for this allocation.
552 * libdwP.h: Update decl.
553 (libdw_alloc): Update caller.
554
Ulrich Drepper077c65f2006-07-12 19:54:51 +00005552006-07-12 Ulrich Drepper <drepper@redhat.com>
556
557 * dwarf_child.c: Adjust for internal_function_def removal.
558 * dwarf_getabbrev.c: Likewise.
559 * dwarf_tag.c: Likewise.
560 * libdw_form.c: Likewise.
561 * memory-access.c: Likewise.
562
Ulrich Dreppere1812e12006-07-12 07:46:03 +00005632006-06-28 Roland McGrath <roland@redhat.com>
564
565 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
566
567 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
568 dwfl_module_getsym.
569
Ulrich Drepper3be74472006-05-27 18:15:40 +00005702006-05-27 Ulrich Drepper <drepper@redhat.com>
571
572 * libdw.h: Add extern "C".
573
Ulrich Dreppere7a73172006-05-22 18:16:45 +00005742006-05-22 Ulrich Drepper <drepper@redhat.com>
575
576 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
577 aranges information.
578
Ulrich Drepper4f3d2a22006-05-22 01:30:56 +00005792006-05-21 Ulrich Drepper <drepper@redhat.com>
580
581 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
582 dwarf_haschildren.
583
Roland McGrath2dade662006-02-28 22:13:20 +00005842006-02-28 Roland McGrath <roland@redhat.com>
585
586 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
587 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
588 values from DWARF 3.0.
589
Roland McGrath08333122006-02-27 04:54:26 +00005902006-02-22 Roland McGrath <roland@redhat.com>
591
592 * libdw.map: Bump to 0.120; export dwfl_version.
593
Roland McGrath50ffcbf2005-12-23 01:51:43 +00005942005-12-22 Roland McGrath <roland@redhat.com>
595
596 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
597
Roland McGrathdec3a242005-12-12 08:35:55 +00005982005-12-12 Roland McGrath <roland@redhat.com>
599
600 * dwarf_ranges.c: Copy CU base address-finding code from
601 dwarf_getlocation.
602
Roland McGrathf64a4422005-12-09 23:40:30 +00006032005-12-09 Roland McGrath <roland@redhat.com>
604
605 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
606 Delay CU base lookup until it's needed.
607 If CU base lookup fails with no error, flag invalid DWARF.
608
Roland McGrath994b4892005-12-05 22:46:21 +00006092005-11-25 Roland McGrath <roland@redhat.com>
610
611 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
612
Roland McGrathe47ab762005-11-17 03:16:00 +00006132005-11-15 Roland McGrath <roland@redhat.com>
614
615 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
616
6172005-11-13 Roland McGrath <roland@redhat.com>
618
619 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
620
Roland McGrath07d4f2f2005-10-28 06:56:24 +00006212005-10-27 Roland McGrath <roland@redhat.com>
622
623 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
624 don't match end_sequence markers.
625
626 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
627 before normal records at the same address.
628 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
629 marker.
630
6312005-10-26 Roland McGrath <roland@redhat.com>
632
Roland McGrath6724c902005-10-28 07:07:19 +0000633 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
634 * dwarf_func_file.c: Renamed to ...
635 * dwarf_decl_file.c: ... here.
636 * dwarf_func_col.c: Renamed to ...
637 * dwarf_decl_column.c: ... here.
638 * dwarf_func_line.c: Renamed to ...
639 * dwarf_decl_line.c: ... here.
640 (dwarf_func_line): Renamed to ...
641 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
642 (__libdw_func_intval): Renamed __libdw_attr_intval.
643 * dwarf_func_name.c: File removed.
644 * dwarf_func_lowpc.c: File removed.
645 * dwarf_func_highpc.c: File removed.
646 * dwarf_func_entrypc.c: File removed.
647 * dwarf_func_die.c: File removed.
648 * Makefile.am (libdw_a_SOURCES): Updated.
649 * libdw.h: Update decls.
650 (Dwarf_Func): Type removed.
651 * libdwP.h: Update decls.
652 (struct Dwarf_Func_s): Type removed.
653 * libdw.map: Updated.
654
655 * libdwP.h (CUDIE): New macro.
656 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
657 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
658 * dwarf_ranges.c (dwarf_ranges): Likewise.
659
660 * dwarf_getloclist.c: Renamed to ...
661 * dwarf_getlocation.c: ... here.
662 (getloclist): Renamed to getlocation.
663 (dwarf_getloclist): Renamed to dwarf_getlocation.
664 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
665 * Makefile.am (libdw_a_SOURCES): Updated.
666 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
667 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
668 (Dwarf_Loc): Renamed Dwarf_Op.
669 * libdwP.h (struct loc_s): Update use.
670 * libdw.map: Update map.
671
Roland McGrath07d4f2f2005-10-28 06:56:24 +0000672 * dwarf_entry_breakpoints.c: Use the second line record within the
673 function, regardless of its source location data.
674
6752005-10-25 Roland McGrath <roland@redhat.com>
676
677 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
678
679 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
680
6812005-10-14 Roland McGrath <roland@redhat.com>
682
683 * dwarf_diecu.c (dwarf_diecu): New file.
684 * Makefile.am (libdw_a_SOURCES): Add it.
685 * libdw.h: Declare dwarf_diecu.
686 * libdw.map: Export it.
687
688 * libdw.map: Bump to 0.116; export dwarf_ranges.
689
6902005-09-20 Roland McGrath <roland@redhat.com>
691
692 * dwarf_haspc.c: Use dwarf_ranges.
693 * dwarf_entry_breakpoints.c: Likewise.
694
695 * dwarf_ranges.c: New file.
696 * Makefile.am (libdw_a_SOURCES): Add it.
697 * libdw.h: Declare dwarf_ranges.
698 * libdwP.h: Add INTDECL.
699
7002005-09-14 Roland McGrath <roland@redhat.com>
701
702 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
703 prologue_end marker scanning loop.
704
7052005-09-11 Roland McGrath <roland@redhat.com>
706
707 * dwarf.h: Comment typo fix.
708
7092005-09-07 Roland McGrath <roland@redhat.com>
710
711 * dwarf_entry_breakpoints.c: New file.
712 * Makefile.am (libdw_a_SOURCES): Add it.
713 * libdw.h: Declare dwarf_entry_breakpoints.
714
715 * dwarf_entrypc.c: New file.
716 * Makefile.am (libdw_a_SOURCES): Add it.
717 * libdw.h: Declare dwarf_entrypc.
718 * libdwP.h: Add INTDECL.
719
Ulrich Drepperfbe998a2005-08-29 16:27:10 +00007202005-08-28 Ulrich Drepper <drepper@redhat.com>
721
722 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
723 (%.os): Use COMPILE.os.
724 (COMPILE.os): Filter out gconv options.
725
Roland McGrath71e15a02005-08-27 10:33:26 +00007262005-08-27 Roland McGrath <roland@redhat.com>
727
728 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
729 __libdw_visit_scopes.
730
731 * dwarf_getscopes_die.c: New file.
732 * Makefile.am (libdw_a_SOURCES): Add it.
733 * libdw.h: Declare dwarf_getscopes_die.
734 * libdw.map: Bump to 0.115 and add it.
735
736 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
737 containing a DIE and its parent pointer, instead of just Dwarf_Die.
738 Take two functions for both preorder and postorder visitors.
739 * libdwP.h: Update decl.
740 (struct Dwarf_Die_Chain): New type.
741 * dwarf_func_inline.c: Update uses.
742
743 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
744 Add INTDEF.
745 * libdwP.h: Add INTDECL.
746 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
747
Roland McGrathd17fac72005-08-23 08:20:21 +00007482005-08-23 Roland McGrath <roland@redhat.com>
749
750 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
751 DW_AT_specification the same as DW_AT_abstract_origin.
752
7532005-08-20 Roland McGrath <roland@redhat.com>
754
755 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
756 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
757 and dwfl_report_offline.
758
7592005-08-19 Roland McGrath <roland@redhat.com>
760
761 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
762 Add dwfl_module_relocate_address, dwfl_module_relocations,
763 dwfl_module_relocation_info.
764
Roland McGrathf5fda7d2005-08-18 22:01:57 +00007652005-08-18 Roland McGrath <roland@redhat.com>
766
767 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
768 outermost scope in the results.
769
Roland McGrath1ecb6062005-08-15 09:53:04 +00007702005-08-15 Roland McGrath <roland@redhat.com>
771
772 * dwarf_func_inline.c: New file.
773 * Makefile.am (libdw_a_SOURCES): Add it.
774 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
775 * libdw.map: Add them.
776
777 * dwarf_func_die.c: New file.
778 * Makefile.am (libdw_a_SOURCES): Add it.
779 * libdw.h: Declare dwarf_func_die.
780 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
781
Roland McGrath1c83bf12005-08-11 07:03:55 +00007822005-08-10 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +0000783
Roland McGrath1c83bf12005-08-11 07:03:55 +0000784 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
785 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +0000786
Roland McGrath4959bf82005-08-09 10:31:08 +00007872005-08-09 Roland McGrath <roland@redhat.com>
788
Roland McGrathb6312e12005-08-09 10:36:01 +0000789 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
790
Roland McGrath4959bf82005-08-09 10:31:08 +0000791 * dwarf_end.c: Add INTDEF.
792 * dwarf_error.c (dwarf_errmsg): Likewise.
793 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
794
Roland McGratha5a89682005-08-02 01:24:01 +00007952005-08-01 Roland McGrath <roland@redhat.com>
796
797 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
798 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
799
Ulrich Drepper18618fd2005-07-28 21:29:22 +00008002005-07-28 Ulrich Drepper <drepper@redhat.com>
801
802 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
803 (libdw_a_LIBADD): Add all files from libdwfl.a.
804
Roland McGrath366784a2005-07-28 06:20:53 +00008052005-07-27 Roland McGrath <roland@redhat.com>
806
Roland McGrath18385902005-07-28 07:12:38 +0000807 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
808 along with ../libebl/libebl.a and ../lib/libeu.a;
809 depend on ../libelf/libelf.so.
810 (libdw_so_LDADD): New variable.
811 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
812
Roland McGrath366784a2005-07-28 06:20:53 +0000813 * libdw.map: Define an empty base version and move all symbols to
814 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
815
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00008162005-07-23 Ulrich Drepper <drepper@redhat.com>
817
818 * dwarf_error.c: Add internal alias for dwarf_errno.
819 * libdwP.h: Declare __dwarf_errno_internal.
820 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
821
822 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
823 global_error.
824
8252005-06-01 Roland McGrath <roland@redhat.com>
826
827 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
828 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
829
8302005-06-08 Roland McGrath <roland@redhat.com>
831
832 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
833 (get_sleb128_step, get_sleb128): Likewise.
834 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
835 * dwarf_getloclist.c (getloclist): Likewise.
836 * dwarf_formblock.c (dwarf_formblock): Likewise.
837 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
838 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
839 * dwarf_formref.c (dwarf_formref): Likewise.
840 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
841 * dwarf_formudata.c (dwarf_formudata): Likewise.
842 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
843 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
844 * dwarf_tag.c (dwarf_tag): Likewise.
845 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
846 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
847 * libdw_form.c (__libdw_form_val_len): Likewise.
848 * libdwP.h: Update decl.
849
8502005-06-04 Roland McGrath <roland@redhat.com>
851
852 * memory-access.h (get_uleb128_rest_return): New macro.
853 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
854 (get_sleb128_rest_return): New macro.
855 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
856 * memory-access.c: New file.
857 * Makefile.am (libdw_a_SOURCES): Add it.
858 (DEFS): Add -DIS_LIBDW.
859
8602005-05-31 Roland McGrath <roland@redhat.com>
861
862 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
863 formref offset.
864
8652005-05-30 Roland McGrath <roland@redhat.com>
866
867 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
868 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
869
870 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
871 BEGIN value. Instead, match base address entries separately for
872 32/64 size cases.
873
8742005-05-28 Roland McGrath <roland@redhat.com>
875
876 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
877 past location expression contents.
878
8792005-05-23 Roland McGrath <roland@redhat.com>
880
881 * dwarf_getsrclines.c: Comment typo fix.
882
883 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
884 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
885
8862005-05-22 Ulrich Drepper <drepper@redhat.com>
887
888 * libdwP.h: Only use INTDECL for alias prototypes.
889
8902005-05-19 Roland McGrath <roland@redhat.com>
891
892 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
893
894 * dwarf_getscopevar.c: New file.
895 * Makefile.am (libdw_a_SOURCES): Add it.
896 * libdw.h: Declare dwarf_getscopevar.
897
898 * dwarf_getsrcfiles.c: Add INTDEF.
899 * dwarf_haschildren.c: Likewise.
900 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
901
902 * dwarf_getscopes.c: New file.
903 * Makefile.am (libdw_a_SOURCES): Add it.
904 * libdw.h: Declare dwarf_getscopes.
905 * libdw.map: Add it.
906
9072005-05-18 Roland McGrath <roland@redhat.com>
908
909 * libdwP.h (IDX_debug_ranges): New enum constant.
910 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
911 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
912 * dwarf_error.c (errmsgs): Add it.
913 * dwarf_haspc.c: New file.
914 * libdw.h: Declare dwarf_haspc.
915 * libdw.map: Add it.
916 * libdwP.h: Add INTDECL.
917
918 * dwarf_attr_integrate.c: New file.
919 * dwarf_hasattr_integrate.c: New file.
920 * Makefile.am (libdw_a_SOURCES): Add them.
921 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
922 * libdw.map: Add them.
923
924 * dwarf_hasattr.c: Add INTDEF.
925 * libdwP.h: Add INTDECL for it.
926
927 * dwarf_formref_die.c: New file.
928 * Makefile.am (libdw_a_SOURCES): Add it.
929 * libdw.h (dwarf_formref_die): Declare it.
930 * libdwP.h (dwarf_formref_die): Add INTDECL.
931 * libdw.map: Add it.
932
933 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
934 of ...
935 (dwarf_getloclist): ... here. Call them.
936 (dwarf_addrloclists): New function.
937 * libdw.h: Declare it.
938 * libdw.map: Add it.
939
940 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
941 DW_MACINFO_end_file. Recognize type 0 as terminator.
942
9432005-05-05 Roland McGrath <roland@redhat.com>
944
945 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
946
947 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
948 the line program does not produce all entries in ascending order.
949
9502005-04-25 Ulrich Drepper <drepper@redhat.com>
951
952 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
953 occurences (e.g., inlines) better.
954
9552005-04-24 Ulrich Drepper <drepper@redhat.com>
956
957 * libdw.h (DWARF_END_ABBREV): Define.
958 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
959 end is reached.
960 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
961 of records reached.
962 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
963 as error of __libdw_getabbrev.
964
9652005-04-04 Ulrich Drepper <drepper@redhat.com>
966
967 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
968
969 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
970 results back to caller.
971
9722005-04-04 Roland McGrath <roland@redhat.com>
973
974 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
975
976 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
977 defn.
978
9792005-04-04 Ulrich Drepper <drepper@redhat.com>
980
981 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
982
983 * dwarf_getsrc_file.c: New file.
984 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
985 * libdw.h: Declare dwarf_getsrc_file.
986 * libdw.map: Add dwarf_getsrc_file.
987
9882005-04-02 Ulrich Drepper <drepper@redhat.com>
989
990 * dwarf_func_entrypc.c: New file.
991 * dwarf_func_col.c: New file.
992 * dwarf_func_line.c: New file.
993 * dwarf_func_file.c: New file.
994 * libdw.h: Add prototypes for new functions.
995 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
996 dwarf_func_file.
997 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
998 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
999 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
1000 Declare __libdw_func_intval and __dwarf_formsdata_internal.
1001 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
1002 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
1003
1004 * dwarf.h: Add some DWARF3 definitions.
1005
10062005-04-01 Ulrich Drepper <drepper@redhat.com>
1007
1008 * dwarf_getfuncs.c: New file.
1009 * dwarf_func_highpc.c: New file.
1010 * dwarf_func_lowpc.c: New file.
1011 * dwarf_func_name.c: New file.
1012 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
1013 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
1014 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
1015 and dwarf_func_name.
1016 * libdw.h: Add prototypes for new functions.
1017 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
1018 * dwarf_siblingof.c: Likewise.
1019 * dwarf_dieoffset.c: Likewise.
1020 * dwarf_highpc.c: Likewise.
1021 * dwarf_lowpc.c: Likewise.
1022 * libdwP.h: Add prototypes for internal functions.
1023 Define Dwarf_Func_s structure.
1024
10252005-03-29 Ulrich Drepper <drepper@redhat.com>
1026
1027 * libdw.h: Add padding in Dwarf_die.
1028
1029 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
1030 * dwarf_attr.c: Likewise.
1031 * dwarf_begin.c: Likewise.
1032 * dwarf_begin_elf.c: Likewise.
1033 * dwarf_bitoffset.c: Likewise.
1034 * dwarf_bitsize.c: Likewise.
1035 * dwarf_bytesize.c: Likewise.
1036 * dwarf_diename.c: Likewise.
1037 * dwarf_formaddr.c: Likewise.
1038 * dwarf_formblock.c: Likewise.
1039 * dwarf_formref.c: Likewise.
1040 * dwarf_formstring.c: Likewise.
1041 * dwarf_formudata.c: Likewise.
1042 * dwarf_getarange_addr.c: Likewise.
1043 * dwarf_getarangeinfo.c: Likewise.
1044 * dwarf_getaranges.c: Likewise.
1045 * dwarf_getloclist.c: Likewise.
1046 * dwarf_getmacros.c: Likewise.
1047 * dwarf_getsrc_die.c: Likewise.
1048 * dwarf_getsrcfiles.c: Likewise.
1049 * dwarf_getsrclines.c: Likewise.
1050 * dwarf_highpc.c: Likewise.
1051 * dwarf_lowpc.c: Likewise.
1052 * dwarf_nextcu.c: Likewise.
1053 * dwarf_offdie.c: Likewise.
1054 * dwarf_siblingof.c: Likewise.
1055 * dwarf_srclang.c: Likewise.
1056 * dwarf_tag.c: Likewise.
1057 * libdw_findcu.c: Likewise.
1058 * libdwP.h: Add prototypes for internal functions.
1059
1060 * dwarf_addrdie.c: New file.
1061 * dwarf_macro_opcode.c: New file.
1062 * dwarf_macro_param1.c: New file.
1063 * dwarf_macro_param2.c: New file.
1064 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
1065 * libdwP.h: Remove Dwarf_Macro definition.
1066 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
1067 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
1068 * libdw.map: Add entries for new functions.
1069
10702005-03-21 Ulrich Drepper <drepper@redhat.com>
1071
1072 * libdw.h: Handle broken gcc < 4.
1073
10742005-02-15 Ulrich Drepper <drepper@redhat.com>
1075
1076 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
1077
1078 * dwarf_begin_elf.c: Fix warnings.
1079 * dwarf_dieoffset.c: Likewise.
1080 * dwarf_end.c: Likewise.
1081 * dwarf_error.c: Likewise.
1082 * dwarf_getpubnames.c: Likewise.
1083
1084 * libdwP.h: Add new error values.
1085 * dwarf_error.c: Support new error values.
1086 * dwarf_getpubnames.c: Check parameter value.
1087
10882005-02-05 Ulrich Drepper <drepper@redhat.com>
1089
1090 * Makefile.am: Check for text relocations in constructed DSO.
1091
1092 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
1093
10942005-02-04 Ulrich Drepper <drepper@redhat.com>
1095
1096 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
1097 checks to not read over buffer boundaries for ill-formed DWARF data.
1098
10992004-09-25 Ulrich Drepper <drepper@redhat.com>
1100
1101 * dwarf_child.c: Make compile with gcc 4.0.
1102 * dwarf_error.c: Likewise.
1103 * dwarf_formblock.c: Likewise.
1104 * dwarf_getabbrev.c: Likewise.
1105 * dwarf_getattrs.c: Likewise.
1106 * dwarf_getsrclines.c: Likewise.
1107 * dwarf_tag.c: Likewise.
1108 * libdw_form.c: Likewise.
1109
11102004-01-20 Ulrich Drepper <drepper@redhat.com>
1111
1112 * Makefile.am: Support building with mudflap.
1113
1114 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
1115 * dwarf_getsrclines.c: Likewise.
1116 * dwarf_memory-access.h: Likewise.
1117
11182004-01-19 Ulrich Drepper <drepper@redhat.com>
1119
1120 * dwarf_getsrcfiles.c: Third parameter can be NULL.
1121
1122 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
1123 Third parameter of dwarf_getsrcfiles can be NULL.
1124
1125 * libdw.map: Add dwarf_getmacros.
1126 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
1127 * dwarf_getmacros.c: New file.
1128
11292004-01-18 Ulrich Drepper <drepper@redhat.com>
1130
1131 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
1132
1133 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
1134
1135 * dwarf_getsrclines.c:
1136 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
1137
1138 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
1139
1140 * libdwP.h (_): Use elfutils domain.
1141
1142 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
1143
1144 * dwarf_getsrclines.c: Fix typo in comment.
1145
11462004-01-17 Ulrich Drepper <drepper@redhat.com>
1147
1148 * Makefile.am: Support building with mudflap.
1149
11502004-01-16 Ulrich Drepper <drepper@redhat.com>
1151
1152 * memory-access.h: Add lots of const in case a pointer passed is const.
1153
1154 * dwarf_formflag.c: New file.
1155 * dwarf_getattrs.c: New file.
1156 * dwarf_error.c: Add new error value.
1157 * libdw.h: Add prototypes for new functions. Adjust prototype for
1158 dwarf_getpubnames.
1159 * libdw.map: Add new functions.
1160 * dwarf_getpubnames.c: Change type of return value and fourth parameter
1161 to ptrdiff_t.
1162 * libdwP.h: Add new error value.
1163 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
1164 dwarf_formflag.c.
1165
1166 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
1167
11682004-01-12 Ulrich Drepper <drepper@redhat.com>
1169
1170 * dwarf_getarange_addr.c: New file
1171 * dwarf_getarangeinfo.c: New file.
1172 * dwarf_getaranges.c: New file.
1173 * dwarf_onerange.c: New file.
1174 * libdw.h: Declare new functions. Define Dwarf_Arange and
1175 Dwarf_Aranges.
1176 * libdw.map: Add new functions.
1177 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
1178 Define Dwarf_Aranges_s and Dwarf_Arange_s.
1179 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
1180 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
1181 * dwarf_error.c: Add new message.
1182
11832004-01-11 Ulrich Drepper <drepper@redhat.com>
1184
1185 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
1186 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
1187 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
1188 * dwarf_error.c: Add another message.
1189 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
1190 introduction.
1191 * dwarf_filesrc.c: Likewise.
1192 * dwarf_getsrcfiles.c: Likewise.
1193 * dwarf_getsrclines.c: Likewise.
1194 * dwarf_lineaddr.c: New file.
1195 * dwarf_linebeginstatement.c: New file.
1196 * dwarf_lineblock.c: New file.
1197 * dwarf_linecol.c: New file.
1198 * dwarf_lineendsequence.c: New file.
1199 * dwarf_lineepiloguebegin.c: New file.
1200 * dwarf_lineno.c: New file.
1201 * dwarf_lineprologueend.c: New file.
1202 * dwarf_onesrcline.c: New file.
1203 * dwarf_lineno.c: Change interface to store result in object pointed
1204 to by second parameter.
1205 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
1206 prototype. Define Dwarf_Files and Dwarf_Lines.
1207 * libdw.map: Add new functions.
1208 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
1209 * libdw_findcu.c: Don't initialize nlines field.
1210
1211 * dwarf_siblingof: Little optimization.
1212
1213 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
1214 * dwarf_end.c: Close ELF descriptor if free_elf is set.
1215 * libdwP.h (struct Dwarf): Add free_elf field.
1216
1217 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
1218 dwarf_offabbrev.c.
1219 * dwarf_getstring.c: New file.
1220 * dwarf_offabbrev.c: New file.
1221 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
1222 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
1223 parameters. Don't allocate memory if not necessary and don't lookup
1224 previous results if no CU given.
1225 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
1226 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
1227 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
1228 * libdwP.h: Change prototype for __libdw_getabbrev.
1229
1230 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
1231 returning if this is wanted.
1232
12332004-01-09 Ulrich Drepper <drepper@redhat.com>
1234
1235 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
1236 with offset_size value.
1237 * libdw.h: Adjust dwarf_nextcu prototype.
1238 * libdwP.h (struct Dwarf_CU): Add offset_size member.
1239 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
1240 member of new CU struct.
1241 * dwarf_formstring.c: Depend on offset_size not address_size for
1242 DW_FORM_strp handling.
1243 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
1244
1245 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
1246 failing lookup.
1247 (dwarf_tag): Correctly recognize failed lookup.
1248
1249 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
1250 function noop_free.
1251 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
1252 * dwarf_formblock.c: New file.
1253 * dwarf_getloclist.c: Rewrite to handle a single block.
1254 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
1255 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
1256 dwarf_getloclistent declaration.
1257 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
1258 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
1259 Add locs member to struct Dwarf_CU.
1260 * libdw_fundcu.c: Initialize locs member of new CU.
1261 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
1262 Remove dwarf_getloclistent.c.
1263
12642004-01-07 Ulrich Drepper <drepper@redhat.com>
1265
1266 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
1267 * libdwP.h: Likewise.
1268
1269 * dwarf_getloclist.c: New file.
1270 * dwarf_getloclistent.c: New file.
1271 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
1272 Declare dwarf_getloclistent and dwarf_getloclist.
1273 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
1274 * libdwP.h: Define DWARF_E_NO_LOCLIST.
1275 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
1276 dwarf_getloclist.c.
1277
1278 * dwarf_error.c: More error messages.
1279
12802004-01-06 Ulrich Drepper <drepper@redhat.com>
1281
1282 * dwarf_getsrclines.c: Remove debugging support.
1283
1284 * dwarf_getsrcfiles.c: New file.
1285 * dwarf_filesrc.c: New file.
1286 * libdw.h: Declare these functions. Define Dwarf_File.
1287 * libdwP.c: Adjust Dwarf_File_s definition.
1288 * libdw.map: Add these functions.
1289 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
1290 dwarf_filesrc.c.
1291 * dwarf_getsrclines.c: Initialize cu->files.
1292
12932004-01-05 Ulrich Drepper <drepper@redhat.com>
1294
1295 * libdw.h: Add more nonnull function attributes.
1296
1297 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
1298 * dwarf_end.c (cu_free): New function.
1299 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
1300 * dwarf_error.c (errmsgs): Add new messages.
1301 * dwarf_getsrc_die.c: New file.
1302 * dwarf_getsrclines.c: New file.
1303 * dwarf_lineno.c: New file.
1304 * dwarf_linesrc.c: New file.
1305 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
1306 instead of the *_inc-less variants.
1307 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
1308 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
1309 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
1310 and dwarf_linesrc.
1311 * libdwP.h: Add more error codes.
1312 (struct Dwarf): Remove mem_tail.next member.
1313 (Dwarf_File): Define type.
1314 (struct Dwarf_Line_s): Define type.
1315 (struct Dwarf_CU): Add lines and nlines members.
1316 (libdw_alloc): Define local variable _tail and use it.
1317 Add some function attributes.
1318 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
1319 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
1320 * memory-access.h: Add unlikely for the endian conversion paths.
1321 * Makefile.am (AM_CFLAGS): Add -std parameter.
1322 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
1323 dwarf_lineno, and dwarf_linesrc.
1324
13252003-08-11 Ulrich Drepper <drepper@redhat.com>
1326
1327 * Moved to CVS archive.