From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23967 invoked by alias); 7 Mar 2013 16:39:59 -0000 Received: (qmail 23916 invoked by uid 22791); 7 Mar 2013 16:39:58 -0000 X-SWARE-Spam-Status: No, hits=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Mar 2013 16:39:52 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r27Gdqng019340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 7 Mar 2013 11:39:52 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r27Gdpsx004952; Thu, 7 Mar 2013 11:39:51 -0500 Message-ID: <5138C2D6.6070700@redhat.com> Date: Thu, 07 Mar 2013 16:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: Keith Seitz CC: "gdb-patches@sourceware.org ml" Subject: Re: [RFA] cleanup: while (isspace) -> skip_spaces{,_const} References: <5137EE7A.9080500@redhat.com> In-Reply-To: <5137EE7A.9080500@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2013-03/txt/msg00301.txt.bz2 On 03/07/2013 01:33 AM, Keith Seitz wrote: > @@ -2185,12 +2186,8 @@ registers_info (char *addr_exp, int fpregs) > char *start; > const char *end; > > - /* Keep skipping leading white space. */ > - if (isspace ((*addr_exp))) > - { > - addr_exp++; > - continue; > - } > + /* Skip leading white space. */ > + addr_exp = skip_spaces (addr_exp); This now continues forward even if *addr_exp is '\0', while before the patch it didn't. The code read: while (*addr_exp != '\0') { char *start; const char *end; /* Keep skipping leading white space. */ if (isspace ((*addr_exp))) { addr_exp++; continue; } /* Discard any leading ``$''. Check that there is something resembling a register following it. */ if (addr_exp[0] == '$') addr_exp++; if (isspace ((*addr_exp)) || (*addr_exp) == '\0') error (_("Missing register name")); And it seems to be we'll now reach that last error in that case, while we wouldn't before. Can we trigger that with "info register rip ", say? -- Pedro Alves