07a1e8dfb09e6547c5e2122d38dbe54618b4ae78
[platform/upstream/elfutils.git] / libdwfl / ChangeLog
1 2019-10-07  Omar Sandoval  <osandov@fb.com>
2
3         * dwfl_frame.c (dwfl_getthreads): Get rid of unnecessary
4         thread_free_all_states calls.
5         (getthread): Ditto.
6         (state_free): Remove function.
7         (thread_free_all_states): Remove function.
8         (free_states): Add function.
9         (dwfl_thread_getframes): Don't update thread->unwound while unwinding.
10         * libdwflP.h (struct Dwfl_Thread): Update comment for unwound member.
11
12 2019-08-12  Mark Wielaard  <mark@klomp.org>
13
14         * gzip.c (open_stream): Return DWFL_E_ERRNO on bad file operation.
15         * open.c (libdw_open_elf): New argument bad_elf_ok. Check it and
16         return DWFL_E_NOERROR in case it is set and error was DWFL_E_BADELF.
17         (__libdw_open_file): Call libdw_open_elf with bad_elf_ok false.
18         (__libdw_open_elf): Call libdw_open_elf with bad_elf_ok true.
19
20 2019-08-05  Omar Sandoval  <osandov@fb.com>
21
22         * dwfl_segment_report_module.c (dwfl_segment_report_module): Assign
23         mod->main.fd.
24
25 2019-04-28  Mark Wielaard  <mark@klomp.org>
26
27         * frame_unwind.c (expr_eval): Make sure we left shift a unsigned
28         64bit value.
29
30 2019-04-28  Mark Wielaard  <mark@klomp.org>
31
32         * cu.c (addrarange): Only call realloc when naranges is not zero.
33
34 2019-03-27  Mark Wielaard  <mark@klomp.org>
35
36         * dwfl_segment_report_module.c (dwfl_segment_report_module): Check
37         ph_buffer_size vs xlatefrom.d_size after read_portion call.
38
39 2019-02-24  Mark Wielaard  <mark@klomp.org>
40
41         * linux-kernel-modules.c (intuit_kernel_bounds): Init *notes before
42         fopen.
43         (dwfl_linux_kernel_report_kernel): Remove fake note init empty asm.
44
45 2019-01-25  Yonghong Song  <yhs@fb.com>
46
47         * linux-proc-maps.c (proc_maps_report): Use PRIu64, not PRIi64, to
48         read the inode number.
49
50 2019-01-20  Mark Wielaard  <mark@klomp.org>
51
52         * dwfl_segment_report_module.c (dwfl_segment_report_module): Check
53         dyn_filesz vs dyn_data_size after read_portion call.
54
55 2019-01-16  Mark Wielaard  <mark@klomp.org>
56
57         * linux-core-attach.c (core_next_thread): Pass desc to ebl_core_note.
58         (core_set_initial_registers): Likewise.
59
60 2018-10-23  Mark Wielaard  <mark@klomp.org>
61
62         * relocate.c (relocate_section): Only sanity check mmapped Elf files
63         for overlap. Don't error when section data was malloced, not mmapped.
64
65 2018-10-20  Mark Wielaard  <mark@klomp.org>
66
67         * libdwflP.h (__libdw_open_elf): New internal function declaration.
68         * open.c (what_kind): Rename close_fd to may_close_fd.
69         (__libdw_open_file): Replaced (and renamed) by a call to ...
70         (libdw_open_elf): this. And add never_close_fd argument.
71         (__libdw_open_elf): New function that calls libdw_open_elf.
72
73 2018-10-18  Mark Wielaard  <mark@klomp.org>
74
75         * dwfl_segment_report_module.c (consider_note): Take align as new
76         argument.  Use align to set d_type and calculate padding.
77         (dwfl_segment_report_module): Pass align to consider_notes.
78         * core-file.c (dwfl_core_file_report): Check p_align to set ELF
79         type.
80         * linux-kernel-modules.c (check_notes): Check name and type of note
81         to determine padding.
82
83 2018-10-19  Mark Wielaard  <mark@klomp.org>
84
85         * dwfl_module_getdwarf.c (find_aux_sym): Check sh_entsize is not zero.
86
87 2018-10-14  Mark Wielaard  <mark@klomp.org>
88
89         * dwfl_segment_report_module.c (read_portion): Check requested
90         filesz isn't larger than buffer_available.
91         (dwfl_segment_report_module): Check data_size vs filesz after
92         read_portion call.
93
94 2018-10-02  Andreas Schwab  <schwab@suse.de>
95
96         * relocate.c (relocate): Handle ADD/SUB relocations.
97
98 2018-09-13  Mark Wielaard  <mark@klomp.org>
99
100         * dwfl_segment_report_module.c (dwfl_segment_report_module):
101         Document why we use e_shnum directly.
102         * elf-from-memory.c (elf_from_remote_memory): Likewise.
103
104 2018-07-17  Ulf Hermann  <ulf.hermann@qt.io>
105
106         * linux-pid-attach.c: Include sys/uio.h only on linux.
107
108 2018-06-04  Mark Wielaard  <mark@klomp.org>
109
110         * libdwflP.h (__libdwfl_addrsym): Remove function declaration.
111         * dwfl_module_addrsym.c (__libdwfl_addrsym): Make a static function.
112
113 2018-05-27  Mark Wielaard  <mark@klomp.org>
114
115         * relocate.c (__libdwfl_relocate): Always call relocate_section with
116         partial true.
117
118 2018-05-17  Mark Wielaard  <mark@klomp.org>
119
120         * dwfl_module (__libdwfl_module_free): Free elfdir.
121         * dwfl_module_getdwarf.c (load_dw): Close file descriptors after
122         dwarf_begin_elf call. Set Dwarf debugdir if it is NULL, this is the
123         main module file and we recorded the elfdir.
124         * libdwflP.h (struct Dwfl_Module): Add elfdir field.
125         * offline.c (process_elf): Record the elfdir before we close the
126         main ELF file descriptor.
127
128 2018-04-10  Mark Wielaard  <mark@klomp.org>
129
130         * frame_unwind.c (unwind): If __libdwfl_frame_reg_get fails for
131         the return address either set an error or mark the pc undefined.
132
133 2018-03-17  Mark Wielaard  <mark@klomp.org>
134
135         * libdwflP.h (struct __libdwfl_remote_mem_cache): New.
136         (struct __libdwfl_pid_arg): Add mem_cache field.
137         * linux-pid-attach.c (read_cached_memory): New function.
138         (clear_cached_memory): Likewise.
139         (pid_memory_read): Call read_cached_memory.
140         (pid_detach): Free mem_cache.
141         (pid_thread_detach): Call clear_cached_memory.
142         (dwfl_linux_proc_attach): Initialize mem_cache to NULL.
143
144 2018-03-05  Mark Wielaard  <mark@klomp.org>
145
146         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Use
147         realpath (name, NULL) instead of canonicalize_file_name (name).
148         * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise.
149
150 2018-01-29  Mark Wielaard  <mark@klomp.org>
151
152         * cu.c (cudie_offset): Use __libdw_first_die_off_from_cu instead of
153         DIE_OFFSET_FROM_CU_OFFSET.
154         (intern_cu): Simply use a copy of the given die CU as key instead of
155         trying to construct a dummy one by hand.
156
157 2018-02-15  Mark Wielaard  <mark@klomp.org>
158
159         * linux-pid-attach.c: Include sys/wait.h after sys/ptrace.h.
160
161 2018-02-09  Joshua Watt  <JPEWhacker@gmail.com>
162
163         * dwfl_report_elf.c (__libdwfl_elf_address_range): Use FALLTHROUGH
164         macro instead of comment.
165         * frame_unwind.c (expr_eval): Likewise.
166
167 2017-11-20  Mark Wielaard  <mark@klomp.org>
168
169         * link_map.c (do_check64): Take a char * and calculate type and val
170         offsets before reading, possibly unaligned, values.
171         (do_check32): Likewise.
172         (check64): Remove define.
173         (check32): Likewise.
174         (auxv_format_probe): Call do_check32 and do_check64 directly with
175         a, possibly unaligned, auxv entry pointer.
176         (dwfl_link_map_report): Redefine AUXV_SCAN to not dereference a
177         possibly unaligned auxv entry pointer.
178
179 2017-10-16  Mark Wielaard  <mark@klomp.org>
180
181         * argp-std.c (parse_opt): For -k call argp_failure not failure to
182         keep dwfl around.
183
184 2017-07-26  Yunlian Jiang  <yunlian@google.com>
185
186         * argp-std.c (failure): Move to file scope.
187         (fail): Likewise.
188
189 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
190             Mark Wielaard  <mark@klomp.org>
191
192         * derelocate.c (compare_secrefs): Compare by end address and then by
193         section number if addresses are equal.
194
195 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
196             Mark Wielaard  <mark@klomp.org>
197
198         * linux-kernel-modules.c: Always return NULL from kernel_release() on
199         non-linux systems and set errno to ENOTSUP.
200
201 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
202
203         * libdwflP.h: Don't include config.h.
204         * argp-std.c: Include config.h.
205         * cu.c: Likewise.
206         * derelocate.c: Likewise.
207         * dwfl_addrdie.c: Likewise.
208         * dwfl_addrdwarf.c: Likewise.
209         * dwfl_addrmodule.c: Likewise.
210         * dwfl_begin.c: Likewise.
211         * dwfl_build_id_find_debuginfo.c: Likewise.
212         * dwfl_build_id_find_elf.c: Likewise.
213         * dwfl_cumodule.c: Likewise.
214         * dwfl_dwarf_line.c: Likewise.
215         * dwfl_end.c: Likewise.
216         * dwfl_frame.c: Likewise.
217         * dwfl_frame_regs.c: Likewise.
218         * dwfl_getdwarf.c: Likewise.
219         * dwfl_getmodules.c: Likewise.
220         * dwfl_getsrc.c: Likewise.
221         * dwfl_getsrclines.c: Likewise.
222         * dwfl_line_comp_dir.c: Likewise.
223         * dwfl_linecu.c: Likewise.
224         * dwfl_lineinfo.c: Likewise.
225         * dwfl_linemodule.c: Likewise.
226         * dwfl_module.c: Likewise.
227         * dwfl_module_addrdie.c: Likewise.
228         * dwfl_module_addrname.c: Likewise.
229         * dwfl_module_addrsym.c: Likewise.
230         * dwfl_module_build_id.c: Likewise.
231         * dwfl_module_dwarf_cfi.c: Likewise.
232         * dwfl_module_eh_cfi.c: Likewise.
233         * dwfl_module_getdarf.c: Likewise.
234         * dwfl_module_getelf.c: Likewise.
235         * dwfl_module_getsrc.c: Likewise.
236         * dwfl_module_getsrc_file.c: Likewise.
237         * dwfl_module_getsym.c: Likewise.
238         * dwfl_module_info.c: Likewise.
239         * dwfl_module_nextcu.c: Likewise.
240         * dwfl_module_register_names.c: Likewise.
241         * dwfl_module_report_build_id.c: Likewise.
242         * dwfl_module_return_value_location.c: Likewise.
243         * dwfl_nextcu.c: Likewise.
244         * dwfl_onesrcline.c: Likewise.
245         * dwfl_report_elf.c: Likewise.
246         * dwfl_validate_address.c: Likewise.
247         * dwfl_version.c: Likewise.
248         * find-debuginfo.c: Likewise.
249         * gzip.c: Likewise.
250         * image-header.c: Likewise.
251         * lines.c: Likewise.
252         * linux-core-attach.c: Likewise.
253         * linux-pid-attach.c: Likewise.
254         * offline.c: Likewise.
255         * open.c: Likewise.
256         * relocate.c: Likewise.
257         * segment.c: Likewise.
258
259 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
260
261         * libdwfl.h: Use __const_attribute__.
262
263 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
264
265         * elf-from-memory.c: Explicitly cast phnum to size_t.
266
267 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
268
269         * dwfl_module_getdwarf.c: Check shnum for 0 before subtracting from
270         it.
271
272 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
273
274         * dwfl_frame.c: Drop unused sys/ptrace.h include.
275         * frame_unwind.c: Likewise.
276         * linux-pid-attach.c: Include sys/ptrace.h and sys/syscall.h only on
277         linux.
278
279 2017-04-20  Ulf Hermann <ulf.hermann@qt.io>
280
281         * linux-kernel-modules.c: Include sys/types.h before fts.h
282
283 2017-03-24  Mark Wielaard  <mark@klomp.org>
284
285         * linux-core-attach.c (core_next_thread): If n_namesz == 0 then
286         the note name data is the empty string.
287         (dwfl_core_file_attach): Likewise.
288
289 2017-02-15  Ulf Hermann  <ulf.hermann@qt.io>
290
291         * linux-kernel-modules.c: Include system.h.
292
293 2017-02-15  Ulf Hermann  <ulf.hermann@qt.io>
294
295         * linux-kernel-modules.c: Use sysconf(_SC_PAGESIZE) to get page size.
296         * linux-proc-maps.c: Likewise.
297
298 2016-12-29  Luiz Angelo Daros de Luca  <luizluca@gmail.com>
299
300         * dwfl_build_id_find_elf.c: Include system.h.
301         * dwfl_module_getdwarf.c: Likewise.
302         * libdwfl_crc32_file.c: Don't define LIB_SYSTEM_H.
303
304 2016-11-23  Mark Wielaard  <mjw@redhat.com>
305
306         * linux-kernel-modules.c: Only include fts.h early if BAD_FTS is
307         defined.
308
309 2016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
310
311         * core-file.c: Remove sys/param.h.
312         * dwfl_segment_report_module.c: Likewise. Add system.h include.
313         (MAX): Remove definition.
314         * frame_unwind.c: Add system.h include.
315         (MAX): Remove definition.
316         * linux-core-attach.c (MIN): Remove definition.
317         * linux-pid-attach.c (MAX): Likewise.
318
319 2016-08-12  Mark Wielaard  <mjw@redhat.com>
320
321         * link_map.c (dwfl_link_map_report): Fix assert, set in.d_size.
322
323 2016-04-14  Mark Wielaard  <mjw@redhat.com>
324
325         * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Free match
326         on invalid DWARF if we allocated it.
327
328 2016-04-14  Mark Wielaard  <mjw@redhat.com>
329
330         * linux-proc-maps.c (proc_maps_report): Free last_file on bad file
331         mapping.
332
333 2016-03-01  Steven Chamberlain  <steven@pyro.eu.org>
334
335         * linux-pid-attach.c: Removed unused pid_thread_callbacks,
336         pid_thread_detach, pid_detach, pid_set_initial_registers,
337         pid_memory_read, pid_getthread, pid_next_thread in #ifndef
338         __linux__ code.
339
340 2016-02-22  Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
341             Mark Wielaard  <mjw@redhat.com>
342
343         * find-debuginfo.c (find_debuginfo_in_path): Remember whether
344         debuglink_file is NULL. Try file basename (without .debug) ofr
345         absolute and relative path if debug_file was NULL.
346         * linux-kernel-modules.c (try_kernel_name): If try_debug is true call
347         dwfl_standard_find_debuginfo with NULL debuglink_file, otherwise with
348         basename of fname.
349
350 2016-02-13  Mark Wielaard  <mjw@redhat.com>
351
352         * linux-proc-maps.c (proc_maps_report): Free last_file when ENOEXEC.
353
354 2016-02-13  Mark Wielaard  <mjw@redhat.com>
355
356         * frame_unwind.c (new_unwound): Check and return unwound.
357         (handle_cfi): Check new_unwound was able to allocate new memory
358         before use. Return DWFL_E_NOMEM otherwise.
359
360 2016-02-11  Mark Wielaard  <mjw@redhat.com>
361
362         * relocate.c (relocate_section): Check result of all gelf_get* calls.
363         (__libdwfl_relocate): Likewise.
364         (__libdwfl_relocate_section): Likewise.
365
366 2016-02-11  Mark Wielaard  <mjw@redhat.com>
367
368         * relocate.c (relocate_section): Check result of gelf_update_* calls.
369
370 2016-01-08  Mark Wielaard  <mjw@redhat.com>
371
372         * libdwfl_a_SOURCES: Unconditionally add gzip.c.
373         * linux-kernel-modules.c (vmlinux_suffixes): We always have at least
374         .gz support.
375         (try_kernel_name): Likewise.
376         (check_suffix): Likewise.
377         * open.c (decompress): Likewise.
378
379 2015-12-18  Mark Wielaard  <mjw@redhat.com>
380
381         * dwfl_module_getdwarf.c (find_symtab): Uncompress symstr, xndx, sym
382         sections and aux_str, aux_xndx and aux_sym sections if necessary.
383         * relocate.c (relocate_getsym): Uncompress symtab and symtab_shndx
384         if necessary.
385         (resolve_symbol): Uncompress strtab section if necessary.
386         (relocate_section): Uncompress the section the relocations apply to
387         if necessary.
388
389 2015-11-18  Chih-Hung Hsieh <chh@google.com>
390
391         * linux-proc-maps.c (proc_maps_report): Move nested function
392         'report' to file scope.
393
394 2015-11-18  Chih-Hung Hsieh <chh@google.com>
395
396         * core-file.c (elf_begin_rand): Move nested function 'fail' to file
397         scope.
398         * core-file.c (dwfl_elf_phdr_memory_callback): Move nested functions
399         'update_end' and 'more' to file scope.
400
401 2015-11-17  Chih-Hung Hsieh <chh@google.com>
402
403         * link_map.c (auxv_format_probe): Move nested functions
404         check64 and check32 to file scope.
405
406 2015-12-08  Jose E. Marchesi  <jose.marchesi@oracle.com>
407
408         * dwfl_frame.c (state_fetch_pc): Add a backend-defined offset to
409         the value of the return address register as defined by the CFI
410         abi.
411         * frame_unwind.c (handle_cfi): Likewise.
412
413 2015-12-01  Mark Wielaard  <mjw@redhat.com>
414
415         * link_map.c (dwfl_link_map_report): Track whether in.d_buf comes
416         from exec or memory_callback, free as appropriate.
417
418 2015-12-01  Mark Wielaard  <mjw@redhat.com>
419
420         * libdwflP.h (struct Dwfl_User_Core): New.
421         (struct DWfl): Replace executable_for_core with user_core.
422         * argp-std.c (parse_opt): Store core and fd in Dwfl user_core.
423         * core-file.c (dwfl_core_file_report): Check and store
424         executable_for_core in Dwfl user_core.
425         * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Check and use
426         executable_for_core in Dwfl user_core.
427         * dwfl_end.c (dwfl_end): Release resources held in Dwfl user_core.
428         * link-map.c (report_r_debug): Check executable_for_core in Dwfl
429         user_core.
430         (dwfl_link_map_report): Likewise.
431
432 2015-11-16  Chih-Hung Hsieh <chh@google.com>
433
434         * dwfl_module_getdwarf.c (find_prelink_address_sync): Move nested
435         function 'consider_shdr' to file scope.
436         * dwfl_module_getdwarf.c (find_dynsym): Move nested function
437         'translate_offs' to file scope.
438
439 2015-11-16  Chih-Hung Hsieh <chh@google.com>
440
441         * dwfl_module_addrsym.c (__libdwfl_addrsym): Move nested functions
442         'same_section', 'binding_value', 'try_sym_value', and 'search_table'
443         to file scope.
444
445 2015-11-19  Mark Wielaard  <mjw@redhat.com>
446
447         * dwfl_module.c (__libdwfl_module_free): Remove Dwfl_Module Ebl from
448         eh_cfi and dwarf_cfi cache if necessary before calling dwarf_end and
449         dwarf_cfi_end.
450
451 2015-11-13  Chih-Hung Hsieh <chh@google.com>
452
453         * gzip.c (unzip): Move nested functions to file scope.
454
455 2015-10-21  Chih-Hung Hsieh <chh@google.com>
456             Mark Wielaard  <mjw@redhat.com>
457
458         * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Move nested
459         functions 'dwarf_line_file', 'dwfl_line', and 'dwfl_line_file' to
460         file scope. Rename dwarf_line_file to dwfl_dwarf_line_file. Don't
461         use INTUSE.
462
463 2015-10-21  Chih-Hung Hsieh <chh@google.com>
464
465         * frame_unwind.c (expr_eval): Move nested function 'push' and 'pop'
466         to file scope. Pass used local variables in struct eval_stack.
467
468 2015-10-21  Chih-Hung Hsieh <chh@google.com>
469
470         * dwfl_module.c (dwfl_report_module): Move nested function 'use' to
471         file scope.
472
473 2015-10-09  Josh Stone  <jistone@redhat.com>
474
475         * core-file.c (elf_begin_rand): Replace loff_t with off_t.
476         * open.c (decompress): Replace off64_t with off_t.
477         * gzip.c (unzip): Likewise.
478         * image-header.c (__libdw_image_header): Likewise.
479         * libdwflP.h: Likewise in function declarations.
480         * argp-std.c (parse_opt): Replace open64 with open.
481         * dwfl_build_id_find_elf.c (__libdwfl_open_mod_by_build_id,
482         dwfl_build_id_find_elf): Likewise.
483         * dwfl_module_getdwarf.c (open_elf_file): Likewise.
484         * dwfl_report_elf.c (dwfl_report_elf): Likewise.
485         * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
486         * link_map.c (report_r_debug): Likewise.
487         * offline.c (dwfl_report_offline): Likewise.
488         * linux-proc-maps.c (grovel_auxv, get_pid_class,
489         dwfl_linux_proc_find_elf): Likewise.
490         (read_proc_memory): Replace off64_t with off_t.
491         * find-debuginfo.c (find_debuginfo_in_path): Replace stat64 and
492         fstat64 with stat and fstat.
493         (try_open): Likewise, and replace open64 with open.
494         * linux-kernel-modules.c: Manually define open and fopen to open64 and
495         fopen64 when needed, since the early fts.h include breaks that.
496         (try_kernel_name): Replace open64 with open.
497         (check_notes): Likewise.
498
499 2015-10-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
500
501         * linux-proc-maps.c (read_proc_memory): Use seek+read instead of
502         pread, as the later doesn't accept negative offsets.
503
504 2015-10-07  Mark Wielaard  <mjw@redhat.com>
505
506         * dwfl_module_getdwarf.c (MAX): Removed.
507         (find_prelink_address_sync): Allocate exact amount of bytes for
508         phdrs and shdrs.
509         * dwfl_segment_report_module.c (dwfl_segment_report_module):
510         Likewise for phdrs.
511         * elf-from-memory.c (MAX): Removed.
512         (elf_from_remote_memory): Allocate exact amount of bytes for phdrs.
513
514 2015-10-05  Chih-Hung Hsieh <chh@google.com>
515
516         * dwfl_module_getdwarf.c (find_prelink_address_sync): Do not use
517         union of variable length arrays.
518         * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
519         * elf-from-memory.c (elf_from_remote_memory): Likewise.
520         * link_map.c (auxv_format_probe): Likewise.
521         * link_map.c (report_r_debug): Likewise.
522         * link_map.c (dwfl_link_map_report): Likewise.
523
524 2015-09-18  Chih-Hung Hsieh  <chh@google.com>
525
526         * relocate.c (relocate_section): Move nested function "relocate"
527         to file scope, pass all used local variables as constants.
528         Move nested "check_badreltype" to file scope, pass addresses of
529         updated used local variables.
530         * linux-kernel-modules.c (intuit_kernel_bounds): Move nested function
531         "read_address" to file scope, pass all updated local variables in
532         a state structure.
533         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Move nested
534         function "subst_name" to file scope, pass all used local variables
535         as constants.
536         * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Replace
537         simple nested function "report" with a macro. Work around gcc static
538         analysis error -Werror=maybe-uninitialized.
539
540 2015-09-22  Mark Wielaard  <mjw@redhat.com>
541
542         * core-file.c: Remove old-style function definitions.
543         * dwfl_error.c: Likewise.
544         * dwfl_module_dwarf_cfi.c: Likewise.
545         * dwfl_module_eh_cfi.c: Likewise.
546         * dwfl_module_register_names.c: Likewise.
547         * dwfl_module_return_value_location.c: Likewise.
548         * dwfl_version.c: Likewise.
549
550 2015-09-09  Chih-Hung Hsieh  <chh@google.com>
551             Mark Wielaard  <mjw@redhat.com>
552
553         * dwfl_frame.c (dwfl_attach_state): Remove redundant NULL tests
554         on parameters declared with __nonnull_attribute__.
555         * libdwfl.h (dwfl_module_getelf): Don't mark first argument as
556         nonnull.
557
558 2015-09-08  Mark Wielaard  <mjw@redhat.com>
559
560         * libdwflP.h (struct __libdwfl_pid_arg): Add elf and elf_fd.
561         * linux-pid-attach.c (pid_detach): Call elf_end and close.
562         (dwfl_linux_proc_attach): Open and save /proc/PID/exe.
563
564 2015-09-04  Chih-Hung Hsieh  <chh@google.com
565
566         * frame_unwind.c (expr_eval): Use llabs instead of abs.
567
568 2015-08-14  Dodji Seketeli  <dodji@seketeli.org>
569
570         * find-debuginfo.c (find_debuginfo_in_path): Try to locate the
571         debug info file named debuglink_file under
572         mod->dwfl->callbacks->debuginfo_path, by looking at
573         the set of sub-trees under mod->dwfl->callbacks->debuginfo_path
574         which is common to the set of non-absolute parent trees of
575         file_name.
576
577 2015-06-18  Mark Wielaard  <mjw@redhat.com>
578
579         * find-debuginfo.c (try_open): Free fname on all failure paths.
580
581 2015-06-18  Mark Wielaard  <mjw@redhat.com>
582
583         * dwfl_module_getdwarf.c (find_symtab): Check shdr is not NULL and
584         sh_entsize is not zero.
585
586 2015-06-06  Mark Wielaard  <mjw@redhat.com>
587
588         * find-debuginfo.c (find_debuginfo_in_path): Always free localpath,
589         localname and file_dirname.
590
591 2015-06-06  Mark Wielaard  <mjw@redhat.com>
592
593         * derelocate.c (cache_sections): Free sortrefs.
594
595 2015-06-05  Mark Wielaard  <mjw@redhat.com>
596
597         * dwfl_segment_report_module.c (dwfl_segment_report_module):
598         If the note_file exists, but the build_id doesn't match discard
599         the file and continue reporting.
600
601 2015-06-01  Mark Wielaard  <mjw@redhat.com>
602
603         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Copy path
604         pointer before passing to strsep.
605
606 2015-05-30  Mark Wielaard  <mjw@redhat.com>
607
608         * link_map.c (check32): Use read_4ubyte_unaligned_noncvt to read
609         type and value.
610         (read_addrs): Use read_(4|8)ubyte_unaligned_noncvt or to read
611         adresses.
612
613 2015-05-30  Mark Wielaard  <mjw@redhat.com>
614
615         * find-debuginfo.c (dwfl_standard_find_debuginfo): Check file_name is
616         not NULL before calling canonicalize_file_name.
617
618 2015-05-24  Mark Wielaard  <mjw@redhat.com>
619
620         * derelocate.c (check_module): Check mod is not NULL.
621
622 2015-05-22  Mark Wielaard  <mjw@redhat.com>
623
624         * link_map.c (dwfl_link_map_report): Allocate phdrs and dyn with
625         malloc instead of stack allocating. Call free when done with data.
626
627 2015-05-22  Mark Wielaard  <mjw@redhat.com>
628
629         * dwfl_segment_report_module.c (dwfl_segment_report_module):
630         Allocate phdrs with malloc, not on stack. free in finish.
631         Allocate dyn with malloc, not on stack, free after use.
632
633 2015-05-22  Mark Wielaard  <mjw@redhat.com>
634
635         * find-debuginfo.c (find_debuginfo_in_path): malloc or strdup,
636         instead of alloca or strdupa, local strings of unknown size.
637         Call free before return.
638
639 2015-05-22  Mark Wielaard  <mjw@redhat.com>
640
641         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Return
642         error when id_len too small or too large. strdup, not strdupa,
643         and free path when done.
644
645 2015-05-19  Mark Wielaard  <mjw@redhat.com>
646
647         * elf-from-memory.c (elf_from_remote_memory): Don't allocate all
648         phdrs on the stack. Allocate with malloc and free when done.
649
650 2015-05-19  Mark Wielaard  <mjw@redhat.com>
651
652         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): malloc and
653         free alternate_name.
654
655 2015-05-19  Mark Wielaard  <mjw@redhat.com>
656
657         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't
658         stack allocate name. Only change chars up to suffix.
659
660 2015-05-18  Mark Wielaard  <mjw@redhat.com>
661
662         * dwfl_module_getdwarf.c (find_prelink_address_sync): Allocate
663         phdrs and shdrs unions with malloc, not alloca. Free after use.
664
665 2015-05-18  Mark Wielaard  <mjw@redhat.com>
666
667         * derelocate.c (cache_sections): Allocate temporary newrefs and
668         sortrefs with malloc, not alloca. Always free them on return.
669
670 2015-05-07  Mark Wielaard  <mjw@redhat.com>
671
672         * cu.c (intern_cu): Check for EOF and check cuoff points to a real
673         Dwarf_Die before interning. Explicitly check EOF is expected.
674
675 2015-05-05  Mark Wielaard  <mjw@redhat.com>
676
677         * dwfl_lineinfo.c (dwfl_lineinfo): Check info->file is valid.
678
679 2015-05-06  Roland McGrath  <roland@hack.frob.com>
680
681         * dwfl_error.c (struct msgtable): Break type definition out of
682         the 'msgtable' initializer.
683         (msgtable): Make it a union of struct msgtable and a char array.
684         (msgstr): Use the full-table char array rather than the msg_0 entry.
685
686 2015-04-23  Max Filippov  <jcmvbkbc@gmail.com>
687
688         * core-file.c (_compat_without_executable_dwfl_core_file_report):
689         Guard with SYMBOL_VERSIONING.
690         * dwfl_module_build_id.c (_compat_vaddr_at_end_dwfl_module_build_id):
691         Likewise.
692         * dwfl_report_elf.c (_compat_without_add_p_vaddr_dwfl_report_elf):
693         Likewise.
694
695 2015-04-02  Mark Wielaard  <mjw@redhat.com>
696
697         * segment.c (insert): Check correct number of lookup_elts.
698
699 2015-03-31  Mark Wielaard  <mjw@redhat.com>
700
701         * core-file.c (core_file_read_eagerly): Special case small images.
702
703 2015-01-26  Mark Wielaard  <mjw@redhat.com>
704
705         * dwfl_module_getdwarf.c (find_symtab): Explicitly clear symdata,
706         syments and first_global on elferr before calling find_dynsym.
707
708 2014-12-27  Mark Wielaard  <mjw@redhat.com>
709
710         * dwfl_module_getsrc.c (dwfl_module_getsrc): Never match a line that
711         has end_sequence set.
712
713 2015-01-04  Mark Wielaard  <mjw@redhat.com>
714
715         * cu.c (intern_cu): Store result and return directly when finding
716         EOF marker.
717         (__libdwfl_nextcu): Check *nextp as returned by intern_cu isn't -1.
718
719 2014-12-19  Mark Wielaard  <mjw@redhat.com>
720
721         * dwfl_module_getdwarf.c (find_symtab): Always try find_dynsym last.
722
723 2014-12-19  Mark Wielaard  <mjw@redhat.com>
724
725         * elf-from-memory.c (handle_segment): Remove palign sanity check.
726
727 2014-12-18  Mark Wielaard  <mjw@redhat.com>
728
729         * relocate.c (resolve_symbol): Make sure symstrdata->d_buf != NULL.
730
731 2014-12-13  Mark Wielaard  <mjw@redhat.com>
732
733         * dwfl_module_getdwarf.c (find_dynsym): elf_getdata_rawchunk takes
734         a size_t, make sure it doesn't overflow.
735
736 2014-12-13  Mark Wielaard  <mjw@redhat.com>
737
738         * cu.c (cudie_offset): Make sure Dwarf_Off difference doesn't
739         wrap around before returning as int.
740
741 2014-12-11  Josh Stone  <jistone@redhat.com>
742
743         * dwfl_module_getsrc.c (dwfl_module_getsrc): Return the *last* line
744         record <= addr, rather than returning immediately on matches.
745
746 2014-12-09  Mark Wielaard  <mjw@redhat.com>
747
748         * dwfl_segment_report_module.c (handle_file_note): Check count doesn't
749         overflow.
750
751 2014-12-07  Mark Wielaard  <mjw@redhat.com>
752
753         * relocate.c (relocate_section): Sanity check section overlap against
754         actually used ehsize, shentsize and phentsize.
755
756 2014-12-07  Mark Wielaard  <mjw@redhat.com>
757
758         * offline.c (dwfl_offline_section_address): Assert shndx is not zero.
759         * relocate.c (__libdwfl_relocate_value): Don't relocate against
760         section zero.
761
762 2014-11-29  Mark Wielaard  <mjw@redhat.com>
763
764         * relocate.c (relocate_section): Check relocation section and target
765         section data don't overlap any of the ELF headers.
766         (relocate): Check for offset + size overflow.
767
768 2014-11-22  Mark Wielaard  <mjw@redhat.com>
769
770         * link_map.c (consider_executable): Use elf_getphdrnum.
771         (dwfl_link_map_report): Likewise.
772
773 2014-11-18  Mark Wielaard  <mjw@redhat.com>
774
775         * dwfl_module_getdwarf.c (find_symtab): Sanity check the data buffer,
776         number of symbols and first_global before use.
777
778 2014-11-14  Mark Wielaard  <mjw@redhat.com>
779
780         * dwfl_module_getdwarf.c (load_symtab): Don't use tables which have
781         a zero sh_entsize.
782
783 2014-11-10  Mark Wielaard  <mjw@redhat.com>
784
785         * dwfl_module_getdwarf.c (find_dynsym): New inner function
786         translate_offs that takes an adjust argument. Try finding
787         the symbol table with and without adjusting to main_bias.
788
789 2014-09-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
790
791         Support NT_FILE for locating files.
792         * core-file.c (dwfl_core_file_report): New variables note_file and
793         note_file_size, set them and pass them to dwfl_segment_report_module.
794         * dwfl_segment_report_module.c: Include common.h and fcntl.h.
795         (buf_has_data, buf_read_ulong, handle_file_note): New functions.
796         (invalid_elf): New function from code of dwfl_segment_report_module.
797         (dwfl_segment_report_module): Add parameters note_file and
798         note_file_size.  New variables elf and fd, clean them up in finish.
799         Move some code to invalid_elf.  Call handle_file_note, if it found
800         a name verify the file by invalid_elf.  Protect elf and fd against
801         cleanup by finish if we found the file for new Dwfl_Module.
802         * libdwflP.h (dwfl_segment_report_module): Add parameters note_file and
803         note_file_size.
804
805 2014-09-23  Mark Wielaard  <mjw@redhat.com>
806
807         * dwfl_segment_report_module.c (dwfl_segment_report_module):
808         Extract ei_class, ei_data and e_type early and use the result.
809
810 2014-09-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
811
812         * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE.
813         * dwfl_segment_report_module.c (dwfl_segment_report_module): Set
814         IS_EXECUTABLE.
815         * libdwflP.h (struct Dwfl_Module): New field is_executable.
816
817 2014-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
818
819         * dwfl_module_getdwarf.c (find_offsets): Add parameter main_bias, use
820         it.
821         (find_dynsym): Pass the new parameter main_bias.
822
823 2014-08-14  Mark Wielaard  <mjw@redhat.com>
824
825         * linux-kernel-modules.c (check-suffix): Also TRY .ko.xz.
826
827 2014-07-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
828
829         Fix report_r_debug for prelinked libraries.
830         * link_map.c (report_r_debug): Comment out variable l_addr.
831         Use instead new variable base recalculated from l_ld.
832
833 2014-06-24  Kurt Roeckx  <kurt@roeckx.be>
834
835         * linux-pid-attach.c: Make it build on non linux hosts.
836
837 2014-06-17  Mark Wielaard  <mjw@redhat.com>
838
839         * frame_unwind.c (handle_cfi): Use ebl_func_addr_mask.
840         * dwfl_module_getsym.c (__libdwfl_getsym): Likewise.
841
842 2014-06-15  Mark Wielaard  <mjw@redhat.com>
843
844         * linux-core-attach.c (core_memory_read): Use libdw/memory-access.h
845         macros read_4ubyte_unaligned_noncvt and read_8ubyte_unaligned_noncvt
846         to read possibly unaligned data.
847         (core_next_thread): Likewise.
848         (core_set_initial_registers): Likewise.
849         (dwfl_core_file_attach): Likewise.
850
851 2014-06-11  Mark Wielaard  <mjw@redhat.com>
852
853         * dwfl_frame.c (__libdwfl_process_free): Reset dwfl->attacherr.
854         (dwfl_attach_state): Set dwfl->attacherr.
855         (dwfl_pid): Check and return dwfl->attacherr if set.
856         (dwfl_getthreads): Likewise.
857         (getthread): Likewise.
858         * libdwflP.h: Add DWFL_E_NO_CORE_FILE.
859         (struct Dwfl): Add attacherr field.
860         * linux-core-attach.c (dwfl_core_file_attach): Set dwfl->attacherr.
861         Don't assert if ELF file is not ET_CORE, just return error.
862         * linux-pid-attach.c (dwfl_linux_proc_attach): Set dwfl->attacherr.
863
864 2014-06-10  Mark Wielaard  <mjw@redhat.com>
865
866         * argp-std.c (parse_opt): Ignore errors from dwfl_core_file_attach
867         or dwfl_linux_proc_attach.
868
869 2014-05-15  Mark Wielaard  <mjw@redhat.com>
870
871         * linux-proc-maps.c (grovel_auxv): Close fd on error.
872
873 2014-05-02  Mark Wielaard  <mjw@redhat.com>
874
875         * dwfl_module_getdwarf: Remove ENABLE_DWZ ifdefs so find_debug_altlink
876         is always called.
877
878 2014-05-01  Mark Wielaard  <mjw@redhat.com>
879
880         * libdwflP.h (struct Dwfl_Module): Add alt, alt_fd and alt_elf fields.
881         (__libdwfl_open_mod_by_build_id): Renamed __libdwfl_open_by_build_id.
882         (__libdwfl_open_by_build_id): New declaration that takes an explicit
883         build-id.
884         * dwfl_build_id_find_debuginfo.c (dwfl_build_id_find_debuginfo): If
885         we already have the Dwarf then look for the alt dwz multi file by
886         build-id.
887         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Add the
888         build-id we are looking for as argument.
889         (__libdwfl_open_mod_by_build_id): New function, calls
890         __libdwfl_open_by_build_id.
891         (dwfl_build_id_find_elf): Call __libdwfl_open_mod_by_build_id.
892         * dwfl_module.c (__libdwfl_module_free): Release alt, alt_elf and
893         close alt_fd if necessary.
894         * dwfl_module_getdwarf.c (__check_build_id): Removed.
895         (try_debugaltlink): Removed.
896         (open_debugaltlink): Removed.
897         (open_elf_file): First half of open_elf that just opens the elf
898         file but doesn't setup the load address.
899         (open_elf): Call open_elf_file.
900         (find_debug_altlink): New function.
901         (load_dw): Remove loading of dwz multifile.
902         (find_dw): Call find_debug_altlink.
903         * find-debuginfo.c (validate): Handle alt debug case using
904         dwelf_dwarf_gnu_debugaltlink and mod->alt_elf.
905         (find_debuginfo_in_path): Handle alt debug files possibly in .dwz
906         subdirs.
907         * linux-kernel-modules.c (try_kernel_name): Use fakemod.debug.name
908         to store name to find by dwfl_standard_find_debuginfo instead of
909         allocating an extra variable on stack.
910
911 2014-04-30  Mark Wielaard  <mjw@redhat.com>
912
913         * dwfl_module_build_id.c (__libdwfl_find_elf_build_id): Moved to
914         dwelf_elf_gnu_build_id.c.
915         (__libdwfl_find_build_id): Add assert to make sure mod is never NULL.
916         * dwfl_segment_report_module.c (dwfl_segment_report_module): Call
917         dwelf_elf_gnu_build_id directly instead of __libdwfl_find_build_id.
918         * dwfl_module_getdwarf.c (__check_build_id): Implement using
919         dwelf_elf_gnu_build_id.
920
921 2014-04-15  Florian Weimer  <fweimer@redhat.com>
922
923         * dwfl_module_getdwarf.c (__check_build_id): Moved from libdw.
924         (try_debugaltlink): Likewise.
925         (open_debugaltlink): Likewise.
926         (load_dw): Locate alternate debug information using
927         dwelf_dwarf_gnu_debugaltlink and call open_debugaltlink.
928
929 2014-04-11  Mark Wielaard  <mjw@redhat.com>
930
931         * Makefile.am (AM_CPPFLAGS): Add libdwelf.
932         * libdwflP.h: Include libdwelfP.h.
933         * dwfl_module_getdwarf.c (find_debuglink): Moved to libdwelf.
934         (find_debuginfo): Use dwelf_elf_gnu_debuglink.
935
936 2014-04-22  Mark Wielaard  <mjw@redhat.com>
937
938         * frame_unwind.c (__libdwfl_frame_reg_get): Use uint64_t when
939         checking bits.
940         (__libdwfl_frame_reg_set): Likewise.
941
942 2014-04-22  Kurt Roeckx  <kurt@roeckx.be>
943
944         * linux-pid-attach.c: Make linux only.
945
946 2014-03-14  Mark Wielaard  <mjw@redhat.com>
947
948         * Makefile.am: Remove !MUDFLAP and MUDFLAP conditions.
949         Remove libelf and libdw definitions when MUDFLAP is defined.
950         * argp-std.c (__libdwfl_argp_mudflap_options): Removed.
951
952 2014-03-03  Mark Wielaard  <mjw@redhat.com>
953
954         * elf-from-memory.c (elf_from_remote_memory): Keep track of
955         segments_end_mem. Pass memsz to first handle_segment pass. Only
956         extend contents_size and use shdrs if only file bits are in
957         segment.
958
959 2014-03-11  Josh Stone  <jistone@redhat.com>
960
961         * dwfl_module_getdwarf.c (open_elf): Only explicitly set
962         mod->e_type when processing the main ELF file.
963
964 2014-03-04  Mark Wielaard  <mjw@redhat.com>
965
966         * libdwflP.h (struct __libdwfl_pid_arg): Moved here and renamed from
967         linux-pid-attach.c (struct pid_arg).
968         (__libdwfl_get_pid_arg): New internal function declaration.
969         (__libdwfl_ptrace_attach): Likewise.
970         (__libdwfl_ptrace_detach): Likewise.
971         * dwfl_frame.c (dwfl_attach_state): Add "(deleted)" files to the
972         special exception modules that cannot be checked at this point.
973         * linux-pid-attach.c (struct pid_arg): Moved to libdwflP.h
974         (ptrace_attach): Renamed to...
975         (__libdwfl_ptrace_attach): New internal function.
976         (__libdwfl_ptrace_detach): Likewise. Extracted from ...
977         (pid_thread_detach): Call __libdwfl_ptrace_detach now.
978         (__libdwfl_get_pid_arg): New internal function.
979         * linux-proc-maps.c (dwfl_linux_proc_find_elf): Check if special
980         module name contains "(deleted)" and dwfl_pid gives an attached
981         pid. If pid is set and try to (re)use ptrace attach state of
982         process before reading memory.
983
984 2014-03-03  Mark Wielaard  <mjw@redhat.com>
985
986         * elf-from-memory.c (elf_from_remote_memory): Take pagesize as
987         argument. Free buffer when detecting bad elf. Check PT_LOAD
988         alignment requirements on first handle_segment pass. Calculate
989         loadbase, start and end of segment using pagesize, not p_align.
990         * linux-proc-maps.c (dwfl_linux_proc_find_elf): Provide pagesize
991         to elf_from_remote_memory.
992
993 2014-02-26  Mark Wielaard  <mjw@redhat.com>
994
995         * linux-proc-maps.c (proc_maps_report): Don't assert on bad input.
996
997 2014-02-26  Mark Wielaard  <mjw@redhat.com>
998
999         * elf-from-memory.c (elf_from_remote_memory): Check against p64
1000         p_type in case ELFCLASS64, not against p32 p_type.
1001
1002 2014-01-17  Petr Machata  <pmachata@redhat.com>
1003
1004         * relocate.c (relocate_section): Use gelf_fsize instead of relying
1005         on shdr->sh_entsize.
1006
1007 2014-01-05  Mark Wielaard  <mjw@redhat.com>
1008
1009         * frame_unwind.c (handle_cfi): Only skip resetting return register
1010         if the regno is not the actual CIE return address register.
1011
1012 2014-01-02  Mark Wielaard  <mjw@redhat.com>
1013
1014         * linux-pid-attach.c (dwfl_linux_proc_attach): Use strtol, not atoi.
1015
1016 2013-12-30  Mark Wielaard  <mjw@redhat.com>
1017
1018         * argp-std.c (parse_opt): Call dwfl_linux_proc_attach and
1019         dwfl_core_file_attach explicitly.
1020         * core-file.c (dwfl_core_file_report): Don't call
1021         __libdwfl_attach_state_for_core implicitly.
1022         * dwfl_begin.c (dwfl_begin): Remove setting of process_attach_error.
1023         * dwfl_frame.c (dwfl_pid): Set errno to DWFL_E_NO_ATTACH_STATE, not
1024         process_attach_error.
1025         (dwfl_getthreads): Likewise.
1026         (getthread): Likewise.
1027         * libdwfl.h (dwfl_core_file_report): Update documentation.
1028         (dwfl_linux_proc_report): Likewise.
1029         (dwfl_core_file_attach): New function declaration.
1030         (dwfl_linux_proc_attach): Likewise.
1031         * libdwflP.h (struct Dwfl): Remove process_attach_error.
1032         (__libdwfl_attach_state_for_pid): Removed declaration.
1033         (__libdwfl_attach_state_for_core): Likewise.
1034         (dwfl_core_file_attach): New internal declaration.
1035         (dwfl_linux_proc_attach): Likewise.
1036         (attach_state_for_core): Renamed to...
1037         (dwfl_core_file_attach): ...this. Change return type.
1038         (__libdwfl_attach_state_for_core): Removed.
1039         * linux-pid-attach.c (struct pid_arg): Add assume_ptrace_stopped.
1040         (pid_set_initial_registers): Check assume_ptrace_stopped before
1041         calling ptrace.
1042         (pid_thread_detach): Likewise.
1043         (__libdwfl_attach_state_for_pid): Renamed to...
1044         (dwfl_linux_proc_attach): ...this. Adjust return type.
1045         * linux-proc-maps.c (dwfl_linux_proc_report): Don't call
1046         __libdwfl_attach_state_for_pid implicitly.
1047
1048 2013-12-28  Mark Wielaard  <mjw@redhat.com>
1049
1050         * linux-proc-maps.c (dwfl_linux_proc_find_elf): Don't return special
1051         character device files, only regular files.
1052
1053 2013-12-24  Mark Wielaard  <mjw@redhat.com>
1054
1055         * linux-core-attach.c (core_next_thread): Check whether thread_argp
1056         is NULL. Reset core_arg->thread_note_offset and malloc a thread_arg
1057         in that case. Free thread_arg if there are no more threads.
1058
1059 2013-12-23  Mark Wielaard  <mjw@redhat.com>
1060
1061         * dwfl_segment_report_module.c (dwfl_segment_report_module): Free
1062         build_id before returning early.
1063
1064 2013-12-23  Mark Wielaard  <mjw@redhat.com>
1065
1066         * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Report actual
1067         pid (thread group leader) to dwfl_attach_state.
1068
1069 2013-12-21  Mark Wielaard  <mjw@redhat.com>
1070
1071         * frame_unwind.c (handle_cfi): Track whether the return register
1072         has been set and only allow it to be set once.
1073
1074 2013-12-20  Mark Wielaard  <mjw@redhat.com>
1075
1076         * dwfl_frame.c (one_arg): New struct.
1077         (get_one_thread_cb): New function.
1078         (dwfl_getthread): Likewise.
1079         (one_thread): New struct.
1080         (get_one_thread_frames_cb): New function.
1081         (dwfl_getthread_frames): Likewise.
1082         * libdwfl.h (Dwfl_Thread_Callbacks): Add get_thread function.
1083         (dwfl_getthread_frames): Likewise.
1084         * libdwflP.h (dwfl_getthread_frames): New internal function declaration.
1085         * linux-core-attach.c (core_thread_callbacks): Initialize get_thread
1086         to NULL.
1087         * linux-pid-attach.c (pid_getthread): New function.
1088         (pid_thread_callbacks): Initialize get_thread to pid_getthread.
1089
1090 2013-12-20  Mark Wielaard  <mjw@redhat.com>
1091
1092         * linux-kernel-modules.c (report_kernel_archive): Correct nested
1093         asprintf result check for debug.a.
1094
1095 2013-12-18  Mark Wielaard  <mjw@redhat.com>
1096
1097         * derelocate.c (__libdwfl_find_section_ndx): New internal function.
1098         * dwfl_module_addrname.c (dwfl_module_addrname): Use
1099         dwfl_module_addrinfo.
1100         * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Replace with...
1101         (__libdwfl_addrsym): ...this. Use __libdwfl_getsym, use value
1102         for comparisons, not st_value. Fill in off. Search for both value
1103         and the (adjusted) sym.st_value when different.
1104         (dwfl_module_addrsym): Implement using __libdwfl_addrsym.
1105         (dwfl_module_addrinfo): New function.
1106         * dwfl_module_getsym.c (dwfl_module_getsym_elf): Replace with...
1107         (__libdwfl_getsym): ...this. Use ebl_resolve_sym_value if requested
1108         and possible. Adjust sym->st_value only when requested. Fill in addr
1109         if available.
1110         (dwfl_module_getsym_info): New function.
1111         (dwfl_module_getsym): Use __libdwfl_getsym.
1112         * libdwfl.h (dwfl_module_getsym_elf): Removed.
1113         (dwfl_module_getsym_info): New function declaration.
1114         (dwfl_module_addrinfo): Likewise.
1115         (dwfl_module_addrsym): Add documentation describing differences
1116         with addrinfo variants.
1117         (dwfl_module_addrsym_elf): Removed.
1118         * libdwflP.h (__libdwfl_getsym): New internal function declaration.
1119         (__libdwfl_addrsym): Likewise.
1120         (__libdwfl_find_section_ndx): Likewise.
1121         (dwfl_module_addrinfo): New internal declaration.
1122         (dwfl_module_getsym_info): Likewise.
1123         (dwfl_module_addrsym_elf): Removed.
1124         (dwfl_module_getsym_elf): Likewise.
1125
1126 2013-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
1127
1128         * argp-std.c (offline_find_elf): Remove.
1129         (offline_callbacks): Use dwfl_build_id_find_elf instead.
1130         * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Move here the code
1131         removed above.
1132
1133 2013-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
1134
1135         unwinder: s390 and s390x
1136         * dwfl_frame_pc.c (dwfl_frame_pc): Call ebl_normalize_pc.
1137         * frame_unwind.c (new_unwound): New function from ...
1138         (handle_cfi): ... here.  Call it.
1139         (setfunc, getfunc, readfunc): New functions.
1140         (__libdwfl_frame_unwind): Call ebl_unwind with those functions.
1141         * linux-core-attach.c (core_set_initial_registers): Always iterate
1142         through the Ebl_Register_Location loop.  Call
1143         dwfl_thread_state_register_pc there.
1144
1145 2013-12-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1146
1147         * frame_unwind.c (handle_cfi): Call ebl_dwarf_to_regno for RA.
1148
1149 2013-12-17  Mark Wielaard  <mjw@redhat.com>
1150
1151         * linux-pid-attach.c (pid_next_thread): Call rewinddir on first
1152         traversal.
1153
1154 2013-12-16  Mark Wielaard  <mjw@redhat.com>
1155
1156         * libdwfl.h (dwfl_module_getsymtab_first_global): New function
1157         definition.
1158         * dwfl_module_getdwarf.c (dwfl_module_getsymtab_first_global): New
1159         function.
1160         * libdwflP.h (dwfl_module_getsymtab_first_global): New internal
1161         function definition.
1162         * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Use new function.
1163
1164 2013-12-14  Mark Wielaard  <mjw@redhat.com>
1165
1166         * dwfl_module.c (__libdwfl_module_free): Free mod->reloc_info if
1167         allocated. Call dwarf_cfi_end on mod->eh_cfi if necessary.
1168         * frame_unwind.c (handle_cfi): Free frame result from
1169         dwarf_cfi_addrframe when done.
1170
1171 2013-12-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1172
1173         unwinder: ppc and ppc64
1174         * frame_unwind.c (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set):
1175         Call ebl_dwarf_to_regno.
1176         * linux-core-attach.c (core_set_initial_registers): Implement
1177         pc_register support.
1178         * linux-pid-attach.c (pid_thread_state_registers_cb): Implement
1179         FIRSTREG -1.
1180
1181 2013-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1182
1183         Introduce process_attach_error.
1184         * dwfl_begin.c (dwfl_begin): Initialize process_attach_error.
1185         * dwfl_frame.c (dwfl_pid, dwfl_getthreads): Use PROCESS_ATTACH_ERROR if
1186         PROCESS is NULL.
1187         * libdwflP.h (struct Dwfl): New field process_attach_error.
1188         * linux-core-attach.c (__libdwfl_attach_state_for_core): Rename to ...
1189         (attach_state_for_core): ... here, make it static, change return type,
1190         no longer use __libdwfl_seterrno.
1191         (__libdwfl_attach_state_for_core): New wrapper for it.
1192
1193 2013-11-27  Mark Wielaard  <mjw@redhat.com>
1194
1195         * dwfl_module_addrsym.c (dwfl_module_addrsym): Rename to and call...
1196         (dwfl_module_addrsym_elf): this. Add elfp and biasp arguments,
1197         keep track of symelf, addr_symelf, closest_elf and sizeless_elf
1198         instead of tracking dwfl_files.
1199         * dwfl_module_getsym.c (__libdwfl_module_getsym): Renamed to...
1200         (dwfl_module_getsym_elf): ...this. Remove dwfl_file argument, add
1201         new elfp and biasp arguments. Track elf instead of file.
1202         (dwfl_module_getsym): Call dwfl_module_getsym_elf.
1203         dwfl_module_info.c (dwfl_module_info): Pass elf to
1204         dwfl_adjusted_st_value.
1205         * libdwfl.h (dwfl_module_getsym): Document limitations of shndx.
1206         (dwfl_module_getsym_elf): New function declaration.
1207         (dwfl_module_addrsym_elf): Likewise.
1208         * libdwflP.h (dwfl_module_addrsym_elf): INTDECL.
1209         (dwfl_module_getsym_elf): Likewise.
1210         (dwfl_adjusted_st_value): Take and check elf not dwfl_file.
1211         (dwfl_deadjust_st_value): Likewise.
1212         (__libdwfl_module_getsym): Removed.
1213         * relocate.c (resolve_symbol): Pass elf to dwfl_adjusted_st_value.
1214
1215 2013-11-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1216
1217         Fix non-build-id core files on build-id system.
1218         * link_map.c (report_r_debug): Remove valid clearing if build-id cannot
1219         be read from memory.
1220
1221 2013-11-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1222
1223         * dwfl_segment_report_module.c (dwfl_segment_report_module): New
1224         variable close_elf.  Call __libdwfl_find_elf_build_id and compare the
1225         content, if possible.
1226
1227 2013-11-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1228
1229         link_map: Use proper bias, not l_addr.
1230         * core-file.c (dynamic_vaddr_get): Rename to ...
1231         (__libdwfl_dynamic_vaddr_get): ... here, make it global,
1232         internal_function.
1233         (dwfl_core_file_report): Update name in the caller.
1234         * libdwflP.h (__libdwfl_dynamic_vaddr_get): New declaration.
1235         * link_map.c (report_r_debug): New variable elf_dynamic_vaddr.  Call
1236         __libdwfl_dynamic_vaddr_get for it.  Remove L_ADDR FIXME comment.
1237         Use ELF_DYNAMIC_VADDR instead of L_ADDR.
1238
1239 2013-11-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
1240
1241         Compatibility with older kernels such as RHEL-6.
1242         * linux-pid-attach.c (struct pid_arg): New field tid_was_stopped.
1243         (ptrace_attach): New parameter tid_was_stoppedp.  Set it.
1244         (pid_set_initial_registers): Pass tid_was_stopped.
1245         (pid_thread_detach): Use tid_was_stopped.
1246
1247 2013-11-18  Josh Stone  <jistone@redhat.com>
1248
1249         * dwfl_module_getdwarf.c (find_aux_address_sync): New function.
1250         (find_aux_sym): Use it.
1251
1252 2013-11-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
1253
1254         Code cleanup: Remove const in prototype
1255         * dwfl_frame_regs.c (dwfl_thread_state_registers): Remove const from
1256         firstreg.
1257         * libdwfl.h (dwfl_thread_state_registers): Likewise.
1258         * linux-pid-attach.c (pid_thread_state_registers_cb): Likewise.
1259
1260 2013-11-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
1261
1262         Fix dwfl_attach_state machine->elf.
1263         * dwfl_frame.c (dwfl_attach_state): Change parameter machine to elf.
1264         Call ebl_openbackend instead of ebl_openbackend_machine.
1265         * libdwfl.h (dwfl_attach_state): Change parameter machine to elf.
1266         Update the function description.
1267         * linux-core-attach.c (__libdwfl_attach_state_for_core): Pass CORE to
1268         dwfl_attach_state.
1269         * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Pass NULL to
1270         dwfl_attach_state.
1271
1272 2013-11-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
1273
1274         Provide __libdwfl_module_getsym to get dwfl_file *.
1275         * dwfl_module_addrsym.c (dwfl_module_addrsym) (i_to_symfile): Remove.
1276         (dwfl_module_addrsym) (search_table): New variable file.  Use
1277         __libdwfl_module_getsym.  Use file.
1278         * dwfl_module_getsym.c (dwfl_module_getsym): Rename to ...
1279         (__libdwfl_module_getsym): ... here.  Add parameter filep.  Set it.
1280         (dwfl_module_getsym): New wrapper.
1281         * libdwflP.h (__libdwfl_module_getsym): New declaration.
1282
1283 2013-11-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1284
1285         Fix dwfl_module_addrsym for minidebuginfo.
1286         * dwfl_module_addrsym.c (dwfl_module_addrsym): New variable
1287         addr_symfile.
1288         (dwfl_module_addrsym) (same_section): Use it.
1289         (dwfl_module_addrsym) (i_to_symfile): New function.
1290         (dwfl_module_addrsym) (search_table): Use it.
1291
1292 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1293             Mark Wielaard  <mjw@redhat.com>
1294
1295         * Makefile.am (libdwfl_a_SOURCES): Add dwfl_frame.c, frame_unwind.c,
1296         dwfl_frame_pc.c, linux-pid-attach.c, linux-core-attach.c and
1297         dwfl_frame_regs.c.
1298         * core-file.c (dwfl_core_file_report): Call
1299         __libdwfl_attach_state_for_core.
1300         * dwfl_end.c (dwfl_end): Call __libdwfl_process_free.
1301         * dwfl_frame.c: New file.
1302         * frame_unwind.c: New file.
1303         * dwfl_frame_pc.c: New file.
1304         * linux-pid-attach.c: New file.
1305         * linux-core-attach.c: New file.
1306         * dwfl_frame_regs.c: New file.
1307         * libdwfl.h (Dwfl_Thread, Dwfl_Frame): New typedefs.
1308         (dwfl_core_file_report, dwfl_linux_proc_report): Extend comments.
1309         (Dwfl_Thread_Callbacks): New definition.
1310         (struct ebl, dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl)
1311         (dwfl_thread_tid, dwfl_frame_thread, dwfl_thread_state_registers)
1312         (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
1313         (dwfl_frame_pc): New declarations.
1314         * libdwflP.h (Dwfl_Process): New typedef.
1315         (LIBEBL_BAD, CORE_MISSING, INVALID_REGISTER, PROCESS_MEMORY_READ)
1316         (PROCESS_NO_ARCH, PARSE_PROC, INVALID_DWARF, UNSUPPORTED_DWARF)
1317         (NEXT_THREAD_FAIL, ATTACH_STATE_CONFLICT, NO_ATTACH_STATE, NO_UNWIND)
1318         (INVALID_ARGUMENT): New DWFL_ERROR entries.
1319         (struct Dwfl): New entry process.
1320         (struct Dwfl_Process, struct Dwfl_Thread, struct Dwfl_Frame)
1321         (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set)
1322         (__libdwfl_process_free, __libdwfl_frame_unwind)
1323         (__libdwfl_attach_state_for_pid, __libdwfl_attach_state_for_core)
1324         (__libdwfl_segment_start, __libdwfl_segment_end): New declarations.
1325         (dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid)
1326         (dwfl_frame_thread, dwfl_thread_state_registers)
1327         (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
1328         (dwfl_frame_pc): New INTDECL entries.
1329         * linux-proc-maps.c (dwfl_linux_proc_report): Call
1330         __libdwfl_attach_state_for_pid.
1331         * segment.c (segment_start): Rename to ...
1332         (__libdwfl_segment_start): ... here and make it internal_function.
1333         (segment_end): Rename to ...
1334         (__libdwfl_segment_end): ... here and make it internal_function.
1335         (reify_segments, dwfl_report_segment): Rename them at the callers.
1336
1337 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1338
1339         * core-file.c (dwfl_core_file_report): Remove the use of MAX.
1340
1341 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1342
1343         * core-file.c (dwfl_core_file_report): Replaced variable sniffed by
1344         retval.  Fix one forgotten LISTED increase.
1345
1346 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1347
1348         Fix core files for re-prelink-ed files.
1349         * core-file.c (dynamic_vaddr_get): New function.
1350         (dwfl_core_file_report): New variable file_dynamic_vaddr.  Call
1351         dynamic_vaddr_get instead of using L_ADDR.
1352         * libdwflP.h (struct r_debug_info_module): Remove field l_addr.
1353         * link_map.c (report_r_debug): Do not initialize l_addr.
1354
1355 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1356
1357         Code cleanup.
1358         * core-file.c (dwfl_core_file_report): Reindent block of code by
1359         continue keyword.
1360
1361 2013-10-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1362
1363         * argp-std.c (parse_opt): Use executable parameter of
1364         dwfl_core_file_report.
1365         * core-file.c (dwfl_core_file_report): Add parameter executable.  Set
1366         it to DWFL.  Add NEW_VERSION for it.
1367         (_compat_without_executable_dwfl_core_file_report): New.  Twice.
1368         * libdwfl.h (dwfl_core_file_report): Add parameter executable, update
1369         the function comment.
1370
1371 2013-10-15  Mark Wielaard  <mjw@redhat.com>
1372
1373         * linux-proc-maps.c (proc_maps_report): Ignore non-absolute file
1374         mappings.
1375         (dwfl_linux_proc_find_elf): Don't abort, just return failure.
1376
1377 2013-09-12  Mark Wielaard  <mjw@redhat.com>
1378
1379         * cu.c (intern_cu): If dwarf_offdie fails free cu.
1380
1381 2013-09-12  Mark Wielaard  <mjw@redhat.com>
1382
1383         * linux-proc-maps.c (proc_maps_report): Don't fclose FILE in
1384         bad_report.
1385
1386 2013-09-12  Mark Wielaard  <mjw@redhat.com>
1387
1388         * dwfl_module_getdwarf.c (find_symtab): Call elf_getdata with
1389         aux_xndxscn, not xndxscn, for aux_symxndxdata.
1390
1391 2013-08-25  Mark Wielaard  <mjw@redhat.com>
1392
1393         * linux-kernel-modules.c (report_kernel): Pass add_p_vaddr as true
1394         to dwfl_report_elf.
1395
1396 2013-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
1397
1398         * dwfl_segment_report_module.c (dwfl_segment_report_module): Check for
1399         conflicts all the modules, not just the first one.  Compare L_LD if it
1400         is equal, not if it is in a module address range.
1401
1402 2013-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1403
1404         * libdwflP.h (__libdwfl_elf_address_range): Add internal_function.
1405
1406 2013-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1407
1408         * core-file.c (clear_r_debug_info): Close also ELF and FD.
1409         (dwfl_core_file_report): Call __libdwfl_report_elf for
1410         R_DEBUG_INFO.MODULE.
1411         * dwfl_report_elf.c (__libdwfl_elf_address_range): New function from
1412         code of ...
1413         (__libdwfl_report_elf): ... this function.  Call it.
1414         * dwfl_segment_report_module.c: Include unistd.h.
1415         (dwfl_segment_report_module): Use basename for MODULE->NAME.
1416         Clear MODULE if it has no build-id and we have segment with build-id.
1417         Ignore this segment only if MODULE still contains valid ELF.
1418         * libdwflP.h (__libdwfl_elf_address_range): New declaration.
1419         (struct r_debug_info_module): New fields fd, elf, l_addr, start, end
1420         and disk_file_has_build_id.
1421         (dwfl_link_map_report): Extend the comment.
1422         * link_map.c (report_r_debug): Extend the comment.  Always fill in new
1423         r_debug_info_module.  Initialize also the new r_debug_info_module
1424         fields.  Remove one FIXME comment.  Call __libdwfl_elf_address_range
1425         instead of __libdwfl_report_elf when R_DEBUG_INFO is not NULL.
1426
1427 2013-07-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
1428
1429         * libdwflP.h (__libdwfl_find_elf_build_id): Add internal_function.
1430
1431 2013-07-02  Mark Wielaard  <mjw@redhat.com>
1432
1433         * relocate.c (__libdwfl_relocate_value): Remove mod->e_type assert.
1434
1435 2013-06-05  Mark Wielaard  <mjw@redhat.com>
1436
1437         * link_map.c (report_r_debug): Always call release_buffer after
1438         memory_callback succeeded reading build_id.
1439
1440 2013-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1441
1442         * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set
1443         executable_for_core before calling dwfl_core_file_report.
1444         * core-file.c (clear_r_debug_info): New function.
1445         (dwfl_core_file_report): Move raw segments reporting lower.  New
1446         variable r_debug_info, pass it to dwfl_segment_report_module.  Call
1447         clear_r_debug_info in the end.  Return sum of LISTED and SNIFFED.
1448         * dwfl_module_build_id.c (check_notes): Move into
1449         __libdwfl_find_elf_build_id.
1450         (__libdwfl_find_build_id): Rename to ...
1451         (__libdwfl_find_elf_build_id): ... here.  Add parameters build_id_bits,
1452         build_id_elfaddr and build_id_len.  Verify MOD vs. ELF.
1453         (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and
1454         set, rename data_vaddr to data_elfaddr.  Do not call found_build_id.
1455         (__libdwfl_find_elf_build_id): Update the check_notes caller, do not
1456         adjust its data_elfaddr parameter.
1457         (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id.
1458         * dwfl_segment_report_module.c (dwfl_segment_report_module): New
1459         parameter r_debug_info.  New variable name_is_final.  Adjust addresses
1460         according to R_DEBUG_INFO->MODULE.  Check conflicts against DWFL.
1461         Do not overwrite NAME by SONAME if NAME_IS_FINAL.
1462         * libdwflP.h (__libdwfl_find_elf_build_id): New declaration.
1463         (struct r_debug_info_module, struct r_debug_info): New definitions.
1464         (dwfl_segment_report_module, dwfl_link_map_report): Add parameter
1465         r_debug_info.
1466         * link_map.c: Include fcntl.h.
1467         (report_r_debug): Add parameter r_debug_info, describe it in the
1468         function comment.  Delete dwfl_addrmodule call and its dependent code.
1469         Verify build-id before calling dwfl_report_elf, also supply
1470         executable_for_core to it.  Store r_debug_info->module info when
1471         appropriate.
1472         (dwfl_link_map_report): Add parameter r_debug_info.  New variable
1473         in_ok.  Try to read IN from EXECUTABLE_FOR_CORE.  Update report_r_debug
1474         caller parameters.
1475
1476 2013-04-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1477
1478         * dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr.
1479         Set it to true for ET_EXEC and ET_CORE.  Provide alternative
1480         setup of START and BIAS if !ADD_P_VADDR.  Set END from BIAS, not BASE.
1481         (dwfl_report_elf): Add parameter add_p_vaddr.  Pass it down.  Add
1482         NEW_VERSION.
1483         (_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with
1484         COMPAT_VERSION.
1485         * libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr.  Describe it.
1486         * libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr.
1487         * link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf.
1488         * linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for
1489         dwfl_report_elf.
1490         * offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf.
1491
1492 2013-04-27  Mark Wielaard  <mjw@redhat.com>
1493
1494         * link_map.c: #include system.h.
1495
1496 2013-04-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
1497
1498         * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move
1499         them to lib/system.h.
1500
1501 2013-04-24  Mark Wielaard  <mjw@redhat.com>
1502
1503         * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1504
1505 2013-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1506
1507         * dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning.
1508
1509 2013-03-12  Mark Wielaard  <mjw@redhat.com>
1510
1511         * dwfl_getsrclines.c (dwfl_getsrclines): Return 0 on success.
1512
1513 2013-02-22  Mark Wielaard  <mjw@redhat.com>
1514
1515         * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define
1516         as DWFL_E_BADELF when not used.
1517
1518 2013-02-10  Mark Wielaard  <mjw@redhat.com>
1519
1520         * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in
1521         failure messages When handling ARGP_KEY_SUCCESS because arg will
1522         not have been set.
1523
1524 2013-01-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1525
1526         * linux-proc-maps.c: Include system.h.
1527         (PROCEXEFMT, get_pid_class): New.
1528         (grovel_auxv): Detect 32-bit vs. 64-bit auxv, possibly call
1529         get_pid_class.
1530
1531 2013-01-23  Mark Wielaard  <mjw@redhat.com>
1532
1533         * dwfl_module_getdwarf.c (find_aux_sym): Don't substract one
1534         from aux_syments by default.
1535         (find_symtab): Also succeed when only aux_symdata is found.
1536         When no symtab is found always try to load auxiliary table.
1537         (dwfl_module_getsymtab): Substract one from result when both
1538         tables have symbols.
1539         * dwfl_module_getsym.c (dwfl_module_getsym): Only skip auxiliary
1540         zero entry when both tables have symbols.
1541         * dwfl_module_addrsym.c (dwfl_module_addrsym): Only substract
1542         one from first_global when both tables have symbols.
1543
1544 2013-01-16  Mark Wielaard  <mjw@redhat.com>
1545
1546         * libdwflP.h (struct Dwfl_Module): Add aux_sym, aux_symdata,
1547         aux_syments, aux_symstrdata, aux_symxndxdata and aux_first_global.
1548         (dwfl_adjusted_aux_sym_addr): New function.
1549         (dwfl_deadjust_aux_sym_addr): Likewise.
1550         (dwfl_adjusted_st_value): Take and check symfile argument.
1551         (dwfl_deadjust_st_value): Likewise.
1552         * dwfl_module_getdwarf.c (find_prelink_address_sync): Take and
1553         use dwfl_file as argument to set address_sync.
1554         (find_debuginfo): Call find_prelink_address_sync with debug file.
1555         (find_aux_sym): New function.
1556         (find_symtab): Use find_aux_sym if all we have is the dynsym table
1557         and fill in aux DwflModule fields.
1558         (dwfl_module_getsymtab): Return syments plus aux_syments.
1559         (load_symtab): Always set first_global.
1560         * dwfl_module_addrsym.c (dwfl_module_addrsym): Check symfile
1561         when using same_section. Calculate first_global based on both
1562         mod->first_global and mod->aux_first_global.
1563         * dwfl_module.c (__libdwfl_module_free): Free aux_sym.
1564         * dwfl_module_getsym.c (dwfl_module_getsym): Use auxsym table
1565         to retrieve symbol and name if necessary, making sure all locals
1566         from any table come before any globals.
1567         * dwfl_module_info.c (dwfl_module_info): Call dwfl_adjusted_st_value
1568         with symfile.
1569         * relocate.c (resolve_symbol): Likewise.
1570
1571 2013-01-07  Roland McGrath  <roland@hack.frob.com>
1572
1573         * link_map.c (auxv_format_probe): Handle unaligned 64-bit data, but
1574         still assume the data is at least 32-bit aligned anyway.
1575         (dwfl_link_map_report): Handle unaligned auxv data.
1576
1577 2012-12-11  Mark Wielaard  <mjw@redhat.com>
1578
1579         * linux-kernel-modules.c (report_kernel): Only free fname if
1580         find_kernel_elf succeeds and allocates it.
1581         (report_kernel_archive): Fix brackets around unlikely expression.
1582
1583 2012-11-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
1584
1585         * argp-std.c: Update Copyright year.
1586         (offline_find_elf): New function.
1587         (offline_callbacks): Use it for find_elf.
1588         (struct parse_opt): New.
1589         (parse_opt): New key ARGP_KEY_INIT.  In other make hook struct
1590         parse_opt pointer from former Dwfl pointer.  Delay 'e and OPT_COREFILE
1591         processing till ARGP_KEY_SUCCESS.  Initialize state->input already from
1592         ARGP_KEY_SUCCESS.  Modify the cleanup in ARGP_KEY_ERROR.  Make the
1593         final state->input initialization optional.
1594         * dwfl_end.c: Update Copyright year.
1595         (dwfl_end): Free executable_for_core.
1596         * libdwflP.h: Update Copyright year.
1597         (struct Dwfl): New field executable_for_core.
1598
1599 2012-11-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1600
1601         * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
1602         calculation.
1603
1604 2012-10-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1605
1606         * dwfl_module_getdwarf.c (mod_verify_build_id): New function with code
1607         from ...
1608         (__libdwfl_getelf): ... here.  Call it.
1609
1610 2012-10-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1611
1612         * libdwfl.h (dwfl_module_getelf): Add __nonnull_attribute__.
1613
1614 2012-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1615
1616         * dwfl_segment_report_module.c (dwfl_segment_report_module):
1617         Initialize mod->MAIN_BIAS.
1618
1619 2012-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1620
1621         * dwfl_module_addrsym.c (dwfl_module_addrsym): New function
1622         binding_value.  Use it for both zero and non-zero size symbols
1623         comparisons.
1624
1625 2012-10-01  Mark Wielaard  <mjw@redhat.com>
1626
1627         * cu.c (cudie_offset): Don't use type_sig8, it might not be
1628         initialized and these are always real CUs, never TUs.
1629
1630 2012-10-01  Mark Wielaard  <mjw@redhat.com>
1631
1632         * derelocate.c (find_section): Check next section exists before
1633         accessing it.
1634
1635 2012-08-01  Petr Machata  <pmachata@redhat.com>
1636
1637         * offline.c (process_archive_member): Ignore entry "/SYM64/".
1638
1639 2012-03-28  Roland McGrath  <roland@hack.frob.com>
1640
1641         * dwfl_segment_report_module.c
1642         (dwfl_segment_report_module: read_portion): Don't use existing buffer
1643         when FILESZ is zero (string mode) and available portion doesn't hold
1644         a terminated string.
1645
1646 2011-12-02  Roland McGrath  <roland@hack.frob.com>
1647
1648         * elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case
1649         to use elf64_xlatetom and PHDRS.p64.
1650         Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>.
1651
1652 2011-11-31  Mark Wielaard  <mjw@redhat.com>
1653
1654         * dwfl_module_addrsym.c (dwfl_module_addrsym): First search all
1655         global symbols. Then only when that doesn't provide a match search
1656         all local symbols too.
1657         * dwfl_module_getdwarf.c (load_symtab): Take first_global int arg
1658         and fill it in.
1659         (find_symtab): Initialize mod->first_global and pass it to load_symtab.
1660         * libdwfl/libdwflP.h (Dwfl_Module): Add first_global field.
1661
1662 2011-11-31  Mark Wielaard  <mjw@redhat.com>
1663
1664         * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
1665         sizeless_sym if needed and closer to desired addr.
1666
1667 2011-10-20  Mark Wielaard  <mjw@redhat.com>
1668
1669         * derelocate.c (cache_sections): Intern mod->reloc_info check.
1670         (dwfl_module_relocations): Don't check mod->reloc_info.
1671         (dwfl_module_relocation_info): Likewise.
1672         (find_section): Likewise.
1673
1674 2011-07-09  Roland McGrath  <roland@hack.frob.com>
1675
1676         * image-header.c (LE32): Macro removed (now in lib/system.h).
1677
1678 2011-04-11  Mark Wielaard  <mjw@redhat.com>
1679
1680         * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
1681         by check for zlib, bzlib or lzma defines to check it isn't empty.
1682         (try_kernel_name): Use same guard for use of vmlinux_suffixes.
1683
1684 2011-03-08  Roland McGrath  <roland@redhat.com>
1685
1686         * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
1687         Reported by Kurt Roeckx <kurt@roeckx.be>.
1688
1689 2011-02-11  Roland McGrath  <roland@redhat.com>
1690
1691         * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
1692         suffixes if corresponding decompression support is enabled.
1693
1694 2011-02-01  Roland McGrath  <roland@redhat.com>
1695
1696         * dwfl_module_getdwarf.c (find_prelink_address_sync): Use the
1697         section-end address as the synchronization point, rather than sh_addr.
1698
1699         * dwfl_module_getdwarf.c (find_prelink_address_sync): Discover
1700         PT_INTERP p_vaddr separately from main phdrs and undo phdrs.
1701
1702         * dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in
1703         last change, so we recognize PT_INTERP in ELFCLASS64 correctly.
1704
1705 2011-01-11  Roland McGrath  <roland@redhat.com>
1706
1707         * dwfl_module_getdwarf.c (open_elf): Remove section-based
1708         address_sync fixup from here.
1709         (find_prelink_address_sync): New function.
1710         (find_debuginfo): Call it.
1711         * libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error.
1712
1713 2011-01-04  Roland McGrath  <roland@redhat.com>
1714
1715         * dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation
1716         logic to consider section addresses, the better to survive all the
1717         possible prelink machinations.
1718         * libdwflP.h (struct dwfl_file): Comment change.
1719
1720 2010-11-30  Roland McGrath  <roland@redhat.com>
1721
1722         * derelocate.c (dwfl_module_relocations): Remove over-eager assert.
1723
1724 2010-11-12  Roland McGrath  <roland@redhat.com>
1725
1726         * libdwflP.h (struct Dwfl_Module): New member main_bias.
1727         (dwfl_adjusted_address, dwfl_deadjust_address): Use it.
1728         * dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it.
1729
1730         * libdwflP.h (dwfl_deadjust_address): New function.
1731         (dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions.
1732         * cu.c (addrarange): Use dwfl_deadjust_dwarf_addr.
1733         * dwfl_module_addrsym.c: Use dwfl_deadjust_st_value.
1734
1735 2010-11-11  Roland McGrath  <roland@redhat.com>
1736
1737         * libdwflP.h (struct dwfl_file): Remove bias member.
1738         Add vaddr and address_sync members instead.
1739         (dwfl_adjusted_address): Calculate using vaddr.
1740         (dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that.
1741         (dwfl_adjusted_st_value): Use one of those calls.
1742         * dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync.
1743         * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
1744         * derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions.
1745         * link_map.c (consider_executable): Adjust only MOD->low_addr for
1746         detected PIE bias change.
1747
1748         * libdwflP.h (dwfl_adjusted_dwarf_addr): New function.
1749         * dwfl_module_info.c: Use it.
1750         * cu.c (addrarange): Likewise.
1751         * dwfl_dwarf_line.c: Likewise.
1752         * dwfl_module_dwarf_cfi.c: Likewise.
1753         * dwfl_lineinfo.c: Likewise.
1754         * dwfl_nextcu.c: Likewise.
1755         * dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise.
1756
1757         * libdwflP.h (dwfl_adjusted_st_value): New function.
1758         * relocate.c (resolve_symbol): Use it.
1759         * dwfl_module_getsym.c: Likewise.
1760         * dwfl_module_addrsym.c: Likewise.
1761         * dwfl_module_info.c: Likewise.
1762
1763         * libdwflP.h (dwfl_adjusted_address): New function.
1764         * dwfl_module_build_id.c (__libdwfl_find_build_id): Use it.
1765         * relocate.c (__libdwfl_relocate_value): Likewise.
1766         * derelocate.c (cache_sections): Likewise.
1767         (dwfl_module_address_section): Likewise.
1768         * dwfl_module_getelf.c: Likewise.
1769         * dwfl_module_eh_cfi.c: Likewise.
1770         * link_map.c (consider_executable): Likewise.
1771
1772 2010-08-24  Roland McGrath  <roland@redhat.com>
1773
1774         * dwfl_dwarf_line.c: New file.
1775         * Makefile.am (libdwfl_a_SOURCES): Add it.
1776
1777 2010-08-18  Roland McGrath  <roland@redhat.com>
1778
1779         * link_map.c (report_r_debug): Use found name if we have no name,
1780         even if we already have an Elf handle.
1781
1782 2010-06-30  Roland McGrath  <roland@redhat.com>
1783
1784         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
1785         confused by -1 return from dwfl_build_id_find_elf after it opened
1786         the Elf handle.
1787         * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
1788         dwfl_build_id_find_debuginfo.
1789
1790 2010-06-16  Roland McGrath  <roland@redhat.com>
1791
1792         * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
1793
1794 2010-06-14  Roland McGrath  <roland@redhat.com>
1795
1796         * find-debuginfo.c (try_open): Take new arg MAIN_STAT.  Compare
1797         candidate file to that st_dev/st_ino and pretend it didn't exist
1798         if they match.
1799         (find_debuginfo_in_path): Update caller, pass main file's info.
1800
1801 2010-05-20  Roland McGrath  <roland@redhat.com>
1802
1803         * linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ...
1804         (grovel_auxv): ... this.  Take DWFL argument.
1805         (dwfl_linux_proc_report): Update caller.
1806
1807         * dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias
1808         based on dwfl->segment_align or manifest alignment of MOD->low_addr.
1809
1810 2010-05-19  Roland McGrath  <roland@redhat.com>
1811
1812         * linux-kernel-modules.c (intuit_kernel_bounds): Rewritten.
1813
1814 2010-05-06  Roland McGrath  <roland@redhat.com>
1815
1816         * segment.c (insert): Clear inserted elements of DWFL->lookup_module.
1817
1818         * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
1819         * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
1820         ID but we didn't find a file.
1821         * dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check
1822         and refuse any fallback file-by-name if it lacks the matching ID.
1823
1824         * dwfl_error.c (dwfl_errno): Add INTDEF.
1825         * libdwflP.h: Add INTDECL.
1826
1827         * dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in
1828         failure cases.
1829
1830 2010-05-04  Roland McGrath  <roland@redhat.com>
1831
1832         * dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an
1833         ET_DYN that has a DT_DEBUG.
1834
1835         * dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop.
1836
1837         * segment.c (insert): Fix moving of values following insertion.
1838         (reify_segments): Fix up MOD->segment backpointer indices after
1839         later insertions in the main loop invalidate them.
1840
1841         * link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and
1842         apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly.
1843
1844         * core-file.c (dwfl_core_file_report): Return any nonzero count of
1845         modules reported, even if link_map grovelling failed and only sniffing
1846         found anything.
1847
1848 2010-04-26  Roland McGrath  <roland@redhat.com>
1849
1850         * relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc.
1851         Works around probably-wrong ld -r behavior for case of a DWARF address
1852         constant that refers to a discarded SHF_ALLOC section.
1853
1854 2010-04-14  Roland McGrath  <roland@redhat.com>
1855
1856         * link_map.c (report_r_debug): Limit iterations on the l_next chain to
1857         an upper bound on sane possible number of elements.
1858
1859 2010-03-11  Roland McGrath  <roland@redhat.com>
1860
1861         * link_map.c (auxv_format_probe): Fix scanning loop, so we really scan
1862         the second half for 32-bit matches.
1863
1864 2010-03-10  Roland McGrath  <roland@redhat.com>
1865
1866         * core-file.c (dwfl_core_file_report): Punt EHDR argument.
1867         * argp-std.c (parse_opt): Update caller.
1868         * libdwfl.h: Declare dwfl_core_file_report.
1869         * libdwflP.h: Don't.
1870
1871 2010-02-17  Roland McGrath  <roland@redhat.com>
1872
1873         * dwfl_segment_report_module.c (addr_segndx): Take new flag argument.
1874         If set, find the first index not below ADDR.
1875         (dwfl_segment_report_module): Update callers.
1876         Pass true when calculating return value.
1877
1878 2010-02-15  Roland McGrath  <roland@redhat.com>
1879
1880         * Makefile.am: Use config/eu.am for common stuff.
1881
1882         * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
1883         variable in failure path.
1884
1885 2010-02-02  Mark Wielaard  <mjw@redhat.com>
1886
1887         * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
1888         * dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise
1889
1890 2010-01-07  Roland McGrath  <roland@redhat.com>
1891
1892         * core-file.c (dwfl_core_file_report): Use elf_getphdrnum.
1893         * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
1894         * dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise.
1895         * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
1896
1897 2010-01-06  Roland McGrath  <roland@redhat.com>
1898
1899         * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value.
1900         (relocate_section): Let unresolved SHN_COMMON symbol stay 0.
1901
1902 2009-11-16  Roland McGrath  <roland@redhat.com>
1903
1904         * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn.
1905
1906 2009-11-12  Petr Machata  <pmachata@redhat.com>
1907
1908         * core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if
1909         the chunk is both offset-contiguous and vaddr-contiguous.
1910
1911 2009-11-05  Roland McGrath  <roland@redhat.com>
1912
1913         * link_map.c (report_r_debug): Skip entries with l_ld==0.
1914         Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
1915
1916 2009-09-04  Roland McGrath  <roland@redhat.com>
1917
1918         * image-header.c (__libdw_image_header): Fix tranposed comparison.
1919
1920 2009-08-27  Roland McGrath  <roland@redhat.com>
1921
1922         * image-header.c: New file.
1923         * Makefile.am (libdwfl_a_SOURCES): Add it.
1924         * libdwflP.h: Declare __libdw_image_header.
1925         * open.c (decompress): Don't consume ELF on failure.
1926         (what_kind): New function, broken out of ...
1927         (__libdw_open_file): ... here.  Call it.
1928         If it fails, try __libdw_image_header and then try what_kind again.
1929
1930         * gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER,
1931         leave it behind for next decompressor.
1932         * open.c (decompress): Free BUFFER on failure.
1933
1934 2009-08-26  Roland McGrath  <roland@redhat.com>
1935
1936         * gzip.c (find_zImage_payload): New function, broken out of ...
1937         (mapped_zImage): ... here.  Call it.
1938         (find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with
1939         stupid method of just trying the decoder.
1940
1941         * open.c [USE_LZMA]: Try __libdw_unlzma.
1942         * libdwflP.h: Declare it.
1943         (DWFL_ERRORS): Add DWFL_E_LZMA.
1944         * gzip.c [LZMA]: Implement liblzma version for XZ file format.
1945         * lzma.c: New file.
1946         * Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it.
1947
1948         * gzip.c (mapped_zImage): Limit scan to 32kb.
1949         Make this unconditional, support bzip2 kernel images too.
1950         (unzip): Use direct inflate method for non-mmap case too.
1951         Only zlib uses the stream method.
1952
1953 2009-08-09  Roland McGrath  <roland@redhat.com>
1954
1955         * dwfl_module_build_id.c: Use new macros for versioned definitions.
1956
1957 2009-07-08  Roland McGrath  <roland@redhat.com>
1958
1959         * dwfl_module_dwarf_cfi.c: New file.
1960         * dwfl_module_eh_cfi.c: New file.
1961         * Makefile.am (libdwfl_a_SOURCES): Add them.
1962         * libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi.
1963         Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi.
1964
1965 2009-07-08  Roland McGrath  <roland@redhat.com>
1966
1967         * libdwflP.h (struct Dwfl_Module): Reorder members to pack better.
1968
1969 2009-06-18  Mark Wielaard  <mjw@redhat.com>
1970
1971         * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
1972
1973 2009-06-13  Ulrich Drepper  <drepper@redhat.com>
1974
1975         * derelocate.c: Don't use deprecated libelf functions.
1976         * dwfl_module_getdwarf.c: Likewise.
1977         * relocate.c: Likewise.
1978
1979 2009-04-23  Ulrich Drepper  <drepper@redhat.com>
1980
1981         * dwfl_module_build_id.c: Define versioned symbols only if SHARED is
1982         defined.  Otherwise just define the latest version.
1983
1984 2009-04-22  Roland McGrath  <roland@redhat.com>
1985
1986         * relocate.c (resolve_symbol): Apply correct bias to st_value found in
1987         a non-ET_REL module.
1988
1989         * dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to
1990         adjust properly for non-ET_REL.
1991
1992 2009-04-21  Roland McGrath  <roland@redhat.com>
1993
1994         * dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC.
1995
1996         * relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL.
1997         * derelocate.c (cache_sections): Call __libdwfl_relocate_value only
1998         for ET_REL.
1999         * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
2000
2001 2009-04-20  Roland McGrath  <roland@redhat.com>
2002
2003         * dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function.
2004
2005 2009-04-19  Roland McGrath  <roland@redhat.com>
2006
2007         * dwfl_module_getdwarf.c (find_file): Renamed to ...
2008         (__libdwfl_getelf): ... this.  Make it global.
2009         (find_symtab, find_dw): Update callers.
2010         (dwfl_module_getelf): Functions moved ...
2011         * dwfl_module_getelf.c: ... here, new file.
2012         * Makefile.am (libdwfl_a_SOURCES): Add it.
2013         * libdwflP.h: Declare __libdwfl_getelf.
2014
2015 2009-04-14  Roland McGrath  <roland@redhat.com>
2016
2017         * dwfl_segment_report_module.c: Handle DT_STRTAB value being either
2018         absolute (already adjusted in place) or needing load bias adjustment.
2019
2020         * core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for
2021         gelf_getphdr failure.  Fix file size limit checks.
2022
2023         * dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check.
2024
2025 2009-04-08  Roland McGrath  <roland@redhat.com>
2026
2027         * dwfl_module_getsym.c: Don't adjust for bias again after
2028         __libdwfl_relocate_value.
2029
2030         * relocate.c (__libdwfl_relocate_value): Don't adjust a value from
2031         a non-SHF_ALLOC section.
2032         (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
2033         * dwfl_module_getsym.c (dwfl_module_getsym): Likewise.
2034
2035 2009-03-09  Roland McGrath  <roland@redhat.com>
2036
2037         * dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX
2038         variable to outer scope, so we cache it for the loop.
2039
2040         * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
2041
2042 2009-02-12  Roland McGrath  <roland@redhat.com>
2043
2044         * dwfl_module_build_id.c (__libdwfl_find_build_id): Use
2045         __libdwfl_relocate_value to find correct sh_addr value.
2046
2047 2009-02-10  Roland McGrath  <roland@redhat.com>
2048
2049         * dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY.
2050         If false, don't fail for NO_PHDR.
2051         (dwfl_report_elf): Update caller.
2052         * libdwflP.h: Update decl.
2053         * offline.c (process_elf): Call it with false, so we don't refuse
2054         dubiously-formed objects here.
2055
2056         * link_map.c (consider_executable): Don't assert dwfl_addrsegment
2057         finds our module.  We shouldn't crash when we confuse some guesses.
2058
2059 2009-02-10  Ulrich Drepper  <drepper@redhat.com>
2060
2061         * open.c (decompress): Avoid crash with empty input file.
2062
2063 2009-01-27  Roland McGrath  <roland@redhat.com>
2064
2065         * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
2066         with zero vaddr and memsz.
2067
2068 2009-01-22  Roland McGrath  <roland@redhat.com>
2069
2070         * open.c (decompress): Move BUFFER, SIZE decls outside #if.
2071
2072         * dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments
2073         after address-matching loop.
2074
2075         * segment.c (lookup): Fix fencepost in checking for HINT match.
2076
2077 2009-01-14  Roland McGrath  <roland@redhat.com>
2078
2079         * gzip.c [!BZLIB] (mapped_zImage): New function.
2080         (unzip) [!BZLIB]: Grok Linux kernel zImage format.
2081
2082 2009-01-10  Ulrich Drepper  <drepper@redhat.com>
2083
2084         * dwfl_error.c: Always use __thread.  Remove all !USE_TLS code.
2085
2086 2009-01-08  Roland McGrath  <roland@redhat.com>
2087
2088         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline):
2089         Skip subdirectory named "source".
2090         (dwfl_linux_kernel_find_elf): Likewise.
2091
2092 2009-01-06  Roland McGrath  <roland@redhat.com>
2093
2094         * linux-kernel-modules.c (check_suffix): New function.
2095         Match ".ko", ".ko.gz", and ".ko.bz2" suffixes.
2096         (dwfl_linux_kernel_report_offline): Use it.
2097         (dwfl_linux_kernel_find_elf): Likewise.
2098
2099 2009-01-05  Roland McGrath  <roland@redhat.com>
2100
2101         * argp-std.c (parse_opt): Use __libdw_open_file for core file.
2102         * dwfl_build_id_find_debuginfo.c: Use it to open the file.
2103         * dwfl_build_id_find_elf.c: Likewise.
2104         * dwfl_module_getdwarf.c (open_elf): Likewise.
2105         * dwfl_report_elf.c: Likewise.
2106         * find-debuginfo.c (validate): Likewise.
2107         * offline.c (__libdwfl_report_offline): Likewise.
2108
2109         * libdwflP.h: Declare __libdw_open_file.
2110         * open.c: New file.
2111         * Makefile.am (libdwfl_a_SOURCES): Add it.
2112
2113         * gzip.c: New file.
2114         * Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it.
2115         * bzip2.c: New file.
2116         * Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it.
2117         * libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2.
2118
2119 2008-12-16  Roland McGrath  <roland@redhat.com>
2120
2121         * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
2122         symver magic to bind to ELFUTILS_0.138.
2123         (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
2124         wrapper for ELFUTILS_0.130 version set.
2125
2126 2008-12-18  Roland McGrath  <roland@redhat.com>
2127
2128         * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
2129         addresses are taken as relative to MOD->low_addr.
2130
2131 2008-12-15  Roland McGrath  <roland@redhat.com>
2132
2133         * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
2134         debug.bias.
2135
2136 2008-12-11  Roland McGrath  <roland@redhat.com>
2137
2138         * offline.c (process_archive): Don't call elf_end and close if
2139         returning NULL.  Check first elf_begin call and set error code
2140         specially for empty archive.
2141         Fixes RHBZ#465878.
2142
2143 2008-12-02  Roland McGrath  <roland@redhat.com>
2144
2145         * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
2146
2147 2008-11-26  Roland McGrath  <roland@redhat.com>
2148
2149         * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
2150         return value, and interpret encoded OFFSET argument.
2151
2152 2008-10-07  Roland McGrath  <roland@redhat.com>
2153
2154         * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
2155
2156 2008-09-29  Roland McGrath  <roland@redhat.com>
2157
2158         * segment.c (insert): Must realloc DWFL->lookup_module here too.
2159         (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
2160
2161 2008-08-28  Roland McGrath  <roland@redhat.com>
2162
2163         * segment.c (reify_segments): Fix last change.
2164
2165 2008-08-27  Roland McGrath  <roland@redhat.com>
2166
2167         * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
2168         failure from pread64.
2169
2170 2008-08-26  Roland McGrath  <roland@redhat.com>
2171
2172         * segment.c (reify_segments): Insert a trailing segment for a module
2173         end that is above the highest current segment.
2174
2175 2008-08-25  Roland McGrath  <roland@redhat.com>
2176
2177         * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
2178         coded return value, not plain DWFL_E_LIBELF.  Return DWFL_E_BADELF
2179         if FILE->elf is not ELF_K_ELF.
2180
2181         * dwfl_segment_report_module.c: Add a cast.
2182
2183 2008-08-21  Denys Vlasenko  <dvlasenk@redhat.com>
2184
2185         * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
2186         which decides which symbol is "closest" to a given address.
2187
2188 2008-08-15  Roland McGrath  <roland@redhat.com>
2189
2190         * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
2191         (options, parse_opt): Handle --core.
2192
2193         * core-file.c: New file.
2194         * Makefile.am (libdwfl_a_SOURCES): Add it.
2195         * libdwflP.h (dwfl_core_file_report): Declare it.
2196
2197         * link_map.c: New file.
2198         * Makefile.am (libdwfl_a_SOURCES): Add it.
2199         * libdwflP.h (dwfl_link_map_report): Declare it.
2200
2201         * libdwflP.h (MIN, MAX): New macros.
2202         (Dwfl_Memory_Callback): New typedef.
2203         (Dwfl_Module_Callback): New typedef.
2204         (dwfl_segment_report_module): Declare it.
2205         * dwfl_segment_report_module.c: New file.
2206         * Makefile.am (libdwfl_a_SOURCES): Add it.
2207
2208         * derelocate.c (dwfl_module_address_section): Add INTDEF.
2209         * libdwflP.h: Add INTDECL.
2210
2211         * segment.c: New file.
2212         * Makefile.am (libdwfl_a_SOURCES): Add it.
2213         * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
2214         * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
2215         lookup_addr, lookup_module, lookup_segndx, replace removed members
2216         modules, nmodules.
2217         (struct Dwfl_Module): New member segment.
2218         * dwfl_end.c (dwfl_end): Free the new ones.  Iterate via modulelist
2219         to each free module.
2220         * dwfl_module.c (dwfl_report_begin_add): Do nothing.
2221         (dwfl_report_begin): Don't call it.  Truncate the segment table instead.
2222         (dwfl_report_module): Don't touch DWFL->nmodules.
2223         (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
2224         (compare_modules): Function removed.
2225         * dwfl_getmodules.c: Rewritten.
2226         Add INTDEF.
2227         * libdwflP.h: Add INTDECLs.
2228         * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
2229         * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
2230
2231 2008-08-03  Roland McGrath  <roland@redhat.com>
2232
2233         * linux-kernel-modules.c: Include <fts.h> before <config.h>.
2234
2235 2008-07-17  Roland McGrath  <roland@redhat.com>
2236
2237         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
2238         zero if the failure was only ENOENT.
2239
2240 2008-06-03  Roland McGrath  <roland@redhat.com>
2241
2242         * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
2243         symbols.
2244
2245 2008-05-22  Petr Machata  <pmachata@redhat.com>
2246
2247         * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
2248
2249 2008-05-06  Roland McGrath  <roland@frob.com>
2250
2251         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
2252         FTS_LOGICAL here too.
2253         (dwfl_linux_kernel_find_elf): Likewise.
2254
2255 2008-04-29  Roland McGrath  <roland@redhat.com>
2256
2257         * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
2258         based on canonicalize_file_name if it differs from the supplied name.
2259
2260         * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
2261         we accept symlinks.
2262
2263 2008-04-27  Roland McGrath  <roland@redhat.com>
2264
2265         * linux-kernel-modules.c (report_kernel): Fix crash when
2266         dwfl_report_elf fails.
2267
2268 2008-04-05  Roland McGrath  <roland@redhat.com>
2269
2270         * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
2271
2272         * dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
2273         Clear it after freeing.
2274         * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
2275
2276 2008-03-26  Roland McGrath  <roland@redhat.com>
2277
2278         * dwfl_module_getdwarf.c (load_symtab): Don't return success for
2279         SHT_DYNSYM, just set *SYMSCN like the comment says.
2280
2281         * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
2282
2283         * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
2284
2285 2008-03-19  Roland McGrath  <roland@redhat.com>
2286
2287         * dwfl_module_getsrc.c: Adjust address for module bias before search.
2288
2289 2008-03-01  Roland McGrath  <roland@redhat.com>
2290
2291         * libdwflP.h (__libdwfl_seterrno): Remove parameter name from
2292         prototype to avoid older compiler's complaint about reuse of the name.
2293         (__libdwfl_canon_error): Likewise.
2294
2295 2008-02-19  Roland McGrath  <roland@redhat.com>
2296
2297         * relocate.c (relocate_section): Check for an unhandled relocation
2298         type before resolving a reloc's symbol.  Lift DWFL_E_BADRELTYPE ->
2299         DWFL_E_UNKNOWN_MACHINE check out of loops.
2300
2301         * dwfl_module_getdwarf.c (load_dw): Skip relocation if
2302         DEBUGFILE->relocated is already set.
2303
2304 2008-01-26  Roland McGrath  <roland@redhat.com>
2305
2306         * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
2307
2308         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
2309         incoming *FILE_NAME at the start.
2310
2311 2008-01-08  Roland McGrath  <roland@redhat.com>
2312
2313         * Makefile.am (euinclude): Variable removed.
2314         (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2315
2316 2007-10-23  Roland McGrath  <roland@redhat.com>
2317
2318         * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
2319         module to appear first.
2320
2321 2007-10-20  Roland McGrath  <roland@redhat.com>
2322
2323         * offline.c (process_archive_member): Take FD argument, pass it down
2324         to process_file.  Return Elf_Cmd, not bool.
2325         Call elf_next here, always before elf_end.
2326         (process_archive): Update caller.  Don't close FD here unless there
2327         are no member refs.
2328
2329         * dwfl_module.c (free_file): Close fd only when elf_end returns zero.
2330
2331         * libdwflP.h (struct dwfl_file): New bool member `relocated'.
2332         * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
2333         partial relocation to one or both files.
2334         (dwfl_module_getdwarf): For ET_REL, make sure extra sections'
2335         relocations have been applied to the debug file if dwfl_module_getelf
2336         has been used before.
2337
2338         * relocate.c (resolve_symbol): New function.
2339         (relocate_section): Call it.
2340
2341         * relocate.c (relocate_getsym): Handle null MOD->symfile.
2342         (relocate_section): Take new bool arg, PARTIAL.  If true,
2343         no error for BADRELTYPE/RELUNDEF, instead just skip them
2344         and leave only those skipped relocs behind the reloc section.
2345         (__libdwfl_relocate_section): Take new arg, pass it down.
2346         (__libdwfl_relocate): Take new bool arg, DEBUG.  If false,
2347         do partial relocation on all sections.
2348         * dwfl_module_getdwarf.c (load_dw): Update caller.
2349         * libdwflP.h: Update decls.
2350         * derelocate.c (dwfl_module_address_section): Pass new argument
2351         to __libdwfl_relocate_section, true.
2352
2353         * derelocate.c (cache_sections): Don't cache reloc sections when
2354         section_address callback is null.
2355
2356 2007-10-19  Roland McGrath  <roland@redhat.com>
2357
2358         * relocate.c (relocate_section): Fix fencepost error in r_offset check.
2359
2360         * derelocate.c (struct dwfl_relocation): Add member `relocs'.
2361         (struct secref): Likewise.
2362         (cache_sections): Cache the relocation section referring to each
2363         section we cache, if any.
2364         (dwfl_module_address_section): Use __libdwfl_relocate_section as
2365         necessary.
2366
2367         * relocate.c (struct reloc_symtab_cache): New type.
2368         (relocate_getsym): Use it instead of four arguments.
2369         (__libdwfl_relocate): Update caller.
2370         (relocate_section): New function, broken out of ...
2371         (__libdwfl_relocate): ... here.
2372         (__libdwfl_relocate_section): New function.
2373         * libdwflP.h: Declare it.
2374
2375 2007-10-17  Roland McGrath  <roland@redhat.com>
2376
2377         * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
2378         to relocated st_value.
2379
2380         * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
2381         ET_REL to 0x100.
2382
2383 2007-10-16  Roland McGrath  <roland@redhat.com>
2384
2385         * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
2386         section has larger alignment requirements not met by the original BASE,
2387         rather than padding more between sections.
2388
2389         * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
2390
2391         * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
2392         to sh_addr value.
2393
2394         * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
2395         at zero in ET_REL case.  Adjust BASE to necessary alignment.
2396
2397         * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
2398         for DATA_VADDR.
2399         (__libdwfl_find_build_id): Update caller.
2400
2401         * relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
2402         * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
2403         * offline.c (dwfl_offline_section_address): Bail early if there is
2404         separate debug file.
2405
2406         * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
2407
2408 2007-10-09  Roland McGrath  <roland@redhat.com>
2409
2410         * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
2411         caching SHDR->sh_addr = 0.
2412         * offline.c (dwfl_offline_section_address): Never called for sh_addr
2413         really at 0, don't check for it.  Use MOD->debug directly, not symfile.
2414
2415         * dwfl_module_getdwarf.c (load_symtab): Return success properly when
2416         we've found SHT_SYMTAB.
2417
2418         * relocate.c (relocate_getsym): New function.
2419         (__libdwfl_relocate): Use it.
2420         (__libdwfl_relocate_value): Take new Elf * argument.  Make SYMSHSTRNDX
2421         be a pointer instead of value; cache getshstrndx result there.
2422         * libdwflP.h: Update decl.
2423         * derelocate.c (cache_sections): Update caller.
2424         Always work on the main file, not the symfile.
2425         (dwfl_module_address_section): Likewise.
2426         * dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
2427
2428 2007-10-07  Roland McGrath  <roland@redhat.com>
2429
2430         * offline.c (process_archive): Initialize MOD.
2431
2432         * linux-kernel-modules.c (get_release): New function, broken out of ...
2433         (report_kernel): ... here.  Call it.
2434         (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
2435         (find_kernel_elf): Update caller.
2436         (report_kernel_archive): New function.
2437         (dwfl_linux_kernel_report_offline): Call it.
2438
2439         * offline.c (process_file): Take new arg PREDICATE, pass it down.
2440         (process_archive): Likewise.
2441         (process_archive_member): Likewise.  When nonnull, let the predicate
2442         decide whether to use this member.
2443         (__libdwfl_report_offline): New function, broken out of ...
2444         (dwfl_report_offline): ... here.  Call it.
2445         * libdwflP.h: Declare it.
2446
2447         * offline.c (process_archive, process_archive_member): New functions.
2448         (process_elf, process_file): New functions, broken out of ...
2449         (dwfl_report_offline): ... here.  Call process_file, which recurses on
2450         ELF_K_AR files.
2451
2452         * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
2453         (dwfl_report_elf): ... here.  Call it.
2454         * libdwflP.h: Declare it.
2455
2456 2007-10-06  Roland McGrath  <roland@redhat.com>
2457
2458         * derelocate.c (dwfl_module_relocations): Don't call
2459         dwfl_module_getdwarf.
2460
2461         * derelocate.c (find_section): Use __libdwfl_seterrno, not
2462         __libdw_seterrno.
2463
2464         * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
2465         SHF_ALLOC, to cache sh_addr resolved to 0.
2466
2467         * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
2468         values nonzero already, just use its existing layout.
2469
2470         * relocate.c (__libdwfl_relocate): Clear size of reloc section in its
2471         in-core shdr after applying it.
2472
2473 2007-10-04  Ulrich Drepper  <drepper@redhat.com>
2474
2475         * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
2476         initialization of notes variable.
2477
2478 2007-10-04  Roland McGrath  <roland@redhat.com>
2479
2480         * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
2481         fill in with vaddr of "__start_notes" symbol if found.
2482         (check_notes): New function.
2483         (check_kernel_notes): New function.
2484         (dwfl_linux_kernel_report_kernel): Call it.
2485         (check_module_notes): New function.
2486         (dwfl_linux_kernel_report_modules): Call it.
2487
2488         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
2489         Try dwfl_build_id_find_elf first.
2490
2491         * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
2492         Set kernel module e_type to ET_DYN.
2493
2494 2007-10-03  Roland McGrath  <roland@redhat.com>
2495
2496         * find-debuginfo.c (validate): New function, broken out of ...
2497         (find_debuginfo_in_path): ... here.  New function, broken out of ...
2498         (dwfl_standard_find_debuginfo): ... here.  Call it, after trying
2499         dwfl_build_id_find_debuginfo first.
2500
2501         * dwfl_build_id_find_elf.c: New file.
2502         * dwfl_build_id_find_debuginfo.c: New file.
2503         * Makefile.am (libdwfl_a_SOURCES): Add them.
2504         * libdwfl.h: Declare them.
2505         * libdwflP.h: Add INTDECLs.
2506
2507         * dwfl_module_build_id.c: New file.
2508         * dwfl_module_report_build_id.c: New file.
2509         * Makefile.am (libdwfl_a_SOURCES): Add them.
2510         * libdwfl.h: Declare them.
2511         * libdwflP.h (struct Dwfl_Module): New members build_id_bits,
2512         build_id_len, build_id_vaddr.  Declare __libdwfl_find_build_id.
2513         * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
2514
2515         * dwfl_module_getdwarf.c (find_offsets): New function.
2516         (find_dynsym): New function, calls that.
2517         (find_symtab): Call it.
2518
2519 2007-09-11  Roland McGrath  <roland@redhat.com>
2520
2521         * dwfl_module_addrsym.c: Prefer a later global symbol at the same
2522         address if its st_size is smaller.
2523
2524 2007-08-13  Roland McGrath  <roland@redhat.com>
2525
2526         * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
2527
2528 2007-08-12  Roland McGrath  <roland@redhat.com>
2529
2530         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
2531         FTS_LOGICAL.
2532
2533         * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
2534         a second phdr if it happens to match EHDR_VMA exactly.
2535
2536 2007-08-08  Roland McGrath  <roland@redhat.com>
2537
2538         * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
2539         those with no names.  Rewrite best symbol algorithm not to assume a
2540         sorted table and to be smarter handling sizeless symbols.
2541
2542 2007-07-16  Roland McGrath  <roland@redhat.com>
2543
2544         * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
2545         reviving an existing module.
2546
2547 2007-06-08  Roland McGrath  <roland@redhat.com>
2548
2549         * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
2550
2551 2007-05-17  Roland McGrath  <roland@redhat.com>
2552
2553         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
2554         whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
2555         (dwfl_linux_kernel_find_elf): Likewise.
2556
2557         * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
2558         getline and sscanf instead of fscanf.
2559
2560 2007-05-08  Roland McGrath  <roland@redhat.com>
2561
2562         * offline.c (dwfl_offline_section_address): Don't assume section
2563         numbers match between stripped and debuginfo files.  Instead, assume
2564         only that the ordering among SHF_ALLOC sections matches.
2565
2566         * linux-kernel-modules.c (report_kernel): Change RELEASE argument to
2567         pointer to string.
2568         (dwfl_linux_kernel_report_offline): Update caller.
2569         (dwfl_linux_kernel_report_kernel): Likewise.
2570
2571 2007-04-23  Roland McGrath  <roland@redhat.com>
2572
2573         * argp-std.c (options): Fix group title string.
2574
2575         * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
2576         Update via STATE->input every time we set STATE->hook, not only at
2577         ARGP_KEY_SUCCESS.
2578
2579         * dwfl_module.c (free_file): Free FILE->name.
2580
2581 2007-04-16  Roland McGrath  <roland@redhat.com>
2582
2583         * derelocate.c (cache_sections): Apply bias to sh_addr.
2584         (compare_secrefs): Fix address comparison to avoid signed overflow.
2585         (find_section): New function, broken out of ...
2586         (dwfl_module_relocate_address): ... here, call it.
2587         (check_module): New function, broken out of ...
2588         (dwfl_module_relocate_address): ... here, call it.
2589         (dwfl_module_address_section): New function.
2590         * libdwfl.h: Declare it.
2591
2592 2007-03-26  Roland McGrath  <roland@redhat.com>
2593
2594         * dwfl_module.c (__libdwfl_module_free): Free MOD itself.
2595
2596 2007-03-18  Roland McGrath  <roland@redhat.com>
2597
2598         * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
2599         (find_debuginfo): ... here.  Call it.
2600         Don't return error for libelf errors finding .gnu_debuglink section.
2601
2602 2007-03-12  Roland McGrath  <roland@redhat.com>
2603
2604         * dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
2605         (dwfl_report_begin): ... here.  Call it.
2606         * libdwfl.h: Declare it.
2607         * libdwflP.h: Add INTDECL.
2608
2609         * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
2610
2611         * offline.c: Comment typo fix.
2612
2613 2007-03-04  Roland McGrath  <roland@redhat.com>
2614
2615         * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
2616         (find_kernel_elf): New function, broken out of ...
2617         (report_kernel): ... here.  Call it.
2618         (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
2619         (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
2620         virtual address bounds of kernel from symbols rounded to page size.
2621         (dwfl_linux_kernel_report_kernel): Use that if it works, before
2622         resorting to report_kernel.
2623
2624         * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
2625         ET_EXEC file with nonzero bias.
2626
2627         * dwfl_module_addrname.c (dwfl_module_addrname): Just call
2628         dwfl_module_addrsym.  Guts moved to ...
2629         * dwfl_module_addrsym.c: ... here; new file.
2630         * Makefile.am (libdwfl_a_SOURCES): Add it.
2631         * libdwfl.h: Declare dwfl_module_addrsym.
2632         * libdwflP.h: Add INTDECL.
2633
2634 2007-03-03  Roland McGrath  <roland@redhat.com>
2635
2636         * dwfl_module.c (free_file): New function, broken out of ...
2637         (__libdwfl_module_free): ... here.  In it, close fd after elf_end.
2638
2639         * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
2640         on libelf failure.
2641
2642 2007-03-02  Roland McGrath  <roland@redhat.com>
2643
2644         * linux-kernel-modules.c: Fix bogus error test for asprintf call.
2645
2646 2007-02-02  Roland McGrath  <roland@redhat.com>
2647
2648         * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
2649         address exactly if it's no other module's low boundary.
2650
2651         * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
2652         and size cover the address, select the closest symbol with st_size==0
2653         that lies in the same section.
2654
2655 2007-01-29  Roland McGrath  <roland@redhat.com>
2656
2657         * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
2658         not PACKAGE_STRING.
2659
2660 2007-01-20  Roland McGrath  <roland@redhat.com>
2661
2662         * relocate.c (__libdwfl_relocate_value): Treat section_address of -1
2663         as omitted, not 0.
2664         * libdwfl.h (Dwfl_Callbacks): Update comment.
2665         * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
2666         * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2667         For ignored missing section, use -1 instead of 0.
2668         * offline.c (dwfl_offline_section_address): Expect a call for 0.
2669
2670 2007-01-19  Roland McGrath  <roland@redhat.com>
2671
2672         * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
2673         zero so a lone -e foo.so is shown without address bias.
2674
2675 2007-01-10  Roland McGrath  <roland@redhat.com>
2676
2677         * linux-kernel-modules.c (report_kernel): Check asprintf return value
2678         directly instead of via side effect, to silence warn_unused_result.
2679         (dwfl_linux_kernel_report_offline): Likewise.
2680         (dwfl_linux_kernel_find_elf): Likewise.
2681         (dwfl_linux_kernel_module_section_address): Likewise.
2682         * find-debuginfo.c (try_open): Likewise.
2683         * linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
2684         (dwfl_linux_proc_report): Likewise.
2685
2686         * libdwfl.h (dwfl_begin): Require nonnull argument.
2687
2688 2006-12-27  Roland McGrath  <roland@redhat.com>
2689
2690         * dwfl_module.c (compare_modules): Fix address comparison to avoid
2691         signed overflow.  Patch by Frank Ch. Eigler <fche@redhat.com>.
2692
2693 2006-10-30  Roland McGrath  <roland@redhat.com>
2694
2695         * dwfl_module.c (dwfl_report_module): Comment typo fix.
2696
2697 2006-09-05  Roland McGrath  <roland@redhat.com>
2698
2699         * derelocate.c (cache_sections): Use alloca instead of variable-sized
2700         auto array, in function already using alloca.
2701
2702 2006-08-14  Roland McGrath  <roland@redhat.com>
2703
2704         * linux-kernel-modules.c (try_kernel_name): If the call to
2705         dwfl_standard_find_debuginfo produces no results, try it again
2706         with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
2707
2708         * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
2709         * libdwflP.h: ... to here.
2710         * linux-kernel-modules.c (try_kernel_name): Skip manual open if it
2711         repeats the first thing dwfl_standard_find_debuginfo will try.
2712
2713         * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
2714         (dwfl_linux_kernel_module_section_address): If a /sys file is missing
2715         and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
2716         section name.
2717
2718 2006-07-12  Ulrich Drepper  <drepper@redhat.com>
2719
2720         * cu.c: Adjust for internal_function_def removal.
2721         * dwfl_error.c: Likewise.
2722         * dwfl_module.c: Likewise.
2723         * dwfl_module_getdwarf.c: Likewise.
2724         * lines.c: Likewise.
2725         * relocate.c: Likewise.
2726
2727 2006-07-11  Ulrich Drepper  <drepper@redhat.com>
2728
2729         * dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
2730         it can overflow the return value type.
2731         Patch by Tim Moore <timoore@redhat.com>.
2732
2733 2006-06-28  Roland McGrath  <roland@redhat.com>
2734
2735         * libdwfl.h: Cosmetic changes.
2736
2737         * dwfl_line_comp_dir.c: New file.
2738         * Makefile.am (libdwfl_a_SOURCES): Add it.
2739         * libdwfl.h: Declare dwfl_line_comp_dir.
2740
2741         * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
2742
2743         * dwfl_linecu.c: New file.
2744         * Makefile.am (libdwfl_a_SOURCES): Add it.
2745         * libdwfl.h: Declare dwfl_linecu.
2746
2747         * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
2748         (dwfl_linecu): Define as macro.
2749
2750         * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
2751
2752         * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
2753         (dwfl_module_addrname): Function moved ...
2754         * dwfl_module_addrname.c: ... here, new file.
2755         * dwfl_module_getsym.c: New file.
2756         * Makefile.am (libdwfl_a_SOURCES): Add them.
2757         * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
2758         * libdwflP.h: Add INTDECLs.
2759
2760 2006-06-27  Roland McGrath  <roland@redhat.com>
2761
2762         * dwfl_module.c (dwfl_report_end): Whitespace fix.
2763
2764 2006-06-13  Roland McGrath  <roland@redhat.com>
2765
2766         * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
2767         Use __libdwfl_seterrno for elf_memory failure.
2768
2769 2006-05-22  Roland McGrath  <roland@redhat.com>
2770
2771         * dwfl_module_return_value_location.c
2772         (dwfl_module_return_value_location): Use __libdwfl_module_getebl.
2773
2774 2006-05-27  Ulrich Drepper  <drepper@redhat.com>
2775
2776         * libdwfl.h: Add extern "C".
2777
2778 2006-05-22  Ulrich Drepper  <drepper@redhat.com>
2779
2780         * cu.c (addrarange): Handle files without aranges information.
2781
2782 2006-05-16  Ulrich Drepper  <drepper@redhat.com>
2783
2784         * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
2785         ->modules is NULL.
2786
2787 2006-02-26  Roland McGrath  <roland@redhat.com>
2788
2789         * dwfl_version.c: New file.
2790         * Makefile.am (libdwfl_a_SOURCES): Add it.
2791         * libdwfl.h: Declare dwfl_version.
2792
2793         * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
2794         aligned up from DWFL->offline_next_address when checking for overlap.
2795
2796 2005-12-22  Roland McGrath  <roland@redhat.com>
2797
2798         * argp-std.c (parse_opt): Call dwfl_end in failure cases.
2799
2800         * linux-proc-maps.c (proc_maps_report): New function, broken out of ...
2801         (dwfl_linux_proc_report): ... here.  Call it.
2802         (dwfl_linux_proc_maps_report): New function.
2803         * libdwfl.h: Declare it.
2804         * libdwflP.h: Add INTDECL.
2805         * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
2806
2807         * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
2808         failed with DWFL_E_NO_DWARF.
2809
2810 2005-11-26  Roland McGrath  <roland@redhat.com>
2811
2812         * dwfl_end.c (dwfl_end): Free the DWFL itself.
2813
2814 2005-11-25  Roland McGrath  <roland@redhat.com>
2815
2816         * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
2817         (load_dw): Use it.
2818         * dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
2819         * libdwflP.h: Declare it.
2820
2821         * dwfl_module_register_names.c: New file.
2822         * Makefile.am (libdwfl_a_SOURCES): Add it.
2823         * libdwfl.h: Declare dwfl_module_register_names.
2824
2825 2005-11-21  Roland McGrath  <roland@redhat.com>
2826
2827         * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2828         Don't leak malloc'd file name.
2829         If a /sys/.../sections file is missing and starts with ".init",
2830         try the variant with "_init" too; catches PPC64 kernel braindamage.
2831
2832 2005-11-15  Roland McGrath  <roland@redhat.com>
2833
2834         * libdwfl.h: Comment fixes.
2835
2836         * dwfl_module_return_value_location.c: Add unlikely for error case.
2837
2838 2005-11-13  Roland McGrath  <roland@redhat.com>
2839
2840         * dwfl_return_value_location.c: New file.
2841         * Makefile.am (libdwfl_a_SOURCES): Add it.
2842         * libdwfl.h: Declare dwfl_module_return_value_location.
2843         * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
2844
2845 2005-10-20  Roland McGrath  <roland@redhat.com>
2846
2847         * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
2848         * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
2849         instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
2850
2851 2005-10-01  Roland McGrath  <roland@redhat.com>
2852
2853         * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
2854         with errno 0.
2855
2856 2005-09-19  Roland McGrath  <roland@redhat.com>
2857
2858         * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
2859         PRIx64 instead of PRIi64, lest addresses with high bits set overflow
2860         the signed integer reading; they will just have to be in hexadecimal.
2861         (dwfl_linux_kernel_module_section_address): Likewise.
2862
2863 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
2864
2865         * Makefile.am (%.os): Use COMPILE.os.
2866         (COMPILE.os): Filter out gconv options.
2867
2868 2005-08-25  Roland McGrath  <roland@redhat.com>
2869
2870         * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
2871         * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
2872
2873 2005-08-24  Roland McGrath  <roland@redhat.com>
2874
2875         * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
2876
2877         * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
2878         magic initializer to set -heur-stack-bound option.
2879
2880 2005-08-22  Roland McGrath  <roland@redhat.com>
2881
2882         * dwfl_validate_address.c: New file.
2883         * Makefile.am (libdwfl_a_SOURCES): Add it.
2884         * libdwfl.h: Declare dwfl_validate_address.
2885
2886         * derelocate.c (dwfl_module_relocate_address): Add INTDEF.
2887         * libdwflP.h: Add INTDECL.
2888
2889         * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
2890         elf_rawdata for symbol-related sections.
2891
2892         * offline.c (dwfl_report_offline): Move offline_next_address outside
2893         module's range, in case it's an ET_EXEC using fixed segment locations.
2894         * libdwfl.h: Update comment.
2895
2896         * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
2897         required alignment.
2898
2899 2005-08-20  Roland McGrath  <roland@redhat.com>
2900
2901         * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
2902         function to choose whether to report.
2903         (dwfl_linux_kernel_report_offline): Likewise.
2904         * libdwfl.h: Update decl.
2905         * argp-std.c (parse_opt): Update caller.
2906
2907         * dwfl_getsrclines.c: New file.
2908         * dwfl_onesrcline.c: New file.
2909         * Makefile.am (libdwfl_a_SOURCES): Add them.
2910         * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
2911
2912         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
2913         MODULESDIR[0].  Call fts_close on failure.
2914
2915         * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
2916         Close ET_REL file descriptors after relocation.
2917         (find_dw): Update caller.
2918         * offline.c (dwfl_report_offline): Get the file into memory and close
2919         the file descriptor.
2920
2921         * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
2922         MOD->debug.elf is already set.
2923
2924         * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
2925         (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
2926
2927         * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
2928         dwfl_linux_kernel_report_offline with offline_callbacks.
2929
2930         * linux-kernel-modules.c (report_kernel): New function, broken out of
2931         ...
2932         (dwfl_linux_kernel_report_kernel): ... here.  Use it.
2933         (dwfl_linux_kernel_report_offline): New function.
2934         * libdwfl.h: Declare it.
2935         * libdwflP.h: Add INTDECL.
2936
2937 2005-08-19  Roland McGrath  <roland@redhat.com>
2938
2939         Use standard debuginfo search path to look for vmlinux.
2940         * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
2941         passed zero.
2942         * linux-kernel-modules.c (try_kernel_name): New function, broken out
2943         of ...
2944         (dwfl_linux_kernel_report_kernel): ... here.  Use it.
2945
2946         * argp-std.c (offline_callbacks): New variable.
2947         (parse_opt): Use it for -e.  Allow multiple -e options.
2948
2949         * offline.c: New file.
2950         * Makefile.am (libdwfl_a_SOURCES): Add it.
2951         * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
2952         * libdwflP.h: Add INTDECLs.
2953         (OFFLINE_REDZONE): New macro.
2954         (struct Dwfl): New member `offline_next_address'.
2955         * dwfl_begin.c (dwfl_begin): Initialize it.
2956         * dwfl_module.c (dwfl_report_begin): Likewise.
2957
2958         * dwfl_report_elf.c (dwfl_report_elf): Accept all types.  When ET_REL,
2959         do a nominal absolute section layout starting at BASE.
2960         * libdwfl.h: Update comment.
2961
2962 2005-08-18  Roland McGrath  <roland@redhat.com>
2963
2964         * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
2965         dwfl_module_getdwarf if necessary.
2966
2967         * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
2968         * libdwfl.h: Update comment.
2969
2970         * derelocate.c: New file.
2971         * Makefile.am (libdwfl_a_SOURCES): Add it.
2972
2973         * libdwflP.h (struct Dwfl_Module): isrel -> e_type.
2974         * dwfl_report_elf.c (dwfl_report_elf): Initialize it.
2975         * dwfl_module_getdwarf.c (open_elf): Update initialization.
2976         (load_dw, dwfl_module_addrname): Update uses.
2977         * relocate.c (__libdwfl_relocate): Likewise.
2978
2979 2005-08-04  Roland McGrath  <roland@redhat.com>
2980
2981         * libdwfl.h (Dwfl_Callbacks.section_address): Take additional
2982         arguments SHNDX, SHDR.
2983         (dwfl_linux_kernel_module_section_address): Update prototype.
2984         * relocate.c (__libdwfl_relocate_value): Update caller.
2985         * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2986         Take the new arguments.
2987
2988 2005-08-10  Roland McGrath  <roland@redhat.com>
2989
2990         * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
2991         use it instead of MOD->debug.file.
2992         * libdwflP.h: Update decl.
2993         * dwfl_module_getdwarf.c (load_dw): Update caller.
2994         Fixes bug #165598.
2995
2996 2005-08-09  Roland McGrath  <roland@redhat.com>
2997
2998         * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
2999         * cu.c: Use INTUSE on dwarf_* calls.
3000         * dwfl_error.c: Likewise.
3001         * dwfl_module.c: Likewise.
3002         * dwfl_module_getdwarf.c: Likewise.
3003         * dwfl_module_getsrc_file.c: Likewise.
3004         * lines.c: Likewise.
3005
3006 2005-08-07  Roland McGrath  <roland@redhat.com>
3007
3008         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
3009         names contain '_' or '-', look for files named either "foo-bar.ko"
3010         or "foo_bar.ko".
3011
3012 2005-07-29  Roland McGrath  <roland@redhat.com>
3013
3014         * loc2c.c: File removed.
3015         * loc2c.h: File removed.
3016         * loc2c-runtime.h: File removed.
3017         * test2.c: File removed.
3018         * Makefile.am (EXTRA_DIST): Variable removed.
3019         (noinst_HEADERS): Remove loc2c.h from here.
3020
3021 2005-07-28  Ulrich Drepper  <drepper@redhat.com>
3022
3023         * libdwfl.h: Add a few missing extern for function prototypes.
3024
3025         * libdwfl_crc32.c: New file.
3026         * libdwfl_crc32_file.c: New file.
3027         * libdwflP.h: Declare the new functions.
3028         * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
3029         libdwfl_crc32_file.c.
3030         * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
3031         instead of crc32_file.
3032
3033 2005-07-28  Roland McGrath  <roland@redhat.com>
3034
3035         * ptest.c: Moved to ../tests/dwflmodtest.c.
3036
3037         * Makefile.am (noinst_PROGRAMS): Variable removed.
3038         (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
3039         (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
3040         (libdwfl): Don't use libdwfl.so any more.
3041         (libdwfl.so, install, uninstall): Targets removed.
3042         (test2_SOURCES): Define EXTRA_DIST instead of this.
3043         * libdwfl.map: File removed.
3044
3045         * libdwfl.h: Use "" for libdw.h #include.
3046
3047 2005-07-27  Roland McGrath  <roland@redhat.com>
3048
3049         * libdwfl.map: Add dwfl_getmodules.
3050
3051 2005-07-23  Ulrich Drepper  <drepper@redhat.com>
3052
3053         * Makefile.am: Fix rules to allow building with mudflap.
3054
3055 2005-07-21  Roland McGrath  <roland@redhat.com>
3056
3057         * Makefile.am (noinst_HEADERS): Add loc2c.c.
3058
3059         * test2.c (main): Check sscanf result to quiet warning.
3060
3061 2005-07-20  Roland McGrath  <roland@redhat.com>
3062
3063         * libdwfl-branch merged, creating this direcotry.