mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
* 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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user