[GTALUG] QEMU and GDB debugging a kernel module

Sergio Durigan Junior sergiodj at sergiodj.net
Sun Sep 6 03:04:11 UTC 2015


On Thursday, September 03 2015, Lennart Sorensen wrote:

> On Thu, Sep 03, 2015 at 12:21:50PM -0400, Mike wrote:
>> Never had the pleasure.  But Kevin, don't fear the command line.  A
>> well-designed graphical debugger is a good and useful tool, but when you
>> absolutely need to get into the plumbing; memory setup, ICE hardware
>> protocols, etc. (ad nauseam) you almost inevitably go sideways from where
>> the GUI designers intended.  Kvm-qemu kernel debugging probably falls
>> squarely in this category.  All roads lead to gdb, it sometimes seems...
>
> gdb's command line is certainly overwhelming to many, but if I was really
> desparate for an interface to gdb, I would use emacs, and I am a vim user.

Emacs has a good (or gud?) interface to GDB, but sometimes it lacks one
feature or another.

What I recommend to every GDB beginner (or even non-beginners, because
they also don't know about this feature) is TUI, the Text User Interface
inside GDB itself.  It is ncurses-based, and after a long period of
being unmaintained (and buggy), it has been receiving some TLC again
lately.

To enter TUI, press C-x a.  To leave TUI, C-x a again.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


More information about the talk mailing list