On Wed, Dec 23, 2009 at 1:31 AM, Grigory Makarevich <grigorymakarevich@xxxxxxxxx> wrote: > Dear All, > > > I was trying to debug linux kernel module using standard procedure described > for kgdb. > So I have used add-symbol-file [module].ko <address>. > > I was able to resolve symbols from the module and setup breakpoints. > Debugger stops at the breakpoint, however, it shows "no line information" > when trying to step through. > > Module is compiled with debug info. Loading [module].ko with > > gdb [module].ko correctly shows lines for functions. > > Did somebody face the same problem and if so what was the solution? Once I used kdgb, just to get to know it. IMO, there are two possible reasons why you face such situation: a. kgdb is (a bit unlikely) unable to read the complete DWARF information embedded in your kernel module .ko file or... b. it can read the DWARF information, but somehow fail to do address to line correlation. Perhaps it could simply be corrected by adjusting some gdb variables. I vaguely recall there is gdb parameter to do what I mention, but I completely forget. BTW, make sure your kernel image and your kernel module are all compiled using same gcc version and same gcc CFLAGS. Just to avoid small pitfalls that might do unexpected things regarding this debugging procedure. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ