This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: libunwind-using-elfutils mail review
- From: Andrew Cagney <cagney at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: frysk at sourceware dot org
- Date: Fri, 09 Mar 2007 14:00:10 -0500
- Subject: Re: libunwind-using-elfutils mail review
- References: <20070309162444.GA20597@host0.dyn.jankratochvil.net>
Jan,
Looking at the changes:
@@ -348,7 +350,11 @@ extern int dwarf_init (void);
extern int dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip,
unw_proc_info_t *pi,
int need_unwind_info, void *arg);
+extern int dwarf_get_proc_name (unw_addr_space_t as, pid_t pid, unw_word_t ip,
+ char *buf, size_t buf_len, unw_word_t *offp,
+ void *arg);
extern int dwarf_search_unwind_table (unw_addr_space_t as,
+ pid_t pid,
unw_word_t ip,
unw_dyn_info_t *di,
unw_proc_info_t *pi,
I'm guessing that the PID is added so that it can be passed through to
elfutils and hence let elfutils access /proc/PID/maps and other local
process information? For libunwind, its the unw_accessor_t vector that
should be used when accessing process information, and not access things
directly. This becomes important when, say, "process" is a core-file,
or when the "process" is on another system - the unw_accessor_t methods
provide the call-backs needed to extract the memory, and other
information from the non-process.
Have you tried getting libunwind to use elfutils by overriding the
unw_accessor_t methods:
find_proc_info
put_unwind_info
get_proc_name
D-M-T's posts suggest is is, but looking at the changes you had to make
to get libunwind working with elfutils then I'm wondering if there could
be problems. Perhaps you could provide a set of accessors, like the
existing UPT accessors, for handling the local case using libunwind and
elfutils.
The ability to override those methods with elf versions, is very
important. At present npremji is rewriting the libunwind bindings so
that they can work properly remote - that is implementing a
unw_accessors_t vector that obtains all information using frysk.proc
and, hopefully, elfutils. Once that is finished, the next step will be
to re-iimplement the elfutils (libdwfl) bindings so that they too obtain
their information from frysk.proc.
Andrew
For frysk, nurdin is currently preparing changes to
Jan Kratochvil wrote:
Hi Andrew,
please check the mail to <libunwind-devel@nongnu.org>.
I would like to suggest some frysk's libunwind changes merge upstream...