Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Nitin Gupta <nitin.gupta@nevisnetworks.com>
Cc: Daniel Jacobowitz <drow@mvista.com>,
	Ian Lance Taylor <ian@wasabisystems.com>,
	gdb@sources.redhat.com
Subject: Re: GDB for Multiprocessor Architecture
Date: Wed, 03 Dec 2003 18:28:00 -0000	[thread overview]
Message-ID: <3FCE2B59.50603@gnu.org> (raw)
In-Reply-To: <36993D449C7FA647BF43568E0793AB3E32A59B@nevis_pune_xchg.pune.nevisnetworks.com>

> Hi,
> How can GDB be used to debug an application running on a chip that has n
> number of similar CPUs. These CPUs share memories and run different code
> images.
> I plan to do a debugging session using the hardware probe and the GDB
> remote protocol. My target does not have any OS support as Linux or
> RTEMS but the host is a Linux box.
> My question is how can I get to know that currently GDB is talking to
> which CPU? Is it possible for me to do something like 
> gdb> load image1.o
> gdb> CPU=1
> gdb> |get register contents|
> gdb> load image2.o
> gdb> CPU=3
> gdb> |get register contents|
> 
> and such similar stuff.
> 
> One way of implementing this is using the thread model but then each CPU
> has altogether different code image to execute. Shall I have multiple
> sessions of GDB, one per CPU? But again if a debug exception is raised
> say a breakpoint is hit, how will I know on the host side which CPU has
> hit the breakpoint.
> 
> Has anybody done a similar task on any other target? Any help on this
> fron shall be grateful.

CPU's can be modeled using GDB's thread framework.  However, at present 
the model doesn't extend as far as modeling separate memory regions for 
each CPU (something that needs to be fixed).

Andrew



  reply	other threads:[~2003-12-03 18:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 14:07 Nitin Gupta
2003-12-03 18:28 ` Andrew Cagney [this message]
2003-12-05  7:28   ` Amit S. Kale
2003-12-14  3:32   ` Mark
2003-12-04 21:05 Nitin Gupta
2003-12-04 23:05 ` Daniel Jacobowitz
2003-12-05 11:01 Nitin Gupta

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=3FCE2B59.50603@gnu.org \
    --to=cagney@gnu.org \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=ian@wasabisystems.com \
    --cc=nitin.gupta@nevisnetworks.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