Suggestion: debug Linux in general

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
    I am trying to boot Linux on my development board and it stucks
somewhere, -- I do not see log in prompt on my Hyper Terminal. I am new
to embedded Linux stuff, and not sure how to debug this.

    In standalone mode, I usually start GDB to trace the software and
see on which code is the problem, but how should I do for Linux? I was
told briefly that Linux turns on MMU in the very early stage which makes
it very difficault to debug kernel. How true is it?

    I wonder if there are very good book/tutorial about Linux debug in
this booting phase? I checked out "Building Embedded Linux", it mentions
some linux debug using GDB, but not in details and seems only for
application.

    Any suggestion is higjly appreciated.

Thanks.



Re: Suggestion: debug Linux in general

Quoted text here. Click to load it

Are you sure you want to debug lots of software you
didn't write yourself ? Wouldn't it be quicker to get
someone that fixes your problem ?

Rene

Re: Suggestion: debug Linux in general
try kgdb for debugging the kernel u can insert a breakpoint pretty
early using this

-SIGTERM
amit



John Black wrote:
Quoted text here. Click to load it
new
was
makes
in
mentions


Re: Suggestion: debug Linux in general

Quoted text here. Click to load it

It is true that Linux enables the MMU very early, and it is true that
many of the tools from traditional RTOS vendors don't work well then.

Your options depend on the target architecture. On x86,  you're  more
or  less  stuck  with  kgdb - that's a fine and powerful tool, but it
requires that some parts of the system are still running.

On ARM, MIPS and PowerPC you can use  a  BDM  /  JTAG  debugger;  the
de-facto  standard  tool is the BDI2000 by Abatron, which understands
how to doeal with the MMU, and which has an interface to GDB, so  you
can still use your well known toolchain.

Quoted text here. Click to load it

See http://www.denx.de/twiki/bin/view/DULG/DebuggingLinuxKernel
for a start.

Hope this helps.

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
We've slightly trimmed the long signature. Click to see the full one.
Re: Suggestion: debug Linux in general
Quoted text here. Click to load it

Just for curiousity, how does SOFTICE do on debugging Linux?  I
have no idea.

--
"I'm a war president.  I make decisions here in the Oval Office
 in foreign policy matters with war on my mind." -         Bush.
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline