This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: patches to frysk-imports/lib/dw
- From: Andrew Cagney <cagney at redhat dot com>
- To: Adam Jocksch <ajocksch at redhat dot com>
- Cc: frysk <frysk at sources dot redhat dot com>
- Date: Mon, 18 Sep 2006 10:06:21 -0400
- Subject: Re: patches to frysk-imports/lib/dw
- References: <450D9EFF.2090905@redhat.com>
Adam Jocksch wrote:
I've wrapped the necessary functionality needed to find inlined
function calls in the libdw wrapper (see attached patch). I'm not 100%
certain where this code should be called from though. Ideally while
libunwind is unwinding (i.e. in one of the callbacks so we open as few
Dwfl objects as possible), but for a first implementation maybe it
would be worth doing it after libunwind has created the stack trace.
Yes. Even long term.
They are separate operations. libunwind provides a list of ABI frame
instances; given an ABI frame instance, libdw can return a list of
inlined functions.
Further, in general, the code needs to head in the direction of being
on-demand. While the initial cut of libunwind, for instance, can
generate a full backtrace up front, it will longer term need to act more
on demand - only performing an unwind an actually required. For instance:
- when single stepping, the code will need to do a single frame unwind
to determine if/where a step-into or step-out-of function occured - no
other frames are needed and typically the test is immediatly followed by
an unblock (i.e., continue)
- as a performance tweak, when backtracing, the current backtrace can be
spliced onto a previous cached backtrace - avoiding unwind overhead.
Andrew