* Specifying a device tree for psim within gdb
@ 2001-10-14 10:54 Julien
2001-10-14 11:01 ` Andrew Cagney
2001-10-14 11:13 ` Mark Peek
0 siblings, 2 replies; 4+ messages in thread
From: Julien @ 2001-10-14 10:54 UTC (permalink / raw)
To: gdb
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 ?
Thanks in advance,
Julien.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Specifying a device tree for psim within gdb
2001-10-14 10:54 Specifying a device tree for psim within gdb Julien
@ 2001-10-14 11:01 ` Andrew Cagney
2001-10-14 12:22 ` Julien
2001-10-14 11:13 ` Mark Peek
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2001-10-14 11:01 UTC (permalink / raw)
To: Julien; +Cc: gdb
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Specifying a device tree for psim within gdb
2001-10-14 11:01 ` Andrew Cagney
@ 2001-10-14 12:22 ` Julien
0 siblings, 0 replies; 4+ messages in thread
From: Julien @ 2001-10-14 12:22 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Specifying a device tree for psim within gdb
2001-10-14 10:54 Specifying a device tree for psim within gdb Julien
2001-10-14 11:01 ` Andrew Cagney
@ 2001-10-14 11:13 ` Mark Peek
1 sibling, 0 replies; 4+ messages in thread
From: Mark Peek @ 2001-10-14 11:13 UTC (permalink / raw)
To: Julien, gdb
At 8:02 PM +0200 10/14/01, Julien wrote:
>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 ?
I couldn't find an "attach patch" either. I believe it was folded
into gdb. You can specify arguments to the simulator either at the
gdb command prompt or in the .gdbinit file using the target command.
I'm currently using this in my .gdbinit:
target sim -e chirp -r 33554432
set architecture powerpc:604
load
You can specify device tree information on the target line using -o
for individual entries or -f to specify a file with the device tree
to be merged in.
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-10-14 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-14 10:54 Specifying a device tree for psim within gdb Julien
2001-10-14 11:01 ` Andrew Cagney
2001-10-14 12:22 ` Julien
2001-10-14 11:13 ` Mark Peek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox