This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Specifying a device tree for psim within gdb


le dim 14-10-2001 at 20:01 Andrew Cagney a écrit :
> > Hi,
> > 
> > I'm using gdb 5.0 on a linux x86 box, configured with
> > --target=powerpc-unknown-eabi. I want to debug a raw memory image (my
> > exec+some data) using the psim simulator.
> > 
> >  When I run the simulator directly (powerpc-unknown-eabi-run), I specify
> > a device-tree (whith a 'file' device to load my image). 
> > But when I use the debugger I don't know how to specify a device-tree.
> > The psim doc in sources.redhat.com talks about an attach patch but all
> > the links seem to be broken. 
> > Does someone have this patch ? Or is there another way to specify the
> > device tree within gdb ?
> 
> try:
> 	(gdb) target sim <same-options>
> 
> Andrew
> 
> 
> 
Thanks all, my image runs now within gdb.
gdb didn't want to start or load at first since I was only giving it a
symbol-file (and no exec) since my device tree was :
/openprom/init/file
/openprom/init/file/file-name psim.boot  # raw image with exec in it
/openprom/init/file/real-address 0x4000
/openprom/init/register/pc 0x4000

So I put a fake exec (loaded at a higher address) with just 
	.text
_start:
	ba 0x4000

and gave it as the program to debug for gdb and it ran fine.

Julien.


-- 

Julien Ducourthial (jducourt@noos.fr)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]