* Re: Help about RSP command 'p'
[not found] <1184054482.32608.ezmlm@sourceware.org>
@ 2007-07-10 9:50 ` Wenbo Yang
2007-07-10 9:58 ` Wenbo Yang
[not found] ` <dcf6addc0707100315x2220b242gdbe72adf438111d2@mail.gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Wenbo Yang @ 2007-07-10 9:50 UTC (permalink / raw)
To: sync.jma; +Cc: gdb
sync.jma@gmail.com wrote:
> Can anyone told me why my cross-gdb send a 'p' rsp command to the
> BDI2000? Could I select a lower-version
> gdb to avoid this problem?
From my experience, "p25" means it requests No.25 register. I think here it
should be some key register like "sp" or "pc".
"Embedding with GNU" is too old, you should refer to "Using GDB" and "GDB
internal". They are official documents of GDB that you can download from:
http://sourceware.org/gdb/download/onlinedocs/.
"Using GDB" appendix D gives the full RSP Spec.
Regards,
Wenbo
--
Wenbo Yang
The State Key Lab. of Information Security
Graduate School of CAS, 19A Yuquan Road, Beijing, China
Homepage: http://solrex.cn
SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China
Phone: +86-10-5126-6989 --- Email: wenbo.yang@simplnano.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Help about RSP command 'p'
2007-07-10 9:50 ` Help about RSP command 'p' Wenbo Yang
@ 2007-07-10 9:58 ` Wenbo Yang
[not found] ` <dcf6addc0707100315x2220b242gdbe72adf438111d2@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Wenbo Yang @ 2007-07-10 9:58 UTC (permalink / raw)
To: sync.jma; +Cc: gdb
Wenbo Yang wrote:
> "Using GDB" appendix D gives the full RSP Spec.
Sorry, it is not "Using GDB". I mean "Debugging with GDB". I confused it with
"Using GCC".
Regards,
Wenbo
--
Wenbo Yang
The State Key Lab. of Information Security
Graduate School of CAS, 19A Yuquan Road, Beijing, China
Homepage: http://solrex.cn
SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China
Phone: +86-10-5126-6989 --- Email: wenbo.yang@simplnano.com
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <dcf6addc0707100315x2220b242gdbe72adf438111d2@mail.gmail.com>]
* Re: Help about RSP command 'p'
[not found] ` <dcf6addc0707100315x2220b242gdbe72adf438111d2@mail.gmail.com>
@ 2007-07-11 1:15 ` Wenbo Yang
0 siblings, 0 replies; 6+ messages in thread
From: Wenbo Yang @ 2007-07-11 1:15 UTC (permalink / raw)
To: Sync ma; +Cc: gdb
Sync ma wrote:
> gdb wonder the value of register 37? there only 32 general purpose
> regs in my 4KEc cpu.
I used to read some GDB source code related to MIPS arch(ISA). In some MIPS
archs, Reg.37 means PC register. But I have no idea which arch(target) in
"config.sub" your 4KEC belong to. I think the target dependent file
"mips-tdep.c/h" can give you some clue.
> Anyway, there should be some handler function in gdbserver for command
> 'p', but I have not found in gdb-6.5 yet.
Maybe you can find it in "remote.c". 'p' is not a command, it is a RSP packet.
> Someone guide me.( Lots question about remote debugging(debugging with
> BDIGDB), eg. 'stepi' makes no stop, I could only return to GDB CLI
> with 'CTRL+C', A japanese engineer wrote in another maillist says that
> some instruction sets may not support tracing... I found a manual for
> U-boot debugging with BDI2000, but it can not be reproduced on my MIPS
> processor).
It depends on archs. If GDB (compiled for your target) support SW single
stepping, you can achieve "stepi", or you can implement SW single stepping in
your STUB. I have never used "tracing" related command before, so I don't know
if gdb can. What GDB can do depends on how much RSP packets you implement in
your STUB and how much functions registered to GDB in target dependent files. So
concentrate in what you can do, let others go. It is very hard for remote
debugging achieve the same goal as debugging on host.
Regards,
Wenbo
--
Wenbo Yang
The State Key Lab. of Information Security
Graduate School of CAS, 19A Yuquan Road, Beijing, China
Homepage: http://solrex.cn
SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China
Phone: +86-10-5126-6989 --- Email: wenbo.yang@simplnano.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Help about RSP command 'p'
@ 2007-07-10 17:55 msnyder
0 siblings, 0 replies; 6+ messages in thread
From: msnyder @ 2007-07-10 17:55 UTC (permalink / raw)
To: gdb; +Cc: sync.jma
> Sending packet: $p25#d7...Ack
> Packet received: E02
There are two things this error might mean:
1) Register #25 not recognized (or perhaps not available), or
2) 'p' request not recognized.
Many gdb remote agents/stubs do not implement the 'p' request.
The correct way for them to acknowledge this is with an empty
reply (not an error code), but who knows...
One way to sidestep the issue would be to simply request all
of the regs (with the 'g' request), and extract the one you want.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Help about RSP command 'p'
@ 2007-07-10 8:01 Sync ma
2007-07-10 8:42 ` Nick Roberts
0 siblings, 1 reply; 6+ messages in thread
From: Sync ma @ 2007-07-10 8:01 UTC (permalink / raw)
To: gdb
Hi guys,
I am working on a board's bootloader, since it was my first time to
do such a job, maybe
there are many naive mistakes. Anyway, I hope some one could guide me
in the right direction.
I use a JTAG simulator called BDI2000. From datasheet, it could
support gdb debugging. a binary file
called 'bootloader.bin' has been 'load 0x80000000 bootloader.bin BIN'
in BDI2000 telnet CLI, then I start
the cross-gdb and try to connect with simulator, here comes the errors:
(gdb) [root@rhl9 tftpboot]# mipsel-linux-gdb bootloader.elf
GNU gdb 6.5
Copyright (C) 2006 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=mipsel-linux"...
(gdb) set debug remote 1
(gdb) target remote 192.168.35.108:2001
Remote debugging using 192.168.35.108:2001
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: S05
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $p25#d7...Ack
Packet received: E02
Remote failure reply: E02
=====
I have referenced Embedding with GNU: the gdb Remote Serial
Protocol, 11/99, but I found no description
about rsp command 'p', and there even has no handler functions in
gdbserver: server.c: main().
Can anyone told me why my cross-gdb send a 'p' rsp command to the
BDI2000? Could I select a lower-version
gdb to avoid this problem?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Help about RSP command 'p'
2007-07-10 8:01 Sync ma
@ 2007-07-10 8:42 ` Nick Roberts
0 siblings, 0 replies; 6+ messages in thread
From: Nick Roberts @ 2007-07-10 8:42 UTC (permalink / raw)
To: Sync ma; +Cc: gdb
> I have referenced Embedding with GNU: the gdb Remote Serial
> Protocol, 11/99, but I found no description
> about rsp command 'p', and there even has no handler functions in
> gdbserver: server.c: main().
I can't help you with your problem but the info manual that comes with GDB
(Debugging with GDB) has a node which describes the Remote Serial Protocol
e.g
`p N'
Read the value of register N; N is in hex. *Note read registers
packet::, for a description of how the returned register value is
encoded.
Reply:
`XX...'
the register's value
`E NN'
for an error
`'
Indicating an unrecognized QUERY.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-11 1:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1184054482.32608.ezmlm@sourceware.org>
2007-07-10 9:50 ` Help about RSP command 'p' Wenbo Yang
2007-07-10 9:58 ` Wenbo Yang
[not found] ` <dcf6addc0707100315x2220b242gdbe72adf438111d2@mail.gmail.com>
2007-07-11 1:15 ` Wenbo Yang
2007-07-10 17:55 msnyder
-- strict thread matches above, loose matches on Subject: below --
2007-07-10 8:01 Sync ma
2007-07-10 8:42 ` Nick Roberts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox