Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Ivo Raisr <ivosh@ivosh.net>
Cc: <gdb@sourceware.org>
Subject: Re: Multi-packet gdb server request/response - problem?
Date: Wed, 11 Dec 2013 11:43:00 -0000	[thread overview]
Message-ID: <52A84F73.3010300@codesourcery.com> (raw)
In-Reply-To: <CANXv6=u1BjBdJJDNtF=j=djNJVoNHo45gL4JZruzDYsaSqEU6Q@mail.gmail.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 (齐尧)


  parent reply	other threads:[~2013-12-11 11:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 12:23 Ivo Raisr
2013-12-10 21:46 ` Philippe Waroquiers
     [not found]   ` <CANXv6=vFYfEDLPVHv_TRK4VTLmFX6c+2hvmodM9dg3gcJA4_jQ@mail.gmail.com>
2013-12-12 15:14     ` Fwd: " Ivo Raisr
2013-12-12 15:44       ` Ivo Raisr
2013-12-12 16:46         ` Pedro Alves
2013-12-11 11:43 ` Yao Qi [this message]
2013-12-14  3:39 Ivo Raisr
2013-12-16 14:31 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A84F73.3010300@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=ivosh@ivosh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox