libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCHv3 0/4] Add core dump unwinding support to libun


From: Denys Vlasenko
Subject: [Libunwind-devel] [PATCHv3 0/4] Add core dump unwinding support to libunwind
Date: Mon, 27 Feb 2012 16:53:33 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20120131 Thunderbird/10.0

Hi,

For the needs of ABRT project, I need to extract backtrace
from a coredump. Currently we use gdb for this, but
we want to be able to support users which do not want
to install and use gdb.

This patch set implements coredump unwinding using the ideas from
libunwind-ptrace.h API.

It adds a new directory under src, src/coredump/,
and results in one new header file (libunwind-coredump.h)
and one new library (libunwind-coredump.a) installed
by "make install".

src/coredump/ contains README file, *.c and *.h files,
and example-core-unwind.c which shows how the coredump
unwinding can be done.

The patch set is run-tested on i386.

Please review and let me know whether this patch set will be
accepted in the libunwind upstream.
If it won't be accepted, we (ABRT team) will need to think
about alternative ways to achieve our needs...

Patch set breakdown:

Patch 1:
Introduce struct elf_dyn_info: a common part of struct UPT_info
and struct UCD_info (to be introduced later).
Make _UPTi_find_unwind_table function operate only on this part
of struct UPT_info.

Patch 2:
Move ptrace-independent code from src/ptrace/_UPT_find_proc_info.c
to src/dwarf/{G,L}find_unwind_table.c. Name this moved function
dwarf_find_unwind_table().

Patch 3:
In src/elfxx.c, factor out a part of get_proc_name() function
into a new function get_proc_name_in_image(). The difference
is that get_proc_name_in_image() does not assume that we trace
a process, doesn't scan /proc/PID/maps but instead accepts
already mapped ELF file. This refactoring is required by patch 4:
it will call get_proc_name_in_image().

Patch 4:
Add src/coredump/*. Took the review comments into an account:
uses code commonalized in patches 1, 2; reformatted to follow
the style.

Changes since last version:
* implemented get_proc_name
* added possibility to add backing file by vaddr, not only by
  segment number: now we have _UCD_add_backing_file_at_vaddr()
  and _UCD_add_backing_file_at_segment().
* completed the style reformatting (example-core-unwind.c)

--
vda



reply via email to

[Prev in Thread] Current Thread [Next in Thread]