From 51700bc139579740582b18e61a2bfb86ee1d6747 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 17 Dec 2017 11:57:34 -0800 Subject: [PATCH] FRONTPANEL: Add BREAK and NOBREAK commands to test program --- frontpanel/FrontPanelTest.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontpanel/FrontPanelTest.c b/frontpanel/FrontPanelTest.c index 6f4ad7b6..0aa80a90 100644 --- a/frontpanel/FrontPanelTest.c +++ b/frontpanel/FrontPanelTest.c @@ -132,7 +132,7 @@ printf (CSI "H"); /* Position to Top of Screen (1,1) */ printf (CSI "2J"); /* Clear Screen */ #endif printf ("\n\n\n\n"); -printf ("^C to Halt, Commands: BOOT, CONT, EXIT\n"); +printf ("^C to Halt, Commands: BOOT, CONT, EXIT, BREAK, NOBREAK\n"); } volatile int halt_cpu = 0; @@ -618,6 +618,14 @@ while (1) { } else if (!strcmp("EXIT", cmd)) goto Done; + else if (!memcmp("BREAK ", cmd, 6)) { + if (sim_panel_break_set (panel, cmd + 6)) + printf("Error Setting Breakpoint '%s': %s\n", cmd + 6, sim_panel_get_error ()); + } + else if (!memcmp("NOBREAK ", cmd, 8)) { + if (sim_panel_break_clear (panel, cmd + 8)) + printf("Error Clearing Breakpoint '%s': %s\n", cmd + 8, sim_panel_get_error ()); + } else printf ("Huh? %s\r\n", cmd); }