This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc 1/5] target: add add_deprecated_target_alias


On Fri, 08 Feb 2013 16:30:19 +0100, markus.t.metzger@intel.com wrote:
> 2013-02-08 Markus Metzger <markus.t.metzger@intel.com>
> 
> 	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]