| Newsgroups |
gmane.comp.gnome.mono.patches |
| Message-ID |
<00000141d243eaad-e772c586-64b1-41a1-ae04-26edcd3f85c7-000000@email.amazonses.com> |
Branch: refs/heads/bpDialog2
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/ffd1333594f6...0dc4cf17f52b
Commit: 0dc4cf17f52bc0ab7e560bebdf29336e325de9f7
Author: Ungureanu Marius <[email protected]> (Therzok)
Date: 2013-10-19 19:48:13 GMT
URL: https://github.com/mono/monodevelop/commit/0dc4cf17f52bc0ab7e560bebdf29336e325de9f7
Fixed breakpoints running
Changed paths:
M main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerSession.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.addin.xml
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog2.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/PinnedWatchStore.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
Modified: main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerSession.cs
===================================================================
@@ -280,18 +280,20 @@ void OnBreakpoint (object sender, CorBreakpointEventArgs e)
return;
}
}
- switch (bp.HitAction) {
- case HitAction.CustomAction:
+
+ if ((bp.HitAction & HitAction.CustomAction) != HitAction.None) {
// If custom action returns true, execution must continue
- if (binfo.RunCustomBreakpointAction (bp.CustomActionId))
- return;
- break;
- case HitAction.PrintExpression: {
- string exp = EvaluateTrace (e.Thread, bp.TraceExpression);
- binfo.UpdateLastTraceValue (exp);
+ if (binfo.RunCustomBreakpointAction (bp.CustomActionId))
return;
- }
}
+
+ if ((bp.HitAction & HitAction.PrintExpression) != HitAction.None) {
+ string exp = EvaluateTrace (e.Thread, bp.TraceExpression);
+ binfo.UpdateLastTraceValue (exp);
+ }
+
+ if ((bp.HitAction & HitAction.Break) == HitAction.None)
+ return;
}
OnStopped ();
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.addin.xml
===================================================================
@@ -129,10 +129,6 @@
defaultHandler = "MonoDevelop.Debugger.ToggleBreakpointHandler"
shortcut = "F9"
macShortcut = "Meta|\" />
- <Command id = "MonoDevelop.Debugger.DebugCommands.AddTracepoint"
- _label = "Add Tracepoint"
- defaultHandler = "MonoDevelop.Debugger.AddTracepointHandler"
- shortcut = "Control|Shift|F9" />
<Command id = "MonoDevelop.Debugger.DebugCommands.EnableDisableBreakpoint"
_label = "Enable/Disable Breakpoint"
defaultHandler = "MonoDevelop.Debugger.EnableDisableBreakpointHandler"
@@ -188,7 +184,6 @@
<SeparatorItem id = "MonoDevelop.Debugger.BreakpointsSection" />
<CommandItem id = "MonoDevelop.Debugger.DebugCommands.NewBreakpoint" />
<CommandItem id = "MonoDevelop.Debugger.DebugCommands.ToggleBreakpoint" />
- <CommandItem id = "MonoDevelop.Debugger.DebugCommands.AddTracepoint" />
<CommandItem id = "MonoDevelop.Debugger.DebugCommands.EnableDisableBreakpoint" />
<CommandItem id = "MonoDevelop.Debugger.DebugCommands.DisableAllBreakpoints" />
<CommandItem id = "MonoDevelop.Debugger.DebugCommands.ClearAllBreakpoints" />
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
===================================================================
@@ -385,8 +385,8 @@ public void UpdateDisplay ()
lock (breakpoints) {
foreach (BreakEvent be in breakpoints.GetBreakevents ()) {
string hitCount = be.HitCountMode != HitCountMode.None ? be.CurrentHitCount.ToString () : "";
- string traceExp = be.HitAction == HitAction.PrintExpression ? be.TraceExpression : "";
- string traceVal = be.HitAction == HitAction.PrintExpression ? be.LastTraceValue : "";
+ string traceExp = (be.HitAction & HitAction.PrintExpression) != HitAction.None ? be.TraceExpression : "";
+ string traceVal = (be.HitAction & HitAction.PrintExpression) != HitAction.None ? be.LastTraceValue : "";
string name;
var fb = be as FunctionBreakpoint;
@@ -427,7 +427,7 @@ void OnBreakpointUpdated (object s, BreakpointEventArgs args)
var bp = (BreakEvent) store.GetValue (it, (int) Columns.Breakpoint);
if (bp == args.Breakpoint) {
string hitCount = bp.HitCountMode != HitCountMode.None ? bp.CurrentHitCount.ToString () : "";
- string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
+ string traceVal = (bp.HitAction & HitAction.PrintExpression) != HitAction.None ? bp.LastTraceValue : "";
store.SetValue (it, (int) Columns.HitCount, hitCount);
store.SetValue (it, (int) Columns.LastTrace, traceVal);
break;
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog2.cs
===================================================================
@@ -137,6 +137,7 @@ void Initialize ()
entryFunctionName.Changed += OnUpdateText;
entryLocationFile.Changed += OnUpdateText;
entryExceptionType.Changed += OnUpdateText;
+ entryPrintExpression.Changed += OnUpdateText;
buttonOk.Clicked += OnSave;
}
@@ -200,10 +201,11 @@ void SetInitialData ()
ignoreHitType.SelectedItem = be.HitCountMode;
ignoreHitCount.Value = be.HitCount;
- if (be.HitAction == HitAction.PrintExpression) {
+ if ((be.HitAction & HitAction.PrintExpression) != HitAction.None) {
checkPrintExpression.Active = true;
entryPrintExpression.Text = be.TraceExpression;
}
+ checkResumeExecution.Active |= (be.HitAction & HitAction.Break) == HitAction.None;
} else {
ignoreHitType.SelectedItem = HitCountMode.None;
conditionalHitType.SelectedItem = ConditionalHitWhen.ConditionIsTrue;
@@ -288,12 +290,13 @@ void OnSave (object sender, EventArgs e)
be.HitCountMode = (HitCountMode)ignoreHitType.SelectedItem;
be.HitCount = be.HitCountMode != HitCountMode.None ? (int)ignoreHitCount.Value : 0;
+ be.HitAction = HitAction.None;
if (checkPrintExpression.Active) {
- // FIXME: Make HitAction flags.
- be.HitAction = HitAction.PrintExpression;
+ be.HitAction |= HitAction.PrintExpression;
be.TraceExpression = entryPrintExpression.Text;
}
- be.HitAction = HitAction.Break;
+ if (!checkResumeExecution.Active)
+ be.HitAction |= HitAction.Break;
be.CommitChanges ();
}
@@ -323,6 +326,7 @@ void OnUpdateControls (object sender, EventArgs e)
// Check printing an expression.
entryPrintExpression.Sensitive = checkPrintExpression.Active;
checkResumeExecution.Sensitive = checkPrintExpression.Active;
+ checkResumeExecution.Active &= checkPrintExpression.Active;
// And display warning icons
buttonOk.Sensitive = CheckValidity ();
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
===================================================================
@@ -139,7 +139,7 @@ public static void SetLiveUpdateMode (PinnedWatch watch, bool liveUpdate)
if (liveUpdate) {
Breakpoint bp = new Breakpoint (watch.File, watch.Line);
bp.TraceExpression = "{" + watch.Expression + "}";
- bp.HitAction = HitAction.PrintExpression;
+ bp.HitAction |= HitAction.PrintExpression;
lock (breakpoints)
breakpoints.Add (bp);
pinnedWatches.Bind (watch, bp);
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/PinnedWatchStore.cs
===================================================================
@@ -91,7 +91,8 @@ internal void BindAll (BreakpointStore bps)
lock (watches) {
foreach (PinnedWatch w in watches) {
foreach (Breakpoint bp in bps.GetBreakpoints ()) {
- if (bp.HitAction == HitAction.PrintExpression && bp.TraceExpression == "{" + w.Expression + "}" && bp.FileName == w.File && bp.Line == w.Line)
+ if ((bp.HitAction & HitAction.PrintExpression) != HitAction.None &&
+ bp.TraceExpression == "{" + w.Expression + "}" && bp.FileName == w.File && bp.Line == w.Line)
Bind (w, bp);
}
}
Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
===================================================================
@@ -1308,7 +1308,7 @@ void AddBreakpoint (Breakpoint bp)
if (fp.FullPath == bp.FileName) {
DocumentLine line = widget.TextEditor.Document.GetLine (bp.Line);
var status = bp.GetStatus (DebuggingService.DebuggerSession);
- bool tracepoint = bp.HitAction != HitAction.Break;
+ bool tracepoint = (bp.HitAction & HitAction.Break) == HitAction.None;
if (line == null)
return;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches