mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
Add a new function to target.h to add an alias command for a target and mark it
deprecated. This is useful when renaming targets. gdb/ * target.h (add_deprecated_target_alias): New. * target.c (add_deprecated_target_alias): New.
This commit is contained in:
15
gdb/target.c
15
gdb/target.c
@ -434,6 +434,21 @@ 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,
|
||||
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
|
||||
|
Reference in New Issue
Block a user