* Using Simulator from within GDB
@ 2001-04-20 14:39 Nitin Gupta
2001-04-21 6:35 ` Cliff Tsai
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Nitin Gupta @ 2001-04-20 14:39 UTC (permalink / raw)
To: gdb
I am trying to use a simulator from within gdb 5.0. I am using m32r as
my processor's "skin" and using it I have generated files from CGEN,
giving it the m32r.cpu and m32r.opc files. I have also ported ld, gas,
simulator and also tested that, by writing a sample assembly code for my
processor and ran it on simulator after generating a.out from gas, and
ld.
Now when I am trying to use my ported simulator from within gdb5.0 (also
built for my processor) I am getting a warning that little endian file
does not match big endian target
I think my problem is that I don't know, how to talk to the simulator
from within debugger. The only information I found is at
http://sources.redhat.com/psim/manaul , which is quite obsolete.
This is my gdb session after I invoke gdb with my simulator as an input.
% m32r-elf-gdb m32r-elf-run
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=m32r-elf"...
warning: little endian file does not match big endian target.
(gdb) target sim
Target (LITTLE_ENDIAN) and configured (BIG_ENDIAN) byte order in
conflict
Target (BIG_ENDIAN) and specified (LITTLE_ENDIAN) byte order in conflict
Connected to the simulator.
(gdb) load
Loading section .interp, size 0x13 lma 0x80480f4
Loading section .note.ABI-tag, size 0x20 lma 0x8048108
Loading section .hash, size 0x270 lma 0x8048128
Loading section .dynsym, size 0x570 lma 0x8048398
Loading section .dynstr, size 0x32a lma 0x8048908
Loading section .gnu.version, size 0xae lma 0x8048c32
Loading section .gnu.version_r, size 0x30 lma 0x8048ce0
Loading section .rel.got, size 0x8 lma 0x8048d10
Loading section .rel.bss, size 0x38 lma 0x8048d18
Loading section .rel.plt, size 0x270 lma 0x8048d50
Loading section .init, size 0x2f lma 0x8048fc0
Loading section .plt, size 0x4f0 lma 0x8048ff0
Loading section .text, size 0x54d34 lma 0x80494e0
Loading section .fini, size 0x1a lma 0x809e214
Loading section .rodata, size 0x1b819 lma 0x809e240
Loading section .data, size 0x1654 lma 0x80baa60
Loading section .eh_frame, size 0x4 lma 0x80bc0b4
Loading section .ctors, size 0x8 lma 0x80bc0b8
Loading section .dtors, size 0x8 lma 0x80bc0c0
Loading section .got, size 0x148 lma 0x80bc0c8
Loading section .dynamic, size 0xa8 lma 0x80bc210
Start address 0x80494e0
Transfer rate: 3771720 bits in <1 sec.
(gdb) break main
Cannot access memory at address 0x80495ec
I will appreciate if some one can tell me, How can I debug an a.out
running
on my simulator, while I am using my gdb. Or direct me to some source
code
or manual, where I can get some direction.
Thanks,
Nitin
Nitin Gupta
nitin@mobilygen.com
www.mobilygen.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using Simulator from within GDB
2001-04-20 14:39 Using Simulator from within GDB Nitin Gupta
@ 2001-04-21 6:35 ` Cliff Tsai
2001-04-21 8:05 ` Frank Ch. Eigler
2001-04-30 9:33 ` Andrew Cagney
2 siblings, 0 replies; 5+ messages in thread
From: Cliff Tsai @ 2001-04-21 6:35 UTC (permalink / raw)
To: Nitin Gupta, gdb
Hi:Nitin
I have similar problem as you have.
For motorola architecture.
Their images should always be "big-endian".
So I don't know why the error message occur:
: little endian file does not match big endian target
(This is a error under insight(cygwin)).
----- Original Message -----
From: "Nitin Gupta" <nitin@mobilygen.com>
To: <gdb@sources.redhat.com>
Sent: Saturday, April 21, 2001 5:39 AM
Subject: Using Simulator from within GDB
> I am trying to use a simulator from within gdb 5.0. I am using m32r as
> my processor's "skin" and using it I have generated files from CGEN,
> giving it the m32r.cpu and m32r.opc files. I have also ported ld, gas,
> simulator and also tested that, by writing a sample assembly code for my
> processor and ran it on simulator after generating a.out from gas, and
> ld.
>
> Now when I am trying to use my ported simulator from within gdb5.0 (also
> built for my processor) I am getting a warning that little endian file
> does not match big endian target
> I think my problem is that I don't know, how to talk to the simulator
> from within debugger. The only information I found is at
> http://sources.redhat.com/psim/manaul , which is quite obsolete.
> This is my gdb session after I invoke gdb with my simulator as an input.
>
> % m32r-elf-gdb m32r-elf-run
> GNU gdb 5.0
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details.
> This GDB was configured as "--host=i686-pc-linux-gnu
> --target=m32r-elf"...
> warning: little endian file does not match big endian target.
>
> (gdb) target sim
> Target (LITTLE_ENDIAN) and configured (BIG_ENDIAN) byte order in
> conflict
> Target (BIG_ENDIAN) and specified (LITTLE_ENDIAN) byte order in conflict
>
> Connected to the simulator.
> (gdb) load
> Loading section .interp, size 0x13 lma 0x80480f4
> Loading section .note.ABI-tag, size 0x20 lma 0x8048108
> Loading section .hash, size 0x270 lma 0x8048128
> Loading section .dynsym, size 0x570 lma 0x8048398
> Loading section .dynstr, size 0x32a lma 0x8048908
> Loading section .gnu.version, size 0xae lma 0x8048c32
> Loading section .gnu.version_r, size 0x30 lma 0x8048ce0
> Loading section .rel.got, size 0x8 lma 0x8048d10
> Loading section .rel.bss, size 0x38 lma 0x8048d18
> Loading section .rel.plt, size 0x270 lma 0x8048d50
> Loading section .init, size 0x2f lma 0x8048fc0
> Loading section .plt, size 0x4f0 lma 0x8048ff0
> Loading section .text, size 0x54d34 lma 0x80494e0
> Loading section .fini, size 0x1a lma 0x809e214
> Loading section .rodata, size 0x1b819 lma 0x809e240
> Loading section .data, size 0x1654 lma 0x80baa60
> Loading section .eh_frame, size 0x4 lma 0x80bc0b4
> Loading section .ctors, size 0x8 lma 0x80bc0b8
> Loading section .dtors, size 0x8 lma 0x80bc0c0
> Loading section .got, size 0x148 lma 0x80bc0c8
> Loading section .dynamic, size 0xa8 lma 0x80bc210
> Start address 0x80494e0
> Transfer rate: 3771720 bits in <1 sec.
> (gdb) break main
> Cannot access memory at address 0x80495ec
>
> I will appreciate if some one can tell me, How can I debug an a.out
> running
> on my simulator, while I am using my gdb. Or direct me to some source
> code
> or manual, where I can get some direction.
>
> Thanks,
> Nitin
>
> Nitin Gupta
> nitin@mobilygen.com
> www.mobilygen.com
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using Simulator from within GDB
2001-04-20 14:39 Using Simulator from within GDB Nitin Gupta
2001-04-21 6:35 ` Cliff Tsai
@ 2001-04-21 8:05 ` Frank Ch. Eigler
2001-04-21 14:52 ` Nitin Gupta
2001-04-30 9:33 ` Andrew Cagney
2 siblings, 1 reply; 5+ messages in thread
From: Frank Ch. Eigler @ 2001-04-21 8:05 UTC (permalink / raw)
To: Nitin Gupta; +Cc: gdb
Nitin Gupta <nitin@mobilygen.com> writes:
: I am trying to use a simulator from within gdb 5.0. I am using m32r as
: my processor's "skin" and using it I have generated files from CGEN,
: giving it the m32r.cpu and m32r.opc files. I have also ported ld, gas,
: simulator and also tested that, by writing a sample assembly code for my
: processor and ran it on simulator after generating a.out from gas, and
: ld.
: [...]
I don't understand -- do you mean you're using the m32r port as a basis
for a new port of your own? Or are you regenerating m32r just for fun?
: This GDB was configured as "--host=i686-pc-linux-gnu
: --target=m32r-elf"...
: warning: little endian file does not match big endian target.
:
: (gdb) target sim
: Target (LITTLE_ENDIAN) and configured (BIG_ENDIAN) byte order in
: conflict
: Target (BIG_ENDIAN) and specified (LITTLE_ENDIAN) byte order in conflict
: [...]
This is probably a sign of disagreement between gdb and linker.
- FChE
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using Simulator from within GDB
2001-04-21 8:05 ` Frank Ch. Eigler
@ 2001-04-21 14:52 ` Nitin Gupta
0 siblings, 0 replies; 5+ messages in thread
From: Nitin Gupta @ 2001-04-21 14:52 UTC (permalink / raw)
To: egcs; +Cc: gdb
Hi,
I was using m32r port as a basis for a new port of my own. I wasn't clear
about how to debug an application with gdb using my ported simulator. I have
found the following command set from
http://sources.redhat.com/psim/manual/ , which seems to be working fine.
m32r-elf-gdb a.out
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading (....)
(gdb) run
"Frank Ch. Eigler" wrote:
> Nitin Gupta <nitin@mobilygen.com> writes:
>
> : I am trying to use a simulator from within gdb 5.0. I am using m32r as
> : my processor's "skin" and using it I have generated files from CGEN,
> : giving it the m32r.cpu and m32r.opc files. I have also ported ld, gas,
> : simulator and also tested that, by writing a sample assembly code for my
> : processor and ran it on simulator after generating a.out from gas, and
> : ld.
> : [...]
>
> I don't understand -- do you mean you're using the m32r port as a basis
> for a new port of your own? Or are you regenerating m32r just for fun?
>
> : This GDB was configured as "--host=i686-pc-linux-gnu
> : --target=m32r-elf"...
> : warning: little endian file does not match big endian target.
> :
> : (gdb) target sim
> : Target (LITTLE_ENDIAN) and configured (BIG_ENDIAN) byte order in
> : conflict
> : Target (BIG_ENDIAN) and specified (LITTLE_ENDIAN) byte order in conflict
> : [...]
>
> This is probably a sign of disagreement between gdb and linker.
Thanks for your comment, I got the bug
>
> - FChE
Thanks,
Nitin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using Simulator from within GDB
2001-04-20 14:39 Using Simulator from within GDB Nitin Gupta
2001-04-21 6:35 ` Cliff Tsai
2001-04-21 8:05 ` Frank Ch. Eigler
@ 2001-04-30 9:33 ` Andrew Cagney
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2001-04-30 9:33 UTC (permalink / raw)
To: Nitin Gupta; +Cc: gdb
Nitin Gupta wrote:
> This GDB was configured as "--host=i686-pc-linux-gnu
> --target=m32r-elf"...
> warning: little endian file does not match big endian target.
This is because your target is hard-wired big-endian yet your object
file (according to BFD) is little endian.
> (gdb) target sim
> Target (LITTLE_ENDIAN) and configured (BIG_ENDIAN) byte order in
> conflict
> Target (BIG_ENDIAN) and specified (LITTLE_ENDIAN) byte order in conflict
The same problem.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-04-30 9:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-20 14:39 Using Simulator from within GDB Nitin Gupta
2001-04-21 6:35 ` Cliff Tsai
2001-04-21 8:05 ` Frank Ch. Eigler
2001-04-21 14:52 ` Nitin Gupta
2001-04-30 9:33 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox