Current Linux Kernel debugging techniques

后端 未结 5 1643
遇见更好的自我
遇见更好的自我 2021-02-02 11:34

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 significan

5条回答
  •  旧巷少年郎
    2021-02-02 12:19

    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.

    See for example this: Debugging Linux Kernel in VMWare with Windows host

    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.

    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.

提交回复
热议问题