This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Stacktracing going forward.
- From: Nurdin Premji <npremji at redhat dot com>
- To: Frysk Hackers <frysk at sourceware dot org>
- Date: Mon, 14 May 2007 14:04:08 -0400
- Subject: Stacktracing going forward.
Stacktracing work is mostly complete in the cross-platform case of
unwinding an x86 binary running on an x86_64. The only missing part is
the name of the inner most frame of the binary. Which appears to be
inside the vdso.
In order to get elfutils to properly determine the name of this inner
most vdso frame some changes to the elfutils bindings will need to be
made. This will also be needed to get core files to be unwound.
Inside frysk-imports/lib/dw/cni/Dwfl.cxx, the method dwfl_begin creates
a Dwfl given a pid. There is a call to the function
dwfl_linux_proc_report(dwfl, pid). Which is defined in
elfutils/libdwfl/linux-proc-maps.c.
This method creates all the dwfl_modules by reading /proc/pic/maps.
There are two limitations with this method. The first is that it only
works on live processes (takes a pid). The second is that it calls a
method find_sysinfo_ehdr (same file), which has a switch statement based
on sizeof(long int). This means it assumes the host architecture and the
target architecture are the same.
We will need to create a dwfl_frysk_proc_report(dwfl, Proc proc) or
something similar which will do twhat dwfl_linux_proc_report does for
any type of frysk proc.
(Alternatively we can create several dwfl_frysk_ptrace_proc,
dwfl_frysk_core_proc methods with different parameters.)
We will probably also need to implement our own Dwfl_Callbacks callbacks
which are set up just before the call to dwfl_linux_proc_report.