Browse Source

Code from Function.CreateStepper moved to Stepper constructor

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1398 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
943b083085
  1. 19
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs
  2. 7
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Stepper.cs

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

@ -57,6 +57,12 @@ namespace Debugger
return module; return module;
} }
} }
public Thread Thread {
get {
return thread;
}
}
public bool IsStatic { public bool IsStatic {
get { get {
@ -127,7 +133,7 @@ namespace Debugger
methodProps = module.MetaData.GetMethodProps(corFunction.Token); methodProps = module.MetaData.GetMethodProps(corFunction.Token);
// Expiry the function when it is finished // Expiry the function when it is finished
stepOutStepper = CreateStepper(); stepOutStepper = new Stepper(this);
stepOutStepper.StepOut(); stepOutStepper.StepOut();
stepOutStepper.PauseWhenComplete = false; stepOutStepper.PauseWhenComplete = false;
stepOutStepper.StepComplete += delegate { stepOutStepper.StepComplete += delegate {
@ -180,13 +186,6 @@ namespace Debugger
} }
} }
internal Stepper CreateStepper()
{
Stepper stepper = new Stepper(this, corILFrame.CreateStepper());
thread.Steppers.Add(stepper);
return stepper;
}
public void StepInto() public void StepInto()
{ {
Step(true); Step(true);
@ -219,14 +218,14 @@ namespace Debugger
Stepper stepper; Stepper stepper;
if (stepIn) { if (stepIn) {
stepper = CreateStepper(); stepper = new Stepper(this);
stepper.StepIn(nextSt.StepRanges); stepper.StepIn(nextSt.StepRanges);
} }
// Without JMC step in which ends in code without symblols is cotinued. // Without JMC step in which ends in code without symblols is cotinued.
// The next step over ensures that we at least do step over. // The next step over ensures that we at least do step over.
stepper = CreateStepper(); stepper = new Stepper(this);
stepper.StepOver(nextSt.StepRanges); stepper.StepOver(nextSt.StepRanges);
debugger.Continue(); debugger.Continue();

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

@ -49,16 +49,19 @@ namespace Debugger
} }
} }
public Stepper(Function function, ICorDebugStepper corStepper) public Stepper(Function function)
{ {
this.function = function; this.function = function;
this.corStepper = corStepper;
corStepper = function.CorILFrame.CreateStepper();
// Turn on Just-My-Code // Turn on Just-My-Code
if (corStepper.Is<ICorDebugStepper2>()) { // Is the debuggee .NET 2.0? if (corStepper.Is<ICorDebugStepper2>()) { // Is the debuggee .NET 2.0?
corStepper.SetUnmappedStopMask(CorDebugUnmappedStop.STOP_NONE); corStepper.SetUnmappedStopMask(CorDebugUnmappedStop.STOP_NONE);
corStepper.CastTo<ICorDebugStepper2>().SetJMC(1 /* true */); corStepper.CastTo<ICorDebugStepper2>().SetJMC(1 /* true */);
} }
function.Thread.Steppers.Add(this);
} }
protected internal virtual void OnStepComplete() { protected internal virtual void OnStepComplete() {

Loading…
Cancel
Save