[Scummvm-cvs-logs] SF.net SVN: scummvm:[50243] tools/branches/gsoc2010-decompiler/decompiler/ decompiler.cpp

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Fri Jun 25 00:26:17 CEST 2010


Revision: 50243
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50243&view=rev
Author:   pidgeot
Date:     2010-06-24 22:26:17 +0000 (Thu, 24 Jun 2010)

Log Message:
-----------
Add option to stop decompiler after disassembly

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp

Modified: tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp	2010-06-24 22:00:45 UTC (rev 50242)
+++ tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp	2010-06-24 22:26:17 UTC (rev 50243)
@@ -51,7 +51,8 @@
 			("engine,e", po::value<std::string>(), "Engine the script originates from.")
 			("list,l", "List the supported engines.")
 			("dump-disassembly,d", po::value<std::string>()->implicit_value(""), "Dump the disassembly to a file. Leave out filename to output to stdout.")
-			("dump-graph,g", po::value<std::string>()->implicit_value(""), "Output the control flow graph in dot format to a file. Leave out filename to output to stdout.");
+			("dump-graph,g", po::value<std::string>()->implicit_value(""), "Output the control flow graph in dot format to a file. Leave out filename to output to stdout.")
+			("only-disassembly,o", "Stops after disassembly. Implies -d.");
 
 		po::options_description args("");
 		args.add(visible).add_options()
@@ -116,6 +117,13 @@
 			disassembler->dumpDisassembly(out);
 		}
 
+		if (vm.count("only-disassembly")) {
+			if (!vm.count("dump-disassembly")) {
+				disassembler->dumpDisassembly(std::cout);
+			}
+			return 0;
+		}
+
 		delete disassembler;
 
 		// Control flow analysis


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list