|
|
|
@ -74,11 +74,15 @@ namespace Debugger |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> Returns true is this incance can not be used any more.
|
|
|
|
/// <summary> Returns true is this incance can not be used any more. </summary>
|
|
|
|
/// Stack frame is valid only until the debugee is resumed. </summary>
|
|
|
|
|
|
|
|
public bool IsInvalid { |
|
|
|
public bool IsInvalid { |
|
|
|
get { |
|
|
|
get { |
|
|
|
return this.corILFramePauseSession != process.PauseSession; |
|
|
|
try { |
|
|
|
|
|
|
|
object frame = this.CorILFrame; |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} catch (DebuggerException) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -108,7 +112,13 @@ namespace Debugger |
|
|
|
|
|
|
|
|
|
|
|
internal ICorDebugILFrame CorILFrame { |
|
|
|
internal ICorDebugILFrame CorILFrame { |
|
|
|
get { |
|
|
|
get { |
|
|
|
if (this.IsInvalid) throw new DebuggerException("StackFrame is not valid anymore"); |
|
|
|
if (corILFramePauseSession != this.Process.PauseSession) { |
|
|
|
|
|
|
|
// Reobtain the stackframe
|
|
|
|
|
|
|
|
StackFrame stackFrame = this.Thread.GetStackFrameAt(chainIndex, frameIndex); |
|
|
|
|
|
|
|
if (stackFrame.MethodInfo != this.MethodInfo) throw new DebuggerException("The stack frame on the thread does not represent the same method anymore"); |
|
|
|
|
|
|
|
corILFrame = stackFrame.corILFrame; |
|
|
|
|
|
|
|
corILFramePauseSession = stackFrame.corILFramePauseSession; |
|
|
|
|
|
|
|
} |
|
|
|
return corILFrame; |
|
|
|
return corILFrame; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -121,13 +131,6 @@ namespace Debugger |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
internal StackFrame Reobtain() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
StackFrame stackFrame = this.Thread.GetStackFrameAt(chainIndex, frameIndex); |
|
|
|
|
|
|
|
if (stackFrame.MethodInfo != this.MethodInfo) throw new DebuggerException("The stack frame on the thread does not represent the same method anymore"); |
|
|
|
|
|
|
|
return stackFrame; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SourcecodeSegment GetSegmentForOffet(uint offset) |
|
|
|
SourcecodeSegment GetSegmentForOffet(uint offset) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return SourcecodeSegment.Resolve(this.MethodInfo.Module, corFunction, offset); |
|
|
|
return SourcecodeSegment.Resolve(this.MethodInfo.Module, corFunction, offset); |
|
|
|
|