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

C# IDebugCodeContext2类代码示例

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

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



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

示例1: CanSetNextStatement

        public int CanSetNextStatement(IDebugStackFrame2 pStackFrame, IDebugCodeContext2 pCodeContext)
        {
            DLog.Debug(DContext.VSDebuggerComCall, "IDebugThread2.CanSetNextStatement");

            var stack = (DebugStackFrame)pStackFrame;
            var ctx = (DebugCodeContext)pCodeContext;

            if (stack == null || ctx == null)
                return VSConstants.E_FAIL;

            if (ctx.Location.Equals(stack.Location))
                return VSConstants.S_OK;

            if (!ctx.Location.IsSameMethod(stack.Location))
                return HResults.E_CANNOT_SETIP_TO_DIFFERENT_FUNCTION;

            // for now, only allow to set the position above the current position.
            if(ctx.Location.Index >= stack.Location.Index)
                return VSConstants.E_FAIL;

            // don't check existence of special code, so that we can produce a warning
            // below.

            //var loc = stack.GetDocumentLocationAsync().Await(DalvikProcess.VmTimeout);
            //if (loc.Document == null)
            //    return VSConstants.E_FAIL;

            return VSConstants.S_OK;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:29,代码来源:DebugThread.cs


示例2: AD7DisassemblyStream

 internal AD7DisassemblyStream(AD7Engine engine, enum_DISASSEMBLY_STREAM_SCOPE scope, IDebugCodeContext2 pCodeContext)
 {
     _engine = engine;
     _scope = scope;
     AD7MemoryAddress addr = pCodeContext as AD7MemoryAddress;
     _addr = addr.Address;
 }
开发者ID:lsgxeva,项目名称:MIEngine,代码行数:7,代码来源:AD7Disassembly.cs


示例3: GetCodeContext

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

    public int GetCodeContext (ulong uCodeLocationId, out IDebugCodeContext2 ppCodeContext)
    {
      // 
      // Returns a code context object corresponding to a specified code location identifier.
      // 

      LoggingUtils.PrintFunction ();

      try
      {
        string location = string.Format ("0x{0:X8}", uCodeLocationId);

        ppCodeContext = CLangDebuggeeCodeContext.GetCodeContextForLocation (m_debugger, location);

        if (ppCodeContext == null)
        {
          throw new InvalidOperationException ();
        }

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

        ppCodeContext = null;

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


示例4: CLangDebuggeeDisassemblyStream

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

    public CLangDebuggeeDisassemblyStream (CLangDebugger debugger, enum_DISASSEMBLY_STREAM_SCOPE streamScope, IDebugCodeContext2 codeContext)
    {
      m_debugger = debugger;

      m_streamScope = streamScope;

      m_codeContext = codeContext as DebuggeeCodeContext;
    }
开发者ID:ashumeow,项目名称:android-plus-plus,代码行数:12,代码来源:CLangDebuggeeDisassemblyStream.cs


示例5: GetCodeContext

        /// <summary>
        /// Returns a code context object corresponding to a specified code location identifier.
        /// </summary>
        /// <param name="uCodeLocationId">
        /// [in] Specifies the code location identifier. See the Remarks section for the
        /// IDebugDisassemblyStream2.GetCodeLocationId method for a description of a code location identifier.
        /// </param>
        /// <param name="ppCodeContext">[out] Returns an IDebugCodeContext2 object that represents the associated code context.</param>
        /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
        /// <remarks>
        /// The code location identifier can be returned from a call to the IDebugDisassemblyStream2.GetCurrentLocation
        /// method and can appear in the DisassemblyData structure.
        /// 
        /// To convert a code context into a code location identifier, call the IDebugDisassemblyStream2.GetCodeLocationId
        /// method.
        /// </remarks>
        public int GetCodeContext(ulong uCodeLocationId, out IDebugCodeContext2 ppCodeContext)
        {
            ppCodeContext = null;
            if (uCodeLocationId > (uint)_bytecode.Length)
                return VSConstants.E_INVALIDARG;

            ppCodeContext = new JavaDebugCodeContext(_executionContext.Program, _executionContext.Location.GetMethod().GetLocationOfCodeIndex((long)uCodeLocationId));
            return VSConstants.S_OK;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:25,代码来源:JavaDebugDisassemblyStream.cs


示例6: BreakpointResolutionLocationCode

        public BreakpointResolutionLocationCode(BP_RESOLUTION_LOCATION location, bool releaseComObjects)
        {
            if (location.bpType != (uint)enum_BP_TYPE.BPT_CODE)
                throw new ArgumentException();

            try
            {
                if (location.unionmember1 != IntPtr.Zero)
                    _codeContext = Marshal.GetObjectForIUnknown(location.unionmember1) as IDebugCodeContext2;
            }
            finally
            {
                if (releaseComObjects && location.unionmember1 != IntPtr.Zero)
                    Marshal.Release(location.unionmember1);
            }
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:16,代码来源:BreakpointResolutionLocationCode.cs


示例7: BreakpointLocationCodeContext

        public BreakpointLocationCodeContext(BP_LOCATION location, bool releaseComObjects)
        {
            Contract.Requires<ArgumentException>((enum_BP_LOCATION_TYPE)location.bpLocationType == enum_BP_LOCATION_TYPE.BPLT_CODE_CONTEXT);

            try
            {
                if (location.unionmember1 != IntPtr.Zero)
                    _codeContext = Marshal.GetObjectForIUnknown(location.unionmember2) as IDebugCodeContext2;
            }
            finally
            {
                if (releaseComObjects)
                {
                    if (location.unionmember1 != IntPtr.Zero)
                        Marshal.Release(location.unionmember1);
                }
            }
        }
开发者ID:fjnogueira,项目名称:JavaForVS,代码行数:18,代码来源:BreakpointLocationCodeContext.cs


示例8: GetCodeContext

        public int GetCodeContext(ulong uCodeLocationId, out IDebugCodeContext2 ppCodeContext)
        {
            ppCodeContext = null;

            if (_method == null)
                return HResults.E_DISASM_NOTAVAILABLE;

            var location = _loc.Location.GetAtIndex((uint)uCodeLocationId);
            var ctx = new DebugCodeContext(location);

            // try to set source code.
            var source = _method.FindSourceCode((int)uCodeLocationId);
            if(source != null)
            {
                var docLoc = new DocumentLocation(location, source, _loc.ReferenceType, _loc.Method, _method.TypeEntry, _method.MethodEntry);
                ctx.DocumentContext = new DebugDocumentContext(docLoc, ctx);
            }

            ppCodeContext = ctx;
            return VSConstants.S_OK;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:21,代码来源:DebugDisassemblyStream.cs


示例9: SetNextStatement

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

    public override int SetNextStatement (IDebugStackFrame2 stackFrame, IDebugCodeContext2 codeContext)
    {
      // 
      // Sets the next statement to the given stack frame and code context.
      // 

      LoggingUtils.PrintFunction ();

      try
      {
        throw new NotImplementedException ();

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

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


示例10:

 // Determines whether the next statement can be set to the given stack frame and code context.
 int IDebugThread2.CanSetNextStatement(IDebugStackFrame2 stackFrame, IDebugCodeContext2 codeContext)
 {
     // CLRDBG TODO: This implementation should be changed to compare the method token
     ulong addr = ((AD7MemoryAddress)codeContext).Address;
     AD7StackFrame frame = ((AD7StackFrame)stackFrame);
     if (frame.ThreadContext.Level != 0 || frame.Thread != this || !frame.ThreadContext.pc.HasValue || _engine.DebuggedProcess.MICommandFactory.Mode == MIMode.Clrdbg)
     {
         return Constants.S_FALSE;
     }
     if (addr == frame.ThreadContext.pc)
     {
         return Constants.S_OK;
     }
     string toFunc = EngineUtils.GetAddressDescription(_engine.DebuggedProcess, addr);
     string fromFunc = EngineUtils.GetAddressDescription(_engine.DebuggedProcess, frame.ThreadContext.pc.Value);
     if (toFunc != fromFunc)
     {
         return Constants.S_FALSE;
     }
     return Constants.S_OK;
 }
开发者ID:robindegen,项目名称:MIEngine,代码行数:22,代码来源:AD7Thread.cs


示例11: GetCodeContext

 public int GetCodeContext(out IDebugCodeContext2 ppCodeCxt)
 {
     ppCodeCxt = docContext;
     return VSConstants.S_OK;
 }
开发者ID:nakioman,项目名称:MonoDebugger,代码行数:5,代码来源:MonoStackFrame.cs


示例12: ThrowIfDisposed

 int IDebugThread2.CanSetNextStatement(IDebugStackFrame2 pStackFrame, IDebugCodeContext2 pCodeContext) {
     ThrowIfDisposed();
     return VSConstants.S_FALSE;
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:4,代码来源:AD7Thread.cs


示例13: GetDisassemblyStream

 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream) {
     throw new NotImplementedException();
 }
开发者ID:wenh123,项目名称:PTVS,代码行数:3,代码来源:PythonRemoteDebugProgram.cs


示例14:

 int IDebugThread2.SetNextStatement(IDebugStackFrame2 pStackFrame, IDebugCodeContext2 pCodeContext) {
     return VSConstants.E_NOTIMPL;
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:3,代码来源:AD7Thread.cs


示例15:

 int Microsoft.VisualStudio.Debugger.Interop.IDebugProgram2.GetDisassemblyStream(uint dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     ppDisassemblyStream = null;
     return Utility.COM_HResults.S_OK;
 }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:5,代码来源:CorDebugAppDomain.cs


示例16: EnumCodePaths

 public int EnumCodePaths(string pszHint, IDebugCodeContext2 pStart, IDebugStackFrame2 pFrame, int fSource, out IEnumCodePaths2 ppEnum, out IDebugCodeContext2 ppSafety) {
     throw new NotImplementedException();
 }
开发者ID:wenh123,项目名称:PTVS,代码行数:3,代码来源:PythonRemoteDebugProgram.cs


示例17: EnumCodePaths

 // EnumCodePaths is used for the step-into specific feature -- right click on the current statment and decide which
 // function to step into. This is not something that the SampleEngine supports.
 public int EnumCodePaths(string hint, IDebugCodeContext2 start, IDebugStackFrame2 frame, int fSource, out IEnumCodePaths2 pathEnum, out IDebugCodeContext2 safetyContext)
 {
     pathEnum = null;
     safetyContext = null;
     return Constants.E_NOTIMPL;
 }
开发者ID:wesrupert,项目名称:MIEngine,代码行数:8,代码来源:AD7Engine.cs


示例18: EnumCodePaths

 public int EnumCodePaths(IDebugThread2 pThread, IDebugCodeContext2 pStart, /*enum_STEPUNIT*/uint stepUnit, out IEnumDebugCodePaths90 ppEnum)
 {
     throw new NotImplementedException();
 }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:4,代码来源:JavaDebugProgram.cs


示例19:

        // Gets the code context for this stack frame. The code context represents the current instruction pointer in this stack frame.
        int IDebugStackFrame2.GetCodeContext(out IDebugCodeContext2 memoryAddress)
        {
            memoryAddress = _codeCxt;
            if (memoryAddress == null)
            {
                return Constants.E_FAIL; // annotated frame
            }

            return Constants.S_OK;
        }
开发者ID:robindegen,项目名称:MIEngine,代码行数:11,代码来源:AD7StackFrame.cs


示例20: GetCodeContext

 public int GetCodeContext(out IDebugCodeContext2 ppCodeCxt)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugStackFrame.GetCodeContext");
     ppCodeCxt = GetDocumentContext().CodeContext;
     return VSConstants.S_OK;
 }
开发者ID:rfcclub,项目名称:dot42,代码行数:6,代码来源:DebugStackFrame.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IDebugDraw类代码示例发布时间:2022-05-24
下一篇:
C# IDbTransaction类代码示例发布时间: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