コード例 #1
0
 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);
 }
コード例 #2
0
        public void GetInfoFunctionGlobalScopeResolution([Values("::", "::::")] string prefix)
        {
            var name = prefix + NAME;

            mockDebuggerStackFrame.GetFunctionName().Returns(name);

            var fields = FrameInfoFlags.FIF_FUNCNAME;
            var info   = stackFrame.GetInfo(fields);

            Assert.IsTrue(info.ValidFields.HasFlag(FrameInfoFlags.FIF_FUNCNAME));
            Assert.AreEqual(NAME, info.FuncName);
        }
コード例 #3
0
 public string GetFunctionName() => PreprocessFunctionName(_sbFrame.GetFunctionName());