From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10392 invoked by alias); 11 Apr 2016 21:19:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10375 invoked by uid 89); 11 Apr 2016 21:19:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1574 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 Apr 2016 21:19:20 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1apjEs-0002At-B3 from Luis_Gustavo@mentor.com ; Mon, 11 Apr 2016 14:19:18 -0700 Received: from [134.86.127.233] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Mon, 11 Apr 2016 14:19:17 -0700 Subject: Re: PR13984 - gdb stops controlling a thread after "Remote 'g' packet reply is too long: ..." error message References: To: Orgad Shaneh , Reply-To: Luis Machado From: Luis Machado Message-ID: <570C14D4.3030600@codesourcery.com> Date: Mon, 11 Apr 2016 21:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00225.txt.bz2 Hi, On 04/10/2016 09:49 AM, Orgad Shaneh wrote: > Please review the attached patch. It was inspired by the patch > attached to the bug report. Usually, when you receive that message from GDB it because your target reported an incorrect register set as a 'g' reply. The correct solution is to fix your remote target to reply the proper register set. From the description, it sounds like QEMU needs to be adjusted. > > Thanks. > > > 0001-PR13984-gdb-stops-controlling-a-thread.patch > > > From 03ab95933b85dd85c2f4fa5797017e6cee0c8466 Mon Sep 17 00:00:00 2001 > From: Orgad Shaneh > Date: Sun, 10 Apr 2016 17:39:24 +0300 > Subject: [PATCH] PR13984, gdb stops controlling a thread... > > ... after "Remote 'g' packet reply is too long: ..." error message > > PR13984: > remote.c: Handle long g packets instead of failing > --- > gdb/remote.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/gdb/remote.c b/gdb/remote.c > index 5c407b6..e8951dc 100644 > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -7188,10 +7188,6 @@ process_g_packet (struct regcache *regcache) > > buf_len = strlen (rs->buf); > > - /* Further sanity checks, with knowledge of the architecture. */ > - if (buf_len > 2 * rsa->sizeof_g_packet) > - error (_("Remote 'g' packet reply is too long: %s"), rs->buf); > - This is a serious error. If GDB fetches a bogus register set reply, it will most definitely do the wrong thing after this.