コード例 #1
0
        public void GetName()
        {
            string name;

            Assert.AreEqual(VSConstants.S_OK, memoryContext.GetName(out name));
            Assert.AreEqual(TEST_NAME.Value, name);
        }
コード例 #2
0
        public void GetNameNull()
        {
            string name;

            memoryContext = memoryContextFactory.Create(TEST_PC, null);
            Assert.AreEqual(VSConstants.S_OK, memoryContext.GetName(out name));
            Assert.AreEqual($"{TEST_PC_STR}", name);
        }
コード例 #3
0
 public ulong TebAddress() {
     IDebugProperty2 debugProperty = this.EvaluateExpression(this.CurrentThread, "@tib");
     if (debugProperty != null) {
         using (new DisposableComReference(debugProperty)) {
             DEBUG_PROPERTY_INFO[] debugPropertyInfo = new DEBUG_PROPERTY_INFO[1];
             if (debugProperty.GetPropertyInfo((uint)enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE, 16, evaluateExpressionTimeout, null, 0, debugPropertyInfo) == S_OK) {
                 IDebugMemoryContext2 memoryContext = null;
                 if (debugProperty.GetMemoryContext(out memoryContext) == S_OK) {
                     string hexString;
                     memoryContext.GetName(out hexString);
                     hexString = hexString.Substring(2);  // Strip '0x' for conversion to ulong
                     return ulong.Parse(hexString, NumberStyles.HexNumber);
                 }
             }
         }
     }
     return 0;
 }
コード例 #4
0
 int IDebugCodeContext2.GetName(out string pbstrName)
 {
     return(IDebugMemoryContext2.GetName(out pbstrName));
 }