aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/core/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/core/sys.c')
-rw-r--r--src/kernel/core/sys.c7
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];