From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11809 invoked by alias); 31 Jul 2009 20:31:35 -0000 Received: (qmail 11799 invoked by uid 22791); 31 Jul 2009 20:31:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 31 Jul 2009 20:31:23 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id A6E0C4D01C for ; Fri, 31 Jul 2009 13:31:19 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id 4AB9F8EC20; Fri, 31 Jul 2009 13:31:19 -0700 (PDT) Message-ID: <4A735491.4040006@vmware.com> Date: Fri, 31 Jul 2009 21:00:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Michael Snyder , "gdb-patches@sourceware.org" Subject: Re: [RFC] small change for better error reporting in remote.c References: <4A70E268.6010401@vmware.com> <20090730213019.GB3955@caradoc.them.org> In-Reply-To: <20090730213019.GB3955@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2009-07/txt/msg00769.txt.bz2 drow@false.org wrote: > On Wed, Jul 29, 2009 at 04:59:36PM -0700, Michael Snyder wrote: >> @@ -5189,7 +5192,10 @@ store_registers_using_G (const struct re >> /* remote_prepare_to_store insures that rsa->sizeof_g_packet gets >> updated. */ >> bin2hex (regs, p, rsa->sizeof_g_packet); >> - remote_send (&rs->buf, &rs->buf_size); >> + putpkt (rs->buf); >> + getpkt (&rs->buf, &rs->buf_size, 0); >> + if (rs->buf[0] == 'E') >> + error (_("Could not write registers")); >> } >> >> /* Store register REGNUM, or all registers if REGNUM == -1, from the contents > > Can't you use packet_ok like elsewhere? Otherwise OK. You may not realize it, but you're asking for a much bigger change. There is no struct packet_config for the 'G' packet. I'll have to change set_registers_using_G from void to int, so that it can return failure if the 'G' packet is unsupported. But I'll begin working on it, unles I hear "never mind" from you... ;-) Michael