From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29325 invoked by alias); 16 May 2012 17:21:00 -0000 Received: (qmail 29310 invoked by uid 22791); 16 May 2012 17:20:58 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL 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; Wed, 16 May 2012 17:20:43 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1SUhtZ-0000ub-5b from Thomas_Schwinge@mentor.com ; Wed, 16 May 2012 10:20:17 -0700 Received: from feldtkeller.schwinge.homeip.net ([172.30.64.32]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 May 2012 19:20:15 +0200 From: Thomas Schwinge To: Joel Brobecker Cc: gdb-patches@sourceware.org, Kevin Buettner , "Maciej W. Rozycki" Subject: Re: [SH] regs command In-Reply-To: <20120516165730.GY10253@adacore.com> References: <87ehqkrzzw.fsf@schwinge.name> <20120516142633.GV10253@adacore.com> <87zk98qe8t.fsf@schwinge.name> <20120516165730.GY10253@adacore.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 16 May 2012 17:21:00 -0000 Message-ID: <87pqa4qbzp.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-05/txt/msg00613.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1564 Hi! On Wed, 16 May 2012 09:57:30 -0700, Joel Brobecker = wrote: > > Sounds good, and thusly implemented, OK to commit? >=20 > I have only skimmed the patch for now. Perhaps Kevin would like > to look at the purely sh-related changes. They look good to me, > but I don't know if you might have missed something. Sure, we can wait. > In the meantime, I have noticed something: >=20 > > _initialize_sh_tdep (void) > > { > > struct cmd_list_element *c; > > + extern void all_registers_info (char *, int); > >=20=20 > > gdbarch_register (bfd_arch_sh, sh_gdbarch_init, NULL); > >=20=20 > > - add_com ("regs", class_vars, sh_show_regs_command, _("Print all regi= sters")); > > -=20=20 > > + c =3D add_com ("regs", class_vars, all_registers_info, > > + _("Print all registers")); > > + deprecate_cmd (c, "info all-registers"); > > + >=20 > Can you use add_alias_cmd instead of add_com? The only think I am not > sure about is whether it is going to work with the deprecation mechanism. > The command system is kind of obscure to me (in the fact that it has so > many attributes), but a look at the code seems to indicate that it will. > And as a bonus, you'll inherit all the attributes of the "info all-reg" > command... That's actually what I have tried first, but failed: due to add_alias_cmd returning a NULL pointer (in c), deprecated_cmd obviously failed. And as we'd remove this code in a few weeks anyway, I decided not to spend more time on this, and instead go the easy route. Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 489 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJPs+HKAAoJENuKOtuXzphJ7kEIAIw5h70n+hsskjY2ZczfFt8Q o6yisQyR+myq+weZojEcdJ/+qVrz1Ig7eugeFGl0VVYXKw6hvprODz0mNAySrIkB DuSt091pKPBW1v4RuzLVYsZYCjoD61FaL13oAfwIt62TKZ7aOrm7neuJUrM0lvFN IuFU8+fdVTx9sY/o0NuwjaOTpnnJ6ySkw6zELUQ3m6Mzq+9Y832lGYk1RBcY2i9H SOKFqT8E58AvmIV/Vyvmx/gky03VsaCsRjP8z3jqEBJg+gCH9pqScB3HKl8Fvb1F Vu8e9YVs+alVZ2hSdHRgFH1uNU5RnUzd2JdlSEEr+QSAaJbvIC3XBJE6cAZCdZQ= =PyNA -----END PGP SIGNATURE----- --=-=-=--