xref: /aosp_15_r20/external/elfutils/libdw/ChangeLog (revision 7304104da70ce23c86437a01be71edd1a2d7f37e)
12023-09-27  Omar Sandoval  <[email protected]>
2
3	* libdwP.h ((Dwarf): Add elfpath.
4	* dwarf_begin_elf.c (__libdw_debugdir): Replace declaration with...
5	(__libdw_elfpath): New declaration.
6	(__libdw_set_debugdir): New declaration.
7	(__libdw_debugdir): Replace with..
8	(__libdw_elfpath): New function.
9	(__libdw_set_debugdir): New function.
10	(valid_p): Call __libdw_elfpath and __libdw_set_debugdir instead of
11	__libdw_debugdir.
12	* dwarf_end.c (dwarf_end): Free dwarf->elfpath.
13
142023-09-27  Omar Sandoval  <[email protected]>
15
16	* libdw_find_split_unit.c (try_split_file): Make static.
17	* dwarf_entrypc.c (dwarf_entrypc): Call dwarf_lowpc.
18	* dwarf_ranges.c (dwarf_ranges): Use skeleton ranges section for
19	skeleton units.
20	* dwarf_macro_param2.c (dwarf_macro_param2): Change form condition to
21	switch statement and add DW_FORM_line_strp, DW_FORM_strp_sup,
22	DW_FORM_strx, and DW_FORM_strx[1-4].
23	* dwarf_getmacros.c (get_macinfo_table): Replace assignment of
24	table->is_64bit with assignments of table->address_size and
25	table->offset_size.  Assume default DW_AT_stmt_list of 0 for split
26	DWARF.  Set table->dbg.
27	(get_table_for_offset): Ditto.
28	(read_macros): Get fake CU offset_size from table->offset_size instead
29	of table->is_64bit.
30	* dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Get
31	address_size for __libdw_getsrclines from table->address_size instead
32	of table->is_64bit.  Get dbg for __libdw_getsrclines from table->dbg
33	instead of dbg parameter, which is now unused.
34	* libdwP.h (Dwarf_Macro_Op_Table): Replace is_64bit with address_size
35	and offset_size.  Add dbg.
36	Add IDX_debug_cu_index and IDX_debug_tu_index.
37	* dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_cu_index and
38	IDX_debug_tu_index.
39	(scn_to_string_section_idx): Ditto.
40	(scn_dwarf_type): Check for .debug_cu_index, .debug_tu_index,
41	.zdebug_cu_index, and .zdebug_tu_index.
42	(check_section): Change .dwo suffix matching to account for
43	.debug_cu_index and .debug_tu_index.
44
452023-02-22  Mark Wielaard  <[email protected]>
46
47	* dwarf_getscopes.c (origin_match): Don't free a->scopes.
48	(dwarf_getscopes): Free a->scopes on error.
49
502023-02-20  Mark Wielaard  <[email protected]>
51
52	* dwarf_begin_elf.c (check_section): Use elf_rawdata.
53
542023-02-14  Mark Wielaard  <[email protected]>
55
56	* dwarf_getlocation.c (__libdw_intern_expression): Correct check
57	for deref_type.
58
592023-02-10  Mark Wielaard  <[email protected]>
60
61	* dwarf_getlocation.c (__libdw_intern_expression): Handle
62	DW_OP_GNU_uninit.
63
642023-02-12  Mark Wielaard  <[email protected]>
65
66	* cfi.c (execute_cfi): Add cfi_asser before reading second lib128.
67	* dwarf_chld.c (__libdw_find_attr): Check readp >= endp before
68	calling get_uleb128.
69	* dwarf_frame_register.c (dwarf_frame_register): Likewise for
70	p >= end.
71	* dwarf_getabbrev.c (__libdw_getabbrev): Add comment about check.
72	* dwarf_getlocation.c (__libdw_intern_expression): Update check to
73	account for both the number and uleb128.
74	* encoded-value.h (read_encoded_value): Check p >= end for
75	DW_EH_PE_(u|s)leb128.
76	* fde.c (intern_fde): Check len can be read as uleb128.
77	* libdw_form.c (__libdw_form_val_compute_len): Check valp >= endp
78	before get_uleb128.
79
802023-01-22  Mark Wielaard  <[email protected]>
81
82	* dwarf_getscopes.c (pc_record): Return nscopes when done.
83	(dwarf_getscopes): Call __libdw_visit_scopes with
84	inlined_origin CU.
85
862022-12-20  Mark Wielaard  <[email protected]>
87
88	* Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/../libebl.
89	* cfi.c: Include libebl.h.
90	* encoded-value.h: Likewise.
91	* frame-cache.h: Likewise.
92
932022-10-21  Yonggang Luo  <[email protected]>
94
95	* memory-access.h (get_uleb128_step): Use __typeof.
96	(get_sleb128_step): Likewise.
97	(__libdw_get_sleb128) Likewise.
98	(__libdw_get_sleb128_unchecked): Likewise.
99
1002022-11-03  Mark Wielaard  <[email protected]>
101
102	* dwarf_next_cfi.c (dwarf_next_cfi): Don't dereference and assign
103	bytes.
104
1052022-10-21  Yonggang Luo  <[email protected]>
106
107	* dwarf_begin_elf.h: Don't include unistd.h and endian.h.
108	* dwarf_end.c: Don't include unistd.h.
109	* dwarf_setalt.c: Likewise.
110	* libdw_find_split_unit.c: Likewise.
111
1122022-10-19  Mark Wielaard  <[email protected]>
113
114	* dwarf.h (DW_LLE_GNU_view_pair): New constant.
115
1162022-10-21  Yonggang Luo  <[email protected]>
117
118	* memory-access.h: Include system.h instead of byteswap.h and
119	endian.h.
120
1212022-09-20  Yonggang Luo  <[email protected]>
122
123	* memory-access.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
124
1252022-09-13  Aleksei Vetrov  <[email protected]>
126
127	* libdw.map (ELFUTILS_0.188): Add dwfl_report_offline_memory.
128
1292022-08-09  Ulrich Drepper  <[email protected]>
130
131	* dwarf_next_cfi.c (dwarf_next_cfi): Don't skip processing the
132	augmentation string.  Be more stringent what to accept.
133
1342022-07-28  Di Chen  <[email protected]>
135
136	* libdw.map (ELFUTILS_0.188): Add dwfl_frame_reg.
137
1382022-07-13  Mark Wielaard  <[email protected]>
139
140	* libdw.map (ELFUTILS_0.187): Renamed to...
141	(ELFUTILS_0.188): ... this.
142
1432022-05-09  Mark Wielaard  <[email protected]>
144
145	* dwarf_getlocation.c (store_implicit_value): Check block length.
146
1472022-04-16  Mark Wielaard  <[email protected]>
148
149	* libdwP.h: Remove atomics.h include.
150
1512022-04-13  Mark Wielaard  <[email protected]>
152
153	* dwarf.h: Add DWARF5 package file section identifiers,
154	DW_SECT_*.
155
1562021-10-20  John M Mellor-Crummey  <[email protected]>
157
158	* dwarf_linecontext.c: New file.
159	* dwarf_linefunctionname.c: Likewise.
160	* Makefile.am (libdw_a_SOURCES): Add dwarf_linecontext.c and
161	dwarf_linefunctionname.c
162	* dwarf.h: Add DW_LNE_NVIDIA_inlined_call and
163	DW_LNE_NVIDIA_set_function_name.
164	* dwarf_getsrclines.c (struct line_state): Add context and
165	function_name fields.
166	(add_new_line): Set context and function_name.
167	(MAX_STACK_LINES): Reduce to MAX_STACK_ALLOC / 2.
168	(read_srclines): Initialize context and function_name.  Try to
169	read debug_str_offset if available.  Handle
170	DW_LNE_NVIDIA_inlined_call and DW_LNE_NVIDIA_set_function_name.
171	* libdw.h (dwarf_linecontext): New declaration.
172	(dwarf_linefunctionname): Likewise.
173	* libdw.map (ELFUTILS_0.186): New section.
174
1752021-11-08  Mark Wielaard  <[email protected]>
176
177	* dwarf_begin_elf.c (scn_dwarf_type): New function.
178	(check_section): Check result->type.
179	(global_read): First check type.
180	(scngrp_read): Likewise.
181	* libdw/libdwP.h (enum dwarf_type): New enumeration.
182	(struct Dwarf): New field type.
183
1842021-02-14  Alexander Miller  <[email protected]>
185
186	* dwarf_aggregate_size.c (dwarf_aggregate_size): Move NEW_VERSION
187	before definition.  Replace INTDEF with NEW_INTDEF.
188	* dwarf_srclang.c (dwarf_srclang): Likewise.
189	* dwarf_arrayorder.c (dwarf_arrayorder): Move NEW_VERSION.
190	* dwarf_bitoffset.c (dwarf_bitoffset): Likewise.
191	* dwarf_bitsize.c (dwarf_bitsize): Likewise.
192	* dwarf_bytesize.c (dwarf_bytesize): Likewise.
193	* dwarf_decl_column.c (dwarf_decl_column): Likewise.
194
1952021-10-18  Mark Wielaard  <[email protected]>
196
197	* dwarf_aggregate_size.c (get_type): Don't pass NULL to
198	dwarf_peel_type.
199
2002021-10-06  Mark Wielaard  <[email protected]>
201
202	* dwarf_aggregate_size.c (array_size): Check signedness of child DIE
203	type. Use dwarf_formsdata or dwarf_formudata to get the lower and
204	upper bounds.
205
2062021-09-08  Mark Wielaard  <[email protected]>
207
208	* dwarf_begin_elf.c (valid_p): Identify ELF class and use this to set
209	address_size of the fake CUs. Also set offset_size and DWARF version.
210
2112021-09-06  Dmitry V. Levin  <[email protected]>
212
213	* dwarf_begin_elf.c (valid_p): Remove casts of malloc return values.
214	(dwarf_begin_elf): Remove cast of calloc return value.
215	* dwarf_getpubnames.c (get_offsets): Remove casts of realloc return
216	values.
217	* dwarf_getsrclines.c (read_srclines): Remove cast of malloc return
218	value.
219
2202021-04-19  Martin Liska  <[email protected]>
221
222	* dwarf_begin_elf.c (check_section): Use startswith.
223
2242021-05-01  Mark Wielaard  <[email protected]>
225
226	* libdw_form.c (__libdw_form_val_compute_len): Check indirect
227	form is not DW_FORM_indirect or DW_FORM_implicit_const.
228
2292021-04-23  Omar Sandoval  <[email protected]>
230
231	* dwarf_child.c (__libdw_find_attr): Handle DW_FORM_indirect.
232	* dwarf_getattrs.c (dwarf_getattrs): Handle DW_FORM_indirect.
233
2342021-02-12  Mark Wielaard  <[email protected]>
235
236	* dwarf_getlocation.c (attr_ok): For DWARF version 4 or higher
237	block forms are not expression locations.
238	(is_constant_offset): DW_FORM_implicit_const is also a constant.
239
2402020-12-20  Dmitry V. Levin  <[email protected]>
241
242	* .gitignore: New file.
243
2442020-12-16  Dmitry V. Levin  <[email protected]>
245
246	* libdwP.h (_): Remove.
247
2482020-12-12  Dmitry V. Levin  <[email protected]>
249
250	* dwarf.h: Fix spelling typo in comment.
251	* dwarf_begin_elf.c (dwarf_begin_elf): Likewise.
252	* dwarf_getlocation.c (attr_ok, __libdw_intern_expression): Likewise.
253	* dwarf_getsrclines.c (read_srclines): Likewise.
254	* libdw.h: Fix spelling typos in comments.
255	* libdwP.h: Likewise.
256
2572020-12-09  Dmitry V. Levin  <[email protected]>
258
259	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
260	(libdw_so_SOURCES): Remove.
261	(MOSTLYCLEANFILES): Add libdw.so.
262
2632020-11-30  Dmitry V. Levin  <[email protected]>
264
265	* Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix.
266
2672020-11-01  Érico N. Rolim  <[email protected]>
268
269	* Makefile.am (libdw_so_LDLIBS): Add fts_LIBS.
270
2712020-10-28  Tom Tromey  <[email protected]>
272
273	PR26773
274	* dwarf_getlocation.c (store_implicit_value): Use
275	__libdw_get_uleb128_unchecked.
276	* memory-access.h (get_sleb128_step): Assume unsigned type for
277	'var'.
278	(__libdw_get_sleb128, __libdw_get_sleb128_unchecked): Work in
279	unsigned type.  Handle final byte.
280
2812020-10-19  Mark Wielaard  <[email protected]>
282
283	* dwarf_frame_register.c (dwarf_frame_register): Declare ops_mem
284	as array of (at least) 3 elements.
285	* libdw.h (dwarf_frame_register): Add extra explanation of ops_mem
286	argument.
287
2882020-10-23  Tom Tromey  <[email protected]>
289
290	* memory-access.h (read_3ubyte_unaligned_inc): Call
291	read_3ubyte_unaligned.
292
2932020-09-03  Mark Wielaard  <[email protected]>
294
295	* dwarf.h: Add DW_CFA_AARCH64_negate_ra_state.
296	* cfi.h (struct Dwarf_CFI_s): Add e_machine field.
297	* cfi.c (execute_cfi): Recognize, but ignore
298	DW_CFA_AARCH64_negate_ra_state on aarch64.
299	* dwarf_getcfi.c (dwarf_getcfi): Set cfi e_machine.
300	* dwarf_getcfi_elf.c (allocate_cfi): Take ehdr as argument and set
301	cfi e_machine.
302	(getcfi_gnu_eh_frame): Pass ehdr to allocate_cfi.
303	(getcfi_scn_eh_frame): Likewise.
304
3052020-09-03  Mark Wielaard  <[email protected]>
306
307	* libdw.map (ELFUTILS_0.126): Remove local wildcard.
308	(ELFUTILS_0.127): Likewise.
309	(ELFUTILS_0.130): Likewise.
310	(ELFUTILS_0.136): Likewise.
311	(ELFUTILS_0.138): Likewise.
312
3132020-08-25  Mark Wielaard  <[email protected]>
314
315	* dwarf_getlocation.c (check_constant_offset): Rename to...
316	(is_constant_offset): .. this.
317
3182020-06-28  Mark Wielaard  <[email protected]>
319
320	* linux-kernel-modules.c (intuit_kernel_bounds): Check read_address
321	returns an increasing address when searching for end.
322
3232020-06-16  Mark Wielaard  <[email protected]>
324
325	* cfi.c (execute_cfi): Add missing FALLTHROUGH.
326
3272020-05-08  Mark Wielaard  <[email protected]>
328
329	* libdw_visit_scopes.c (walk_children): Don't recurse into imported
330	DW_TAG_compile_units.
331
3322020-05-08  Mark Wielaard  <[email protected]>
333
334	* dwarf_decl_file.c (dwarf_decl_file): Use attr CU instead of DIE
335	CU to resolve file name.
336	* dwarf_ranges.c(dwarf_ranges): Document which CU we use when.
337	* libdw.h (dwarf_attr_integrate): Extend documentation.
338
3392020-04-25  Mark Wielaard  <[email protected]>
340
341	* libdw_alloc.c (__libdw_alloc_tail): Call Dwarf oom_handler()
342	when malloc fails.
343
3442020-04-17  Mark Wielaard  <[email protected]>
345
346	* dwarf_begin_elf.c (check_section): Handle .gnu.debuglto_ prefix.
347
3482019-10-28  Aaron Merey  <[email protected]>
349
350	* Makefile.am (libdw_so_LDLIBS): Add -ldl for libdebuginfod.so dlopen.
351
3522019-11-10  Mark Wielaard  <[email protected]>
353
354	* libdwP.h (libdw_unalloc): New define.
355	(libdw_typed_unalloc): Likewise.
356	(__libdw_thread_tail): New function declaration.
357	* libdw_alloc.c (__libdw_thread_tail): New function.
358	* dwarf_getabbrev.c (__libdw_getabbrev): Call libdw_typed_unalloc
359	when reading invalid data or when hash collission detected.
360
3612019-10-28  Jonathon Anderson  <[email protected]>
362
363	* libdw_alloc.c: Added __libdw_alloc_tail.
364	(__libdw_allocate): Switch to use the mem_tails array.
365	* libdwP.h (Dwarf): Likewise.
366	* dwarf_begin_elf.c (dwarf_begin_elf): Support for above.
367	* dwarf_end.c (dwarf_end): Likewise.
368	* atomics.h: Add support for thread_local.
369
3702019-10-28  Mark Wielaard  <[email protected]>
371
372	* dwarf_sig8_hash.h: Include libdw.h. Remove COMPARE. Include
373	dynamicsizehash_concurrent.h.
374	* dwarf_sig8_hash.c: Include dynamicsizehash_concurrent.c.
375	* dwarf_formref_die.c (dwarf_formref_die): Drop NULL argument to
376	Dwarf_Sig8_Hash_find.
377
3782019-08-26  Srđan Milaković  <[email protected]@rice.edu>
379
380	* dwarf_abbrev_hash.{c,h}: Use the *_concurrent hash table.
381
3822019-11-01  Jonathon Anderson  <[email protected]>
383
384	* dwarf_begin_elf.c (valid_p): Switch calloc for malloc for fake CUs.
385	Add explicit initialization of some fields.
386	* dwarf_end.c (cu_free): Add clause to limit freeing of CU internals.
387
3882019-08-26  Jonathon Anderson  <[email protected]>
389
390	* libdw_alloc.c (__libdw_allocate): Added thread-safe stack allocator.
391	* libdwP.h (Dwarf): Likewise.
392	* dwarf_begin_elf.c (dwarf_begin_elf): Support for above.
393	* dwarf_end.c (dwarf_end): Likewise.
394	* Makefile.am: Use -pthread to provide rwlocks.
395
3962019-07-05  Omar Sandoval  <[email protected]>
397
398	* Makefile.am (libdw_so_LIBS): Replace libebl.a with libebl_pic.a.
399	Move libebl_pic.a to the beginning so that libdw symbols are resolved.
400	(libdw_so_LDLIBS): Remove -ldl.
401	(libdw.so): Remove -rpath.
402	(libdw_a_LIBADD): Add libebl, libebl_backends, and libcpu objects.
403
4042019-08-25  Jonathon Anderson  <[email protected]>
405
406	* dwarf_getcfi.c (dwarf_getcfi): Set default_same_value to false.
407
4082019-08-12  Mark Wielaard  <[email protected]>
409
410	* libdw.map (ELFUTILS_0.177): Add new version of dwelf_elf_begin.
411
4122019-06-28  Mark Wielaard  <[email protected]>
413
414	* libdw.map (ELFUTILS_0.177): New section. Add
415	dwelf_elf_e_machine_string.
416
4172019-05-16  Mark Wielaard  <[email protected]>
418
419	* dwarf.h: Add DW_AT_GNU_numerator, DW_AT_GNU_denominator and
420	DW_AT_GNU_bias.
421
4222019-04-28  Mark Wielaard  <[email protected]>
423
424	* dwarf_siblingof.c (dwarf_siblingof): Don't initialize addr.
425
4262019-04-28  Mark Wielaard  <[email protected]>
427
428	* dwarf_getlocation.c (dwarf_getlocation_addr): Call
429	check_constant_offset with llbufs and listlens directly.
430
4312019-04-27  Mark Wielaard  <[email protected]>
432
433	* dwarf_getlocation.c (store_implicit_value): Check dbg isn't
434	NULL.
435
4362019-02-02  Mark Wielaard  <[email protected]>
437
438	* dwarf_nextcu.c (__libdw_next_unit): Define bytes_end.
439	Check there are enough bytes to read extended length, version
440	and unit.
441
4422019-01-20  Mark Wielaard  <[email protected]>
443
444	* dwarf_getsrclines.c (read_srclines): Check terminating NUL byte
445	for dir and file lists.
446
4472018-10-23  Mark Wielaard  <[email protected]>
448
449	* dwarf_child.c (__libdw_find_attr): Initialize readp to NULL.
450	* dwarf_getattrs.c (dwarf_getattrs): Initialize die_addr to NULL.
451
4522018-10-20  Mark Wielaard  <[email protected]>
453
454	* libdw.map (ELFUTILS_0.175): New section. Add dwelf_elf_begin.
455
4562018-10-29  Milian Wolff  <[email protected]>
457
458	* dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type != SHT_NOBITS.
459
4602018-09-13  Mark Wielaard  <[email protected]>
461
462	* dwarf_begin_elf.c (check_section): Drop ehdr argument, add and
463	use shstrndx argument.
464	(global_read): Likewise.
465	(scngrp_read): Likewise.
466	(dwarf_begin_elf): Call elf_getshdrstrndx. Pass shstrndx to
467	global_read or scngrp_read.
468
4692018-08-18  Mark Wielaard  <[email protected]>
470
471	* dwarf_getabbrev.c (__libdw_getabbrev): Continue until both name
472	and form are zero.
473	* dwarf_hasattr.c (dwarf_hasattr): Stop when both name and form
474	are zero.
475
4762018-08-18  Mark Wielaard  <[email protected]>
477
478	* dwarf_getaranges.c (dwarf_getaranges.c): Make sure there is enough
479	data to read the address and segment size.
480
4812018-07-04  Ross Burton <[email protected]>
482
483	* libdw_alloc.c: Remove error.h include.
484
4852018-06-28  Mark Wielaard  <[email protected]>
486
487	* dwarf_next_cfi.c (dwarf_next_cfi): Check whether length is zero.
488
4892018-06-27  Mark Wielaard  <[email protected]>
490
491	* dwarf_begin_elf.c (check_section): Allow a single .debug_frame
492	section.
493
4942018-06-26  Mark Wielaard  <[email protected]>
495
496	* libdw.h (dwarf_getscn_info): Remove.
497	* libdw.map (ELFUTILS_0.122): Remove dwarf_getscn_info.
498
4992018-06-25  Mark Wielaard  <[email protected]>
500
501	* Makefile.am (libdw_a_SOURCES): Add dwarf_next_lines.c.
502	* libdw.h (dwarf_next_lines): New function declaration.
503	* libdw.map (ELFUTILS_0.173): New section.
504	* dwarf_next_lines.c: New files.
505	* dwarf_begin_elf.c (check_section): Don't error out when elf
506	decompression fails.
507	(valid_p): Allow just a single .debug_line section.
508	* dwarf_getsrclines.c (read_srclines): Keep files relative if comp_dir
509	is missing.
510
5112018-06-22  Mark Wielaard  <[email protected]>
512
513	* dwarf_nextcu.c (__libdw_next_unit): Set next_off to -1 when it would
514	wrap around.
515
5162018-06-18  Mark Wielaard  <[email protected]>
517
518	* dwarf_aggregate_size.c (array_size): New depth argument. Use
519	aggregate_size instead of dwarf_aggregate_size and pass depth.
520	(aggregate_size): New depth argument. Check depth isn't bigger
521	than MAX_DEPTH (256). Pass depth to recursive calls.
522	(dwarf_aggregate_size): ass zero as depth to aggregate_size.
523
5242018-06-18  Mark Wielaard  <[email protected]>
525
526	* dwarf_peel_type.c (dwarf_peel_type): Limit modifier chain to 64.
527
5282018-06-18  Mark Wielaard  <[email protected]>
529
530	* dwarf_aggregate_size.c (aggregate_size): Check die is not NULL.
531
5322018-06-17  Luiz Angelo Daros de Luca  <[email protected]>
533
534	* dwarf_getsrclines.c (read_srclines): Intialize filelist early.
535
5362018-06-15  Mark Wielaard  <[email protected]>
537
538	* dwarf_getlocation.c (check_constant_offset): Clarify DW_FORM_data16
539	isn't really a constant.
540	(dwarf_getlocation): Don't handle DW_FORM_data16 as block.
541	(dwarf_getlocation_addr): Likewise.
542	(dwarf_getlocations): Likewise.
543
5442018-06-12  Mark Wielaard  <[email protected]>
545
546	* memory-access.h (read_3ubyte_unaligned_inc): New define.
547
5482018-06-12  Mark Wielaard  <[email protected]>
549
550	* libdw.h (__libdw_dieabbrev): Set die->abbrev to DWARF_END_ABBREV
551	on failure.
552
5532018-06-10  Mark Wielaard  <[email protected]>
554
555	* dwarf_attr_integrate.c (dwarf_attr_integrate): Stop after 16 DIE
556	ref chains.
557	* dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
558
5592018-06-08  Mark Wielaard  <[email protected]>
560
561	* dwarf_getabbrev.c (dwarf_getabbrev): Check die and offset.
562
5632018-06-08  Mark Wielaard  <[email protected]>
564
565	* dwarf_get_units.c (dwarf_get_units): Handle existing error, no
566	dwarf.
567
5682018-06-08  Mark Wielaard  <[email protected]>
569
570	* dwarf_getlocation.c (store_implicit_value): Return error when
571	seeing bad DWARF or when tsearch runs out of memory.
572	(__libdw_intern_expression): Report error when store_implicit_value
573	reported an error.
574
5752018-06-08  Mark Wielaard  <[email protected]>
576
577	* dwarf_getsrclines.c (read_srclines): Sanity check ndirs and nfiles.
578
5792018-06-08  Mark Wielaard  <[email protected]>
580
581	* dwarf_getlocation_attr.c (addr_valp): Set error and return NULL
582	when there is no .debug_addr section.
583	(dwarf_getlocation_attr): If addr_valp returns NULL, then return -1.
584
5852018-06-07  Mark Wielaard  <[email protected]>
586
587	* libdw_findcu.c (__libdw_intern_next_unit): Report DWARF_E_VERSION,
588	not DWARF_E_INVALID_DWARF on unknown version. Set address_size and
589	offset_size to 8 when unknown.
590
5912018-06-06  Mark Wielaard  <[email protected]>
592
593	* libdwP.h (__libdw_dieabbrev): Check DIE addr falls in cu.
594
5952018-06-06  Mark Wielaard  <[email protected]>
596
597	* dwarf_getlocation_die.c (dwarf_getlocation_die): Check offset
598	falls inside cu data.
599
6002018-06-05  Mark Wielaard  <[email protected]>
601
602	* dwarf_getsrclines.c (read_srclines): Explicitly set diridx to -1
603	in case dwarf_formudata fails.
604
6052018-06-05  Mark Wielaard  <[email protected]>
606
607	* dwarf_getaranges (dwarf_getaranges): Free new_arange if
608	__libdw_findcu fails.
609
6102018-06-05  Mark Wielaard  <[email protected]>
611
612	* dwarf_getsrclines.c (read_srclines): Define dirarray early and
613	check whether or not it is equal to dirstack on exit/out before
614	cleanup.
615
6162018-06-05  Mark Wielaard  <[email protected]>
617
618	* dwarf_getalt.c (find_debug_altlink): id_path array should be 2
619	larger to contain MAX_BUILD_ID_BYTES.
620
6212018-05-31  Mark Wielaard  <[email protected]>
622
623	* libdw_find_split_unit.c (try_split_file): New function extracted
624	from...
625	(__libdw_find_split_unit): ... here. Try both the relative and
626	absolute paths to find a .dwo file.
627
6282018-05-30  Mark Wielaard  <[email protected]>
629
630	* libdw/dwarf_getsrclines.c (read_srclines): Change ndir and
631	ndirlist to size_t. Add check to see ndirlist doesn't overflow.
632
6332018-05-31  Mark Wielaard  <[email protected]>
634
635	* dwarf_dieoffset.c: Check die->cu != NULL. Return -1, not ~0ul
636	on failure.
637
6382018-05-29  Mark Wielaard  <[email protected]>
639
640	* dwarf_cuoffset.c (dwarf_cuoffset): Check die->cu is not NULL.
641	* dwarf_die_addr_die.c (dwarf_die_addr_die): Also search split
642	Dwarfs.
643	* libdwP.h (struct Dwarf): Add split_tree field.
644	(__libdw_find_split_dbg_addr): New internal function definition.
645	(__libdw_finddbg_cb): Likewise.
646	* libdw_find_split_unit.c (__libdw_find_split_unit): Insert split
647	Dwarf into skeleton dbg split_tree.
648	* libdw_findcu.c (__libdw_finddbg_cb): New function.
649	(__libdw_find_split_dbg_addr): Likewise.
650	* dwarf_end (dwarf_end): Destroy split_tree.
651
6522018-05-29  Mark Wielaard  <[email protected]>
653
654	* dwarf.h: Add GNU DebugFission list entry encodings
655	DW_LLE_GNU_end_of_list_entry,
656	DW_LLE_GNU_base_address_selection_entry,
657	DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry.
658	* dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle
659	GNU DebugFission list entries.
660
6612018-05-28  Mark Wielaard  <[email protected]>
662
663	* libdw_find_split_unit.c (__libdw_find_split_unit): End split_dwarf
664	only after we tried every unit id in it.
665
6662018-04-07  Mark Wielaard  <[email protected]>
667
668	* libdwP.h (struct Dwarf_CU): Add locs_base.
669	(__libdw_cu_locs_base): New static inline function.
670	* libdw_findcu.c (__libdw_intern_next_unit): Initialize locs_base.
671	* dwarf_begin_elf.c (valid_p): Create fake_loclists_cu if necessary.
672	* dwarf_end.c (dwarf_end): Clean up fake_loclists_cu.
673	* dwarf_getlocation.c (initial_offset): Handle .debug_loclists.
674	(getlocations_addr): Likewise.
675	(dwarf_getlocation_addr): Likewise.
676	* dwarf_getlocation_attr.c (attr_form_cu): Use fake_loclists_cu for
677	DWARF5.
678	(initial_offset): Handle DW_FORM_loclistx.
679	* dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle
680	.debug_loclists.
681	* libdwP.h (struct Dwarf): Add fake_loclists_cu.
682
6832018-04-12  Mark Wielaard  <[email protected]>
684
685	* dwarf.h: Add DWARF5 location list entry DW_LLE encodings.
686	* begin_elf.c (dwarf_scnnames): Add IDX_debug_loclists.
687	* dwarf_error.c (errmsgs): Remove DWARF_E_NO_LOCLIST. And replace
688	with DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and
689	DWARF_E_NO_LOC_VALUE.
690	* dwarf_formudata.c (dwarf_formudata): Handle DW_AT_loclists_base
691	and DW_FORM_loclistx.
692	* dwarf_getlocation.c (attr_ok): Use DWARF_E_NO_LOC_VALUE.
693	(initial_offset): Use DWARF_E_NO_DEBUG_LOC.
694	* libdwP.h: Add IDX_debug_rnglists. Remove DWARF_E_NO_LOCLIST.
695	Add DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and
696	DWARF_E_NO_LOC_VALUE.
697
6982018-05-25  Mark Wielaard  <[email protected]>
699
700	* libdw_find_split_unit.c (__libdw_find_split_unit): Extract linking
701	skeleton and split compile units code into...
702	* libdwP (__libdw_link_skel_split): ...this new function.
703
7042018-04-06  Mark Wielaard  <[email protected]>
705
706	* dwarf_formaddr.c (__libdw_addrx): New function, extracted from...
707	(dwarf_formaddr): here. Use __libdw_addrx.
708	* dwarf_getlocation.c (getlocations_addr): Pass cu to
709	__libdw_read_begin_end_pair_inc.
710	* dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Take cu as
711	argument. Handle .debug_rnglists.
712	(initial_offset): Handle .debug_rnglists and DW_FORM_rnglistx.
713	(dwarf_ranges): Likewise. Check cu isn't NULL before use. Pass cu to
714	__libdw_read_begin_end_pair_inc.
715	* libdwP.h (__libdw_read_begin_end_pair_inc): Take cu as argument.
716	(__libdw_cu_ranges_base): Handle DW_AT_rnglists_base.
717	(__libdw_addrx): New function definition.
718
7192018-04-11  Mark Wielaard  <[email protected]>
720
721	* dwarf.h: Add DWARF5 range list entry DW_RLE encodings.
722	* begin_elf.c (dwarf_scnnames): Add IDX_debug_rnglists.
723	* dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_RNGLISTS.
724	* dwarf_formudata.c (dwarf_formudata): Handle DW_AT_rnglists_base
725	and DW_FORM_rnglistx.
726	* dwarf_getscopes.c (pc_match): Also check for
727	DWARF_E_NO_DEBUG_RNGLISTS.
728	* libdwP.h: Add IDX_debug_rnglists.
729
7302018-05-25  Mark Wielaard  <[email protected]>
731
732	* dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to
733	uintptr_t before returning as pointer.
734
7352018-05-22  Mark Wielaard  <[email protected]>
736
737	* dwarf_getlocation.c (__libdw_cu_base_address): Treat errors of
738	getting lowpc or entrypc the same as missing base address (zero).
739	* dwarf_highpc (dwarf_highpc): Handle any address form. Always set
740	error when attribute could not be found.
741
7422018-05-21  Mark Wielaard  <[email protected]>
743
744	* dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result.
745	* dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split
746	dwarf if shared with skeleton.
747	(dwarf_end): release fake_addr_cu.
748	* dwarf_formaddr.c (__libdw_cu_addr_base): Move to...
749	* libdwP.h (__libdw_cu_addr_base): ... here.
750	(struct Dwarf): Add fake_addr_cu field.
751	* dwarf_formudata.c (dwarf_formudata): Handle
752	DW_FORM_GNU_addr_index and DW_FORM_addrx[1234].
753	* dwarf_getlocation_attr.c (addr_valp): New static function.
754	(dwarf_getlocation_attr): Create attribute for values of
755	DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and
756	DW_OP_addrx.
757	* libdw_find_split_unit.c (__libdw_find_split_unit): Connect
758	IDX_debug_addr sectiondata and fake_addr_cu between split and
759	skeleton.
760
7612018-05-20  Mark Wielaard  <[email protected]>
762
763	* dwarf_cu_info.c: New file.
764	* Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c.
765	* libdw.h (dwarf_cu_info): New function declaration.
766	* libdw.map (ELFUTILS_0.171): Add dwarf_cu_info.
767
7682018-05-24  Mark Wielaard  <[email protected]>
769
770	* dwarf_ranges.c (dwarf_ranges): Check for NULL cu.
771	* libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base.
772
7732018-05-18  Mark Wielaard  <[email protected]>
774
775	* dwarf_formudata.c (__libdw_formptr): Handle the special case
776	of IDX_debug_ranges for DW_UT_split_compile with version < 5.
777	* dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for
778	split compile cudie.
779	* dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie.
780	* dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for
781	split compile units.
782	* libdwP.h (struct Dwarf_CU): Add ranges_base field.
783	(__libdw_cu_ranges_base): New static inline function.
784
7852018-05-18  Mark Wielaard  <[email protected]>
786
787	* libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL.
788	* dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by
789	taking the line table from the skeleton.
790	* dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by
791	only taking the files from .debug_line offset zero (if it exists),
792	otherwise fall back to the skeleton.
793
7942018-05-17  Mark Wielaard  <[email protected]>
795
796	* dwarf_begin_elf.c (__libdw_debugdir): New function.
797	(valid_p): Call __libdw_debugdir.
798	* dwarf_end.c (dwarf_end.c): Free debugdir.
799	* dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic.
800	take debugdir as argument instead of fd.
801	(find_debug_altlink): Call __libdw_filepath with debugdir.
802	* libdwP.h (struct Dwarf): Add debugdir field.
803	(__libdw_debugdir): New function prototype.
804	(__libdw_filepath): Adjust prototype to take a const char * instead of
805	an int.
806	* libdw_find_split_unit.c (__libdw_find_split_unit): Call
807	__libdw_filepath with debugdir.
808
8092018-05-17  Mark Wielaard  <[email protected]>
810
811	* dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile
812	unit DIE, search skeleton_compile unit DIE.
813	* dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise.
814	* libdwP.h (is_cudie): Check cu is not NULL.
815
8162018-05-19  Mark Wielaard  <[email protected]>
817
818	* libdwP.h (__libdw_find_split_unit): Mark as internal_function.
819
8202018-05-15  Mark Wielaard  <[email protected]>
821
822	* Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c.
823	* dwarf_end.c (cu_free): Free split Dwarf.
824	* dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by
825	calling __libdw_find_split_unit.
826	* libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field.
827	(__libdw_find_split_unit): New function prototype.
828	(str_offsets_base_off): Use cu Dwarf if dbg is NULL.
829	(filepath): Rename to ...
830	(__libdw_filepath): This. Which is the actual function name in
831	dwarf_getalt.c.
832	(libdw_find_split_unit.c): New file.
833	* libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1.
834
8352018-05-15  Mark Wielaard  <[email protected]>
836
837	* libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out
838	asserts.
839	* libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if
840	the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to
841	DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has
842	child DIEs and a DW_AT_GNU_dwo_name attribute.
843
8442018-05-14  Mark Wielaard  <[email protected]>
845
846	* dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name,
847	DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base,
848	DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index,
849	DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index.
850	* dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index
851	as DW_FORM_addrx.
852	(__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and
853	DW_AT_addr_base.
854	* dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index
855	as DW_FORM_strx.
856	* dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base
857	as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr.
858	* dwarf_getlocation.c (__libdw_intern_expression): Handle
859	DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as
860	DW_OP_constx.
861	* libdw_form.c (__libdw_form_val_compute_len): Handle
862	DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128.
863
8642018-05-12  Mark Wielaard  <[email protected]>
865
866	* dwarf_begin_elf.c (check_section): Also recognize .dwo section
867	name variants.
868
8692018-05-11  Mark Wielaard  <[email protected]>
870
871	* dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr.
872	* dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup,
873	DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and
874	DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with
875	DW_AT_macros. Use libdw_valid_user_form.
876
8772018-05-09  Mark Wielaard  <[email protected]>
878
879	* dwarf_formstring.c (__libdw_cu_str_off_base): Moved to...
880	* libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline.
881	(str_offsets_base_off): New internal function that also parses
882	.debug_str_offsets header if necessary.
883
8842018-05-11  Mark Wielaard  <[email protected]>
885
886	* dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is
887	known the Dwarf_Die is came from is valid.
888	* libdwP.h (__libdw_dieabbrev): Check cu is not NULL.
889
8902018-05-08  Mark Wielaard  <[email protected]>
891
892	* dwarf_formref.c (__libdw_formref): Explicitly don't handle
893	DW_FORM_ref_sup4 and DW_FORM_ref_sup8.
894	* dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4
895	and DW_FORM_ref_sup8.
896	* dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup
897	as DW_FORM_GNU_strp_alt.
898
8992018-05-05  Mark Wielaard  <[email protected]>
900
901	* dwarf.h: Add DWARF line content descriptions.
902	* libdwP.h (libdw_valid_user_form): New static function.
903	* dwarf_getsrclines.c (read_srclines): Check and parse version 5
904	DWARF header, dir and file tables separately from older versions
905	where different.
906
9072018-04-24  Mark Wielaard  <[email protected]>
908
909	* dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str".
910	* dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and
911	DWARF_E_NO_DEBUG_LINE_STR.
912	* dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp.
913	Get data from either .debug_str or .debug_line_str.
914	* libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and
915	DWARF_E_NO_DEBUG_LINE_STR.
916
9172018-04-03  Mark Wielaard  <[email protected]>
918
919	* dwarf_formudata.c (__libdw_formptr): Take and return const
920	unsigned char pointers.
921	* dwarf_getlocation.c (attr_base_address): Rename to...
922	(__libdw_cu_base_address): this. Take Dwarf_CU, check and set
923	base_address.
924	(initial_offset_base): Renamed to...
925	(initial_offset): this. Only provide offset.
926	(getlocations_addr): Move data size check and
927	address base addition into __libdw_read_begin_end_pair_inc. Use
928	__libdw_cu_base_address and initial_offset. Drop Elf_Data NULL
929	check (already done by initial_offset, through __libdw_formptr).
930	(dwarf_getlocations): Use __libdw_cu_base_address and initial_offset.
931	Drop Elf_Data NULL check.
932	* dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument
933	type of readp to Add readend argument. Check data size. Include base
934	in begin and end result.
935	(initial_offset): New static function.
936	(dwarf_ranges): Don't check Elf_Data being NULL (already done by
937	initial_offset, through __libdw_formptr). Use __libdw_cu_base_address
938	and initial_offset. Remove base check and addition (already done by
939	__libdw_read_begin_end_pair_inc.
940	* libdwP.h (Dwarf_CU): Add base_address field.
941	(__libdw_read_begin_end_pair_inc): Change argument type of readp to
942	const. Add readend argument.
943	(__libdw_formptr): Take and return const unsigned char pointers.
944	* libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
945	base_address.
946
9472018-04-04  Mark Wielaard  <[email protected]>
948
949	* libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
950	addr_base and str_off_base.
951
9522018-03-23  Mark Wielaard  <[email protected]>
953
954	* dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets,
955	increase size.
956	* dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS.
957	* dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234].
958	(__libdw_cu_str_off_base): New function.
959	* dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets
960	as stroffsetsptr.
961	* libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS.
962	(struct Dwarf_CU): Add str_off_base field.
963	(__libdw_cu_str_off_base): New function declaration.
964
9652018-03-22  Mark Wielaard  <[email protected]>
966
967	* dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr.
968	* dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR.
969	* dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234].
970	(__libdw_cu_addr_base): New function.
971	* dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as
972	addrptr.
973	* libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR.
974	(struct Dwarf_CU): Add addr_base field.
975	(__libdw_cu_addr_base): New function definition.
976	* memory-access.h (file_byte_order): New static function.
977	(read_3ubyte_unaligned): New inline function.
978
9792018-03-29  Mark Wielaard  <[email protected]>
980
981	* libdw.h (dwarf_decl_file): Extend documentation.
982	(dwarf_linesrc): Likewise.
983	(dwarf_filesrc): Likewise.
984
9852018-03-06  Mark Wielaard  <[email protected]>
986
987	* dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx,
988	DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type,
989	DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and
990	DW_OP_reinterpret.
991	* dwarf_getlocation.c (__libdw_intern_expression): Handle
992	DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx,
993	DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer,
994	DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type.
995	* dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle
996	DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer.
997	* dwarf_getlocation_die.c (dwarf_getlocation_die): Handle
998	DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret,
999	DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and
1000	DW_OP_xderef_type.
1001	* dwarf_getlocation_implicit_pointer.c
1002	(dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer.
1003
10042018-03-01  Mark Wielaard  <[email protected]>
1005
1006	* dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view.
1007	* dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews
1008	as a loclistptr.
1009
10102018-02-09  Mark Wielaard  <[email protected]>
1011
1012	* dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
1013	16 byte block.
1014
10152018-02-09  Mark Wielaard  <[email protected]>
1016
1017	* dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const.
1018	* dwarf_formsdata.c (dwarf_formsdata): Likewise.
1019	* dwarf_formudata.c (dwarf_formudata): Likewise.
1020	* dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
1021	* dwarf_getattrs.c (dwarf_getattrs): Likewise.
1022	* dwarf_hasattr.c (dwarf_hasattr): Likewise.
1023	* dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function
1024	that will also return any data associated with the abbrev. Which
1025	currently is only for DW_FORM_implicit_const. Based on...
1026	(dwarf_getabbrevattr): ... this function. Which now just calls
1027	dwarf_getabbrevattr_data.
1028	* libdw.h (dwarf_getabbrevattr_data): Declare new function.
1029	* libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data.
1030	* libdwP.h (dwarf_getabbrevattr_data): INTDECL.
1031	* memory-access.h (__libdw_get_sleb128_unchecked): New inlined
1032	function based on __libdw_get_uleb128_unchecked.
1033
10342018-02-08  Mark Wielaard  <[email protected]>
1035
1036	* dwarf.h: Add DWARF5 DW_FORMs.
1037	* libdwP.h (__libdw_form_val_compute_len): Handle fix length
1038	DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234],
1039	DW_FORM_ref_sup[48] and DW_FORM_data16.
1040	* libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup
1041	and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx,
1042	DW_FORM_loclistx and DW_FORM_rnglistx are uleb128.
1043
10442018-01-30  Mark Wielaard  <[email protected]>
1045
1046	* Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c.
1047	* dwarf_get_units.c: New file.
1048	* libdw.h (dwarf_get_units): New function declaration.
1049	* libdw.map (ELFUTILS_0.170): Add dwarf_get_units.
1050
10512018-01-29  Mark Wielaard  <[email protected]>
1052
1053	* dwarf.h (DW_UT_*): Add DWARF Unit Header Types.
1054	* dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep
1055	is now called unit_idp. type_offsetp is now called subdie_offsetp.
1056	* dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info
1057	and .debug_types sections for type units when type signature ref
1058	not found.
1059	* dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and
1060	__libdw_first_die_off_from_cu instead of trying by hand.
1061	* dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU
1062	instead of checking type_offset by hand.
1063	* dwarf_getlocation_implicit_pointer.c
1064	(dwarf_getlocation_implicit_pointer): Likewise.
1065	* dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit.
1066	(__libdw_next_unit): New function based on dwarf_next_unit with
1067	DWARF5 header support.
1068	* libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset
1069	and type_sig8 to unit_id8.
1070	(ISV4TU): New macro to determine whether a CU is a version 4 type
1071	unit (which comes from the .debug_types section).
1072	(DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function...
1073	(__libdw_first_die_from_cu_start): ... that also handles DWARF5
1074	unit headers.
1075	(__libdw_first_die_off_from_cu): New function that calls the above
1076	using the CU fields.
1077	(CUDIE): Use __libdw_first_die_off_from_cu.
1078	(SUBDIE): New macro that provides the DIE for a CU using the
1079	subdie_offset.
1080	(__libdw_next_unit): New internal function declaration.
1081	* libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit.
1082	Accept DWARF version 5 headers. Setup unit_type.
1083	(__libdw_findcu): Rename debug_types argument to v4_debug_types
1084	argument (to indicate that we are looking in the .debug_types
1085	section). Support finding the exact offset (unit header start).
1086
10872018-01-25  Mark Wielaard  <[email protected]>
1088
1089	* Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c.
1090	* dwarf_die_addr_die.c: New file.
1091	* libdw.h (dwarf_die_addr_die): New function declaration.
1092	* libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die.
1093	* libdwP.h (__libdw_findcu_addr): New internal function declaration.
1094	* libdw_findcu.c (__libdw_findcu_addr): New internal function.
1095
10962018-02-09  Joshua Watt  <[email protected]>
1097
1098	* cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
1099	* dwarf_frame_register.c (dwarf_frame_register): Likewise.
1100
11012018-01-22  Mark Wielaard  <[email protected]>
1102
1103	* Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
1104	* dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1.
1105	* dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf
1106	and alt_fd if we allocated them.
1107	* dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt.
1108	* dwarf_formstring.c (dwarf_formstring): Likewise.
1109	* dwarf_getalt.c (__libdw_filepath): New internal function.
1110	(find_debug_altlink): New static function.
1111	(dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink.
1112	Cache result.
1113	* dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd
1114	if we allocated.
1115	* libdw.h (dwarf_getalt): Extend documentation.
1116	(dwarf_setalt): Likewise.
1117	* libdwP.h (struct Dwarf): Add alt_fd field.
1118	(filepath): Declare new internal function.
1119
11202018-01-14  Petr Machata  <[email protected]>
1121
1122	* dwarf_formsdata.c (dwarf_formsdata):
1123	<DW_FORM_data1>: Cast to signed char.
1124	<DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
1125	read_*ubyte_unaligned.
1126
11272017-12-26  Mark Wielaard  <[email protected]>
1128
1129	* libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt,
1130	use bitfields for has_children and code.
1131	* dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs.
1132	* dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs.
1133
11342017-12-26  Mark Wielaard  <[email protected]>
1135
1136	* memory-access.h (__libdw_get_uleb128_unchecked): New function.
1137	(get_uleb128_unchecked): New define.
1138	* dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to
1139	read attr name and form.
1140	* dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
1141	* dwarf_getattrs.c (dwarf_getattrs): Likewise.
1142	* dwarf_hasattr.c (dwarf_hasattr): Likewise.
1143
11442017-12-28  Mark Wielaard  <[email protected]>
1145
1146	* dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
1147
11482017-05-09  Ulf Hermann  <[email protected]>
1149	    Mark Wielaard  <[email protected]>
1150
1151	* libdwP.h (__libdw_in_section): Fix check for the upper border of
1152	the range.
1153	(__libdw_offset_in_section): Likewise.
1154
11552017-12-20  Mark Wielaard  <[email protected]>
1156
1157	* libdwP.h (struct Dwarf_CU): Add sec_idx field.
1158	(cu_sec_idx): Return cu->sec_idx.
1159	* libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to
1160	IDX_debug_info or IDX_debug_types.
1161	* dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to
1162	IDX_debug_loc.
1163	* dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to
1164	IDX_debug_macro or IDX_debug_macinfo.
1165
11662017-12-12  Mark Wielaard  <[email protected]>
1167
1168	* dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the
1169	given DIE. Reserve memory for a new DIE first.
1170
11712017-12-11  Dima Kogan  <[email protected]>
1172
1173	* dwarf_aggregate_size.c (array_size): Handle multi-dimensional
1174	arrays properly.
1175
11762017-11-03  Mark Wielaard  <[email protected]>
1177
1178	* dwarf_getlocation.c (__libdw_intern_expression): Handle
1179	DW_OP_GNU_variable_value.
1180	* dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise.
1181	* dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise.
1182
11832017-11-03  Mark Wielaard  <[email protected]>
1184
1185	* dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
1186	Update list of acceptable attribute codes based on DWARF5.
1187
11882017-11-03  Mark Wielaard  <[email protected]>
1189
1190	* dwarf.h: Add DW_OP_GNU_variable_value.
1191
11922017-10-03  Mark Wielaard  <[email protected]>
1193
1194	* libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
1195
11962017-08-18  Ulf Hermann  <[email protected]>
1197
1198	* memory-access.h: Use attribute_packed.
1199
12002017-02-27  Ulf Hermann  <[email protected]>
1201
1202	* libdwP.h: Use attribute_hidden.
1203	* libdw_alloc.c: Likewise.
1204
12052017-02-27  Ulf Hermann  <[email protected]>
1206
1207	* Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
1208
12092017-07-26  Mark Wielaard  <[email protected]>
1210
1211	* dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
1212	* dwarf_getmacros.c (get_table_for_offset): Accept either version
1213	4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names.
1214	(read_macros): Use table version for fake_cu.
1215
12162017-07-26  Mark Wielaard  <[email protected]>
1217
1218	* dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type,
1219	DW_TAG_packed_type and DW_TAG_shared_type.
1220	* libdw.h (dwarf_peel_type): Extend documentation.
1221
12222017-07-26  Mark Wielaard  <[email protected]>
1223
1224	* dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and
1225	DW_DEFAULTED_out_of_class.
1226
12272017-07-26  Mark Wielaard  <[email protected]>
1228
1229	* dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.
1230
12312017-07-26  Mark Wielaard  <[email protected]>
1232
1233	* dwarf_default_lower_bound.c: New file.
1234	* Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c.
1235	* dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound.
1236	* dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE.
1237	* libdw.h: Add dwarf_default_lower_bound.
1238	* libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound.
1239	* libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and
1240	dwarf_default_lower_bound INTDECL.
1241
12422017-07-26  Mark Wielaard  <[email protected]>
1243
1244	* dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
1245	DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
1246	DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
1247	* dwarf_aggregate_size.c (array_size): Add lower bound for
1248	DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
1249	DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
1250	DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
1251	DW_LANG_Julia and DW_LANG_BLISS.
1252
12532017-07-26  Mark Wielaard  <[email protected]>
1254
1255	* dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
1256
12572017-07-25  Mark Wielaard  <[email protected]>
1258
1259	* dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange,
1260	DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter,
1261	DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments
1262	for currently unused numbers.
1263
12642017-07-25  Mark Wielaard  <[email protected]>
1265
1266	* dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data,
1267	DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants.
1268	(DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines.
1269
12702017-07-21  Mark Wielaard  <[email protected]>
1271
1272	* dwarf_line_file.c: New file.
1273	* Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c.
1274	* libdw.h (dwarf_line_file): New function declaration.
1275	* libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file.
1276
12772017-02-17  Ulf Hermann  <[email protected]>
1278
1279	* Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
1280	made of, libdw_so_DEPS for libraries it depends on (including
1281	libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
1282	(libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
1283	library dependencies, use libdw_so_LIBS rather than relying on the
1284	order of dependencies specified, add -z,relro.
1285
12862017-04-20  Ulf Hermann  <[email protected]>
1287
1288	* libdw.h: Remove attribute macro declarations and use
1289	__noreturn_attribute__ as defined in libelf.h.
1290
12912017-04-20  Ulf Hermann  <[email protected]>
1292
1293	* dwarf_begin_elf.c: Include endian.h.
1294
12952017-03-30  Mark Wielaard  <[email protected]>
1296
1297	* dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on
1298	result.
1299
13002016-10-22  Mark Wielaard  <[email protected]>
1301
1302	* dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define.
1303	* dwarf_aggregate_size.c (array_size): Use correct spelling of
1304	DW_LANG_PLI.
1305
13062016-11-02  Mark Wielaard  <[email protected]>
1307
1308	* cfi.c (execute_cfi): Add fallthrough comments.
1309	* encoded-value.h (encoded_value_size): Add explicit return instead
1310	of relying on fallthrough.
1311	* dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough
1312	comment.
1313
13142016-10-11  Akihiko Odaki  <[email protected]>
1315
1316	* dwarf_getpubnames.c: Remove sys/param.h include, add system.h.
1317	* libdw_alloc.c: Likewise.
1318
13192016-07-08  Mark Wielaard  <[email protected]>
1320
1321	* libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init,
1322	dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
1323	dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
1324
13252016-02-13  Mark Wielaard  <[email protected]>
1326
1327	* dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then
1328	assign to ndirlist.
1329
13302015-12-18  Mark Wielaard  <[email protected]>
1331
1332	* libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask.
1333	(__libdw_free_zdata): Remove.
1334	* dwarf_begin_elf.c (inflate_section): Remove.
1335	(check_section): Remove __libdw_free_zdata calls. Use elf_compress
1336	and elf_compress_gnu to decompress if necessary.
1337	(valid_p): Remove __libdw_free_zdata calls.
1338	(scngrp_read): Use elf_compress if section is compressed. Remove
1339	__libdw_free_zdata calls.
1340	* dwarf_end.c (__libdw_free_zdata): Remove.
1341	(dwarf_end): Don't call __libdw_free_zdata.
1342
13432015-10-28  Mark Wielaard  <[email protected]>
1344
1345	* libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size.
1346
13472015-12-02  Mark Wielaard  <[email protected]>
1348
1349	* fde.c (intern_fde): Don't leak duplicate FDEs.
1350
13512015-12-01  Mark Wielaard  <[email protected]>
1352
1353	* fde.c (intern_fde): Don't intern an fde that doesn't cover a
1354	valid code range.
1355
13562015-12-01  Mark Wielaard  <[email protected]>
1357
1358	* dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
1359
13602015-10-14  Chih-Hung Hsieh  <[email protected]>
1361
1362	* dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive
1363	functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope.
1364
13652015-10-14  Chih-Hung Hsieh  <[email protected]>
1366
1367	* libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested
1368	function 'walk_children' to file scope; inline 'recurse' at its call
1369	site.
1370
13712015-10-19  Mark Wielaard  <[email protected]>
1372
1373	* frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend
1374	if necessary.
1375
13762015-10-16  Dmitry V. Levin  <[email protected]>
1377
1378	* dwarf_getsrclines.c (read_srclines): Initialize state early.
1379
13802015-10-13  Chih-Hung Hsieh  <[email protected]>
1381
1382	* dwarf_getsrclines.c (read_srclines): Move nested functions
1383	'advance_pc' and 'add_new_line' to file scope and keep many
1384	local state variables within one structure.
1385
13862015-10-13  Chih-Hung Hsieh  <[email protected]>
1387
1388	* dwarf_getscopevar.c (dwarf_getscopevar): Move nested
1389	function 'file_matches' to file scope.
1390
13912015-10-16  Mark Wielaard  <[email protected]>
1392
1393	* Makefile.am (libdw.so): Add -lz.
1394
13952015-10-14  Chih-Hung Hsieh  <[email protected]>
1396
1397	* cfi.c (execute_cfi): Move nested functions 'enough_registers'
1398	and 'require_cfa_offset' to file scope.
1399
14002015-10-09  Josh Stone  <[email protected]>
1401
1402	* dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat
1403	and fstat.
1404
14052015-10-05  Josh Stone  <[email protected]>
1406
1407	* Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers.
1408
14092015-09-24  Jose E. Marchesi  <[email protected]>
1410
1411	* Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
1412	relocation overflows in some platforms.
1413
14142015-09-23  Mark Wielaard  <[email protected]>
1415
1416	* dwarf_error.c (__libdw_seterrno): Mark as internal_function.
1417	* dwarf_formref.c (__libdw_formref): Likewise.
1418	* libdw_findcu.c (__libdw_findcu): Likewise.
1419	* libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
1420
14212015-09-22  Mark Wielaard  <[email protected]>
1422
1423	* *.c: Remove old-style function definitions.
1424
14252015-09-15  Mark Wielaard  <[email protected]>
1426
1427	* dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
1428
14292015-09-09  Chih-Hung Hsieh  <[email protected]>
1430
1431	* dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove
1432	redundant NULL tests on parameters declared with __nonnull_attribute__.
1433	* dwarf_siblingof.c (dwarf_siblingof): Likewise.
1434	* libdw_visit_scopes.c (__libdw_visit_scopes): Likewise.
1435
14362015-09-04  Chih-Hung Hsieh  <[email protected]>
1437	    Mark Wielaard  <[email protected]>
1438
1439	* dwarf_getlocation.c (getlocations_addr): Replace K&R function
1440	definition with ansi-C definition and add const qualifier to
1441	locs argument.
1442
14432015-09-04  Chih-Hung Hsieh  <[email protected]>
1444
1445	* libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
1446	definition with ansi-C definitions.
1447	(__libdw_findcu): Likewise.
1448
14492015-08-25  Mark Wielaard  <[email protected]>
1450
1451	* dwarf.h: Add DW_LANG_Haskell.
1452
14532015-06-18  Mark Wielaard  <[email protected]>
1454
1455	* dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough
1456	to hold a Dwarf.
1457
14582015-06-18  Mark Wielaard  <[email protected]>
1459
1460	* dwarf_getpubnames.c (get_offsets): Always free mem on error.
1461
14622015-06-18  Mark Wielaard  <[email protected]>
1463
1464	* dwarf_getmacros.c (get_macinfo_table): Return NULL when
1465	dwarf_formudata reports an error.
1466	(get_table_for_offset): Likewise.
1467
14682015-06-08  Mark Wielaard  <[email protected]>
1469
1470	* dwarf_getsrclines.c (read_srclines): Initialize dirarray early.
1471
14722015-06-06  Mark Wielaard  <[email protected]>
1473
1474	* dwarf_getsrclines.c (read_srclines): Initialize filelist early.
1475
14762015-05-27  Mark Wielaard  <[email protected]>
1477
1478	* encoded-value.h (read_encoded_value): Check data d_size contains
1479	at least enough data to hold a pointer for DW_EH_PE_indirect.
1480
14812015-05-22  Mark Wielaard  <[email protected]>
1482
1483	* dwarf_getsrclines.c (read_srclines): Limit stack usage of lines
1484	with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with
1485	MAX_STACK_DIRS. Calculate number of dirs needed first, then
1486	create dirarray directly, without needing the next field. Free
1487	not stack allocated lines and files at the end.
1488
14892015-05-19  Mark Wielaard <[email protected]>
1490
1491	* dwarf_getlocation.c (__libdw_intern_expression): Create a stack
1492	allocated array to hold locs. Allocate locs bigger than the array
1493	with malloc and free them when done.
1494
14952015-05-11  Jonathan Lebon  <[email protected]>
1496
1497	* libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator.
1498	* dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message.
1499	* dwarf_begin_elf.c (inflate_section): New static function, lifted
1500	from...
1501	(check_section): ... here. Call inflate_section, set libdw errno to
1502	DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated.
1503
15042015-05-11  Jonathan Lebon  <[email protected]>
1505
1506	* dwarf_begin_elf.c (check_section): Add compressed flag. Always
1507	check for .zdebug sections. Only wrap decompression in #if USE_ZLIB.
1508
15092015-05-06  Mark Wielaard  <[email protected]>
1510
1511	* dwarf_getsrclines.c (read_srclines): Use an int64_t to store and
1512	check the line number.
1513
15142015-05-05  Mark Wielaard  <[email protected]>
1515
1516	* dwarf_getaranges.c (dwarf_getaranges): Check there is enough data
1517	left before reading values.
1518
15192015-05-04  Anthony G. Basile  <[email protected]>
1520
1521	* Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link
1522	command.
1523
15242015-04-22  Mark Wielaard  <[email protected]>
1525
1526	* memory-access.h (__libdw_max_len_leb128): Take type_len as argument.
1527	(__libdw_max_len_uleb128): New function.
1528	(__libdw_max_len_sleb128): Likewise.
1529	(__libdw_get_uleb128): Use __libdw_max_len_uleb128.
1530	(__libdw_get_sleb128): Use __libdw_max_len_sleb128.
1531
15322015-04-21  Mark Wielaard  <[email protected]>
1533
1534	* dwarf_getmacros.c (read_macros): Allocate attributes dynamically
1535	when there are more than 8.
1536
15372015-04-01  Petr Machata  <[email protected]>
1538
1539	* libdwP.h (DWARF_E_NOT_CUDIE): New enumerator.
1540	(is_cudie): New function.
1541	* dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE.
1542	* dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead
1543	of white-listing valid tags.
1544	* dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
1545
15462015-03-18  Petr Machata  <[email protected]>
1547
1548	* Makefile.am (pkginclude_HEADERS): Add known-dwarf.h.
1549	(EXTRA_DIST): Remove known-dwarf.h.
1550
15512015-02-09  Mark Wielaard  <[email protected]>
1552
1553	* dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
1554	* dwarf_aggregate_size.c (array_size): Recognize array lower bound
1555	for new Fortran language codes is 1.
1556
15572015-02-09  Mark Wielaard  <[email protected]>
1558
1559	* dwarf.h: Add DW_TAG_atomic_type.
1560	* libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
1561	* dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
1562
15632015-02-11  Josh Stone  <[email protected]>
1564
1565	* encoded-value.h (read_encoded_value): Initialize value.
1566
15672015-02-11  Petr Machata  <[email protected]>
1568
1569	* dwarf_ranges.c (dwarf_ranges): Do not bail out when neither
1570	DW_AT_entry_pc nor DW_AT_low_pc are available.  Instead remember
1571	the fact in *BASEP and bail out later if it hasn't been updated by
1572	__libdw_read_begin_end_pair_inc.
1573
15742014-12-24  Mark Wielaard  <[email protected]>
1575
1576	* dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record
1577	smaller than or equal to addr, rather than returning immediately on
1578	a match.
1579
15802015-01-07  Mark Wielaard  <[email protected]>
1581
1582	* cfi.h (struct Dwarf_CFI_s): Add search_table_len.
1583	* dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough
1584	room in the search table for all entries. Store search_table_len.
1585	(getcfi_scn_eh_frame): Likewise.
1586	* encoded-value.h (encoded_value_size): Don't abort, return zero.
1587	(__libdw_cfi_read_address_inc): Check there is enough room to read
1588	values. Pass other byte order to read functions.
1589	(read_encoded_value): Check encoded_value_size. Don't abort, but
1590	set libdw errno and report failure. Check there is enough room to
1591	read values.
1592	* fde.c (binary_search_fde): Check encoded value size. Add hdr
1593	data buf and size to dummy_cfi.
1594
15952015-01-04  Mark Wielaard  <[email protected]>
1596
1597	* dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute
1598	is after current DIE.
1599
16002015-01-04  Mark Wielaard  <[email protected]>
1601
1602	* cfi.c (enough_registers): Check reg < INT32_MAX / sizeof
1603	(dwarf_frame_register).
1604
16052015-01-02  Mark Wielaard  <[email protected]>
1606
1607	* dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check.
1608	(getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL.
1609	(getcfi_scn_eh_frame): Check d_buf is not NULL.
1610
16112015-01-02  Mark Wielaard  <[email protected]>
1612
1613	* dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not
1614	NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For
1615	DW_OP_addr if dbg is NULL then read argument directly.
1616
16172015-01-14  Jason P. Leasure <[email protected]>
1618
1619	* dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset
1620	plus cu->start.
1621
16222014-12-27  Mark Wielaard  <[email protected]>
1623
1624	* dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
1625	still falls inside CU data.
1626
16272015-01-11  Mark Wielaard  <[email protected]>
1628
1629	* dwarf_func_inline.c (dwarf_func_inline_instances): Call
1630	__libdw_visit_scopes with NULL imports.
1631	* dwarf_getfuncs.c (dwarf_getfuncs): Likewise.
1632	* dwarf_getscopes.c (pc_record): Likewise.
1633	(dwarf_getscopes): Likewise.
1634	* dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
1635	* libdwP.h (__libdw_visit_scopes): Add imports argument.
1636	* libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new
1637	function imports_contains. Push and pop imports around walk_children
1638	when processing DW_TAG_imported_unit.
1639
16402014-12-18  Ulrich Drepper  <[email protected]>
1641
1642	* Makefile.am: Suppress output of textrel_check command.
1643
16442014-12-16  Mark Wielaard  <[email protected]>
1645
1646	* dwarf_getsrclines.c (read_srclines): Check diridx is valid under
1647	DW_LNE_define_file.
1648
16492014-12-16  Mark Wielaard  <[email protected]>
1650
1651	* dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough
1652	space to read die offset.
1653
16542014-12-16  Mark Wielaard  <[email protected]>
1655
1656	* dwarf_getsrclines.c (read_srclines): Correct overflow check for
1657	unit_length.
1658
16592014-12-15  Mark Wielaard  <[email protected]>
1660
1661	* dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
1662	section data. Set error to DWARF_E_NO_ENTRY if cnt is zero.
1663	(dwarf_getpubnames): Make sure section data contains string zero
1664	terminator.
1665
16662014-12-16  Mark Wielaard  <[email protected]>
1667
1668	* memory-access.h (__libdw_get_sleb128): Unroll the first step to help
1669	the compiler optimize for the common single-byte case.
1670
16712014-12-15  Josh Stone  <[email protected]>
1672
1673	* memory-access.h (__libdw_max_len_leb128): New.
1674	(__libdw_get_uleb128): Use __libdw_max_len_leb128.
1675	(__libdw_get_sleb128): Likewise.
1676
16772014-12-14  Mark Wielaard  <[email protected]>
1678
1679	* cfi.c (execute_cfi): Add program bounds checks.
1680	* dwarf_child.c (__libdw_find_attr): Add attrp bounds checks.
1681	* dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp.
1682	* dwarf_formref.c (__libdw_formref): Add datap bounds checks.
1683	* dwarf_formsdata.c (dwarf_formsdata): Likewise.
1684	* dwarf_formudata.c (dwarf_formudata): Likewise.
1685	* dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128
1686	with end of data buf.
1687	* dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks.
1688	* dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128
1689	call gets enough data.
1690	* dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp.
1691	* dwarf_getlocation.c (store_implicit_value): Call get_uleb128
1692	with enough data.
1693	(__libdw_intern_expression): Call get_uleb128/get_sleb128 with
1694	end_data.
1695	* dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check.
1696	* dwarf_getsrclines.c (read_srclines): Bounds check linep and call
1697	get_uleb128 with lineendp.
1698	* dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call
1699	get_uleb128 with endp.
1700	* dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call
1701	get_uleb128/get_sleb128 with limit.
1702	* encoded-value.h (read_encoded_value): Assume get_uleb128 and
1703	get_sleb128 get called with enough data.
1704	* fde.c (intern_fde): Call get_uleb128 with instructions_end.
1705	* libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp.
1706	* libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with
1707	endp.
1708	* memory-access.h (__libdw_get_uleb128): Take an extra endp.
1709	Don't call get_uleb128_step if out of data.
1710	(__libdw_get_sleb128): Likewise for get_sleb128_step.
1711
17122014-12-12  Mark Wielaard  <[email protected]>
1713
1714	* libdwP.h (struct Dwarf): Add fake_loc_cu.
1715	(cu_data): Removed.
1716	(DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx.
1717	(__libdw_form_val_compute_len): Drop dbg and endp arguments.
1718	(__libdw_form_val_len): Likewise.
1719	* libdw_form.c (__libdw_form_val_compute_len): Likewise.
1720	* libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use
1721	the already found data buffer directly.
1722	* dwarf_begin_elf.c (valid_p): Setup fake_loc_cu.
1723	* dwarf_end.c (dwarf_end): Free fake_loc_cu.
1724	* dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with
1725	just cu.
1726	* dwarf_getattrs.c (dwarf_getattrs): Likewise.
1727	* dwarf_formblock.c (dwarf_formblock): Add bounds checking.
1728	* dwarf_getlocation_attr.c (attr_form_cu): New function.
1729	(dwarf_getlocation_attr): Use attr_form_cu to set result->cu.
1730	(getlocation): Handle empty blocks immediately.
1731	* dwarf_getlocation_implicit_pointer.c (empty_cu): New static var.
1732	(__libdw_empty_loc_attr): Drop cu argument, use empty_cu.
1733	(dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with
1734	one argument.
1735	* dwarf_getmacros.c (read_macros): Also setup startp and endp for
1736	fake_cu. Call __libdw_form_val_len with just fake_cu.
1737	* dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get
1738	datap and size directly from cu startp and endp.
1739
17402014-12-11  Mark Wielaard  <[email protected]>
1741
1742	* libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset.
1743
17442014-12-13  Mark Wielaard  <[email protected]>
1745
1746	* dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr
1747	difference doesn't wrap around before returning as int.
1748
17492014-12-11  Josh Stone  <[email protected]>
1750
1751	* dwarf_getsrclines.c (struct linelist): Add sequence.
1752	(compare_lines): Take linelists, and break ties by sequence.
1753	(read_srclines): Use linelists for sorting.
1754	(read_srclines::add_new_line): Set sequence.
1755
17562014-12-10  Josh Stone  <[email protected]>
1757
1758	* libdwP.h (Dwarf_CU): Add startp and endp boundaries.
1759	* libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
1760	* dwarf_child.c (dwarf_child): Use cu->endp.
1761	* dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
1762	* dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
1763	* dwarf_siblingof.c (dwarf_siblingof): Use both.
1764
17652014-12-10  Josh Stone  <[email protected]>
1766
1767	* dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence.
1768
17692014-12-10  Josh Stone  <[email protected]>
1770
1771	* libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
1772	* dwarf_child.c (__libdw_find_attr, dwarf_child): Use it.
1773	* dwarf_getattrs.c (dwarf_getattrs): Likewise.
1774	* dwarf_haschildren.c (dwarf_haschildren): Likewise.
1775	* dwarf_tag.c (dwarf_tag): Likewise.
1776
17772014-12-04  Mark Wielaard  <[email protected]>
1778
1779	* libdwP.h (__libdw_form_val_compute_len): Add endp argument.
1780	(__libdw_form_val_len): Likewise and check len doesn't overflow.
1781	* libdw_form.c (__libdw_form_val_compute_len): Likewise.
1782	* dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len
1783	with endp.
1784	* dwarf_getattrs.c (dwarf_getattrs): Likewise.
1785	* dwarf_getmacros.c (read_macros): Likewise and check for errors.
1786
17872014-12-02  Petr Machata  <[email protected]>
1788
1789	* dwarf_getmacros.c (token_from_offset, offset_from_token): New
1790	helper functions.
1791	(do_dwarf_getmacros_die): Merge into dwarf_getmacros.
1792	* libdw.h (DWARF_GETMACROS_START): New macro.
1793
17942014-11-27  Mark Wielaard  <[email protected]>
1795
1796	* Makefile.am (libdw.so): Use textrel_check.
1797
17982014-11-27  Mark Wielaard  <[email protected]>
1799
1800	* dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize
1801	search_table_entries and search_table_encoding.
1802
18032014-11-24  Mark Wielaard  <[email protected]>
1804
1805	* dwarf_getsrclines.c (read_srclines): Check line_range is not zero
1806	before usage.
1807
18082014-11-23  Mark Wielaard  <[email protected]>
1809
1810	* dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value.
1811	* dwarf_hasattr.c (dwarf_hasattr): Likewise.
1812	* dwarf_siblingof.c (dwarf_siblingof): Likewise.
1813
18142014-11-23  Mark Wielaard  <[email protected]>
1815
1816	* dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF.
1817	Set libdw errno and return NULL.
1818
18192014-11-24  Mark Wielaard  <[email protected]>
1820
1821	* dwarf.h (DW_LANG_C_plus_plus_11): Added.
1822	(DW_LANG_C11): Likewise.
1823	(DW_LANG_C_plus_plus_14): Likewise.
1824	* dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11,
1825	DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go
1826	lower bound.
1827	* dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for
1828	DW_LANG_C11.
1829
18302014-11-26  Mark Wielaard  <[email protected]>
1831
1832	* dwarf.h (DW_AT_noreturn): Added.
1833
18342014-11-11  Mark Wielaard  <[email protected]>
1835
1836	* dwarf_getsrclines.c (read_srclines): Do address_size comparison
1837	explicitly as uint8_t.
1838	(__libdw_getsrclines): Add internal_function to declaration.
1839
18402014-09-10  Petr Machata  <[email protected]>
1841
1842	* dwarf_macro_getparamcnt.c: New file.
1843	* dwarf_macro_param.c: New file.
1844	* dwarf_macro_getsrcfiles.c: New file.
1845	* Makefile.am (libdw_a_SOURCES): Add the new files.
1846	* libdwP.h (struct files_lines_s): New structure.
1847	(DWARF_E_INVALID_OPCODE): New enumerator.
1848	(struct Dwarf): New fields macro_ops, files_lines.
1849	(Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for
1850	keeping macro opcode prototypes in.
1851	(Dwarf_Macro_s): Redefine from scratch.
1852	(__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New
1853	internal interfaces.
1854	* dwarf_error.c (errmsgs): Add a message for
1855	DWARF_E_INVALID_OPCODE.
1856	* dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and
1857	files_lines.
1858	* libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt)
1859	(dwarf_macro_getsrcfiles, dwarf_macro_param): New public
1860	interfaces.
1861	* dwarf_getmacros.c (dwarf_getmacros_off): New function,
1862	(get_offset_from, macro_op_compare, build_table)
1863	(init_macinfo_table, get_macinfo_table, get_table_for_offset)
1864	(cache_op_table, read_macros, gnu_macros_getmacros_off)
1865	(macro_info_getmacros_off, do_dwarf_getmacros_die): New helper
1866	functions.
1867	(dwarf_getmacros): Adjust to dispatch to the new interfaces.
1868	* dwarf_getsrclines.c (read_srclines): New function with guts
1869	taken from dwarf_getsrclines.
1870	(__libdw_getsrclines): Likewise.
1871	(__libdw_getcompdir, files_lines_compare): New functions.
1872	(dwarf_getsrclines): Make it dispatch to the new interfaces.
1873	* dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to
1874	the new interfaces.
1875	* dwarf_macro_param2.c (dwarf_macro_param2): Likewise.
1876	* libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off,
1877	dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param.
1878
18792014-10-06  Mark Wielaard  <[email protected]>
1880
1881	* Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c.
1882	* dwarf_aggregate_size.c (get_type): Use dwarf_peel_type.
1883	(aggregate_size): Likewise. Add old and new version.
1884	* dwarf_peel_type.c: New file.
1885	* libdw.h (dwarf_peel_type): New function declaration.
1886	* libdwP.h (dwarf_peel_type): New internal declaration.
1887	* libdw.map (ELFUTILS_0.161): New section.
1888
18892014-10-15  Petr Machata  <[email protected]>
1890
1891	* libdwP.h (struct Dwarf_Files_s.cu): Drop field.
1892	* dwarf_getsrclines.c (dwarf_getsrclines): Don't set it.
1893
18942014-10-05  Mark Wielaard  <[email protected]>
1895
1896	* dwarf.h: Add DW_AT_GNU_deleted.
1897
18982014-10-02  Mark Wielaard  <[email protected]>
1899
1900	* dwarf_aggregate_size.c (aggregate_size): Return CU address_size
1901	for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or
1902	DW_TAG_rvalue_reference_type.
1903
19042014-09-12  Petr Machata  <[email protected]>
1905
1906	* memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and
1907	8-byte quantities.  Consequently, rename to...
1908	(read_addr_unaligned_inc): ... this.
1909	(read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop.
1910	(read_sbyte_unaligned): Drop.
1911
19122014-09-10  Petr Machata  <[email protected]>
1913
1914	* dwarf_getlocation.c (attr_ok): Also accept
1915	DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
1916	DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered.
1917
19182014-08-15  Mark Wielaard  <[email protected]>
1919
1920	* dwarf_cu_die.c: New file.
1921	* Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c.
1922	* libdw.h (dwarf_cu_die): New function declaration.
1923	* libdw.map (ELFUTILS_0.160): Add dwarf_cu_die.
1924
19252014-08-15  Mark Wielaard  <[email protected]>
1926
1927	* dwarf_cu_getdwarf.c: New file.
1928	* Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c.
1929	* libdw.h (Dwarf_CU): New typedef.
1930	(dwarf_cu_getdwarf): New function declaration.
1931	* libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf.
1932
19332014-06-18  Mark Wielaard  <[email protected]>
1934
1935	* dwarf.h: Remove DW_TAG_mutable_type.
1936
19372014-05-02  Mark Wielaard  <[email protected]>
1938
1939	* libdwP.h (__check_build_id): Removed now unused.
1940
19412014-05-01  Mark Wielaard  <[email protected]>
1942
1943	* libdwP.h (struct Dwarf): Remove free_alt.
1944	* dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf.
1945	* dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt.
1946
19472014-04-30  Mark Wielaard  <[email protected]>
1948
1949	* libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id.
1950
19512014-04-15  Florian Weimer  <[email protected]>
1952
1953	* dwarf_begin_elf.c (__check_build_id, try_debugaltlink)
1954	(open_debugaltlink): Move to libdwfl.
1955	(check_section): Do not locate alternate debuginfo.
1956
19572014-04-24  Florian Weimer  <[email protected]>
1958
1959	* libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink.
1960
19612014-04-22  Florian Weimer  <[email protected]>
1962
1963	* dwarf_getalt.c, dwarf_setalt.c: New files.
1964	* Makefile.am (libdw_a_SOURCES): Add them.
1965	* libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations.
1966	* libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function
1967	declarations.
1968	* libdw.map (ELFUTILS_0.159): Export the two new functions.
1969
19702014-04-15  Florian Weimer  <[email protected]>
1971
1972	* libdwP.h (enum IDX_gnu_debugaltlink): New.
1973	* dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add
1974	.gnu_debugaltlink.
1975	(check_section): Obtain .gnu_debugaltlink section from the
1976	setiondata array.
1977
19782014-04-11  Mark Wielaard  <[email protected]>
1979
1980	* libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink.
1981	* Makefile.am (libdw.so): Depend on libdwelf_pic.a.
1982	(libdwelf_objects): New variable.
1983	(libdw_a_LIBADD): Add libdwelf objects.
1984
19852014-04-22  Mark Wielaard  <[email protected]>
1986
1987	* memory-access.h (get_sleb128_step): Remove undefined behavior
1988	of left shifting a signed value. Replace it with a multiplication.
1989
19902014-04-13  Mark Wielaard  <[email protected]>
1991
1992	* Makefile.am: Remove !MUDFLAP conditions.
1993
19942014-04-09  Mark Wielaard  <[email protected]>
1995
1996	* dwarf_begin_elf.c (check_section): Check for unsigned overflow
1997	before calling malloc to uncompress data.
1998
19992014-03-03  Jan Kratochvil  <[email protected]>
2000
2001	Fix abort() on missing section headers.
2002	* dwarf_begin_elf.c (check_section): Replace abort call by goto err.
2003	New label err to return NULL.
2004
20052014-02-05  Josh Stone  <[email protected]>
2006
2007	* dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned.
2008	* dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as
2009	unsigned.  Change the range assert to DWARF_E_INVALID_DWARF.
2010
20112013-12-30  Mark Wielaard  <[email protected]>
2012
2013	* libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and
2014	dwfl_linux_proc_attach.
2015
20162013-12-20  Mark Wielaard  <[email protected]>
2017
2018	* libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames.
2019
20202013-12-18  Mark Wielaard  <[email protected]>
2021
2022	* libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and
2023	dwfl_module_getsym_elf. Add dwfl_module_addrinfo and
2024	dwfl_module_getsym_info.
2025
20262013-12-16  Mark Wielaard  <[email protected]>
2027
2028	* libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global.
2029
20302013-12-10  Josh Stone  <[email protected]>
2031
2032	* memory-access.h (get_uleb128_rest_return): Removed.
2033	(get_sleb128_rest_return): Removed.
2034	(get_uleb128_step): Make this a self-contained block.
2035	(get_sleb128_step): Ditto, and use a bitfield to extend signs.
2036	(get_uleb128): Make this wholly implemented by __libdw_get_uleb128.
2037	(get_sleb128): Make this wholly implemented by __libdw_get_sleb128.
2038	(__libdw_get_uleb128): Simplify and inline for all callers.
2039	(__libdw_get_sleb128): Ditto.
2040	* dwarf_getlocation.c (store_implicit_value): Void the unused uleb128.
2041	* memory-access.c: Delete file.
2042	* Makefile.am (libdw_a_SOURCES): Remove it.
2043	(DEFS): Remove the now unused -DIS_LIBDW.
2044
20452013-12-09  Josh Stone  <[email protected]>
2046
2047	* libdw_form.c (__libdw_form_val_compute_len): Renamed function from
2048	__libdw_form_val_len, now handling only non-constant form lengths.
2049	* libdwP.h (__libdw_form_val_len): New inlined function.
2050
20512013-12-09  Mark Wielaard  <[email protected]>
2052
2053	* dwarf_getlocation.c (__libdw_intern_expression): Handle empty
2054	location expressions.
2055	* dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
2056	location found, return empty location expression.
2057	* dwarf_getlocation_implicit_pointer.c
2058	(dwarf_getlocation_implicit_pointer): Likewise.
2059	(__libdw_empty_loc_attr): New internal function.
2060	* libdwP.h (__libdw_empty_loc_attr): Define.
2061
20622013-11-27  Mark Wielaard  <[email protected]>
2063
2064	* libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and
2065	dwfl_module_getsym_elf.
2066
20672013-11-26  Mark Wielaard  <[email protected]>
2068
2069	* libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid,
2070	dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
2071	dwfl_thread_state_registers, dwfl_thread_state_register_pc,
2072	dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ...
2073	(ELFUTILS_0.158): ... here.
2074
20752013-11-09  Mark Wielaard  <[email protected]>
2076
2077	* dwarf_getaranges.c (dwarf_getaranges): Read segment_size and
2078	check that it is zero.
2079
20802013-11-07  Jan Kratochvil  <[email protected]>
2081
2082	* cfi.h (struct Dwarf_Frame_s): Make the comment more specific.
2083	* libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid,
2084	dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
2085	dwfl_thread_state_registers, dwfl_thread_state_register_pc,
2086	dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc.
2087
20882013-11-01  Michael Forney  <[email protected]>
2089
2090	* Makefile.am (libdwfl_objects): New definition.
2091	(libdw_a_LIBADD): Use libdwfl_objects.
2092
20932013-11-01  Michael Forney  <[email protected]>
2094
2095	* Makefile.am: Use READELF.
2096
20972013-10-30  Jan Kratochvil  <[email protected]>
2098
2099	* libdw.map (ELFUTILS_0.158): New.
2100
21012013-10-10  Mark Wielaard  <[email protected]>
2102
2103	* dwarf_getfuncs.c (struct visitor_info): Rename start_offset to
2104	start_addr and rename last_offset to last_addr. Now both void *.
2105	(tree_visitor): Use start_add and die_addr instead of start_offset
2106	and die_offset.
2107	(dwarf_getfuncs): Use last_addr instead of last_offset.
2108
21092013-10-06  Mark Wielaard  <[email protected]>
2110
2111	* cfi.c (execute_cfi): Make sure DW_CFA_expression and
2112	DW_CFA_val_expression are not used with abi_cfi.
2113
21142013-10-03  Josh Stone  <[email protected]>
2115
2116	* dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.
2117	* libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits
2118	a unit, make sure to always hash the sig8 here, so none are missed.
2119
21202013-09-29  Mark Wielaard  <[email protected]>
2121
2122	* dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
2123	uintptr_t before casting to char *.
2124	(__libdw_intern_expression): Cast data to uintptr_t before casting
2125	to Dwarf_Word.
2126	* dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
2127	op->number2 to uintptr_t before casting to char *.
2128
21292013-09-24  Josh Stone  <[email protected]>
2130
2131	* libdw_visit_scopes.c (classify_die): Removed.
2132	(may_have_scopes): New function to replace classify_die.  There's no
2133	need for full classification; just find tags that may contain scopes.
2134	(__libdw_visit_scopes): Use a direct tag comparison for imported
2135	units, and use may_have_scopes to test if recursion is needed.
2136
21372013-09-20  Mark Wielaard  <[email protected]>
2138
2139	* dwarf_getfuncs.c (visitor_info): New struct.
2140	(tree_visitor): New function.
2141	(dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor.
2142	* libdw.h (dwarf_getfuncs): Expand function documentation.
2143
21442013-09-12  Mark Wielaard  <[email protected]>
2145
2146	* fde.c (intern_fde): Free fde and set libdw errno when start
2147	or end could not be read.
2148
21492013-08-24  Mark Wielaard  <[email protected]>
2150
2151	* dwarf_getlocation.c (store_implicit_value): Don't take data
2152	as argument, get block data from op number2. Return false when
2153	block data length and op number don't match up.
2154	(__libdw_intern_expression): Store start of block for
2155	DW_OP_implicit_value and DW_OP_GNU_entry_value instead of
2156	relative data offset. Also store block start (including length)
2157	for DW_OP_GNU_const_type. Don't pass data to store_implicit_value.
2158	* dwarf_getlocation_attr.c: New file.
2159	* dwarf_getlocation_die.c: Likewise.
2160	* libdw.h (dwarf_getlocation_die): New function definition.
2161	(dwarf_getlocation_attr): Likewise.
2162	* libdwP.h: Declare internal dwarf_getlocation_die.
2163	* libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and
2164	dwarf_getlocation_attr.
2165	* Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and
2166	dwarf_getlocation_attr.c.
2167
21682013-08-23  Mark Wielaard  <[email protected]>
2169
2170	* dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment.
2171	(attr_base_address): New function.
2172	(initial_offset_base): New function.
2173	(getlocations_addr): New function. Taken from...
2174	(dwarf_getlocation_addr): here. Use new initial_offset_base and
2175	getlocations_addr.
2176	(dwarf_getlocations): New function.
2177	* libdw.h (dwarf_getlocations): New function definition.
2178	* libdw.map (ELFUTILS_0.157): New.
2179
21802013-07-02  Mark Wielaard  <[email protected]>
2181
2182	* dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation
2183	limit MAX_STACK_ALLOC.  After MAX_STACK_ALLOC lines use malloc in
2184	NEW_LINE macro.  Free malloced line records if any at the end.
2185
21862013-07-02  Mark Wielaard  <[email protected]>
2187
2188	* dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS.
2189
21902013-06-26  Mark Wielaard  <[email protected]>
2191
2192	* libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root
2193	DIEs without children. Return an error whenever dwarf_child or
2194	dwarf_siblingof return an error. Don't call recurse and increase
2195	the depth for an imported unit. Walk the children of an imported
2196	unit as if they are logical children of the parent root DIE.
2197
21982013-05-03  Mark Wielaard  <[email protected]>
2199
2200	* dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence
2201	when nlinelist > 0.
2202
22032013-04-28  Jan Kratochvil  <[email protected]>
2204
2205	* libdw.map (ELFUTILS_0.156): New.
2206
22072013-04-24  Mark Wielaard  <[email protected]>
2208
2209	* Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
2210
22112013-04-10  Mark Wielaard  <[email protected]>
2212
2213	* dwarf_formref_die.c (dwarf_formref_die): Reference size is only
2214	equal to address size when we have a DW_FORM_ref_addr for DWARF
2215	version 2.
2216
22172013-03-25  Mark Wielaard  <[email protected]>
2218
2219	* dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as
2220	end_sequence.
2221
22222013-03-12  Mark Wielaard  <[email protected]>
2223
2224	* dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit.
2225	* dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2226
22272013-02-15  Mark Wielaard  <[email protected]>
2228
2229	* dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata,
2230	not dbg->sectiondata.
2231
22322013-01-07  Roland McGrath  <[email protected]>
2233
2234	* memory-access.h
2235	[ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro.
2236	[!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function.
2237
22382012-12-18  Mark Wielaard  <[email protected]>
2239
2240	* dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid.
2241	(check_section): Likewise on error.
2242	(scngrp_read): Likewise.
2243	(dwarf_begin_elf): Likewise.
2244
22452012-10-09  Petr Machata  <[email protected]>
2246
2247	* dwarf_getlocation.c (__libdw_intern_expression): Handle
2248	DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret,
2249	DW_OP_GNU_regval_type, DW_OP_GNU_entry_value,
2250	DW_OP_GNU_deref_type, DW_OP_GNU_const_type.
2251
22522012-10-08  Jan Kratochvil  <[email protected]>
2253
2254	* cfi.c: New include system.h.
2255	(execute_cfi) (enough_registers): Clear new memory after realloc.
2256
22572012-10-08  Jan Kratochvil  <[email protected]>
2258
2259	* fde.c (__libdw_find_fde): Change <fde != NULL> to likely.  Return
2260	DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for
2261	searched PC.
2262
22632012-10-08  Jan Kratochvil  <[email protected]>
2264
2265	* dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new
2266	loclist element DW_OP_call_frame_cfa before decoding the opcodes.
2267	Remove the later DW_OP_call_frame_cfa push to RESULT.
2268
22692012-10-08  Jan Kratochvil  <[email protected]>
2270
2271	Code cleanup.
2272	* fde.c (binary_search_fde): Remove always true <address >= start>
2273	conditional.  Move L initialization upwards.
2274
22752012-08-24  Mark Wielaard  <[email protected]>
2276
2277	* dwarf_begin_elf.c (check_section): Only probe for dwz multi files
2278	when ENABLE_DWZ is defined.
2279	* libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is
2280	defined.
2281
22822012-08-16  Mark Wielaard  <[email protected]>
2283
2284	* Makefile.am (EXTRA_DIST): Add known-dwarf.h.
2285	* dwarf.h (DW_LANG_Go): Update comment.
2286	(DW_LANG_Mips_Assembler): Likewise.
2287
22882012-06-27  Mark Wielaard  <[email protected]>
2289
2290	* dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
2291	* dwarf_begin.c (dwarf_begin): Add INTDEF.
2292	* dwarf_begin_elf.c (__check_build_id): New internal_function.
2293	(try_debugaltlink): New function.
2294	(open_debugaltlink): Likewise.
2295	(check_section): Try open_debugaltlink for .gnu_debugaltlink.
2296	* dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if
2297	necessary.
2298	* dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK.
2299	* dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt
2300	is an error here.
2301	* dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt.
2302	* dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt.
2303	* dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset
2304	calls.
2305	* dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call.
2306	* libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK.
2307	(struct Dwarf): Add alt_dwarf and free_alt fields.
2308	(__libdw_read_offset): Add dbg_ret argument, use to check with
2309	__libdw_offset_in_section.
2310	(__check_build_id): New function declaration.
2311	(dwarf_begin): Define as INTDECL.
2312	* libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt
2313	and DW_FORM_GNU_strp_alt.
2314
23152012-07-19  Mark Wielaard  <[email protected]>
2316
2317	* dwarf.h: Add DW_OP_GNU_parameter_ref.
2318
23192012-07-24  Mark Wielaard  <[email protected]>
2320
2321	* dwarf.h: Correct spelling of DW_LANG_ObjC.
2322	* dwarf_aggregate_size.c (array_size): Use correct spelling of
2323	DW_LANG_ObjC.
2324
23252012-07-24  Mark Wielaard  <[email protected]>
2326
2327	* dwarf.h: Add DW_ATE_UTF.
2328
23292012-06-27  Mark Wielaard  <[email protected]>
2330
2331	* dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings.
2332
23332012-06-26  Mark Wielaard  <[email protected]>
2334
2335	* libdwP.h: Add IDX_debug_macro.
2336	* dwarf.h: Add DW_AT_GNU_macros.
2337	* dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro.
2338	* dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros.
2339
23402012-04-27  Mark Wielaard  <[email protected]>
2341
2342	* libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being
2343	a constant offset from DW_AT_low_pc.
2344
23452012-03-19  Tom Tromey  <[email protected]>
2346
2347	* libdw_findcu.c (findcu_cb): Move earlier.
2348	(__libdw_intern_next_unit): Add new CU to search tree here...
2349	(__libdw_findcu): ... not here.
2350
23512012-01-31  Mark Wielaard  <[email protected]>
2352
2353	* dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset.
2354
23552011-11-31  Mark Wielaard  <[email protected]>
2356
2357	* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
2358
23592011-07-14  Mark Wielaard  <[email protected]>
2360
2361	* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
2362
23632011-05-16  Jakub Jelinek  <[email protected]>
2364
2365	* dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,
2366	DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret):
2367	New.
2368
23692011-04-26  Mark Wielaard  <[email protected]>
2370
2371	* dwarf_child (dwarf_child): Sanity check end of section against
2372	cu_data () of die->cu.
2373
23742011-03-22  Mark Wielaard  <[email protected]>
2375
2376	* dwarf.h: Add DW_TAG_GNU_call_site,
2377	DW_TAG_GNU_call_site_parameter,
2378	DW_AT_GNU_call_site_value,
2379	DW_AT_GNU_call_site_data_value,
2380	DW_AT_GNU_call_site_target,
2381	DW_AT_GNU_call_site_target_clobbered,
2382	DW_AT_GNU_tail_call,
2383	DW_AT_GNU_all_tail_call_sites,
2384	DW_AT_GNU_all_call_sites,
2385	DW_AT_GNU_all_source_call_sites,
2386	and DW_OP_GNU_entry_value.
2387
23882011-03-10  Petr Machata  <[email protected]>
2389
2390	* libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for
2391	abbreviation with code 0.
2392
23932011-03-09  Petr Machata  <[email protected]>
2394
2395	* libdw/dwarf_child.c (dwarf_child): Check for section overrun.
2396
23972011-02-23  Roland McGrath  <[email protected]>
2398
2399	* libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask.
2400	Declare __libdw_free_zdata.
2401	* dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function.
2402	(dwarf_end): Call it.
2403
2404	* dwarf_begin_elf.c (valid_p): Likewise.
2405	(check_section, scngrp_read): Likewise.
2406	(check_section) [USE_ZLIB]: Grok .z* flavors of sections.
2407
24082010-10-13  Roland McGrath  <[email protected]>
2409
2410	* dwarf.h: Add DW_LANG_Go.
2411
24122010-10-05  Roland McGrath  <[email protected]>
2413
2414	* dwarf_getaranges.c: Use malloc rather than alloca,
2415	since the total number of elements can be quite huge.
2416
24172010-07-26  Roland McGrath  <[email protected]>
2418
2419	* dwarf_getlocation_implicit_pointer.c: New file.
2420	* Makefile.am (libdw_a_SOURCES): Add it.
2421	* libdw.map (ELFUTILS_0.149): New set.
2422	Add dwarf_getlocation_implicit_pointer.
2423	* libdw.h: Declare it.
2424
2425	* dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global.
2426	(dwarf_offdie, dwarf_offdie_types): Update callers.
2427	* libdwP.h: Declare it.
2428
2429	* dwarf.h: Add DW_OP_GNU_implicit_pointer.
2430	* dwarf_getlocation.c (__libdw_intern_expression): Handle it.
2431
24322010-08-24  Roland McGrath  <[email protected]>
2433
2434	* libdw.map (ELFUTILS_0.149): New set.  Add dwfl_dwarf_line.
2435
24362010-07-27  Roland McGrath  <[email protected]>
2437
2438	* dwarf_formref_die.c: Fix sig8 hash insertion.
2439
24402010-06-23  Roland McGrath  <[email protected]>
2441
2442	* cfi.c (dwarf_cfi_validate_fde): Function removed.
2443	* libdw.h: Remove it.
2444	* libdw.map: Likewise.
2445
24462010-06-22  Roland McGrath  <[email protected]>
2447
2448	* dwarf_getlocation.c (check_constant_offset): data[48] are constant.
2449
2450	* dwarf_getsrclines.c: Fix signed comparison warning in extended
2451	opcode parsing.
2452
24532010-06-21  Roland McGrath  <[email protected]>
2454
2455	* dwarf.h: Add DW_TAG_GNU_* constants.
2456
2457	* memory-access.h (get_sleb128_rest_return): Fix sign extension for
2458	10-byte case.
2459
24602010-06-20  Roland McGrath  <[email protected]>
2461
2462	* libdw_findcu.c (__libdw_findcu): Take new flag argument,
2463	to search TUs instead of CUs.
2464	* libdwP.h: Update decl.
2465	(struct Dwarf): New member tu_tree.
2466	* dwarf_end.c (dwarf_end): Clean up tu_tree.
2467	* dwarf_offdie.c (do_offdie): New function, broken out of ...
2468	(dwarf_offdie): ... here.
2469	(dwarf_offdie_types): New function.
2470	* libdw.h: Declare it.
2471	* libdw.map (ELFUTILS_0.148): Add it.
2472
2473	* libdwP.h (CUDIE): Use cu_data.
2474	* dwarf_formblock.c: Likewise.
2475	* dwarf_formref_die.c: Likewise.
2476	* dwarf_diecu.c: Use CUDIE macro.
2477	* dwarf_formaddr.c: Use cu_sec_idx.
2478
24792010-06-16  Roland McGrath  <[email protected]>
2480
2481	* dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so
2482	we don't repeat a CU lookup we've already done.  Handle
2483	DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit.
2484
2485	* libdw_findcu.c (__libdw_intern_next_unit): New function,
2486	broken out of ...
2487	(__libdw_findcu): ... here.  Call it.
2488	* libdwP.h: Declare it.
2489	(struct Dwarf): New member next_tu_offset.
2490
2491	* dwarf_sig8_hash.c: New file.
2492	* dwarf_sig8_hash.h: New file.
2493	* Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2494	* dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before
2495	defining NO_UNDEF.
2496	* libdwP.h (struct Dwarf): New member sig8_hash.
2497	* dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it.
2498	* dwarf_end.c: Call Dwarf_Sig8_Hash_free on it.
2499
2500	* dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ...
2501	(dwarf_nextcu): ... here.  Call it.
2502	* libdw.h: Declare it.
2503	* libdwP.h: Add INTDECL.
2504	* libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu.
2505	* libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit.
2506
2507	* libdwP.h (cu_sec_idx, cu_data): New functions.
2508	Use .debug_types when CU is a TU.
2509	* dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info.
2510	* dwarf_siblingof.c: Likewise.
2511	* dwarf_formstring.c: Likewise.
2512	* dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise.
2513	* dwarf_getlocation.c (dwarf_getlocation): Likewise.
2514	(dwarf_getlocation_addr): Likewise.
2515
2516	* libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8.
2517	(DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute
2518	.debug_types header size instead of .debug_info header size.
2519	(CUDIE): Use it.
2520	* dwarf_diecu.c: Update caller.
2521	* dwarf_getaranges.c: Likewise.
2522	* dwarf_nextcu.c: Likewise.
2523	* libdw_findcu.c (__libdw_findcu): Initialize new members.
2524
2525	* fde.c (fde_by_offset): Renamed to ...
2526	(__libdw_fde_by_offset): ... this, made global and internal_function.
2527	Don't take ADDRESS argument.
2528	(__libdw_find_fde): Update caller.  Do address sanity check here.
2529	* cfi.h: Declare __libdw_fde_by_offset.
2530	* cfi.c (dwarf_cfi_validate_fde): New function.
2531	* libdw.h: Declare it.
2532	* libdw.map (ELFUTILS_0.148): Add it.
2533
2534	* cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
2535	either DW_EH_PE_udata8 or DW_EH_PE_udata4.
2536
2537	* encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
2538	Don't assume DW_EH_PE_aligned refers to native address size.
2539
2540	* cfi.c (execute_cfi): Barf on CIE initial instructions changing the
2541	address.
2542
25432010-06-17  Roland McGrath  <[email protected]>
2544
2545	* libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and
2546	op_index.
2547	* dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts
2548	into an inner inline function.  Set new fields.  Check all fields for
2549	overflow when setting.
2550	* dwarf_lineisa.c: New file.
2551	* dwarf_linediscriminator.c: New file.
2552	* dwarf_lineop_index.c: New file.
2553	* Makefile.am (libdw_a_SOURCES): Add them.
2554	* libdw.map (ELFUTILS_0.148): Add them.
2555	* libdw.h: Declare them.
2556
25572010-06-16  Roland McGrath  <[email protected]>
2558
2559	* dwarf_next_cfi.c: Fix version 4 return_address_register decoding.
2560
2561	* fde.c (fde_by_offset): Renamed to ...
2562	(__libdw_fde_by_offset): ... this, made global and internal_function.
2563	Don't take ADDRESS argument.
2564	(__libdw_find_fde): Update caller.  Do address sanity check here.
2565	* cfi.h: Declare __libdw_fde_by_offset.
2566	* cfi.c (dwarf_cfi_validate_fde): New function.
2567	* libdw.h: Declare it.
2568	* libdw.map (ELFUTILS_0.148): Add it.
2569
2570	* cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to
2571	either DW_EH_PE_udata8 or DW_EH_PE_udata4.
2572
2573	* encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect.
2574	Don't assume DW_EH_PE_aligned refers to native address size.
2575
2576	* cfi.c (execute_cfi): Barf on CIE initial instructions changing the
2577	address.
2578
25792010-06-15  Roland McGrath  <[email protected]>
2580
2581	* dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like
2582	DW_FORM_ref_addr.
2583	* dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way
2584	here, since we don't support it yet.
2585
2586	* dwarf_next_cfi.c: Handle version 4 format.
2587
2588	* dwarf_getsrclines.c: Handle version 4 format.
2589
25902010-06-01  Roland McGrath  <[email protected]>
2591
2592	* libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types.
2593	* dwarf_begin_elf.c (dwarf_scnnames): Likewise.
2594
2595	* libdwP.h (CIE_VERSION): Remove unused macro.
2596
2597	* dwarf_getsrclines.c: Fix version field test.
2598	* libdwP.h (DWARF_VERSION): Remove useless macro.
2599
2600	* dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
2601
2602	* dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
2603
2604	* libdw_findcu.c (__libdw_findcu): Accept version 4.
2605
26062010-05-31  Mark Wielaard  <[email protected]>
2607
2608	* cfi.h (dwarf_cfi_cie_p): Move definition from here, to ..
2609	* libdw.h (dwarf_cfi_cie_p): ... here.
2610
26112010-05-31  Mark Wielaard  <[email protected]>
2612
2613	* dwarf.h: Fix DW_LANG_Python constant.
2614
26152010-05-28  Eduardo Santiago  <[email protected]>
2616
2617	* dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first
2618	thing.
2619
26202010-05-27  Roland McGrath  <[email protected]>
2621
2622	* dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
2623	DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator.
2624
26252010-05-08  Roland McGrath  <[email protected]>
2626
2627	* dwarf_getlocation.c (__libdw_intern_expression): Take new argument
2628	REF_SIZE.  Use that to handle DW_OP_call_ref correctly.
2629	(getlocation): Update caller.
2630	* dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
2631	* dwarf_frame_register.c (dwarf_frame_register): Likewise.
2632	* libdwP.h: Update decl.
2633
26342010-04-26  Roland McGrath  <[email protected]>
2635
2636	* cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule.
2637	* cfi.c (execute_cfi): Set that instead of doing cfi_assert for
2638	DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force.
2639	* dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid.
2640
2641	* dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP.
2642	Prepend DW_OP_call_frame_cfa if true.
2643	(getlocation): Update caller.
2644	* dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise.
2645	* dwarf_frame_register.c (dwarf_frame_register): Likewise.
2646	* libdwP.h: Update decl.
2647
26482010-04-22  Roland McGrath  <[email protected]>
2649
2650	* cfi.c (execute_cfi): Never return without cleanup.
2651	Free FS on failure.
2652	(cie_cache_initial_state): Adjust caller to expect that free.
2653	(__libdw_frame_at_address): Likewise.
2654
26552010-03-10  Roland McGrath  <[email protected]>
2656
2657	* libdw.map (ELFUTILS_0.146): New set.  Add dwfl_core_file_report.
2658
26592010-02-15  Roland McGrath  <[email protected]>
2660
2661	* Makefile.am: Use config/eu.am for common stuff.
2662
26632010-02-02  Mark Wielaard  <[email protected]>
2664
2665	* fde.c (intern_fde): Fix length check for sized_augmentation_data.
2666
26672010-01-07  Roland McGrath  <[email protected]>
2668
2669	* dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum.
2670
26712010-01-05  Roland McGrath  <[email protected]>
2672
2673	* dwarf_aggregate_size.c: New file.
2674	* Makefile.am (libdw_a_SOURCES): Add it.
2675	* libdw.h: Declare it.
2676	* libdwP.h: Add INTDECL.
2677	* libdw.map (ELFUTILS_0.144): New set.  Add dwarf_aggregate_size.
2678
2679	* dwarf_srclang.c: Add INTDEF.
2680	* libdwP.h: Add INTDECL.
2681
2682	* dwarf.h: Add some more DW_AT_GNU_* types from gcc.
2683
2684	* dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
2685
26862009-11-21  Roland McGrath  <[email protected]>
2687
2688	* dwarf_getlocation.c (check_constant_offset): Return 1 for all
2689	non-constant forms.
2690
26912009-10-15  Roland McGrath  <[email protected]>
2692
2693	* libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
2694	DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
2695
26962009-09-17  Roland McGrath  <[email protected]>
2697
2698	* dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
2699	argument a pointer to const.
2700	* libdw.h: Update decl.
2701
27022009-09-10  Roland McGrath  <[email protected]>
2703
2704	* dwarf_getlocation.c (store_implicit_value): New function.
2705	(__libdw_intern_expression): Use it, handle DW_OP_implicit_value.
2706	(dwarf_getlocation_implicit_value): New function.
2707	* libdw.h: Declare it.
2708	* libdw.map (ELFUTILS_0.143): Add it.
2709
27102009-09-09  Mark Wielaard  <[email protected]>
2711
2712	* dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl.
2713
27142009-08-21  Josh Stone  <[email protected]>
2715
2716	* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
2717
27182009-08-10  Roland McGrath  <[email protected]>
2719
2720	* dwarf_getscopevar.c: Use dwarf_diename.
2721
27222009-08-09  Roland McGrath  <[email protected]>
2723
2724	* libdw.map (ELFUTILS_0.143): New version set,
2725	inherits from ELFUTILS_0.142.
2726	* dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an
2727	alias in the ELFUTILS_0.122 version set and the default in the new set.
2728	* dwarf_srclang.c: Likewise.
2729	* dwarf_decl_file.c: Likewise.
2730	* dwarf_decl_line.c: Likewise.
2731	* dwarf_decl_column.c: Likewise.
2732	* dwarf_bytesize.c: Likewise.
2733	* dwarf_bitsize.c: Likewise.
2734	* dwarf_bitoffset.c: Likewise.
2735
27362009-08-07  Roland McGrath  <[email protected]>
2737
2738	* dwarf_arrayorder.c: Use dwarf_attr_integrate.
2739	* dwarf_srclang.c: Likewise.
2740	* dwarf_decl_file.c: Likewise.
2741	* dwarf_decl_line.c (__libdw_attr_intval): Likewise.
2742	* dwarf_bytesize.c: Likewise.
2743	* dwarf_bitsize.c: Likewise.
2744	* dwarf_bitoffset.c: Likewise.
2745
27462009-07-22  Roland McGrath  <[email protected]>
2747
2748	* dwarf_frame_cfa.c: Change calling convention.
2749	* libdw.h: Update decl.
2750
2751	* dwarf_frame_register.c: Change calling/return-value convention for
2752	value-only results and undefined/same_value.
2753	* libdw.h: Update decl.
2754
2755	* dwarf_getlocation.c (__libdw_intern_expression): Take new bool
2756	argument, append DW_OP_stack_value if set.  Don't take NOPS argument,
2757	return that value instead.
2758	(getlocation): Update caller.
2759	* dwarf_frame_cfa.c: Likewise.
2760	* libdwP.h: Update decl.
2761
27622009-07-21  Roland McGrath  <[email protected]>
2763
2764	* dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list.
2765	Fix loop iteration after skipping a bogus or useless CU.
2766
2767	* dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless
2768	absence, not DWARF_E_NO_DEBUG_LINE.
2769
27702009-07-20  Roland McGrath  <[email protected]>
2771
2772	* dwarf_getlocation.c (__libdw_intern_expression):
2773	Handle DW_OP_stack_value.
2774
27752009-07-16  Roland McGrath  <[email protected]>
2776
2777	* dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset,
2778	reject others when CU's version > 3.
2779
2780	* dwarf_formflag.c: Handle DW_FORM_flag_present.
2781
2782	* dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft.
2783	Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type.
2784	Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset,
2785	and DW_AT_const_expr.
2786	Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present,
2787	and DW_FORM_ref_sig8.
2788
27892009-07-15  Roland McGrath  <[email protected]>
2790
2791	* dwarf_getlocation.c: Grok DW_OP_form_tls_address,
2792	DW_OP_GNU_push_tls_address, and DW_OP_bit_piece.
2793
27942009-07-13  Roland McGrath  <[email protected]>
2795
2796	* dwarf_getlocation.c: Grok DW_OP_call_frame_cfa.
2797
27982009-07-08  Roland McGrath  <[email protected]>
2799
2800	* libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi,
2801	dwfl_module_eh_cfi.
2802
2803	* libdwP.h (struct Dwarf): Add member `cfi'.
2804	* dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it.
2805	* dwarf_getcfi.c: New file.
2806	* dwarf_getcfi_elf.c: New file.
2807	* dwarf_cfi_end.c: New file.
2808	* dwarf_cfi_addrframe.c: New file.
2809	* dwarf_frame_cfa.c: New file.
2810	* dwarf_frame_register.c: New file.
2811	* dwarf_frame_return_address_register.c: New file.
2812	* Makefile.am (libdw_a_SOURCES): Add them.
2813	* unwind.h: Declare those functions.
2814	* libdw.map (ELFUTILS_0.142): Export them.
2815
2816	* dwarf_getlocation.c (__libdw_intern_expression): New function,
2817	broken out of ...
2818	(getlocation): ... here, call it.
2819	* libdwP.h: Declare it.
2820
2821	* cie.c: New file.
2822	* fde.c: New file.
2823	* frame-cache.c: New file.
2824	* cfi.c: New file.
2825	* cfi.h: New file.
2826	* encoded-value.h: New file.
2827	* Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them.
2828	* libdwP.h: Add DWARF_E_INVALID_CFI to errors enum.
2829	* dwarf_error.c (errmsgs): Add element for it.
2830
2831	* dwarf_next_cfi.c: New file.
2832	* Makefile.am (libdw_a_SOURCES): Add it.
2833	* libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types.
2834	Declare dwarf_next_cfi.
2835	* libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136.
2836	Add dwarf_next_cfi.
2837
2838	* memory-access.h [! ALLOW_UNALIGNED]
2839	(read_2ubyte_unaligned): Renamed to ...
2840	(read_2ubyte_unaligned_1): ... this.  Take bool rather than Dwarf *.
2841	(read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order.
2842	(read_2sbyte_unaligned): Likewise.
2843	(read_4ubyte_unaligned): Likewise.
2844	(read_4sbyte_unaligned): Likewise.
2845	(read_8ubyte_unaligned): Likewise.
2846	(read_8sbyte_unaligned): Likewise.
2847
2848	* libdwP.h (IDX_eh_frame): Remove it.
2849	* dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
2850
28512009-07-08  Roland McGrath  <[email protected]>
2852
2853	* libdwP.h (struct Dwarf_Line_s): Reorder members to pack better.
2854
2855	* dwarf_getlocation.c (check_constant_offset): New function.
2856	(dwarf_getlocation, dwarf_getlocation_addr): Call it to
2857	handle DW_AT_data_member_location of data[48] as constant offset.
2858
28592009-06-18  Roland McGrath  <[email protected]>
2860
2861	* libdwP.h (__libdw_read_address_inc): Constify.
2862	(__libdw_read_offset_inc): Likewise.
2863	* dwarf_getaranges.c: Likewise.
2864	* dwarf_getlocation.c: Likewise.
2865	* dwarf_getsrclines.c: Likewise.
2866	* dwarf_nextcu.c: Likewise.
2867
28682009-05-05  Petr Machata  <[email protected]>
2869
2870	* libdwP.h (__libdw_formptr): Declare new function.
2871	* dwarf_formudata.c: Implement it here.
2872	* dwarf_getlocation.c (dwarf_getlocation_addr):
2873	Call it instead of hand-rolled offset handling code.
2874	* dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
2875	* dwarf_ranges.c (dwarf_ranges): Likewise.
2876
28772009-05-04  Petr Machata  <[email protected]>
2878
2879	* libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function.
2880	* dwarf_ranges.c: Implement it here.
2881	(dwarf_ranges): Call it.
2882	* dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here.
2883
28842009-04-23  Petr Machata  <[email protected]>
2885
2886	* dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead
2887	of read_*ubyte_unaligned.
2888	* dwarf_formref_die.c (dwarf_formref_die): Likewise.
2889	* dwarf_formstring.c (dwarf_formstring): Likewise.
2890	* dwarf_formudate.c (dwarf_formudata): Likewise.
2891	* dwarf_getaranges.c (dwarf_getaranges): Likewise.
2892	* dwarf_getlocation.c (dwarf_getlocation_addr): Likewise.
2893	* dwarf_getpubnames.c (get_offsets): Likewise.
2894	* dwarf_nextcu.c (dwarf_nextcu): Likewise.
2895
28962009-04-23  Petr Machata  <[email protected]>
2897
2898	* libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
2899	__libdw_read_addr, __libdw_read_off): Add four new internal
2900	functions.
2901
29022009-05-07  Roland McGrath  <[email protected]>
2903
2904	* dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in
2905	return value and OFFSET argument, not CU-relative.  Only fetch the
2906	attribute data when called with OFFSET of 0.
2907
29082009-05-07  Petr Machata  <[email protected]>
2909
2910	* dwarf_getmacros.c (dwarf_getmacros): Take into account offset in
2911	DW_AT_macro_info attribute of CU DIE.
2912
29132009-04-15  Roland McGrath  <[email protected]>
2914
2915	* dwarf.h (DW_CIE_ID): Removed.
2916	(DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it.
2917
29182009-04-01  Roland McGrath  <[email protected]>
2919
2920	* dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
2921
29222009-01-28  Roland McGrath  <[email protected]>
2923
2924	* libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s
2925	defn so C++ doesn't scope the name to not match the Dwarf_Line typedef.
2926
2927	* libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field.
2928
29292009-01-26  Roland McGrath  <[email protected]>
2930
2931	* dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all.
2932
29332009-01-25  Roland McGrath  <[email protected]>
2934
2935	* dwarf_getattrs.c: Correctly skip attribute values when restarting.
2936
29372009-01-23  Roland McGrath  <[email protected]>
2938
2939	* Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
2940	Put these rules under if MAINTAINER_MODE.
2941
29422009-01-22  Roland McGrath  <[email protected]>
2943
2944	* dwarf.h: Add DW_OP_GNU_encoded_addr.
2945
29462009-01-21  Roland McGrath  <[email protected]>
2947
2948	* Makefile.am (CLEANFILES): Renamed to ...
2949	(MOSTLYCLEANFILES): ... here.
2950	(CLEANFILES): New variable, add known-dwarf.h.
2951
29522009-01-17  Roland McGrath  <[email protected]>
2953
2954	* Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir).
2955	Make it unconditional.
2956	(BUILT_SOURCES): Updated.
2957
2958	* dwarf.h: Add description comments for DW_LANG_* values.
2959
2960	* Makefile.am [MAINTAINER_MODE]
2961	($(srcdir)/known-dwarf.h): New target.
2962	(BUILT_SOURCES): Add it.
2963
2964	* dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit.
2965
29662009-01-10  Ulrich Drepper  <[email protected]>
2967
2968	* dwarf_error.c: Always use __thread.  Remove all !USE_TLS code.
2969
29702009-01-08  Roland McGrath  <[email protected]>
2971
2972	* Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in.
2973
29742008-01-06  Roland McGrath  <[email protected]>
2975
2976	* libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool.
2977	Reorder members.
2978	* dwarf_haschildren.c: Return -1 for error case, not 0.
2979
2980	* Makefile.am (libdw.so): Link in $(zip_LIBS).
2981
29822009-01-06  Ulrich Drepper  <[email protected]>
2983
2984	* dwarf.h: Add definition for unwind and call frame information.
2985
2986	* memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned,
2987	read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc.
2988
29892008-08-15  Roland McGrath  <[email protected]>
2990
2991	* libdw.map (ELFUTILS_0.136): New version set, inherits from
2992	ELFUTILS_0.130.  Add dwfl_addrsegment, dwfl_report_segment.
2993
29942008-01-21  Ulrich Drepper  <[email protected]>
2995
2996	* dwarf_child.c: Minor optimizations.
2997	* dwarf_getattrs.c: Likewise.
2998	* dwarf_getpubnames.c: Likewise.
2999	* dwarf_siblingof.c: Likewise.
3000	* dwarf_tag.c: Likewise.
3001
30022008-01-18  Ulrich Drepper  <[email protected]>
3003
3004	* dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match
3005	of DWARF_VERSION comparison, just fail if the file's version is newer.
3006
30072008-01-17  Nick Clifton  <[email protected]>
3008
3009	* dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define.
3010	(DWARF3_LENGTH_MAX_ESCAPE_CODE): New define.
3011	(DWARF3_LENGTH_64_BIT): New define.
3012	* dwarf_getaranges (dwarf_getaranges): Use the new definitions.
3013	* dwarf_getpubnames: Include dwarf.h.
3014	(get_offsets): Use the new definitions.
3015	* dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions.
3016	* dwarf_nextcu.c: Include dwarf.h.  Correct comment.
3017	(dwarf_nextcu): Use the new definitions.
3018
3019	* libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro.
3020	* dwarf_diecu.c (dwarf_diecu): Use the new macro.
3021	* dwarf_getaranges (dwarf_getaranges): Use the new macro.
3022	* dwarf_nextcu.c (dwarf_nextcu): Use the new macro.
3023
3024	* dwarf_getpubnames (get_offsets): Replace assertion with test and
3025	error return.
3026
3027	* dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE.
3028
3029	* dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer.
3030	Set the address in the return structure to the address of the next
3031	non-sibling die, if there is no sibling and the return pointer is
3032	not the same as the die pointer.
3033	* libdw.h: Expand the description of the dwarf_siblingof prototype.
3034
3035	* dwarf_child.c: Fix typo in comment.
3036
3037	* libdwP.h (DWARF_VERSION): Change to 3.
3038
3039	* dwarf_formref.c (__libdw_formref.c): Handle attributes which do
3040	not have a initialised valp pointer.
3041
3042	* dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when
3043	the end of the attributes is reached.  When the callback fails,
3044	return the address of the failing attribute, not the address of
3045	its successor.
3046	* libdw.h: Expand the description of the dwarf_getattrs prototype.
3047
3048	* dwarf_child.c (__libdw_find_attr): Use the new definition.
3049	(dwarf_child): Likewise.
3050	* dwarf_tag.c (__libdw_findabbrev): Likewise.
3051	(dwarf_tag): Likewise.
3052
30532008-01-08  Roland McGrath  <[email protected]>
3054
3055	* Makefile.am (euinclude): Variable removed.
3056	(pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
3057	(libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir).
3058
30592007-10-17  Roland McGrath  <[email protected]>
3060
3061	* libdw.h (__deprecated_attribute__): New macro.
3062	(dwarf_formref): Mark it deprecated.
3063	* dwarf_formref.c (__libdw_formref): New function, broken out of ...
3064	(dwarf_formref): ... here.  Call it.  Remove INTDEF.
3065	* libdwP.h: Remove INTDECL.
3066	Declare __libdw_formref.
3067	* dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead.
3068	* dwarf_formref_die.c: Likewise.  Handle DW_FORM_ref_addr here.
3069
3070	* libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result,
3071	needs to check CU->version.
3072
3073	* libdwP.h (struct Dwarf_CU): New member `version'.
3074	* libdw_findcu.c (__libdw_findcu): Initialize it.
3075
3076	* dwarf_child.c: Return 1 for null entry as first child.
3077
30782007-10-05  Roland McGrath  <[email protected]>
3079
3080	* dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections.
3081
3082	* libdw.h (__extern_inline): Rename to __libdw_extern_inline.
3083	[__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses.
3084
30852007-10-03  Roland McGrath  <[email protected]>
3086
3087	* libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf
3088	and dwfl_build_id_find_debuginfo.
3089
3090	* libdw.map (ELFUTILS_0.130): New version set, inherits from
3091	ELFUTILS_0.127.  Add dwfl_module_build_id, dwfl_module_report_build_id.
3092
30932007-10-02  Roland McGrath  <[email protected]>
3094
3095	* libdw_visit_scopes.c (classify_die): Return walk for class_type and
3096	structure_type.
3097
30982007-08-07  Roland McGrath  <[email protected]>
3099
3100	* dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when
3101	error code is DWARF_E_NOERROR (0).
3102
3103	* dwarf_getscopes.c (pc_record): Always bail early if DIE->prune.
3104	Fix typo in __libdw_visit_scopes argument.
3105
3106	* dwarf_getscopes.c (pc_match): Check dwarf_haspc error return,
3107	swallow DWARF_E_NO_DEBUG_RANGES but not other errors.
3108
31092007-07-03  Roland McGrath  <[email protected]>
3110
3111	* libdw.h (__extern_inline): New macro.
3112	[__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
3113
31142007-04-16  Roland McGrath  <[email protected]>
3115
3116	* libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
3117
31182007-04-05  Roland McGrath  <[email protected]>
3119
3120	* dwarf_getsrcdirs.c: New file.
3121	* Makefile.am (libdw_a_SOURCES): Add it.
3122	* libdw.h: Declare dwarf_getsrcdirs.
3123	* libdw.map (ELFUTILS_0.127): Add it.
3124
3125	* libdwP.h (struct Dwarf_Files_s): New member ndirs.
3126	* dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
3127	zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
3128	Save DIRARRAY in the Dwarf_Files.
3129
3130	* dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
3131	address to check for all-ones base address entry.  Check directly.
3132	Reported by Sébastien Dugué <[email protected]>.
3133
31342007-03-25  Roland McGrath  <[email protected]>
3135
3136	* dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
3137	Return NULL when freeing RESULT on error.
3138	(global_read, scngrp_read): Check return value from check_section,
3139	break out of loop after it has freed RESULT.
3140	(valid_p): Handle null argument.
3141
31422007-03-12  Roland McGrath  <[email protected]>
3143
3144	* libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
3145
31462007-03-04  Roland McGrath  <[email protected]>
3147
3148	* libdw.map (ELFUTILS_0.127): New version set, inherits from
3149	ELFUTILS_0.126.  Add dwfl_module_addrsym.
3150
31512007-02-10  Roland McGrath  <[email protected]>
3152
3153	* dwarf.h (DW_OP_fbreg): Comment fix.
3154
31552007-02-03  Roland McGrath  <[email protected]>
3156
3157	* dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf.
3158	* libdw.map (ELFUTILS_0.126): New version set, inherits from
3159	ELFUTILS_0.122.  Move dwarf_getelf there; it was never truly
3160	exported in the past.
3161
31622006-12-17  Roland McGrath  <[email protected]>
3163
3164	* dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
3165	address when the CU is missing attributes due to buggy GCC.
3166
31672006-08-29  Roland McGrath  <[email protected]>
3168
3169	* Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
3170
3171	* libdw.h (dwarf_diecu): Add __nonnull_attribute__.
3172	(dwarf_child): Don't list arg 1 in __nonnull_attribute__.
3173
3174	* libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure
3175	result is aligned.  Adjust NEWP->remaining here for this allocation.
3176	* libdwP.h: Update decl.
3177	(libdw_alloc): Update caller.
3178
31792006-07-12  Ulrich Drepper  <[email protected]>
3180
3181	* dwarf_child.c: Adjust for internal_function_def removal.
3182	* dwarf_getabbrev.c: Likewise.
3183	* dwarf_tag.c: Likewise.
3184	* libdw_form.c: Likewise.
3185	* memory-access.c: Likewise.
3186
31872006-06-28  Roland McGrath  <[email protected]>
3188
3189	* libdw.map: Export dwfl_linecu, dwfl_line_comp_dir.
3190
3191	* libdw.map: Bump to 0.122; export dwfl_module_getsymtab and
3192	dwfl_module_getsym.
3193
31942006-05-27  Ulrich Drepper  <[email protected]>
3195
3196	* libdw.h: Add extern "C".
3197
31982006-05-22  Ulrich Drepper  <[email protected]>
3199
3200	* dwarf_getaranges.c (dwarf_getaranges): Handle files without
3201	aranges information.
3202
32032006-05-21  Ulrich Drepper  <[email protected]>
3204
3205	* libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs,
3206	dwarf_haschildren.
3207
32082006-02-28  Roland McGrath  <[email protected]>
3209
3210	* dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*,
3211	DW_OP_* values, to match DWARF 3.0.  Add new DW_DS_*, DW_END_*
3212	values from DWARF 3.0.
3213
32142006-02-22  Roland McGrath  <[email protected]>
3215
3216	* libdw.map: Bump to 0.120; export dwfl_version.
3217
32182005-12-22  Roland McGrath  <[email protected]>
3219
3220	* libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report.
3221
32222005-12-12  Roland McGrath  <[email protected]>
3223
3224	* dwarf_ranges.c: Copy CU base address-finding code from
3225	dwarf_getlocation.
3226
32272005-12-09  Roland McGrath  <[email protected]>
3228
3229	* dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys.
3230	Delay CU base lookup until it's needed.
3231	If CU base lookup fails with no error, flag invalid DWARF.
3232
32332005-11-25  Roland McGrath  <[email protected]>
3234
3235	* libdw.map: Bump to 0.118; export dwfl_module_register_names.
3236
32372005-11-15  Roland McGrath  <[email protected]>
3238
3239	* Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic.
3240
32412005-11-13  Roland McGrath  <[email protected]>
3242
3243	* libdw.map: Bump to 0.117; export dwfl_module_return_value_location.
3244
32452005-10-27  Roland McGrath  <[email protected]>
3246
3247	* dwarf_entry_breakpoints.c (search_range): Fix binary search code;
3248	don't match end_sequence markers.
3249
3250	* dwarf_getsrclines.c (compare_lines): Sort end_sequence markers
3251	before normal records at the same address.
3252	* dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence
3253	marker.
3254
32552005-10-26  Roland McGrath  <[email protected]>
3256
3257	* dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func.
3258	* dwarf_func_file.c: Renamed to ...
3259	* dwarf_decl_file.c: ... here.
3260	* dwarf_func_col.c: Renamed to ...
3261	* dwarf_decl_column.c: ... here.
3262	* dwarf_func_line.c: Renamed to ...
3263	* dwarf_decl_line.c: ... here.
3264	(dwarf_func_line): Renamed to ...
3265	(dwarf_decl_line): ... this.  Take a Dwarf_Die * argument.
3266	(__libdw_func_intval): Renamed __libdw_attr_intval.
3267	* dwarf_func_name.c: File removed.
3268	* dwarf_func_lowpc.c: File removed.
3269	* dwarf_func_highpc.c: File removed.
3270	* dwarf_func_entrypc.c: File removed.
3271	* dwarf_func_die.c: File removed.
3272	* Makefile.am (libdw_a_SOURCES): Updated.
3273	* libdw.h: Update decls.
3274	(Dwarf_Func): Type removed.
3275	* libdwP.h: Update decls.
3276	(struct Dwarf_Func_s): Type removed.
3277	* libdw.map: Updated.
3278
3279	* libdwP.h (CUDIE): New macro.
3280	* dwarf_getlocation.c (dwarf_getlocation_addr): Use it.
3281	* dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise.
3282	* dwarf_ranges.c (dwarf_ranges): Likewise.
3283
3284	* dwarf_getloclist.c: Renamed to ...
3285	* dwarf_getlocation.c: ... here.
3286	(getloclist): Renamed to getlocation.
3287	(dwarf_getloclist): Renamed to dwarf_getlocation.
3288	(dwarf_addrloclists): Renamed to dwarf_getlocation_addr.
3289	* Makefile.am (libdw_a_SOURCES): Updated.
3290	* libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation.
3291	(dwarf_addrloclists): Renamed dwarf_getlocation_addr.
3292	(Dwarf_Loc): Renamed Dwarf_Op.
3293	* libdwP.h (struct loc_s): Update use.
3294	* libdw.map: Update map.
3295
3296	* dwarf_entry_breakpoints.c: Use the second line record within the
3297	function, regardless of its source location data.
3298
32992005-10-25  Roland McGrath  <[email protected]>
3300
3301	* dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too.
3302
3303	* libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints.
3304
33052005-10-14  Roland McGrath  <[email protected]>
3306
3307	* dwarf_diecu.c (dwarf_diecu): New file.
3308	* Makefile.am (libdw_a_SOURCES): Add it.
3309	* libdw.h: Declare dwarf_diecu.
3310	* libdw.map: Export it.
3311
3312	* libdw.map: Bump to 0.116; export dwarf_ranges.
3313
33142005-09-20  Roland McGrath  <[email protected]>
3315
3316	* dwarf_haspc.c: Use dwarf_ranges.
3317	* dwarf_entry_breakpoints.c: Likewise.
3318
3319	* dwarf_ranges.c: New file.
3320	* Makefile.am (libdw_a_SOURCES): Add it.
3321	* libdw.h: Declare dwarf_ranges.
3322	* libdwP.h: Add INTDECL.
3323
33242005-09-14  Roland McGrath  <[email protected]>
3325
3326	* dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in
3327	prologue_end marker scanning loop.
3328
33292005-09-11  Roland McGrath  <[email protected]>
3330
3331	* dwarf.h: Comment typo fix.
3332
33332005-09-07  Roland McGrath  <[email protected]>
3334
3335	* dwarf_entry_breakpoints.c: New file.
3336	* Makefile.am (libdw_a_SOURCES): Add it.
3337	* libdw.h: Declare dwarf_entry_breakpoints.
3338
3339	* dwarf_entrypc.c: New file.
3340	* Makefile.am (libdw_a_SOURCES): Add it.
3341	* libdw.h: Declare dwarf_entrypc.
3342	* libdwP.h: Add INTDECL.
3343
33442005-08-28  Ulrich Drepper  <[email protected]>
3345
3346	* Makefile.am: Use $(LINK) not $(CC) when creating DSO.
3347	(%.os): Use COMPILE.os.
3348	(COMPILE.os): Filter out gconv options.
3349
33502005-08-27  Roland McGrath  <[email protected]>
3351
3352	* dwarf_getscopes.c (dwarf_getscopes): Rewritten using
3353	__libdw_visit_scopes.
3354
3355	* dwarf_getscopes_die.c: New file.
3356	* Makefile.am (libdw_a_SOURCES): Add it.
3357	* libdw.h: Declare dwarf_getscopes_die.
3358	* libdw.map: Bump to 0.115 and add it.
3359
3360	* libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
3361	containing a DIE and its parent pointer, instead of just Dwarf_Die.
3362	Take two functions for both preorder and postorder visitors.
3363	* libdwP.h: Update decl.
3364	(struct Dwarf_Die_Chain): New type.
3365	* dwarf_func_inline.c: Update uses.
3366
3367	* dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
3368	Add INTDEF.
3369	* libdwP.h: Add INTDECL.
3370	* dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
3371
33722005-08-23  Roland McGrath  <[email protected]>
3373
3374	* dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
3375	DW_AT_specification the same as DW_AT_abstract_origin.
3376
33772005-08-20  Roland McGrath  <[email protected]>
3378
3379	* libdw.map: Add dwfl_cumodule, remove dwfl_linecu.
3380	Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address,
3381	and dwfl_report_offline.
3382
33832005-08-19  Roland McGrath  <[email protected]>
3384
3385	* libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes.
3386	Add dwfl_module_relocate_address, dwfl_module_relocations,
3387	dwfl_module_relocation_info.
3388
33892005-08-18  Roland McGrath  <[email protected]>
3390
3391	* dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as
3392	outermost scope in the results.
3393
33942005-08-15  Roland McGrath  <[email protected]>
3395
3396	* dwarf_func_inline.c: New file.
3397	* Makefile.am (libdw_a_SOURCES): Add it.
3398	* libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances.
3399	* libdw.map: Add them.
3400
3401	* dwarf_func_die.c: New file.
3402	* Makefile.am (libdw_a_SOURCES): Add it.
3403	* libdw.h: Declare dwarf_func_die.
3404	* libdw.map: Add it.  Bump version to ELFUTILS_0.114.
3405
34062005-08-10  Ulrich Drepper  <[email protected]>
3407
3408	* dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming
3409	of DW_LNS_set_epilog_begin.
3410
34112005-08-09  Roland McGrath  <[email protected]>
3412
3413	* dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin.
3414
3415	* dwarf_end.c: Add INTDEF.
3416	* dwarf_error.c (dwarf_errmsg): Likewise.
3417	* libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.
3418
34192005-08-01  Roland McGrath  <[email protected]>
3420
3421	* dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset.
3422	* dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
3423
34242005-07-28  Ulrich Drepper  <[email protected]>
3425
3426	* Makefile.am (libdw.so): No need to link with libeu.a anymore.
3427	(libdw_a_LIBADD): Add all files from libdwfl.a.
3428
34292005-07-27  Roland McGrath  <[email protected]>
3430
3431	* Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in,
3432	along with ../libebl/libebl.a and ../lib/libeu.a;
3433	depend on ../libelf/libelf.so.
3434	(libdw_so_LDADD): New variable.
3435	* libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map.
3436
3437	* libdw.map: Define an empty base version and move all symbols to
3438	version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet.
3439
34402005-07-23  Ulrich Drepper  <[email protected]>
3441
3442	* dwarf_error.c: Add internal alias for dwarf_errno.
3443	* libdwP.h: Declare __dwarf_errno_internal.
3444	* dwarf_getloclist.c: Use INTDEF for dwarf_errno.
3445
3446	* dwarf_error.c [USE_TLS]: Actually use __thread in definition of
3447	global_error.
3448
34492005-06-01  Roland McGrath  <[email protected]>
3450
3451	* dwarf_getaranges.c (dwarf_getaranges): Sort result array.
3452	* dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search.
3453
34542005-06-08  Roland McGrath  <[email protected]>
3455
3456	* memory-access.h (get_uleb128_step, get_uleb128): Remove casts.
3457	(get_sleb128_step, get_sleb128): Likewise.
3458	* dwarf_getattrs.c (dwarf_getattrs): Add consts.
3459	* dwarf_getloclist.c (getloclist): Likewise.
3460	* dwarf_formblock.c (dwarf_formblock): Likewise.
3461	* dwarf_getsrclines.c (dwarf_getsrclines): Likewise.
3462	* dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise.
3463	* dwarf_formref.c (dwarf_formref): Likewise.
3464	* dwarf_formsdata.c (dwarf_formsdata): Likewise.
3465	* dwarf_formudata.c (dwarf_formudata): Likewise.
3466	* dwarf_haschildren.c (dwarf_haschildren): Likewise.
3467	* dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise.
3468	* dwarf_tag.c (dwarf_tag): Likewise.
3469	* dwarf_getabbrev.c (__libdw_getabbrev): Likewise.
3470	* memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise.
3471	* libdw_form.c (__libdw_form_val_len): Likewise.
3472	* libdwP.h: Update decl.
3473
34742005-06-04  Roland McGrath  <[email protected]>
3475
3476	* memory-access.h (get_uleb128_rest_return): New macro.
3477	[! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it.
3478	(get_sleb128_rest_return): New macro.
3479	[! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it.
3480	* memory-access.c: New file.
3481	* Makefile.am (libdw_a_SOURCES): Add it.
3482	(DEFS): Add -DIS_LIBDW.
3483
34842005-05-31  Roland McGrath  <[email protected]>
3485
3486	* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
3487	formref offset.
3488
34892005-05-30  Roland McGrath  <[email protected]>
3490
3491	* dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base
3492	address if DW_AT_low_pc is missing.  Not to spec, but GCC generates it.
3493
3494	* dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte
3495	BEGIN value.  Instead, match base address entries separately for
3496	32/64 size cases.
3497
34982005-05-28  Roland McGrath  <[email protected]>
3499
3500	* dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance
3501	past location expression contents.
3502
35032005-05-23  Roland McGrath  <[email protected]>
3504
3505	* dwarf_getsrclines.c: Comment typo fix.
3506
3507	* dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation.
3508	* dwarf_getloclist.c (dwarf_addrloclists): Likewise.
3509
35102005-05-22  Ulrich Drepper  <[email protected]>
3511
3512	* libdwP.h: Only use INTDECL for alias prototypes.
3513
35142005-05-19  Roland McGrath  <[email protected]>
3515
3516	* dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too.
3517
3518	* dwarf_getscopevar.c: New file.
3519	* Makefile.am (libdw_a_SOURCES): Add it.
3520	* libdw.h: Declare dwarf_getscopevar.
3521
3522	* dwarf_getsrcfiles.c: Add INTDEF.
3523	* dwarf_haschildren.c: Likewise.
3524	* libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL.
3525
3526	* dwarf_getscopes.c: New file.
3527	* Makefile.am (libdw_a_SOURCES): Add it.
3528	* libdw.h: Declare dwarf_getscopes.
3529	* libdw.map: Add it.
3530
35312005-05-18  Roland McGrath  <[email protected]>
3532
3533	* libdwP.h (IDX_debug_ranges): New enum constant.
3534	* dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges".
3535	* libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant.
3536	* dwarf_error.c (errmsgs): Add it.
3537	* dwarf_haspc.c: New file.
3538	* libdw.h: Declare dwarf_haspc.
3539	* libdw.map: Add it.
3540	* libdwP.h: Add INTDECL.
3541
3542	* dwarf_attr_integrate.c: New file.
3543	* dwarf_hasattr_integrate.c: New file.
3544	* Makefile.am (libdw_a_SOURCES): Add them.
3545	* libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate.
3546	* libdw.map: Add them.
3547
3548	* dwarf_hasattr.c: Add INTDEF.
3549	* libdwP.h: Add INTDECL for it.
3550
3551	* dwarf_formref_die.c: New file.
3552	* Makefile.am (libdw_a_SOURCES): Add it.
3553	* libdw.h (dwarf_formref_die): Declare it.
3554	* libdwP.h (dwarf_formref_die): Add INTDECL.
3555	* libdw.map: Add it.
3556
3557	* dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out
3558	of ...
3559	(dwarf_getloclist): ... here.  Call them.
3560	(dwarf_addrloclists): New function.
3561	* libdw.h: Declare it.
3562	* libdw.map: Add it.
3563
3564	* dwarf_getmacros.c (dwarf_getmacros): Don't bail at
3565	DW_MACINFO_end_file.  Recognize type 0 as terminator.
3566
35672005-05-05  Roland McGrath  <[email protected]>
3568
3569	* dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search.
3570
3571	* dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since
3572	the line program does not produce all entries in ascending order.
3573
35742005-04-25  Ulrich Drepper  <[email protected]>
3575
3576	* dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple
3577	occurences (e.g., inlines) better.
3578
35792005-04-24  Ulrich Drepper  <[email protected]>
3580
3581	* libdw.h (DWARF_END_ABBREV): Define.
3582	* dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if
3583	end is reached.
3584	* dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end
3585	of records reached.
3586	* dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV
3587	as error of __libdw_getabbrev.
3588
35892005-04-04  Ulrich Drepper  <[email protected]>
3590
3591	* dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization.
3592
3593	* dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of
3594	results back to caller.
3595
35962005-04-04  Roland McGrath  <[email protected]>
3597
3598	* dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL.
3599
3600	* dwarf_func_line.c (__libdw_func_intval): Use internal_function in
3601	defn.
3602
36032005-04-04  Ulrich Drepper  <[email protected]>
3604
3605	* dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE.
3606
3607	* dwarf_getsrc_file.c: New file.
3608	* Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c.
3609	* libdw.h: Declare dwarf_getsrc_file.
3610	* libdw.map: Add dwarf_getsrc_file.
3611
36122005-04-02  Ulrich Drepper  <[email protected]>
3613
3614	* dwarf_func_entrypc.c: New file.
3615	* dwarf_func_col.c: New file.
3616	* dwarf_func_line.c: New file.
3617	* dwarf_func_file.c: New file.
3618	* libdw.h: Add prototypes for new functions.
3619	* libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line,
3620	dwarf_func_file.
3621	* Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c,
3622	dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c.
3623	* libdwP.h (struct Dwarf_Func_s): Add cudie element.
3624	Declare __libdw_func_intval and __dwarf_formsdata_internal.
3625	* dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object.
3626	* dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs.
3627
3628	* dwarf.h: Add some DWARF3 definitions.
3629
36302005-04-01  Ulrich Drepper  <[email protected]>
3631
3632	* dwarf_getfuncs.c: New file.
3633	* dwarf_func_highpc.c: New file.
3634	* dwarf_func_lowpc.c: New file.
3635	* dwarf_func_name.c: New file.
3636	* Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c,
3637	dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c.
3638	* libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc,
3639	and dwarf_func_name.
3640	* libdw.h: Add prototypes for new functions.
3641	* dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs.
3642	* dwarf_siblingof.c: Likewise.
3643	* dwarf_dieoffset.c: Likewise.
3644	* dwarf_highpc.c: Likewise.
3645	* dwarf_lowpc.c: Likewise.
3646	* libdwP.h: Add prototypes for internal functions.
3647	Define Dwarf_Func_s structure.
3648
36492005-03-29  Ulrich Drepper  <[email protected]>
3650
3651	* libdw.h: Add padding in Dwarf_die.
3652
3653	* dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs.
3654	* dwarf_attr.c: Likewise.
3655	* dwarf_begin.c: Likewise.
3656	* dwarf_begin_elf.c: Likewise.
3657	* dwarf_bitoffset.c: Likewise.
3658	* dwarf_bitsize.c: Likewise.
3659	* dwarf_bytesize.c: Likewise.
3660	* dwarf_diename.c: Likewise.
3661	* dwarf_formaddr.c: Likewise.
3662	* dwarf_formblock.c: Likewise.
3663	* dwarf_formref.c: Likewise.
3664	* dwarf_formstring.c: Likewise.
3665	* dwarf_formudata.c: Likewise.
3666	* dwarf_getarange_addr.c: Likewise.
3667	* dwarf_getarangeinfo.c: Likewise.
3668	* dwarf_getaranges.c: Likewise.
3669	* dwarf_getloclist.c: Likewise.
3670	* dwarf_getmacros.c: Likewise.
3671	* dwarf_getsrc_die.c: Likewise.
3672	* dwarf_getsrcfiles.c: Likewise.
3673	* dwarf_getsrclines.c: Likewise.
3674	* dwarf_highpc.c: Likewise.
3675	* dwarf_lowpc.c: Likewise.
3676	* dwarf_nextcu.c: Likewise.
3677	* dwarf_offdie.c: Likewise.
3678	* dwarf_siblingof.c: Likewise.
3679	* dwarf_srclang.c: Likewise.
3680	* dwarf_tag.c: Likewise.
3681	* libdw_findcu.c: Likewise.
3682	* libdwP.h: Add prototypes for internal functions.
3683
3684	* dwarf_addrdie.c: New file.
3685	* dwarf_macro_opcode.c: New file.
3686	* dwarf_macro_param1.c: New file.
3687	* dwarf_macro_param2.c: New file.
3688	* libdw.h: Add declarations.  Move Dwarf_Macro definition to libdwP.h.
3689	* libdwP.h: Remove Dwarf_Macro definition.
3690	* Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c,
3691	dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c.
3692	* libdw.map: Add entries for new functions.
3693
36942005-03-21  Ulrich Drepper  <[email protected]>
3695
3696	* libdw.h: Handle broken gcc < 4.
3697
36982005-02-15  Ulrich Drepper  <[email protected]>
3699
3700	* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
3701
3702	* dwarf_begin_elf.c: Fix warnings.
3703	* dwarf_dieoffset.c: Likewise.
3704	* dwarf_end.c: Likewise.
3705	* dwarf_error.c: Likewise.
3706	* dwarf_getpubnames.c: Likewise.
3707
3708	* libdwP.h: Add new error values.
3709	* dwarf_error.c: Support new error values.
3710	* dwarf_getpubnames.c: Check parameter value.
3711
37122005-02-05  Ulrich Drepper  <[email protected]>
3713
3714	* Makefile.am: Check for text relocations in constructed DSO.
3715
3716	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.
3717
37182005-02-04  Ulrich Drepper  <[email protected]>
3719
3720	* dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary
3721	checks to not read over buffer boundaries for ill-formed DWARF data.
3722
37232004-09-25  Ulrich Drepper  <[email protected]>
3724
3725	* dwarf_child.c: Make compile with gcc 4.0.
3726	* dwarf_error.c: Likewise.
3727	* dwarf_formblock.c: Likewise.
3728	* dwarf_getabbrev.c: Likewise.
3729	* dwarf_getattrs.c: Likewise.
3730	* dwarf_getsrclines.c: Likewise.
3731	* dwarf_tag.c: Likewise.
3732	* libdw_form.c: Likewise.
3733
37342004-01-20  Ulrich Drepper  <[email protected]>
3735
3736	* Makefile.am: Support building with mudflap.
3737
3738	* dwarf_getloclist.c: Fix warnings gcc 3.4 spits out.
3739	* dwarf_getsrclines.c: Likewise.
3740	* dwarf_memory-access.h: Likewise.
3741
37422004-01-19  Ulrich Drepper  <[email protected]>
3743
3744	* dwarf_getsrcfiles.c: Third parameter can be NULL.
3745
3746	* libdw.h: Define Dwarf_macro.  Declare dwarf_getmacros.
3747	Third parameter of dwarf_getsrcfiles can be NULL.
3748
3749	* libdw.map: Add dwarf_getmacros.
3750	* Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros.
3751	* dwarf_getmacros.c: New file.
3752
37532004-01-18  Ulrich Drepper  <[email protected]>
3754
3755	* libdw.h: Second parameter of dwarf_getaranges can be NULL.
3756
3757	* dwarf_nextcu.c: Return -1 if dwarf parameter is NULL.
3758
3759	* dwarf_getsrclines.c:
3760	Use read_2ubyte_unaligned_inc instead of _inc-less variant.
3761
3762	* dwarf_getaranges.c: Allow naranges parameter to be NULL.
3763
3764	* libdwP.h (_): Use elfutils domain.
3765
3766	* dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction.
3767
3768	* dwarf_getsrclines.c: Fix typo in comment.
3769
37702004-01-17  Ulrich Drepper  <[email protected]>
3771
3772	* Makefile.am: Support building with mudflap.
3773
37742004-01-16  Ulrich Drepper  <[email protected]>
3775
3776	* memory-access.h: Add lots of const in case a pointer passed is const.
3777
3778	* dwarf_formflag.c: New file.
3779	* dwarf_getattrs.c: New file.
3780	* dwarf_error.c: Add new error value.
3781	* libdw.h: Add prototypes for new functions.  Adjust prototype for
3782	dwarf_getpubnames.
3783	* libdw.map: Add new functions.
3784	* dwarf_getpubnames.c: Change type of return value and fourth parameter
3785	to ptrdiff_t.
3786	* libdwP.h: Add new error value.
3787	* Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and
3788	dwarf_formflag.c.
3789
3790	* dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL.
3791
37922004-01-12  Ulrich Drepper  <[email protected]>
3793
3794	* dwarf_getarange_addr.c: New file
3795	* dwarf_getarangeinfo.c: New file.
3796	* dwarf_getaranges.c: New file.
3797	* dwarf_onerange.c: New file.
3798	* libdw.h: Declare new functions.  Define Dwarf_Arange and
3799	Dwarf_Aranges.
3800	* libdw.map: Add new functions.
3801	* libdwP.h: Add new errors.  Add aranges member to struct Dwarf.
3802	Define Dwarf_Aranges_s and Dwarf_Arange_s.
3803	* Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c,
3804	dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c.
3805	* dwarf_error.c: Add new message.
3806
38072004-01-11  Ulrich Drepper  <[email protected]>
3808
3809	* Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c,
3810	dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c,
3811	dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c.
3812	* dwarf_error.c: Add another message.
3813	* dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines
3814	introduction.
3815	* dwarf_filesrc.c: Likewise.
3816	* dwarf_getsrcfiles.c: Likewise.
3817	* dwarf_getsrclines.c: Likewise.
3818	* dwarf_lineaddr.c: New file.
3819	* dwarf_linebeginstatement.c: New file.
3820	* dwarf_lineblock.c: New file.
3821	* dwarf_linecol.c: New file.
3822	* dwarf_lineendsequence.c: New file.
3823	* dwarf_lineepiloguebegin.c: New file.
3824	* dwarf_lineno.c: New file.
3825	* dwarf_lineprologueend.c: New file.
3826	* dwarf_onesrcline.c: New file.
3827	* dwarf_lineno.c: Change interface to store result in object pointed
3828	to by second parameter.
3829	* libdw.h: Add prototypes for new functions.  Change dwarf_lineno
3830	prototype.  Define Dwarf_Files and Dwarf_Lines.
3831	* libdw.map: Add new functions.
3832	* libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s.
3833	* libdw_findcu.c: Don't initialize nlines field.
3834
3835	* dwarf_siblingof: Little optimization.
3836
3837	* dwarf_begin.c: Remember that the ELF descriptor must be closed.
3838	* dwarf_end.c: Close ELF descriptor if free_elf is set.
3839	* libdwP.h (struct Dwarf): Add free_elf field.
3840
3841	* Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and
3842	dwarf_offabbrev.c.
3843	* dwarf_getstring.c: New file.
3844	* dwarf_offabbrev.c: New file.
3845	* libdw.map: Add dwarf_getstring and dwarf_offabbrev.
3846	* dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result
3847	parameters.  Don't allocate memory if not necessary and don't lookup
3848	previous results if no CU given.
3849	(dwarf_getabbrev): Adjust call to __libdw_getabbrev.
3850	* dwarf_tag.c: Adjust call to __libdw_getabbrev.
3851	* libdw.h: Declare dwarf_offabbrev and dwarf_getstring.
3852	* libdwP.h: Change prototype for __libdw_getabbrev.
3853
3854	* dwarf_getabbrevattr.c: Add offsetp parameter.  Fill in before
3855	returning if this is wanted.
3856
38572004-01-09  Ulrich Drepper  <[email protected]>
3858
3859	* dwarf_nextcu.c: Add new parameter offset_sizep.  Initialize it
3860	with offset_size value.
3861	* libdw.h: Adjust dwarf_nextcu prototype.
3862	* libdwP.h (struct Dwarf_CU): Add offset_size member.
3863	* libdw_findcu.c: Adjust dwarf_nextcu call.  Initialize offset_size
3864	member of new CU struct.
3865	* dwarf_formstring.c: Depend on offset_size not address_size for
3866	DW_FORM_strp handling.
3867	* dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr.
3868
3869	* dwarf_tag.c (__libdw_findabbrev): Return correct value for
3870	failing lookup.
3871	(dwarf_tag): Correctly recognize failed lookup.
3872
3873	* dwarf_end.c (cu_free):  Call tdestroy for locs member.  Use new
3874	function noop_free.
3875	* dwarf_error.c: Add message for DWARF_E_NO_BLOCK.
3876	* dwarf_formblock.c: New file.
3877	* dwarf_getloclist.c: Rewrite to handle a single block.
3878	* libdw.h: Define Dwarf_Block.  Rename Dwarf_Loc members.  Remove
3879	Dwarf_Locdesc definition.  Declare dwarf_formblock.  Remove
3880	dwarf_getloclistent declaration.
3881	* libdw.map: Add dwarf_formblock, remove dwarf_getloclistent.
3882	* libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK.
3883	Add locs member to struct Dwarf_CU.
3884	* libdw_fundcu.c: Initialize locs member of new CU.
3885	* Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c.
3886	Remove dwarf_getloclistent.c.
3887
38882004-01-07  Ulrich Drepper  <[email protected]>
3889
3890	* libdw.h: Use __nonnull__ attribute only for gcc >= 3.3.
3891	* libdwP.h: Likewise.
3892
3893	* dwarf_getloclist.c: New file.
3894	* dwarf_getloclistent.c: New file.
3895	* libdw.h: Define Dwarf_Loc and Dwarf_Locdesc.
3896	Declare dwarf_getloclistent and dwarf_getloclist.
3897	* libdw.map: Add dwarf_getloclistent and dwarf_getloclist.
3898	* libdwP.h: Define DWARF_E_NO_LOCLIST.
3899	* Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and
3900	dwarf_getloclist.c.
3901
3902	* dwarf_error.c: More error messages.
3903
39042004-01-06  Ulrich Drepper  <[email protected]>
3905
3906	* dwarf_getsrclines.c: Remove debugging support.
3907
3908	* dwarf_getsrcfiles.c: New file.
3909	* dwarf_filesrc.c: New file.
3910	* libdw.h: Declare these functions.  Define Dwarf_File.
3911	* libdwP.c: Adjust Dwarf_File_s definition.
3912	* libdw.map: Add these functions.
3913	* Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and
3914	dwarf_filesrc.c.
3915	* dwarf_getsrclines.c: Initialize cu->files.
3916
39172004-01-05  Ulrich Drepper  <[email protected]>
3918
3919	* libdw.h: Add more nonnull function attributes.
3920
3921	* dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next.
3922	* dwarf_end.c (cu_free): New function.
3923	(dwarf_end): Also free CU tree.  Correct freeing of memory blocks.
3924	* dwarf_error.c (errmsgs): Add new messages.
3925	* dwarf_getsrc_die.c: New file.
3926	* dwarf_getsrclines.c: New file.
3927	* dwarf_lineno.c: New file.
3928	* dwarf_linesrc.c: New file.
3929	* dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc
3930	instead of the *_inc-less variants.
3931	* libdw.h: Define Dwarf_Line.  Add some function attributes.  Declare
3932	dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc.
3933	* libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno,
3934	and dwarf_linesrc.
3935	* libdwP.h: Add more error codes.
3936	(struct Dwarf): Remove mem_tail.next member.
3937	(Dwarf_File): Define type.
3938	(struct Dwarf_Line_s): Define type.
3939	(struct Dwarf_CU): Add lines and nlines members.
3940	(libdw_alloc): Define local variable _tail and use it.
3941	Add some function attributes.
3942	* libdw_alloc.c (__libdw_allocate): Don't initialize next member.
3943	* libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members.
3944	* memory-access.h: Add unlikely for the endian conversion paths.
3945	* Makefile.am (AM_CFLAGS): Add -std parameter.
3946	(libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die,
3947	dwarf_lineno, and dwarf_linesrc.
3948
39492003-08-11  Ulrich Drepper  <[email protected]>
3950
3951	* Moved to CVS archive.
3952