This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

minimal stub? (GDB Remote Serial Protocol)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]