From d09f8a08bdd9477bd463a2de03397ff56b5ce75d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 13 Jul 2016 23:11:55 +0200 Subject: Add delta wrt. function in stack dump --- src/kernel/core/sys.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/kernel/core/sys.c') diff --git a/src/kernel/core/sys.c b/src/kernel/core/sys.c index 333cb58..02b66e5 100644 --- a/src/kernel/core/sys.c +++ b/src/kernel/core/sys.c @@ -73,9 +73,12 @@ void kernel_stacktrace(uint32_t ebp, uint32_t eip) { int i = 0; while (ebp >= K_HIGHHALF_ADDR) { char* sym = 0; - if (kernel_symbol_map != 0) sym = btree_lower(kernel_symbol_map, (void*)eip); + void* fn_ptr = 0; + if (kernel_symbol_map != 0) { + sym = btree_lower(kernel_symbol_map, (void*)eip, &fn_ptr); + } - dbg_printf("| 0x%p EIP: 0x%p %s\n", ebp, eip, sym); + dbg_printf("| 0x%p EIP: 0x%p %s +0x%p\n", ebp, eip, sym, ((void*)eip - fn_ptr)); uint32_t *d = (uint32_t*)ebp; ebp = d[0]; -- cgit v1.2.3