Using GDB for debugging netlink communication

Mulyadi Santosa mulyadi.santosa at gmail.com
Sun Jul 22 01:15:22 EDT 2012


Hi... :)

On Sat, Jul 21, 2012 at 10:46 PM, Ranjan Sinha <rnjn.sinha at gmail.com> wrote:
> Now, using gdb, if I add a break point in any function that is called
> by netlink server thread in user mode, the break point is never hit
> and the kernel log is flooded with messages like
> -------------------------8<------------------------------------------------8<-------------------------------------
>     Somebody woke us up before we got a reply. Time left 3499
>
>     Somebody woke us up before we got a reply. Time left 3499
>
>     Somebody woke us up before we got a reply. Time left 3499
>
>     Somebody woke us up before we got a reply. Time left 3499
>
>     ..
>
>     ..
>
>     Somebody woke us up before we got a reply. Time left 3498
> -------------------------8<------------------------------------------------8<-------------------------------------

I got a feeling that somehow gdb trap one or more signal received/sent
by/to your application. Maybe you need to ignore that by setting it in
your gdb (it's the same when you debug UML kernel using gdb).
Unfortunately i forgot the exact command to do it.

Another possibility is that, you're not "attaching" to right thread.
Are you sure you have switched to the target thread?

All above are strictly my speculation.....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list