1995-10-06 19:05:40 +00:00
|
|
|
/* run front end support for all the simulators.
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-04-17 11:24:09 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
1995-10-06 19:05:40 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
1997-04-17 11:24:09 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
1995-10-06 19:05:40 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
1997-04-17 11:24:09 +00:00
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
/* Steve Chamberlain sac@cygnus.com,
|
|
|
|
and others at Cygnus. */
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
#include "config.h"
|
|
|
|
#include "tconfig.h"
|
1995-10-06 19:05:40 +00:00
|
|
|
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
1997-03-21 03:56:07 +00:00
|
|
|
#ifdef __STDC__
|
|
|
|
#include <stdarg.h>
|
|
|
|
#else
|
1995-10-06 19:05:40 +00:00
|
|
|
#include <varargs.h>
|
1997-03-21 03:56:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_STDLIB_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
#include <string.h>
|
|
|
|
#else
|
|
|
|
#ifdef HAVE_STRINGS_H
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "libiberty.h"
|
1995-10-06 19:05:40 +00:00
|
|
|
#include "bfd.h"
|
|
|
|
#include "callback.h"
|
1997-03-21 03:56:07 +00:00
|
|
|
#include "remote-sim.h"
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-04-02 23:28:12 +00:00
|
|
|
#include "../libiberty/alloca-conf.h"
|
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
static void usage PARAMS ((void));
|
1995-10-06 19:05:40 +00:00
|
|
|
extern int optind;
|
|
|
|
extern char *optarg;
|
|
|
|
|
|
|
|
extern host_callback default_callback;
|
1997-03-21 03:56:07 +00:00
|
|
|
|
|
|
|
static char *myname;
|
|
|
|
|
|
|
|
|
|
|
|
/* NOTE: sim_size() and sim_trace() are going away */
|
|
|
|
extern void sim_size PARAMS ((int i));
|
|
|
|
extern int sim_trace PARAMS ((SIM_DESC sd));
|
|
|
|
|
|
|
|
extern int getopt ();
|
|
|
|
|
1997-04-18 12:24:52 +00:00
|
|
|
static SIM_DESC sd;
|
|
|
|
|
|
|
|
static RETSIGTYPE
|
|
|
|
cntrl_c (int sig)
|
|
|
|
{
|
|
|
|
if (! sim_stop (sd))
|
|
|
|
{
|
|
|
|
fprintf (stderr, "Quit!\n");
|
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
}
|
1997-03-21 03:56:07 +00:00
|
|
|
|
1995-10-06 19:05:40 +00:00
|
|
|
int
|
|
|
|
main (ac, av)
|
|
|
|
int ac;
|
|
|
|
char **av;
|
|
|
|
{
|
1997-04-18 12:24:52 +00:00
|
|
|
RETSIGTYPE (*prev_sigint) ();
|
1995-10-06 19:05:40 +00:00
|
|
|
bfd *abfd;
|
|
|
|
asection *s;
|
|
|
|
int i;
|
|
|
|
int verbose = 0;
|
|
|
|
int trace = 0;
|
1997-03-21 03:56:07 +00:00
|
|
|
char *name;
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
static char *no_args[4];
|
1997-03-21 03:56:07 +00:00
|
|
|
char **sim_argv = &no_args[0];
|
|
|
|
char **prog_args;
|
1995-10-06 19:05:40 +00:00
|
|
|
enum sim_stop reason;
|
|
|
|
int sigrc;
|
1997-03-21 03:56:07 +00:00
|
|
|
|
|
|
|
myname = av[0] + strlen (av[0]);
|
|
|
|
while (myname > av[0] && myname[-1] != '/')
|
|
|
|
--myname;
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
/* The first element of sim_open's argv is the program name. */
|
|
|
|
no_args[0] = av[0];
|
1997-05-20 00:05:27 +00:00
|
|
|
#ifdef SIM_HAVE_BIENDIAN
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
no_args[1] = "-E";
|
|
|
|
no_args[2] = "set-later";
|
1997-05-20 00:05:27 +00:00
|
|
|
#endif
|
1997-03-21 03:56:07 +00:00
|
|
|
|
|
|
|
/* FIXME: This is currently being rewritten to have each simulator
|
|
|
|
do all argv processing. */
|
|
|
|
|
|
|
|
#ifdef SIM_H8300 /* FIXME: quick hack */
|
|
|
|
while ((i = getopt (ac, av, "a:c:m:p:s:htv")) != EOF)
|
|
|
|
#else
|
|
|
|
while ((i = getopt (ac, av, "a:c:m:p:s:tv")) != EOF)
|
|
|
|
#endif
|
1995-10-06 19:05:40 +00:00
|
|
|
switch (i)
|
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
case 'a':
|
|
|
|
/* FIXME: Temporary hack. */
|
|
|
|
{
|
|
|
|
int len = strlen (av[0]) + strlen (optarg);
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
char *argbuf = (char *) alloca (len + 2 + 50);
|
1997-05-20 00:05:27 +00:00
|
|
|
sprintf (argbuf, "%s %s", av[0], optarg);
|
|
|
|
#ifdef SIM_HAVE_BIENDIAN
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
/* The desired endianness must be passed to sim_open.
|
|
|
|
The value for "set-later" is set when we know what it is.
|
1997-05-20 00:05:27 +00:00
|
|
|
-E support isn't yet part of the published interface. */
|
|
|
|
strcat (argbuf, " -E set-later");
|
|
|
|
#endif
|
1997-03-21 03:56:07 +00:00
|
|
|
sim_argv = buildargv (argbuf);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
#ifdef SIM_HAVE_SIMCACHE
|
|
|
|
case 'c':
|
|
|
|
sim_set_simcache_size (atoi (optarg));
|
|
|
|
break;
|
|
|
|
#endif
|
1995-10-06 19:05:40 +00:00
|
|
|
case 'm':
|
1997-03-21 03:56:07 +00:00
|
|
|
/* FIXME: Rename to sim_set_mem_size. */
|
1995-10-06 19:05:40 +00:00
|
|
|
sim_size (atoi (optarg));
|
|
|
|
break;
|
1997-03-21 03:56:07 +00:00
|
|
|
#ifdef SIM_HAVE_PROFILE
|
1995-10-06 19:05:40 +00:00
|
|
|
case 'p':
|
|
|
|
sim_set_profile (atoi (optarg));
|
|
|
|
break;
|
|
|
|
case 's':
|
|
|
|
sim_set_profile_size (atoi (optarg));
|
|
|
|
break;
|
1997-03-21 03:56:07 +00:00
|
|
|
#endif
|
1995-10-06 19:05:40 +00:00
|
|
|
case 't':
|
|
|
|
trace = 1;
|
1997-03-21 03:56:07 +00:00
|
|
|
/* FIXME: need to allow specification of what to trace. */
|
|
|
|
/* sim_set_trace (1); */
|
1995-10-06 19:05:40 +00:00
|
|
|
break;
|
|
|
|
case 'v':
|
1997-03-21 03:56:07 +00:00
|
|
|
/* Things that are printed with -v are the kinds of things that
|
|
|
|
gcc -v prints. This is not meant to include detailed tracing
|
|
|
|
or debugging information, just summaries. */
|
1995-10-06 19:05:40 +00:00
|
|
|
verbose = 1;
|
1997-03-21 03:56:07 +00:00
|
|
|
/* sim_set_verbose (1); */
|
1995-10-06 19:05:40 +00:00
|
|
|
break;
|
1997-03-21 03:56:07 +00:00
|
|
|
/* FIXME: Quick hack, to be replaced by more general facility. */
|
|
|
|
#ifdef SIM_H8300
|
|
|
|
case 'h':
|
|
|
|
set_h8300h (1);
|
|
|
|
break;
|
|
|
|
#endif
|
1995-10-06 19:05:40 +00:00
|
|
|
default:
|
1997-03-21 03:56:07 +00:00
|
|
|
usage ();
|
1995-10-06 19:05:40 +00:00
|
|
|
}
|
1997-03-21 03:56:07 +00:00
|
|
|
|
1995-10-06 19:05:40 +00:00
|
|
|
ac -= optind;
|
|
|
|
av += optind;
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
if (ac <= 0)
|
|
|
|
usage ();
|
1995-10-06 19:05:40 +00:00
|
|
|
|
|
|
|
name = *av;
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
prog_args = av;
|
1995-10-06 19:05:40 +00:00
|
|
|
|
|
|
|
if (verbose)
|
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
printf ("%s %s\n", myname, name);
|
1995-10-06 19:05:40 +00:00
|
|
|
}
|
1995-10-22 20:22:02 +00:00
|
|
|
|
1997-05-20 00:05:27 +00:00
|
|
|
abfd = bfd_openr (name, 0);
|
1995-10-22 20:22:02 +00:00
|
|
|
if (!abfd)
|
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
fprintf (stderr, "%s: can't open %s: %s\n",
|
|
|
|
myname, name, bfd_errmsg (bfd_get_error ()));
|
1995-10-22 20:22:02 +00:00
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bfd_check_format (abfd, bfd_object))
|
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
fprintf (stderr, "%s: can't load %s: %s\n",
|
|
|
|
myname, name, bfd_errmsg (bfd_get_error ()));
|
1995-10-22 20:22:02 +00:00
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
|
1997-05-20 00:05:27 +00:00
|
|
|
#ifdef SIM_HAVE_BIENDIAN
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
/* The endianness must be passed to sim_open because one may wish to
|
|
|
|
examine/set registers before calling sim_load [which is the other
|
|
|
|
place where one can determine endianness]. We previously passed the
|
|
|
|
endianness via global `target_byte_order' but that's not a clean
|
|
|
|
interface. */
|
|
|
|
for (i = 1; sim_argv[i + 1] != NULL; ++i)
|
|
|
|
continue;
|
|
|
|
if (bfd_big_endian (abfd))
|
|
|
|
sim_argv[i] = "big";
|
|
|
|
else
|
|
|
|
sim_argv[i] = "little";
|
1997-05-20 00:05:27 +00:00
|
|
|
#endif
|
1995-10-22 20:22:02 +00:00
|
|
|
|
1996-09-12 15:28:40 +00:00
|
|
|
/* Ensure that any run-time initialisation that needs to be
|
|
|
|
performed by the simulator can occur. */
|
1997-05-20 00:05:27 +00:00
|
|
|
default_callback.init (&default_callback);
|
|
|
|
sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, sim_argv);
|
1997-04-17 11:14:21 +00:00
|
|
|
if (sd == 0)
|
|
|
|
exit (1);
|
1996-09-12 15:28:40 +00:00
|
|
|
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
if (sim_load (sd, name, abfd, 0) == SIM_RC_FAIL)
|
|
|
|
exit (1);
|
1995-10-22 20:22:02 +00:00
|
|
|
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
if (sim_create_inferior (sd, prog_args, NULL) == SIM_RC_FAIL)
|
|
|
|
exit (1);
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-04-18 12:24:52 +00:00
|
|
|
prev_sigint = signal (SIGINT, cntrl_c);
|
1995-10-22 20:22:02 +00:00
|
|
|
if (trace)
|
|
|
|
{
|
|
|
|
int done = 0;
|
|
|
|
while (!done)
|
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
done = sim_trace (sd);
|
1995-10-06 19:05:40 +00:00
|
|
|
}
|
|
|
|
}
|
1995-10-22 20:22:02 +00:00
|
|
|
else
|
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
sim_resume (sd, 0, 0);
|
1995-10-22 20:22:02 +00:00
|
|
|
}
|
1997-04-18 12:24:52 +00:00
|
|
|
signal (SIGINT, prev_sigint);
|
* Make-common.in (sim-options.o, sim-load.o): Add rules for.
(sim_main_headers): Add sim-trace.h.
* run.c (exec_bfd, target_byte_order): Delete.
(main): Pass -E <endian> to sim_open. Delete code to load sections,
call sim_load instead. Check return code of sim_create_inferior.
* sim-base.h (CURRENT_STATE): Define.
(sim_state_base): Make typedef. New members options, prog_argv,
prog_bfd, text_{section,start,end}, start_addr, simcache_size,
mem_size, memory [+ corresponding access macros].
(sim_cpu_base): New typedef.
* sim-trace.h: New file.
* sim-basics.h: #include it.
* sim-load.c: New file.
1997-04-17 09:37:02 +00:00
|
|
|
|
1995-10-22 20:22:02 +00:00
|
|
|
if (verbose)
|
1997-03-21 03:56:07 +00:00
|
|
|
sim_info (sd, 0);
|
1995-10-22 20:22:02 +00:00
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
sim_stop_reason (sd, &reason, &sigrc);
|
1995-10-06 19:05:40 +00:00
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
sim_close (sd, 0);
|
1996-09-12 15:28:40 +00:00
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
/* If reason is sim_exited, then sigrc holds the exit code which we want
|
|
|
|
to return. If reason is sim_stopped or sim_signalled, then sigrc holds
|
|
|
|
the signal that the simulator received; we want to return that to
|
|
|
|
indicate failure. */
|
|
|
|
|
|
|
|
#ifdef SIM_H8300 /* FIXME: Ugh. grep for SLEEP in compile.c */
|
|
|
|
if (sigrc == SIGILL)
|
|
|
|
abort ();
|
|
|
|
sigrc = 0;
|
|
|
|
#else
|
1996-10-15 15:44:10 +00:00
|
|
|
/* Why did we stop? */
|
|
|
|
switch (reason)
|
|
|
|
{
|
|
|
|
case sim_signalled:
|
|
|
|
case sim_stopped:
|
1997-03-21 03:56:07 +00:00
|
|
|
if (sigrc != 0)
|
|
|
|
fprintf (stderr, "program stopped with signal %d.\n", sigrc);
|
1996-10-15 15:44:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sim_exited:
|
|
|
|
break;
|
|
|
|
}
|
1997-03-21 03:56:07 +00:00
|
|
|
#endif
|
1996-10-15 15:44:10 +00:00
|
|
|
|
1995-10-22 20:22:02 +00:00
|
|
|
return sigrc;
|
1995-10-06 19:05:40 +00:00
|
|
|
}
|
|
|
|
|
1997-03-21 03:56:07 +00:00
|
|
|
static void
|
|
|
|
usage ()
|
1995-10-06 19:05:40 +00:00
|
|
|
{
|
1997-03-21 03:56:07 +00:00
|
|
|
fprintf (stderr, "Usage: %s [options] program [program args]\n", myname);
|
|
|
|
fprintf (stderr, "Options:\n");
|
|
|
|
fprintf (stderr, "-a args Pass `args' to simulator.\n");
|
|
|
|
#ifdef SIM_HAVE_SIMCACHE
|
|
|
|
fprintf (stderr, "-c size Set simulator cache size to `size'.\n");
|
|
|
|
#endif
|
|
|
|
#ifdef SIM_H8300
|
|
|
|
fprintf (stderr, "-h Executable is for h8/300h or h8/300s.\n");
|
|
|
|
#endif
|
|
|
|
fprintf (stderr, "-m size Set memory size of simulator, in bytes.\n");
|
|
|
|
#ifdef SIM_HAVE_PROFILE
|
|
|
|
fprintf (stderr, "-p freq Set profiling frequency.\n");
|
|
|
|
fprintf (stderr, "-s size Set profiling size.\n");
|
|
|
|
#endif
|
|
|
|
fprintf (stderr, "-t Perform instruction tracing.\n");
|
|
|
|
fprintf (stderr, " Note: Very few simulators support tracing.\n");
|
|
|
|
fprintf (stderr, "-v Verbose output.\n");
|
|
|
|
fprintf (stderr, "\n");
|
|
|
|
fprintf (stderr, "program args Arguments to pass to simulated program.\n");
|
|
|
|
fprintf (stderr, " Note: Very few simulators support this.\n");
|
1995-10-06 19:05:40 +00:00
|
|
|
exit (1);
|
|
|
|
}
|