Revision 1b530a6d monitor.c
b/monitor.c | ||
---|---|---|
527 | 527 |
cpu_set_log(mask); |
528 | 528 |
} |
529 | 529 |
|
530 |
static void do_singlestep(Monitor *mon, const char *option) |
|
531 |
{ |
|
532 |
if (!option || !strcmp(option, "on")) { |
|
533 |
singlestep = 1; |
|
534 |
} else if (!strcmp(option, "off")) { |
|
535 |
singlestep = 0; |
|
536 |
} else { |
|
537 |
monitor_printf(mon, "unexpected option %s\n", option); |
|
538 |
} |
|
539 |
} |
|
540 |
|
|
530 | 541 |
static void do_stop(Monitor *mon) |
531 | 542 |
{ |
532 | 543 |
vm_stop(EXCP_INTERRUPT); |
... | ... | |
1511 | 1522 |
|
1512 | 1523 |
static void do_info_status(Monitor *mon) |
1513 | 1524 |
{ |
1514 |
if (vm_running) |
|
1515 |
monitor_printf(mon, "VM status: running\n"); |
|
1516 |
else |
|
1525 |
if (vm_running) { |
|
1526 |
if (singlestep) { |
|
1527 |
monitor_printf(mon, "VM status: running (single step mode)\n"); |
|
1528 |
} else { |
|
1529 |
monitor_printf(mon, "VM status: running\n"); |
|
1530 |
} |
|
1531 |
} else |
|
1517 | 1532 |
monitor_printf(mon, "VM status: paused\n"); |
1518 | 1533 |
} |
1519 | 1534 |
|
... | ... | |
1644 | 1659 |
"tag|id", "restore a VM snapshot from its tag or id" }, |
1645 | 1660 |
{ "delvm", "s", do_delvm, |
1646 | 1661 |
"tag|id", "delete a VM snapshot from its tag or id" }, |
1662 |
{ "singlestep", "s?", do_singlestep, |
|
1663 |
"[on|off]", "run emulation in singlestep mode or switch to normal mode", }, |
|
1647 | 1664 |
{ "stop", "", do_stop, |
1648 | 1665 |
"", "stop emulation", }, |
1649 | 1666 |
{ "c|cont", "", do_cont, |
Also available in: Unified diff