From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31519 invoked by alias); 11 Dec 2013 11:43:19 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 31508 invoked by uid 89); 11 Dec 2013 11:43:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Dec 2013 11:43:16 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VqiBw-0000BC-Lh from Yao_Qi@mentor.com ; Wed, 11 Dec 2013 03:43:00 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 11 Dec 2013 03:43:00 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Wed, 11 Dec 2013 03:43:00 -0800 Message-ID: <52A84F73.3010300@codesourcery.com> Date: Wed, 11 Dec 2013 11:43:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Ivo Raisr CC: Subject: Re: Multi-packet gdb server request/response - problem? References: In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00013.txt.bz2 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 (齐尧)