* minimal stub? (GDB Remote Serial Protocol)
@ 2004-01-22 23:16 Németh Márton
2004-01-23 0:45 ` Daniel Jacobowitz
2004-01-23 20:49 ` Andrew Cagney
0 siblings, 2 replies; 6+ messages in thread
From: Németh Márton @ 2004-01-22 23:16 UTC (permalink / raw)
To: gdb
Hi!
I would like to implement a minimal stub which can communicatig with
arm-elf-gdb 6.0. The documentation
( http://sources.redhat.com/gdb/current/onlinedocs/gdb_33.html ) says,
that:
| For any command not supported by the stub, an empty response (`$#00')
| should be returned. That way it is possible to extend the protocol. A
| newer GDB can tell if a packet is supported based on that response.
|
| A stub is required to support the `g', `G', `m', `M', `c', and `s'
| commands. All other commands are optional.
So I tried first to accept all packets coming from gdb with '+', and send
a response '$#00' until any of the `g', `G', `m', `M', `c', or `s' is
coming. (-> means arm-elf-gdb -> WE_ARE_HERE; <- means opposite direction)
$ arm-elf-gdb
GNU gdb 6.0
Copyright 2003 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=arm-elf".
(gdb) set remotebaud 57600
(gdb) target remote /dev/ttyS1
Remote debugging using /dev/ttyS1
[and now the communication on /dev/ttyS1]
-> +
-> $Hc-1#09
<- +
<- $#00
-> +
-> $qC#b4
<- +
<- $#00
-> +
-> $qOffsets#4b
<- +
<- $#00
-> +
-> $?#3f
<- +
<- $#00
-> +
And now at the arm-elf-gdb's prompt I get:
"warning: Invalid remote reply:"
Bad luck, none of the minimal stub commands found.
Have I misunderstand the documentation or it is out of date?
Where can I have up to date informations? (e.g. which file in the
gdb source tree)
Thanks.
Márton Németh
Student of University of Technology and Economics, Hungary
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: minimal stub? (GDB Remote Serial Protocol)
2004-01-22 23:16 minimal stub? (GDB Remote Serial Protocol) Németh Márton
@ 2004-01-23 0:45 ` Daniel Jacobowitz
2004-01-23 20:49 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2004-01-23 0:45 UTC (permalink / raw)
To: gdb
On Fri, Jan 23, 2004 at 12:16:48AM +0100, Németh Márton wrote:
> Hi!
>
> I would like to implement a minimal stub which can communicatig with
> arm-elf-gdb 6.0. The documentation
> ( http://sources.redhat.com/gdb/current/onlinedocs/gdb_33.html ) says,
> that:
>
> | For any command not supported by the stub, an empty response (`$#00')
> | should be returned. That way it is possible to extend the protocol. A
> | newer GDB can tell if a packet is supported based on that response.
> |
> | A stub is required to support the `g', `G', `m', `M', `c', and `s'
> | commands. All other commands are optional.
> Have I misunderstand the documentation or it is out of date?
It is out of date.
> Where can I have up to date informations? (e.g. which file in the
> gdb source tree)
Nowhere; you'll just have to experiment. If you would like to report a
minimal set I'll update the documentation. You'll need to start with
'?' definitely.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: minimal stub? (GDB Remote Serial Protocol)
2004-01-22 23:16 minimal stub? (GDB Remote Serial Protocol) Németh Márton
2004-01-23 0:45 ` Daniel Jacobowitz
@ 2004-01-23 20:49 ` Andrew Cagney
2004-01-23 23:06 ` Vijay Kamarshi
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2004-01-23 20:49 UTC (permalink / raw)
To: Németh Márton; +Cc: gdb
See: single step `s' packet isn't a requirement
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1068
for one error.
> Where can I have up to date informations? (e.g. which file in the
>> gdb source tree)
Daniel writes:
> Nowhere; you'll just have to experiment. If you would like to report a
> minimal set I'll update the documentation. You'll need to start with
> '?' definitely.
Looks like it (although it is only used once during an entire target
session) :-/
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: minimal stub? (GDB Remote Serial Protocol)
2004-01-23 20:49 ` Andrew Cagney
@ 2004-01-23 23:06 ` Vijay Kamarshi
2004-01-24 0:55 ` Jon Ringle
0 siblings, 1 reply; 6+ messages in thread
From: Vijay Kamarshi @ 2004-01-23 23:06 UTC (permalink / raw)
To: gdb
Hi all,
I am planning on using GDB to debug a remote processor running a debug stub.
It is quite concerning to me that the remote protocol document is
out-of-date. Is it that easy to figure out what the protocol is by
experimentation? For example if the GDB host sends a stream of commands to
the remote processor and it mis-interprets the first one, is the host not
going to just quit on that? That would make the experimentation process
pretty long!
I am puzzled:
1) are there no people out there who have this protocol figured out? I
would appreciate at least a starting point!
2) are all the commands in the remote protocol document out of date or just
some of them?
Any help would be gratefully received.
-Vijay Kamarshi
PS: I heard that one way of figuring out this remote protocol is to peer
deeply into gdbserver, but people have warned me that it is a pretty hairy
piece of code.
-----Original Message-----
From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com]On
Behalf Of Andrew Cagney
Sent: Friday, January 23, 2004 12:50 PM
To: Németh Márton
Cc: gdb@sources.redhat.com
Subject: Re: minimal stub? (GDB Remote Serial Protocol)
See: single step `s' packet isn't a requirement
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&databas
e=gdb&pr=1068
for one error.
> Where can I have up to date informations? (e.g. which file in the
>> gdb source tree)
Daniel writes:
> Nowhere; you'll just have to experiment. If you would like to report a
> minimal set I'll update the documentation. You'll need to start with
> '?' definitely.
Looks like it (although it is only used once during an entire target
session) :-/
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: minimal stub? (GDB Remote Serial Protocol)
2004-01-23 23:06 ` Vijay Kamarshi
@ 2004-01-24 0:55 ` Jon Ringle
2004-01-26 18:54 ` Vijay Kamarshi
0 siblings, 1 reply; 6+ messages in thread
From: Jon Ringle @ 2004-01-24 0:55 UTC (permalink / raw)
To: gdb
On Friday 23 January 2004 06:06 pm, Vijay Kamarshi wrote:
> Hi all,
>
> I am planning on using GDB to debug a remote processor running a debug
> stub. It is quite concerning to me that the remote protocol document is
> out-of-date. Is it that easy to figure out what the protocol is by
> experimentation? For example if the GDB host sends a stream of commands to
> the remote processor and it mis-interprets the first one, is the host not
> going to just quit on that? That would make the experimentation process
> pretty long!
>
> I am puzzled:
> 1) are there no people out there who have this protocol figured out? I
> would appreciate at least a starting point!
> 2) are all the commands in the remote protocol document out of date or just
> some of them?
>
> Any help would be gratefully received.
>
> -Vijay Kamarshi
> PS: I heard that one way of figuring out this remote protocol is to peer
> deeply into gdbserver, but people have warned me that it is a pretty hairy
> piece of code.
Hi Vijay,
A while back I backported an arm kgdb patch for kernel 2.4.19 to a target
based on kernel 2.2.16 found at:
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1335/1
It may be helpful.
Jon
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: minimal stub? (GDB Remote Serial Protocol)
2004-01-24 0:55 ` Jon Ringle
@ 2004-01-26 18:54 ` Vijay Kamarshi
0 siblings, 0 replies; 6+ messages in thread
From: Vijay Kamarshi @ 2004-01-26 18:54 UTC (permalink / raw)
To: Jon Ringle, gdb
Jon,
Thanks for the suggestion. It gives me a starting point.
-Vijay
-----Original Message-----
From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com]On
Behalf Of Jon Ringle
Sent: Friday, January 23, 2004 4:55 PM
To: gdb@sources.redhat.com
Subject: Re: minimal stub? (GDB Remote Serial Protocol)
On Friday 23 January 2004 06:06 pm, Vijay Kamarshi wrote:
> Hi all,
>
> I am planning on using GDB to debug a remote processor running a debug
> stub. It is quite concerning to me that the remote protocol document is
> out-of-date. Is it that easy to figure out what the protocol is by
> experimentation? For example if the GDB host sends a stream of commands
to
> the remote processor and it mis-interprets the first one, is the host not
> going to just quit on that? That would make the experimentation process
> pretty long!
>
> I am puzzled:
> 1) are there no people out there who have this protocol figured out? I
> would appreciate at least a starting point!
> 2) are all the commands in the remote protocol document out of date or
just
> some of them?
>
> Any help would be gratefully received.
>
> -Vijay Kamarshi
> PS: I heard that one way of figuring out this remote protocol is to peer
> deeply into gdbserver, but people have warned me that it is a pretty hairy
> piece of code.
Hi Vijay,
A while back I backported an arm kgdb patch for kernel 2.4.19 to a target
based on kernel 2.2.16 found at:
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1335/1
It may be helpful.
Jon
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-01-26 18:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-22 23:16 minimal stub? (GDB Remote Serial Protocol) Németh Márton
2004-01-23 0:45 ` Daniel Jacobowitz
2004-01-23 20:49 ` Andrew Cagney
2004-01-23 23:06 ` Vijay Kamarshi
2004-01-24 0:55 ` Jon Ringle
2004-01-26 18:54 ` Vijay Kamarshi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox