This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Multi-packet gdb server request/response - problem?
- From: Yao Qi <yao at codesourcery dot com>
- To: Ivo Raisr <ivosh at ivosh dot net>
- Cc: <gdb at sourceware dot org>
- Date: Wed, 11 Dec 2013 19:41:39 +0800
- Subject: Re: Multi-packet gdb server request/response - problem?
- Authentication-results: sourceware.org; auth=none
- References: <CANXv6=u1BjBdJJDNtF=j=djNJVoNHo45gL4JZruzDYsaSqEU6Q at mail dot gmail dot com>
On 12/10/2013 08:22 PM, Ivo Raisr wrote:
> Sending packet: $s#73...Sending packet: $mfe7c852c,4#34...Packet
> received: T0505:08f8fe37;04:e8f7fe37;08:4d761100;thread:1;
> Reply contains invalid hex digit 84
>
> Please take a particular note that in this case gdb did not wait for a reply
> to its '$s' packet but instead immediately issued another '$mfe7c852c,4'
> packet.
>
> This is also verified by dumping packets on the other side in the gdb
> server stub implementation:
> - read from gdb $s#73$mfe7c852c,4#34
> - write to gdb $T0505:08f8fe37;04:e8f7fe37;08:4d761100;thread:1;#d8$0*"00#dc
>
> So on the wires it looks like:
> - gdb wrote two requests without waiting for a response for the first one
> - gdb received two concatenated responses for these two requests
> - requests and responses alone look well-formed
>
> My questions are:
> - Is multi-packet request/response supported by gdb?
No. GDB sends out one packet and waits for the response.
> - In other words, is that gdb's behaviour intentional?
No, it is not intentional.
> - If yes, then why it cannot handle multi-packet response?
> - If no, then is that a bug?
I have to say that GDB and the remote stub interact incorrectly. With
the limited information, hard to determine which part cause this
problem.
I forces gdbserver to use 's' packet, but unable to reproduce.
Sending packet: $Hc0#db...Packet received: OK
Sending packet: $s#73...Packet received:
T0505:88efffbf;04:70efffbf;08:f9840408;thread:p7891.7891;core:0;
Sending packet: $z0,80484c1,1#cf...Packet received: OK
--
Yao (éå)