目前的Linux内核调试技巧 [英] Current Linux Kernel debugging techniques

查看:163
本文介绍了目前的Linux内核调试技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

linux机器在启动和运行软件(包括定制驱动程序)后几个小时冻结。我正在寻找一种方法来调试这个问题。最近,Linux内核调试技术已经取得了很大进展,不是吗?

A linux machine freezes few hours after booting and running software (including custom drivers). I'm looking a method to debug such problem. Recently, there has been significant progress in Linux Kernel debugging techniques, hasn't it?

请问有关这个话题的经验。

I kindly ask to share some experience on the topic.

推荐答案

如果可以在VM中重现问题,确实有一个相当新的(AFAIK)技术可能是有用的:从运行的主机调试虚拟机。

If you can reproduce the problem inside a VM, there is indeed a fairly new (AFAIK) technique which might be useful: debugging the virtual machine from the host machine it runs on.

参见例如:
使用Windows主机调试VMWare中的Linux内核

VMware Workstation 7还支持强大的技术,让您可以确定地记录系统执行,然后根据需要甚至向后重播。所以一旦系统崩溃,你可以后退,看看发生了什么(甚至尝试改变一些东西,看看它是否还会崩溃)。 IIRC我读到某处你不能这样做,并且同时使用VMware / gdb调试内核。

VMware Workstation 7 also enables a powerful technique that lets you record system execution deterministically and then replay it as desired, even backwards. So as soon as the system crashes you can go backwards and see what was happening then (and even try changing something and see if it still crashes). IIRC I read somewhere you can't do this and debug the kernel using VMware/gdb at the same time.

显然,你需要一个VMM。我不知道VMware的VMM系列之外的哪个VMM支持这一点,而且我不知道有没有免费的VMware版本支持这一点。可能不是人们不能真正期望商业公司免费放弃一切。试用版是30天。

Obviously, you need a VMM for this. I don't know what VMM's other than VMware's VMM family support this, and I don't know if any free VMware versions support this. Likely not; one can't really expect a commercial company to give away everything for free. The trial version is 30 days.

如果您的自定义驱动程序是用于机器内部的硬件,那么我想这可能无法正常工作。

If your custom drivers are for hardware inside the machine, then I suppose this probably won't work.

这篇关于目前的Linux内核调试技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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