Re: New kernel newbie column is up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-08-11 at 13:03 -0400, Robert P. J. Day wrote:
> Kernel and module debugging with gdb:  http://cli.gs/LHaA4a.
> 
> Enjoy.
> 
> rday
> --
> 
> ========================================================================
> Robert P. J. Day                               Waterloo, Ontario, CANADA
> 
>         Linux Consulting, Training and Annoying Kernel Pedantry.
> 
> Web page:                                          http://crashcourse.ca
> Twitter:                                       http://twitter.com/rpjday
> ========================================================================
> 
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
> 
Hi Robert and all,

The article is quite interesting, however it seems hard to scratch
together relevant (should read : not outdated thus wrong) on debugging
kernel modules on a *remote* target..

I've been scouring away for yonks here and I don't seem to be getting
anywhere in a hurry :-(
I've recompiled my target's kernel with remote KGDB enabled, (sysfs et
al for possible manual configuration), full debug on the kernel - just
in case - but trying to pass kernel command argument using kgdbwait
(preceded with kgdboc=ttyS0,115200 eg. or kgdbcon etc) doesn't seem to
get the booting to halt and wait for the gdbmod debugger....
(I've also tried the sysrq-g break and consorts, no avail either).

I've had a close look at the kernel/kgdb.c source - added some extra
temp debug messages to try to track code flow and it seems I'm not even
entering these funcs.

Is there anyone here that can shed some more light on this black magic
cursed trick ? I'm using gdbmod-2.4 btw.

So, basically : I'm continuing trying to find out if there is a way to
step through kernel module code invoked on a remote (ARM) target by
insmod/modprobe. (gdbmod 2.4 claims it automatically picks up when
module is inserted, but at this stage the kernel just happily boots up
and chugs away, ignoring the wait for remote debugger...?.)

kgdb's URL has docs (kgdb_docu_full-2.4) but - as per usual - they're
either just plain wrong (eg. the syntax doesn't comply whatsoever with
the Documentation -> Docbook kgdb explained syntax) or others don't seem
to correlate with one another. It seems almost like a 'brute force' test
of all permutations of these various "solutions" is perhaps soon the
only way to remain sane.. :-)

Googling other resources seems to just bring up unanswered posts on
forums here and there where people seem to be just as confused as I
am :-)

In short, if anyone drops around here and has done this before (kernel =
2.6.29.4, using built in remote kgdb), I would love to hear from them to
see if perhaps they've got a suggestion.
I don't mind doing the hard work to learn it properly - but it's always
more enjoyable when one is actually working towards something fruitful
in the end... !

-- 
Best regards,
Kris



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux