From 77312ec8ca534fc46ddf11dae0352ad8dc35c9ed Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 1 Jan 2017 16:11:49 -0800 Subject: [PATCH] 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. --- sim_console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sim_console.c b/sim_console.c index 86f6fe00..105287bf 100644 --- a/sim_console.c +++ b/sim_console.c @@ -2021,6 +2021,8 @@ if (!sim_rem_master_mode) { if (c && sim_con_ldsc.rxbps) /* got something && rate limiting? */ sim_con_ldsc.rxnexttime = /* compute next input time */ 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 */ } 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 */ if (sim_log) /* log file? */ 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 */ } if (!sim_con_ldsc.conn) { /* no Telnet or serial connection? */