diff options
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; |