diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-11-08 18:57:06 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-11-08 18:57:06 +0000 |
commit | 73c4941b23b9c660bb9bc4bb7acf3ea253356c41 (patch) | |
tree | da13e65308de8337364ccbc1dde964aa60b93609 /sim/ppc/sim_calls.c | |
parent | 0634a431423265b525681625d2796346428c53b0 (diff) | |
download | gdb-73c4941b23b9c660bb9bc4bb7acf3ea253356c41.zip gdb-73c4941b23b9c660bb9bc4bb7acf3ea253356c41.tar.gz gdb-73c4941b23b9c660bb9bc4bb7acf3ea253356c41.tar.bz2 |
first stage in function unit support; add new switches & latest code from andrew
Diffstat (limited to 'sim/ppc/sim_calls.c')
-rw-r--r-- | sim/ppc/sim_calls.c | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 32bd4f5..5a61e53 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "basics.h" +#include "function_unit.h" #include "psim.h" #ifdef HAVE_STDLIB_H @@ -55,8 +56,6 @@ static int print_info = 0; void sim_open (char *args) { - int i; - /* trace the call */ TRACE(trace_gdb, ("sim_open(args=%s) called\n", args ? args : "(null)")); @@ -77,19 +76,38 @@ sim_open (char *args) while (*p != '\0') { switch (*p) { default: - printf_filtered("Usage:\n\ttarget sim [ -t <trace-option> ]\n"); + printf_filtered("Usage:\n\ttarget sim [ -t <trace-option> ] [-m model] [-i] [-I]\n"); trace_usage(); error (""); break; case 't': - argp += 1; - if (argv[argp] == NULL) - error("Missing <trace> option for -t\n"); - trace_option(argv[argp]); /* better fail if NULL */ + if (p[1]) + trace_option(p+1); + else { + argp += 1; + if (argv[argp] == NULL) + error("Missing <trace> option for -t\n"); + else + trace_option(argv[argp]); + } break; - case 'I': + case 'm': + if (p[1]) + function_unit_model(p+1); + else { + argp += 1; + if (argv[argp] == NULL) + error("Missing <trace> option for -t\n"); + else + function_unit_model(argv[argp]); + } + break; + case 'i': print_info = 1; break; + case 'I': + print_info = 2; + break; } p += 1; } @@ -109,7 +127,7 @@ sim_close (int quitting) { TRACE(trace_gdb, ("sim_close(quitting=%d) called\n", quitting)); if (print_info) - psim_print_info (simulator, 1); + psim_print_info (simulator, print_info); /* nothing to do */ } @@ -285,7 +303,6 @@ void sim_resume (int step, int siggnal) { void (*prev) (); - unsigned_word program_counter; TRACE(trace_gdb, ("sim_resume(step=%d, siggnal=%d)\n", step, siggnal)); |