[Top][All Lists]

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

[libunwind] unwinding through dynamically modified code?

From: Todd L Miller
Subject: [libunwind] unwinding through dynamically modified code?
Date: Mon, 15 Mar 2004 13:21:56 -0600 (CST)

        Suppose I insert a jump in a remote process's code, and that the
jump leads to code which (after doing state preservation) jumps to a
second snippet of code that makes a function call.  Sometime during that
function call, probably while one of it the calls it makes is executing,
I'd like to use libunwind to walk the stack past the jump I inserted.

        It should be possible to construct a unw_dyn_info structure with
information appropriate for the state preservation.  If I read the
libunwind-dynamic.h header correctly, I should even be able to construct a
linked list of these structures with disjoint address ranges to cover the
second (and additional) snippets.  However, it's not clear to me that this
will work: how do I tell libunwind to use the unwind information the
function into which I inserted the jump?

        Would be any less painful to catch the "no unwind information
available" error and construct a new cursor "by hand" in the local
process?  (This would have the (potentially substantial, for me) benefit
of not requiring function calls in the remote process to set up the
dynamic unwind information.)  Thank you.

- Todd L Miller

reply via email to

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