linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kgdb: breakpoint in start_kernel
@ 2003-03-18 20:45 ravikumar.chakaravarthy
  2003-03-19  1:20 ` george anzinger
  0 siblings, 1 reply; 2+ messages in thread
From: ravikumar.chakaravarthy @ 2003-03-18 20:45 UTC (permalink / raw)
  To: linux-kernel

How do I set the kernel breakpoint at 1st line in start_kernel() (init/main.c) using kgdb??

-Ravi


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Kgdb: breakpoint in start_kernel
  2003-03-18 20:45 Kgdb: breakpoint in start_kernel ravikumar.chakaravarthy
@ 2003-03-19  1:20 ` george anzinger
  0 siblings, 0 replies; 2+ messages in thread
From: george anzinger @ 2003-03-19  1:20 UTC (permalink / raw)
  To: ravikumar.chakaravarthy; +Cc: linux-kernel

ravikumar.chakaravarthy@amd.com wrote:
> How do I set the kernel breakpoint at 1st line in start_kernel() (init/main.c) using kgdb??
> 
> -Ravi
> 
First you need the KGDB that Andrew Morton has on his patch pages. 
Then you put these line where ever you want to break:

#include <asm/kgdb.h>
breakpoint();

Of course you only need the include once and can put it in the usual 
place, but also in line, what ever you like.

Note that at this early stage some of the memory mapping and page 
table stuff is not set up so don't try to access memory that may not 
be there.  You should be able to look around at most variables, single 
step, set breakpoints, etc.  But backtrace usually depends on traping 
on bad memory addresses to stop and that may not work this early in 
the bring up.


-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-19  1:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18 20:45 Kgdb: breakpoint in start_kernel ravikumar.chakaravarthy
2003-03-19  1:20 ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).