diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-07-05 19:06:38 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-07-05 19:06:38 +0000 |
commit | 2419798b808521c666c29abc9b816154a979d69e (patch) | |
tree | 17bb3de27399d93aa661d0ad8622ef4a3bbc7564 /sim/m32r/sim-if.c | |
parent | 52cb9dfed024ca2df3a1a7f7340e7faa07321db3 (diff) | |
download | fsf-binutils-gdb-2419798b808521c666c29abc9b816154a979d69e.zip fsf-binutils-gdb-2419798b808521c666c29abc9b816154a979d69e.tar.gz fsf-binutils-gdb-2419798b808521c666c29abc9b816154a979d69e.tar.bz2 |
sim: start a unified sim_do_command
Since sim_do_command for many people simply calls sim_args_command, start
a unified version of it. For people who handle their own options, they
could switch to this by using sim_add_option_table instead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/m32r/sim-if.c')
-rw-r--r-- | sim/m32r/sim-if.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index 6235abd..610bd85 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -256,51 +256,3 @@ print_m32r_misc_cpu (SIM_CPU *cpu, int verbose) CPU_M32R_MISC_PROFILE (cpu)->parallel_count)); } } - -void -sim_do_command (sd, cmd) - SIM_DESC sd; - char *cmd; -{ - char **argv; - - if (cmd == NULL) - return; - - argv = buildargv (cmd); - - if (argv[0] != NULL - && strcasecmp (argv[0], "info") == 0 - && argv[1] != NULL - && strncasecmp (argv[1], "reg", 3) == 0) - { - SI val; - - /* We only support printing bbpsw,bbpc here as there is no equivalent - functionality in gdb. */ - if (argv[2] == NULL) - sim_io_eprintf (sd, "Missing register in `%s'\n", cmd); - else if (argv[3] != NULL) - sim_io_eprintf (sd, "Too many arguments in `%s'\n", cmd); - else if (strcasecmp (argv[2], "bbpsw") == 0) - { - val = m32rbf_h_cr_get (STATE_CPU (sd, 0), H_CR_BBPSW); - sim_io_printf (sd, "bbpsw 0x%x %d\n", val, val); - } - else if (strcasecmp (argv[2], "bbpc") == 0) - { - val = m32rbf_h_cr_get (STATE_CPU (sd, 0), H_CR_BBPC); - sim_io_printf (sd, "bbpc 0x%x %d\n", val, val); - } - else - sim_io_eprintf (sd, "Printing of register `%s' not supported with `sim info'\n", - argv[2]); - } - else - { - if (sim_args_command (sd, cmd) != SIM_RC_OK) - sim_io_eprintf (sd, "Unknown sim command `%s'\n", cmd); - } - - freeargv (argv); -} |