diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-13 23:11:55 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-13 23:11:55 +0200 |
commit | d09f8a08bdd9477bd463a2de03397ff56b5ce75d (patch) | |
tree | 4818750ff1fccd02f24e6f2089937190d2e6724b /src/kernel/core/sys.c | |
parent | 8a89ad4b01bafcdb64349e81fb4883a6c5f45187 (diff) | |
download | kogata-d09f8a08bdd9477bd463a2de03397ff56b5ce75d.tar.gz kogata-d09f8a08bdd9477bd463a2de03397ff56b5ce75d.zip |
Add delta wrt. function in stack dump
Diffstat (limited to 'src/kernel/core/sys.c')
-rw-r--r-- | src/kernel/core/sys.c | 7 |
1 files changed, 5 insertions, 2 deletions
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]; |