Add option architecture-info to list supported architectures.
This commit is contained in:
parent
318b499d8e
commit
d0b59aa593
2 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Sep 10 13:23:24 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* sim-options.c (OPTION_ARCHITECTURE_INFO): New option.
|
||||||
|
(standard_option_handler): Handle --architecture-info.
|
||||||
|
|
||||||
Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
|
Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
|
||||||
|
|
||||||
* sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
|
* sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
|
||||||
|
|
|
@ -88,6 +88,7 @@ static DECLARE_OPTION_HANDLER (standard_option_handler);
|
||||||
#define OPTION_DO_COMMAND (OPTION_START + 2)
|
#define OPTION_DO_COMMAND (OPTION_START + 2)
|
||||||
#define OPTION_ARCHITECTURE (OPTION_START + 3)
|
#define OPTION_ARCHITECTURE (OPTION_START + 3)
|
||||||
#define OPTION_TARGET (OPTION_START + 4)
|
#define OPTION_TARGET (OPTION_START + 4)
|
||||||
|
#define OPTION_ARCHITECTURE_INFO (OPTION_START + 5)
|
||||||
|
|
||||||
static const OPTION standard_options[] =
|
static const OPTION standard_options[] =
|
||||||
{
|
{
|
||||||
|
@ -134,6 +135,12 @@ static const OPTION standard_options[] =
|
||||||
{ {"architecture", required_argument, NULL, OPTION_ARCHITECTURE},
|
{ {"architecture", required_argument, NULL, OPTION_ARCHITECTURE},
|
||||||
'\0', "MACHINE", "Specify the architecture to use",
|
'\0', "MACHINE", "Specify the architecture to use",
|
||||||
standard_option_handler },
|
standard_option_handler },
|
||||||
|
{ {"architecture-info", no_argument, NULL, OPTION_ARCHITECTURE_INFO},
|
||||||
|
'\0', NULL, "List supported architectures",
|
||||||
|
standard_option_handler },
|
||||||
|
{ {"info-architecture", no_argument, NULL, OPTION_ARCHITECTURE_INFO},
|
||||||
|
'\0', NULL, NULL,
|
||||||
|
standard_option_handler },
|
||||||
|
|
||||||
{ {"target", required_argument, NULL, OPTION_TARGET},
|
{ {"target", required_argument, NULL, OPTION_TARGET},
|
||||||
'\0', "BFDNAME", "Specify the object-code format for the object files",
|
'\0', "BFDNAME", "Specify the object-code format for the object files",
|
||||||
|
@ -262,6 +269,20 @@ standard_option_handler (sd, opt, arg, is_command)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case OPTION_ARCHITECTURE_INFO:
|
||||||
|
{
|
||||||
|
const char **list = bfd_arch_list();
|
||||||
|
const char **lp;
|
||||||
|
if (list == NULL)
|
||||||
|
abort ();
|
||||||
|
sim_io_printf (sd, "Valid architectures:");
|
||||||
|
for (lp = list; *lp != NULL; lp++)
|
||||||
|
sim_io_printf (sd, " %s", *lp);
|
||||||
|
sim_io_printf (sd, "\n");
|
||||||
|
free (list);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case OPTION_TARGET:
|
case OPTION_TARGET:
|
||||||
{
|
{
|
||||||
STATE_TARGET (sd) = xstrdup (arg);
|
STATE_TARGET (sd) = xstrdup (arg);
|
||||||
|
|
Loading…
Reference in a new issue