[GTALUG] QEMU and GDB debugging a kernel module

Aruna Hewapathirane aruna.hewapathirane at gmail.com
Fri Aug 21 04:39:29 UTC 2015


Hi everyone,

I am able to run qemu and get the *.iso files to boot fine. The qemu
image works as well. But for the life of me I simply cannot get gdb to
trigger when I set a break point in my kernel module ?

I had trouble on my Debian 64bit, gdb complained saying "remote g
packet too long" so I patched the remote.c file in gdb and things
seemed okay but I am not sure if this did not introduce more bugs. And
qemu wouldn't drop me to a shell but hung saying cannot find
/bin/init..

So, to double check I ran Ubuntu-MATE 32 bit and all seemed well. But
it still will not trigger gdb on my kernel module's break point.

Has anyone ever used qemu and gdb ? If so has anyone successfully
debugged a module ? I would be very thankful if someone can show me
the 'specific' steps to follow to get this going.

Documentation in the public domain is sparse and am yet to find
something that gives a detailed breakdown of the steps and process.

Thank's - Aruna


More information about the talk mailing list