aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/main.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-11-08 18:57:06 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-11-08 18:57:06 +0000
commit73c4941b23b9c660bb9bc4bb7acf3ea253356c41 (patch)
treeda13e65308de8337364ccbc1dde964aa60b93609 /sim/ppc/main.c
parent0634a431423265b525681625d2796346428c53b0 (diff)
downloadgdb-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/main.c')
-rw-r--r--sim/ppc/main.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 07412be..80b993f 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -23,11 +23,16 @@
#include <stdio.h>
#include "psim.h"
+#include "function_unit.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#ifdef HAVE_STRING_H
#include <string.h>
#else
@@ -80,7 +85,7 @@ zfree(void *chunk)
static void
usage(void)
{
- printf_filtered("Usage:\n\tpsim [ -t <trace-option> ] <image> [ <image-args> ... ]\n");
+ printf_filtered("Usage:\n\tpsim [ -t <trace-option> ] [-m model] [-i] [-I] <image> [ <image-args> ... ]\n");
trace_usage();
error("");
}
@@ -91,23 +96,27 @@ main(int argc, char **argv)
psim *system;
const char *name_of_file;
char *arg_;
- unsigned_word stack_pointer;
psim_status status;
int letter;
- int i;
int print_info = 0;
/* check for arguments -- note sim_calls.c also contains argument processing
code for the simulator linked within gdb. */
- while ((letter = getopt (argc, argv, "It:")) != EOF)
+ while ((letter = getopt (argc, argv, "Iim:t:")) != EOF)
{
switch (letter) {
case 't':
trace_option(optarg);
break;
- case 'I':
+ case 'm':
+ function_unit_model(optarg);
+ break;
+ case 'i':
print_info = 1;
break;
+ case 'I':
+ print_info = 2;
+ break;
default:
usage();
}
@@ -133,7 +142,7 @@ main(int argc, char **argv)
/* any final clean up */
if (print_info)
- psim_print_info (system, 2);
+ psim_print_info (system, print_info);
/* why did we stop */
status = psim_get_status(system);