printing the instruction pointer under x86-64

Daniel Jacobowitz drow at false.org
Wed May 13 13:44:34 UTC 2009


On Thu, Apr 23, 2009 at 01:39:56AM -0700, Roland McGrath wrote:
> The vDSO is a shared library provided by the kernel on some architectures.
> In x86-32 processes, the C library calls into this library to make a system
> call (__kernel_vsyscall).  So it's the caller of that frame that is what is
> really interesting.  Actually usually that caller is in libc and that is
> boring too.  You need its caller, or the one before that, to actually get
> to your program's own code.  i.e., you want a full stack backtrace.  In
> modern systems, that requires interpreting (and having) unwind information
> (which you do have in the vDSO).  strace is just prepared to do that.

While strace is not prepared to do a full backtrace - could it
recognize the vDSO and do a single frame?  It should be pretty simple
to recognize a canned code sequence and take a single action.

-- 
Daniel Jacobowitz
CodeSourcery




More information about the Strace-devel mailing list