Ubuntu 11.10操作系统调试器 [英] Operating System debugger for Ubuntu 11.10
问题描述
有没有一个Debugger可以让我调试Ubuntu 11.10的自定义构建操作系统?
p>个人而言,我使用 QEMU 调试自定义操作系统(其中 USB支持)。
如下运行QEMU进行调试会话: / p>
qemu -S -s [更多选项]
-
-S
告诉QEMU不启动cpu。这可以让您有时间设置断点等。 -
-s
是-gdb tcp :: 1234
在TCP端口1234启动gdbserver。
然后将GDB连接到QEMU:
$ gdb
(gdb)target remote localhost:1234
从那时起,您可以使用正常的GDB命令。
I've been doing operating system development (not building a Linux kernel), and have gotten to the point where I need a debugger, for my latest OS. I've tried Bochs (under my Win 7 partition), but that wouldn't recognize my USB (It's unformatted, I'm reading specific sectors right now.) and I would rather do something under Ubuntu 11.10.
Is there a Debugger that would let me debug a custom build OS for Ubuntu 11.10?
Personally, I use QEMU for debugging a custom OS (which has USB support).
Run QEMU as follows for a debugging session:
qemu -S -s [more options here]
-S
tells QEMU to not start the cpu. This gives you time to set breakpoints etc.-s
is a shortcut for-gdb tcp::1234
which start a gdbserver at TCP port 1234.
Then connect GDB to QEMU:
$ gdb
(gdb) target remote localhost:1234
From that point, you can use the normal GDB commands.
这篇关于Ubuntu 11.10操作系统调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!