public void GetPhysicalStackRangeFailWithNullTarget() { mockDebuggerStackFrame.GetThread().GetProcess().GetTarget().Returns((SbTarget)null); mockDebuggerStackFrame.GetPC().Returns(ulong.MaxValue); var result = stackFrame.GetPhysicalStackRange(); Assert.Null(result); }
SbFrame CreateMockStackFrame() { mockDebuggerStackFrame = Substitute.For <SbFrame>(); mockDebuggerStackFrame.GetPC().Returns(TEST_PC); mockDebuggerStackFrame.GetThread().GetProcess().GetTarget().Returns(mockTarget); mockDebuggerStackFrame.GetFunction().GetStartAddress().GetLoadAddress(mockTarget) .Returns(FUNCTION_ADDRESS_MIN); mockDebuggerStackFrame.GetFunction().GetEndAddress().GetLoadAddress(mockTarget) .Returns(FUNCTION_ADDRESS_MAX); mockDebuggerStackFrame.GetSymbol().GetStartAddress().GetLoadAddress(mockTarget) .Returns(SYMBOL_ADDRESS_MIN); mockDebuggerStackFrame.GetSymbol().GetEndAddress().GetLoadAddress(mockTarget) .Returns(SYMBOL_ADDRESS_MAX); mockDebuggerStackFrame.GetFunctionName().Returns(NAME); return(mockDebuggerStackFrame); }
public RemoteThread GetThread() => _threadFactory.Create(_sbFrame.GetThread());