unwind: introduce stacktrace_walker
authorMasatake YAMATO <yamato@redhat.com>
Wed, 16 Apr 2014 06:33:04 +0000 (15:33 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 30 May 2014 22:43:04 +0000 (22:43 +0000)
commit2d534daaa66ddc6a0558717160f0e1b337f7b7c5
tree0d210270a85e38649b0176c9b64a761fa2254cdd
parent6141392856a170c9297783e6bfbd9fd970f76fdf
unwind: introduce stacktrace_walker

In current implementation, the stack trace is captured and printed at
the same time, in trace_syscall_exiting.  This approach cannot
provide user expected information when a system call changes the
memory mapping.  In such cases, the stack trace should be captured on
entering syscall and printed on exiting.

As the initial step for splitting capturing from printing, this change
introduces stacktrace_walker utility function.  It can be used both for
capturing in trace_syscall_entering and printing in
trace_syscall_exiting.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
unwind.c