Hi all, I'm running littlekernel aarch64-elf in qemu. I've got the gdb stub running and I've connected to it from gdb. I'm able to set breakpoints, run, step and inspect variables. Unfortunately, when the kernel panics, the callstack I get isn't very useful.
1 uart_pgetc uart.c 158 0xffff000000011dd0 2 platform_pgetc debug.c 48 0xffff000000011970 3 __panic_stdio_read debug.c 54 0xffff0000000401e0 4 __panic_stdio_read debug.c 50 0xffff0000000401e0 5 getc stdio.c 66 0xffff000000044ad0 6 read_line_panic console.c 866 0xffff000000040030 7 panic_shell_start console.c 866 0xffff000000040030 8 platform_halt power.c 32 0xffff0000000396fc 9 _panic debug.c 35 0xffff0000000402c0 10 arm64_sync_exception exceptions_c.c 101 0xffff0000000121fc 11 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 12 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 13 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 14 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 15 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 16 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 17 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 18 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 19 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c 20 arm64_sync_exc_current_el_SPx exceptions.S 145 0xffff00000001125c ... <More> /* exceptions from current EL, using SPx */ .org 0x200 LOCAL_FUNCTION(arm64_sync_exc_current_el_SPx) regsave_long mov x0, sp bl arm64_sync_exception b arm64_exc_shared_restore_long https://github.com/littlekernel/lk How do I get the gdb stub to stop in the debugger at the exception point, rather than in the exception handler? Thanks! -- Vince Harron | Software Engineer | vhar...@google.com | 858-442-0868