blob: 97f87da07d7600ab341fb085c74ac8f439b17c89 [file] [log] [blame]
Roland McGrathf95760a2010-01-07 20:24:34 -080012010-01-07 Roland McGrath <roland@redhat.com>
2
3 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
4
Roland McGrath019d9fb2010-01-05 13:36:07 -080052010-01-05 Roland McGrath <roland@redhat.com>
6
Roland McGrathebc5c882010-01-05 22:53:31 -08007 * dwarf_aggregate_size.c: New file.
8 * Makefile.am (libdw_a_SOURCES): Add it.
9 * libdw.h: Declare it.
10 * libdwP.h: Add INTDECL.
11 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
12
13 * dwarf_srclang.c: Add INTDEF.
14 * libdwP.h: Add INTDECL.
15
Roland McGrath0cb19832010-01-05 13:38:15 -080016 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
17
Roland McGrath019d9fb2010-01-05 13:36:07 -080018 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
19
Roland McGrath888381b2009-11-21 17:03:34 -0800202009-11-21 Roland McGrath <roland@redhat.com>
21
22 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
23 non-constant forms.
24
Roland McGrath9ca7bc42009-10-15 12:26:49 -0700252009-10-15 Roland McGrath <roland@redhat.com>
26
27 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
28 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
29
Roland McGrath7e0aecd2009-09-17 15:02:34 -0700302009-09-17 Roland McGrath <roland@redhat.com>
31
32 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
33 argument a pointer to const.
34 * libdw.h: Update decl.
35
Roland McGrathf0371042009-09-10 12:39:09 -0700362009-09-10 Roland McGrath <roland@redhat.com>
37
38 * dwarf_getlocation.c (store_implicit_value): New function.
39 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
40 (dwarf_getlocation_implicit_value): New function.
41 * libdw.h: Declare it.
42 * libdw.map (ELFUTILS_0.143): Add it.
43
Mark Wielaard418ae4c2009-09-09 20:59:26 +0200442009-09-09 Mark Wielaard <mjw@redhat.com>
45
46 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
47
Josh Stonecc93cc42009-08-21 18:04:44 -0700482009-08-21 Josh Stone <jistone@redhat.com>
49
50 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
51
Roland McGrath08277ba2009-08-10 15:08:08 -0700522009-08-10 Roland McGrath <roland@redhat.com>
53
54 * dwarf_getscopevar.c: Use dwarf_diename.
55
Roland McGrathebfb6482009-08-09 15:40:52 -0700562009-08-09 Roland McGrath <roland@redhat.com>
57
58 * libdw.map (ELFUTILS_0.143): New version set,
59 inherits from ELFUTILS_0.142.
60 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
61 alias in the ELFUTILS_0.122 version set and the default in the new set.
62 * dwarf_srclang.c: Likewise.
63 * dwarf_decl_file.c: Likewise.
64 * dwarf_decl_line.c: Likewise.
65 * dwarf_decl_column.c: Likewise.
66 * dwarf_bytesize.c: Likewise.
67 * dwarf_bitsize.c: Likewise.
68 * dwarf_bitoffset.c: Likewise.
69
Roland McGrathde69d522009-08-07 18:26:19 -0700702009-08-07 Roland McGrath <roland@redhat.com>
71
72 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
73 * dwarf_srclang.c: Likewise.
74 * dwarf_decl_file.c: Likewise.
75 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
76 * dwarf_bytesize.c: Likewise.
77 * dwarf_bitsize.c: Likewise.
78 * dwarf_bitoffset.c: Likewise.
79
Roland McGrathaf800142009-07-22 13:55:50 -0700802009-07-22 Roland McGrath <roland@redhat.com>
81
82 * dwarf_frame_cfa.c: Change calling convention.
83 * libdw.h: Update decl.
84
85 * dwarf_frame_register.c: Change calling/return-value convention for
86 value-only results and undefined/same_value.
87 * libdw.h: Update decl.
88
89 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
90 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
91 return that value instead.
92 (getlocation): Update caller.
93 * dwarf_frame_cfa.c: Likewise.
94 * libdwP.h: Update decl.
95
Roland McGrathe23e9e72009-07-21 18:14:52 -0700962009-07-21 Roland McGrath <roland@redhat.com>
97
98 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
99 Fix loop iteration after skipping a bogus or useless CU.
100
101 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
102 absence, not DWARF_E_NO_DEBUG_LINE.
103
Roland McGrath96349ff2009-07-20 11:51:41 -07001042009-07-20 Roland McGrath <roland@redhat.com>
105
106 * dwarf_getlocation.c (__libdw_intern_expression):
107 Handle DW_OP_stack_value.
108
Roland McGratha6abdfd2009-07-16 17:40:19 -07001092009-07-16 Roland McGrath <roland@redhat.com>
110
Roland McGrathe160cc92009-07-16 17:48:27 -0700111 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
112 reject others when CU's version > 3.
113
114 * dwarf_formflag.c: Handle DW_FORM_flag_present.
115
Roland McGratha6abdfd2009-07-16 17:40:19 -0700116 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
117 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
118 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
119 and DW_AT_const_expr.
120 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
121 and DW_FORM_ref_sig8.
122
Roland McGrath7dd94642009-07-15 11:14:23 -07001232009-07-15 Roland McGrath <roland@redhat.com>
124
125 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
126 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
127
Roland McGrath80893432009-07-13 12:08:55 -07001282009-07-13 Roland McGrath <roland@redhat.com>
129
130 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
131
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001322009-07-08 Roland McGrath <roland@redhat.com>
133
Roland McGrath3c84db32009-06-24 17:41:40 -0700134 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
135 dwfl_module_eh_cfi.
136
137 * libdwP.h (struct Dwarf): Add member `cfi'.
138 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
139 * dwarf_getcfi.c: New file.
140 * dwarf_getcfi_elf.c: New file.
141 * dwarf_cfi_end.c: New file.
142 * dwarf_cfi_addrframe.c: New file.
143 * dwarf_frame_cfa.c: New file.
144 * dwarf_frame_register.c: New file.
145 * dwarf_frame_return_address_register.c: New file.
146 * Makefile.am (libdw_a_SOURCES): Add them.
147 * unwind.h: Declare those functions.
148 * libdw.map (ELFUTILS_0.142): Export them.
149
150 * dwarf_getlocation.c (__libdw_intern_expression): New function,
151 broken out of ...
152 (getlocation): ... here, call it.
153 * libdwP.h: Declare it.
154
155 * cie.c: New file.
156 * fde.c: New file.
157 * frame-cache.c: New file.
158 * cfi.c: New file.
159 * cfi.h: New file.
160 * encoded-value.h: New file.
161 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
162 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
163 * dwarf_error.c (errmsgs): Add element for it.
164
165 * dwarf_next_cfi.c: New file.
166 * Makefile.am (libdw_a_SOURCES): Add it.
167 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
168 Declare dwarf_next_cfi.
169 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
170 Add dwarf_next_cfi.
171
172 * memory-access.h [! ALLOW_UNALIGNED]
173 (read_2ubyte_unaligned): Renamed to ...
174 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
175 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
176 (read_2sbyte_unaligned): Likewise.
177 (read_4ubyte_unaligned): Likewise.
178 (read_4sbyte_unaligned): Likewise.
179 (read_8ubyte_unaligned): Likewise.
180 (read_8sbyte_unaligned): Likewise.
181
182 * libdwP.h (IDX_eh_frame): Remove it.
183 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
184
1852009-07-08 Roland McGrath <roland@redhat.com>
186
Roland McGrath6e1f4652009-07-08 14:48:34 -0700187 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
188
Roland McGrathcfdd86e2009-07-08 13:15:07 -0700189 * dwarf_getlocation.c (check_constant_offset): New function.
190 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
191 handle DW_AT_data_member_location of data[48] as constant offset.
192
Roland McGrath05c4e042009-06-18 13:56:02 -07001932009-06-18 Roland McGrath <roland@redhat.com>
194
195 * libdwP.h (__libdw_read_address_inc): Constify.
196 (__libdw_read_offset_inc): Likewise.
197 * dwarf_getaranges.c: Likewise.
198 * dwarf_getlocation.c: Likewise.
199 * dwarf_getsrclines.c: Likewise.
200 * dwarf_nextcu.c: Likewise.
201
Ulrich Drepper99d23722009-06-14 20:19:45 -07002022009-05-05 Petr Machata <pmachata@redhat.com>
203
204 * libdwP.h (__libdw_formptr): Declare new function.
205 * dwarf_formudata.c: Implement it here.
206 * dwarf_getlocation.c (dwarf_getlocation_addr):
207 Call it instead of hand-rolled offset handling code.
208 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
209 * dwarf_ranges.c (dwarf_ranges): Likewise.
210
2112009-05-04 Petr Machata <pmachata@redhat.com>
212
213 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
214 * dwarf_ranges.c: Implement it here.
215 (dwarf_ranges): Call it.
216 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
217
2182009-04-23 Petr Machata <pmachata@redhat.com>
219
220 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
221 of read_*ubyte_unaligned.
222 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
223 * dwarf_formstring.c (dwarf_formstring): Likewise.
224 * dwarf_formudate.c (dwarf_formudata): Likewise.
225 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
226 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
227 * dwarf_getpubnames.c (get_offsets): Likewise.
228 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
229
2302009-04-23 Petr Machata <pmachata@redhat.com>
231
232 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
233 __libdw_read_addr, __libdw_read_off): Add four new internal
234 functions.
235
Roland McGrathe2eabd82009-05-07 18:54:52 -07002362009-05-07 Roland McGrath <roland@redhat.com>
237
238 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
239 return value and OFFSET argument, not CU-relative. Only fetch the
240 attribute data when called with OFFSET of 0.
241
Petr Machataf3df61f2009-05-07 21:02:33 +02002422009-05-07 Petr Machata <pmachata@redhat.com>
243
244 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
245 DW_AT_macro_info attribute of CU DIE.
246
Roland McGrath2fb90512009-04-15 14:47:13 -07002472009-04-15 Roland McGrath <roland@redhat.com>
248
249 * dwarf.h (DW_CIE_ID): Removed.
250 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
251
Roland McGrath6a4bdd92009-04-01 14:25:29 -07002522009-04-01 Roland McGrath <roland@redhat.com>
253
254 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
255
Roland McGrathc5acb302009-01-28 18:28:52 -08002562009-01-28 Roland McGrath <roland@redhat.com>
257
Roland McGrath03288f02009-01-28 22:00:54 -0800258 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
259 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
260
Roland McGrathc5acb302009-01-28 18:28:52 -0800261 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
262
Roland McGrathf46272a2009-01-26 18:36:16 -08002632009-01-26 Roland McGrath <roland@redhat.com>
264
265 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
266
Roland McGrathd31505f2009-01-25 19:37:33 -08002672009-01-25 Roland McGrath <roland@redhat.com>
268
269 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
270
Roland McGrath3bf7a092009-01-23 16:34:07 -08002712009-01-23 Roland McGrath <roland@redhat.com>
272
273 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
274 Put these rules under if MAINTAINER_MODE.
275
Roland McGrathafdd51e2009-01-22 02:26:24 -08002762009-01-22 Roland McGrath <roland@redhat.com>
277
278 * dwarf.h: Add DW_OP_GNU_encoded_addr.
279
Roland McGrath1ea4fdc2009-01-21 19:14:37 -08002802009-01-21 Roland McGrath <roland@redhat.com>
281
282 * Makefile.am (CLEANFILES): Renamed to ...
283 (MOSTLYCLEANFILES): ... here.
284 (CLEANFILES): New variable, add known-dwarf.h.
285
Roland McGrath24b03302009-01-17 14:34:13 -08002862009-01-17 Roland McGrath <roland@redhat.com>
287
Roland McGrath54456d82009-01-17 14:39:35 -0800288 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
289 Make it unconditional.
290 (BUILT_SOURCES): Updated.
Roland McGrath5513e642009-01-11 01:35:11 -0800291
292 * dwarf.h: Add description comments for DW_LANG_* values.
293
294 * Makefile.am [MAINTAINER_MODE]
295 ($(srcdir)/known-dwarf.h): New target.
296 (BUILT_SOURCES): Add it.
297
Roland McGrath24b03302009-01-17 14:34:13 -0800298 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
299
Ulrich Drepper7e678fa2009-01-10 18:02:05 -08003002009-01-10 Ulrich Drepper <drepper@redhat.com>
301
302 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
303
Roland McGrathe06762c2009-01-08 13:39:08 -08003042009-01-08 Roland McGrath <roland@redhat.com>
305
306 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
307
Roland McGrath7e827f22009-01-06 02:09:50 -08003082008-01-06 Roland McGrath <roland@redhat.com>
Roland McGrath1f6d2012008-12-31 00:21:04 -0800309
310 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
311 Reorder members.
312 * dwarf_haschildren.c: Return -1 for error case, not 0.
Roland McGrathbca43152009-01-05 23:59:32 -0800313
314 * Makefile.am (libdw.so): Link in $(zip_LIBS).
315
Ulrich Drepperac194d02009-01-06 00:30:01 -08003162009-01-06 Ulrich Drepper <drepper@redhat.com>
317
Roland McGrathc462c632009-01-06 01:04:31 -0800318 * dwarf.h: Add definition for unwind and call frame information.
Ulrich Drepperac194d02009-01-06 00:30:01 -0800319
320 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
321 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
322
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00003232008-08-15 Roland McGrath <roland@redhat.com>
324
325 * libdw.map (ELFUTILS_0.136): New version set, inherits from
326 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
327
Ulrich Drepper8d358d92008-01-22 06:34:31 +00003282008-01-21 Ulrich Drepper <drepper@redhat.com>
329
330 * dwarf_child.c: Minor optimizations.
331 * dwarf_getattrs.c: Likewise.
332 * dwarf_getpubnames.c: Likewise.
333 * dwarf_siblingof.c: Likewise.
334 * dwarf_tag.c: Likewise.
335
Ulrich Drepperb27ce002008-01-18 20:08:54 +00003362008-01-18 Ulrich Drepper <drepper@redhat.com>
337
338 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
339 of DWARF_VERSION comparison, just fail if the file's version is newer.
340
Ulrich Drepper35f08c42008-01-18 19:59:08 +00003412008-01-17 Nick Clifton <nickc@redhat.com>
342
343 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
344 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
345 (DWARF3_LENGTH_64_BIT): New define.
346 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
347 * dwarf_getpubnames: Include dwarf.h.
348 (get_offsets): Use the new definitions.
349 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
350 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
351 (dwarf_nextcu): Use the new definitions.
352
353 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
Ulrich Dreppera969d8e2008-01-22 06:15:00 +0000354 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
Ulrich Drepper35f08c42008-01-18 19:59:08 +0000355 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
356 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
357
358 * dwarf_getpubnames (get_offsets): Replace assertion with test and
359 error return.
360
361 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
362
363 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
364 Set the address in the return structure to the address of the next
365 non-sibling die, if there is no sibling and the return pointer is
366 not the same as the die pointer.
367 * libdw.h: Expand the description of the dwarf_siblingof prototype.
368
369 * dwarf_child.c: Fix typo in comment.
370
371 * libdwP.h (DWARF_VERSION): Change to 3.
372
373 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
374 not have a initialised valp pointer.
375
376 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
377 the end of the attributes is reached. When the callback fails,
378 return the address of the failing attribute, not the address of
379 its successor.
380 * libdw.h: Expand the description of the dwarf_getattrs prototype.
381
382 * dwarf_child.c (__libdw_find_attr): Use the new definition.
383 (dwarf_child): Likewise.
384 * dwarf_tag.c (__libdw_findabbrev): Likewise.
385 (dwarf_tag): Likewise.
386
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00003872008-01-08 Roland McGrath <roland@redhat.com>
388
389 * Makefile.am (euinclude): Variable removed.
390 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
391 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
392
Roland McGrathe4c22ea2007-10-23 13:07:39 +00003932007-10-17 Roland McGrath <roland@redhat.com>
394
395 * libdw.h (__deprecated_attribute__): New macro.
396 (dwarf_formref): Mark it deprecated.
397 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
398 (dwarf_formref): ... here. Call it. Remove INTDEF.
399 * libdwP.h: Remove INTDECL.
400 Declare __libdw_formref.
401 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
402 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
403
404 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
405 needs to check CU->version.
406
407 * libdwP.h (struct Dwarf_CU): New member `version'.
408 * libdw_findcu.c (__libdw_findcu): Initialize it.
409
410 * dwarf_child.c: Return 1 for null entry as first child.
411
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00004122007-10-05 Roland McGrath <roland@redhat.com>
413
414 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
415
416 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
417 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
418
Roland McGrath59ea7f32007-10-04 08:50:09 +00004192007-10-03 Roland McGrath <roland@redhat.com>
420
421 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
422 and dwfl_build_id_find_debuginfo.
423
424 * libdw.map (ELFUTILS_0.130): New version set, inherits from
425 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
426
Roland McGrath057ec6b2007-10-02 20:55:05 +00004272007-10-02 Roland McGrath <roland@redhat.com>
428
429 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
430 structure_type.
431
Roland McGrathd1a48172007-08-07 19:51:01 +00004322007-08-07 Roland McGrath <roland@redhat.com>
433
434 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
435 error code is DWARF_E_NOERROR (0).
436
437 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
438 Fix typo in __libdw_visit_scopes argument.
439
440 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
441 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
442
Roland McGrath87d47802007-07-16 22:23:37 +00004432007-07-03 Roland McGrath <roland@redhat.com>
444
445 * libdw.h (__extern_inline): New macro.
446 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
447
Roland McGrath43da9892007-04-16 23:13:37 +00004482007-04-16 Roland McGrath <roland@redhat.com>
449
450 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
451
Roland McGrathbf2ee482007-04-05 09:27:36 +00004522007-04-05 Roland McGrath <roland@redhat.com>
453
Roland McGrath43da9892007-04-16 23:13:37 +0000454 * dwarf_getsrcdirs.c: New file.
455 * Makefile.am (libdw_a_SOURCES): Add it.
456 * libdw.h: Declare dwarf_getsrcdirs.
457 * libdw.map (ELFUTILS_0.127): Add it.
458
459 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
460 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
461 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
462 Save DIRARRAY in the Dwarf_Files.
463
Roland McGrathbf2ee482007-04-05 09:27:36 +0000464 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
465 address to check for all-ones base address entry. Check directly.
466 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
467
Ulrich Drepperc07fbb32007-03-30 19:14:59 +00004682007-03-25 Roland McGrath <roland@redhat.com>
469
470 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
471 Return NULL when freeing RESULT on error.
472 (global_read, scngrp_read): Check return value from check_section,
473 break out of loop after it has freed RESULT.
474 (valid_p): Handle null argument.
475
Ulrich Drepper6258e742007-03-13 06:22:40 +00004762007-03-12 Roland McGrath <roland@redhat.com>
477
478 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
479
4802007-03-04 Roland McGrath <roland@redhat.com>
481
482 * libdw.map (ELFUTILS_0.127): New version set, inherits from
483 ELFUTILS_0.126. Add dwfl_module_addrsym.
484
Ulrich Drepper903c1162007-02-15 19:40:37 +00004852007-02-10 Roland McGrath <roland@redhat.com>
486
487 * dwarf.h (DW_OP_fbreg): Comment fix.
488
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00004892007-02-03 Roland McGrath <roland@redhat.com>
490
491 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
492 * libdw.map (ELFUTILS_0.126): New version set, inherits from
493 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
494 exported in the past.
495
Roland McGrath8190db62006-12-17 23:56:51 +00004962006-12-17 Roland McGrath <roland@redhat.com>
497
498 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
499 address when the CU is missing attributes due to buggy GCC.
500
Roland McGrathc373d852006-10-10 00:25:21 +00005012006-08-29 Roland McGrath <roland@redhat.com>
502
503 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
504
505 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
506 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
507
508 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
509 result is aligned. Adjust NEWP->remaining here for this allocation.
510 * libdwP.h: Update decl.
511 (libdw_alloc): Update caller.
512
Ulrich Drepper077c65f2006-07-12 19:54:51 +00005132006-07-12 Ulrich Drepper <drepper@redhat.com>
514
515 * dwarf_child.c: Adjust for internal_function_def removal.
516 * dwarf_getabbrev.c: Likewise.
517 * dwarf_tag.c: Likewise.
518 * libdw_form.c: Likewise.
519 * memory-access.c: Likewise.
520
Ulrich Dreppere1812e12006-07-12 07:46:03 +00005212006-06-28 Roland McGrath <roland@redhat.com>
522
523 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
524
525 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
526 dwfl_module_getsym.
527
Ulrich Drepper3be74472006-05-27 18:15:40 +00005282006-05-27 Ulrich Drepper <drepper@redhat.com>
529
530 * libdw.h: Add extern "C".
531
Ulrich Dreppere7a73172006-05-22 18:16:45 +00005322006-05-22 Ulrich Drepper <drepper@redhat.com>
533
534 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
535 aranges information.
536
Ulrich Drepper4f3d2a22006-05-22 01:30:56 +00005372006-05-21 Ulrich Drepper <drepper@redhat.com>
538
539 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
540 dwarf_haschildren.
541
Roland McGrath2dade662006-02-28 22:13:20 +00005422006-02-28 Roland McGrath <roland@redhat.com>
543
544 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
545 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
546 values from DWARF 3.0.
547
Roland McGrath08333122006-02-27 04:54:26 +00005482006-02-22 Roland McGrath <roland@redhat.com>
549
550 * libdw.map: Bump to 0.120; export dwfl_version.
551
Roland McGrath50ffcbf2005-12-23 01:51:43 +00005522005-12-22 Roland McGrath <roland@redhat.com>
553
554 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
555
Roland McGrathdec3a242005-12-12 08:35:55 +00005562005-12-12 Roland McGrath <roland@redhat.com>
557
558 * dwarf_ranges.c: Copy CU base address-finding code from
559 dwarf_getlocation.
560
Roland McGrathf64a4422005-12-09 23:40:30 +00005612005-12-09 Roland McGrath <roland@redhat.com>
562
563 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
564 Delay CU base lookup until it's needed.
565 If CU base lookup fails with no error, flag invalid DWARF.
566
Roland McGrath994b4892005-12-05 22:46:21 +00005672005-11-25 Roland McGrath <roland@redhat.com>
568
569 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
570
Roland McGrathe47ab762005-11-17 03:16:00 +00005712005-11-15 Roland McGrath <roland@redhat.com>
572
573 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
574
5752005-11-13 Roland McGrath <roland@redhat.com>
576
577 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
578
Roland McGrath07d4f2f2005-10-28 06:56:24 +00005792005-10-27 Roland McGrath <roland@redhat.com>
580
581 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
582 don't match end_sequence markers.
583
584 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
585 before normal records at the same address.
586 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
587 marker.
588
5892005-10-26 Roland McGrath <roland@redhat.com>
590
Roland McGrath6724c902005-10-28 07:07:19 +0000591 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
592 * dwarf_func_file.c: Renamed to ...
593 * dwarf_decl_file.c: ... here.
594 * dwarf_func_col.c: Renamed to ...
595 * dwarf_decl_column.c: ... here.
596 * dwarf_func_line.c: Renamed to ...
597 * dwarf_decl_line.c: ... here.
598 (dwarf_func_line): Renamed to ...
599 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
600 (__libdw_func_intval): Renamed __libdw_attr_intval.
601 * dwarf_func_name.c: File removed.
602 * dwarf_func_lowpc.c: File removed.
603 * dwarf_func_highpc.c: File removed.
604 * dwarf_func_entrypc.c: File removed.
605 * dwarf_func_die.c: File removed.
606 * Makefile.am (libdw_a_SOURCES): Updated.
607 * libdw.h: Update decls.
608 (Dwarf_Func): Type removed.
609 * libdwP.h: Update decls.
610 (struct Dwarf_Func_s): Type removed.
611 * libdw.map: Updated.
612
613 * libdwP.h (CUDIE): New macro.
614 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
615 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
616 * dwarf_ranges.c (dwarf_ranges): Likewise.
617
618 * dwarf_getloclist.c: Renamed to ...
619 * dwarf_getlocation.c: ... here.
620 (getloclist): Renamed to getlocation.
621 (dwarf_getloclist): Renamed to dwarf_getlocation.
622 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
623 * Makefile.am (libdw_a_SOURCES): Updated.
624 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
625 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
626 (Dwarf_Loc): Renamed Dwarf_Op.
627 * libdwP.h (struct loc_s): Update use.
628 * libdw.map: Update map.
629
Roland McGrath07d4f2f2005-10-28 06:56:24 +0000630 * dwarf_entry_breakpoints.c: Use the second line record within the
631 function, regardless of its source location data.
632
6332005-10-25 Roland McGrath <roland@redhat.com>
634
635 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
636
637 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
638
6392005-10-14 Roland McGrath <roland@redhat.com>
640
641 * dwarf_diecu.c (dwarf_diecu): New file.
642 * Makefile.am (libdw_a_SOURCES): Add it.
643 * libdw.h: Declare dwarf_diecu.
644 * libdw.map: Export it.
645
646 * libdw.map: Bump to 0.116; export dwarf_ranges.
647
6482005-09-20 Roland McGrath <roland@redhat.com>
649
650 * dwarf_haspc.c: Use dwarf_ranges.
651 * dwarf_entry_breakpoints.c: Likewise.
652
653 * dwarf_ranges.c: New file.
654 * Makefile.am (libdw_a_SOURCES): Add it.
655 * libdw.h: Declare dwarf_ranges.
656 * libdwP.h: Add INTDECL.
657
6582005-09-14 Roland McGrath <roland@redhat.com>
659
660 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
661 prologue_end marker scanning loop.
662
6632005-09-11 Roland McGrath <roland@redhat.com>
664
665 * dwarf.h: Comment typo fix.
666
6672005-09-07 Roland McGrath <roland@redhat.com>
668
669 * dwarf_entry_breakpoints.c: New file.
670 * Makefile.am (libdw_a_SOURCES): Add it.
671 * libdw.h: Declare dwarf_entry_breakpoints.
672
673 * dwarf_entrypc.c: New file.
674 * Makefile.am (libdw_a_SOURCES): Add it.
675 * libdw.h: Declare dwarf_entrypc.
676 * libdwP.h: Add INTDECL.
677
Ulrich Drepperfbe998a2005-08-29 16:27:10 +00006782005-08-28 Ulrich Drepper <drepper@redhat.com>
679
680 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
681 (%.os): Use COMPILE.os.
682 (COMPILE.os): Filter out gconv options.
683
Roland McGrath71e15a02005-08-27 10:33:26 +00006842005-08-27 Roland McGrath <roland@redhat.com>
685
686 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
687 __libdw_visit_scopes.
688
689 * dwarf_getscopes_die.c: New file.
690 * Makefile.am (libdw_a_SOURCES): Add it.
691 * libdw.h: Declare dwarf_getscopes_die.
692 * libdw.map: Bump to 0.115 and add it.
693
694 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
695 containing a DIE and its parent pointer, instead of just Dwarf_Die.
696 Take two functions for both preorder and postorder visitors.
697 * libdwP.h: Update decl.
698 (struct Dwarf_Die_Chain): New type.
699 * dwarf_func_inline.c: Update uses.
700
701 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
702 Add INTDEF.
703 * libdwP.h: Add INTDECL.
704 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
705
Roland McGrathd17fac72005-08-23 08:20:21 +00007062005-08-23 Roland McGrath <roland@redhat.com>
707
708 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
709 DW_AT_specification the same as DW_AT_abstract_origin.
710
7112005-08-20 Roland McGrath <roland@redhat.com>
712
713 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
714 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
715 and dwfl_report_offline.
716
7172005-08-19 Roland McGrath <roland@redhat.com>
718
719 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
720 Add dwfl_module_relocate_address, dwfl_module_relocations,
721 dwfl_module_relocation_info.
722
Roland McGrathf5fda7d2005-08-18 22:01:57 +00007232005-08-18 Roland McGrath <roland@redhat.com>
724
725 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
726 outermost scope in the results.
727
Roland McGrath1ecb6062005-08-15 09:53:04 +00007282005-08-15 Roland McGrath <roland@redhat.com>
729
730 * dwarf_func_inline.c: New file.
731 * Makefile.am (libdw_a_SOURCES): Add it.
732 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
733 * libdw.map: Add them.
734
735 * dwarf_func_die.c: New file.
736 * Makefile.am (libdw_a_SOURCES): Add it.
737 * libdw.h: Declare dwarf_func_die.
738 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
739
Roland McGrath1c83bf12005-08-11 07:03:55 +00007402005-08-10 Ulrich Drepper <drepper@redhat.com>
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +0000741
Roland McGrath1c83bf12005-08-11 07:03:55 +0000742 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
743 of DW_LNS_set_epilog_begin.
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +0000744
Roland McGrath4959bf82005-08-09 10:31:08 +00007452005-08-09 Roland McGrath <roland@redhat.com>
746
Roland McGrathb6312e12005-08-09 10:36:01 +0000747 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
748
Roland McGrath4959bf82005-08-09 10:31:08 +0000749 * dwarf_end.c: Add INTDEF.
750 * dwarf_error.c (dwarf_errmsg): Likewise.
751 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
752
Roland McGratha5a89682005-08-02 01:24:01 +00007532005-08-01 Roland McGrath <roland@redhat.com>
754
755 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
756 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
757
Ulrich Drepper18618fd2005-07-28 21:29:22 +00007582005-07-28 Ulrich Drepper <drepper@redhat.com>
759
760 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
761 (libdw_a_LIBADD): Add all files from libdwfl.a.
762
Roland McGrath366784a2005-07-28 06:20:53 +00007632005-07-27 Roland McGrath <roland@redhat.com>
764
Roland McGrath18385902005-07-28 07:12:38 +0000765 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
766 along with ../libebl/libebl.a and ../lib/libeu.a;
767 depend on ../libelf/libelf.so.
768 (libdw_so_LDADD): New variable.
769 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
770
Roland McGrath366784a2005-07-28 06:20:53 +0000771 * libdw.map: Define an empty base version and move all symbols to
772 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
773
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00007742005-07-23 Ulrich Drepper <drepper@redhat.com>
775
776 * dwarf_error.c: Add internal alias for dwarf_errno.
777 * libdwP.h: Declare __dwarf_errno_internal.
778 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
779
780 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
781 global_error.
782
7832005-06-01 Roland McGrath <roland@redhat.com>
784
785 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
786 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
787
7882005-06-08 Roland McGrath <roland@redhat.com>
789
790 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
791 (get_sleb128_step, get_sleb128): Likewise.
792 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
793 * dwarf_getloclist.c (getloclist): Likewise.
794 * dwarf_formblock.c (dwarf_formblock): Likewise.
795 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
796 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
797 * dwarf_formref.c (dwarf_formref): Likewise.
798 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
799 * dwarf_formudata.c (dwarf_formudata): Likewise.
800 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
801 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
802 * dwarf_tag.c (dwarf_tag): Likewise.
803 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
804 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
805 * libdw_form.c (__libdw_form_val_len): Likewise.
806 * libdwP.h: Update decl.
807
8082005-06-04 Roland McGrath <roland@redhat.com>
809
810 * memory-access.h (get_uleb128_rest_return): New macro.
811 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
812 (get_sleb128_rest_return): New macro.
813 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
814 * memory-access.c: New file.
815 * Makefile.am (libdw_a_SOURCES): Add it.
816 (DEFS): Add -DIS_LIBDW.
817
8182005-05-31 Roland McGrath <roland@redhat.com>
819
820 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
821 formref offset.
822
8232005-05-30 Roland McGrath <roland@redhat.com>
824
825 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
826 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
827
828 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
829 BEGIN value. Instead, match base address entries separately for
830 32/64 size cases.
831
8322005-05-28 Roland McGrath <roland@redhat.com>
833
834 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
835 past location expression contents.
836
8372005-05-23 Roland McGrath <roland@redhat.com>
838
839 * dwarf_getsrclines.c: Comment typo fix.
840
841 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
842 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
843
8442005-05-22 Ulrich Drepper <drepper@redhat.com>
845
846 * libdwP.h: Only use INTDECL for alias prototypes.
847
8482005-05-19 Roland McGrath <roland@redhat.com>
849
850 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
851
852 * dwarf_getscopevar.c: New file.
853 * Makefile.am (libdw_a_SOURCES): Add it.
854 * libdw.h: Declare dwarf_getscopevar.
855
856 * dwarf_getsrcfiles.c: Add INTDEF.
857 * dwarf_haschildren.c: Likewise.
858 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
859
860 * dwarf_getscopes.c: New file.
861 * Makefile.am (libdw_a_SOURCES): Add it.
862 * libdw.h: Declare dwarf_getscopes.
863 * libdw.map: Add it.
864
8652005-05-18 Roland McGrath <roland@redhat.com>
866
867 * libdwP.h (IDX_debug_ranges): New enum constant.
868 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
869 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
870 * dwarf_error.c (errmsgs): Add it.
871 * dwarf_haspc.c: New file.
872 * libdw.h: Declare dwarf_haspc.
873 * libdw.map: Add it.
874 * libdwP.h: Add INTDECL.
875
876 * dwarf_attr_integrate.c: New file.
877 * dwarf_hasattr_integrate.c: New file.
878 * Makefile.am (libdw_a_SOURCES): Add them.
879 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
880 * libdw.map: Add them.
881
882 * dwarf_hasattr.c: Add INTDEF.
883 * libdwP.h: Add INTDECL for it.
884
885 * dwarf_formref_die.c: New file.
886 * Makefile.am (libdw_a_SOURCES): Add it.
887 * libdw.h (dwarf_formref_die): Declare it.
888 * libdwP.h (dwarf_formref_die): Add INTDECL.
889 * libdw.map: Add it.
890
891 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
892 of ...
893 (dwarf_getloclist): ... here. Call them.
894 (dwarf_addrloclists): New function.
895 * libdw.h: Declare it.
896 * libdw.map: Add it.
897
898 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
899 DW_MACINFO_end_file. Recognize type 0 as terminator.
900
9012005-05-05 Roland McGrath <roland@redhat.com>
902
903 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
904
905 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
906 the line program does not produce all entries in ascending order.
907
9082005-04-25 Ulrich Drepper <drepper@redhat.com>
909
910 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
911 occurences (e.g., inlines) better.
912
9132005-04-24 Ulrich Drepper <drepper@redhat.com>
914
915 * libdw.h (DWARF_END_ABBREV): Define.
916 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
917 end is reached.
918 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
919 of records reached.
920 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
921 as error of __libdw_getabbrev.
922
9232005-04-04 Ulrich Drepper <drepper@redhat.com>
924
925 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
926
927 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
928 results back to caller.
929
9302005-04-04 Roland McGrath <roland@redhat.com>
931
932 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
933
934 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
935 defn.
936
9372005-04-04 Ulrich Drepper <drepper@redhat.com>
938
939 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
940
941 * dwarf_getsrc_file.c: New file.
942 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
943 * libdw.h: Declare dwarf_getsrc_file.
944 * libdw.map: Add dwarf_getsrc_file.
945
9462005-04-02 Ulrich Drepper <drepper@redhat.com>
947
948 * dwarf_func_entrypc.c: New file.
949 * dwarf_func_col.c: New file.
950 * dwarf_func_line.c: New file.
951 * dwarf_func_file.c: New file.
952 * libdw.h: Add prototypes for new functions.
953 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
954 dwarf_func_file.
955 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
956 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
957 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
958 Declare __libdw_func_intval and __dwarf_formsdata_internal.
959 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
960 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
961
962 * dwarf.h: Add some DWARF3 definitions.
963
9642005-04-01 Ulrich Drepper <drepper@redhat.com>
965
966 * dwarf_getfuncs.c: New file.
967 * dwarf_func_highpc.c: New file.
968 * dwarf_func_lowpc.c: New file.
969 * dwarf_func_name.c: New file.
970 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
971 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
972 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
973 and dwarf_func_name.
974 * libdw.h: Add prototypes for new functions.
975 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
976 * dwarf_siblingof.c: Likewise.
977 * dwarf_dieoffset.c: Likewise.
978 * dwarf_highpc.c: Likewise.
979 * dwarf_lowpc.c: Likewise.
980 * libdwP.h: Add prototypes for internal functions.
981 Define Dwarf_Func_s structure.
982
9832005-03-29 Ulrich Drepper <drepper@redhat.com>
984
985 * libdw.h: Add padding in Dwarf_die.
986
987 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
988 * dwarf_attr.c: Likewise.
989 * dwarf_begin.c: Likewise.
990 * dwarf_begin_elf.c: Likewise.
991 * dwarf_bitoffset.c: Likewise.
992 * dwarf_bitsize.c: Likewise.
993 * dwarf_bytesize.c: Likewise.
994 * dwarf_diename.c: Likewise.
995 * dwarf_formaddr.c: Likewise.
996 * dwarf_formblock.c: Likewise.
997 * dwarf_formref.c: Likewise.
998 * dwarf_formstring.c: Likewise.
999 * dwarf_formudata.c: Likewise.
1000 * dwarf_getarange_addr.c: Likewise.
1001 * dwarf_getarangeinfo.c: Likewise.
1002 * dwarf_getaranges.c: Likewise.
1003 * dwarf_getloclist.c: Likewise.
1004 * dwarf_getmacros.c: Likewise.
1005 * dwarf_getsrc_die.c: Likewise.
1006 * dwarf_getsrcfiles.c: Likewise.
1007 * dwarf_getsrclines.c: Likewise.
1008 * dwarf_highpc.c: Likewise.
1009 * dwarf_lowpc.c: Likewise.
1010 * dwarf_nextcu.c: Likewise.
1011 * dwarf_offdie.c: Likewise.
1012 * dwarf_siblingof.c: Likewise.
1013 * dwarf_srclang.c: Likewise.
1014 * dwarf_tag.c: Likewise.
1015 * libdw_findcu.c: Likewise.
1016 * libdwP.h: Add prototypes for internal functions.
1017
1018 * dwarf_addrdie.c: New file.
1019 * dwarf_macro_opcode.c: New file.
1020 * dwarf_macro_param1.c: New file.
1021 * dwarf_macro_param2.c: New file.
1022 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
1023 * libdwP.h: Remove Dwarf_Macro definition.
1024 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
1025 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
1026 * libdw.map: Add entries for new functions.
1027
10282005-03-21 Ulrich Drepper <drepper@redhat.com>
1029
1030 * libdw.h: Handle broken gcc < 4.
1031
10322005-02-15 Ulrich Drepper <drepper@redhat.com>
1033
1034 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
1035
1036 * dwarf_begin_elf.c: Fix warnings.
1037 * dwarf_dieoffset.c: Likewise.
1038 * dwarf_end.c: Likewise.
1039 * dwarf_error.c: Likewise.
1040 * dwarf_getpubnames.c: Likewise.
1041
1042 * libdwP.h: Add new error values.
1043 * dwarf_error.c: Support new error values.
1044 * dwarf_getpubnames.c: Check parameter value.
1045
10462005-02-05 Ulrich Drepper <drepper@redhat.com>
1047
1048 * Makefile.am: Check for text relocations in constructed DSO.
1049
1050 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
1051
10522005-02-04 Ulrich Drepper <drepper@redhat.com>
1053
1054 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
1055 checks to not read over buffer boundaries for ill-formed DWARF data.
1056
10572004-09-25 Ulrich Drepper <drepper@redhat.com>
1058
1059 * dwarf_child.c: Make compile with gcc 4.0.
1060 * dwarf_error.c: Likewise.
1061 * dwarf_formblock.c: Likewise.
1062 * dwarf_getabbrev.c: Likewise.
1063 * dwarf_getattrs.c: Likewise.
1064 * dwarf_getsrclines.c: Likewise.
1065 * dwarf_tag.c: Likewise.
1066 * libdw_form.c: Likewise.
1067
10682004-01-20 Ulrich Drepper <drepper@redhat.com>
1069
1070 * Makefile.am: Support building with mudflap.
1071
1072 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
1073 * dwarf_getsrclines.c: Likewise.
1074 * dwarf_memory-access.h: Likewise.
1075
10762004-01-19 Ulrich Drepper <drepper@redhat.com>
1077
1078 * dwarf_getsrcfiles.c: Third parameter can be NULL.
1079
1080 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
1081 Third parameter of dwarf_getsrcfiles can be NULL.
1082
1083 * libdw.map: Add dwarf_getmacros.
1084 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
1085 * dwarf_getmacros.c: New file.
1086
10872004-01-18 Ulrich Drepper <drepper@redhat.com>
1088
1089 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
1090
1091 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
1092
1093 * dwarf_getsrclines.c:
1094 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
1095
1096 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
1097
1098 * libdwP.h (_): Use elfutils domain.
1099
1100 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
1101
1102 * dwarf_getsrclines.c: Fix typo in comment.
1103
11042004-01-17 Ulrich Drepper <drepper@redhat.com>
1105
1106 * Makefile.am: Support building with mudflap.
1107
11082004-01-16 Ulrich Drepper <drepper@redhat.com>
1109
1110 * memory-access.h: Add lots of const in case a pointer passed is const.
1111
1112 * dwarf_formflag.c: New file.
1113 * dwarf_getattrs.c: New file.
1114 * dwarf_error.c: Add new error value.
1115 * libdw.h: Add prototypes for new functions. Adjust prototype for
1116 dwarf_getpubnames.
1117 * libdw.map: Add new functions.
1118 * dwarf_getpubnames.c: Change type of return value and fourth parameter
1119 to ptrdiff_t.
1120 * libdwP.h: Add new error value.
1121 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
1122 dwarf_formflag.c.
1123
1124 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
1125
11262004-01-12 Ulrich Drepper <drepper@redhat.com>
1127
1128 * dwarf_getarange_addr.c: New file
1129 * dwarf_getarangeinfo.c: New file.
1130 * dwarf_getaranges.c: New file.
1131 * dwarf_onerange.c: New file.
1132 * libdw.h: Declare new functions. Define Dwarf_Arange and
1133 Dwarf_Aranges.
1134 * libdw.map: Add new functions.
1135 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
1136 Define Dwarf_Aranges_s and Dwarf_Arange_s.
1137 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
1138 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
1139 * dwarf_error.c: Add new message.
1140
11412004-01-11 Ulrich Drepper <drepper@redhat.com>
1142
1143 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
1144 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
1145 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
1146 * dwarf_error.c: Add another message.
1147 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
1148 introduction.
1149 * dwarf_filesrc.c: Likewise.
1150 * dwarf_getsrcfiles.c: Likewise.
1151 * dwarf_getsrclines.c: Likewise.
1152 * dwarf_lineaddr.c: New file.
1153 * dwarf_linebeginstatement.c: New file.
1154 * dwarf_lineblock.c: New file.
1155 * dwarf_linecol.c: New file.
1156 * dwarf_lineendsequence.c: New file.
1157 * dwarf_lineepiloguebegin.c: New file.
1158 * dwarf_lineno.c: New file.
1159 * dwarf_lineprologueend.c: New file.
1160 * dwarf_onesrcline.c: New file.
1161 * dwarf_lineno.c: Change interface to store result in object pointed
1162 to by second parameter.
1163 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
1164 prototype. Define Dwarf_Files and Dwarf_Lines.
1165 * libdw.map: Add new functions.
1166 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
1167 * libdw_findcu.c: Don't initialize nlines field.
1168
1169 * dwarf_siblingof: Little optimization.
1170
1171 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
1172 * dwarf_end.c: Close ELF descriptor if free_elf is set.
1173 * libdwP.h (struct Dwarf): Add free_elf field.
1174
1175 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
1176 dwarf_offabbrev.c.
1177 * dwarf_getstring.c: New file.
1178 * dwarf_offabbrev.c: New file.
1179 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
1180 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
1181 parameters. Don't allocate memory if not necessary and don't lookup
1182 previous results if no CU given.
1183 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
1184 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
1185 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
1186 * libdwP.h: Change prototype for __libdw_getabbrev.
1187
1188 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
1189 returning if this is wanted.
1190
11912004-01-09 Ulrich Drepper <drepper@redhat.com>
1192
1193 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
1194 with offset_size value.
1195 * libdw.h: Adjust dwarf_nextcu prototype.
1196 * libdwP.h (struct Dwarf_CU): Add offset_size member.
1197 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
1198 member of new CU struct.
1199 * dwarf_formstring.c: Depend on offset_size not address_size for
1200 DW_FORM_strp handling.
1201 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
1202
1203 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
1204 failing lookup.
1205 (dwarf_tag): Correctly recognize failed lookup.
1206
1207 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
1208 function noop_free.
1209 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
1210 * dwarf_formblock.c: New file.
1211 * dwarf_getloclist.c: Rewrite to handle a single block.
1212 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
1213 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
1214 dwarf_getloclistent declaration.
1215 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
1216 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
1217 Add locs member to struct Dwarf_CU.
1218 * libdw_fundcu.c: Initialize locs member of new CU.
1219 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
1220 Remove dwarf_getloclistent.c.
1221
12222004-01-07 Ulrich Drepper <drepper@redhat.com>
1223
1224 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
1225 * libdwP.h: Likewise.
1226
1227 * dwarf_getloclist.c: New file.
1228 * dwarf_getloclistent.c: New file.
1229 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
1230 Declare dwarf_getloclistent and dwarf_getloclist.
1231 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
1232 * libdwP.h: Define DWARF_E_NO_LOCLIST.
1233 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
1234 dwarf_getloclist.c.
1235
1236 * dwarf_error.c: More error messages.
1237
12382004-01-06 Ulrich Drepper <drepper@redhat.com>
1239
1240 * dwarf_getsrclines.c: Remove debugging support.
1241
1242 * dwarf_getsrcfiles.c: New file.
1243 * dwarf_filesrc.c: New file.
1244 * libdw.h: Declare these functions. Define Dwarf_File.
1245 * libdwP.c: Adjust Dwarf_File_s definition.
1246 * libdw.map: Add these functions.
1247 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
1248 dwarf_filesrc.c.
1249 * dwarf_getsrclines.c: Initialize cu->files.
1250
12512004-01-05 Ulrich Drepper <drepper@redhat.com>
1252
1253 * libdw.h: Add more nonnull function attributes.
1254
1255 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
1256 * dwarf_end.c (cu_free): New function.
1257 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
1258 * dwarf_error.c (errmsgs): Add new messages.
1259 * dwarf_getsrc_die.c: New file.
1260 * dwarf_getsrclines.c: New file.
1261 * dwarf_lineno.c: New file.
1262 * dwarf_linesrc.c: New file.
1263 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
1264 instead of the *_inc-less variants.
1265 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
1266 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
1267 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
1268 and dwarf_linesrc.
1269 * libdwP.h: Add more error codes.
1270 (struct Dwarf): Remove mem_tail.next member.
1271 (Dwarf_File): Define type.
1272 (struct Dwarf_Line_s): Define type.
1273 (struct Dwarf_CU): Add lines and nlines members.
1274 (libdw_alloc): Define local variable _tail and use it.
1275 Add some function attributes.
1276 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
1277 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
1278 * memory-access.h: Add unlikely for the endian conversion paths.
1279 * Makefile.am (AM_CFLAGS): Add -std parameter.
1280 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
1281 dwarf_lineno, and dwarf_linesrc.
1282
12832003-08-11 Ulrich Drepper <drepper@redhat.com>
1284
1285 * Moved to CVS archive.