This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB for Multiprocessor Architecture
If these CPUs share the same memories and run the same code image but different data, how about gdb does one-for-multithread debugging ? Shall I have multiple sessions of GDB, one per CPU?
Mark
Thanks in advance
----- Original Message -----
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>
Sent: Thursday, December 04, 2003 2:28 AM
Subject: Re: GDB for Multiprocessor Architecture
> > 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
>
>
>
>
>