diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-04-20 22:43:37 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-04-20 22:43:37 +0200 |
commit | 47a2a2303c9b261e88a4333bf2964b4291a22a12 (patch) | |
tree | 294c40064abc7f52ae9f5274186a8b974b38bf40 /runtime/stack-i386.c | |
parent | 30c4b46a6da666674684cef7b57670b26534618c (diff) | |
download | systemtap-steved-47a2a2303c9b261e88a4333bf2964b4291a22a12.tar.gz systemtap-steved-47a2a2303c9b261e88a4333bf2964b4291a22a12.tar.xz systemtap-steved-47a2a2303c9b261e88a4333bf2964b4291a22a12.zip |
Pass task from tapset, through stack and unwind functions for lookup.
* runtime/stack-arm.c (__stp_stack_print): Take struct task_struct *.
* runtime/stack-ia64.c (__stp_stack_print): Likewise.
* runtime/stack-ppc64.c (__stp_stack_print): Likewise.
* runtime/stack-s390.c (__stp_stack_print): Likewise.
* runtime/stack-i386.c (__stp_stack_print): Likewise.
And add check and pass to unwind() and _stp_func_print().
* runtime/stack-x86_64.c: Likewise.
* runtime/stack.c *_stp_stack_print): Take and pass on task_struct.
(_stp_stack_snprint): Likewise.
* runtime/unwind.c (unwind): Take and use task_struct for
_stp_mod_sec_lookup().
* tapset/context-unwind.stp (print_backtrace): Pass NULL to
_stp_stack_print().
(backtrace): Pass NULL to _stp_stack_snprint().
Diffstat (limited to 'runtime/stack-i386.c')
-rw-r--r-- | runtime/stack-i386.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index a37ddd72..6fd1613f 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -30,7 +30,8 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve } #endif -static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) +static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels, + struct task_struct *tsk) { unsigned long context = (unsigned long)®_SP(regs) & ~(THREAD_SIZE - 1); @@ -60,11 +61,11 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) struct unwind_frame_info info; arch_unw_init_frame_info(&info, regs); - while (levels && !arch_unw_user_mode(&info)) { - int ret = unwind(&info); + while (levels && (tsk || !arch_unw_user_mode(&info))) { + int ret = unwind(&info, tsk); dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info)); if (ret == 0) { - _stp_func_print(UNW_PC(&info), verbose, 1, current); + _stp_func_print(UNW_PC(&info), verbose, 1, tsk); levels--; continue; } |