aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index c89f331..3900cd0 100644
--- a/README.md
+++ b/README.md
@@ -182,3 +182,15 @@ The advantage of this boot flow is that it doesn't require the use of U-Boot.
In theory, anything that sets the registers as described above
and runs the kernel in S-mode should work, so any SBI should work
if you can get it to run.
+
+# Debugging
+
+You can run QEMU with the `-s -S` flags and attach `riscv64-elf-gdb`:
+
+```
+add-symbol-file /path/to/srvre_kernel.elf
+target remote localhost:1234
+```
+
+Be sure to confirm the prompt from the `add-symbol-file` command.
+You can also use `riscv64-elf-gdb /path/to/srvre_kernel.elf` directly.