diff options
author | Doug Evans <dje@google.com> | 1998-02-27 18:39:22 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-02-27 18:39:22 +0000 |
commit | 966df5804d7586c1a30853ffb4aa0663c942c337 (patch) | |
tree | 3451ce3db2f4deec7d55670a701f507c024b6d72 /sim/common/sim-module.c | |
parent | 2e7236783eccbd1d0bed7f49aac81e447be5e314 (diff) | |
download | binutils-gdb-966df5804d7586c1a30853ffb4aa0663c942c337.tar.gz |
* sim-base.h (sim_cpu_base): New members name, options.
(sim_cpu_lookup): Add prototype.
* sim-module.c (sim_pre_argv_init): Provide default names for cpus.
* sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'.
(sim_add_option_table): Update prototype.
* sim-options.c (sim_add_option_table): New argument `cpu'.
(standard_option_handler,standard_install): Update.
(sim_parse_args): Handle cpu specific options.
(print_help): New static function.
(sim_print_help): Call it. Print cpu specific options.
(find_match): New static function.
(sim_args_command): Call it. Handle cpu specific options.
* sim-utils.c (sim_cpu_lookup): New function.
* sim-memopt.c (memory_option_handler): Update.
(sim_memopt_install): Update.
* sim-model.c (model_option_handler): Update.
(model_install): Update.
* sim-profile.c (profile_option_handler): Update.
(profile_install): Update.
* sim-trace.c (trace_option_handler): Update.
(trace_install): Update.
* sim-watch.c (watchpoint_option_handler): Update.
(sim_watchpoint_install): Update.
* cgen-scache.c (scache_option_handler): Update.
(scache_install): Update.
Diffstat (limited to 'sim/common/sim-module.c')
-rw-r--r-- | sim/common/sim-module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 323d3e43585..c4dcd300918 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -74,6 +74,17 @@ sim_pre_argv_init (SIM_DESC sd, const char *myname) while (STATE_MY_NAME (sd) > myname && STATE_MY_NAME (sd)[-1] != '/') --STATE_MY_NAME (sd); + /* Set the cpu names to default values. */ + { + int i; + for (i = 0; i < MAX_NR_PROCESSORS; ++i) + { + const char *name; + asprintf (&name, "cpu%d", i); + CPU_NAME (STATE_CPU (sd, i)) = name; + } + } + /* Install all configured in modules. */ if (sim_module_install (sd) != SIM_RC_OK) return SIM_RC_FAIL; |