public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: ravikumar.chakaravarthy@amd.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kgdb: breakpoint in start_kernel
Date: Tue, 18 Mar 2003 17:20:53 -0800	[thread overview]
Message-ID: <3E77C5F5.5010407@mvista.com> (raw)
In-Reply-To: <99F2150714F93F448942F9A9F112634CA54B23@txexmtae.amd.com>

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


      reply	other threads:[~2003-03-19  1:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18 20:45 Kgdb: breakpoint in start_kernel ravikumar.chakaravarthy
2003-03-19  1:20 ` george anzinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E77C5F5.5010407@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ravikumar.chakaravarthy@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox