Esempio n. 1
0
 public AD7Thread(AD7Engine engine, DebuggedThread debuggedThread)//ThreadMirror threadMirror)
 {
     _engine = engine;
     
     ThreadMirror = debuggedThread.Thread;
     _debuggedThread = debuggedThread;
 }
 public AD7BoundBreakpoint(AD7Engine aEngine, uint aAddress, AD7PendingBreakpoint aPendingBP, AD7BreakpointResolution breakpointResolution) {
     mEngine = aEngine;
     mAddress = aAddress;
     m_pendingBreakpoint = aPendingBP;
     m_breakpointResolution = breakpointResolution;
     mRemoteID = mEngine.BPMgr.RemoteEnable(this);
 }
 public AD7BoundBreakpoint(uint aAddress)
 {
     mEngine = null;
     mAddress = aAddress;
     m_pendingBreakpoint = null;
     m_breakpointResolution = null;
 }
 public DebuggedThread(ThreadMirror thread, AD7Engine engine)
 {
     Thread = thread;
     Id = thread.TID;
     Name = "";
     TargetId = thread.TID;
     AD7Thread ad7Thread = new AD7Thread(engine, this);
     Client = ad7Thread;
 }
Esempio n. 5
0
    public AD7PendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, AD7Engine engine, BreakpointManager bpManager) {
      m_pBPRequest = pBPRequest;
      BP_REQUEST_INFO[] requestInfo = new BP_REQUEST_INFO[1];
      EngineUtils.CheckOk(m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION, requestInfo));
      mBpRequestInfo = requestInfo[0];
      EngineUtils.CheckOk(m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_THREAD, requestInfo));

      mEngine = engine;
      mBPMgr = bpManager;
    }
Esempio n. 6
0
        public DebuggedThread(ThreadMirror thread, AD7Engine engine)
        {
            Thread   = thread;
            Id       = thread.TID;
            Name     = "";
            TargetId = thread.TID;
            AD7Thread ad7Thread = new AD7Thread(engine, this);

            Client = ad7Thread;
        }
Esempio n. 7
0
        public AD7PendingBreakpoint(IDebugBreakpointRequest2 pBpRequest, AD7Engine engine, BreakpointManager bpManager)
        {
            this._bpRequest = pBpRequest;
            var requestInfo = new BP_REQUEST_INFO[1];

            EngineUtils.CheckOk(this._bpRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION | enum_BPREQI_FIELDS.BPREQI_CONDITION | enum_BPREQI_FIELDS.BPREQI_ALLFIELDS, requestInfo));
            this._bpRequestInfo = requestInfo[0];

            this._engine    = engine;
            this._bpManager = bpManager;

            this._enabled = true;
            this._deleted = false;
        }
        public DebuggedProcess(AD7Engine engine, IPAddress ipAddress, EngineCallback callback)
        {
            _engine = engine;
            _ipAddress = ipAddress;
            Instance = this;

            // we do NOT have real Win32 process IDs, so we use a guid
            AD_PROCESS_ID pid = new AD_PROCESS_ID();
            pid.ProcessIdType = (int)enum_AD_PROCESS_ID.AD_PROCESS_ID_GUID;
            pid.guidProcessId = Guid.NewGuid();
            this.Id = pid;

            _callback = callback;
        }
Esempio n. 9
0
        public AD7PendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, AD7Engine engine, BreakpointManager bpManager)
        {
            _bpRequest = pBPRequest;
            BP_REQUEST_INFO[] requestInfo = new BP_REQUEST_INFO[1];
            EngineUtils.CheckOk(_bpRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION | enum_BPREQI_FIELDS.BPREQI_CONDITION | enum_BPREQI_FIELDS.BPREQI_ALLFIELDS, requestInfo));
            _bpRequestInfo = requestInfo[0];

            _engine           = engine;
            _bpManager        = bpManager;
            _boundBreakpoints = new System.Collections.Generic.List <AD7BoundBreakpoint>();

            _enabled = true;
            _deleted = false;
        }
Esempio n. 10
0
        private void OnEnterBreakMode(EnvDTE.dbgEventReason Reason, ref EnvDTE.dbgExecutionAction ExecutionAction)
        {
            int       activeProcessId = _serviceProvider.GetDTE().Debugger.CurrentProcess.ProcessID;
            AD7Engine engine          = AD7Engine.GetEngines().SingleOrDefault(target => target.Process != null && target.Process.Id == activeProcessId);

            if (engine != null)
            {
                long?activeThreadId = ((IThreadIdMapper)engine).GetPythonThreadId((uint)_serviceProvider.GetDTE().Debugger.CurrentThread.ID);
                if (activeThreadId != null)
                {
                    AttachProcess(engine.Process, engine);
                    ChangeActiveThread(activeThreadId.Value, false);
                }
            }
        }
Esempio n. 11
0
 private void OnReadyForInput()
 {
     if (IsInDebugBreakMode())
     {
         foreach (var engine in AD7Engine.GetEngines())
         {
             if (engine.Process != null)
             {
                 if (!_evaluators.ContainsKey(engine.Process.Id))
                 {
                     AttachProcess(engine.Process, engine);
                 }
             }
         }
     }
 }
Esempio n. 12
0
 private async Task OnReadyForInputAsync()
 {
     if (IsInDebugBreakMode())
     {
         foreach (var engine in AD7Engine.GetEngines())
         {
             if (engine.Process != null)
             {
                 if (!_evaluators.ContainsKey(engine.Process.Id))
                 {
                     await AttachProcessAsync(engine.Process, engine);
                 }
             }
         }
     }
 }
Esempio n. 13
0
    public static string GetAddressDescription(/*DebuggedModule module,*/AD7Engine engine, uint ip)
    {
      AD7StackFrame d = new AD7StackFrame(engine, engine.mThread, engine.mProcess);
      FRAMEINFO info;
      d.SetFrameInfo(enum_FRAMEINFO_FLAGS.FIF_FUNCNAME | enum_FRAMEINFO_FLAGS.FIF_FUNCNAME_ARGS, out info);
      return info.m_bstrFuncName;

      //string location = ip.ToString("x8", CultureInfo.InvariantCulture);

      //if (module != null)
      {
        //  string moduleName = System.IO.Path.GetFileName(module.Name);
        //  location = string.Concat(moduleName, "!", location);
      }

      //return location;
    }
Esempio n. 14
0
        public AD7MemoryAddress(AD7Engine engine, string filename, uint lineno, PythonStackFrame frame = null)
        {
            _engine   = engine;
            _lineNo   = (uint)lineno;
            _filename = filename;
            _frame    = frame;

            var span     = _engine.Process.GetStatementSpan(_filename, (int)_lineNo + 1, 0);
            var startPos = new TEXT_POSITION {
                dwLine = (uint)(span.Start.Line - 1), dwColumn = (uint)(span.Start.Column - 1)
            };
            var endPos = new TEXT_POSITION {
                dwLine = (uint)(span.End.Line - 1), dwColumn = (uint)(span.End.Column - 1)
            };

            _documentContext = new AD7DocumentContext(filename, startPos, endPos, this, frame != null ? frame.Kind : FrameKind.None);
        }
Esempio n. 15
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        /// <param name="exitCode"> The thread's exit code. </param>
        /// <param name="thread"> The AD7Thread object that represents the thread. </param>
        internal static void Send(AD7Engine engine, uint exitCode, AD7Thread thread)
        {
            var eventObject = new AD7ThreadDestroyEvent(exitCode);

            if (thread == null)
            {
                foreach (AD7Thread t in engine.thread)
                {
                    engine.Callback.Send(eventObject, IID, t);
                }
                engine._currentThreadIndex = -1;
            }
            else
            {
                engine.Callback.Send(eventObject, IID, thread);
            }
        }
Esempio n. 16
0
        public static string GetAddressDescription(/*DebuggedModule module,*/ AD7Engine engine, uint ip)
        {
            var d = new AD7StackFrame(engine, engine.mThread, engine.mProcess);

            d.SetFrameInfo(enum_FRAMEINFO_FLAGS.FIF_FUNCNAME | enum_FRAMEINFO_FLAGS.FIF_FUNCNAME_ARGS, out var info);
            return(info.m_bstrFuncName);

            //string location = ip.ToString("x8", CultureInfo.InvariantCulture);

            //if (module != null)
            {
                //  string moduleName = System.IO.Path.GetFileName(module.Name);
                //  location = string.Concat(moduleName, "!", location);
            }

            //return location;
        }
Esempio n. 17
0
        internal static async System.Threading.Tasks.Task RefreshVariableViews(this IServiceProvider serviceProvider)
        {
            EnvDTE.Debugger debugger = serviceProvider.GetDTE().Debugger;
            AD7Engine       engine   = AD7Engine.GetEngineForProcess(debugger.CurrentProcess);

            if (engine != null)
            {
                await engine.RefreshThreadFrames(debugger.CurrentThread.ID);

                var vsDebugger = (IDebugRefreshNotification140)serviceProvider.GetShellDebugger();
                if (vsDebugger != null)
                {
                    // Passing fCallstackFormattingAffected = TRUE to OnExpressionEvaluationRefreshRequested to force refresh
                    vsDebugger.OnExpressionEvaluationRefreshRequested(1);
                }
            }
        }
Esempio n. 18
0
        private void GotoTemplateSourceCode(object sender, EventArgs args) {
            var dte = (EnvDTE.DTE)GetService(typeof(EnvDTE.DTE));

            var curFrame = (StackFrame2)dte.Debugger.CurrentStackFrame;
            
            var frameId = curFrame.Depth;
            var thread = curFrame.Parent;
            var threadId = thread.ID;
            var process = thread.Program;
            var processId = process.Process.ProcessID;

            var mappingDoc = AD7Engine.GetCodeMappingDocument(processId, threadId, (int)(frameId - 1));
            if(mappingDoc != null) {
                var debugger = (IVsDebugger2)GetService(typeof(IVsDebugger));
                IVsTextView view;
                ErrorHandler.ThrowOnFailure(debugger.ShowSource(mappingDoc, 1, 1, 1, 0, out view));
            }
        }
Esempio n. 19
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="aEngine"> The AD7Engine object that represents the DE. </param>
        /// <param name="id"> Thread's ID. </param>
        /// <param name="targetID"> Process' ID + Thread's ID. </param>
        /// <param name="state"> Thread's state. </param>
        /// <param name="priority"> Thread's priority. </param>
        /// <param name="name"> Thread's name. </param>
        /// <param name="fullname"> Full short path file name. </param>
        /// <param name="line"> Line number. </param>
        public AD7Thread(AD7Engine aEngine, string id, string targetID, string state, string priority, string name, string fullname, string line)//, DebuggedThread debuggedThread)
        {
            _engine       = aEngine;
            _suspendCount = 0;
            if (id == "1")
            {
                _threadDisplayName = "Main Thread";
            }
            else
            {
                _threadDisplayName = (name != "") ? name : "<No Name>";
            }

            if (fullname.Contains("~"))
            {
                // Need to lengthen the path used by Visual Studio.
                StringBuilder longPathName = new StringBuilder(1024);
                GetLongPathName(fullname, longPathName, longPathName.Capacity);
                _filename = longPathName.ToString();
            }
            else
            {
                _filename = fullname;
            }

            try
            {
                _line = Convert.ToUInt32(line);
            }
            catch
            {
                _line = 0;
            }

            _id       = id;
            _state    = state;
            _targetID = targetID;
            _priority = priority;
        }
Esempio n. 20
0
        internal static async Task RefreshVariableViewsAsync(this IServiceProvider serviceProvider, CancellationToken ct = default(CancellationToken))
        {
            serviceProvider.GetUIThread().MustBeCalledFromUIThread();
            EnvDTE.Debugger debugger = serviceProvider.GetDTE()?.Debugger;
            if (debugger == null)
            {
                return;
            }
            AD7Engine engine = AD7Engine.GetEngineForProcess(debugger.CurrentProcess);

            if (engine != null)
            {
                await engine.RefreshThreadFrames(debugger.CurrentThread.ID, ct);

                var vsDebugger = serviceProvider.GetShellDebugger() as IDebugRefreshNotification140;
                if (vsDebugger != null)
                {
                    // Passing fCallstackFormattingAffected = TRUE to OnExpressionEvaluationRefreshRequested to force refresh
                    vsDebugger.OnExpressionEvaluationRefreshRequested(1);
                }
            }
        }
        public AD7StackFrame(AD7Engine engine, AD7Thread thread, Mono.Debugger.Soft.StackFrame threadContext)
        {
            Debug.Assert(threadContext != null, "ThreadContext is null");

            Engine = engine;
            this.Thread = thread;
            this.ThreadContext = threadContext;

            _textPosition = RoslynHelper.GetStatementRange(ThreadContext.FileName, ThreadContext.LineNumber, ThreadContext.ColumnNumber);
            _functionName = threadContext.Method.Name;

            //if(threadContext.IsNativeTransition)
            //{

            //}

            if (_textPosition != null)
            {
                docContext = new AD7DocumentContext(_textPosition);
            }

            this.LocalVariables = threadContext.GetVisibleVariables().Select(x => new MonoProperty(threadContext, x)).ToList();
        }
Esempio n. 22
0
 public AD7BreakpointResolution(AD7Engine engine, PythonBreakpoint address, AD7DocumentContext documentContext)
 {
     m_engine          = engine;
     m_address         = address;
     m_documentContext = documentContext;
 }
Esempio n. 23
0
 // Gets the language associated with this document context.
 // The language for this sample is always C++
 int IDebugDocumentContext2.GetLanguageInfo(ref string pbstrLanguage, ref Guid pguidLanguage)
 {
     AD7Engine.MapLanguageInfo(FileName, out pbstrLanguage, out pguidLanguage);
     return(VSConstants.S_OK);
 }
Esempio n. 24
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        public static void Send(AD7Engine engine)
        {
            var xEvent = new AD7EntryPointEvent();

            engine.Callback.Send(xEvent, IID, engine.currentThread());
        }
Esempio n. 25
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="aEngine"> The AD7Engine object that represents the DE. </param>
        /// <param name="aThread"> The AD7Thread object that represents the thread. </param>
        internal static void Send(AD7Engine aEngine, AD7Thread aThread)
        {
            var xMessage = new AD7LoadCompleteEvent();

            aEngine.Callback.Send(xMessage, IID, aThread);
        }
Esempio n. 26
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        /// <param name="exitCode"> The program's exit code. </param>
        internal static void Send(AD7Engine engine, uint exitCode)
        {
            var eventObject = new AD7ProgramDestroyEvent(exitCode);

            engine.Callback.Send(eventObject, IID, null);
        }
Esempio n. 27
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        internal static void Send(AD7Engine engine)
        {
            AD7ProgramCreateEvent eventObject = new AD7ProgramCreateEvent();

            engine.Callback.Send(eventObject, IID, null);
        }
Esempio n. 28
0
 public EngineCallback(AD7Engine engine, IDebugEventCallback2 ad7Callback) {
   m_ad7Callback = ad7Callback;
   m_engine = engine;
 }
Esempio n. 29
0
        internal AD7Process(NameValueCollection aDebugInfo, EngineCallback aCallback, AD7Engine aEngine, IDebugPort2 aPort)
        {
            mCallback = aCallback;
            mDebugInfo = aDebugInfo;

            mLaunch = (LaunchType)Enum.Parse(typeof(LaunchType), aDebugInfo[BuildPropertyNames.LaunchString]);

            if (mDebugDownPipe == null)
            {
                mDebugDownPipe = new Cosmos.Debug.Common.PipeClient(Pipes.DownName);

                mDebugUpPipe = new Cosmos.Debug.Common.PipeServer(Pipes.UpName);
                mDebugUpPipe.DataPacketReceived += mDebugUpPipe_DataPacketReceived;
                mDebugUpPipe.Start();
            }
            else
            {
                mDebugUpPipe.CleanHandlers();
                mDebugUpPipe.DataPacketReceived += mDebugUpPipe_DataPacketReceived;
            }

            // Must be after mDebugDownPipe is initialized
            OutputClear();
            OutputText("Debugger process initialized.");

            mISO = mDebugInfo["ISOFile"];
            OutputText("Using ISO file " + mISO + ".");
            mProjectFile = mDebugInfo["ProjectFile"];
            //
            bool xUseGDB = string.Equals(mDebugInfo[BuildPropertyNames.EnableGDBString], "true", StringComparison.InvariantCultureIgnoreCase);
            OutputText("GDB " + (xUseGDB ? "Enabled" : "Disabled") + ".");
            //
            var xGDBClient = false;
            Boolean.TryParse(mDebugInfo[BuildPropertyNames.StartCosmosGDBString], out xGDBClient);

            switch (mLaunch)
            {
                case LaunchType.VMware:
                    mHost = new Host.VMware(mDebugInfo, xUseGDB);
                    break;
                case LaunchType.Slave:
                    mHost = new Host.Slave(mDebugInfo, xUseGDB);
                    break;
                case LaunchType.Bochs:
                    // The project has been created on another machine or Bochs has been uninstalled since the project has
                    // been created.
                    if (!BochsSupport.BochsEnabled) { throw new Exception(ResourceStrings.BochsIsNotInstalled); }
                    string bochsConfigurationFileName = mDebugInfo[BuildProperties.BochsEmulatorConfigurationFileString];
                    if (string.IsNullOrEmpty(bochsConfigurationFileName))
                    {
                        bochsConfigurationFileName = BuildProperties.BochsDefaultConfigurationFileName;
                    }
                    if (!Path.IsPathRooted(bochsConfigurationFileName))
                    {
                        // Assume the configuration file name is relative to project output path.
                        bochsConfigurationFileName = Path.Combine(new FileInfo(mDebugInfo["ProjectFile"]).Directory.FullName,
                          mDebugInfo["OutputPath"], bochsConfigurationFileName);
                    }
                    FileInfo bochsConfigurationFile = new FileInfo(bochsConfigurationFileName);
                    // TODO : What if the configuration file doesn't exist ? This will throw a FileNotFoundException in
                    // the Bochs class constructor. Is this appropriate behavior ?
                    mHost = new Host.Bochs(mDebugInfo, xUseGDB, bochsConfigurationFile);

                    //((Host.Bochs)mHost).FixBochsConfiguration(new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("IsoFileName", mISO) });
                    break;
                case LaunchType.IntelEdison:
                    mHost = new Host.IntelEdison(mDebugInfo, false);
                    break;
                default:
                    throw new Exception("Invalid Launch value: '" + mLaunch + "'.");
            }
            mHost.OnShutDown += HostShutdown;

            string xDbPath = Path.ChangeExtension(mISO, "cdb");
            if (!File.Exists(xDbPath))
            {
                throw new Exception("Debug data file " + xDbPath + " not found. Could be a omitted build process of Cosmos project so that not created.");
            }

            mDebugInfoDb = new DebugInfo(xDbPath);
            mDebugInfoDb.LoadLookups();

            CreateDebugConnector();
            aEngine.BPMgr.SetDebugConnector(mDbgConnector);

            mEngine = aEngine;
            mThread = new AD7Thread(aEngine, this);
            mCallback.OnThreadStart(mThread);
            mPort = aPort;

            if (xUseGDB && xGDBClient)
            {
                LaunchGdbClient();
            }
        }
Esempio n. 30
0
 public static void Send(AD7Engine engine)
 {
     AD7EngineCreateEvent eventObject = new AD7EngineCreateEvent(engine);
     engine.Callback.Send(eventObject, IID, null, null);
 }
Esempio n. 31
0
    public AD7StackFrame(AD7Engine aEngine, AD7Thread aThread, AD7Process aProcess)
    {
        mEngine = aEngine;
        mThread = aThread;
        mProcess = aProcess;
        var xProcess = mEngine.mProcess;
        if (mHasSource = xProcess.mCurrentAddress.HasValue)
        {
            UInt32 xAddress = xProcess.mCurrentAddress.Value;
            var xSourceInfos = xProcess.mDebugInfoDb.GetSourceInfos(xAddress);
            if (!xSourceInfos.ContainsKey(xAddress))
            {
                //Attempt to find the ASM address of the first ASM line of the C# line that contains
                //the current ASM address line

                // Because of Asm breakpoints the address we have might be in the middle of a C# line.
                // So we find the closest address to ours that is less or equal to ours.
                var xQry = from x in xSourceInfos
                           where x.Key <= xAddress
                           orderby x.Key descending
                           select x.Key;
                if(xQry.Count() > 0)
                {
                    xAddress = xQry.First();
                }
            }
            if (mHasSource = xSourceInfos.ContainsKey(xAddress))
            {
                var xSourceInfo = xSourceInfos[xAddress];
                mDocName = xSourceInfo.SourceFile;
                mFunctionName = xSourceInfo.MethodName;
                mLineNum = (uint)xSourceInfo.Line;

                // Multiple labels that point to a single address can happen because of exception handling exits etc.
                // Because of this given an address, we might find more than one label that matches the address.
                // Currently, the label we are looking for will always be the first one so we choose that one.
                // In the future this might "break", so be careful about this. In the future we may need to classify
                // labels in the output and mark them somehow.
                var xLabelsForAddr = xProcess.mDebugInfoDb.GetLabels(xAddress);
                if (xLabelsForAddr.Length > 0)
                {
                    MethodIlOp xSymbolInfo;
                    string xLabel = xLabelsForAddr[0]; // Necessary for LINQ
                    xSymbolInfo = aProcess.mDebugInfoDb.Connection.Query<MethodIlOp>(new SQLinq<MethodIlOp>().Where(q => q.LabelName == xLabel)).FirstOrDefault();
                    if (xSymbolInfo != null)
                    {
                        var xMethod = mProcess.mDebugInfoDb.Connection.Get<Method>(xSymbolInfo.MethodID);
                        var xAllInfos = aProcess.mDebugInfoDb.Connection.Query<LOCAL_ARGUMENT_INFO>(new SQLinq<LOCAL_ARGUMENT_INFO>().Where(q => q.METHODLABELNAME == xMethod.LabelCall));
                        mLocalInfos = xAllInfos.Where(q => !q.IsArgument).ToArray();
                        mArgumentInfos = xAllInfos.Where(q => q.IsArgument).ToArray();
                        if (mArgumentInfos.Length > 0)
                        {
                            mParams = new DebugLocalInfo[mArgumentInfos.Length];
                            for (int i = 0; i < mArgumentInfos.Length; i++)
                            {
                                mParams[i] = new DebugLocalInfo
                                {
                                    Name = mArgumentInfos[i].NAME,
                                    Index = i,
                                    IsLocal = false
                                };
                            }
                            mParams = mParams.OrderBy(i => i.Name, StringComparer.OrdinalIgnoreCase).ToArray();
                        }

                        if (mLocalInfos.Length > 0)
                        {
                            mLocals = new DebugLocalInfo[mLocalInfos.Length];
                            for (int i = 0; i < mLocalInfos.Length; i++)
                            {
                                mLocals[i] = new DebugLocalInfo
                                {
                                    Name = mLocalInfos[i].NAME,
                                    Index = i,
                                    IsLocal = true
                                };
                            }
                            mLocals = mLocals.OrderBy(i => i.Name, StringComparer.OrdinalIgnoreCase).ToArray();
                        }
                    }
                }
                else
                {
                    MessageBox.Show("No Symbol found for address 0x" + xAddress.ToString("X8").ToUpper());
                }
                xProcess.DebugMsg(String.Format("StackFrame: Returning: {0}#{1}[{2}]", mDocName, mFunctionName, mLineNum));
            }
        }
        if (!mHasSource)
        {
            xProcess.DebugMsg("StackFrame: No Source available");
        }

        // If source information is available, create the collections of locals and parameters and populate them with
        // values from the debuggee.
        //if (m_hasSource) {
        //if (mArgumentInfos.Length > 0) {
        //m_parameters = new VariableInformation[m_numParameters];
        //m_engine.DebuggedProcess.GetFunctionArgumentsByIP(m_threadContext.eip, m_threadContext.ebp, m_parameters);
        //}

        //if (mLocalInfos.Length > 0) {
        //m_locals = new VariableInformation[m_numLocals];
        //m_engine.DebuggedProcess.GetFunctionLocalsByIP(m_threadContext.eip, m_threadContext.ebp, m_locals);
        //}
        //}
    }
Esempio n. 32
0
 public AD7MemoryAddress(AD7Engine engine, uint address)
 {
     m_engine = engine;
     m_address = address;
 }
Esempio n. 33
0
 public BreakpointManager(AD7Engine aEngine) {
     mEngine = aEngine;
 }
 public EngineCallback(AD7Engine engine, IDebugEventCallback2 pCallback)
 {
     _engine = engine;
     _eventCallback = pCallback;
 }
Esempio n. 35
0
 public VisualizerWrapper(string name, AD7Engine engine, IVariableInformation underlyingVariable, Natvis.VisualizerInfo viz, bool isVisualizerView)
     : base(name, engine, underlyingVariable)
 {
     Visualizer        = viz;
     _isVisualizerView = isVisualizerView;
 }
Esempio n. 36
0
 AD7EngineCreateEvent(AD7Engine engine)
 {
     m_engine = engine;
 }
Esempio n. 37
0
 internal static void Send(AD7Engine engine, IDebugThread2 aThread)
 {
     var eventObject = new AD7ThreadCreateEvent();
     engine.Callback.Send(eventObject, IID, aThread);
 }
Esempio n. 38
0
 public SimpleWrapper(string name, AD7Engine engine, IVariableInformation underlyingVariable)
 {
     Parent = underlyingVariable;
     Name = name;
     _engine = engine;
 }
Esempio n. 39
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        public static void Send(AD7Engine engine)
        {
            AD7EngineCreateEvent eventObject = new AD7EngineCreateEvent(engine);

            engine.Callback.Send(eventObject, IID, null, null);
        }
Esempio n. 40
0
 public AD7Thread(AD7Engine engine, PythonThread debuggedThread)
 {
     _engine         = engine;
     _debuggedThread = debuggedThread;
     _vsTid          = engine.RegisterThreadId(debuggedThread.Id);
 }
Esempio n. 41
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        /// <param name="aModule"> The IDebugModule2 object that represents the module which is loading or unloading. </param>
        /// <param name="fLoad"> onzero (TRUE) if the module is loading and zero (FALSE) if the module is unloading. </param>
        internal static void Send(AD7Engine engine, AD7Module aModule, bool fLoad)
        {
            var eventObject = new AD7ModuleLoadEvent(aModule, fLoad);

            engine.Callback.Send(eventObject, IID, null);
        }
Esempio n. 42
0
 internal static void Send(AD7Engine engine, AD7Module aModule, bool fLoad)
 {
     var eventObject = new AD7ModuleLoadEvent(aModule, fLoad);
     engine.Callback.Send(eventObject, IID, null);
 }
Esempio n. 43
0
 internal static void Send(AD7Engine aEngine, AD7Thread aThread)
 {
     var xMessage = new AD7LoadCompleteEvent();
     aEngine.Callback.Send(xMessage, IID, aThread);
 }
 public AD7BreakpointResolution(AD7Engine engine, uint address, AD7DocumentContext documentContext) {
     m_engine = engine;
     m_address = address;
     m_documentContext = documentContext;
 }
Esempio n. 45
0
        /// <summary>
        /// Sends the event.
        /// </summary>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        public static void Send(AD7Engine engine)
        {
            var xEvent = new AD7StepCompletedEvent();

            engine.Callback.Send(xEvent, IID, engine.currentThread());
        }
Esempio n. 46
0
 public AD7Thread(AD7Engine engine, NodeThread debuggedThread)
 {
     this._engine         = engine;
     this._debuggedThread = debuggedThread;
 }
Esempio n. 47
0
 internal static void Send(AD7Engine aEngine, IDebugThread2 aThread, uint aExitCode)
 {
     var xObj = new AD7ThreadDestroyEvent(aExitCode);
     aEngine.Callback.Send(xObj, IID, aThread);
 }
Esempio n. 48
0
 public static void Send(AD7Engine engine)
 {
     var xEvent = new AD7StepCompletedEvent();
     engine.Callback.Send(xEvent, IID, engine.mProcess.Thread);
 }
Esempio n. 49
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="engine"> The AD7Engine object that represents the DE. </param>
 /// <param name="ad7Callback"> The IDebugEventCallback2 object that receives debugger events. </param>
 public EngineCallback(AD7Engine engine, IDebugEventCallback2 ad7Callback)
 {
     m_ad7Callback = ad7Callback;
     m_engine      = engine;
 }
Esempio n. 50
0
 public static void Send(AD7Engine aEngine)
 {
     aEngine.Callback.Send(new AD7EntrypointEvent(), IID, null);
 }
Esempio n. 51
0
 public BreakpointManager(AD7Engine aEngine)
 {
     mEngine = aEngine;
 }
Esempio n. 52
0
 //private AD7EngineCreateEvent(AD7Engine engine)
 public AD7EngineCreateEvent(AD7Engine engine)
 {
     _engine = engine;
 }
Esempio n. 53
0
 public SimpleWrapper(string name, AD7Engine engine, IVariableInformation underlyingVariable)
 {
     Parent  = underlyingVariable;
     Name    = name;
     _engine = engine;
 }
Esempio n. 54
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="engine"> The AD7Engine object that represents the DE. </param>
 AD7EngineCreateEvent(AD7Engine engine)
 {
     m_engine = engine;
 }
Esempio n. 55
0
 public VisualizerWrapper(string name, AD7Engine engine, IVariableInformation underlyingVariable, Natvis.VisualizerInfo viz, bool isVisualizerView)
     : base(name, engine, underlyingVariable)
 {
     Visualizer = viz;
     _isVisualizerView = isVisualizerView;
 }
Esempio n. 56
0
 public AD7Thread(AD7Engine aEngine, AD7Process aProcess) { //, DebuggedThread debuggedThread)
   mEngine = aEngine;
   mProcess = aProcess;
 }
Esempio n. 57
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="aEngine"> The AD7Engine object that represents the DE. </param>
 /// <param name="aPort"> The IDebugPort2 object that represents the port on which the process was launched. </param>
 public AD7Process(AD7Engine aEngine, IDebugPort2 aPort)
 {
     _engine   = aEngine;
     _port     = aPort;
     m_program = aEngine.m_program;
 }
Esempio n. 58
0
 internal static void Send(AD7Engine engine)
 {
     AD7ProgramCreateEvent eventObject = new AD7ProgramCreateEvent();
     engine.Callback.Send(eventObject, IID, null);
 }