mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Implement a -trace command line option and a trace option in the interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+5
-1
@@ -14,12 +14,15 @@ cl::StringList InputArgv("" , "Input command line", cl::ConsumeAfter);
|
||||
cl::String MainFunction ("f" , "Function to execute", cl::NoFlags, "main");
|
||||
cl::Flag DebugMode ("debug" , "Start program in debugger");
|
||||
cl::Alias DebugModeA ("d" , "Alias for -debug", cl::NoFlags, DebugMode);
|
||||
cl::Flag TraceMode ("trace" , "Enable Tracing");
|
||||
cl::Flag ProfileMode ("profile", "Enable Profiling [unimp]");
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Interpreter ctor - Initialize stuff
|
||||
//
|
||||
Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), CurFrame(-1) {
|
||||
Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode),
|
||||
Trace(TraceMode), CurFrame(-1) {
|
||||
CurMod = 0;
|
||||
loadModule(InputArgv.size() ? InputArgv[0] : "");
|
||||
|
||||
@@ -46,6 +49,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
// If running with the profiler, enable it now...
|
||||
if (ProfileMode) I.enableProfiling();
|
||||
if (TraceMode) I.enableTracing();
|
||||
|
||||
// Start interpreter into the main function...
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user