mirror of
https://github.com/simh/simh.git
synced 2026-03-02 17:55:17 +00:00
SCP: Add option to turn debugging on for SCP initialization activities
This commit is contained in:
13
scp.c
13
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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user