Does GDB have some way to handle the LKM when debug the Linux-Kernel

Hui Zhu teawater@gmail.com
Sun Feb 7 15:53:00 GMT 2010


Thanks Daniel.

Hui

On Thu, Feb 4, 2010 at 22:03, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Thu, Feb 04, 2010 at 03:08:50PM +0800, Hui Zhu wrote:
>> Hi,
>>
>> When I use GDB to debug a Kernel that running on the QEMU.  The GDB
>> cannot get the debug message from lkm.
>>
>> I just can load this debug message with my hand:
>> 1. Get the right module from modules.  It need parse the struct list.
>> 2. p module->module_core get the mod address.
>> 3. add-symbol-file mode.ko address
>>
>> Do we have some easy way to handle it?
>
> Not yet, but the plan is to have Python support for automatically
> loading module symbols.
>
> An initial version was posted here:
>
> http://sourceware.org/ml/gdb/2009-06/msg00109.html
>
> You can probably find me talking about the requirements in the list
> archives in a couple of places.  Ideally, I want a Python hook to
> GDB's shared library mechanism instead of using add-symbol-file.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>



More information about the Gdb mailing list