From 7b4d2073fe3adaed3eb92573f7e13dc127630268 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 15 Sep 2013 17:18:14 -0700 Subject: [PATCH] SCP: Added display of all enabled devices which have debugging enabled to the SHOW DEBUG command output. --- sim_console.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sim_console.c b/sim_console.c index 94149649..49c99808 100644 --- a/sim_console.c +++ b/sim_console.c @@ -1111,6 +1111,8 @@ return SCPE_OK; t_stat sim_show_debug (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) { +int32 i; + if (cptr && (*cptr != 0)) return SCPE_2MARG; if (sim_deb) { @@ -1122,6 +1124,14 @@ if (sim_deb) { fprintf (st, " Debug messages display time of day as hh:mm:ss.msec%s\n", sim_deb_switches & SWMASK ('R') ? " relative to the start of debugging" : ""); if (sim_deb_switches & SWMASK ('A')) fprintf (st, " Debug messages display time of day as seconds.msec%s\n", sim_deb_switches & SWMASK ('R') ? " relative to the start of debugging" : ""); + for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { + if (!(dptr->flags & DEV_DIS) && + (dptr->flags & DEV_DEBUG) && + (dptr->dctrl)) { + fprintf (st, "Device: %-6s ", dptr->name); + show_dev_debug (st, dptr, NULL, 0, NULL); + } + } } else fprintf (st, "Debug output disabled\n"); return SCPE_OK;