Add -debug flag to shell. Will cause it to generate debug for compiled class
files. git-svn-id: svn://10.0.0.236/trunk@224694 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -59,7 +59,8 @@ msg.shell.usage =\
|
||||
\ -version 100|110|120|130|140|150|160\n\
|
||||
\ -opt [-1|0-9]\n\
|
||||
\ -f script-filename\n\
|
||||
\ -e script-source
|
||||
\ -e script-source\n\
|
||||
\ -debug
|
||||
|
||||
|
||||
msg.help =\
|
||||
|
||||
@@ -280,6 +280,10 @@ public class Main
|
||||
global.setSealedStdLib(true);
|
||||
continue;
|
||||
}
|
||||
if (arg.equals("-debug")) {
|
||||
shellContextFactory.setGeneratingDebug(true);
|
||||
continue;
|
||||
}
|
||||
usageError = arg;
|
||||
break goodUsage;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ public class ShellContextFactory extends ContextFactory
|
||||
private boolean strictMode;
|
||||
private int languageVersion;
|
||||
private int optimizationLevel;
|
||||
private boolean generatingDebug;
|
||||
private ErrorReporter errorReporter;
|
||||
|
||||
protected boolean hasFeature(Context cx, int featureIndex)
|
||||
@@ -64,6 +65,7 @@ public class ShellContextFactory extends ContextFactory
|
||||
if (errorReporter != null) {
|
||||
cx.setErrorReporter(errorReporter);
|
||||
}
|
||||
cx.setGeneratingDebug(generatingDebug);
|
||||
super.onContextCreated(cx);
|
||||
}
|
||||
|
||||
@@ -93,4 +95,8 @@ public class ShellContextFactory extends ContextFactory
|
||||
this.errorReporter = errorReporter;
|
||||
}
|
||||
|
||||
public void setGeneratingDebug(boolean generatingDebug)
|
||||
{
|
||||
this.generatingDebug = generatingDebug;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user