* How to get PPC registers
@ 2004-08-11 8:45 Fabian Cenedese
2004-08-11 8:50 ` Steven Johnson
2004-08-11 15:04 ` Jim Blandy
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Cenedese @ 2004-08-11 8:45 UTC (permalink / raw)
To: gdb
Hi
After fruitless efforts to get a working cross-gdb (host=win32-i386, target=ppc)
with MinGW and DJGPP I finally managed to build one with cygwin. But I now
have a problem with the serial protocol itself. Here is a short session:
C:\cygwin\home\fabi\gdb-6.1.1\ppcout\gdb>gdb
GNU gdb 6.1.1
Copyright 2004 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-cygwin --target=powerpc-eabi".
(gdb) set debug remote 1
(gdb) file n:/temp/samism/samism.x
Reading symbols from n:/temp/samism/samism.x...done.
(gdb) target remote 127.0.0.1:10372
Remote debugging using 127.0.0.1:10372
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received: QC1
Sending packet: $qOffsets#4b...Ack
Packet received: Text=00000000;Data=00005000;Bss=00010000
Sending packet: $?#3f...Ack
Packet received: S00
Sending packet: $Hg1#e0...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1
f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464
748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6
f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969
798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbeb
fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e
7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
0x00000000 in VTABLE ()
warning: no shared library support for this OS / ABI
Sending packet: $qSymbol::#5b...Ack
Packet received:
Packet qSymbol (symbol-lookup) is NOT supported
(gdb) info registers
r0 0x10203 66051
r1 0x4050607 67438087
r2 0x8090a0b 134810123
r3 0xc0d0e0f 202182159
r4 0x10111213 269554195
r5 0x14151617 336926231
r6 0x18191a1b 404298267
r7 0x1c1d1e1f 471670303
r8 0x20212223 539042339
r9 0x24252627 606414375
r10 0x28292a2b 673786411
r11 0x2c2d2e2f 741158447
r12 0x30313233 808530483
r13 0x34353637 875902519
r14 0x38393a3b 943274555
r15 0x3c3d3e3f 1010646591
r16 0x40414243 1078018627
r17 0x44454647 1145390663
r18 0x48494a4b 1212762699
r19 0x4c4d4e4f 1280134735
r20 0x50515253 1347506771
r21 0x54555657 1414878807
r22 0x58595a5b 1482250843
r23 0x5c5d5e5f 1549622879
r24 0x60616263 1616994915
r25 0x64656667 1684366951
r26 0x68696a6b 1751738987
r27 0x6c6d6e6f 1819111023
r28 0x70717273 1886483059
r29 0x74757677 1953855095
r30 0x78797a7b 2021227131
r31 0x7c7d7e7f 2088599167
pc 0x0 0
ps 0x0 0
cr 0x0 0
lr 0x0 0
ctr 0x0 0
xer 0x0 0
fpscr 0x0 0
vscr 0x0 0
vrsave 0x0 0
(gdb)
The values I return for the registers are just made up to test the
communication. But they are only filled into the general (and FP)
registers. What command do I have to use to get the special
registers like pc, lr etc?
Thanks
bye Fabi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to get PPC registers
2004-08-11 8:45 How to get PPC registers Fabian Cenedese
@ 2004-08-11 8:50 ` Steven Johnson
2004-08-11 15:04 ` Jim Blandy
1 sibling, 0 replies; 3+ messages in thread
From: Steven Johnson @ 2004-08-11 8:50 UTC (permalink / raw)
To: Fabian Cenedese; +Cc: gdb
Fabian Cenedese wrote:
> What command do I have to use to get the special
> registers like pc, lr etc?
>
You need to set the architecture to the chip type you are using to see
the SPR's. Then the remote protocol packet will change, and expect more
data.
check out 'set architecture' or something like that. (Dont have a
working GDB with me to test out on for exact command, sorry.)
Steven
> Thanks
>
> bye Fabi
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to get PPC registers
2004-08-11 8:45 How to get PPC registers Fabian Cenedese
2004-08-11 8:50 ` Steven Johnson
@ 2004-08-11 15:04 ` Jim Blandy
1 sibling, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2004-08-11 15:04 UTC (permalink / raw)
To: Fabian Cenedese; +Cc: gdb
Fabian Cenedese <Cenedese@indel.ch> writes:
> The values I return for the registers are just made up to test the
> communication. But they are only filled into the general (and FP)
> registers. What command do I have to use to get the special
> registers like pc, lr etc?
You should try saying 'info all-registers', which will also show you
the floating-point registers. The FP registers follow the
general-purpose registers in the 'g' packet; since there are 32 of
them, and each is eight bytes long, they consume bytes 128 -- 384 of
the 'g' packet. Your sample packet data isn't long enough to reach
the miscellaneous registers.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-11 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11 8:45 How to get PPC registers Fabian Cenedese
2004-08-11 8:50 ` Steven Johnson
2004-08-11 15:04 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).