Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用GNU DDD(gdb 图形外壳)来调试在 qemu 中运行(在某些发行版中)的 Linux 内核。
我在 Qemu 之外有 vmlinux 映像,并使用 启动 Qemu -s -S,因此它的作用类似于 gdbserver(在启动时停止并等待调试命令)。现在,如何使用本地 vmlinux 映像将 DDD 连接到该 gdbserver?
-s -S
我应该只打开图像并告诉 gdb '目标远程'吗?
您基本上回答了您自己的问题 - 是的,在 ddd 中使用 target remote gdb 命令进行连接:
$ gdb qemuKernelFile (gdb) target remote localhost:1234
通过细微的调整,您可以使用此处详细描述的程序。
本教程中的一张图片: