aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-05-18 23:38:23 +0200
committerHimbeer <himbeer@disroot.org>2024-05-18 23:38:23 +0200
commit6db0b6c8dd044b49a2e8a65dfc95a1b296f3ef2e (patch)
treeeba1b322359faa24123c1d9048ac801f4a7c22a7
parent9d98072013d6d0656aeb943030d78fa7f3e3b9bb (diff)
parent2e3fd0a7719b06c72ab1ab8b1e1bbf36125072f5 (diff)
Merge branch 'main' of codeberg.org:Himbeer/srvre_kernel
-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.