diff --git a/scp.c b/scp.c index e20c3edd..03bed4f6 100644 --- a/scp.c +++ b/scp.c @@ -335,6 +335,7 @@ static DEBTAB scp_debug[] = { {"DO", SIM_DBG_DO, "Do Command/Expansion Activities"}, {"SAVE", SIM_DBG_SAVE, "Save Activities"}, {"RESTORE", SIM_DBG_RESTORE, "Restore Activities"}, + {"INIT", SIM_DBG_INIT, "Initialization Activities"}, {0} }; @@ -2985,6 +2986,18 @@ if (argc > 1) { /* Check for special arg --argc; } } +if (argc > 1) { /* Check for special argument to turn on debug during initialization code */ + if (sim_strcasecmp (argv[1], "DebugInit") == 0) { + sim_scp_dev.dctrl = SIM_DBG_INIT; + sim_switches |= SWMASK ('F'); + sim_set_debon (1, "STDOUT"); + sim_switches &= ~SWMASK ('F'); + /* Remove special argument to avoid confusion later */ + for (i = 1; i < argc; i++) + argv[i] = argv[i+1]; + --argc; + } + } for (i = 1; i < argc; i++) { /* loop thru args */ if (argv[i] == NULL) /* paranoia */ continue; diff --git a/sim_scp_private.h b/sim_scp_private.h index c67813a7..141181e4 100644 --- a/sim_scp_private.h +++ b/sim_scp_private.h @@ -197,6 +197,8 @@ extern volatile t_bool sim_idle_wait; extern int32 sim_asynch_check; extern int32 sim_asynch_latency; extern int32 sim_asynch_inst_latency; +extern DEVICE sim_scp_dev; +#define SIM_DBG_INIT 0x00200000 /* initialization activities */ /* Thread local storage */ #if defined(thread_local)