Remove "import ." notation.
[riscv-tests.git] / debug / README.md
1 Debug Tests
2 ===========
3
4 Debugging requires many system components to all work together. The tests here
5 perform an end-to-end test, communicating only with gdb. If a simulator or
6 hardware passes all these tests, then you can be pretty confident that the
7 actual debug interface is functioning correctly.
8
9 Targets
10 =======
11
12 64-bit Spike
13 ------------
14
15 `./gdbserver.py --spike64 --cmd $RISCV/bin/spike`
16
17 32-bit Spike
18 ------------
19
20 `./gdbserver.py --spike32 --cmd $RISCV/bin/spike`
21
22 32-bit SiFive Core on Supported FPGA Boards & Hardware
23 -------------------------------------
24
25 `./gdbserver.py --freedom-e300`
26
27 32-bit rocket-chip core in Simulation
28 -------------------------------------
29
30 `./gdbserver.py --freedom-e300-sim`
31
32
33 Debug Tips
34 ==========
35
36 You can run just a single test by specifying <class>.<function> on the command
37 line, eg: `./gdbserver.py --spike64 --cmd $RISCV/bin/spike
38 SimpleRegisterTest.test_s0`.
39 Once that test has failed, you can look at gdb.log and (in this case) spike.log
40 to get an idea of what might have gone wrong.
41
42 You can see what spike is doing by add `-l` to the spike command, eg.:
43 `./gdbserver.py --spike32 --cmd "$RISCV/bin/spike -l"
44 DebugTest.test_breakpoint`. (Then look at spike.log.)
45
46 You can run gdb under valgrind by passing --gdb, eg.: `./gdbserver.py --spike64
47 --gdb "valgrind riscv64-unknown-elf-gdb" -- -v DownloadTest`.