[mono/monodevelop] 49b6e0e0: [Debugger] Implement usage of include subclasses tick.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000141e1cc9bdc-6fa96c7c-f574-4196-a962-f000fb738af1-000000@email.amazonses.com> |
Branch: refs/heads/bpDialog2
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/e952eeafdcfc...49b6e0e021fb
Commit: 49b6e0e021fb563676d3189aa5034209ba28df22
Author: Therzok <[email protected]> (Therzok)
Date: 2013-10-22 20:02:08 GMT
URL: https://github.com/mono/monodevelop/commit/49b6e0e021fb563676d3189aa5034209ba28df22
[Debugger] Implement usage of include subclasses tick.
Changed paths:
M main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerSession.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs
Modified: main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerSession.cs
===================================================================
@@ -506,17 +506,26 @@ private bool IsCatchpoint (CorException2EventArgs e)
{
// Build up the exception type hierachy
CorValue v = e.Thread.CurrentException;
- List<string> exceptions = new List<string>();
+ var exceptions = new HashSet<string>();
+
CorType t = v.ExactType;
+ string baseName = t.GetTypeInfo (this).FullName;
while (t != null) {
- exceptions.Add(t.GetTypeInfo(this).FullName);
+ exceptions.Add (t.GetTypeInfo (this).FullName);
t = t.Base;
}
// See if a catchpoint is set for this exception.
foreach (Catchpoint cp in Breakpoints.GetCatchpoints()) {
- if (cp.Enabled && exceptions.Contains(cp.ExceptionName)) {
- return true;
+ if (cp.Enabled) {
+ if (cp.IncludeSubclasses) {
+ if (exceptions.Contains (cp.ExceptionName))
+ return true;
+ continue;
+ }
+
+ if (baseName == cp.ExceptionName)
+ return true;
}
}
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs
===================================================================
@@ -195,10 +195,6 @@ void SetInitialCatchpointData (Catchpoint cp)
void SetInitialData ()
{
- // FIXME: Add support for not doing base add
- checkIncludeSubclass.Active = true;
- checkIncludeSubclass.Sensitive = false;
-
if (be != null) {
stopOnException.Sensitive = false;
stopOnFunction.Sensitive = false;
@@ -271,7 +267,7 @@ void OnSave (object sender, EventArgs e)
else if (stopOnLocation.Active)
be = new Breakpoint (entryLocationFile.Text, Int32.Parse (entryLocationLine.Text), Int32.Parse (entryLocationColumn.Text));
else if (stopOnException.Active)
- be = new Catchpoint (entryExceptionType.Text);
+ be = new Catchpoint (entryExceptionType.Text, checkIncludeSubclass.Active);
else
return;
}
@@ -305,8 +301,7 @@ void OnUpdateControls (object sender, EventArgs e)
hboxLineColumn.Sensitive = stopOnLocation.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
hboxLocation.Sensitive = stopOnLocation.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
hboxException.Sensitive = stopOnException.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Catchpoints);
- // FIXME: Add support for not doing base add
- //checkIncludeSubclass.Sensitive = stopOnException.Active;
+ checkIncludeSubclass.Sensitive = stopOnException.Active;
hboxCondition.Sensitive = !stopOnException.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.ConditionalBreakpoints);
// Check conditional
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches