Ubuntu 11.10操作系统调试器 [英] Operating System debugger for Ubuntu 11.10

查看:261
本文介绍了Ubuntu 11.10操作系统调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在做操作系统开发(不是构建一个Linux内核),并且已经到了我需要调试器的地步,因为我的最新的操作系统。我已经尝试过Bochs(在我的Win 7分区下),但是不能识别我的USB(没有格式化,我现在正在阅读特定的部分),我宁愿在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆