Пример #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
        {
            //
            // Gets the disassembly stream for this program or part of this program.
            //

            LoggingUtils.PrintFunction();

            ppDisassemblyStream = null;

            try
            {
                if (AttachedEngine == null)
                {
                    throw new InvalidOperationException();
                }

                LoggingUtils.RequireOk(AttachedEngine.NativeDebugger.NativeProgram.GetDisassemblyStream(dwScope, pCodeContext, out ppDisassemblyStream));

                //LoggingUtils.RequireOk (AttachedEngine.JavaDebugger.JavaProgram.GetDisassemblyStream (dwScope, pCodeContext, out ppDisassemblyStream));

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

                return(Constants.E_FAIL);
            }
        }
 public virtual IDebugDisassemblyStream2 Create(enum_DISASSEMBLY_STREAM_SCOPE scope,
                                                IDebugCodeContext2 codeContext,
                                                RemoteTarget target)
 {
     return(new DebugDisassemblyStream(_codeContextFactory, _documentContextFactory,
                                       scope, codeContext, target));
 }
Пример #3
0
 public int GetDisassemblyStream(
     enum_DISASSEMBLY_STREAM_SCOPE scope, IDebugCodeContext2 codeContext,
     out IDebugDisassemblyStream2 disassemblyStream)
 {
     disassemblyStream = null;
     return(VSConstants.E_NOTIMPL);
 }
Пример #4
0
 public int /*IDebugProgram3*/ GetDisassemblyStream(
     enum_DISASSEMBLY_STREAM_SCOPE dwScope,
     IDebugCodeContext2 pCodeContext,
     out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     throw new NotImplementedException();
 }
        public void GetScope()
        {
            var scope = new enum_DISASSEMBLY_STREAM_SCOPE[1];

            Assert.AreEqual(VSConstants.S_OK, _disassemblyStream.GetScope(scope));
            Assert.AreEqual(_testScope, scope[0]);
        }
Пример #6
0
 internal AD7DisassemblyStream(AD7Engine engine, enum_DISASSEMBLY_STREAM_SCOPE scope, IDebugCodeContext2 pCodeContext)
 {
     _engine = engine;
     _scope = scope;
     AD7MemoryAddress addr = pCodeContext as AD7MemoryAddress;
     _addr = addr.Address;
 }
Пример #7
0
        internal AD7DisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE scope, IDebugCodeContext2 pCodeContext)
        {
            _scope = scope;
            AD7MemoryAddress addr = pCodeContext as AD7MemoryAddress;

            _addr = addr.Address;
        }
Пример #8
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext,
                                 out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     DebugHelper.TraceEnteringMethod();
     ppDisassemblyStream = null;
     return(VSConstants.E_NOTIMPL);
 }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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

      m_streamScope = streamScope;

      m_codeContext = codeContext as DebuggeeCodeContext;
    }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
        {
            LoggingUtils.PrintFunction();

            ppDisassemblyStream = null;

            return(Constants.E_NOTIMPL);
        }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int GetDisassemblyStream (enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
    {
      LoggingUtils.PrintFunction ();

      ppDisassemblyStream = new CLangDebuggeeDisassemblyStream (m_debugger, dwScope, pCodeContext);

      return Constants.S_OK;
    }
Пример #12
0
 /// <summary>
 /// Gets the disassembly stream for this program or a part of this program.
 /// </summary>
 /// <param name="dwScope"> Specifies a value from the DISASSEMBLY_STREAM_SCOPE enumeration that defines the scope of the disassembly stream.</param>
 /// <param name="pCodeContext">An IDebugCodeContext2 object that represents the position of where to start the disassembly stream.</param>
 /// <param name="ppDisassemblyStream">Returns an IDebugDisassemblyStream2 object that represents the disassembly stream.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code. Returns E_DISASM_NOTSUPPORTED if disassembly is not supported for this particular architecture.</returns>
 /// <remarks>
 /// If the dwScopes parameter has the DSS_HUGE flag of the DISASSEMBLY_STREAM_SCOPE enumeration set, then the disassembly is expected to return a large number of disassembly instructions, for example, for an entire file or module. If the DSS_HUGE flag is not set, then the disassembly is expected to be confined to a small region, typically that of a single function.
 /// </remarks>
 public virtual int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope,
                                         IDebugCodeContext2 pCodeContext,
                                         out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     Logger.Debug(string.Empty);
     ppDisassemblyStream = null;
     return(VSConstants.E_NOTIMPL);
 }
Пример #13
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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

            m_streamScope = streamScope;

            m_codeContext = codeContext as DebuggeeCodeContext;
        }
Пример #14
0
 public int GetDisassemblyStream(
     enum_DISASSEMBLY_STREAM_SCOPE scope, IDebugCodeContext2 codeContext,
     out IDebugDisassemblyStream2 disassemblyStream)
 {
     disassemblyStream = _debugDisassemblyStreamFactory.Create(
         scope, codeContext, _lldbTarget);
     return(VSConstants.S_OK);
 }
        DebugDisassemblyStream(DebugCodeContext.Factory codeContextFactory,
                               DebugDocumentContext.Factory documentContextFactory,
                               enum_DISASSEMBLY_STREAM_SCOPE scope, IDebugCodeContext2 codeContext,
                               RemoteTarget target)
        {
            _codeContextFactory     = codeContextFactory;
            _documentContextFactory = documentContextFactory;
            _scope  = scope;
            _target = target;

            // Used to cache line entries from the last read call
            _lineEntryCache = new Dictionary <ulong, LineEntryInfo>();

            // Extract the address from {codeContext}.
            _address = codeContext.GetAddress();
        }
        public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
        {
            ppDisassemblyStream = null;

            if (pCodeContext == null)
            {
                throw new ArgumentNullException("pCodeContext");
            }

            JavaDebugCodeContext codeContext = pCodeContext as JavaDebugCodeContext;

            if (codeContext == null)
            {
                return(VSConstants.E_INVALIDARG);
            }

            ppDisassemblyStream = new JavaDebugDisassemblyStream(codeContext);
            return(VSConstants.S_OK);
        }
Пример #17
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "IDebugProgram2.GetDisassemblyStream");
     ppDisassemblyStream = new DebugDisassemblyStream(this, ((DebugCodeContext)pCodeContext));
     return(VSConstants.S_OK);
 }
Пример #18
0
 public int GetScope(enum_DISASSEMBLY_STREAM_SCOPE[] pdwScope)
 {
     pdwScope[0] = enum_DISASSEMBLY_STREAM_SCOPE.DSS_FUNCTION;
     return VSConstants.S_OK;
 }
Пример #19
0
 int IDebugProgram3.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     return(IDebugProgram2.GetDisassemblyStream(dwScope, pCodeContext, out ppDisassemblyStream));
 }
Пример #20
0
 int IDebugProgram2.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     ppDisassemblyStream = null;
     return(VSConstants.E_NOTIMPL);
 }
Пример #21
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "IDebugProgram2.GetDisassemblyStream");
     throw new NotImplementedException();
 }
Пример #22
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream) {
     throw new NotImplementedException();
 }
Пример #23
0
 public int GetScope(enum_DISASSEMBLY_STREAM_SCOPE[] pdwScope)
 {
     pdwScope[0] = _scope;
     return Constants.S_OK;
 }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int GetDisassemblyStream (enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
    {
      LoggingUtils.PrintFunction ();

      ppDisassemblyStream = null;

      return Constants.E_NOTIMPL;
    }
Пример #25
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "IDebugProgram2.GetDisassemblyStream");
     ppDisassemblyStream = new DebugDisassemblyStream(this, ((DebugCodeContext)pCodeContext));
     return VSConstants.S_OK;
 }
Пример #26
0
 /// <summary>
 ///     The debugger calls this when it needs to obtain the IDebugDisassemblyStream2 for a particular code-context.
 ///     The sample engine does not support dissassembly so it returns E_NOTIMPL
 ///     In order for this to be called, the Disassembly capability must be set in the registry for this Engine
 /// </summary>
 /// <param name="dwScope"></param>
 /// <param name="pCodeContext"></param>
 /// <param name="ppDisassemblyStream"></param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext,
                                 out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     ppDisassemblyStream = null;
     return(E_NOTIMPL);
 }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int GetScope (enum_DISASSEMBLY_STREAM_SCOPE [] pdwScope)
    {
      // 
      // Gets the scope of this disassembly stream.
      // 

      LoggingUtils.PrintFunction ();

      pdwScope [0] = m_streamScope;

      return Constants.S_OK;
    }
Пример #28
0
 // The debugger calls this when it needs to obtain the IDebugDisassemblyStream2 for a particular code-context.
 // The sample engine does not support dissassembly so it returns E_NOTIMPL
 // In order for this to be called, the Disassembly capability must be set in the registry for this Engine
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 codeContext, out IDebugDisassemblyStream2 disassemblyStream)
 {
     disassemblyStream = new AD7DisassemblyStream(this, dwScope, codeContext);
     return Constants.S_OK;
 }
Пример #29
0
 /// <summary>
 /// Gets the disassembly stream for this program or a part of this program.
 /// The sample engine does not support dissassembly so it returns E_NOTIMPL
 /// </summary>
 /// <param name="dwScope"> Specifies a value from the DISASSEMBLY_STREAM_SCOPE enumeration that defines the scope of the 
 /// disassembly stream.</param>
 /// <param name="codeContext"> An object that represents the position of where to start the disassembly stream. </param>
 /// <param name="disassemblyStream"> Returns an IDebugDisassemblyStream2 object that represents the disassembly stream. </param>
 /// <returns> VSConstants.E_NOTIMPL. </returns>
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 codeContext, out IDebugDisassemblyStream2 disassemblyStream)
 {
     disassemblyStream = null;
     return VSConstants.E_NOTIMPL;
 }
Пример #30
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "IDebugProgram2.GetDisassemblyStream");
     throw new NotImplementedException();
 }
Пример #31
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     Log.Debug("Program: GetDisassemblyStream");
     ppDisassemblyStream = null;
     return VSConstants.E_NOTIMPL;
 }
Пример #32
0
 int IDebugProgram2.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     Debug.WriteLine("AD7ProgramNode: Entering GetDisassemblyStream");
     throw new NotImplementedException();
 }
Пример #33
0
 int IDebugProgram3.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream) {
     return IDebugProgram2.GetDisassemblyStream(dwScope, pCodeContext, out ppDisassemblyStream);
 }
Пример #34
0
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     Log.Debug("Program: GetDisassemblyStream");
     ppDisassemblyStream = null;
     return(VSConstants.E_NOTIMPL);
 }
Пример #35
0
 int IDebugProgram2.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream) {
     ppDisassemblyStream = null;
     return VSConstants.E_NOTIMPL;
 }
        public int GetScope(enum_DISASSEMBLY_STREAM_SCOPE[] pdwScope)
        {
            if (pdwScope == null)
                throw new ArgumentNullException("pdwScope");
            if (pdwScope.Length == 0)
                throw new ArgumentException();

            pdwScope[0] = enum_DISASSEMBLY_STREAM_SCOPE.DSS_FUNCTION;
            return VSConstants.S_OK;
        }
 int Microsoft.VisualStudio.Debugger.Interop.IDebugProgram2.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     ppDisassemblyStream = null;
     return(COM_HResults.S_OK);
 }
Пример #38
0
        public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
        {
            ppDisassemblyStream = null;

            if (pCodeContext == null)
                throw new ArgumentNullException("pCodeContext");

            JavaDebugCodeContext codeContext = pCodeContext as JavaDebugCodeContext;
            if (codeContext == null)
                return VSConstants.E_INVALIDARG;

            ppDisassemblyStream = new JavaDebugDisassemblyStream(codeContext);
            return VSConstants.S_OK;
        }
 int IDebugProgram2.GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
   Debug.WriteLine("AD7ProgramNode: Entering GetDisassemblyStream");
   throw new NotImplementedException();
 }
Пример #40
0
 // The debugger calls this when it needs to obtain the IDebugDisassemblyStream2 for a particular code-context.
 // The sample engine does not support dissassembly so it returns E_NOTIMPL
 // In order for this to be called, the Disassembly capability must be set in the registry for this Engine
 public int GetDisassemblyStream(enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 codeContext, out IDebugDisassemblyStream2 disassemblyStream)
 {
     disassemblyStream = new AD7DisassemblyStream(this, dwScope, codeContext);
     return(Constants.S_OK);
 }
Пример #41
0
 /// <summary>
 /// Gets the disassembly stream for this program or a part of this program.
 /// </summary>
 /// <param name="dwScope"> Specifies a value from the DISASSEMBLY_STREAM_SCOPE enumeration that defines the scope of the disassembly stream.</param>
 /// <param name="pCodeContext">An IDebugCodeContext2 object that represents the position of where to start the disassembly stream.</param>
 /// <param name="ppDisassemblyStream">Returns an IDebugDisassemblyStream2 object that represents the disassembly stream.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code. Returns E_DISASM_NOTSUPPORTED if disassembly is not supported for this particular architecture.</returns>
 /// <remarks>
 /// If the dwScopes parameter has the DSS_HUGE flag of the DISASSEMBLY_STREAM_SCOPE enumeration set, then the disassembly is expected to return a large number of disassembly instructions, for example, for an entire file or module. If the DSS_HUGE flag is not set, then the disassembly is expected to be confined to a small region, typically that of a single function.
 /// </remarks>
 public virtual int GetDisassemblyStream( enum_DISASSEMBLY_STREAM_SCOPE dwScope,
     IDebugCodeContext2 pCodeContext,
     out IDebugDisassemblyStream2 ppDisassemblyStream)
 {
     Logger.Debug( string.Empty );
     ppDisassemblyStream = null;
     return VSConstants.E_NOTIMPL;
 }