From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9880 invoked by alias); 2 Mar 2012 09:24:29 -0000 Received: (qmail 9869 invoked by uid 22791); 2 Mar 2012 09:24:27 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Mar 2012 09:24:12 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1S3Oig-0005nr-RW from Thomas_Schwinge@mentor.com ; Fri, 02 Mar 2012 01:24:11 -0800 Received: from feldtkeller.schwinge.homeip.net ([172.30.64.112]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 2 Mar 2012 10:24:09 +0100 From: Thomas Schwinge To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist In-Reply-To: <20120301111926.14b1025b@mesquite.lan> References: <20120229173408.78699013@mesquite.lan> <20120301013318.GJ3118@adacore.com> <20120229220932.17ad0d5f@mesquite.lan> <877gz44nre.fsf@schwinge.name> <20120301111926.14b1025b@mesquite.lan> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 02 Mar 2012 09:24:00 -0000 Message-ID: <87pqcv2w64.fsf@schwinge.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: 2012-03/txt/msg00075.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1371 Hi Kevin! On Thu, 1 Mar 2012 11:19:26 -0700, Kevin Buettner wrote: > I think it is still okay because [...] I agree with your reasoning. > On Thu, 01 Mar 2012 11:30:13 +0100 > Thomas Schwinge wrote: > > Still learning about GDB's code layout -- is there any benefit in > > invoking gdbarch_register_reggroup_p (as you're doing) in contrast to > > directly going for sh_register_reggroup_p? >=20 > Well, the way I'm doing it is slower. >=20 > But, if at some point someone were to add another > `register_reggroup_p' method for some other sh variant (as is the case > for `register_name'), the code that I wrote will still work. If I > called sh_register_reggroup_p directly, then presumably the wrong > function would be called for that new architecture variant. Sure, but a person adding a new variant of sh_register_reggroup_p would surely be checking all places where the current only implementation is invoked, and decide which is now applicable, the old or the new -- or simply defer that decision to gdbarch_register_reggroup_p then; so we might as well do that right now. > * sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register > unless it exists for this architecture. Looks good; before committing, you may want to unify spaces/tabs usage used for indenting the comment. Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 489 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJPUJGkAAoJENuKOtuXzphJi84IAL2C2Q8nivKDnbCa1uHby7JL pH1eby1ohMTenCp6efCfYaQkaRBO0c6MZzdBFy+fqfezZzZvG2b9sbMA7Gct0Eta nJRVxfKD+1pFEhdKMTJpKTIyxJWIb/k6ANvTr1kLrrQe4d9q94FNnLTlpB99x3j+ bVgtTj3iYYlyOPN0s+BozhgCKHPaS6uMb9Gkt0Ye9fW2gwoaNqW9sLO71ut5tU4Q Iq3+o3dCHV+YS/vVtr2PfmnCMz0GeZKb60JEsYjdjvGcG1cJdASqgfXAlURc1Naa 6QFnLxQnhFmfqwVjnAbNwZamjcaPBiZam7vYIbCJtmplKy+SRfNDS0DBaHlcjJQ= =V4v2 -----END PGP SIGNATURE----- --=-=-=--