@@ -52,6 +52,7 @@ void create_parser(QCommandLineParser &p) {
5252 " all registers." ,
5353 " REG" });
5454 p.addOption ({ " dump-to-json" , " Configure reportor dump to json file." , " FNAME" });
55+ p.addOption ({ " only-dump" , " Do not start the processor." });
5556 p.addOption ({ " disable-console-dump" , " Configure reporter not to dump to console." });
5657 p.addOption ({ { " dump-registers" , " d-regs" }, " Dump registers state at program exit." });
5758 p.addOption ({ " dump-cache-stats" , " Dump cache statistics at program exit." });
@@ -548,7 +549,11 @@ int main(int argc, char *argv[]) {
548549
549550 load_ranges (machine, p.values (" load-range" ));
550551
551- // QTimer::singleShot(0, &machine, &Machine::play); alternative
552- QMetaObject::invokeMethod (&machine, &Machine::play, Qt::QueuedConnection);
552+ if (p.isSet (" only-dump" )) {
553+ QMetaObject::invokeMethod (&machine, &Machine::program_exit, Qt::QueuedConnection);
554+ } else {
555+ // QTimer::singleShot(0, &machine, &Machine::play); alternative
556+ QMetaObject::invokeMethod (&machine, &Machine::play, Qt::QueuedConnection);
557+ }
553558 return QCoreApplication::exec ();
554559}
0 commit comments