From a0edb888373edd3e7423a4995ef508a7115e572f Mon Sep 17 00:00:00 2001 From: Henry Eklind Date: Wed, 8 May 2024 22:48:56 +0200 Subject: [PATCH] debug.gdb: update with userland helpers --- debug.gdb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/debug.gdb b/debug.gdb index c29c914..90ff618 100644 --- a/debug.gdb +++ b/debug.gdb @@ -10,12 +10,20 @@ gef-remote --qemu-user localhost 1234 # Any break points should be set here. break enter_userland commands + # NOTE: breakpoints on userland functions should be defined here! + # TODO: hard-coded userland entrypoint. But _sooo_ good for debugging. add-symbol-file bin/userland.elf 0xa0300000+0x30 - break elf_userland + + # break elf_userland + # Good tool when you want to relinquish control back to GDB from source. + break debug_interrupt + continue end -break syscall_landing_pad # Run until the program first breakpoint. continue + +# Handy way to debug the userland callstack. +# hexdump byte 0xa0200ff0 --size 0x100 --reverse