From a0ccc04fd2b9744facb48e779d6357d3b7096ee0 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 27 Sep 2006 18:32:03 +0000 Subject: 2006-09-27 Martin Hunt * stack.c (_stp_kta): Rewrite. Use the _stap_symbols struct instead of calling into the kernel. * sym.c (_stp_kallsyms_lookup): Move here from runtime.h * runtime.h: Get rid of all the symbol stuff that did not belong here. --- runtime/stack.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/stack.c') diff --git a/runtime/stack.c b/runtime/stack.c index 73ac19cf..7037fa8f 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -30,6 +30,14 @@ #include "sym.c" #include "regs.h" +static int _stp_kta(unsigned long addr) +{ + if (addr >= stap_symbols[0].addr && + addr <= stap_symbols[stap_num_symbols-1].addr) + return 1; + return 0; +} + #if defined (__x86_64__) static void __stp_stack_sprint (String str, unsigned long *stack, int verbose, int levels) -- cgit