首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当我用xv6做实验时,gdb似乎不起作用。

当我用xv6做实验时,gdb似乎不起作用。
EN

Stack Overflow用户
提问于 2021-04-19 11:12:33
回答 1查看 388关注 0票数 0

目前我正在xv6书上做一些练习,但是我打算用gdb进行调试,我发现一些东西不起作用.在一个终端上,它正在收听25000,似乎没问题。

代码语言:javascript
运行
复制
~/xv6-labs-2020# make qemu-gdb
*** Now run 'gdb' in another window.
qemu-system-riscv64 -machine virt -bios none -kernel kernel/kernel -m 128M -smp 3 -nographic -drive file=fs.img,if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -S -gdb tcp::25000

好像有东西坏了,但我真的不知道,不能继续下去.有人能帮忙吗?太棒了!

代码语言:javascript
运行
复制
(gdb) target remote:25000
Remote debugging using :25000
warning: Architecture rejected target-supplied description
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
Truncated register 37 in remote 'g' packet
(gdb) b _entry
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_entry) pending.
(gdb) r
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) file kernel/kernel
Reading symbols from kernel/kernel...done.
(gdb) r
Starting program: /root/xv6-labs-2020/kernel/kernel
/bin/bash: /root/xv6-labs-2020/kernel/kernel: cannot execute binary file: Exec format error
/bin/bash: /root/xv6-labs-2020/kernel/kernel: Success
During startup program exited with code 126.
(gdb)
EN

回答 1

Stack Overflow用户

发布于 2022-10-09 04:35:06

尝试使用riscv64 64-未知-精灵-gdb或riscv64 64-linux-gnu-gdb。

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

https://stackoverflow.com/questions/67160885

复制
相关文章

相似问题

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