Stats output on request.

This commit is contained in:
cdkersey
2015-08-31 22:01:48 -06:00
parent 7765655d65
commit a9dfe00b48
4 changed files with 39 additions and 5 deletions

View File

@@ -207,12 +207,13 @@ int disasm_main(int argc, char **argv) {
int emu_main(int argc, char **argv) {
string archString("8w32/32/8/8"), imgFileName("a.out.bin");
bool showHelp;
bool showHelp, showStats;
/* Read the command line arguments. */
CommandLineArgFlag fh("-h", "--help", "", showHelp);
CommandLineArgSetter<string>fc("-c", "--core", "", imgFileName);
CommandLineArgSetter<string>fa("-a", "--arch", "", archString);
CommandLineArgFlag fs("-s", "--stats", "", showStats);
CommandLineArg::readArgs(argc, argv);
@@ -244,6 +245,8 @@ int emu_main(int argc, char **argv) {
while (core.running()) { console.poll(); core.step(); }
if (showStats) core.printStats();
return 0;
}