From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9654 invoked by alias); 16 May 2012 16:58:10 -0000 Received: (qmail 9624 invoked by uid 22791); 16 May 2012 16:58:07 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 May 2012 16:57:44 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 664F51C6F68; Wed, 16 May 2012 12:57:43 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5ltyERptZc2i; Wed, 16 May 2012 12:57:43 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EF4841C6F5A; Wed, 16 May 2012 12:57:41 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 38DFB145616; Wed, 16 May 2012 09:57:30 -0700 (PDT) Date: Wed, 16 May 2012 16:58:00 -0000 From: Joel Brobecker To: Thomas Schwinge Cc: gdb-patches@sourceware.org, Kevin Buettner , "Maciej W. Rozycki" Subject: Re: [SH] regs command Message-ID: <20120516165730.GY10253@adacore.com> References: <87ehqkrzzw.fsf@schwinge.name> <20120516142633.GV10253@adacore.com> <87zk98qe8t.fsf@schwinge.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zk98qe8t.fsf@schwinge.name> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00612.txt.bz2 > Sounds good, and thusly implemented, OK to commit? 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. > gdb/ > * sh-tdep.c (sh_show_regs): Remove variable. > (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs, sh2a_show_regs) > (sh2a_nofpu_show_regs, sh3e_show_regs, sh3_dsp_show_regs) > (sh4_show_regs, sh4_nofpu_show_regs, sh_dsp_show_regs) > (sh_show_regs_command): Remove functions. > (sh_gdbarch_init): Don't set sh_show_regs. > (_initialize_sh_tdep): Make the `regs' command an deprecated alias to > `info all-registers'. > * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs) > (sh64_show_regs): Remove functions. > * sh64-tdep.h (sh64_show_regs): Remove function declaration. > * NEWS: Document the deprecation. > gdb/doc/ > * gdb.texinfo: Document the deprecation. In the meantime, I have noticed something: > _initialize_sh_tdep (void) > { > struct cmd_list_element *c; > + extern void all_registers_info (char *, int); > > gdbarch_register (bfd_arch_sh, sh_gdbarch_init, NULL); > > - add_com ("regs", class_vars, sh_show_regs_command, _("Print all registers")); > - > + c = add_com ("regs", class_vars, all_registers_info, > + _("Print all registers")); > + deprecate_cmd (c, "info all-registers"); > + 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... -- Joel