Operating System debugger for Ubuntu 11.10

混江龙づ霸主 提交于 2019-12-12 04:57:45

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/9865657/operating-system-debugger-for-ubuntu-11-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!