1
0
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:
Mark Pizzolato
2023-08-29 13:15:19 -10:00
parent 8bb567a028
commit 61e31a6e0e
2 changed files with 15 additions and 0 deletions

13
scp.c
View File

@@ -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;

View File

@@ -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)