Skip to content

Commit

Permalink
debug.gdb: update with userland helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
karlek committed May 8, 2024
1 parent 019a857 commit a0edb88
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions debug.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a0edb88

Please sign in to comment.