CONSOLE: Add debug support for data to/from the console port

Previously console traffic to/from a Telnet connection could be visible
in debug output.
This commit is contained in:
Mark Pizzolato 2017-01-01 16:11:49 -08:00
parent 6eb13f0259
commit 77312ec8ca

View file

@ -2021,6 +2021,8 @@ if (!sim_rem_master_mode) {
if (c && sim_con_ldsc.rxbps) /* got something && rate limiting? */ if (c && sim_con_ldsc.rxbps) /* got something && rate limiting? */
sim_con_ldsc.rxnexttime = /* compute next input time */ sim_con_ldsc.rxnexttime = /* compute next input time */
floor (sim_gtime () + ((sim_con_ldsc.rxdelta * sim_timer_inst_per_sec ())/sim_con_ldsc.rxbpsfactor)); floor (sim_gtime () + ((sim_con_ldsc.rxdelta * sim_timer_inst_per_sec ())/sim_con_ldsc.rxbpsfactor));
if (c)
sim_debug (DBG_RCV, &sim_con_telnet, "sim_poll_kbd() returning: '%c' (0x%02X)\n", sim_isprint (c & 0xFF) ? c & 0xFF : '.', c);
return c; /* in-window */ return c; /* in-window */
} }
if (!sim_con_ldsc.conn) { /* no telnet or serial connection? */ if (!sim_con_ldsc.conn) { /* no telnet or serial connection? */
@ -2047,6 +2049,7 @@ if ((sim_con_tmxr.master == 0) && /* not Telnet? */
(sim_con_ldsc.serport == 0)) { /* and not serial port */ (sim_con_ldsc.serport == 0)) { /* and not serial port */
if (sim_log) /* log file? */ if (sim_log) /* log file? */
fputc (c, sim_log); fputc (c, sim_log);
sim_debug (DBG_XMT, &sim_con_telnet, "sim_putchar('%c' (0x02X)\n", sim_isprint (c) ? c : '.', c);
return sim_os_putchar (c); /* in-window version */ return sim_os_putchar (c); /* in-window version */
} }
if (!sim_con_ldsc.conn) { /* no Telnet or serial connection? */ if (!sim_con_ldsc.conn) { /* no Telnet or serial connection? */