Browse Source

Rename Function to StackFrame

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2784 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
fc672f7a57
  1. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj
  2. 6
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs
  3. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/LocalVarPad.cs
  4. 6
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs
  5. 12
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  6. 18
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Variables/StackFrameItem.cs
  7. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  8. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs
  9. 14
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs
  10. 10
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs
  11. 14
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
  12. 56
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs
  13. 20
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Stepper.cs
  14. 85
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs
  15. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs
  16. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/EvaluateAstVisitor.cs
  17. 8
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Create.cs
  18. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Evaluate.cs
  19. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/Value.Object.cs
  20. 74
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs
  21. 24
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.xml
  22. 36
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.xml
  23. 38
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.xml
  24. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.xml
  25. 48
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.xml
  26. 54
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.xml

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj

@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
<Compile Include="Src\Variables\FixedItem.cs" />
<Compile Include="Src\Variables\ListItem.cs" />
<Compile Include="Src\Variables\ListItemEventArgs.cs" />
<Compile Include="Src\Variables\FunctionItem.cs" />
<Compile Include="Src\Variables\StackFrameItem.cs" />
<Compile Include="Src\Variables\TreeViewNode.cs" />
<Compile Include="Src\Variables\ValueItem.cs" />
</ItemGroup>

6
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs

@ -106,10 +106,10 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -106,10 +106,10 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
void CallStackListItemActivate(object sender, EventArgs e)
{
if (debuggedProcess.IsPaused) {
Function f = (Function)(callStackList.SelectedItems[0].Tag);
StackFrame f = (StackFrame)(callStackList.SelectedItems[0].Tag);
if (f.HasSymbols) {
if (debuggedProcess.SelectedThread != null) {
debuggedProcess.SelectedThread.SelectedFunction = f;
debuggedProcess.SelectedThread.SelectedStackFrame = f;
debuggedProcess.OnDebuggeeStateChanged(); // Force refresh of pads
}
} else {
@ -131,7 +131,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -131,7 +131,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
callStackList.BeginUpdate();
callStackList.Items.Clear();
if (debuggedProcess != null && debuggedProcess.SelectedThread != null && debuggedProcess.IsPaused) {
foreach (Function f in debuggedProcess.SelectedThread.Callstack) {
foreach (StackFrame f in debuggedProcess.SelectedThread.Callstack) {
ListViewItem item;
if (f.HasSymbols || showExternalMethods) {
// Show the method in the list

4
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/LocalVarPad.cs

@ -176,8 +176,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -176,8 +176,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
public override void RefreshPad()
{
DateTime start = Debugger.Util.HighPrecisionTimer.Now;
if (debuggedProcess != null && debuggedProcess.SelectedFunction != null) {
TreeViewNode.UpdateNodes(localVarList, localVarList.Root.Children, new FunctionItem(debuggedProcess.SelectedFunction).SubItems);
if (debuggedProcess != null && debuggedProcess.SelectedStackFrame != null) {
TreeViewNode.UpdateNodes(localVarList, localVarList.Root.Children, new StackFrameItem(debuggedProcess.SelectedStackFrame).SubItems);
} else {
TreeViewNode.UpdateNodes(localVarList, localVarList.Root.Children, new ListItem[0]);
}

6
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs

@ -159,11 +159,11 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -159,11 +159,11 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
item.Text = thread.ID.ToString();
item.Tag = thread;
item.SubItems.Add(thread.Name);
Function location = null;
StackFrame location = null;
if (thread.Process.IsPaused) {
location = thread.LastFunctionWithLoadedSymbols;
location = thread.LastStackFrameWithLoadedSymbols;
if (location == null) {
location = thread.LastFunction;
location = thread.LastStackFrame;
}
}
if (location != null) {

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

@ -198,7 +198,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -198,7 +198,7 @@ namespace ICSharpCode.SharpDevelop.Services
MessageService.ShowMessage(errorNotDebugging, "${res:XML.MainMenu.DebugMenu.StepInto}");
return;
}
if (debuggedProcess.SelectedFunction == null || debuggedProcess.IsRunning) {
if (debuggedProcess.SelectedStackFrame == null || debuggedProcess.IsRunning) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepInto}");
} else {
debuggedProcess.StepInto();
@ -211,7 +211,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -211,7 +211,7 @@ namespace ICSharpCode.SharpDevelop.Services
MessageService.ShowMessage(errorNotDebugging, "${res:XML.MainMenu.DebugMenu.StepOver}");
return;
}
if (debuggedProcess.SelectedFunction == null || debuggedProcess.IsRunning) {
if (debuggedProcess.SelectedStackFrame == null || debuggedProcess.IsRunning) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepOver}");
} else {
debuggedProcess.StepOver();
@ -224,7 +224,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -224,7 +224,7 @@ namespace ICSharpCode.SharpDevelop.Services
MessageService.ShowMessage(errorNotDebugging, "${res:XML.MainMenu.DebugMenu.StepOut}");
return;
}
if (debuggedProcess.SelectedFunction == null || debuggedProcess.IsRunning) {
if (debuggedProcess.SelectedStackFrame == null || debuggedProcess.IsRunning) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepOut}");
} else {
debuggedProcess.StepOut();
@ -289,8 +289,8 @@ namespace ICSharpCode.SharpDevelop.Services @@ -289,8 +289,8 @@ namespace ICSharpCode.SharpDevelop.Services
public bool CanSetInstructionPointer(string filename, int line, int column)
{
if (debuggedProcess != null && debuggedProcess.IsPaused && debuggedProcess.SelectedFunction != null) {
SourcecodeSegment seg = debuggedProcess.SelectedFunction.CanSetIP(filename, line, column);
if (debuggedProcess != null && debuggedProcess.IsPaused && debuggedProcess.SelectedStackFrame != null) {
SourcecodeSegment seg = debuggedProcess.SelectedStackFrame.CanSetIP(filename, line, column);
return seg != null;
} else {
return false;
@ -300,7 +300,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -300,7 +300,7 @@ namespace ICSharpCode.SharpDevelop.Services
public bool SetInstructionPointer(string filename, int line, int column)
{
if (CanSetInstructionPointer(filename, line, column)) {
SourcecodeSegment seg = debuggedProcess.SelectedFunction.SetIP(filename, line, column);
SourcecodeSegment seg = debuggedProcess.SelectedStackFrame.SetIP(filename, line, column);
return seg != null;
} else {
return false;

18
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Variables/FunctionItem.cs → src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Variables/StackFrameItem.cs

@ -42,13 +42,13 @@ using System.Collections.Generic; @@ -42,13 +42,13 @@ using System.Collections.Generic;
namespace Debugger
{
public class FunctionItem: ListItem
public class StackFrameItem: ListItem
{
Function function;
StackFrame stackFrame;
public Function Function {
public StackFrame StackFrame {
get {
return function;
return stackFrame;
}
}
@ -60,7 +60,7 @@ namespace Debugger @@ -60,7 +60,7 @@ namespace Debugger
public override string Name {
get {
return function.MethodInfo.Name;
return stackFrame.MethodInfo.Name;
}
}
@ -91,17 +91,17 @@ namespace Debugger @@ -91,17 +91,17 @@ namespace Debugger
public override IList<ListItem> SubItems {
get {
List<ListItem> ret = new List<ListItem>();
foreach(Value val in function.LocalVariables) {
foreach(Value val in stackFrame.LocalVariables) {
ret.Add(new ValueItem(val));
}
return ret.AsReadOnly();
}
}
public FunctionItem(Function function)
public StackFrameItem(StackFrame stackFrame)
{
this.function = function;
this.function.Process.DebuggeeStateChanged += delegate {
this.stackFrame = stackFrame;
this.stackFrame.Process.DebuggeeStateChanged += delegate {
this.OnChanged(new ListItemEventArgs(this));
};
}

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -203,7 +203,7 @@ @@ -203,7 +203,7 @@
<Compile Include="Src\Threads\Exception.cs" />
<Compile Include="Src\Threads\ExceptionType.cs" />
<Compile Include="Src\Threads\FrameID.cs" />
<Compile Include="Src\Threads\Function.cs" />
<Compile Include="Src\Threads\StackFrame.cs" />
<Compile Include="Src\Threads\NDebugger-Processes.cs" />
<Compile Include="Src\Threads\Process-Threads.cs" />
<Compile Include="Src\Threads\Process.cs" />

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs

@ -115,14 +115,14 @@ namespace Debugger @@ -115,14 +115,14 @@ namespace Debugger
stepper.OnStepComplete();
if (stepper.PauseWhenComplete) {
if (process.SelectedThread.LastFunction.HasSymbols) {
if (process.SelectedThread.LastStackFrame.HasSymbols) {
ExitCallback_Paused();
} else {
// This can only happen when JMC is disabled (ie NET1.1 or StepOut)
if (stepper.Operation == Stepper.StepperOperation.StepOut) {
// Create new stepper and keep going
process.TraceMessage(" - stepping out of code without symbols at " + process.SelectedThread.LastFunction.ToString());
new Stepper(process.SelectedThread.LastFunction, "Stepper out of code without symbols").StepOut();
process.TraceMessage(" - stepping out of code without symbols at " + process.SelectedThread.LastStackFrame.ToString());
new Stepper(process.SelectedThread.LastStackFrame, "Stepper out of code without symbols").StepOut();
ExitCallback_Continue();
} else {
// NET1.1: There is extra step over stepper, just keep going

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

@ -62,12 +62,12 @@ namespace Debugger @@ -62,12 +62,12 @@ namespace Debugger
}
}
public Function SelectedFunction {
public StackFrame SelectedStackFrame {
get {
if (SelectedThread == null) {
return null;
} else {
return SelectedThread.SelectedFunction;
return SelectedThread.SelectedStackFrame;
}
}
}
@ -99,12 +99,12 @@ namespace Debugger @@ -99,12 +99,12 @@ namespace Debugger
}
if (this.SelectedThread != null) {
// Disable all steppers - do not Deactivate since function tracking still needs them
// Disable all steppers - do not Deactivate since stack frame tracking still needs them
foreach(Stepper s in this.SelectedThread.Steppers) {
s.PauseWhenComplete = false;
}
this.SelectedThread.SelectedFunction = this.SelectedThread.LastFunctionWithLoadedSymbols;
this.SelectedThread.SelectedStackFrame = this.SelectedThread.LastStackFrameWithLoadedSymbols;
}
if (debuggeeStateChanged) {
@ -151,17 +151,17 @@ namespace Debugger @@ -151,17 +151,17 @@ namespace Debugger
public void StepInto()
{
SelectedFunction.StepInto();
SelectedStackFrame.StepInto();
}
public void StepOver()
{
SelectedFunction.StepOver();
SelectedStackFrame.StepOver();
}
public void StepOut()
{
SelectedFunction.StepOut();
SelectedStackFrame.StepOut();
}
}
}

10
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs

@ -39,20 +39,20 @@ namespace Debugger @@ -39,20 +39,20 @@ namespace Debugger
Value runtimeValue = new Value(process, corValue);
message = runtimeValue.GetMember("_message").AsString;
if (thread.LastFunctionWithLoadedSymbols != null) {
location = thread.LastFunctionWithLoadedSymbols.NextStatement;
if (thread.LastStackFrameWithLoadedSymbols != null) {
location = thread.LastStackFrameWithLoadedSymbols.NextStatement;
}
callstack = "";
int callstackItems = 0;
foreach(Function function in thread.Callstack) {
foreach(StackFrame stackFrame in thread.Callstack) {
if (callstackItems >= 100) {
callstack += "...\n";
break;
}
SourcecodeSegment loc = function.NextStatement;
callstack += function.MethodInfo.Name + "()";
SourcecodeSegment loc = stackFrame.NextStatement;
callstack += stackFrame.MethodInfo.Name + "()";
if (loc != null) {
callstack += " - " + loc.SourceFullFilename + ":" + loc.StartLine + "," + loc.StartColumn;
}

14
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs

@ -232,32 +232,32 @@ namespace Debugger @@ -232,32 +232,32 @@ namespace Debugger
public SourcecodeSegment NextStatement {
get {
if (SelectedFunction == null || IsRunning) {
if (SelectedStackFrame == null || IsRunning) {
return null;
} else {
return SelectedFunction.NextStatement;
return SelectedStackFrame.NextStatement;
}
}
}
public ValueCollection LocalVariables {
get {
if (SelectedFunction == null || IsRunning) {
if (SelectedStackFrame == null || IsRunning) {
return ValueCollection.Empty;
} else {
return SelectedFunction.Variables;
return SelectedStackFrame.Variables;
}
}
}
/// <summary> Gets value of given name which is accessible from selected function </summary>
/// <summary> Gets value of given name which is accessible from selected stack frame </summary>
/// <returns> Null if not found </returns>
public Value GetValue(string name)
{
if (SelectedFunction == null || IsRunning) {
if (SelectedStackFrame == null || IsRunning) {
return null;
} else {
return SelectedFunction.GetValue(name);
return SelectedStackFrame.GetValue(name);
}
}
}

56
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs → src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs

@ -16,10 +16,10 @@ using Debugger.Wrappers.MetaData; @@ -16,10 +16,10 @@ using Debugger.Wrappers.MetaData;
namespace Debugger
{
/// <summary>
/// A function (or also a method or frame) which is being executed on
/// some thread. Use to obtain arguments or local variables.
/// A stack frame which is being executed on some thread.
/// Use to obtain arguments or local variables.
/// </summary>
public class Function: DebuggerObject, IExpirable
public class StackFrame: DebuggerObject, IExpirable
{
Process process;
@ -35,7 +35,7 @@ namespace Debugger @@ -35,7 +35,7 @@ namespace Debugger
Thread thread;
FrameID frameID;
/// <summary> The process in which this function is executed </summary>
/// <summary> The process in which this stack frame is executed </summary>
[Debugger.Tests.Ignore]
public Process Process {
get {
@ -48,7 +48,7 @@ namespace Debugger @@ -48,7 +48,7 @@ namespace Debugger
get { return methodInfo; }
}
/// <summary> A thread in which the function is executed </summary>
/// <summary> A thread in which the stack frame is executed </summary>
[Debugger.Tests.Ignore]
public Thread Thread {
get {
@ -56,7 +56,7 @@ namespace Debugger @@ -56,7 +56,7 @@ namespace Debugger
}
}
/// <summary> True if the function has symbols defined.
/// <summary> True if the stack frame has symbols defined.
/// (That is has accesss to the .pdb file) </summary>
public bool HasSymbols {
get {
@ -64,29 +64,29 @@ namespace Debugger @@ -64,29 +64,29 @@ namespace Debugger
}
}
/// <summary> True if function stepped out and is not longer valid. </summary>
/// <summary> True if stack frame stepped out and is not longer valid. </summary>
public bool HasExpired {
get {
return steppedOut || this.MethodInfo.Module.Unloaded;
}
}
/// <summary> Occurs when function expires and is no longer usable </summary>
/// <summary> Occurs when stack frame expires and is no longer usable </summary>
public event EventHandler Expired;
/// <summary> Is called when function expires and is no longer usable </summary>
/// <summary> Is called when stack frame expires and is no longer usable </summary>
internal protected virtual void OnExpired(EventArgs e)
{
if (!steppedOut) {
steppedOut = true;
process.TraceMessage("Function " + this.ToString() + " expired");
process.TraceMessage("StackFrame " + this.ToString() + " expired");
if (Expired != null) {
Expired(this, e);
}
}
}
internal Function(Thread thread, FrameID frameID, ICorDebugILFrame corILFrame)
internal StackFrame(Thread thread, FrameID frameID, ICorDebugILFrame corILFrame)
{
this.process = thread.Process;
this.thread = thread;
@ -102,12 +102,12 @@ namespace Debugger @@ -102,12 +102,12 @@ namespace Debugger
MethodProps methodProps = process.GetModule(corFunction.Module).MetaData.GetMethodProps(corFunction.Token);
this.methodInfo = new MethodInfo(debugType, methodProps);
// Force some callback when function steps out so that we can expire it
stepOutStepper = new Stepper(this, "Function Tracker");
// Force some callback when stack frame steps out so that we can expire it
stepOutStepper = new Stepper(this, "StackFrame Tracker");
stepOutStepper.StepOut();
stepOutStepper.PauseWhenComplete = false;
process.TraceMessage("Function " + this.ToString() + " created");
process.TraceMessage("StackFrame " + this.ToString() + " created");
}
/// <summary> Returns diagnostic description of the frame </summary>
@ -118,7 +118,7 @@ namespace Debugger @@ -118,7 +118,7 @@ namespace Debugger
internal ICorDebugILFrame CorILFrame {
get {
if (HasExpired) throw new DebuggerException("Function has expired");
if (HasExpired) throw new DebuggerException("StackFrame has expired");
if (corILFramePauseSession != process.PauseSession) {
CorILFrame = thread.GetFrameAt(frameID).As<ICorDebugILFrame>();
}
@ -151,10 +151,10 @@ namespace Debugger @@ -151,10 +151,10 @@ namespace Debugger
Step(false);
}
/// <summary> Step out of the function </summary>
/// <summary> Step out of the stack frame </summary>
public void StepOut()
{
new Stepper(this, "Function step out").StepOut();
new Stepper(this, "StackFrame step out").StepOut();
process.Continue();
}
@ -172,12 +172,12 @@ namespace Debugger @@ -172,12 +172,12 @@ namespace Debugger
}
if (stepIn) {
new Stepper(this, "Function step in").StepIn(nextSt.StepRanges);
new Stepper(this, "StackFrame step in").StepIn(nextSt.StepRanges);
// Without JMC step in which ends in code without symblols is cotinued.
// The next step over ensures that we at least do step over.
new Stepper(this, "Safety step over").StepOver(nextSt.StepRanges);
} else {
new Stepper(this, "Function step over").StepOver(nextSt.StepRanges);
new Stepper(this, "StackFrame step over").StepOver(nextSt.StepRanges);
}
process.Continue();
@ -328,7 +328,7 @@ namespace Debugger @@ -328,7 +328,7 @@ namespace Debugger
}
}
/// <summary> Gets value of given name which is accessible from this function </summary>
/// <summary> Gets value of given name which is accessible from this stack frame </summary>
/// <returns> Null if not found </returns>
public Value GetValue(string name)
{
@ -348,7 +348,7 @@ namespace Debugger @@ -348,7 +348,7 @@ namespace Debugger
}
/// <summary>
/// Gets all variables in the lexical scope of the function.
/// Gets all variables in the lexical scope of the stack frame.
/// That is, arguments, local variables and varables of the containing class.
/// </summary>
[Debugger.Tests.Ignore] // Accessible though others
@ -392,7 +392,7 @@ namespace Debugger @@ -392,7 +392,7 @@ namespace Debugger
ICorDebugValue ThisCorValue {
get {
if (this.HasExpired) throw new CannotGetValueException("Function has expired");
if (this.HasExpired) throw new CannotGetValueException("StackFrame has expired");
try {
return CorILFrame.GetArgument(0);
} catch (COMException e) {
@ -404,7 +404,7 @@ namespace Debugger @@ -404,7 +404,7 @@ namespace Debugger
}
/// <summary>
/// Gets all accessible members of the class that defines this function.
/// Gets all accessible members of the class that defines this stack frame.
/// </summary>
public ValueCollection ContaingClassVariables {
get {
@ -438,10 +438,10 @@ namespace Debugger @@ -438,10 +438,10 @@ namespace Debugger
ICorDebugValue GetArgumentCorValue(int index)
{
if (this.HasExpired) throw new CannotGetValueException("Function has expired");
if (this.HasExpired) throw new CannotGetValueException("StackFrame has expired");
try {
// Non-static functions include 'this' as first argument
// Non-static methods include 'this' as first argument
return CorILFrame.GetArgument((uint)(this.MethodInfo.IsStatic? index : (index + 1)));
} catch (COMException e) {
if ((uint)e.ErrorCode == 0x80131304) throw new CannotGetValueException("Unavailable in optimized code");
@ -451,7 +451,7 @@ namespace Debugger @@ -451,7 +451,7 @@ namespace Debugger
ValueCollection argumentsCache;
/// <summary> Gets all arguments of the function. </summary>
/// <summary> Gets all arguments of the stack frame. </summary>
public ValueCollection Arguments {
get {
if (argumentsCache == null) {
@ -476,7 +476,7 @@ namespace Debugger @@ -476,7 +476,7 @@ namespace Debugger
ValueCollection localVariablesCache;
/// <summary> Gets all local variables of the function. </summary>
/// <summary> Gets all local variables of the stack frame. </summary>
public ValueCollection LocalVariables {
get {
if (localVariablesCache == null) {
@ -501,7 +501,7 @@ namespace Debugger @@ -501,7 +501,7 @@ namespace Debugger
ICorDebugValue GetCorValueOfLocalVariable(ISymUnmanagedVariable symVar)
{
if (this.HasExpired) throw new CannotGetValueException("Function has expired");
if (this.HasExpired) throw new CannotGetValueException("StackFrame has expired");
try {
return CorILFrame.GetLocalVariable((uint)symVar.AddressField1);

20
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Stepper.cs

@ -15,7 +15,7 @@ namespace Debugger @@ -15,7 +15,7 @@ namespace Debugger
{
public enum StepperOperation {Idle, StepIn, StepOver, StepOut};
Function function;
StackFrame stackFrame;
string name;
ICorDebugStepper corStepper;
StepperOperation operation = StepperOperation.Idle;
@ -26,13 +26,13 @@ namespace Debugger @@ -26,13 +26,13 @@ namespace Debugger
[Debugger.Tests.Ignore]
public Process Process {
get {
return function.Process;
return stackFrame.Process;
}
}
public Function Function {
public StackFrame StackFrame {
get {
return function;
return stackFrame;
}
}
@ -66,20 +66,20 @@ namespace Debugger @@ -66,20 +66,20 @@ namespace Debugger
}
}
public Stepper(Function function, string name): this(function)
public Stepper(StackFrame stackFrame, string name): this(stackFrame)
{
this.name = name;
}
public Stepper(Function function)
public Stepper(StackFrame stackFrame)
{
this.function = function;
this.stackFrame = stackFrame;
corStepper = function.CorILFrame.CreateStepper();
corStepper = stackFrame.CorILFrame.CreateStepper();
JustMyCode = true;
function.Thread.Steppers.Add(this);
stackFrame.Thread.Steppers.Add(this);
}
protected internal virtual void OnStepComplete() {
@ -114,7 +114,7 @@ namespace Debugger @@ -114,7 +114,7 @@ namespace Debugger
public override string ToString()
{
return string.Format("{0} in {1} pause={2} \"{3}\"", Operation, Function.ToString(), PauseWhenComplete, name);
return string.Format("{0} in {1} pause={2} \"{3}\"", Operation, StackFrame.ToString(), PauseWhenComplete, name);
}
}
}

85
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs

@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
@ -34,7 +33,7 @@ namespace Debugger @@ -34,7 +33,7 @@ namespace Debugger
bool hasExpired = false;
bool nativeThreadExited = false;
Function selectedFunction;
StackFrame selectedFunction;
public event EventHandler Expired;
public event EventHandler<ThreadEventArgs> NativeThreadExited;
@ -103,7 +102,7 @@ namespace Debugger @@ -103,7 +102,7 @@ namespace Debugger
void Expire()
{
Debug.Assert(!this.hasExpired);
System.Diagnostics.Debug.Assert(!this.hasExpired);
process.TraceMessage("Thread " + this.ID + " expired");
this.hasExpired = true;
@ -184,10 +183,10 @@ namespace Debugger @@ -184,10 +183,10 @@ namespace Debugger
public bool InterceptCurrentException()
{
if (!CorThread.Is<ICorDebugThread2>()) return false; // Is the debuggee .NET 2.0?
if (LastFunction == null) return false; // Is frame available? It is not at StackOverflow
if (LastStackFrame == null) return false; // Is frame available? It is not at StackOverflow
try {
CorThread.CastTo<ICorDebugThread2>().InterceptCurrentException(LastFunction.CorILFrame.CastTo<ICorDebugFrame>());
CorThread.CastTo<ICorDebugThread2>().InterceptCurrentException(LastStackFrame.CorILFrame.CastTo<ICorDebugFrame>());
return true;
} catch (COMException e) {
// 0x80131C02: Cannot intercept this exception
@ -236,13 +235,13 @@ namespace Debugger @@ -236,13 +235,13 @@ namespace Debugger
}
}
public IList<Function> Callstack {
public IList<StackFrame> Callstack {
get {
return new List<Function>(CallstackEnum).AsReadOnly();
return new List<StackFrame>(CallstackEnum).AsReadOnly();
}
}
IEnumerable<Function> CallstackEnum {
IEnumerable<StackFrame> CallstackEnum {
get {
process.AssertPaused();
@ -250,31 +249,31 @@ namespace Debugger @@ -250,31 +249,31 @@ namespace Debugger
if (corChain.IsManaged == 0) continue; // Only managed ones
foreach(ICorDebugFrame corFrame in corChain.EnumerateFrames().Enumerator) {
if (corFrame.Is<ICorDebugILFrame>()) {
Function function;
StackFrame stackFrame;
try {
function = GetFunctionFromCache(new FrameID(corChain.Index, corFrame.Index), corFrame.As<ICorDebugILFrame>());
stackFrame = GetStackFrameFromCache(new FrameID(corChain.Index, corFrame.Index), corFrame.As<ICorDebugILFrame>());
} catch (COMException) { // TODO
continue;
};
yield return function;
yield return stackFrame;
}
}
}
}
}
Dictionary<FrameID, Function> functionCache = new Dictionary<FrameID, Function>();
Dictionary<FrameID, StackFrame> functionCache = new Dictionary<FrameID, StackFrame>();
Function GetFunctionFromCache(FrameID frameID, ICorDebugILFrame corFrame)
StackFrame GetStackFrameFromCache(FrameID frameID, ICorDebugILFrame corFrame)
{
Function function;
if (functionCache.TryGetValue(frameID, out function) && !function.HasExpired) {
function.CorILFrame = corFrame;
return function;
StackFrame stackFrame;
if (functionCache.TryGetValue(frameID, out stackFrame) && !stackFrame.HasExpired) {
stackFrame.CorILFrame = corFrame;
return stackFrame;
} else {
function = new Function(this, frameID, corFrame);
functionCache[frameID] = function;
return function;
stackFrame = new StackFrame(this, frameID, corFrame);
functionCache[frameID] = stackFrame;
return stackFrame;
}
}
@ -326,34 +325,34 @@ namespace Debugger @@ -326,34 +325,34 @@ namespace Debugger
ICorDebugFrame lastFrame = corFrameEnum.Next();
// Check the token of the current function - function can change if there are multiple handlers for an event
Function function;
// Check the token of the current stack frame - stack frame can change if there are multiple handlers for an event
StackFrame stackFrame;
if (lastFrame != null &&
functionCache.TryGetValue(new FrameID((uint)maxChainIndex, (uint)maxFrameIndex), out function) &&
function.MethodInfo.MetadataToken != lastFrame.FunctionToken) {
functionCache.TryGetValue(new FrameID((uint)maxChainIndex, (uint)maxFrameIndex), out stackFrame) &&
stackFrame.MethodInfo.MetadataToken != lastFrame.FunctionToken) {
functionCache.Remove(new FrameID((uint)maxChainIndex, (uint)maxFrameIndex));
function.OnExpired(EventArgs.Empty);
stackFrame.OnExpired(EventArgs.Empty);
}
// Expire all functions behind the current maximum
// Multiple functions can expire at once (test case: Step out of Button1Click in simple winforms application)
List<KeyValuePair<FrameID, Function>> toBeRemoved = new List<KeyValuePair<FrameID, Function>>();
foreach(KeyValuePair<FrameID, Function> kvp in functionCache) {
List<KeyValuePair<FrameID, StackFrame>> toBeRemoved = new List<KeyValuePair<FrameID, StackFrame>>();
foreach(KeyValuePair<FrameID, StackFrame> kvp in functionCache) {
if ((kvp.Key.ChainIndex > maxChainIndex) ||
(kvp.Key.ChainIndex == maxChainIndex && kvp.Key.FrameIndex > maxFrameIndex)) {
toBeRemoved.Add(kvp);
}
}
foreach(KeyValuePair<FrameID, Function> kvp in toBeRemoved){
foreach(KeyValuePair<FrameID, StackFrame> kvp in toBeRemoved){
functionCache.Remove(kvp.Key);
kvp.Value.OnExpired(EventArgs.Empty);
}
}
[Debugger.Tests.ToStringOnly]
public Function SelectedFunction {
public StackFrame SelectedStackFrame {
get {
return selectedFunction;
}
@ -367,11 +366,11 @@ namespace Debugger @@ -367,11 +366,11 @@ namespace Debugger
}
[Debugger.Tests.ToStringOnly]
public Function LastFunctionWithLoadedSymbols {
public StackFrame LastStackFrameWithLoadedSymbols {
get {
foreach (Function function in CallstackEnum) {
if (function.HasSymbols) {
return function;
foreach (StackFrame stackFrame in CallstackEnum) {
if (stackFrame.HasSymbols) {
return stackFrame;
}
}
return null;
@ -379,34 +378,34 @@ namespace Debugger @@ -379,34 +378,34 @@ namespace Debugger
}
/// <summary>
/// Returns the most recent function on callstack.
/// Returns the most recent stack frame on callstack.
/// Returns null if callstack is empty.
/// </summary>
[Debugger.Tests.ToStringOnly]
public Function LastFunction {
public StackFrame LastStackFrame {
get {
foreach(Function function in CallstackEnum) {
return function;
foreach(StackFrame stackFrame in CallstackEnum) {
return stackFrame;
}
return null;
}
}
/// <summary>
/// Returns the first function that was called on thread
/// Returns the first stack frame that was called on thread
/// </summary>
[Debugger.Tests.ToStringOnly]
public Function FirstFunction {
public StackFrame FirstStackFrame {
get {
Function first = null;
foreach(Function function in Callstack) {
first = function;
StackFrame first = null;
foreach(StackFrame stackFrame in Callstack) {
first = stackFrame;
}
return first;
}
}
public bool IsLastFunctionNative {
public bool IsLastStackFrameNative {
get {
process.AssertPaused();
return corThread.ActiveChain.IsManaged == 0;

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

@ -175,7 +175,7 @@ namespace Debugger @@ -175,7 +175,7 @@ namespace Debugger
process.AssertPaused();
try {
if (targetThread.IsLastFunctionNative) {
if (targetThread.IsLastStackFrameNative) {
throw new EvalSetupException("Can not evaluate because native frame is on top of stack");
}
if (!targetThread.IsAtSafePoint) {

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/EvaluateAstVisitor.cs

@ -17,13 +17,13 @@ namespace Debugger @@ -17,13 +17,13 @@ namespace Debugger
{
class EvaluateAstVisitor: NotImplementedAstVisitor
{
Function stackFrame;
StackFrame stackFrame;
public Function StackFrame {
public StackFrame StackFrame {
get { return stackFrame; }
}
public EvaluateAstVisitor(Function stackFrame)
public EvaluateAstVisitor(StackFrame stackFrame)
{
this.stackFrame = stackFrame;
}

8
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Create.cs

@ -45,22 +45,22 @@ namespace Debugger @@ -45,22 +45,22 @@ namespace Debugger
);
}
public static ExpressionCollection StackFrameVariables(Function stackFrame)
public static ExpressionCollection StackFrameVariables(StackFrame stackFrame)
{
throw new NotImplementedException();
}
public static Expression StackFrameThis(Function stackFrame)
public static Expression StackFrameThis(StackFrame stackFrame)
{
throw new NotImplementedException();
}
public static ExpressionCollection StackFrameParameters(Function stackFrame)
public static ExpressionCollection StackFrameParameters(StackFrame stackFrame)
{
throw new NotImplementedException();
}
public static ExpressionCollection StackFrameLocalVariables(Function stackFrame)
public static ExpressionCollection StackFrameLocalVariables(StackFrame stackFrame)
{
throw new NotImplementedException();
}

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Evaluate.cs

@ -22,7 +22,7 @@ namespace Debugger @@ -22,7 +22,7 @@ namespace Debugger
return Evaluate(null);
}
Value Evaluate(Function stackFrame)
Value Evaluate(StackFrame stackFrame)
{
EvaluateAstVisitor astVisitor = new EvaluateAstVisitor(stackFrame);
return (Value)this.AbstractSynatxTree.AcceptVisitor(astVisitor, null);

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/Value.Object.cs

@ -64,10 +64,10 @@ namespace Debugger @@ -64,10 +64,10 @@ namespace Debugger
ICorDebugFrame curFrame = null;
if (objectInstance.Process.IsPaused &&
objectInstance.Process.SelectedThread != null &&
objectInstance.Process.SelectedThread.LastFunction != null &&
objectInstance.Process.SelectedThread.LastFunction.CorILFrame != null) {
objectInstance.Process.SelectedThread.LastStackFrame != null &&
objectInstance.Process.SelectedThread.LastStackFrame.CorILFrame != null) {
curFrame = objectInstance.Process.SelectedThread.LastFunction.CorILFrame.CastTo<ICorDebugFrame>();
curFrame = objectInstance.Process.SelectedThread.LastStackFrame.CorILFrame.CastTo<ICorDebugFrame>();
}
try {

74
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs

@ -96,39 +96,39 @@ namespace Debugger.Tests @@ -96,39 +96,39 @@ namespace Debugger.Tests
{
StartTest("Stepping");
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepOver(); // Debugger.Break
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepOver(); // Debug.WriteLine 1
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepInto(); // Method Sub
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepInto(); // '{'
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepInto(); // Debug.WriteLine 2
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepOut(); // Method Sub
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepOver(); // Method Sub
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.StepOver(); // Method Sub2
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.Continue();
process.WaitForExit();
@ -164,7 +164,7 @@ namespace Debugger.Tests @@ -164,7 +164,7 @@ namespace Debugger.Tests
for(int i = 0; i < 6; i++) {
process.Continue();
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
}
process.Continue();
@ -177,7 +177,7 @@ namespace Debugger.Tests @@ -177,7 +177,7 @@ namespace Debugger.Tests
{
StartTest("FunctionLocalVariables");
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.Continue();
process.WaitForExit();
@ -187,27 +187,27 @@ namespace Debugger.Tests @@ -187,27 +187,27 @@ namespace Debugger.Tests
[Test]
public void FunctionLifetime()
{
Function function;
StackFrame stackFrame;
StartTest("FunctionLifetime");
WaitForPause();
function = process.SelectedFunction;
ObjectDump("Function", function);
stackFrame = process.SelectedStackFrame;
ObjectDump("StackFrame", stackFrame);
process.Continue(); // Go to the SubFunction
WaitForPause();
ObjectDump("Function", function);
ObjectDump("SubFunction", process.SelectedFunction);
ObjectDump("StackFrame", stackFrame);
ObjectDump("SubStackFrame", process.SelectedStackFrame);
process.Continue(); // Go back to Function
WaitForPause();
Assert.AreEqual(function, process.SelectedFunction);
ObjectDump("Function", function);
Assert.AreEqual(stackFrame, process.SelectedStackFrame);
ObjectDump("StackFrame", stackFrame);
process.Continue(); // Setp out of function
WaitForPause();
ObjectDump("Main", process.SelectedFunction);
ObjectDump("Function", function);
ObjectDump("Main", process.SelectedStackFrame);
ObjectDump("StackFrame", stackFrame);
process.Continue();
process.WaitForExit();
@ -224,16 +224,16 @@ namespace Debugger.Tests @@ -224,16 +224,16 @@ namespace Debugger.Tests
StartTest("FunctionVariablesLifetime"); // 1 - Enter program
WaitForPause();
argument = process.SelectedFunction.GetArgument(0);
local = process.SelectedFunction.LocalVariables["local"];
@class = process.SelectedFunction.ContaingClassVariables["class"];
argument = process.SelectedStackFrame.GetArgument(0);
local = process.SelectedStackFrame.LocalVariables["local"];
@class = process.SelectedStackFrame.ContaingClassVariables["class"];
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
process.Continue(); // 2 - Go to the SubFunction
WaitForPause();
localInSubFunction = process.SelectedFunction.LocalVariables["localInSubFunction"];
localInSubFunction = process.SelectedStackFrame.LocalVariables["localInSubFunction"];
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
@ -252,7 +252,7 @@ namespace Debugger.Tests @@ -252,7 +252,7 @@ namespace Debugger.Tests
ObjectDump("local", local);
ObjectDump("@class", @class);
ObjectDump("localInSubFunction", @localInSubFunction);
localInSubFunction = process.SelectedFunction.LocalVariables["localInSubFunction"];
localInSubFunction = process.SelectedStackFrame.LocalVariables["localInSubFunction"];
ObjectDump("localInSubFunction(new)", @localInSubFunction);
process.Continue(); // 5 - Setp out of both functions
@ -272,7 +272,7 @@ namespace Debugger.Tests @@ -272,7 +272,7 @@ namespace Debugger.Tests
{
StartTest("ArrayValue");
WaitForPause();
Value array = process.SelectedFunction.LocalVariables["array"];
Value array = process.SelectedStackFrame.LocalVariables["array"];
ObjectDump("array", array);
ObjectDump("array elements", array.GetArrayElements());
@ -288,7 +288,7 @@ namespace Debugger.Tests @@ -288,7 +288,7 @@ namespace Debugger.Tests
StartTest("ObjectValue");
WaitForPause();
val = process.SelectedFunction.LocalVariables["val"];
val = process.SelectedStackFrame.LocalVariables["val"];
ObjectDump("val", val);
ObjectDump("val members", val.GetMembers(null, Debugger.BindingFlags.All));
//ObjectDump("typeof(val)", val.Type);
@ -382,9 +382,9 @@ namespace Debugger.Tests @@ -382,9 +382,9 @@ namespace Debugger.Tests
StartTest("SetIP");
WaitForPause();
Assert.IsNotNull(process.SelectedFunction.CanSetIP("SetIP.cs", 16, 0));
Assert.IsNull(process.SelectedFunction.CanSetIP("SetIP.cs", 100, 0));
process.SelectedFunction.SetIP("SetIP.cs", 16, 0);
Assert.IsNotNull(process.SelectedStackFrame.CanSetIP("SetIP.cs", 16, 0));
Assert.IsNull(process.SelectedStackFrame.CanSetIP("SetIP.cs", 100, 0));
process.SelectedStackFrame.SetIP("SetIP.cs", 16, 0);
process.Continue();
WaitForPause();
Assert.AreEqual("1\r\n1\r\n", log);
@ -399,8 +399,8 @@ namespace Debugger.Tests @@ -399,8 +399,8 @@ namespace Debugger.Tests
{
StartTest("GenericDictionary");
WaitForPause();
ObjectDump("dict", process.SelectedFunction.LocalVariables["dict"]);
ObjectDump("dict members", process.SelectedFunction.LocalVariables["dict"].GetMembers(null, BindingFlags.All));
ObjectDump("dict", process.SelectedStackFrame.LocalVariables["dict"]);
ObjectDump("dict members", process.SelectedStackFrame.LocalVariables["dict"].GetMembers(null, BindingFlags.All));
process.Continue();
process.WaitForExit();
@ -433,10 +433,10 @@ namespace Debugger.Tests @@ -433,10 +433,10 @@ namespace Debugger.Tests
StartTest("Expressions");
WaitForPause();
ObjectDump("Variables", process.SelectedFunction.Variables);
ObjectDump("array", process.SelectedFunction.Variables["array"].GetArrayElements());
ObjectDump("array2", process.SelectedFunction.Variables["array2"].GetArrayElements());
ObjectDump("this", process.SelectedFunction.ThisValue.GetMembers());
ObjectDump("Variables", process.SelectedStackFrame.Variables);
ObjectDump("array", process.SelectedStackFrame.Variables["array"].GetArrayElements());
ObjectDump("array2", process.SelectedStackFrame.Variables["array2"].GetArrayElements());
ObjectDump("this", process.SelectedStackFrame.ThisValue.GetMembers());
process.Continue();
process.WaitForExit();
@ -450,7 +450,7 @@ namespace Debugger.Tests @@ -450,7 +450,7 @@ namespace Debugger.Tests
for(int i = 0; i < 8; i++) {
WaitForPause();
ObjectDump("SelectedFunction", process.SelectedFunction);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
process.Continue();
}

24
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.xml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<ReadOnlyCollection_x0060_1>
<Count>3</Count>
<Items>
<Function>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -44,8 +44,8 @@ @@ -44,8 +44,8 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
<Function>
</StackFrame>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -80,8 +80,8 @@ @@ -80,8 +80,8 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
<Function>
</StackFrame>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -116,7 +116,7 @@ @@ -116,7 +116,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</Items>
</ReadOnlyCollection_x0060_1>
</ObjectDump>
@ -125,7 +125,7 @@ @@ -125,7 +125,7 @@
<ReadOnlyCollection_x0060_1>
<Count>2</Count>
<Items>
<Function>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -160,8 +160,8 @@ @@ -160,8 +160,8 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
<Function>
</StackFrame>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -196,7 +196,7 @@ @@ -196,7 +196,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</Items>
</ReadOnlyCollection_x0060_1>
</ObjectDump>
@ -205,7 +205,7 @@ @@ -205,7 +205,7 @@
<ReadOnlyCollection_x0060_1>
<Count>1</Count>
<Items>
<Function>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -240,7 +240,7 @@ @@ -240,7 +240,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</Items>
</ReadOnlyCollection_x0060_1>
</ObjectDump>

36
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.xml

@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
<ModuleLoaded symbols="True">FunctionArgumentVariables.exe</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -88,11 +88,11 @@ @@ -88,11 +88,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -173,11 +173,11 @@ @@ -173,11 +173,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -258,11 +258,11 @@ @@ -258,11 +258,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -359,11 +359,11 @@ @@ -359,11 +359,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -460,11 +460,11 @@ @@ -460,11 +460,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -561,7 +561,7 @@ @@ -561,7 +561,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ProcessExited />
</Test>

38
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.xml

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
<ModuleLoaded symbols="False">mscorlib.dll</ModuleLoaded>
<ModuleLoaded symbols="True">FunctionLifetime.exe</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="Function">
<Function>
<ObjectDump name="StackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -57,11 +57,11 @@ @@ -57,11 +57,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="Function">
<Function>
<ObjectDump name="StackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -112,10 +112,10 @@ @@ -112,10 +112,10 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ObjectDump name="SubFunction">
<Function>
<ObjectDump name="SubStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -150,11 +150,11 @@ @@ -150,11 +150,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="Function">
<Function>
<ObjectDump name="StackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -205,11 +205,11 @@ @@ -205,11 +205,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="Main">
<Function>
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -244,10 +244,10 @@ @@ -244,10 +244,10 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ObjectDump name="Function">
<Function>
<ObjectDump name="StackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>True</IsPrivate>
@ -261,7 +261,7 @@ @@ -261,7 +261,7 @@
</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>True</HasExpired>
<NextStatement exception="Function has expired" />
<NextStatement exception="StackFrame has expired" />
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>
<ValueCollection>
@ -269,7 +269,7 @@ @@ -269,7 +269,7 @@
<Items />
</ValueCollection>
</ContaingClassVariables>
<ArgumentCount exception="Function has expired" />
<ArgumentCount exception="StackFrame has expired" />
<Arguments>
<ValueCollection>
<Count>1</Count>
@ -298,7 +298,7 @@ @@ -298,7 +298,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ProcessExited />
</Test>

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.xml

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
<ModuleLoaded symbols="False">mscorlib.dll</ModuleLoaded>
<ModuleLoaded symbols="True">FunctionLocalVariables.exe</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -117,7 +117,7 @@ @@ -117,7 +117,7 @@
</Items>
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ProcessExited />
</Test>

48
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.xml

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
<ModuleLoaded symbols="False">mscorlib.dll</ModuleLoaded>
<ModuleLoaded symbols="True">Generics.exe</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -88,11 +88,11 @@ @@ -88,11 +88,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -174,11 +174,11 @@ @@ -174,11 +174,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -244,11 +244,11 @@ @@ -244,11 +244,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -314,11 +314,11 @@ @@ -314,11 +314,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -379,11 +379,11 @@ @@ -379,11 +379,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -444,11 +444,11 @@ @@ -444,11 +444,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -514,11 +514,11 @@ @@ -514,11 +514,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -584,7 +584,7 @@ @@ -584,7 +584,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>Break</DebuggingPaused>
<ProcessExited />

54
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.xml

@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
<ModuleLoaded symbols="True">Stepping.exe</ModuleLoaded>
<ModuleLoaded symbols="False">System.dll</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -42,11 +42,11 @@ @@ -42,11 +42,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -81,14 +81,14 @@ @@ -81,14 +81,14 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ModuleLoaded symbols="False">System.Configuration.dll</ModuleLoaded>
<ModuleLoaded symbols="False">System.Xml.dll</ModuleLoaded>
<LogMessage>1\r\n</LogMessage>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -123,11 +123,11 @@ @@ -123,11 +123,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -162,11 +162,11 @@ @@ -162,11 +162,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -201,12 +201,12 @@ @@ -201,12 +201,12 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<LogMessage>2\r\n</LogMessage>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -241,13 +241,13 @@ @@ -241,13 +241,13 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<LogMessage>3\r\n</LogMessage>
<LogMessage>4\r\n</LogMessage>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -282,11 +282,11 @@ @@ -282,11 +282,11 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -321,12 +321,12 @@ @@ -321,12 +321,12 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<LogMessage>5\r\n</LogMessage>
<DebuggingPaused>StepComplete</DebuggingPaused>
<ObjectDump name="SelectedFunction">
<Function>
<ObjectDump name="SelectedStackFrame">
<StackFrame>
<MethodInfo>
<MethodInfo>
<IsPrivate>False</IsPrivate>
@ -361,7 +361,7 @@ @@ -361,7 +361,7 @@
<Items />
</ValueCollection>
</LocalVariables>
</Function>
</StackFrame>
</ObjectDump>
<ProcessExited />
</Test>

Loading…
Cancel
Save