From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16552 invoked by alias); 10 Feb 2013 22:10:56 -0000 Received: (qmail 16496 invoked by uid 22791); 10 Feb 2013 22:10:55 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,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; Sun, 10 Feb 2013 22:10:48 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1AMAi57003567 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 10 Feb 2013 17:10:44 -0500 Received: from host2.jankratochvil.net (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1AMAejY000592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 10 Feb 2013 17:10:43 -0500 Date: Sun, 10 Feb 2013 22:10:00 -0000 From: Jan Kratochvil To: markus.t.metzger@intel.com Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com Subject: Re: [rfc 1/5] target: add add_deprecated_target_alias Message-ID: <20130210221039.GA4819@host2.jankratochvil.net> References: <1360337423-27095-1-git-send-email-markus.t.metzger@intel.com> <1360337423-27095-2-git-send-email-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1360337423-27095-2-git-send-email-markus.t.metzger@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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-02/txt/msg00240.txt.bz2 On Fri, 08 Feb 2013 16:30:19 +0100, markus.t.metzger@intel.com wrote: > 2013-02-08 Markus Metzger > > * target.h (add_deprecated_target_alias): New. > * target.c (add_deprecated_target_alias): New. OK for check-in with the nit below. > --- a/gdb/target.c > +++ b/gdb/target.c > @@ -434,6 +434,20 @@ information on the arguments for a particular protocol, type\n\ > add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist); > } > > +/* See target.h. */ > + > +void > +add_deprecated_target_alias (struct target_ops *t, char *alias) > +{ > + struct cmd_list_element *c; > + char *alt; > + > + /* If we use add_alias_cmd, here, we do not get the deprecated warning. */ /* If we use add_alias_cmd, here, we do not get the deprecated warning, see PR cli/15104. */ > + c = add_cmd (alias, no_class, t->to_open, t->to_doc, &targetlist); > + alt = xstrprintf ("target %s", t->to_shortname); > + deprecate_cmd (c, alt); > +} > + > /* Stub functions */ > > void Thanks, Jan