Browse Source

Current* functions renamed to Selected* and modified to simple read/write properties.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1253 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
4bb60397c7
  1. 8
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs
  2. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/RunningThreadsPad.cs
  3. 20
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  4. 25
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs
  5. 40
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger-StateControl.cs
  6. 12
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs
  7. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs
  8. 25
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
  9. 29
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs
  10. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/NDebugger-Evals.cs
  11. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs
  12. 38
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs

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

@ -169,8 +169,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -169,8 +169,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
if (debuggerCore.IsPaused) {
Function f = (Function)(callStackList.SelectedItems[0].Tag);
if (f.HasSymbols) {
if (debuggerCore.CurrentThread != null) {
debuggerCore.CurrentThread.SetCurrentFunction(f);
if (debuggerCore.SelectedThread != null) {
debuggerCore.SelectedThread.SelectedFunction = f;
}
} else {
MessageBox.Show("You can not switch to function without symbols", "Function switch");
@ -200,8 +200,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -200,8 +200,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
callStackList.BeginUpdate();
callStackList.Items.Clear();
if (debuggerCore != null && debuggerCore.CurrentThread != null) {
foreach (Function f in debuggerCore.CurrentThread.Callstack) {
if (debuggerCore != null && debuggerCore.SelectedThread != null && debuggerCore.IsPaused) {
foreach (Function f in debuggerCore.SelectedThread.Callstack) {
ListViewItem item;
if (f.HasSymbols || showExternalMethods) {
// Show the method in the list

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

@ -158,8 +158,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -158,8 +158,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
void RunningThreadsListItemActivate(object sender, EventArgs e)
{
if (debuggerCore.IsPaused) {
if (debuggerCore.CurrentProcess != null) {
debuggerCore.CurrentProcess.SetCurrentThread((Thread)(runningThreadsList.SelectedItems[0].Tag));
if (debuggerCore.SelectedProcess != null) {
debuggerCore.SelectedProcess.SelectedThread = (Thread)(runningThreadsList.SelectedItems[0].Tag);
}
} else {
MessageBox.Show("You can not switch threads while the debugger is running.", "Thread switch");

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

@ -138,7 +138,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -138,7 +138,7 @@ namespace ICSharpCode.SharpDevelop.Services
public void StepInto()
{
if (debugger.CurrentFunction == null) {
if (debugger.SelectedFunction == null || debugger.IsRunning) {
MessageBox.Show("You can not step because there is no function selected to be stepped","Step into");
} else {
debugger.StepInto();
@ -147,7 +147,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -147,7 +147,7 @@ namespace ICSharpCode.SharpDevelop.Services
public void StepOver()
{
if (debugger.CurrentFunction == null) {
if (debugger.SelectedFunction == null || debugger.IsRunning) {
MessageBox.Show("You can not step because there is no function selected to be stepped","Step over");
} else {
debugger.StepOver();
@ -156,7 +156,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -156,7 +156,7 @@ namespace ICSharpCode.SharpDevelop.Services
public void StepOut()
{
if (debugger.CurrentFunction == null) {
if (debugger.SelectedFunction == null || debugger.IsRunning) {
MessageBox.Show("You can not step because there is no function selected to be stepped","Step out");
} else {
debugger.StepOut();
@ -244,8 +244,8 @@ namespace ICSharpCode.SharpDevelop.Services @@ -244,8 +244,8 @@ namespace ICSharpCode.SharpDevelop.Services
public bool CanSetInstructionPointer(string filename, int line, int column)
{
if (debugger != null && debugger.IsPaused && debugger.CurrentFunction != null) {
SourcecodeSegment seg = debugger.CurrentFunction.CanSetIP(filename, line, column);
if (debugger != null && debugger.IsPaused && debugger.SelectedFunction != null) {
SourcecodeSegment seg = debugger.SelectedFunction.CanSetIP(filename, line, column);
return seg != null;
} else {
return false;
@ -255,7 +255,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -255,7 +255,7 @@ namespace ICSharpCode.SharpDevelop.Services
public bool SetInstructionPointer(string filename, int line, int column)
{
if (CanSetInstructionPointer(filename, line, column)) {
SourcecodeSegment seg = debugger.CurrentFunction.SetIP(filename, line, column);
SourcecodeSegment seg = debugger.SelectedFunction.SetIP(filename, line, column);
return seg != null;
} else {
return false;
@ -368,9 +368,9 @@ namespace ICSharpCode.SharpDevelop.Services @@ -368,9 +368,9 @@ namespace ICSharpCode.SharpDevelop.Services
OnIsProcessRunningChanged(EventArgs.Empty);
if (e.Reason == PausedReason.Exception) {
exceptionHistory.Add(debugger.CurrentThread.CurrentException);
exceptionHistory.Add(debugger.SelectedThread.CurrentException);
OnExceptionHistoryModified();
if (debugger.CurrentThread.CurrentException.ExceptionType != ExceptionType.DEBUG_EXCEPTION_UNHANDLED) {
if (debugger.SelectedThread.CurrentException.ExceptionType != ExceptionType.DEBUG_EXCEPTION_UNHANDLED) {
// Ignore the exception
e.ResumeDebuggingAfterEvent();
return;
@ -378,14 +378,14 @@ namespace ICSharpCode.SharpDevelop.Services @@ -378,14 +378,14 @@ namespace ICSharpCode.SharpDevelop.Services
JumpToCurrentLine();
switch (ExceptionForm.Show(debugger.CurrentThread.CurrentException)) {
switch (ExceptionForm.Show(debugger.SelectedThread.CurrentException)) {
case ExceptionForm.Result.Break:
break;
case ExceptionForm.Result.Continue:
e.ResumeDebuggingAfterEvent();
return;
case ExceptionForm.Result.Ignore:
debugger.CurrentThread.InterceptCurrentException();
debugger.SelectedThread.InterceptCurrentException();
break;
}
}

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

@ -39,8 +39,8 @@ namespace Debugger @@ -39,8 +39,8 @@ namespace Debugger
debugger.TraceMessage("Callback: " + name);
debugger.AssertRunning();
debugger.PauseSession = new PauseSession(pausedReason);
debugger.CurrentProcess = debugger.GetProcess(pProcess);
debugger.CurrentProcess.IsRunning = false;
debugger.SelectedProcess = debugger.GetProcess(pProcess);
debugger.SelectedProcess.IsRunning = false;
}
void EnterCallback(PausedReason pausedReason, string name, ICorDebugAppDomain pAppDomain)
@ -55,20 +55,21 @@ namespace Debugger @@ -55,20 +55,21 @@ namespace Debugger
if (name != "ExitProcess") debugger.AssertRunning();
Thread thread = debugger.GetThread(pThread);
debugger.PauseSession = new PauseSession(pausedReason);
debugger.CurrentProcess = thread.Process;
debugger.CurrentProcess.IsRunning = false;
debugger.CurrentProcess.CurrentThread = thread;
debugger.SelectedProcess = thread.Process;
debugger.SelectedProcess.IsRunning = false;
debugger.SelectedProcess.SelectedThread = thread;
}
void ExitCallback_Continue()
{
debugger.CurrentProcess.Continue();
debugger.SelectedProcess.Continue();
}
void ExitCallback_Paused()
{
if (debugger.CurrentThread != null) {
debugger.CurrentThread.DeactivateAllSteppers();
if (debugger.SelectedThread != null) {
debugger.SelectedThread.DeactivateAllSteppers();
debugger.SelectedThread.SelectedFunction = debugger.SelectedThread.LastFunctionWithLoadedSymbols;
}
debugger.Pause();
}
@ -89,7 +90,7 @@ namespace Debugger @@ -89,7 +90,7 @@ namespace Debugger
}
}
if (!debugger.CurrentThread.LastFunction.HasSymbols) {
if (!debugger.SelectedThread.LastFunction.HasSymbols) {
// This should not happen with JMC enabled
debugger.TraceMessage(" - leaving code without symbols");
@ -339,8 +340,8 @@ namespace Debugger @@ -339,8 +340,8 @@ namespace Debugger
debugger.RemoveThread(thread);
if (thread.Process.CurrentThread == thread) {
thread.Process.CurrentThread = null;
if (thread.Process.SelectedThread == thread) {
thread.Process.SelectedThread = null;
}
ExitCallback_Continue();
@ -400,7 +401,7 @@ namespace Debugger @@ -400,7 +401,7 @@ namespace Debugger
// Whatch out for the zeros and null!
// Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0);
debugger.CurrentThread.CurrentExceptionType = (ExceptionType)exceptionType;
debugger.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType;
if (ExceptionType.DEBUG_EXCEPTION_UNHANDLED != (ExceptionType)exceptionType) {
// Handled exception

40
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger-StateControl.cs

@ -24,7 +24,7 @@ namespace Debugger @@ -24,7 +24,7 @@ namespace Debugger
PauseSession pauseSession;
DebugeeState debugeeState;
Process currentProcess;
Process selectedProcess;
public event EventHandler<DebuggerEventArgs> DebuggingResumed;
public event EventHandler<DebuggingPausedEventArgs> DebuggingPaused;
@ -67,35 +67,31 @@ namespace Debugger @@ -67,35 +67,31 @@ namespace Debugger
}
}
public Process CurrentProcess {
public Process SelectedProcess {
get {
if (IsRunning) return null;
if (currentProcess == null) {
return null;
} else {
return currentProcess;
}
return selectedProcess;
}
set {
currentProcess = value;
selectedProcess = value;
}
}
public Thread CurrentThread {
public Thread SelectedThread {
get {
if (IsRunning) return null;
if (CurrentProcess == null) return null;
return CurrentProcess.CurrentThread;
if (SelectedProcess == null) {
return null;
} else {
return SelectedProcess.SelectedThread;
}
}
}
public Function CurrentFunction {
public Function SelectedFunction {
get {
if (IsRunning) return null;
if (CurrentThread == null) {
if (SelectedThread == null) {
return null;
} else {
return CurrentThread.CurrentFunction;
return SelectedThread.SelectedFunction;
}
}
}
@ -187,8 +183,6 @@ namespace Debugger @@ -187,8 +183,6 @@ namespace Debugger
pausedHandle.Reset();
pauseSession = null;
currentProcess = null;
}
/// <summary>
@ -230,22 +224,22 @@ namespace Debugger @@ -230,22 +224,22 @@ namespace Debugger
public void StepInto()
{
CurrentFunction.StepInto();
SelectedFunction.StepInto();
}
public void StepOver()
{
CurrentFunction.StepOver();
SelectedFunction.StepOver();
}
public void StepOut()
{
CurrentFunction.StepOut();
SelectedFunction.StepOut();
}
public void Continue()
{
CurrentProcess.Continue();
SelectedProcess.Continue();
}
public void Terminate()

12
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs

@ -130,7 +130,7 @@ namespace Debugger @@ -130,7 +130,7 @@ namespace Debugger
ClearThreads();
currentProcess = null;
selectedProcess = null;
pausedHandle.Reset();
pauseSession = null;
@ -201,10 +201,10 @@ namespace Debugger @@ -201,10 +201,10 @@ namespace Debugger
public SourcecodeSegment NextStatement {
get {
if (CurrentFunction == null) {
if (SelectedFunction == null || IsRunning) {
return null;
} else {
return CurrentFunction.NextStatement;
return SelectedFunction.NextStatement;
}
}
}
@ -218,11 +218,11 @@ namespace Debugger @@ -218,11 +218,11 @@ namespace Debugger
void OnUpdatingLocalVariables(object sender, VariableCollectionEventArgs e)
{
if (CurrentFunction == null) {
if (SelectedFunction == null || IsRunning) {
e.VariableCollection.UpdateTo(new Variable[] {}); // Make it empty
} else {
e.VariableCollection.UpdateTo(CurrentFunction.Variables);
CurrentFunction.Expired += delegate {
e.VariableCollection.UpdateTo(SelectedFunction.Variables);
SelectedFunction.Expired += delegate {
e.VariableCollection.UpdateTo(new Variable[] {});
};
}

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs

@ -182,7 +182,7 @@ namespace Debugger @@ -182,7 +182,7 @@ namespace Debugger
ICorDebugStepper stepper = CorILFrame.CreateStepper();
stepper.StepOut();
debugger.CurrentThread.AddActiveStepper(stepper);
thread.AddActiveStepper(stepper);
debugger.Continue();
}
@ -214,7 +214,7 @@ namespace Debugger @@ -214,7 +214,7 @@ namespace Debugger
stepper.StepRange(1 /* true - step in*/ , (IntPtr)ranges, (uint)nextSt.StepRanges.Length / 2);
}
debugger.CurrentThread.AddActiveStepper(stepper);
thread.AddActiveStepper(stepper);
}
// Mind that step in which ends in code without symblols is cotinued
@ -231,7 +231,7 @@ namespace Debugger @@ -231,7 +231,7 @@ namespace Debugger
stepper.StepRange(0 /* false - step over*/ , (IntPtr)ranges, (uint)nextSt.StepRanges.Length / 2);
}
debugger.CurrentThread.AddActiveStepper(stepper);
thread.AddActiveStepper(stepper);
debugger.Continue();
}

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

@ -20,7 +20,7 @@ namespace Debugger @@ -20,7 +20,7 @@ namespace Debugger
ICorDebugProcess corProcess;
Thread currentThread;
Thread selectedThread;
bool isProcessRunning = true;
public NDebugger Debugger {
@ -41,26 +41,13 @@ namespace Debugger @@ -41,26 +41,13 @@ namespace Debugger
}
}
public Thread CurrentThread {
public Thread SelectedThread {
get {
if (currentThread == null) {
IList<Thread> threads = Threads;
if (threads.Count > 0) {
currentThread = threads[0];
return selectedThread;
}
set {
selectedThread = value;
}
return currentThread;
}
internal set {
currentThread = value;
}
}
public void SetCurrentThread(Thread thread)
{
CurrentThread = thread;
debugger.Pause();
}
public IList<Thread> Threads {
@ -127,7 +114,7 @@ namespace Debugger @@ -127,7 +114,7 @@ namespace Debugger
isProcessRunning = false;
debugger.PauseSession = new PauseSession(PausedReason.Break);
debugger.CurrentProcess = this;
debugger.SelectedProcess = this;
debugger.Pause();
}

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

@ -32,7 +32,7 @@ namespace Debugger @@ -32,7 +32,7 @@ namespace Debugger
string lastName = string.Empty;
bool hasBeenLoaded = false;
Function currentFunction;
Function selectedFunction;
public NDebugger Debugger {
get {
@ -290,34 +290,17 @@ namespace Debugger @@ -290,34 +290,17 @@ namespace Debugger
}
}
public Function CurrentFunction {
public Function SelectedFunction {
get {
process.AssertPaused();
if (currentFunction == null) {
currentFunction = LastFunctionWithLoadedSymbols;
}
if (currentFunction != null && currentFunction.HasSymbols) {
return currentFunction;
} else {
return null;
}
return selectedFunction;
}
internal set {
set {
if (value != null && !value.HasSymbols) {
throw new DebuggerException("CurrentFunction must have symbols");
throw new DebuggerException("SelectedFunction must have symbols");
}
currentFunction = value;
}
selectedFunction = value;
}
public void SetCurrentFunction(Function function)
{
CurrentFunction = function;
debugger.Pause();
}
public Function LastFunctionWithLoadedSymbols {

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

@ -110,7 +110,7 @@ namespace Debugger @@ -110,7 +110,7 @@ namespace Debugger
this.AssertPaused();
// TODO: Investigate other threads, are they alowed to run?
if (SetupNextEvaluation(CurrentThread)) {
if (SetupNextEvaluation(SelectedThread)) {
evaluating = true;
this.Continue();
return true;

4
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs

@ -209,8 +209,8 @@ namespace Debugger @@ -209,8 +209,8 @@ namespace Debugger
{
// Current frame is used to resolve context specific static values (eg. ThreadStatic)
ICorDebugFrame curFrame = null;
if (debugger.CurrentThread != null && debugger.CurrentThread.LastFunction != null && debugger.CurrentThread.LastFunction.CorILFrame != null) {
curFrame = debugger.CurrentThread.LastFunction.CorILFrame.CastTo<ICorDebugFrame>();
if (debugger.IsPaused && debugger.SelectedThread != null && debugger.SelectedThread.LastFunction != null && debugger.SelectedThread.LastFunction.CorILFrame != null) {
curFrame = debugger.SelectedThread.LastFunction.CorILFrame.CastTo<ICorDebugFrame>();
}
try {

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

@ -227,20 +227,20 @@ namespace Debugger.Tests @@ -227,20 +227,20 @@ namespace Debugger.Tests
StartProgram("Callstack");
WaitForPause(PausedReason.Break, null);
callstack = new List<Function>(debugger.CurrentThread.Callstack);
callstack = new List<Function>(debugger.SelectedThread.Callstack);
Assert.AreEqual("Sub2", callstack[0].Name);
Assert.AreEqual("Sub1", callstack[1].Name);
Assert.AreEqual("Main", callstack[2].Name);
debugger.StepOut();
WaitForPause(PausedReason.StepComplete, null);
callstack = new List<Function>(debugger.CurrentThread.Callstack);
callstack = new List<Function>(debugger.SelectedThread.Callstack);
Assert.AreEqual("Sub1", callstack[0].Name);
Assert.AreEqual("Main", callstack[1].Name);
debugger.StepOut();
WaitForPause(PausedReason.StepComplete, null);
callstack = new List<Function>(debugger.CurrentThread.Callstack);
callstack = new List<Function>(debugger.SelectedThread.Callstack);
Assert.AreEqual("Main", callstack[0].Name);
debugger.Continue();
@ -258,7 +258,7 @@ namespace Debugger.Tests @@ -258,7 +258,7 @@ namespace Debugger.Tests
for(int i = 0; i < 2; i++) {
debugger.Continue();
WaitForPause(PausedReason.Break, null);
args = new List<Variable>(debugger.CurrentFunction.ArgumentVariables);
args = new List<Variable>(debugger.SelectedFunction.ArgumentVariables);
// names
Assert.AreEqual("i", args[0].Name);
Assert.AreEqual("s", args[1].Name);
@ -274,7 +274,7 @@ namespace Debugger.Tests @@ -274,7 +274,7 @@ namespace Debugger.Tests
debugger.Continue();
WaitForPause(PausedReason.Break, null);
args = new List<Variable>(debugger.CurrentFunction.ArgumentVariables);
args = new List<Variable>(debugger.SelectedFunction.ArgumentVariables);
// types
Assert.AreEqual(typeof(PrimitiveValue), args[0].Value.GetType());
Assert.AreEqual(typeof(PrimitiveValue), args[1].Value.GetType());
@ -286,7 +286,7 @@ namespace Debugger.Tests @@ -286,7 +286,7 @@ namespace Debugger.Tests
debugger.Continue();
WaitForPause(PausedReason.Break, null);
args = new List<Variable>(debugger.CurrentFunction.ArgumentVariables);
args = new List<Variable>(debugger.SelectedFunction.ArgumentVariables);
// types
Assert.AreEqual(typeof(PrimitiveValue), args[0].Value.GetType());
Assert.AreEqual(typeof(NullValue), args[1].Value.GetType());
@ -308,7 +308,7 @@ namespace Debugger.Tests @@ -308,7 +308,7 @@ namespace Debugger.Tests
StartProgram("FunctionLocalVariables");
WaitForPause(PausedReason.Break, null);
args = new List<Variable>(debugger.CurrentFunction.LocalVariables);
args = new List<Variable>(debugger.SelectedFunction.LocalVariables);
// names
Assert.AreEqual("i", args[0].Name);
Assert.AreEqual("s", args[1].Name);
@ -339,7 +339,7 @@ namespace Debugger.Tests @@ -339,7 +339,7 @@ namespace Debugger.Tests
StartProgram("FunctionLifetime");
WaitForPause(PausedReason.Break, null);
function = debugger.CurrentFunction;
function = debugger.SelectedFunction;
Assert.IsNotNull(function);
Assert.AreEqual("Function", function.Name);
Assert.AreEqual(false, function.HasExpired);
@ -347,19 +347,19 @@ namespace Debugger.Tests @@ -347,19 +347,19 @@ namespace Debugger.Tests
debugger.Continue(); // Go to the SubFunction
WaitForPause(PausedReason.Break, null);
Assert.AreEqual("SubFunction", debugger.CurrentFunction.Name);
Assert.AreEqual("SubFunction", debugger.SelectedFunction.Name);
Assert.AreEqual(false, function.HasExpired);
Assert.AreEqual("1", function.GetArgumentVariable(0).Value.AsString);
debugger.Continue(); // Go back to Function
WaitForPause(PausedReason.Break, null);
Assert.AreEqual("Function", debugger.CurrentFunction.Name);
Assert.AreEqual("Function", debugger.SelectedFunction.Name);
Assert.AreEqual(false, function.HasExpired);
Assert.AreEqual("1", function.GetArgumentVariable(0).Value.AsString);
debugger.Continue(); // Setp out of function
WaitForPause(PausedReason.Break, null);
Assert.AreEqual("Main", debugger.CurrentFunction.Name);
Assert.AreEqual("Main", debugger.SelectedFunction.Name);
Assert.AreEqual(true, function.HasExpired);
debugger.Continue();
@ -377,7 +377,7 @@ namespace Debugger.Tests @@ -377,7 +377,7 @@ namespace Debugger.Tests
StartProgram("FunctionVariablesLifetime"); // 1 - Enter program
WaitForPause(PausedReason.Break, null);
function = debugger.CurrentFunction;
function = debugger.SelectedFunction;
Assert.IsNotNull(function);
Assert.AreEqual("Function", function.Name);
argument = function.GetArgumentVariable(0);
@ -443,7 +443,7 @@ namespace Debugger.Tests @@ -443,7 +443,7 @@ namespace Debugger.Tests
StartProgram("ArrayValue");
WaitForPause(PausedReason.Break, null);
foreach(Variable var in debugger.CurrentFunction.LocalVariables) {
foreach(Variable var in debugger.SelectedFunction.LocalVariables) {
local = var; break;
}
Assert.AreEqual("array", local.Name);
@ -471,7 +471,7 @@ namespace Debugger.Tests @@ -471,7 +471,7 @@ namespace Debugger.Tests
StartProgram("ObjectValue");
WaitForPause(PausedReason.Break, null);
foreach(Variable var in debugger.CurrentFunction.LocalVariables) {
foreach(Variable var in debugger.SelectedFunction.LocalVariables) {
local = var;
}
Assert.AreEqual("val", local.Name);
@ -514,7 +514,7 @@ namespace Debugger.Tests @@ -514,7 +514,7 @@ namespace Debugger.Tests
StartProgram("PropertyVariable");
WaitForPause(PausedReason.Break, null);
foreach(Variable var in debugger.CurrentFunction.LocalVariables) {
foreach(Variable var in debugger.SelectedFunction.LocalVariables) {
local = var;
}
foreach(Variable var in local.SubVariables) {
@ -559,7 +559,7 @@ namespace Debugger.Tests @@ -559,7 +559,7 @@ namespace Debugger.Tests
StartProgram("PropertyVariableForm");
WaitForPause(PausedReason.Break, null);
foreach(Variable var in debugger.CurrentFunction.LocalVariables) {
foreach(Variable var in debugger.SelectedFunction.LocalVariables) {
local = var;
}
Assert.AreEqual("form", local.Name);
@ -596,9 +596,9 @@ namespace Debugger.Tests @@ -596,9 +596,9 @@ namespace Debugger.Tests
StartProgram("SetIP");
WaitForPause(PausedReason.Break, "1");
Assert.IsNotNull(debugger.CurrentFunction.CanSetIP("SetIP.cs", 16, 0));
Assert.IsNull(debugger.CurrentFunction.CanSetIP("SetIP.cs", 100, 0));
debugger.CurrentFunction.SetIP("SetIP.cs", 16, 0);
Assert.IsNotNull(debugger.SelectedFunction.CanSetIP("SetIP.cs", 16, 0));
Assert.IsNull(debugger.SelectedFunction.CanSetIP("SetIP.cs", 100, 0));
debugger.SelectedFunction.SetIP("SetIP.cs", 16, 0);
debugger.Continue();
WaitForPause(PausedReason.Break, "1");
Assert.AreEqual("1\r\n1\r\n", log);

Loading…
Cancel
Save