blob: 61c987113a509bee1d57f888b91c82fbf6d86410 [file] [log] [blame]
Mark Wielaardff1ce972014-12-16 16:10:28 +010012014-12-16 Mark Wielaard <mjw@redhat.com>
2
Mark Wielaardecd78d32014-12-16 22:47:39 +01003 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under
4 DW_LNE_define_file.
5
62014-12-16 Mark Wielaard <mjw@redhat.com>
7
Mark Wielaard7f9ea702014-12-16 16:41:19 +01008 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
9 space to read die offset.
10
112014-12-16 Mark Wielaard <mjw@redhat.com>
12
Mark Wielaardff1ce972014-12-16 16:10:28 +010013 * dwarf_getsrclines.c (read_srclines): Correct overflow check for
14 unit_length.
15
Mark Wielaard38648042014-12-15 14:56:07 +0100162014-12-15 Mark Wielaard <mjw@redhat.com>
17
18 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
Mark Wielaard138a9ba2014-12-15 16:56:49 +010019 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
Mark Wielaard38648042014-12-15 14:56:07 +010020 (dwarf_getpubnames): Make sure section data contains string zero
21 terminator.
22
Mark Wielaard1b5477d2014-12-16 10:53:22 +0100232014-12-16 Mark Wielaard <mjw@redhat.com>
24
25 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help
26 the compiler optimize for the common single-byte case.
27
Josh Stone54662f12014-12-15 12:18:25 -0800282014-12-15 Josh Stone <jistone@redhat.com>
29
30 * memory-access.h (__libdw_max_len_leb128): New.
31 (__libdw_get_uleb128): Use __libdw_max_len_leb128.
32 (__libdw_get_sleb128): Likewise.
33
Mark Wielaard7a053472014-12-14 21:48:23 +0100342014-12-14 Mark Wielaard <mjw@redhat.com>
35
36 * cfi.c (execute_cfi): Add program bounds checks.
37 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
38 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
39 * dwarf_formref.c (__libdw_formref): Add datap bounds checks.
40 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
41 * dwarf_formudata.c (dwarf_formudata): Likewise.
42 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
43 with end of data buf.
44 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
45 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
46 call gets enough data.
47 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
48 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128
49 with enough data.
50 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with
51 end_data.
52 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
53 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call
54 get_uleb128 with lineendp.
55 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
56 get_uleb128 with endp.
57 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
58 get_uleb128/get_sleb128 with limit.
59 * encoded-value.h (read_encoded_value): Assume get_uleb128 and
60 get_sleb128 get called with enough data.
61 * fde.c (intern_fde): Call get_uleb128 with instructions_end.
62 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
63 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
64 endp.
65 * memory-access.h (__libdw_get_uleb128): Take an extra endp.
66 Don't call get_uleb128_step if out of data.
67 (__libdw_get_sleb128): Likewise for get_sleb128_step.
68
Mark Wielaard92026652014-12-12 16:43:04 +0100692014-12-12 Mark Wielaard <mjw@redhat.com>
70
71 * libdwP.h (struct Dwarf): Add fake_loc_cu.
72 (cu_data): Removed.
73 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
74 (__libdw_form_val_compute_len): Drop dbg and endp arguments.
75 (__libdw_form_val_len): Likewise.
76 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
77 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
78 the already found data buffer directly.
79 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
80 * dwarf_end.c (dwarf_end): Free fake_loc_cu.
81 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
82 just cu.
83 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
84 * dwarf_formblock.c (dwarf_formblock): Add bounds checking.
85 * dwarf_getlocation_attr.c (attr_form_cu): New function.
86 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
87 (getlocation): Handle empty blocks immediately.
88 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
89 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
90 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
91 one argument.
92 * dwarf_getmacros.c (read_macros): Also setup startp and endp for
93 fake_cu. Call __libdw_form_val_len with just fake_cu.
94 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
95 datap and size directly from cu startp and endp.
96
Mark Wielaardf73385e2014-12-12 00:22:31 +0100972014-12-11 Mark Wielaard <mjw@redhat.com>
98
99 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
100
Mark Wielaard4a330f62014-12-14 00:09:29 +01001012014-12-13 Mark Wielaard <mjw@redhat.com>
102
103 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
104 difference doesn't wrap around before returning as int.
105
Josh Stone6e1c0d92014-12-11 16:22:48 -08001062014-12-11 Josh Stone <jistone@redhat.com>
107
108 * dwarf_getsrclines.c (struct linelist): Add sequence.
109 (compare_lines): Take linelists, and break ties by sequence.
110 (read_srclines): Use linelists for sorting.
111 (read_srclines::add_new_line): Set sequence.
112
Josh Stoneb849f812014-12-10 18:28:04 -08001132014-12-10 Josh Stone <jistone@redhat.com>
114
Josh Stone8d200b52014-12-10 18:41:43 -0800115 * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
116 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
117 * dwarf_child.c (dwarf_child): Use cu->endp.
118 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
119 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
120 * dwarf_siblingof.c (dwarf_siblingof): Use both.
121
1222014-12-10 Josh Stone <jistone@redhat.com>
123
Josh Stone64e44df2014-12-10 18:33:34 -0800124 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
125
1262014-12-10 Josh Stone <jistone@redhat.com>
127
Josh Stoneb849f812014-12-10 18:28:04 -0800128 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
129 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
130 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
131 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
132 * dwarf_tag.c (dwarf_tag): Likewise.
133
Mark Wielaardcb73b5a2014-12-04 21:43:44 +01001342014-12-04 Mark Wielaard <mjw@redhat.com>
135
136 * libdwP.h (__libdw_form_val_compute_len): Add endp argument.
137 (__libdw_form_val_len): Likewise and check len doesn't overflow.
138 * libdw_form.c (__libdw_form_val_compute_len): Likewise.
139 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
140 with endp.
141 * dwarf_getattrs.c (dwarf_getattrs): Likewise.
142 * dwarf_getmacros.c (read_macros): Likewise and check for errors.
143
Petr Machataedb079a2014-12-02 21:22:14 +01001442014-12-02 Petr Machata <pmachata@redhat.com>
145
146 * dwarf_getmacros.c (token_from_offset, offset_from_token): New
147 helper functions.
148 (do_dwarf_getmacros_die): Merge into dwarf_getmacros.
149 * libdw.h (DWARF_GETMACROS_START): New macro.
150
Mark Wielaard12ab7002014-11-27 23:41:57 +01001512014-11-27 Mark Wielaard <mjw@redhat.com>
152
Mark Wielaard805ec832014-11-27 23:53:30 +0100153 * Makefile.am (libdw.so): Use textrel_check.
154
1552014-11-27 Mark Wielaard <mjw@redhat.com>
156
Mark Wielaard12ab7002014-11-27 23:41:57 +0100157 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
158 search_table_entries and search_table_encoding.
159
Mark Wielaard020fc022014-11-24 21:54:42 +01001602014-11-24 Mark Wielaard <mjw@redhat.com>
161
162 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero
163 before usage.
164
Mark Wielaard04b61f82014-11-23 23:13:55 +01001652014-11-23 Mark Wielaard <mjw@redhat.com>
166
Mark Wielaard59480ba2014-11-23 23:21:05 +0100167 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
168 * dwarf_hasattr.c (dwarf_hasattr): Likewise.
169 * dwarf_siblingof.c (dwarf_siblingof): Likewise.
170
1712014-11-23 Mark Wielaard <mjw@redhat.com>
172
Mark Wielaard04b61f82014-11-23 23:13:55 +0100173 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
174 Set libdw errno and return NULL.
175
Mark Wielaard9f8c08e2014-11-24 22:17:51 +01001762014-11-24 Mark Wielaard <mjw@redhat.com>
177
178 * dwarf.h (DW_LANG_C_plus_plus_11): Added.
179 (DW_LANG_C11): Likewise.
180 (DW_LANG_C_plus_plus_14): Likewise.
181 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
182 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
183 lower bound.
184 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
185 DW_LANG_C11.
186
Mark Wielaard03c033f2014-11-26 17:51:28 +01001872014-11-26 Mark Wielaard <mjw@redhat.com>
188
189 * dwarf.h (DW_AT_noreturn): Added.
190
Mark Wielaard09086232014-11-11 14:10:04 +01001912014-11-11 Mark Wielaard <mjw@redhat.com>
192
193 * dwarf_getsrclines.c (read_srclines): Do address_size comparison
194 explicitly as uint8_t.
195 (__libdw_getsrclines): Add internal_function to declaration.
196
Petr Machatafb90bf32014-10-17 02:47:03 +02001972014-09-10 Petr Machata <pmachata@redhat.com>
198
199 * dwarf_macro_getparamcnt.c: New file.
200 * dwarf_macro_param.c: New file.
201 * dwarf_macro_getsrcfiles.c: New file.
202 * Makefile.am (libdw_a_SOURCES): Add the new files.
203 * libdwP.h (struct files_lines_s): New structure.
204 (DWARF_E_INVALID_OPCODE): New enumerator.
205 (struct Dwarf): New fields macro_ops, files_lines.
206 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
207 keeping macro opcode prototypes in.
208 (Dwarf_Macro_s): Redefine from scratch.
209 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
210 internal interfaces.
211 * dwarf_error.c (errmsgs): Add a message for
212 DWARF_E_INVALID_OPCODE.
213 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
214 files_lines.
215 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
216 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public
217 interfaces.
218 * dwarf_getmacros.c (dwarf_getmacros_off): New function,
219 (get_offset_from, macro_op_compare, build_table)
220 (init_macinfo_table, get_macinfo_table, get_table_for_offset)
221 (cache_op_table, read_macros, gnu_macros_getmacros_off)
222 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
223 functions.
224 (dwarf_getmacros): Adjust to dispatch to the new interfaces.
225 * dwarf_getsrclines.c (read_srclines): New function with guts
226 taken from dwarf_getsrclines.
227 (__libdw_getsrclines): Likewise.
228 (__libdw_getcompdir, files_lines_compare): New functions.
229 (dwarf_getsrclines): Make it dispatch to the new interfaces.
230 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
231 the new interfaces.
232 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
233 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
234 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
235
Mark Wielaard3a36e8a2014-10-06 22:00:16 +02002362014-10-06 Mark Wielaard <mjw@redhat.com>
237
238 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
239 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
240 (aggregate_size): Likewise. Add old and new version.
241 * dwarf_peel_type.c: New file.
242 * libdw.h (dwarf_peel_type): New function declaration.
243 * libdwP.h (dwarf_peel_type): New internal declaration.
244 * libdw.map (ELFUTILS_0.161): New section.
245
Petr Machata564cfbe2014-10-15 19:28:08 +02002462014-10-15 Petr Machata <pmachata@redhat.com>
247
248 * libdwP.h (struct Dwarf_Files_s.cu): Drop field.
249 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
250
Mark Wielaard2e83c642014-10-05 17:12:41 +02002512014-10-05 Mark Wielaard <mjw@redhat.com>
252
253 * dwarf.h: Add DW_AT_GNU_deleted.
254
Mark Wielaardb50014f2014-10-02 14:00:47 +02002552014-10-02 Mark Wielaard <mjw@redhat.com>
256
257 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size
258 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
259 DW_TAG_rvalue_reference_type.
260
Petr Machata1498f542014-09-12 19:03:33 +02002612014-09-12 Petr Machata <pmachata@redhat.com>
262
263 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
264 8-byte quantities. Consequently, rename to...
265 (read_addr_unaligned_inc): ... this.
266 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
267 (read_sbyte_unaligned): Drop.
268
Petr Machata476feb12014-09-10 22:26:28 +02002692014-09-10 Petr Machata <pmachata@redhat.com>
270
271 * dwarf_getlocation.c (attr_ok): Also accept
272 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
273 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
274
Mark Wielaard209f1492014-08-15 13:08:24 +02002752014-08-15 Mark Wielaard <mjw@redhat.com>
276
Mark Wielaardf18f2332014-08-15 16:03:21 +0200277 * dwarf_cu_die.c: New file.
278 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
279 * libdw.h (dwarf_cu_die): New function declaration.
280 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
281
2822014-08-15 Mark Wielaard <mjw@redhat.com>
283
Mark Wielaard209f1492014-08-15 13:08:24 +0200284 * dwarf_cu_getdwarf.c: New file.
285 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
286 * libdw.h (Dwarf_CU): New typedef.
287 (dwarf_cu_getdwarf): New function declaration.
288 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
289
Mark Wielaardaf1e6ed2014-06-18 10:57:58 +02002902014-06-18 Mark Wielaard <mjw@redhat.com>
291
292 * dwarf.h: Remove DW_TAG_mutable_type.
293
Mark Wielaardbb096d02014-05-03 00:23:06 +02002942014-05-02 Mark Wielaard <mjw@redhat.com>
295
296 * libdwP.h (__check_build_id): Removed now unused.
297
Mark Wielaarddf85bf92014-05-01 14:48:27 +02002982014-05-01 Mark Wielaard <mjw@redhat.com>
299
300 * libdwP.h (struct Dwarf): Remove free_alt.
301 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
302 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
303
Mark Wielaardd81d32d2014-04-30 23:00:40 +02003042014-04-30 Mark Wielaard <mjw@redhat.com>
305
306 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
307
Florian Weimer920f03d2014-04-15 17:11:17 +02003082014-04-15 Florian Weimer <fweimer@redhat.com>
309
310 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
311 (open_debugaltlink): Move to libdwfl.
312 (check_section): Do not locate alternate debuginfo.
313
Florian Weimer4813dbb2014-04-24 14:06:43 +02003142014-04-24 Florian Weimer <fweimer@redhat.com>
315
316 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
317
Florian Weimer35e2a762014-04-15 14:31:55 +02003182014-04-22 Florian Weimer <fweimer@redhat.com>
319
320 * dwarf_getalt.c, dwarf_setalt.c: New files.
321 * Makefile.am (libdw_a_SOURCES): Add them.
322 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
323 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
324 declarations.
325 * libdw.map (ELFUTILS_0.159): Export the two new functions.
326
Florian Weimerefa72a02014-04-15 14:04:19 +02003272014-04-15 Florian Weimer <fweimer@redhat.com>
328
329 * libdwP.h (enum IDX_gnu_debugaltlink): New.
330 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
331 .gnu_debugaltlink.
332 (check_section): Obtain .gnu_debugaltlink section from the
333 setiondata array.
334
Mark Wielaard93802972014-04-11 23:52:47 +02003352014-04-11 Mark Wielaard <mjw@redhat.com>
336
337 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
338 * Makefile.am (libdw.so): Depend on libdwelf_pic.a.
339 (libdwelf_objects): New variable.
340 (libdw_a_LIBADD): Add libdwelf objects.
341
Mark Wielaardeb4da482014-04-22 16:43:11 +02003422014-04-22 Mark Wielaard <mjw@redhat.com>
343
344 * memory-access.h (get_sleb128_step): Remove undefined behavior
345 of left shifting a signed value. Replace it with a multiplication.
346
Mark Wielaard32324792014-04-13 17:39:57 +02003472014-04-13 Mark Wielaard <mjw@redhat.com>
348
349 * Makefile.am: Remove !MUDFLAP conditions.
350
Mark Wielaard7f1eec32014-04-09 11:33:23 +02003512014-04-09 Mark Wielaard <mjw@redhat.com>
352
353 * dwarf_begin_elf.c (check_section): Check for unsigned overflow
354 before calling malloc to uncompress data.
355
Jan Kratochvildff2a992014-03-04 00:04:27 +01003562014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com>
357
358 Fix abort() on missing section headers.
359 * dwarf_begin_elf.c (check_section): Replace abort call by goto err.
360 New label err to return NULL.
361
Josh Stone50d5b2c2014-02-05 11:26:27 -08003622014-02-05 Josh Stone <jistone@redhat.com>
363
364 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
365 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
366 unsigned. Change the range assert to DWARF_E_INVALID_DWARF.
367
Mark Wielaard19108012013-12-30 22:00:57 +01003682013-12-30 Mark Wielaard <mjw@redhat.com>
369
370 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
371 dwfl_linux_proc_attach.
372
Mark Wielaarde962ec32013-12-20 10:09:12 +01003732013-12-20 Mark Wielaard <mjw@redhat.com>
374
375 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
376
Mark Wielaard159ac522013-12-18 11:05:54 +01003772013-12-18 Mark Wielaard <mjw@redhat.com>
378
379 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
380 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
381 dwfl_module_getsym_info.
382
Mark Wielaard14c2d9e2013-12-16 13:28:59 +01003832013-12-16 Mark Wielaard <mjw@redhat.com>
384
385 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
386
Josh Stone4e2787c2013-12-10 14:19:09 -08003872013-12-10 Josh Stone <jistone@redhat.com>
388
389 * memory-access.h (get_uleb128_rest_return): Removed.
390 (get_sleb128_rest_return): Removed.
391 (get_uleb128_step): Make this a self-contained block.
392 (get_sleb128_step): Ditto, and use a bitfield to extend signs.
393 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
394 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
395 (__libdw_get_uleb128): Simplify and inline for all callers.
396 (__libdw_get_sleb128): Ditto.
397 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
398 * memory-access.c: Delete file.
399 * Makefile.am (libdw_a_SOURCES): Remove it.
400 (DEFS): Remove the now unused -DIS_LIBDW.
401
Josh Stonec0d2a0b2013-12-09 13:52:10 -08004022013-12-09 Josh Stone <jistone@redhat.com>
403
404 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
405 __libdw_form_val_len, now handling only non-constant form lengths.
406 * libdwP.h (__libdw_form_val_len): New inlined function.
407
Mark Wielaard3951f2e2013-12-09 16:33:26 +01004082013-12-09 Mark Wielaard <mjw@redhat.com>
409
410 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
411 location expressions.
412 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
413 location found, return empty location expression.
414 * dwarf_getlocation_implicit_pointer.c
415 (dwarf_getlocation_implicit_pointer): Likewise.
416 (__libdw_empty_loc_attr): New internal function.
417 * libdwP.h (__libdw_empty_loc_attr): Define.
418
Mark Wielaard819c3492013-11-27 16:45:44 +01004192013-11-27 Mark Wielaard <mjw@redhat.com>
420
421 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
422 dwfl_module_getsym_elf.
423
Mark Wielaard16bc4562013-11-26 15:13:22 +01004242013-11-26 Mark Wielaard <mjw@redhat.com>
425
426 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
427 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
428 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
429 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
430 (ELFUTILS_0.158): ... here.
431
Mark Wielaard03d76f42013-11-09 16:45:22 +01004322013-11-09 Mark Wielaard <mjw@redhat.com>
433
434 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
435 check that it is zero.
436
Jan Kratochvil0b867462013-05-30 14:37:38 +02004372013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
438
439 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
440 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
441 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
442 dwfl_thread_state_registers, dwfl_thread_state_register_pc,
443 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
444
Michael Forneya45c8042013-11-01 00:51:04 -07004452013-11-01 Michael Forney <mforney@mforney.org>
446
Michael Forneycdc09432013-11-01 00:51:05 -0700447 * Makefile.am (libdwfl_objects): New definition.
448 (libdw_a_LIBADD): Use libdwfl_objects.
449
4502013-11-01 Michael Forney <mforney@mforney.org>
451
Michael Forneya45c8042013-11-01 00:51:04 -0700452 * Makefile.am: Use READELF.
453
Jan Kratochvil3cf491e2013-10-30 10:48:20 +01004542013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
455
456 * libdw.map (ELFUTILS_0.158): New.
457
Mark Wielaarde6a9bb82013-10-10 11:40:12 +02004582013-10-10 Mark Wielaard <mjw@redhat.com>
459
460 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
461 start_addr and rename last_offset to last_addr. Now both void *.
462 (tree_visitor): Use start_add and die_addr instead of start_offset
463 and die_offset.
464 (dwarf_getfuncs): Use last_addr instead of last_offset.
465
Mark Wielaard3dec3e12013-10-06 17:04:07 +02004662013-10-06 Mark Wielaard <mjw@redhat.com>
467
468 * cfi.c (execute_cfi): Make sure DW_CFA_expression and
469 DW_CFA_val_expression are not used with abi_cfi.
470
Josh Stone5dbbc5e2013-10-03 12:38:25 -07004712013-10-03 Josh Stone <jistone@redhat.com>
472
473 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
474 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
475 a unit, make sure to always hash the sig8 here, so none are missed.
476
Mark Wielaard74f9b732013-09-30 00:39:07 +02004772013-09-29 Mark Wielaard <mjw@redhat.com>
478
479 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
480 uintptr_t before casting to char *.
481 (__libdw_intern_expression): Cast data to uintptr_t before casting
482 to Dwarf_Word.
483 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
484 op->number2 to uintptr_t before casting to char *.
485
Josh Stonef06c8582013-09-24 15:52:05 -07004862013-09-24 Josh Stone <jistone@redhat.com>
487
488 * libdw_visit_scopes.c (classify_die): Removed.
489 (may_have_scopes): New function to replace classify_die. There's no
490 need for full classification; just find tags that may contain scopes.
491 (__libdw_visit_scopes): Use a direct tag comparison for imported
492 units, and use may_have_scopes to test if recursion is needed.
493
Mark Wielaard1b734df2013-09-20 09:50:42 -04004942013-09-20 Mark Wielaard <mjw@redhat.com>
495
496 * dwarf_getfuncs.c (visitor_info): New struct.
497 (tree_visitor): New function.
498 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
499 * libdw.h (dwarf_getfuncs): Expand function documentation.
500
Mark Wielaard18b2c672013-09-12 15:49:47 +02005012013-09-12 Mark Wielaard <mjw@redhat.com>
502
503 * fde.c (intern_fde): Free fde and set libdw errno when start
504 or end could not be read.
505
Mark Wielaardb2535b62013-08-30 23:55:12 +02005062013-08-24 Mark Wielaard <mjw@redhat.com>
507
508 * dwarf_getlocation.c (store_implicit_value): Don't take data
509 as argument, get block data from op number2. Return false when
510 block data length and op number don't match up.
511 (__libdw_intern_expression): Store start of block for
512 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
513 relative data offset. Also store block start (including length)
514 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
515 * dwarf_getlocation_attr.c: New file.
516 * dwarf_getlocation_die.c: Likewise.
517 * libdw.h (dwarf_getlocation_die): New function definition.
518 (dwarf_getlocation_attr): Likewise.
519 * libdwP.h: Declare internal dwarf_getlocation_die.
520 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
521 dwarf_getlocation_attr.
522 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
523 dwarf_getlocation_attr.c.
524
Mark Wielaard66eaae92013-08-23 16:12:37 +02005252013-08-23 Mark Wielaard <mjw@redhat.com>
526
527 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
528 (attr_base_address): New function.
529 (initial_offset_base): New function.
530 (getlocations_addr): New function. Taken from...
531 (dwarf_getlocation_addr): here. Use new initial_offset_base and
532 getlocations_addr.
533 (dwarf_getlocations): New function.
534 * libdw.h (dwarf_getlocations): New function definition.
535 * libdw.map (ELFUTILS_0.157): New.
536
Mark Wielaard5704c8c2013-07-02 11:22:35 +02005372013-07-02 Mark Wielaard <mjw@redhat.com>
538
Mark Wielaard4aacfc12013-07-02 16:36:16 +0200539 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
540 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in
541 NEW_LINE macro. Free malloced line records if any at the end.
542
5432013-07-02 Mark Wielaard <mjw@redhat.com>
544
Mark Wielaard5704c8c2013-07-02 11:22:35 +0200545 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
546
Mark Wielaard79277072013-06-26 11:42:52 -04005472013-06-26 Mark Wielaard <mjw@redhat.com>
548
549 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
550 DIEs without children. Return an error whenever dwarf_child or
551 dwarf_siblingof return an error. Don't call recurse and increase
552 the depth for an imported unit. Walk the children of an imported
553 unit as if they are logical children of the parent root DIE.
554
Mark Wielaard9affad32013-05-03 11:28:49 +02005552013-05-03 Mark Wielaard <mjw@redhat.com>
556
557 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
558 when nlinelist > 0.
559
Jan Kratochvil904aec22013-04-30 14:27:16 +02005602013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
561
562 * libdw.map (ELFUTILS_0.156): New.
563
Mark Wielaardcdaaf212013-04-25 16:50:11 -04005642013-04-24 Mark Wielaard <mjw@redhat.com>
565
566 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
567
Mark Wielaardd4744a72013-04-10 15:52:57 +02005682013-04-10 Mark Wielaard <mjw@redhat.com>
569
570 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only
571 equal to address size when we have a DW_FORM_ref_addr for DWARF
572 version 2.
573
Mark Wielaard60ef9ab2013-03-25 17:07:21 +01005742013-03-25 Mark Wielaard <mjw@redhat.com>
575
576 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
577 end_sequence.
578
Mark Wielaardf1b06b52013-03-12 12:02:51 +01005792013-03-12 Mark Wielaard <mjw@redhat.com>
580
581 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
582 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
583
Mark Wielaard443304e2013-02-15 22:45:22 +01005842013-02-15 Mark Wielaard <mjw@redhat.com>
585
586 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
587 not dbg->sectiondata.
588
Roland McGrath3999ce12013-01-07 14:53:37 -08005892013-01-07 Roland McGrath <roland@hack.frob.com>
590
591 * memory-access.h
592 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
593 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
594
Mark Wielaard59254422012-12-18 14:14:22 +01005952012-12-18 Mark Wielaard <mjw@redhat.com>
596
597 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
598 (check_section): Likewise on error.
599 (scngrp_read): Likewise.
600 (dwarf_begin_elf): Likewise.
601
Petr Machatab5c0b032012-10-09 02:11:29 +02006022012-10-09 Petr Machata <pmachata@redhat.com>
603
604 * dwarf_getlocation.c (__libdw_intern_expression): Handle
605 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
606 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
607 DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
608
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +02006092012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
610
Jan Kratochvil1d67c0c2012-10-08 23:51:31 +0200611 * cfi.c: New include system.h.
612 (execute_cfi) (enough_registers): Clear new memory after realloc.
613
6142012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
615
Jan Kratochvil07f35072012-10-08 23:34:35 +0200616 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
617 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
618 searched PC.
619
6202012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
621
Jan Kratochvil96a9fc62012-10-08 23:08:01 +0200622 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
623 loclist element DW_OP_call_frame_cfa before decoding the opcodes.
624 Remove the later DW_OP_call_frame_cfa push to RESULT.
625
6262012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
627
Jan Kratochvil6c45f4a2012-10-08 23:04:54 +0200628 Code cleanup.
629 * fde.c (binary_search_fde): Remove always true <address >= start>
630 conditional. Move L initialization upwards.
631
Mark Wielaardf5519fc2012-08-24 13:54:52 +02006322012-08-24 Mark Wielaard <mjw@redhat.com>
633
634 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files
635 when ENABLE_DWZ is defined.
636 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
637 defined.
638
Mark Wielaardf31c4412012-08-17 00:35:03 +02006392012-08-16 Mark Wielaard <mjw@redhat.com>
640
641 * Makefile.am (EXTRA_DIST): Add known-dwarf.h.
642 * dwarf.h (DW_LANG_Go): Update comment.
643 (DW_LANG_Mips_Assembler): Likewise.
644
Mark Wielaard775375e2012-06-22 12:02:45 +02006452012-06-27 Mark Wielaard <mjw@redhat.com>
646
647 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
648 * dwarf_begin.c (dwarf_begin): Add INTDEF.
649 * dwarf_begin_elf.c (__check_build_id): New internal_function.
650 (try_debugaltlink): New function.
651 (open_debugaltlink): Likewise.
652 (check_section): Try open_debugaltlink for .gnu_debugaltlink.
653 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
654 necessary.
655 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
656 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
657 is an error here.
658 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
659 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
660 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
661 calls.
662 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
663 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
664 (struct Dwarf): Add alt_dwarf and free_alt fields.
665 (__libdw_read_offset): Add dbg_ret argument, use to check with
666 __libdw_offset_in_section.
667 (__check_build_id): New function declaration.
668 (dwarf_begin): Define as INTDECL.
669 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
670 and DW_FORM_GNU_strp_alt.
671
Mark Wielaard515fba92012-07-20 00:09:56 +02006722012-07-19 Mark Wielaard <mjw@redhat.com>
673
674 * dwarf.h: Add DW_OP_GNU_parameter_ref.
675
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +02006762012-07-24 Mark Wielaard <mjw@redhat.com>
677
Mark Wielaardc4010b82012-07-24 13:20:41 +0200678 * dwarf.h: Correct spelling of DW_LANG_ObjC.
679 * dwarf_aggregate_size.c (array_size): Use correct spelling of
680 DW_LANG_ObjC.
681
6822012-07-24 Mark Wielaard <mjw@redhat.com>
683
Mark Wielaarddf9ec3f2012-07-24 20:00:14 +0200684 * dwarf.h: Add DW_ATE_UTF.
685
Mark Wielaardef5688e2012-06-27 10:15:27 +02006862012-06-27 Mark Wielaard <mjw@redhat.com>
687
688 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
689
Mark Wielaarda0172d72012-06-25 17:18:53 +02006902012-06-26 Mark Wielaard <mjw@redhat.com>
691
692 * libdwP.h: Add IDX_debug_macro.
693 * dwarf.h: Add DW_AT_GNU_macros.
694 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
695 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
696
Mark Wielaard54797252012-04-27 13:00:50 +02006972012-04-27 Mark Wielaard <mjw@redhat.com>
698
699 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
700 a constant offset from DW_AT_low_pc.
701
Tom Tromey581c3f62012-03-21 08:54:32 -06007022012-03-19 Tom Tromey <tromey@redhat.com>
703
704 * libdw_findcu.c (findcu_cb): Move earlier.
705 (__libdw_intern_next_unit): Add new CU to search tree here...
706 (__libdw_findcu): ... not here.
707
Mark Wielaardcb643d62012-01-31 19:22:03 +01007082012-01-31 Mark Wielaard <mjw@redhat.com>
709
710 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
711
Mark Wielaard387998b2011-10-31 15:01:50 +01007122011-11-31 Mark Wielaard <mjw@redhat.com>
713
714 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
715
Mark Wielaard0b72b652011-07-14 12:59:26 +02007162011-07-14 Mark Wielaard <mjw@redhat.com>
717
718 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
719
Jakub Jelinek03124242011-05-17 17:00:14 +02007202011-05-16 Jakub Jelinek <jakub@redhat.com>
721
722 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
723 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
724 New.
725
Mark Wielaardf4c39c72011-04-26 17:15:28 +02007262011-04-26 Mark Wielaard <mjw@redhat.com>
727
728 * dwarf_child (dwarf_child): Sanity check end of section against
729 cu_data () of die->cu.
730
Mark Wielaarde3368c52011-03-22 23:03:31 +01007312011-03-22 Mark Wielaard <mjw@redhat.com>
732
733 * dwarf.h: Add DW_TAG_GNU_call_site,
734 DW_TAG_GNU_call_site_parameter,
735 DW_AT_GNU_call_site_value,
736 DW_AT_GNU_call_site_data_value,
737 DW_AT_GNU_call_site_target,
738 DW_AT_GNU_call_site_target_clobbered,
739 DW_AT_GNU_tail_call,
740 DW_AT_GNU_all_tail_call_sites,
741 DW_AT_GNU_all_call_sites,
742 DW_AT_GNU_all_source_call_sites,
743 and DW_OP_GNU_entry_value.
744
Petr Machata02c56192011-03-10 01:50:32 +01007452011-03-10 Petr Machata <pmachata@redhat.com>
746
747 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
748 abbreviation with code 0.
749
Petr Machata35870872011-03-09 10:01:29 -08007502011-03-09 Petr Machata <pmachata@redhat.com>
751
752 * libdw/dwarf_child.c (dwarf_child): Check for section overrun.
753
Roland McGrath725aad52011-02-23 19:52:46 -08007542011-02-23 Roland McGrath <roland@redhat.com>
755
756 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
757 Declare __libdw_free_zdata.
758 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
759 (dwarf_end): Call it.
760
761 * dwarf_begin_elf.c (valid_p): Likewise.
762 (check_section, scngrp_read): Likewise.
763 (check_section) [USE_ZLIB]: Grok .z* flavors of sections.
764
Roland McGrath8c0a3822010-10-13 11:21:17 -07007652010-10-13 Roland McGrath <roland@redhat.com>
766
767 * dwarf.h: Add DW_LANG_Go.
768
Roland McGrath5f95e2b2010-10-05 00:56:30 -07007692010-10-05 Roland McGrath <roland@redhat.com>
770
771 * dwarf_getaranges.c: Use malloc rather than alloca,
772 since the total number of elements can be quite huge.
773
Roland McGrath932585d2010-05-08 04:01:14 -07007742010-07-26 Roland McGrath <roland@redhat.com>
775
776 * dwarf_getlocation_implicit_pointer.c: New file.
777 * Makefile.am (libdw_a_SOURCES): Add it.
778 * libdw.map (ELFUTILS_0.149): New set.
779 Add dwarf_getlocation_implicit_pointer.
780 * libdw.h: Declare it.
781
782 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
783 (dwarf_offdie, dwarf_offdie_types): Update callers.
784 * libdwP.h: Declare it.
785
786 * dwarf.h: Add DW_OP_GNU_implicit_pointer.
787 * dwarf_getlocation.c (__libdw_intern_expression): Handle it.
788
Roland McGrathde44f132010-08-24 15:38:42 -07007892010-08-24 Roland McGrath <roland@redhat.com>
790
791 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line.
792
Roland McGrath00aca7f2010-07-27 04:40:23 -07007932010-07-27 Roland McGrath <roland@redhat.com>
794
795 * dwarf_formref_die.c: Fix sig8 hash insertion.
796
Roland McGrath9616b852010-06-23 03:17:28 -07007972010-06-23 Roland McGrath <roland@redhat.com>
798
799 * cfi.c (dwarf_cfi_validate_fde): Function removed.
800 * libdw.h: Remove it.
801 * libdw.map: Likewise.
802
Roland McGrath499b8ff2010-06-22 13:13:53 -07008032010-06-22 Roland McGrath <roland@redhat.com>
804
Roland McGrathc16966a2010-06-22 17:08:43 -0700805 * dwarf_getlocation.c (check_constant_offset): data[48] are constant.
806
Roland McGrath499b8ff2010-06-22 13:13:53 -0700807 * dwarf_getsrclines.c: Fix signed comparison warning in extended
808 opcode parsing.
809
Roland McGrath0c5638c2010-06-21 23:00:35 -07008102010-06-21 Roland McGrath <roland@redhat.com>
811
Roland McGrath474cb482010-06-22 00:10:54 -0700812 * dwarf.h: Add DW_TAG_GNU_* constants.
813
Roland McGrath0c5638c2010-06-21 23:00:35 -0700814 * memory-access.h (get_sleb128_rest_return): Fix sign extension for
815 10-byte case.
816
Roland McGrath5cc030d2010-06-20 17:25:35 -07008172010-06-20 Roland McGrath <roland@redhat.com>
818
Roland McGrath2b1f0952010-06-20 17:55:50 -0700819 * libdw_findcu.c (__libdw_findcu): Take new flag argument,
820 to search TUs instead of CUs.
821 * libdwP.h: Update decl.
822 (struct Dwarf): New member tu_tree.
823 * dwarf_end.c (dwarf_end): Clean up tu_tree.
824 * dwarf_offdie.c (do_offdie): New function, broken out of ...
825 (dwarf_offdie): ... here.
826 (dwarf_offdie_types): New function.
827 * libdw.h: Declare it.
828 * libdw.map (ELFUTILS_0.148): Add it.
829
Roland McGrath5cc030d2010-06-20 17:25:35 -0700830 * libdwP.h (CUDIE): Use cu_data.
831 * dwarf_formblock.c: Likewise.
832 * dwarf_formref_die.c: Likewise.
833 * dwarf_diecu.c: Use CUDIE macro.
834 * dwarf_formaddr.c: Use cu_sec_idx.
835
Roland McGrathc70ebc02010-06-16 02:21:26 -07008362010-06-16 Roland McGrath <roland@redhat.com>
837
Roland McGrath3e0f7d12010-06-15 23:10:35 -0700838 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
839 we don't repeat a CU lookup we've already done. Handle
840 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
841
842 * libdw_findcu.c (__libdw_intern_next_unit): New function,
843 broken out of ...
844 (__libdw_findcu): ... here. Call it.
845 * libdwP.h: Declare it.
846 (struct Dwarf): New member next_tu_offset.
847
848 * dwarf_sig8_hash.c: New file.
849 * dwarf_sig8_hash.h: New file.
850 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
851 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
852 defining NO_UNDEF.
853 * libdwP.h (struct Dwarf): New member sig8_hash.
854 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
855 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
856
857 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
858 (dwarf_nextcu): ... here. Call it.
859 * libdw.h: Declare it.
860 * libdwP.h: Add INTDECL.
861 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
862 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
863
864 * libdwP.h (cu_sec_idx, cu_data): New functions.
865 Use .debug_types when CU is a TU.
866 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
867 * dwarf_siblingof.c: Likewise.
868 * dwarf_formstring.c: Likewise.
869 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
870 * dwarf_getlocation.c (dwarf_getlocation): Likewise.
871 (dwarf_getlocation_addr): Likewise.
872
873 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
874 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
875 .debug_types header size instead of .debug_info header size.
876 (CUDIE): Use it.
877 * dwarf_diecu.c: Update caller.
878 * dwarf_getaranges.c: Likewise.
879 * dwarf_nextcu.c: Likewise.
880 * libdw_findcu.c (__libdw_findcu): Initialize new members.
881
Roland McGrath3e4b5bb2010-06-16 03:40:56 -0700882 * fde.c (fde_by_offset): Renamed to ...
883 (__libdw_fde_by_offset): ... this, made global and internal_function.
884 Don't take ADDRESS argument.
885 (__libdw_find_fde): Update caller. Do address sanity check here.
886 * cfi.h: Declare __libdw_fde_by_offset.
887 * cfi.c (dwarf_cfi_validate_fde): New function.
888 * libdw.h: Declare it.
889 * libdw.map (ELFUTILS_0.148): Add it.
890
Roland McGrath5f4b5082010-06-16 03:11:57 -0700891 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
892 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
893
Roland McGrath7934ded2010-06-16 03:04:09 -0700894 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
895 Don't assume DW_EH_PE_aligned refers to native address size.
896
Roland McGrathc70ebc02010-06-16 02:21:26 -0700897 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
898 address.
899
Roland McGrathc70cf4e2010-06-18 17:01:05 -07009002010-06-17 Roland McGrath <roland@redhat.com>
901
902 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
903 op_index.
904 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
905 into an inner inline function. Set new fields. Check all fields for
906 overflow when setting.
907 * dwarf_lineisa.c: New file.
908 * dwarf_linediscriminator.c: New file.
909 * dwarf_lineop_index.c: New file.
910 * Makefile.am (libdw_a_SOURCES): Add them.
911 * libdw.map (ELFUTILS_0.148): Add them.
912 * libdw.h: Declare them.
913
Roland McGrath3f633072010-06-15 22:17:04 -07009142010-06-16 Roland McGrath <roland@redhat.com>
915
Roland McGrath4a87dfa2010-06-16 16:35:10 -0700916 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
917
Roland McGrathb75f4442010-06-15 22:24:19 -0700918 * fde.c (fde_by_offset): Renamed to ...
919 (__libdw_fde_by_offset): ... this, made global and internal_function.
920 Don't take ADDRESS argument.
921 (__libdw_find_fde): Update caller. Do address sanity check here.
922 * cfi.h: Declare __libdw_fde_by_offset.
Roland McGrath9bcd2652010-06-15 22:17:20 -0700923 * cfi.c (dwarf_cfi_validate_fde): New function.
924 * libdw.h: Declare it.
Roland McGrath3f633072010-06-15 22:17:04 -0700925 * libdw.map (ELFUTILS_0.148): Add it.
926
Roland McGrath0b3363e2010-06-01 15:42:14 -0700927 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
928 either DW_EH_PE_udata8 or DW_EH_PE_udata4.
Roland McGrath827d4d12010-06-01 20:17:36 -0700929
930 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
931 Don't assume DW_EH_PE_aligned refers to native address size.
Roland McGrath1a030b32010-06-01 20:11:40 -0700932
933 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the
Roland McGrath675229b2010-06-01 20:10:19 -0700934 address.
935
9362010-06-15 Roland McGrath <roland@redhat.com>
Roland McGrath52123962010-06-01 19:05:08 -0700937
938 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
Roland McGrath7fac1ce2010-06-01 15:56:58 -0700939 DW_FORM_ref_addr.
940 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
Roland McGrath0b3363e2010-06-01 15:42:14 -0700941 here, since we don't support it yet.
942
Mark Wielaard3f507bd2010-05-31 15:06:31 +0200943 * dwarf_next_cfi.c: Handle version 4 format.
944
Mark Wielaard08e71db2010-05-31 15:39:15 +0200945 * dwarf_getsrclines.c: Handle version 4 format.
946
9472010-06-01 Roland McGrath <roland@redhat.com>
948
949 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
Mark Wielaard3f507bd2010-05-31 15:06:31 +0200950 * dwarf_begin_elf.c (dwarf_scnnames): Likewise.
951
Eduardo Santiagod2240bc2010-05-28 14:26:52 -0700952 * libdwP.h (CIE_VERSION): Remove unused macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -0700953
Ulrich Drepper49fe7142010-05-28 20:32:37 -0700954 * dwarf_getsrclines.c: Fix version field test.
955 * libdwP.h (DWARF_VERSION): Remove useless macro.
Ulrich Drepper6fb34512010-05-28 20:28:04 -0700956
Roland McGrathcfa5da22010-05-27 13:49:25 -0700957 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
958
959 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
960
961 * libdw_findcu.c (__libdw_findcu): Accept version 4.
Roland McGrath688f7fc2010-05-08 03:22:59 -0700962
9632010-05-31 Mark Wielaard <mjw@redhat.com>
964
965 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
966 * libdw.h (dwarf_cfi_cie_p): ... here.
967
9682010-05-31 Mark Wielaard <mjw@redhat.com>
969
970 * dwarf.h: Fix DW_LANG_Python constant.
Roland McGrath0ab97832010-04-26 11:50:27 -0700971
9722010-05-28 Eduardo Santiago <santiago@redhat.com>
Roland McGrath3b10ac02010-04-26 18:45:36 -0700973
974 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
975 thing.
976
9772010-05-27 Roland McGrath <roland@redhat.com>
Roland McGrath0ab97832010-04-26 11:50:27 -0700978
979 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
980 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
981
9822010-05-08 Roland McGrath <roland@redhat.com>
983
984 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument
Roland McGrath3f9d9552010-04-22 20:51:07 -0700985 REF_SIZE. Use that to handle DW_OP_call_ref correctly.
986 (getlocation): Update caller.
987 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
988 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
989 * libdwP.h: Update decl.
990
9912010-04-26 Roland McGrath <roland@redhat.com>
Roland McGrath8068e062010-03-10 23:49:13 -0800992
993 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
994 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for
995 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
Roland McGrath22359e22010-02-15 15:57:03 -0800996 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
997
998 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
999 Prepend DW_OP_call_frame_cfa if true.
Mark Wielaardee29a312010-02-02 20:44:53 +01001000 (getlocation): Update caller.
1001 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
1002 * dwarf_frame_register.c (dwarf_frame_register): Likewise.
1003 * libdwP.h: Update decl.
Roland McGrathf95760a2010-01-07 20:24:34 -08001004
10052010-04-22 Roland McGrath <roland@redhat.com>
1006
1007 * cfi.c (execute_cfi): Never return without cleanup.
Roland McGrath019d9fb2010-01-05 13:36:07 -08001008 Free FS on failure.
1009 (cie_cache_initial_state): Adjust caller to expect that free.
Roland McGrathebc5c882010-01-05 22:53:31 -08001010 (__libdw_frame_at_address): Likewise.
1011
10122010-03-10 Roland McGrath <roland@redhat.com>
1013
1014 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report.
1015
10162010-02-15 Roland McGrath <roland@redhat.com>
1017
1018 * Makefile.am: Use config/eu.am for common stuff.
Roland McGrath0cb19832010-01-05 13:38:15 -08001019
10202010-02-02 Mark Wielaard <mjw@redhat.com>
Roland McGrath019d9fb2010-01-05 13:36:07 -08001021
1022 * fde.c (intern_fde): Fix length check for sized_augmentation_data.
Roland McGrath888381b2009-11-21 17:03:34 -08001023
10242010-01-07 Roland McGrath <roland@redhat.com>
1025
1026 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
1027
Roland McGrath9ca7bc42009-10-15 12:26:49 -070010282010-01-05 Roland McGrath <roland@redhat.com>
1029
1030 * dwarf_aggregate_size.c: New file.
1031 * Makefile.am (libdw_a_SOURCES): Add it.
1032 * libdw.h: Declare it.
Roland McGrath7e0aecd2009-09-17 15:02:34 -07001033 * libdwP.h: Add INTDECL.
1034 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
1035
1036 * dwarf_srclang.c: Add INTDEF.
1037 * libdwP.h: Add INTDECL.
1038
Roland McGrathf0371042009-09-10 12:39:09 -07001039 * dwarf.h: Add some more DW_AT_GNU_* types from gcc.
1040
1041 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
1042
10432009-11-21 Roland McGrath <roland@redhat.com>
1044
1045 * dwarf_getlocation.c (check_constant_offset): Return 1 for all
1046 non-constant forms.
Mark Wielaard418ae4c2009-09-09 20:59:26 +02001047
10482009-10-15 Roland McGrath <roland@redhat.com>
1049
1050 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
Josh Stonecc93cc42009-08-21 18:04:44 -07001051 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
1052
10532009-09-17 Roland McGrath <roland@redhat.com>
1054
Roland McGrath08277ba2009-08-10 15:08:08 -07001055 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
1056 argument a pointer to const.
1057 * libdw.h: Update decl.
1058
Roland McGrathebfb6482009-08-09 15:40:52 -070010592009-09-10 Roland McGrath <roland@redhat.com>
1060
1061 * dwarf_getlocation.c (store_implicit_value): New function.
1062 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
1063 (dwarf_getlocation_implicit_value): New function.
1064 * libdw.h: Declare it.
1065 * libdw.map (ELFUTILS_0.143): Add it.
1066
10672009-09-09 Mark Wielaard <mjw@redhat.com>
1068
1069 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
1070
10712009-08-21 Josh Stone <jistone@redhat.com>
1072
Roland McGrathde69d522009-08-07 18:26:19 -07001073 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
1074
10752009-08-10 Roland McGrath <roland@redhat.com>
1076
1077 * dwarf_getscopevar.c: Use dwarf_diename.
1078
10792009-08-09 Roland McGrath <roland@redhat.com>
1080
1081 * libdw.map (ELFUTILS_0.143): New version set,
1082 inherits from ELFUTILS_0.142.
Roland McGrathaf800142009-07-22 13:55:50 -07001083 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
1084 alias in the ELFUTILS_0.122 version set and the default in the new set.
1085 * dwarf_srclang.c: Likewise.
1086 * dwarf_decl_file.c: Likewise.
1087 * dwarf_decl_line.c: Likewise.
1088 * dwarf_decl_column.c: Likewise.
1089 * dwarf_bytesize.c: Likewise.
1090 * dwarf_bitsize.c: Likewise.
1091 * dwarf_bitoffset.c: Likewise.
1092
10932009-08-07 Roland McGrath <roland@redhat.com>
1094
1095 * dwarf_arrayorder.c: Use dwarf_attr_integrate.
1096 * dwarf_srclang.c: Likewise.
1097 * dwarf_decl_file.c: Likewise.
1098 * dwarf_decl_line.c (__libdw_attr_intval): Likewise.
Roland McGrathe23e9e72009-07-21 18:14:52 -07001099 * dwarf_bytesize.c: Likewise.
1100 * dwarf_bitsize.c: Likewise.
1101 * dwarf_bitoffset.c: Likewise.
1102
11032009-07-22 Roland McGrath <roland@redhat.com>
1104
1105 * dwarf_frame_cfa.c: Change calling convention.
1106 * libdw.h: Update decl.
Roland McGrath96349ff2009-07-20 11:51:41 -07001107
1108 * dwarf_frame_register.c: Change calling/return-value convention for
1109 value-only results and undefined/same_value.
1110 * libdw.h: Update decl.
1111
Roland McGratha6abdfd2009-07-16 17:40:19 -07001112 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool
1113 argument, append DW_OP_stack_value if set. Don't take NOPS argument,
Roland McGrathe160cc92009-07-16 17:48:27 -07001114 return that value instead.
1115 (getlocation): Update caller.
1116 * dwarf_frame_cfa.c: Likewise.
1117 * libdwP.h: Update decl.
1118
Roland McGratha6abdfd2009-07-16 17:40:19 -070011192009-07-21 Roland McGrath <roland@redhat.com>
1120
1121 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
1122 Fix loop iteration after skipping a bogus or useless CU.
1123
1124 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
1125 absence, not DWARF_E_NO_DEBUG_LINE.
Roland McGrath7dd94642009-07-15 11:14:23 -07001126
11272009-07-20 Roland McGrath <roland@redhat.com>
1128
1129 * dwarf_getlocation.c (__libdw_intern_expression):
1130 Handle DW_OP_stack_value.
Roland McGrath80893432009-07-13 12:08:55 -07001131
11322009-07-16 Roland McGrath <roland@redhat.com>
1133
1134 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001135 reject others when CU's version > 3.
1136
Roland McGrath3c84db32009-06-24 17:41:40 -07001137 * dwarf_formflag.c: Handle DW_FORM_flag_present.
1138
1139 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
1140 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
1141 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
1142 and DW_AT_const_expr.
1143 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
1144 and DW_FORM_ref_sig8.
1145
11462009-07-15 Roland McGrath <roland@redhat.com>
1147
1148 * dwarf_getlocation.c: Grok DW_OP_form_tls_address,
1149 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
1150
11512009-07-13 Roland McGrath <roland@redhat.com>
1152
1153 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
1154
11552009-07-08 Roland McGrath <roland@redhat.com>
1156
1157 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
1158 dwfl_module_eh_cfi.
1159
1160 * libdwP.h (struct Dwarf): Add member `cfi'.
1161 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
1162 * dwarf_getcfi.c: New file.
1163 * dwarf_getcfi_elf.c: New file.
1164 * dwarf_cfi_end.c: New file.
1165 * dwarf_cfi_addrframe.c: New file.
1166 * dwarf_frame_cfa.c: New file.
1167 * dwarf_frame_register.c: New file.
1168 * dwarf_frame_return_address_register.c: New file.
1169 * Makefile.am (libdw_a_SOURCES): Add them.
1170 * unwind.h: Declare those functions.
1171 * libdw.map (ELFUTILS_0.142): Export them.
1172
1173 * dwarf_getlocation.c (__libdw_intern_expression): New function,
1174 broken out of ...
1175 (getlocation): ... here, call it.
1176 * libdwP.h: Declare it.
1177
1178 * cie.c: New file.
1179 * fde.c: New file.
1180 * frame-cache.c: New file.
1181 * cfi.c: New file.
1182 * cfi.h: New file.
1183 * encoded-value.h: New file.
1184 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
1185 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
1186 * dwarf_error.c (errmsgs): Add element for it.
1187
1188 * dwarf_next_cfi.c: New file.
1189 * Makefile.am (libdw_a_SOURCES): Add it.
Roland McGrath6e1f4652009-07-08 14:48:34 -07001190 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
1191 Declare dwarf_next_cfi.
Roland McGrathcfdd86e2009-07-08 13:15:07 -07001192 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
1193 Add dwarf_next_cfi.
1194
1195 * memory-access.h [! ALLOW_UNALIGNED]
Roland McGrath05c4e042009-06-18 13:56:02 -07001196 (read_2ubyte_unaligned): Renamed to ...
1197 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *.
1198 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
1199 (read_2sbyte_unaligned): Likewise.
1200 (read_4ubyte_unaligned): Likewise.
1201 (read_4sbyte_unaligned): Likewise.
1202 (read_8ubyte_unaligned): Likewise.
1203 (read_8sbyte_unaligned): Likewise.
1204
Ulrich Drepper99d23722009-06-14 20:19:45 -07001205 * libdwP.h (IDX_eh_frame): Remove it.
1206 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
1207
12082009-07-08 Roland McGrath <roland@redhat.com>
1209
1210 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
1211
1212 * dwarf_getlocation.c (check_constant_offset): New function.
1213 (dwarf_getlocation, dwarf_getlocation_addr): Call it to
1214 handle DW_AT_data_member_location of data[48] as constant offset.
1215
12162009-06-18 Roland McGrath <roland@redhat.com>
1217
1218 * libdwP.h (__libdw_read_address_inc): Constify.
1219 (__libdw_read_offset_inc): Likewise.
1220 * dwarf_getaranges.c: Likewise.
1221 * dwarf_getlocation.c: Likewise.
1222 * dwarf_getsrclines.c: Likewise.
1223 * dwarf_nextcu.c: Likewise.
1224
12252009-05-05 Petr Machata <pmachata@redhat.com>
1226
1227 * libdwP.h (__libdw_formptr): Declare new function.
1228 * dwarf_formudata.c: Implement it here.
1229 * dwarf_getlocation.c (dwarf_getlocation_addr):
1230 Call it instead of hand-rolled offset handling code.
1231 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1232 * dwarf_ranges.c (dwarf_ranges): Likewise.
1233
12342009-05-04 Petr Machata <pmachata@redhat.com>
1235
1236 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
1237 * dwarf_ranges.c: Implement it here.
1238 (dwarf_ranges): Call it.
Roland McGrathe2eabd82009-05-07 18:54:52 -07001239 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
1240
12412009-04-23 Petr Machata <pmachata@redhat.com>
1242
1243 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
1244 of read_*ubyte_unaligned.
Petr Machataf3df61f2009-05-07 21:02:33 +02001245 * dwarf_formref_die.c (dwarf_formref_die): Likewise.
1246 * dwarf_formstring.c (dwarf_formstring): Likewise.
1247 * dwarf_formudate.c (dwarf_formudata): Likewise.
1248 * dwarf_getaranges.c (dwarf_getaranges): Likewise.
1249 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
Roland McGrath2fb90512009-04-15 14:47:13 -07001250 * dwarf_getpubnames.c (get_offsets): Likewise.
1251 * dwarf_nextcu.c (dwarf_nextcu): Likewise.
1252
12532009-04-23 Petr Machata <pmachata@redhat.com>
1254
Roland McGrath6a4bdd92009-04-01 14:25:29 -07001255 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
1256 __libdw_read_addr, __libdw_read_off): Add four new internal
1257 functions.
1258
Roland McGrathc5acb302009-01-28 18:28:52 -080012592009-05-07 Roland McGrath <roland@redhat.com>
1260
Roland McGrath03288f02009-01-28 22:00:54 -08001261 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
1262 return value and OFFSET argument, not CU-relative. Only fetch the
1263 attribute data when called with OFFSET of 0.
Roland McGrathc5acb302009-01-28 18:28:52 -08001264
12652009-05-07 Petr Machata <pmachata@redhat.com>
Roland McGrathf46272a2009-01-26 18:36:16 -08001266
1267 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
1268 DW_AT_macro_info attribute of CU DIE.
1269
Roland McGrathd31505f2009-01-25 19:37:33 -080012702009-04-15 Roland McGrath <roland@redhat.com>
1271
1272 * dwarf.h (DW_CIE_ID): Removed.
1273 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
Roland McGrath3bf7a092009-01-23 16:34:07 -08001274
12752009-04-01 Roland McGrath <roland@redhat.com>
1276
1277 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
1278
Roland McGrathafdd51e2009-01-22 02:26:24 -080012792009-01-28 Roland McGrath <roland@redhat.com>
1280
1281 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
1282 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
Roland McGrath1ea4fdc2009-01-21 19:14:37 -08001283
1284 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
1285
12862009-01-26 Roland McGrath <roland@redhat.com>
1287
1288 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
Roland McGrath24b03302009-01-17 14:34:13 -08001289
12902009-01-25 Roland McGrath <roland@redhat.com>
Roland McGrath54456d82009-01-17 14:39:35 -08001291
1292 * dwarf_getattrs.c: Correctly skip attribute values when restarting.
1293
Roland McGrath5513e642009-01-11 01:35:11 -080012942009-01-23 Roland McGrath <roland@redhat.com>
1295
1296 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
1297 Put these rules under if MAINTAINER_MODE.
1298
12992009-01-22 Roland McGrath <roland@redhat.com>
1300
Roland McGrath24b03302009-01-17 14:34:13 -08001301 * dwarf.h: Add DW_OP_GNU_encoded_addr.
1302
Ulrich Drepper7e678fa2009-01-10 18:02:05 -080013032009-01-21 Roland McGrath <roland@redhat.com>
1304
1305 * Makefile.am (CLEANFILES): Renamed to ...
1306 (MOSTLYCLEANFILES): ... here.
Roland McGrathe06762c2009-01-08 13:39:08 -08001307 (CLEANFILES): New variable, add known-dwarf.h.
1308
13092009-01-17 Roland McGrath <roland@redhat.com>
1310
Roland McGrath7e827f22009-01-06 02:09:50 -08001311 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
Roland McGrath1f6d2012008-12-31 00:21:04 -08001312 Make it unconditional.
1313 (BUILT_SOURCES): Updated.
1314
1315 * dwarf.h: Add description comments for DW_LANG_* values.
Roland McGrathbca43152009-01-05 23:59:32 -08001316
1317 * Makefile.am [MAINTAINER_MODE]
1318 ($(srcdir)/known-dwarf.h): New target.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001319 (BUILT_SOURCES): Add it.
1320
Roland McGrathc462c632009-01-06 01:04:31 -08001321 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
Ulrich Drepperac194d02009-01-06 00:30:01 -08001322
13232009-01-10 Ulrich Drepper <drepper@redhat.com>
1324
1325 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code.
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00001326
13272009-01-08 Roland McGrath <roland@redhat.com>
1328
1329 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
1330
Ulrich Drepper8d358d92008-01-22 06:34:31 +000013312008-01-06 Roland McGrath <roland@redhat.com>
1332
1333 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
1334 Reorder members.
1335 * dwarf_haschildren.c: Return -1 for error case, not 0.
1336
1337 * Makefile.am (libdw.so): Link in $(zip_LIBS).
1338
Ulrich Drepperb27ce002008-01-18 20:08:54 +000013392009-01-06 Ulrich Drepper <drepper@redhat.com>
1340
1341 * dwarf.h: Add definition for unwind and call frame information.
1342
1343 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
Ulrich Drepper35f08c42008-01-18 19:59:08 +00001344 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
1345
13462008-08-15 Roland McGrath <roland@redhat.com>
1347
1348 * libdw.map (ELFUTILS_0.136): New version set, inherits from
1349 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment.
1350
13512008-01-21 Ulrich Drepper <drepper@redhat.com>
1352
1353 * dwarf_child.c: Minor optimizations.
1354 * dwarf_getattrs.c: Likewise.
1355 * dwarf_getpubnames.c: Likewise.
1356 * dwarf_siblingof.c: Likewise.
Ulrich Dreppera969d8e2008-01-22 06:15:00 +00001357 * dwarf_tag.c: Likewise.
Ulrich Drepper35f08c42008-01-18 19:59:08 +00001358
13592008-01-18 Ulrich Drepper <drepper@redhat.com>
1360
1361 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
1362 of DWARF_VERSION comparison, just fail if the file's version is newer.
1363
13642008-01-17 Nick Clifton <nickc@redhat.com>
1365
1366 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
1367 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
1368 (DWARF3_LENGTH_64_BIT): New define.
1369 * dwarf_getaranges (dwarf_getaranges): Use the new definitions.
1370 * dwarf_getpubnames: Include dwarf.h.
1371 (get_offsets): Use the new definitions.
1372 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
1373 * dwarf_nextcu.c: Include dwarf.h. Correct comment.
1374 (dwarf_nextcu): Use the new definitions.
1375
1376 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
1377 * dwarf_diecu.c (dwarf_diecu): Use the new macro.
1378 * dwarf_getaranges (dwarf_getaranges): Use the new macro.
1379 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
1380
1381 * dwarf_getpubnames (get_offsets): Replace assertion with test and
1382 error return.
1383
1384 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
1385
1386 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
1387 Set the address in the return structure to the address of the next
1388 non-sibling die, if there is no sibling and the return pointer is
1389 not the same as the die pointer.
Ulrich Dreppere219f1c2008-01-09 05:49:49 +00001390 * libdw.h: Expand the description of the dwarf_siblingof prototype.
1391
1392 * dwarf_child.c: Fix typo in comment.
1393
1394 * libdwP.h (DWARF_VERSION): Change to 3.
1395
Roland McGrathe4c22ea2007-10-23 13:07:39 +00001396 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do
1397 not have a initialised valp pointer.
1398
1399 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
1400 the end of the attributes is reached. When the callback fails,
1401 return the address of the failing attribute, not the address of
1402 its successor.
1403 * libdw.h: Expand the description of the dwarf_getattrs prototype.
1404
1405 * dwarf_child.c (__libdw_find_attr): Use the new definition.
1406 (dwarf_child): Likewise.
1407 * dwarf_tag.c (__libdw_findabbrev): Likewise.
1408 (dwarf_tag): Likewise.
1409
14102008-01-08 Roland McGrath <roland@redhat.com>
1411
1412 * Makefile.am (euinclude): Variable removed.
1413 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1414 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
Ulrich Drepperb597dfa2007-10-16 05:21:27 +00001415
14162007-10-17 Roland McGrath <roland@redhat.com>
1417
1418 * libdw.h (__deprecated_attribute__): New macro.
1419 (dwarf_formref): Mark it deprecated.
1420 * dwarf_formref.c (__libdw_formref): New function, broken out of ...
1421 (dwarf_formref): ... here. Call it. Remove INTDEF.
Roland McGrath59ea7f32007-10-04 08:50:09 +00001422 * libdwP.h: Remove INTDECL.
1423 Declare __libdw_formref.
1424 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
1425 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here.
1426
1427 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
1428 needs to check CU->version.
1429
Roland McGrath057ec6b2007-10-02 20:55:05 +00001430 * libdwP.h (struct Dwarf_CU): New member `version'.
1431 * libdw_findcu.c (__libdw_findcu): Initialize it.
1432
1433 * dwarf_child.c: Return 1 for null entry as first child.
1434
Roland McGrathd1a48172007-08-07 19:51:01 +000014352007-10-05 Roland McGrath <roland@redhat.com>
1436
1437 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
1438
1439 * libdw.h (__extern_inline): Rename to __libdw_extern_inline.
1440 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
1441
14422007-10-03 Roland McGrath <roland@redhat.com>
1443
1444 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
1445 and dwfl_build_id_find_debuginfo.
Roland McGrath87d47802007-07-16 22:23:37 +00001446
1447 * libdw.map (ELFUTILS_0.130): New version set, inherits from
1448 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id.
1449
14502007-10-02 Roland McGrath <roland@redhat.com>
Roland McGrath43da9892007-04-16 23:13:37 +00001451
1452 * libdw_visit_scopes.c (classify_die): Return walk for class_type and
1453 structure_type.
1454
Roland McGrathbf2ee482007-04-05 09:27:36 +000014552007-08-07 Roland McGrath <roland@redhat.com>
1456
Roland McGrath43da9892007-04-16 23:13:37 +00001457 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
1458 error code is DWARF_E_NOERROR (0).
1459
1460 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
1461 Fix typo in __libdw_visit_scopes argument.
1462
1463 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
1464 swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
1465
14662007-07-03 Roland McGrath <roland@redhat.com>
Roland McGrathbf2ee482007-04-05 09:27:36 +00001467
1468 * libdw.h (__extern_inline): New macro.
1469 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
1470
Ulrich Drepperc07fbb32007-03-30 19:14:59 +000014712007-04-16 Roland McGrath <roland@redhat.com>
1472
1473 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
1474
14752007-04-05 Roland McGrath <roland@redhat.com>
1476
1477 * dwarf_getsrcdirs.c: New file.
1478 * Makefile.am (libdw_a_SOURCES): Add it.
Ulrich Drepper6258e742007-03-13 06:22:40 +00001479 * libdw.h: Declare dwarf_getsrcdirs.
1480 * libdw.map (ELFUTILS_0.127): Add it.
1481
1482 * libdwP.h (struct Dwarf_Files_s): New member ndirs.
1483 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
1484 zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
1485 Save DIRARRAY in the Dwarf_Files.
1486
1487 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
Ulrich Drepper903c1162007-02-15 19:40:37 +00001488 address to check for all-ones base address entry. Check directly.
1489 Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
1490
14912007-03-25 Roland McGrath <roland@redhat.com>
Ulrich Drepperaa915fd2007-02-05 07:25:33 +00001492
1493 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
1494 Return NULL when freeing RESULT on error.
1495 (global_read, scngrp_read): Check return value from check_section,
1496 break out of loop after it has freed RESULT.
1497 (valid_p): Handle null argument.
1498
Roland McGrath8190db62006-12-17 23:56:51 +000014992007-03-12 Roland McGrath <roland@redhat.com>
1500
1501 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
1502
15032007-03-04 Roland McGrath <roland@redhat.com>
Roland McGrathc373d852006-10-10 00:25:21 +00001504
1505 * libdw.map (ELFUTILS_0.127): New version set, inherits from
1506 ELFUTILS_0.126. Add dwfl_module_addrsym.
1507
15082007-02-10 Roland McGrath <roland@redhat.com>
1509
1510 * dwarf.h (DW_OP_fbreg): Comment fix.
1511
15122007-02-03 Roland McGrath <roland@redhat.com>
1513
1514 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
1515 * libdw.map (ELFUTILS_0.126): New version set, inherits from
Ulrich Drepper077c65f2006-07-12 19:54:51 +00001516 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly
1517 exported in the past.
1518
15192006-12-17 Roland McGrath <roland@redhat.com>
1520
1521 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
1522 address when the CU is missing attributes due to buggy GCC.
1523
Ulrich Dreppere1812e12006-07-12 07:46:03 +000015242006-08-29 Roland McGrath <roland@redhat.com>
1525
1526 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
1527
1528 * libdw.h (dwarf_diecu): Add __nonnull_attribute__.
1529 (dwarf_child): Don't list arg 1 in __nonnull_attribute__.
1530
Ulrich Drepper3be74472006-05-27 18:15:40 +00001531 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
1532 result is aligned. Adjust NEWP->remaining here for this allocation.
1533 * libdwP.h: Update decl.
1534 (libdw_alloc): Update caller.
Ulrich Dreppere7a73172006-05-22 18:16:45 +00001535
15362006-07-12 Ulrich Drepper <drepper@redhat.com>
1537
1538 * dwarf_child.c: Adjust for internal_function_def removal.
1539 * dwarf_getabbrev.c: Likewise.
Ulrich Drepper4f3d2a22006-05-22 01:30:56 +00001540 * dwarf_tag.c: Likewise.
1541 * libdw_form.c: Likewise.
1542 * memory-access.c: Likewise.
1543
15442006-06-28 Roland McGrath <roland@redhat.com>
Roland McGrath2dade662006-02-28 22:13:20 +00001545
1546 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
1547
1548 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
1549 dwfl_module_getsym.
1550
Roland McGrath08333122006-02-27 04:54:26 +000015512006-05-27 Ulrich Drepper <drepper@redhat.com>
1552
1553 * libdw.h: Add extern "C".
1554
Roland McGrath50ffcbf2005-12-23 01:51:43 +000015552006-05-22 Ulrich Drepper <drepper@redhat.com>
1556
1557 * dwarf_getaranges.c (dwarf_getaranges): Handle files without
1558 aranges information.
Roland McGrathdec3a242005-12-12 08:35:55 +00001559
15602006-05-21 Ulrich Drepper <drepper@redhat.com>
1561
1562 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
1563 dwarf_haschildren.
Roland McGrathf64a4422005-12-09 23:40:30 +00001564
15652006-02-28 Roland McGrath <roland@redhat.com>
1566
1567 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
1568 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_*
1569 values from DWARF 3.0.
Roland McGrath994b4892005-12-05 22:46:21 +00001570
15712006-02-22 Roland McGrath <roland@redhat.com>
1572
1573 * libdw.map: Bump to 0.120; export dwfl_version.
Roland McGrathe47ab762005-11-17 03:16:00 +00001574
15752005-12-22 Roland McGrath <roland@redhat.com>
1576
1577 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
1578
15792005-12-12 Roland McGrath <roland@redhat.com>
1580
1581 * dwarf_ranges.c: Copy CU base address-finding code from
Roland McGrath07d4f2f2005-10-28 06:56:24 +00001582 dwarf_getlocation.
1583
15842005-12-09 Roland McGrath <roland@redhat.com>
1585
1586 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
1587 Delay CU base lookup until it's needed.
1588 If CU base lookup fails with no error, flag invalid DWARF.
1589
15902005-11-25 Roland McGrath <roland@redhat.com>
1591
1592 * libdw.map: Bump to 0.118; export dwfl_module_register_names.
1593
Roland McGrath6724c902005-10-28 07:07:19 +000015942005-11-15 Roland McGrath <roland@redhat.com>
1595
1596 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
1597
15982005-11-13 Roland McGrath <roland@redhat.com>
1599
1600 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
1601
16022005-10-27 Roland McGrath <roland@redhat.com>
1603
1604 * dwarf_entry_breakpoints.c (search_range): Fix binary search code;
1605 don't match end_sequence markers.
1606
1607 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
1608 before normal records at the same address.
1609 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
1610 marker.
1611
16122005-10-26 Roland McGrath <roland@redhat.com>
1613
1614 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
1615 * dwarf_func_file.c: Renamed to ...
1616 * dwarf_decl_file.c: ... here.
1617 * dwarf_func_col.c: Renamed to ...
1618 * dwarf_decl_column.c: ... here.
1619 * dwarf_func_line.c: Renamed to ...
1620 * dwarf_decl_line.c: ... here.
1621 (dwarf_func_line): Renamed to ...
1622 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument.
1623 (__libdw_func_intval): Renamed __libdw_attr_intval.
1624 * dwarf_func_name.c: File removed.
1625 * dwarf_func_lowpc.c: File removed.
1626 * dwarf_func_highpc.c: File removed.
1627 * dwarf_func_entrypc.c: File removed.
1628 * dwarf_func_die.c: File removed.
1629 * Makefile.am (libdw_a_SOURCES): Updated.
1630 * libdw.h: Update decls.
1631 (Dwarf_Func): Type removed.
1632 * libdwP.h: Update decls.
Roland McGrath07d4f2f2005-10-28 06:56:24 +00001633 (struct Dwarf_Func_s): Type removed.
1634 * libdw.map: Updated.
1635
1636 * libdwP.h (CUDIE): New macro.
1637 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
1638 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1639 * dwarf_ranges.c (dwarf_ranges): Likewise.
1640
1641 * dwarf_getloclist.c: Renamed to ...
1642 * dwarf_getlocation.c: ... here.
1643 (getloclist): Renamed to getlocation.
1644 (dwarf_getloclist): Renamed to dwarf_getlocation.
1645 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
1646 * Makefile.am (libdw_a_SOURCES): Updated.
1647 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
1648 (dwarf_addrloclists): Renamed dwarf_getlocation_addr.
1649 (Dwarf_Loc): Renamed Dwarf_Op.
1650 * libdwP.h (struct loc_s): Update use.
1651 * libdw.map: Update map.
1652
1653 * dwarf_entry_breakpoints.c: Use the second line record within the
1654 function, regardless of its source location data.
1655
16562005-10-25 Roland McGrath <roland@redhat.com>
1657
1658 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
1659
1660 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
1661
16622005-10-14 Roland McGrath <roland@redhat.com>
1663
1664 * dwarf_diecu.c (dwarf_diecu): New file.
1665 * Makefile.am (libdw_a_SOURCES): Add it.
1666 * libdw.h: Declare dwarf_diecu.
1667 * libdw.map: Export it.
1668
1669 * libdw.map: Bump to 0.116; export dwarf_ranges.
1670
16712005-09-20 Roland McGrath <roland@redhat.com>
1672
1673 * dwarf_haspc.c: Use dwarf_ranges.
1674 * dwarf_entry_breakpoints.c: Likewise.
1675
1676 * dwarf_ranges.c: New file.
1677 * Makefile.am (libdw_a_SOURCES): Add it.
1678 * libdw.h: Declare dwarf_ranges.
1679 * libdwP.h: Add INTDECL.
1680
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000016812005-09-14 Roland McGrath <roland@redhat.com>
1682
1683 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
1684 prologue_end marker scanning loop.
1685
16862005-09-11 Roland McGrath <roland@redhat.com>
Roland McGrath71e15a02005-08-27 10:33:26 +00001687
1688 * dwarf.h: Comment typo fix.
1689
16902005-09-07 Roland McGrath <roland@redhat.com>
1691
1692 * dwarf_entry_breakpoints.c: New file.
1693 * Makefile.am (libdw_a_SOURCES): Add it.
1694 * libdw.h: Declare dwarf_entry_breakpoints.
1695
1696 * dwarf_entrypc.c: New file.
1697 * Makefile.am (libdw_a_SOURCES): Add it.
1698 * libdw.h: Declare dwarf_entrypc.
1699 * libdwP.h: Add INTDECL.
1700
17012005-08-28 Ulrich Drepper <drepper@redhat.com>
1702
1703 * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
1704 (%.os): Use COMPILE.os.
1705 (COMPILE.os): Filter out gconv options.
1706
17072005-08-27 Roland McGrath <roland@redhat.com>
1708
Roland McGrathd17fac72005-08-23 08:20:21 +00001709 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using
1710 __libdw_visit_scopes.
1711
1712 * dwarf_getscopes_die.c: New file.
1713 * Makefile.am (libdw_a_SOURCES): Add it.
1714 * libdw.h: Declare dwarf_getscopes_die.
1715 * libdw.map: Bump to 0.115 and add it.
1716
1717 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
1718 containing a DIE and its parent pointer, instead of just Dwarf_Die.
1719 Take two functions for both preorder and postorder visitors.
1720 * libdwP.h: Update decl.
1721 (struct Dwarf_Die_Chain): New type.
1722 * dwarf_func_inline.c: Update uses.
1723
1724 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
1725 Add INTDEF.
Roland McGrathf5fda7d2005-08-18 22:01:57 +00001726 * libdwP.h: Add INTDECL.
1727 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
1728
17292005-08-23 Roland McGrath <roland@redhat.com>
1730
Roland McGrath1ecb6062005-08-15 09:53:04 +00001731 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
1732 DW_AT_specification the same as DW_AT_abstract_origin.
1733
17342005-08-20 Roland McGrath <roland@redhat.com>
1735
1736 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
1737 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
1738 and dwfl_report_offline.
1739
17402005-08-19 Roland McGrath <roland@redhat.com>
1741
1742 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
Roland McGrath1c83bf12005-08-11 07:03:55 +00001743 Add dwfl_module_relocate_address, dwfl_module_relocations,
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001744 dwfl_module_relocation_info.
Roland McGrath1c83bf12005-08-11 07:03:55 +00001745
17462005-08-18 Roland McGrath <roland@redhat.com>
Ulrich Drepper6d5c3bd2005-08-11 04:37:52 +00001747
Roland McGrath4959bf82005-08-09 10:31:08 +00001748 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
1749 outermost scope in the results.
Roland McGrathb6312e12005-08-09 10:36:01 +00001750
17512005-08-15 Roland McGrath <roland@redhat.com>
Roland McGrath4959bf82005-08-09 10:31:08 +00001752
1753 * dwarf_func_inline.c: New file.
1754 * Makefile.am (libdw_a_SOURCES): Add it.
1755 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
Roland McGratha5a89682005-08-02 01:24:01 +00001756 * libdw.map: Add them.
1757
1758 * dwarf_func_die.c: New file.
1759 * Makefile.am (libdw_a_SOURCES): Add it.
1760 * libdw.h: Declare dwarf_func_die.
Ulrich Drepper18618fd2005-07-28 21:29:22 +00001761 * libdw.map: Add it. Bump version to ELFUTILS_0.114.
1762
17632005-08-10 Ulrich Drepper <drepper@redhat.com>
1764
1765 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
Roland McGrath366784a2005-07-28 06:20:53 +00001766 of DW_LNS_set_epilog_begin.
1767
Roland McGrath18385902005-07-28 07:12:38 +000017682005-08-09 Roland McGrath <roland@redhat.com>
1769
1770 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
1771
1772 * dwarf_end.c: Add INTDEF.
1773 * dwarf_error.c (dwarf_errmsg): Likewise.
Roland McGrath366784a2005-07-28 06:20:53 +00001774 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
1775
17762005-08-01 Roland McGrath <roland@redhat.com>
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001777
1778 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
1779 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1780
17812005-07-28 Ulrich Drepper <drepper@redhat.com>
1782
1783 * Makefile.am (libdw.so): No need to link with libeu.a anymore.
1784 (libdw_a_LIBADD): Add all files from libdwfl.a.
1785
17862005-07-27 Roland McGrath <roland@redhat.com>
1787
1788 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
1789 along with ../libebl/libebl.a and ../lib/libeu.a;
1790 depend on ../libelf/libelf.so.
1791 (libdw_so_LDADD): New variable.
1792 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
1793
1794 * libdw.map: Define an empty base version and move all symbols to
1795 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
1796
17972005-07-23 Ulrich Drepper <drepper@redhat.com>
1798
1799 * dwarf_error.c: Add internal alias for dwarf_errno.
1800 * libdwP.h: Declare __dwarf_errno_internal.
1801 * dwarf_getloclist.c: Use INTDEF for dwarf_errno.
1802
1803 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of
1804 global_error.
1805
18062005-06-01 Roland McGrath <roland@redhat.com>
1807
1808 * dwarf_getaranges.c (dwarf_getaranges): Sort result array.
1809 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
1810
18112005-06-08 Roland McGrath <roland@redhat.com>
1812
1813 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
1814 (get_sleb128_step, get_sleb128): Likewise.
1815 * dwarf_getattrs.c (dwarf_getattrs): Add consts.
1816 * dwarf_getloclist.c (getloclist): Likewise.
1817 * dwarf_formblock.c (dwarf_formblock): Likewise.
1818 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1819 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
1820 * dwarf_formref.c (dwarf_formref): Likewise.
1821 * dwarf_formsdata.c (dwarf_formsdata): Likewise.
1822 * dwarf_formudata.c (dwarf_formudata): Likewise.
1823 * dwarf_haschildren.c (dwarf_haschildren): Likewise.
1824 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
1825 * dwarf_tag.c (dwarf_tag): Likewise.
1826 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1827 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
1828 * libdw_form.c (__libdw_form_val_len): Likewise.
1829 * libdwP.h: Update decl.
1830
18312005-06-04 Roland McGrath <roland@redhat.com>
1832
1833 * memory-access.h (get_uleb128_rest_return): New macro.
1834 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
1835 (get_sleb128_rest_return): New macro.
1836 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
1837 * memory-access.c: New file.
1838 * Makefile.am (libdw_a_SOURCES): Add it.
1839 (DEFS): Add -DIS_LIBDW.
1840
18412005-05-31 Roland McGrath <roland@redhat.com>
1842
1843 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
1844 formref offset.
1845
18462005-05-30 Roland McGrath <roland@redhat.com>
1847
1848 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
1849 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it.
1850
1851 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
1852 BEGIN value. Instead, match base address entries separately for
1853 32/64 size cases.
1854
18552005-05-28 Roland McGrath <roland@redhat.com>
1856
1857 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
1858 past location expression contents.
1859
18602005-05-23 Roland McGrath <roland@redhat.com>
1861
1862 * dwarf_getsrclines.c: Comment typo fix.
1863
1864 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
1865 * dwarf_getloclist.c (dwarf_addrloclists): Likewise.
1866
18672005-05-22 Ulrich Drepper <drepper@redhat.com>
1868
1869 * libdwP.h: Only use INTDECL for alias prototypes.
1870
18712005-05-19 Roland McGrath <roland@redhat.com>
1872
1873 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
1874
1875 * dwarf_getscopevar.c: New file.
1876 * Makefile.am (libdw_a_SOURCES): Add it.
1877 * libdw.h: Declare dwarf_getscopevar.
1878
1879 * dwarf_getsrcfiles.c: Add INTDEF.
1880 * dwarf_haschildren.c: Likewise.
1881 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
1882
1883 * dwarf_getscopes.c: New file.
1884 * Makefile.am (libdw_a_SOURCES): Add it.
1885 * libdw.h: Declare dwarf_getscopes.
1886 * libdw.map: Add it.
1887
18882005-05-18 Roland McGrath <roland@redhat.com>
1889
1890 * libdwP.h (IDX_debug_ranges): New enum constant.
1891 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
1892 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
1893 * dwarf_error.c (errmsgs): Add it.
1894 * dwarf_haspc.c: New file.
1895 * libdw.h: Declare dwarf_haspc.
1896 * libdw.map: Add it.
1897 * libdwP.h: Add INTDECL.
1898
1899 * dwarf_attr_integrate.c: New file.
1900 * dwarf_hasattr_integrate.c: New file.
1901 * Makefile.am (libdw_a_SOURCES): Add them.
1902 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
1903 * libdw.map: Add them.
1904
1905 * dwarf_hasattr.c: Add INTDEF.
1906 * libdwP.h: Add INTDECL for it.
1907
1908 * dwarf_formref_die.c: New file.
1909 * Makefile.am (libdw_a_SOURCES): Add it.
1910 * libdw.h (dwarf_formref_die): Declare it.
1911 * libdwP.h (dwarf_formref_die): Add INTDECL.
1912 * libdw.map: Add it.
1913
1914 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
1915 of ...
1916 (dwarf_getloclist): ... here. Call them.
1917 (dwarf_addrloclists): New function.
1918 * libdw.h: Declare it.
1919 * libdw.map: Add it.
1920
1921 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at
1922 DW_MACINFO_end_file. Recognize type 0 as terminator.
1923
19242005-05-05 Roland McGrath <roland@redhat.com>
1925
1926 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
1927
1928 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
1929 the line program does not produce all entries in ascending order.
1930
19312005-04-25 Ulrich Drepper <drepper@redhat.com>
1932
1933 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
1934 occurences (e.g., inlines) better.
1935
19362005-04-24 Ulrich Drepper <drepper@redhat.com>
1937
1938 * libdw.h (DWARF_END_ABBREV): Define.
1939 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
1940 end is reached.
1941 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
1942 of records reached.
1943 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
1944 as error of __libdw_getabbrev.
1945
19462005-04-04 Ulrich Drepper <drepper@redhat.com>
1947
1948 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
1949
1950 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
1951 results back to caller.
1952
19532005-04-04 Roland McGrath <roland@redhat.com>
1954
1955 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
1956
1957 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in
1958 defn.
1959
19602005-04-04 Ulrich Drepper <drepper@redhat.com>
1961
1962 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
1963
1964 * dwarf_getsrc_file.c: New file.
1965 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
1966 * libdw.h: Declare dwarf_getsrc_file.
1967 * libdw.map: Add dwarf_getsrc_file.
1968
19692005-04-02 Ulrich Drepper <drepper@redhat.com>
1970
1971 * dwarf_func_entrypc.c: New file.
1972 * dwarf_func_col.c: New file.
1973 * dwarf_func_line.c: New file.
1974 * dwarf_func_file.c: New file.
1975 * libdw.h: Add prototypes for new functions.
1976 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
1977 dwarf_func_file.
1978 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
1979 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
1980 * libdwP.h (struct Dwarf_Func_s): Add cudie element.
1981 Declare __libdw_func_intval and __dwarf_formsdata_internal.
1982 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
1983 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
1984
1985 * dwarf.h: Add some DWARF3 definitions.
1986
19872005-04-01 Ulrich Drepper <drepper@redhat.com>
1988
1989 * dwarf_getfuncs.c: New file.
1990 * dwarf_func_highpc.c: New file.
1991 * dwarf_func_lowpc.c: New file.
1992 * dwarf_func_name.c: New file.
1993 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
1994 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
1995 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
1996 and dwarf_func_name.
1997 * libdw.h: Add prototypes for new functions.
1998 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
1999 * dwarf_siblingof.c: Likewise.
2000 * dwarf_dieoffset.c: Likewise.
2001 * dwarf_highpc.c: Likewise.
2002 * dwarf_lowpc.c: Likewise.
2003 * libdwP.h: Add prototypes for internal functions.
2004 Define Dwarf_Func_s structure.
2005
20062005-03-29 Ulrich Drepper <drepper@redhat.com>
2007
2008 * libdw.h: Add padding in Dwarf_die.
2009
2010 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
2011 * dwarf_attr.c: Likewise.
2012 * dwarf_begin.c: Likewise.
2013 * dwarf_begin_elf.c: Likewise.
2014 * dwarf_bitoffset.c: Likewise.
2015 * dwarf_bitsize.c: Likewise.
2016 * dwarf_bytesize.c: Likewise.
2017 * dwarf_diename.c: Likewise.
2018 * dwarf_formaddr.c: Likewise.
2019 * dwarf_formblock.c: Likewise.
2020 * dwarf_formref.c: Likewise.
2021 * dwarf_formstring.c: Likewise.
2022 * dwarf_formudata.c: Likewise.
2023 * dwarf_getarange_addr.c: Likewise.
2024 * dwarf_getarangeinfo.c: Likewise.
2025 * dwarf_getaranges.c: Likewise.
2026 * dwarf_getloclist.c: Likewise.
2027 * dwarf_getmacros.c: Likewise.
2028 * dwarf_getsrc_die.c: Likewise.
2029 * dwarf_getsrcfiles.c: Likewise.
2030 * dwarf_getsrclines.c: Likewise.
2031 * dwarf_highpc.c: Likewise.
2032 * dwarf_lowpc.c: Likewise.
2033 * dwarf_nextcu.c: Likewise.
2034 * dwarf_offdie.c: Likewise.
2035 * dwarf_siblingof.c: Likewise.
2036 * dwarf_srclang.c: Likewise.
2037 * dwarf_tag.c: Likewise.
2038 * libdw_findcu.c: Likewise.
2039 * libdwP.h: Add prototypes for internal functions.
2040
2041 * dwarf_addrdie.c: New file.
2042 * dwarf_macro_opcode.c: New file.
2043 * dwarf_macro_param1.c: New file.
2044 * dwarf_macro_param2.c: New file.
2045 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h.
2046 * libdwP.h: Remove Dwarf_Macro definition.
2047 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
2048 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
2049 * libdw.map: Add entries for new functions.
2050
20512005-03-21 Ulrich Drepper <drepper@redhat.com>
2052
2053 * libdw.h: Handle broken gcc < 4.
2054
20552005-02-15 Ulrich Drepper <drepper@redhat.com>
2056
2057 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
2058
2059 * dwarf_begin_elf.c: Fix warnings.
2060 * dwarf_dieoffset.c: Likewise.
2061 * dwarf_end.c: Likewise.
2062 * dwarf_error.c: Likewise.
2063 * dwarf_getpubnames.c: Likewise.
2064
2065 * libdwP.h: Add new error values.
2066 * dwarf_error.c: Support new error values.
2067 * dwarf_getpubnames.c: Check parameter value.
2068
20692005-02-05 Ulrich Drepper <drepper@redhat.com>
2070
2071 * Makefile.am: Check for text relocations in constructed DSO.
2072
2073 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
2074
20752005-02-04 Ulrich Drepper <drepper@redhat.com>
2076
2077 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
2078 checks to not read over buffer boundaries for ill-formed DWARF data.
2079
20802004-09-25 Ulrich Drepper <drepper@redhat.com>
2081
2082 * dwarf_child.c: Make compile with gcc 4.0.
2083 * dwarf_error.c: Likewise.
2084 * dwarf_formblock.c: Likewise.
2085 * dwarf_getabbrev.c: Likewise.
2086 * dwarf_getattrs.c: Likewise.
2087 * dwarf_getsrclines.c: Likewise.
2088 * dwarf_tag.c: Likewise.
2089 * libdw_form.c: Likewise.
2090
20912004-01-20 Ulrich Drepper <drepper@redhat.com>
2092
2093 * Makefile.am: Support building with mudflap.
2094
2095 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
2096 * dwarf_getsrclines.c: Likewise.
2097 * dwarf_memory-access.h: Likewise.
2098
20992004-01-19 Ulrich Drepper <drepper@redhat.com>
2100
2101 * dwarf_getsrcfiles.c: Third parameter can be NULL.
2102
2103 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros.
2104 Third parameter of dwarf_getsrcfiles can be NULL.
2105
2106 * libdw.map: Add dwarf_getmacros.
2107 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
2108 * dwarf_getmacros.c: New file.
2109
21102004-01-18 Ulrich Drepper <drepper@redhat.com>
2111
2112 * libdw.h: Second parameter of dwarf_getaranges can be NULL.
2113
2114 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
2115
2116 * dwarf_getsrclines.c:
2117 Use read_2ubyte_unaligned_inc instead of _inc-less variant.
2118
2119 * dwarf_getaranges.c: Allow naranges parameter to be NULL.
2120
2121 * libdwP.h (_): Use elfutils domain.
2122
2123 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
2124
2125 * dwarf_getsrclines.c: Fix typo in comment.
2126
21272004-01-17 Ulrich Drepper <drepper@redhat.com>
2128
2129 * Makefile.am: Support building with mudflap.
2130
21312004-01-16 Ulrich Drepper <drepper@redhat.com>
2132
2133 * memory-access.h: Add lots of const in case a pointer passed is const.
2134
2135 * dwarf_formflag.c: New file.
2136 * dwarf_getattrs.c: New file.
2137 * dwarf_error.c: Add new error value.
2138 * libdw.h: Add prototypes for new functions. Adjust prototype for
2139 dwarf_getpubnames.
2140 * libdw.map: Add new functions.
2141 * dwarf_getpubnames.c: Change type of return value and fourth parameter
2142 to ptrdiff_t.
2143 * libdwP.h: Add new error value.
2144 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
2145 dwarf_formflag.c.
2146
2147 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
2148
21492004-01-12 Ulrich Drepper <drepper@redhat.com>
2150
2151 * dwarf_getarange_addr.c: New file
2152 * dwarf_getarangeinfo.c: New file.
2153 * dwarf_getaranges.c: New file.
2154 * dwarf_onerange.c: New file.
2155 * libdw.h: Declare new functions. Define Dwarf_Arange and
2156 Dwarf_Aranges.
2157 * libdw.map: Add new functions.
2158 * libdwP.h: Add new errors. Add aranges member to struct Dwarf.
2159 Define Dwarf_Aranges_s and Dwarf_Arange_s.
2160 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
2161 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
2162 * dwarf_error.c: Add new message.
2163
21642004-01-11 Ulrich Drepper <drepper@redhat.com>
2165
2166 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
2167 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
2168 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
2169 * dwarf_error.c: Add another message.
2170 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
2171 introduction.
2172 * dwarf_filesrc.c: Likewise.
2173 * dwarf_getsrcfiles.c: Likewise.
2174 * dwarf_getsrclines.c: Likewise.
2175 * dwarf_lineaddr.c: New file.
2176 * dwarf_linebeginstatement.c: New file.
2177 * dwarf_lineblock.c: New file.
2178 * dwarf_linecol.c: New file.
2179 * dwarf_lineendsequence.c: New file.
2180 * dwarf_lineepiloguebegin.c: New file.
2181 * dwarf_lineno.c: New file.
2182 * dwarf_lineprologueend.c: New file.
2183 * dwarf_onesrcline.c: New file.
2184 * dwarf_lineno.c: Change interface to store result in object pointed
2185 to by second parameter.
2186 * libdw.h: Add prototypes for new functions. Change dwarf_lineno
2187 prototype. Define Dwarf_Files and Dwarf_Lines.
2188 * libdw.map: Add new functions.
2189 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
2190 * libdw_findcu.c: Don't initialize nlines field.
2191
2192 * dwarf_siblingof: Little optimization.
2193
2194 * dwarf_begin.c: Remember that the ELF descriptor must be closed.
2195 * dwarf_end.c: Close ELF descriptor if free_elf is set.
2196 * libdwP.h (struct Dwarf): Add free_elf field.
2197
2198 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
2199 dwarf_offabbrev.c.
2200 * dwarf_getstring.c: New file.
2201 * dwarf_offabbrev.c: New file.
2202 * libdw.map: Add dwarf_getstring and dwarf_offabbrev.
2203 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
2204 parameters. Don't allocate memory if not necessary and don't lookup
2205 previous results if no CU given.
2206 (dwarf_getabbrev): Adjust call to __libdw_getabbrev.
2207 * dwarf_tag.c: Adjust call to __libdw_getabbrev.
2208 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
2209 * libdwP.h: Change prototype for __libdw_getabbrev.
2210
2211 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before
2212 returning if this is wanted.
2213
22142004-01-09 Ulrich Drepper <drepper@redhat.com>
2215
2216 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it
2217 with offset_size value.
2218 * libdw.h: Adjust dwarf_nextcu prototype.
2219 * libdwP.h (struct Dwarf_CU): Add offset_size member.
2220 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size
2221 member of new CU struct.
2222 * dwarf_formstring.c: Depend on offset_size not address_size for
2223 DW_FORM_strp handling.
2224 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
2225
2226 * dwarf_tag.c (__libdw_findabbrev): Return correct value for
2227 failing lookup.
2228 (dwarf_tag): Correctly recognize failed lookup.
2229
2230 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new
2231 function noop_free.
2232 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
2233 * dwarf_formblock.c: New file.
2234 * dwarf_getloclist.c: Rewrite to handle a single block.
2235 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove
2236 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove
2237 dwarf_getloclistent declaration.
2238 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
2239 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
2240 Add locs member to struct Dwarf_CU.
2241 * libdw_fundcu.c: Initialize locs member of new CU.
2242 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
2243 Remove dwarf_getloclistent.c.
2244
22452004-01-07 Ulrich Drepper <drepper@redhat.com>
2246
2247 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
2248 * libdwP.h: Likewise.
2249
2250 * dwarf_getloclist.c: New file.
2251 * dwarf_getloclistent.c: New file.
2252 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
2253 Declare dwarf_getloclistent and dwarf_getloclist.
2254 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
2255 * libdwP.h: Define DWARF_E_NO_LOCLIST.
2256 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
2257 dwarf_getloclist.c.
2258
2259 * dwarf_error.c: More error messages.
2260
22612004-01-06 Ulrich Drepper <drepper@redhat.com>
2262
2263 * dwarf_getsrclines.c: Remove debugging support.
2264
2265 * dwarf_getsrcfiles.c: New file.
2266 * dwarf_filesrc.c: New file.
2267 * libdw.h: Declare these functions. Define Dwarf_File.
2268 * libdwP.c: Adjust Dwarf_File_s definition.
2269 * libdw.map: Add these functions.
2270 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
2271 dwarf_filesrc.c.
2272 * dwarf_getsrclines.c: Initialize cu->files.
2273
22742004-01-05 Ulrich Drepper <drepper@redhat.com>
2275
2276 * libdw.h: Add more nonnull function attributes.
2277
2278 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
2279 * dwarf_end.c (cu_free): New function.
2280 (dwarf_end): Also free CU tree. Correct freeing of memory blocks.
2281 * dwarf_error.c (errmsgs): Add new messages.
2282 * dwarf_getsrc_die.c: New file.
2283 * dwarf_getsrclines.c: New file.
2284 * dwarf_lineno.c: New file.
2285 * dwarf_linesrc.c: New file.
2286 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
2287 instead of the *_inc-less variants.
Ulrich Drepper6fb34512010-05-28 20:28:04 -07002288 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00002289 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
2290 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
2291 and dwarf_linesrc.
2292 * libdwP.h: Add more error codes.
2293 (struct Dwarf): Remove mem_tail.next member.
2294 (Dwarf_File): Define type.
2295 (struct Dwarf_Line_s): Define type.
2296 (struct Dwarf_CU): Add lines and nlines members.
2297 (libdw_alloc): Define local variable _tail and use it.
2298 Add some function attributes.
2299 * libdw_alloc.c (__libdw_allocate): Don't initialize next member.
2300 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
2301 * memory-access.h: Add unlikely for the endian conversion paths.
2302 * Makefile.am (AM_CFLAGS): Add -std parameter.
2303 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
2304 dwarf_lineno, and dwarf_linesrc.
2305
23062003-08-11 Ulrich Drepper <drepper@redhat.com>
2307
2308 * Moved to CVS archive.