Permalink
Browse files

Only auto-insert the MainMethodBreakpoint if we're running the CLI.

2009-11-25  Martin Baulig  <martin@ximian.com>

	* classes/DebuggerConfiguration.cs
	(DebuggerConfiguration.IsCLI): New public property to check
	whether we're running the CLI or a GUI.

	* classes/DebuggerSession.cs
	(DebuggerSession.ctor): Only auto-insert the
	`MainMethodBreakpoint' in the CLI.

svn path=/trunk/debugger/; revision=147678
  • Loading branch information...
1 parent c3359c9 commit aef4b91899def84d86e3afcd3d1766b816f7f816 Martin Baulig committed Dec 4, 2009
Showing with 26 additions and 1 deletion.
  1. +10 −0 ChangeLog
  2. +10 −0 classes/DebuggerConfiguration.cs
  3. +2 −1 classes/DebuggerSession.cs
  4. +2 −0 frontend/Main.cs
  5. +2 −0 test/framework/DebuggerTestFixture.cs
View
@@ -1,3 +1,13 @@
+2009-11-25 Martin Baulig <martin@ximian.com>
+
+ * classes/DebuggerConfiguration.cs
+ (DebuggerConfiguration.IsCLI): New public property to check
+ whether we're running the CLI or a GUI.
+
+ * classes/DebuggerSession.cs
+ (DebuggerSession.ctor): Only auto-insert the
+ `MainMethodBreakpoint' in the CLI.
+
2009-11-25 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
@@ -81,6 +81,11 @@ public void SetupXSP ()
is_xsp = true;
}
+ public void SetupCLI ()
+ {
+ is_cli = true;
+ }
+
void LoadConfigurationFromStream (string filename)
{
if (File.Exists (filename)) {
@@ -247,6 +252,7 @@ void SaveConfigurationToStream (string filename)
bool nested_break_states = false;
bool redirect_output = false;
bool is_xsp = false;
+ bool is_cli = false;
ThreadingModel threading_model = ThreadingModel.Default;
Hashtable module_groups;
Dictionary<string,string> directory_maps;
@@ -392,6 +398,10 @@ internal ModuleGroup GetModuleGroup (SymbolFile symfile)
get { return hide_auto_generated; }
}
+ public bool IsCLI {
+ get { return is_cli; }
+ }
+
public bool IsXSP {
get { return is_xsp; }
}
@@ -87,7 +87,8 @@ private DebuggerSession (DebuggerConfiguration config, string name)
this.Options = options;
this.parser = parser;
- AddEvent (new MainMethodBreakpoint (this));
+ if (config.IsCLI)
+ AddEvent (new MainMethodBreakpoint (this));
}
protected DebuggerSession (DebuggerConfiguration config, Process process, DebuggerOptions options,
View
@@ -79,6 +79,8 @@ internal CommandLineInterpreter (DebuggerOptions options, bool is_interactive)
Configuration.LoadConfiguration ();
#endif
+ Configuration.SetupCLI ();
+
interpreter = new Interpreter (is_interactive, Configuration, options);
interpreter.CLI = this;
@@ -247,6 +247,8 @@ protected DebuggerTestFixture (string exe_file, string src_file, params string[]
config = new DebuggerConfiguration ();
config.RedirectOutput = true;
+ config.SetupCLI ();
+
options = CreateOptions (ExeFileName, args);
inferior_stdout = new LineReader ();

0 comments on commit aef4b91

Please sign in to comment.