-
Notifications
You must be signed in to change notification settings - Fork 7
2 Debugging with gdb
Cameron Durham edited this page May 22, 2020
·
1 revision
Here's a quick example of how you can use GDB with the Docker image. I'm using tmux in this video, but you can use any method to have multiple terminals.
Here's the step-by-step:
Terminal A, B should be in the xv6-public-master directory:
Terminal A:
- run:
make qemu-nox-gdb
- note the port number (here it was 25000)
Terminal B:
- run:
gdb kernel
- (optional) set breakpoints in the source code
- run:
c
(continue) - start debugging!
(optional) Terminal A:
- run any user-level program
Terminal B:
- Ctrl-C
-
bt
(backtrace)