• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDebugMemoryContext2类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDebugMemoryContext2的典型用法代码示例。如果您正苦于以下问题:C# IDebugMemoryContext2类的具体用法?C# IDebugMemoryContext2怎么用?C# IDebugMemoryContext2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDebugMemoryContext2类属于命名空间,在下文中一共展示了IDebugMemoryContext2类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ReadAt

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int ReadAt (IDebugMemoryContext2 pStartContext, uint dwCount, byte [] rgbMemory, out uint pdwRead, ref uint pdwUnreadable)
    {
      // 
      // Reads a sequence of bytes, starting at a given location.
      // 

      LoggingUtils.PrintFunction ();

      try
      {
        CONTEXT_INFO [] contextInfoArray = new CONTEXT_INFO [1];

        LoggingUtils.RequireOk (pStartContext.GetInfo (enum_CONTEXT_INFO_FIELDS.CIF_ADDRESSABSOLUTE, contextInfoArray));

        string command = string.Format ("-data-read-memory-bytes {0} {1}", contextInfoArray [0].bstrAddressAbsolute, dwCount);

        MiResultRecord resultRecord = m_debugger.GdbClient.SendSyncCommand (command);

        MiResultRecord.RequireOk (resultRecord, command);

        MiResultValueList memoryStreamList = (MiResultValueList) resultRecord ["memory"] [0];

        for (int s = 0; s < memoryStreamList.Values.Count; ++s)
        {
          if (!memoryStreamList [s].HasField ("contents"))
          {
            throw new InvalidOperationException ("-data-read-memory-bytes result missing 'contents' field");
          }

          string hexValue = memoryStreamList [s] ["contents"] [0].GetString ();

          if ((hexValue.Length / 2) != dwCount)
          {
            throw new InvalidOperationException ();
          }

          for (int i = 0; i < dwCount; ++i)
          {
            rgbMemory [i] = byte.Parse (hexValue.Substring (i * 2, 2), NumberStyles.HexNumber);
          }
        }

        pdwRead = dwCount;

        pdwUnreadable = 0;

        return Constants.S_OK;
      }
      catch (Exception e)
      {
        LoggingUtils.HandleException (e);

        pdwRead = 0;

        pdwUnreadable = dwCount;

        return Constants.E_FAIL;
      }
    }
开发者ID:ashumeow,项目名称:android-plus-plus,代码行数:63,代码来源:CLangDebuggeeMemoryBytes.cs


示例2: Compare

 /// <summary>
 /// Compares the memory context to each context in the given array in the manner indicated by compare flags, returning an index of the first context that matches.
 /// </summary>
 /// <param name="Compare">A value from the CONTEXT_COMPARE enumeration that determines the type of comparison.</param>
 /// <param name="rgpMemoryContextSet">An array of references to the IDebugMemoryContext2 objects to compare against.</param>
 /// <param name="dwMemoryContextSetLen">The number of contexts in the rgpMemoryContextSet array.</param>
 /// <param name="pdwMemoryContext">Returns the index of the first memory context that satisfies the comparison.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code. Returns E_COMPARE_CANNOT_COMPARE if the two contexts cannot be compared.</returns>
 /// <remarks>A debug engine (DE) does not have to support all types of comparisons, but it must support at least CONTEXT_EQUAL, CONTEXT_LESS_THAN, CONTEXT_GREATER_THAN and CONTEXT_SAME_SCOPE.</remarks>
 public virtual int Compare( enum_CONTEXT_COMPARE Compare,
     IDebugMemoryContext2[] rgpMemoryContextSet,
     uint dwMemoryContextSetLen,
     out uint pdwMemoryContext)
 {
     Logger.Debug( string.Empty );
     pdwMemoryContext = 0;
     return VSConstants.E_NOTIMPL;
 }
开发者ID:IntelliTect,项目名称:PowerStudio,代码行数:18,代码来源:CodeDocumentContext.cs


示例3: Compare

        public int Compare(enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2[] rgpMemoryContextSet, uint dwMemoryContextSetLen, out uint pdwMemoryContext)
        {
            for(int i = 0; i < dwMemoryContextSetLen; ++i)
            {
                pdwMemoryContext = (uint)i;
                var other = rgpMemoryContextSet[i] as DebugCodeContext;
                if (other == null)
                    return HResults.E_COMPARE_CANNOT_COMPARE;

                var isSameMethod = Equals(Location.Class, other.Location.Class) && Equals(Location.Method, other.Location.Method);

                switch (Compare)
                {
                    case enum_CONTEXT_COMPARE.CONTEXT_EQUAL:
                        if (location.Equals(other.Location))
                            return VSConstants.S_OK;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN:
                        if (!isSameMethod) return HResults.E_COMPARE_CANNOT_COMPARE;

                        if(Location.CompareTo(other.Location) > 0)
                            return VSConstants.S_OK;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN_OR_EQUAL:
                        if (!isSameMethod) return HResults.E_COMPARE_CANNOT_COMPARE;
                        if (Location.CompareTo(other.Location) >= 0)
                            return VSConstants.S_OK;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN:
                        if (!isSameMethod) return HResults.E_COMPARE_CANNOT_COMPARE;
                        if (Location.CompareTo(other.Location) < 0)
                            return VSConstants.S_OK;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN_OR_EQUAL:
                        if (!isSameMethod) return HResults.E_COMPARE_CANNOT_COMPARE;
                        if (Location.CompareTo(other.Location) <= 0)
                            return VSConstants.S_OK;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_PROCESS:
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_MODULE:
                        return VSConstants.S_OK;
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_FUNCTION:
                        if(isSameMethod)
                            return VSConstants.S_OK;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_SCOPE:
                        // TODO: analyze scopes.
                        if(isSameMethod)
                            return VSConstants.S_OK;
                        break;
                }
            }

            pdwMemoryContext = (uint)0;
            return VSConstants.S_FALSE;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:56,代码来源:DebugCodeContext.cs


示例4: switch

        int IDebugMemoryContext2.Compare(enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2[] rgpMemoryContextSet, uint dwMemoryContextSetLen, out uint pdwMemoryContext) {
            pdwMemoryContext = 0;

            for (int i = 0; i < rgpMemoryContextSet.Length; ++i) {
                var other = rgpMemoryContextSet[i] as AD7MemoryAddress;
                if (other == null || other.Engine != Engine) {
                    continue;
                }

                bool match = false;
                switch (Compare) {
                    case enum_CONTEXT_COMPARE.CONTEXT_EQUAL:
                        match = (LineNumber == other.LineNumber);
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN:
                        match = (LineNumber < other.LineNumber);
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN_OR_EQUAL:
                        match = (LineNumber <= other.LineNumber);
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN:
                        match = (LineNumber > other.LineNumber);
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN_OR_EQUAL:
                        match = (LineNumber >= other.LineNumber);
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_PROCESS:
                        match = true;
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_MODULE:
                        match = (FileName == other.FileName);
                        break;
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_FUNCTION:
                    case enum_CONTEXT_COMPARE.CONTEXT_SAME_SCOPE:
                        match = (LineNumber == other.LineNumber && FileName == other.FileName);
                        break;
                    default:
                        return VSConstants.E_NOTIMPL;
                }

                if (match) {
                    pdwMemoryContext = (uint)i;
                    return VSConstants.S_OK;
                }
            }

            return VSConstants.S_FALSE;
        }
开发者ID:Microsoft,项目名称:RTVS,代码行数:48,代码来源:AD7MemoryAddress.cs


示例5: Compare

 public int Compare(enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2[] rgpMemoryContextSet,
     uint dwMemoryContextSetLen, out uint pdwMemoryContext)
 {
     throw new NotImplementedException();
 }
开发者ID:aluitink,项目名称:aspnet-debug2,代码行数:5,代码来源:AD7DocumentContext.cs


示例6: GetMemoryContext

 // Returns the memory context for a property value.
 public int GetMemoryContext(out IDebugMemoryContext2 ppMemory)
 {
     ppMemory = null;
     if (_variableInformation.Error)
         return AD7_HRESULT.S_GETMEMORYCONTEXT_NO_MEMORY_CONTEXT;
     // try to interpret the result as an address
     string v = _variableInformation.Value;
     v = v.Trim();
     if (v.Length == 0)
     {
         return AD7_HRESULT.S_GETMEMORYCONTEXT_NO_MEMORY_CONTEXT;
     }
     if (v[0] == '{')
     {
         // strip type name and trailing spaces
         v = v.Substring(v.IndexOf('}') + 1);
         v = v.Trim();
     }
     int i = v.IndexOf(' ');
     if (i > 0)
     {
         v = v.Substring(0, i);
     }
     uint addr;
     if (!UInt32.TryParse(v, System.Globalization.NumberStyles.Any, null, out addr))
     {
         if (v.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
         {
             v = v.Substring(2);
             if (!UInt32.TryParse(v, System.Globalization.NumberStyles.AllowHexSpecifier, null, out addr))
             {
                 return AD7_HRESULT.S_GETMEMORYCONTEXT_NO_MEMORY_CONTEXT;
             }
         }
         else
         {
             return AD7_HRESULT.S_GETMEMORYCONTEXT_NO_MEMORY_CONTEXT;
         }
     }
     ppMemory = new AD7MemoryAddress(DebuggedProcess.g_Process.Engine, addr, null);
     return Constants.S_OK;
 }
开发者ID:robindegen,项目名称:MIEngine,代码行数:43,代码来源:AD7Property.cs


示例7: Subtract

 public int Subtract(ulong dwCount, out IDebugMemoryContext2 ppMemCxt)
 {
     throw new NotImplementedException();
 }
开发者ID:aluitink,项目名称:aspnet-debug2,代码行数:4,代码来源:AD7DocumentContext.cs


示例8:

 int IDebugProperty2.GetMemoryContext(out IDebugMemoryContext2 ppMemory) {
     ppMemory = null;
     return VSConstants.E_NOTIMPL;
 }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:4,代码来源:AD7Property.cs


示例9: Compare

        // Compares the memory context to each context in the given array in the manner indicated by compare flags,
        // returning an index of the first context that matches.
        public int Compare(enum_CONTEXT_COMPARE contextCompare, IDebugMemoryContext2[] compareToItems, uint compareToLength, out uint foundIndex)
        {
            foundIndex = uint.MaxValue;

            try
            {
                for (uint c = 0; c < compareToLength; c++)
                {
                    AD7MemoryAddress compareTo = compareToItems[c] as AD7MemoryAddress;
                    if (compareTo == null)
                    {
                        continue;
                    }

                    if (!AD7Engine.ReferenceEquals(_engine, compareTo._engine))
                    {
                        continue;
                    }

                    bool result;

                    switch (contextCompare)
                    {
                        case enum_CONTEXT_COMPARE.CONTEXT_EQUAL:
                            result = (_address == compareTo._address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN:
                            result = (_address < compareTo._address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN:
                            result = (_address > compareTo._address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN_OR_EQUAL:
                            result = (_address <= compareTo._address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN_OR_EQUAL:
                            result = (_address >= compareTo._address);
                            break;

                        // The debug engine doesn't understand scopes
                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_SCOPE:
                            result = (_address == compareTo._address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_FUNCTION:
                            if (_address == compareTo._address)
                            {
                                result = true;
                                break;
                            }
                            string funcThis = Engine.GetAddressDescription(_address);
                            if (string.IsNullOrEmpty(funcThis))
                            {
                                result = false;
                                break;
                            }
                            string funcCompareTo = Engine.GetAddressDescription(compareTo._address);
                            result = (funcThis == funcCompareTo);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_MODULE:
                            result = (_address == compareTo._address);
                            if (result == false)
                            {
                                DebuggedModule module = _engine.DebuggedProcess.ResolveAddress(_address);

                                if (module != null)
                                {
                                    result = module.AddressInModule(compareTo._address);
                                }
                            }
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_PROCESS:
                            result = true;
                            break;

                        default:
                            // A new comparison was invented that we don't support
                            return Constants.E_NOTIMPL;
                    }

                    if (result)
                    {
                        foundIndex = c;
                        return Constants.S_OK;
                    }
                }

                return Constants.S_FALSE;
            }
            catch (MIException e)
            {
                return e.HResult;
//.........这里部分代码省略.........
开发者ID:robindegen,项目名称:MIEngine,代码行数:101,代码来源:AD7MemoryAddress.cs


示例10: GetMemoryContext

 /// <summary>
 /// Returns the memory context for a property value. (http://msdn.microsoft.com/en-ca/library/bb147028.aspx)
 /// Not implemented. 
 /// </summary>
 /// <param name="ppMemory"> Returns the IDebugMemoryContext2 object that represents the memory associated with this property. </param>
 /// <returns> Not implemented. </returns>
 public int GetMemoryContext(out IDebugMemoryContext2 ppMemory)
 {
     throw new Exception("The method or operation is not implemented.");
 }
开发者ID:blackberry,项目名称:VSPlugin,代码行数:10,代码来源:AD7Property.cs


示例11: Compare

 public int Compare(enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2[] rgpMemoryContextSet, uint dwMemoryContextSetLen, out uint pdwMemoryContext)
 {
     pdwMemoryContext = 0;
     return VSConstants.E_FAIL;
 }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:5,代码来源:DebugDocumentCodeContext.cs


示例12: Subtract

 // Subtracts a specified value from the current context's address to create a new context.
 public int Subtract(ulong dwCount, out IDebugMemoryContext2 ppMemCxt)
 {
     ppMemCxt = new AD7MemoryAddress(_engine, _address - (uint)dwCount, null);
     return Constants.S_OK;
 }
开发者ID:robindegen,项目名称:MIEngine,代码行数:6,代码来源:AD7MemoryAddress.cs


示例13:

 int IDebugCodeContext2.Subtract(ulong dwCount, out IDebugMemoryContext2 ppMemCxt) {
     return IDebugMemoryContext2.Subtract(dwCount, out ppMemCxt);
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:3,代码来源:AD7MemoryAddress.cs


示例14: Compare

        // Compares the memory context to each context in the given array in the manner indicated by compare flags, 
        // returning an index of the first context that matches.
        public int Compare(enum_CONTEXT_COMPARE uContextCompare, IDebugMemoryContext2[] compareToItems, uint compareToLength, out uint foundIndex)
        {
            foundIndex = uint.MaxValue;

            try
            {
                enum_CONTEXT_COMPARE contextCompare = (enum_CONTEXT_COMPARE)uContextCompare;

                for (uint c = 0; c < compareToLength; c++)
                {
                    AD7MemoryAddress compareTo = compareToItems[c] as AD7MemoryAddress;
                    if (compareTo == null)
                    {
                        continue;
                    }

                    if (!AD7Engine.ReferenceEquals(this.m_engine, compareTo.m_engine))
                    {
                        continue;
                    }

                    bool result;

                    switch (contextCompare)
                    {
                        case enum_CONTEXT_COMPARE.CONTEXT_EQUAL:
                            result = (this.m_address == compareTo.m_address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN:
                            result = (this.m_address < compareTo.m_address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN:
                            result = (this.m_address > compareTo.m_address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN_OR_EQUAL:
                            result = (this.m_address <= compareTo.m_address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN_OR_EQUAL:
                            result = (this.m_address >= compareTo.m_address);
                            break;

                        // The sample debug engine doesn't understand scopes or functions
                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_SCOPE:
                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_FUNCTION:
                            result = (this.m_address == compareTo.m_address);
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_MODULE:
                            result = (this.m_address == compareTo.m_address);
                            if (result == false)
                            {
                                //DebuggedModule module = m_engine.DebuggedProcess.ResolveAddress(m_address);

                                //if (module != null)
                                //{
                                //    result = (compareTo.m_address >= module.BaseAddress) &&
                                //        (compareTo.m_address < module.BaseAddress + module.Size);
                                //}
                            }
                            break;

                        case enum_CONTEXT_COMPARE.CONTEXT_SAME_PROCESS:
                            result = true;
                            break;

                        default:
                            // A new comparison was invented that we don't support
                            return VSConstants.E_NOTIMPL;
                    }

                    if (result)
                    {
                        foundIndex = c;
                        return VSConstants.S_OK;
                    }
                }

                return VSConstants.S_FALSE;
            }
            //catch (ComponentException e)
            //{
            //    return e.HResult;
            //}
            catch (Exception e)
            {
                return EngineUtils.UnexpectedException(e);
            }
        }
开发者ID:ChrisJamesSadler,项目名称:Cosmos,代码行数:94,代码来源:AD7MemoryAddress.cs


示例15: Subtract

 // Subtracts a specified value from the current context's address to create a new context.
 public int Subtract(ulong dwCount, out IDebugMemoryContext2 ppMemCxt)
 {
     ppMemCxt = new AD7MemoryAddress(m_engine, (uint)dwCount - m_address);
     return VSConstants.S_OK;
 }
开发者ID:ChrisJamesSadler,项目名称:Cosmos,代码行数:6,代码来源:AD7MemoryAddress.cs


示例16: Subtract

 public int Subtract(ulong dwCount, out IDebugMemoryContext2 ppMemCxt)
 {
     ppMemCxt = null;
     return VSConstants.E_FAIL;
 }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:5,代码来源:DebugDocumentCodeContext.cs


示例17: Compare

        /// <summary>
        /// Compares the memory context to each context in the given array in the manner indicated by compare flags, returning an index of the first context that matches.
        /// </summary>
        /// <param name="Compare">[in] A value from the CONTEXT_COMPARE enumeration that determines the type of comparison.</param>
        /// <param name="rgpMemoryContextSet">[in] An array of references to the IDebugMemoryContext2 objects to compare against.</param>
        /// <param name="dwMemoryContextSetLen">[in] The number of contexts in the rgpMemoryContextSet array.</param>
        /// <param name="pdwMemoryContext">[out] Returns the index of the first memory context that satisfies the comparison.</param>
        /// <returns>If successful, returns S_OK; otherwise, returns an error code. Returns E_COMPARE_CANNOT_COMPARE if the two contexts cannot be compared.</returns>
        /// <remarks>
        /// A debug engine (DE) does not have to support all types of comparisons, but it must support at least CONTEXT_EQUAL, CONTEXT_LESS_THAN, CONTEXT_GREATER_THAN and CONTEXT_SAME_SCOPE.
        /// </remarks>
        public int Compare(enum_CONTEXT_COMPARE Compare, IDebugMemoryContext2[] rgpMemoryContextSet, uint dwMemoryContextSetLen, out uint pdwMemoryContext)
        {
            if (rgpMemoryContextSet == null)
                throw new ArgumentNullException("rgpMemoryContextSet");
            if (rgpMemoryContextSet.Length < dwMemoryContextSetLen)
                throw new ArgumentException();

            pdwMemoryContext = 0;

            bool relational = false;
            switch (Compare)
            {
            case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN:
            case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN_OR_EQUAL:
            case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN:
            case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN_OR_EQUAL:
                relational = true;
                break;
            }

            JavaDebugCodeContext[] contexts = new JavaDebugCodeContext[dwMemoryContextSetLen];
            for (int i = 0; i < contexts.Length; i++)
            {
                if (rgpMemoryContextSet[i] == null)
                    return VSConstants.E_INVALIDARG;

                contexts[i] = rgpMemoryContextSet[i] as JavaDebugCodeContext;
                if (contexts[i] == null)
                    return AD7Constants.E_COMPARE_CANNOT_COMPARE;

                // relational tests only work if the contexts are in the same scope
                if (relational && !this.Location.GetMethod().Equals(contexts[i].Location.GetMethod()))
                    return AD7Constants.E_COMPARE_CANNOT_COMPARE;
            }

            int index;

            switch (Compare)
            {
            case enum_CONTEXT_COMPARE.CONTEXT_EQUAL:
                index = Array.FindIndex(contexts, i => this.Location.Equals(i.Location));
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN:
                index = Array.FindIndex(contexts, i => i.Location.GetCodeIndex() > this.Location.GetCodeIndex());
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_GREATER_THAN_OR_EQUAL:
                index = Array.FindIndex(contexts, i => i.Location.GetCodeIndex() >= this.Location.GetCodeIndex());
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN:
                index = Array.FindIndex(contexts, i => i.Location.GetCodeIndex() < this.Location.GetCodeIndex());
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_LESS_THAN_OR_EQUAL:
                index = Array.FindIndex(contexts, i => i.Location.GetCodeIndex() <= this.Location.GetCodeIndex());
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_SAME_FUNCTION:
                index = Array.FindIndex(contexts, i => this.Location.GetMethod().Equals(i.Location.GetMethod()));
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_SAME_MODULE:
                throw new NotImplementedException();

            case enum_CONTEXT_COMPARE.CONTEXT_SAME_PROCESS:
                index = Array.FindIndex(contexts, i => this.Program.Process == i.Program.Process);
                break;

            case enum_CONTEXT_COMPARE.CONTEXT_SAME_SCOPE:
                index = Array.FindIndex(contexts, i => this.Location.GetMethod().Equals(i.Location.GetMethod()));
                break;

            default:
                throw new ArgumentException();
            }

            if (index < 0)
            {
                return VSConstants.E_FAIL;
            }

            pdwMemoryContext = (uint)index;
            return VSConstants.S_OK;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:97,代码来源:JavaDebugCodeContext.cs


示例18: Add

 // Adds a specified value to the current context's address to create a new context.
 public int Add(ulong dwCount, out IDebugMemoryContext2 newAddress)
 {
     newAddress = new AD7MemoryAddress(_engine, (uint)dwCount + _address, null);
     return Constants.S_OK;
 }
开发者ID:robindegen,项目名称:MIEngine,代码行数:6,代码来源:AD7MemoryAddress.cs


示例19: Add

 /// <summary>
 /// Adds the specified value to the current context and returns a new context.
 /// </summary>
 /// <param name="dwCount">The value to add to the current context.</param>
 /// <param name="ppMemCxt"> Returns a new IDebugMemoryContext2 object.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
 /// <remarks>
 /// A memory context is an address, so adding a value to an address produces a new address that requires a new context interface.
 /// 
 /// This method must always produce a new context, even if the resulting address is outside the memory space associated with this context. The only exception to this is if no memory can be allocated for the new context or if ppMemCxt is a null value (which is an error).
 /// </remarks>
 public virtual int Add( ulong dwCount, out IDebugMemoryContext2 ppMemCxt )
 {
     Logger.Debug( string.Empty );
     ppMemCxt = null;
     return VSConstants.E_NOTIMPL;
 }
开发者ID:IntelliTect,项目名称:PowerStudio,代码行数:17,代码来源:CodeDocumentContext.cs


示例20: ReadAt

 public int ReadAt(IDebugMemoryContext2 pStartContext, uint dwCount, byte[] rgbMemory, out uint pdwRead, ref uint pdwUnreadable)
 {
     throw new NotImplementedException();
 }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:4,代码来源:JavaDebugMemoryBytes.cs



注:本文中的IDebugMemoryContext2类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDebugProcess2类代码示例发布时间:2022-05-24
下一篇:
C# IDebugEventCallback2类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap