我正在尝试调试用户程序,但当我执行以下操作时:
open a terminal:make qemu-gdb
another terminal:
riscv64-unknown-elf-gdb
file wc(or any other user programs)
it says:
(gdb) file wc
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default riscv settings.
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default riscv settings.
Reading symbols from wc...
(No debugging symbols found in wc)我编辑了Makefile,并在CFLAGS和LDFLAGS中添加了-g,但就是不起作用。我想知道如何调试用户程序
如果你能回复并帮助我,我将不胜感激
ps:这是MakeFile和项目树
树:https://paste.ubuntu.com/p/s9JGY8d4Z9/生成文件:https://paste.ubuntu.com/p/Zp6HXcF4Vq/
发布于 2020-06-19 16:04:18
我终于想通了:
文件命令后面应该跟有可执行文件的路径
因此,如树所示:如果我想调试wc,我应该输入:
file user/_wc然后设置断点,然后继续
然后在qemu中运行wc
https://stackoverflow.com/questions/62241780
复制相似问题