Add a few tips.
[riscv-tests.git] / debug / README.md
1 Debugging requires many of a system components to all work together. The goal
2 is to collect some tests that test gdb with spike, and gdb talking to real
3 hardware through openocd.
4
5 Debug Tips
6
7 You can run just a single test by specifying <class>.<function> on the command
8 line, eg: `./gdbserver.py --spike --cmd $RISCV/bin/spike
9 SimpleRegisterTest.test_s0`.
10 Once that test has failed, you can look at gdb.log and (in this case) spike.log
11 to get an idea of what might have gone wrong.
12
13 You can see what spike is doing by add `-l` to the spike command, eg.:
14 `./gdbserver.py --spike32 --cmd "$RISCV/bin/spike -l"
15 DebugTest.test_breakpoint`. (Then look at spike.log.)