RiscV Debugging With QEMU, GDB, and VSCode

preview_player
Показать описание
I walk through debugging a bare-metal hello world C program for the Risc-V architecture running under QEMU. I discuss using the GDB client and give bonus coverage for setting up VSCode to use the interactive debugger.

Resources

Footnote
Рекомендации по теме
Комментарии
Автор

It is wired that my vscode doesn't display registers on the variables when i run the same launch.json and tasks.json files. I don't know whate the problem is. Actually, there is a "Locals" and "Registers" below "VARIABLES", but there is nothing below "Registers", where I expect "cpu" etc.

一枚小P孩
Автор

@chuckbenedict7235 thank you for this helpful video. At the first time I run debug mode on qemu using vscode and i've got this error. can you help me? I am using ubuntu Ubuntu 22.04.4 LTS . This is my terminal:

Reading symbols from hello.elf...
Remote debugging using :1234
warning: while parsing target description (at line 1): Target description specified unknown architecture "riscv:rv32"
warning: Could not load XML target description; ignoring
Truncated register 22 in remote 'g' packet
(gdb) b _start
Breakpoint 1 at file start.s, line 9.
(gdb) c
The program is not being run.
(gdb)

tuanluu