1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

FRONTPANEL: Fix support for DEBUG command to allow switches

This commit is contained in:
Mark Pizzolato
2018-01-13 22:03:40 -08:00
parent 34292312a8
commit b23f1d9dd0
2 changed files with 12 additions and 5 deletions

View File

@@ -804,8 +804,14 @@ while (1) {
printf("%s\n", history);
}
else if (match_command ("DEBUG ", cmd, &arg)) {
if (sim_panel_device_debug_mode (panel, arg, 1, NULL))
printf("Error setting debug mode: %s\n", sim_panel_get_error ());
if (arg[0] == '-') {
if (sim_panel_device_debug_mode (panel, NULL, 1, arg))
printf("Error setting debug mode: %s\n", sim_panel_get_error ());
}
else {
if (sim_panel_device_debug_mode (panel, arg, 1, NULL))
printf("Error setting debug mode: %s\n", sim_panel_get_error ());
}
}
else if ((match_command ("EXIT", cmd, NULL)) || (match_command ("QUIT", cmd, NULL)))
goto Done;