From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9214 invoked by alias); 8 Mar 2004 10:18:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9202 invoked from network); 8 Mar 2004 10:18:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 8 Mar 2004 10:18:32 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i28AIVST014581 for ; Mon, 8 Mar 2004 05:18:31 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i28AIUM10630 for ; Mon, 8 Mar 2004 05:18:31 -0500 Received: from cygbert.vinschen.de (vpn50-16.rdu.redhat.com [172.16.50.16]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i28AITR16699 for ; Mon, 8 Mar 2004 02:18:29 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 33065580E2; Mon, 8 Mar 2004 11:18:24 +0100 (CET) Date: Mon, 08 Mar 2004 10:18:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-tdep.c: Fix erroneus register skipping in sh_print_registers_info Message-ID: <20040308101824.GB21585@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040218135942.GA29776@cygbert.vinschen.de> <16456.65466.312420.773141@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16456.65466.312420.773141@localhost.redhat.com> User-Agent: Mutt/1.4.2i X-RedHat-Spam-Score: -4.9 X-SW-Source: 2004-03.o/txt/msg00150.txt On Mar 5 17:31, Elena Zannoni wrote: > Corinna Vinschen writes: > > Hi, > > > > the below patch fixes a long standing bug in sh_print_registers_info. > > When the print loop encounters a float type register and fpregs is > > not set, then the loop counter (regnum) is not just incremented by > > one, but instead it's incremented by FP_LAST_REGNUM - FP0_REGNUM. > > > > The problem with this is, that FPUL is also a float type register. > > FPUL is two register numbers below FP0_REGNUM. So when the loop > > arrives at FPUL, it skips the next 16 registers. The next evaluated > > register then (fr14) is still a float type register, so the loop > > skips again 16 registers. As a result, the register set is never > > printed completely when calling `info registers'. > > > > The below patch fixes that and shortens the code slightly by using > > a "for" loop instead of "while". > > > > > > Corinna > > > > > > ChangeLog: > > > > * sh-tdep.c (sh_print_registers_info): Use for loop. > > Don't skip multiple registers when a float register is encountered. > > > > ok Thanks, applied. Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9214 invoked by alias); 8 Mar 2004 10:18:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9202 invoked from network); 8 Mar 2004 10:18:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 8 Mar 2004 10:18:32 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i28AIVST014581 for ; Mon, 8 Mar 2004 05:18:31 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i28AIUM10630 for ; Mon, 8 Mar 2004 05:18:31 -0500 Received: from cygbert.vinschen.de (vpn50-16.rdu.redhat.com [172.16.50.16]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i28AITR16699 for ; Mon, 8 Mar 2004 02:18:29 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 33065580E2; Mon, 8 Mar 2004 11:18:24 +0100 (CET) Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-tdep.c: Fix erroneus register skipping in sh_print_registers_info Message-ID: <20040308101824.GB21585@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040218135942.GA29776@cygbert.vinschen.de> <16456.65466.312420.773141@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16456.65466.312420.773141@localhost.redhat.com> User-Agent: Mutt/1.4.2i X-RedHat-Spam-Score: -4.9 X-SW-Source: 2004-03/txt/msg00150.txt.bz2 Message-ID: <20040319000900.DF4S5BwVBEk6pRFaI3P1cLKBStHszM2soGq3UpDDdGY@z> On Mar 5 17:31, Elena Zannoni wrote: > Corinna Vinschen writes: > > Hi, > > > > the below patch fixes a long standing bug in sh_print_registers_info. > > When the print loop encounters a float type register and fpregs is > > not set, then the loop counter (regnum) is not just incremented by > > one, but instead it's incremented by FP_LAST_REGNUM - FP0_REGNUM. > > > > The problem with this is, that FPUL is also a float type register. > > FPUL is two register numbers below FP0_REGNUM. So when the loop > > arrives at FPUL, it skips the next 16 registers. The next evaluated > > register then (fr14) is still a float type register, so the loop > > skips again 16 registers. As a result, the register set is never > > printed completely when calling `info registers'. > > > > The below patch fixes that and shortens the code slightly by using > > a "for" loop instead of "while". > > > > > > Corinna > > > > > > ChangeLog: > > > > * sh-tdep.c (sh_print_registers_info): Use for loop. > > Don't skip multiple registers when a float register is encountered. > > > > ok Thanks, applied. Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc.