diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-09-10 05:16:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-09-10 05:16:34 +0000 |
commit | d0b59aa593a44c20fcaedfb42e895395af696cd2 (patch) | |
tree | 5674738534be7797ddd0a416da28cf49471b8d3a /sim/common/sim-options.c | |
parent | 318b499d8e52bc48db7a61aebee7e70ddc8bfbee (diff) | |
download | gdb-d0b59aa593a44c20fcaedfb42e895395af696cd2.zip gdb-d0b59aa593a44c20fcaedfb42e895395af696cd2.tar.gz gdb-d0b59aa593a44c20fcaedfb42e895395af696cd2.tar.bz2 |
Add option architecture-info to list supported architectures.
Diffstat (limited to 'sim/common/sim-options.c')
-rw-r--r-- | sim/common/sim-options.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 8e8cb2f..17c1402 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -88,6 +88,7 @@ static DECLARE_OPTION_HANDLER (standard_option_handler); #define OPTION_DO_COMMAND (OPTION_START + 2) #define OPTION_ARCHITECTURE (OPTION_START + 3) #define OPTION_TARGET (OPTION_START + 4) +#define OPTION_ARCHITECTURE_INFO (OPTION_START + 5) static const OPTION standard_options[] = { @@ -134,6 +135,12 @@ static const OPTION standard_options[] = { {"architecture", required_argument, NULL, OPTION_ARCHITECTURE}, '\0', "MACHINE", "Specify the architecture to use", 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}, '\0', "BFDNAME", "Specify the object-code format for the object files", @@ -262,6 +269,20 @@ standard_option_handler (sd, opt, arg, is_command) 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: { STATE_TARGET (sd) = xstrdup (arg); |