public void GetPhysicalStackRangeFail()
        {
            mockDebuggerStackFrame.GetFunction().GetStartAddress().Returns((SbAddress)null);
            mockDebuggerStackFrame.GetFunction().GetEndAddress().Returns((SbAddress)null);
            mockDebuggerStackFrame.GetSymbol().GetStartAddress().Returns((SbAddress)null);
            mockDebuggerStackFrame.GetSymbol().GetEndAddress().Returns((SbAddress)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);
 }
Example #3
0
 public ulong GetPC() => _sbFrame.GetPC();