目前我正在xv6书上做一些练习,但是我打算用gdb进行调试,我发现一些东西不起作用.在一个终端上,它正在收听25000,似乎没问题。
~/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好像有东西坏了,但我真的不知道,不能继续下去.有人能帮忙吗?太棒了!
(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)发布于 2022-10-09 04:35:06
尝试使用riscv64 64-未知-精灵-gdb或riscv64 64-linux-gnu-gdb。
https://stackoverflow.com/questions/67160885
复制相似问题