From 028e1bde11b9644d1ac62f0a1a2188cf8def234a Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 20 Dec 2009 13:34:16 -0500 Subject: runtime backtracing: port commit #2e7f8442 to uprobes1 * runtime/uprobes/uprobes.c (uprobe_get_pc): new function --- runtime/stack-x86_64.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'runtime/stack-x86_64.c') diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index d6c63412..3fc203f7 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -38,7 +38,6 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, while (levels && (tsk || !arch_unw_user_mode(&info))) { int ret = unwind(&info, tsk); -#if defined(UPROBES_API_VERSION) && UPROBES_API_VERSION > 1 unsigned long maybe_pc = 0; if (ri) { maybe_pc = uprobe_get_pc(ri, UNW_PC(&info), @@ -48,7 +47,6 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, else UNW_PC(&info) = maybe_pc; } -#endif 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, tsk); -- cgit From f0da6b3c8ba5a26f983714ddfcfd559ea05af5e3 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 20 Dec 2009 22:28:50 -0500 Subject: runtime: more build fix for non-utrace kernels * runtime/stack-i386.c (_stp_stack_print): Make call to uprobe_get_pc() conditional on CONFIG_UTRACE. * runtime/stack-x86_64.c: Ditto. --- runtime/stack-x86_64.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/stack-x86_64.c') diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 3fc203f7..6aebcb58 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -38,6 +38,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, while (levels && (tsk || !arch_unw_user_mode(&info))) { int ret = unwind(&info, tsk); +#ifdef CONFIG_UTRACE unsigned long maybe_pc = 0; if (ri) { maybe_pc = uprobe_get_pc(ri, UNW_PC(&info), @@ -47,6 +48,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, else UNW_PC(&info) = maybe_pc; } +#undef 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, tsk); -- cgit From 261135850dbd4a2efd7d4cbd3d0e3dcde46688ee Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 20 Dec 2009 22:49:00 -0500 Subject: brown paper bag typo fixy --- runtime/stack-x86_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/stack-x86_64.c') diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 6aebcb58..030e5ef1 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -48,7 +48,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, else UNW_PC(&info) = maybe_pc; } -#undef +#endif 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, tsk); -- cgit