Browse Source

Eval.CreateValue sets Value.ExpressionTree more correctly so that Expression.PrettyPrint does not result in stack overflow anymore.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4721 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Martin Koníček 16 years ago
parent
commit
7ac6e8b962
  1. 3
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/ObjectGraphPad.cs
  2. 7
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  3. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraphControl.xaml.cs
  4. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs
  5. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs
  6. 3
      src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.cs

3
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/ObjectGraphPad.cs

@ -47,10 +47,9 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
public override void RefreshPad() public override void RefreshPad()
{ {
// BUG: if pad window is undocked and floats standalone, IsVisible == false (so pad won't refresh) // BUG: if pad window is undocked and floats standalone, IsVisible == false (so pad won't refresh)
// REQUEST: need to refresh pad // REQUEST: need to refresh when pad becomes visible -> VisibleChanged event?
if (!this.IsVisible) if (!this.IsVisible)
{ {
LoggingService.Info("skipped refresh");
return; return;
} }
if (debuggedProcess == null || debuggedProcess.IsRunning || debuggedProcess.SelectedStackFrame == null) { if (debuggedProcess == null || debuggedProcess.IsRunning || debuggedProcess.SelectedStackFrame == null) {

7
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -180,8 +180,8 @@ namespace ICSharpCode.SharpDevelop.Services
DebugStarting(this, EventArgs.Empty); DebugStarting(this, EventArgs.Empty);
Process process = debugger.Start(processStartInfo.FileName, Process process = debugger.Start(processStartInfo.FileName,
processStartInfo.WorkingDirectory, processStartInfo.WorkingDirectory,
processStartInfo.Arguments); processStartInfo.Arguments);
SelectProcess(process); SelectProcess(process);
} }
} }
@ -384,8 +384,7 @@ namespace ICSharpCode.SharpDevelop.Services
try { try {
Value val = GetValueFromName(variableName); Value val = GetValueFromName(variableName);
if (val == null) return null; if (val == null) return null;
//expressionNode = new ExpressionNode(ExpressionNode.GetImageForLocalVariable(), variableName, val.ExpressionTree); expressionNode = new ExpressionNode(ExpressionNode.GetImageForLocalVariable(), variableName, val.ExpressionTree);
expressionNode = new ExpressionNode(null, variableName, val.ExpressionTree);
} catch (GetValueException) { } catch (GetValueException) {
return null; return null;
} }

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraphControl.xaml.cs

@ -117,7 +117,7 @@ namespace Debugger.AddIn.Visualizers.Graph
catch(Debugger.GetValueException ex) catch(Debugger.GetValueException ex)
{ {
graphBuiltOk = false; graphBuiltOk = false;
showErrorMessage("Cannot evaluate: " + ex.Message); showErrorMessage("Expression cannot be evaluated - " + ex.Message);
} }
if (graphBuiltOk) if (graphBuiltOk)
{ {

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs

@ -282,7 +282,7 @@ namespace Debugger
// TODO: Check if it is primitive type // TODO: Check if it is primitive type
Value val = Eval.NewObjectNoConstructor(DebugType.CreateFromType(appDomain, value.GetType())); Value val = Eval.NewObjectNoConstructor(DebugType.CreateFromType(appDomain, value.GetType()));
val.PrimitiveValue = value; val.PrimitiveValue = value;
val.ExpressionTree = new PrimitiveExpression(val); val.ExpressionTree = new PrimitiveExpression(value);
return val; return val;
} }
} }

4
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Process-StateControl.cs

@ -32,11 +32,11 @@ namespace Debugger
if (Paused != null) { if (Paused != null) {
foreach(Delegate d in Paused.GetInvocationList()) { foreach(Delegate d in Paused.GetInvocationList()) {
if (IsRunning) { if (IsRunning) {
TraceMessage ("Skipping OnPaused delegate becuase process has resumed"); TraceMessage ("Skipping OnPaused delegate because process has resumed");
break; break;
} }
if (this.TerminateCommandIssued || this.HasExited) { if (this.TerminateCommandIssued || this.HasExited) {
TraceMessage ("Skipping OnPaused delegate becuase process has exited"); TraceMessage ("Skipping OnPaused delegate because process has exited");
break; break;
} }
d.DynamicInvoke(this, new ProcessEventArgs(this)); d.DynamicInvoke(this, new ProcessEventArgs(this));

3
src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.cs

@ -35,6 +35,9 @@ namespace ICSharpCode.SharpDevelop.Debugging
} }
clickedCommand.Execute(); clickedCommand.Execute();
// make no item selected, so that multiple selections of the same item always execute the command
// this triggers VisualizerPicker_SelectionChanged again, which returns immediately
this.SelectedIndex = -1;
} }
public new IEnumerable<IVisualizerCommand> ItemsSource public new IEnumerable<IVisualizerCommand> ItemsSource

Loading…
Cancel
Save