This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patches to frysk-imports/lib/dw


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]