Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'decompiler' of https://github.com/icsharpcode/SharpDevelop
  • Loading branch information
eusebiu committed Jul 25, 2011
2 parents 96e2386 + e9913b7 commit 359eded
Show file tree
Hide file tree
Showing 546 changed files with 250,552 additions and 1,623 deletions.
538 changes: 300 additions & 238 deletions SharpDevelop.sln

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj
Expand Up @@ -353,6 +353,15 @@
<Name>ICSharpCode.AvalonEdit</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj">
<Project>{984CC812-9470-4A13-AFF9-CC44068D666C}</Project>
<Name>ICSharpCode.Decompiler</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\Mono.Cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
Expand Down
12 changes: 9 additions & 3 deletions src/AddIns/Debugger/Debugger.AddIn/Pads/ConsolePad.cs
Expand Up @@ -52,7 +52,8 @@ string Evaluate(string code)
return "The process is running";
}
try {
Value val = ExpressionEvaluator.Evaluate(code, SelectedLanguage, process.SelectedStackFrame);
var context = !process.IsInExternalCode ? process.SelectedStackFrame : process.SelectedThread.MostRecentStackFrame;
Value val = ExpressionEvaluator.Evaluate(code, SelectedLanguage, context);
return ExpressionEvaluator.FormatValue(val);
} catch (GetValueException e) {
return e.Message;
Expand Down Expand Up @@ -107,7 +108,8 @@ protected override void AbstractConsolePadTextEntered(object sender, TextComposi
if (this.process == null || this.process.IsRunning)
return;

if (this.process.SelectedStackFrame == null || this.process.SelectedStackFrame.NextStatement == null)
var context = !process.IsInExternalCode ? process.SelectedStackFrame : process.SelectedThread.MostRecentStackFrame;
if (context == null)
return;

foreach (char ch in e.Text) {
Expand All @@ -119,7 +121,11 @@ protected override void AbstractConsolePadTextEntered(object sender, TextComposi

void ShowDotCompletion(string currentText)
{
var seg = process.SelectedStackFrame.NextStatement;
var context = !process.IsInExternalCode ? process.SelectedStackFrame : process.SelectedThread.MostRecentStackFrame;
if (context == null)
return;

var seg = context.NextStatement;

var expressionFinder = ParserService.GetExpressionFinder(seg.Filename);
var info = ParserService.GetParseInformation(seg.Filename);
Expand Down
3 changes: 2 additions & 1 deletion src/AddIns/Debugger/Debugger.AddIn/Pads/LocalVarPad.cs
Expand Up @@ -65,7 +65,8 @@ public override void RefreshPad()
using(new PrintTimes("Local Variables refresh")) {
try {
Utils.DoEvents(debuggedProcess);
foreach (var item in new StackFrameNode(debuggedProcess.SelectedStackFrame).ChildNodes) {
var frame = !debuggedProcess.IsInExternalCode ? debuggedProcess.SelectedStackFrame : debuggedProcess.SelectedThread.MostRecentStackFrame;
foreach (var item in new StackFrameNode(frame).ChildNodes) {
localVarList.WatchItems.Add(item);
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs
Expand Up @@ -170,25 +170,25 @@ public override void RefreshPad()
Utils.DoEvents(debuggedProcess);
List<TreeNode> nodes = new List<TreeNode>();

foreach (var nod in watchList.WatchItems) {
foreach (var node in watchList.WatchItems) {
try {
LoggingService.Info("Evaluating: " + (string.IsNullOrEmpty(nod.Name) ? "is null or empty!" : nod.Name));
var nodExpression = debugger.GetExpression(nod.Name);
LoggingService.Info("Evaluating: " + (string.IsNullOrEmpty(node.Name) ? "is null or empty!" : node.Name));
var nodExpression = debugger.GetExpression(node.Name);
//Value val = ExpressionEvaluator.Evaluate(nod.Name, nod.Language, debuggedProcess.SelectedStackFrame);
ExpressionNode valNode = new ExpressionNode(null, nod.Name, nodExpression);
ExpressionNode valNode = new ExpressionNode(null, node.Name, nodExpression);
nodes.Add(valNode);
}
catch (GetValueException) {
string error = String.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.InvalidExpression}"), nod.Name);
ErrorInfoNode infoNode = new ErrorInfoNode(nod.Name, error);
string error = String.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.InvalidExpression}"), node.Name);
ErrorInfoNode infoNode = new ErrorInfoNode(node.Name, error);
nodes.Add(infoNode);
}
}

// rebuild list
watchList.WatchItems.Clear();
foreach (var nod in nodes)
watchList.WatchItems.Add(nod);
foreach (var node in nodes)
watchList.WatchItems.Add(node);
}
catch(AbortedBecauseDebuggeeResumedException) { }
catch(Exception ex) {
Expand Down

0 comments on commit 359eded

Please sign in to comment.