首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >2019年麻省理工学院xv6(riscv) -from调试问题6.S081/6.828操作系统课程

2019年麻省理工学院xv6(riscv) -from调试问题6.S081/6.828操作系统课程
EN

Stack Overflow用户
提问于 2020-06-07 14:37:33
回答 1查看 432关注 0票数 0

我正在尝试调试用户程序,但当我执行以下操作时:

代码语言:javascript
复制
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/

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-19 16:04:18

我终于想通了:

文件命令后面应该跟有可执行文件的路径

因此,如树所示:如果我想调试wc,我应该输入:

代码语言:javascript
复制
file user/_wc

然后设置断点,然后继续

然后在qemu中运行wc

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62241780

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档