示例#1
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugThread(DebugProgram program, EngineEventCallback eventCallback, ThreadManager manager, ThreadId threadId, int tid)
     : base(threadId, manager)
 {
     this.program = program;
     this.eventCallback = eventCallback;
     this.tid = tid;
 }
示例#2
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugThread(DebugProgram program, EngineEventCallback eventCallback, ThreadManager manager, ThreadId threadId, int tid)
     : base(threadId, manager)
 {
     this.program       = program;
     this.eventCallback = eventCallback;
     this.tid           = tid;
 }
示例#3
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugProgram(DebugProcess process, DebuggerLib.Debugger debugger, string apkPath, MapFile mapFile, EngineEventCallback eventCallback)
     : base(debugger, mapFile, apkPath)
 {
     this.process       = process;
     this.apkPath       = apkPath;
     this.eventCallback = eventCallback;
     programGuid        = Guid.NewGuid();
     modules.Add(new DebugModule());
 }
示例#4
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugProgram(DebugProcess process, DebuggerLib.Debugger debugger, string apkPath, MapFile mapFile, EngineEventCallback eventCallback)
     : base(debugger, mapFile)
 {
     this.process = process;
     this.apkPath = apkPath;
     this.eventCallback = eventCallback;
     programGuid = Guid.NewGuid();
     modules.Add(new DebugModule());
 }
示例#5
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugProcess(DebugEngine engine, DebugPort port, DebuggerLib.Debugger debugger, int processId, Guid guid, string apkPath, MapFile mapFile, EngineEventCallback eventCallback)
 {
     this.engine = engine;
     this.port = port;
     this.debugger = debugger;
     this.processId = processId;
     this.guid = guid;
     this.apkPath = apkPath;
     this.eventCallback = eventCallback;
     creationDate = DateTime.Now;
     program = new DebugProgram(this, debugger, apkPath, mapFile, eventCallback);
     program.Terminated += OnProgramTerminated;
 }
示例#6
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugProcess(DebugEngine engine, DebugPort port, DebuggerLib.Debugger debugger, int processId, Guid guid, string apkPath, MapFile mapFile, EngineEventCallback eventCallback)
 {
     this.engine         = engine;
     this.port           = port;
     this.debugger       = debugger;
     this.processId      = processId;
     this.guid           = guid;
     this.apkPath        = apkPath;
     this.eventCallback  = eventCallback;
     creationDate        = DateTime.Now;
     program             = new DebugProgram(this, debugger, apkPath, mapFile, eventCallback);
     program.Terminated += OnProgramTerminated;
 }
示例#7
0
        /// <summary>
        /// Launch the actual debug process.
        /// </summary>
        public int LaunchSuspended(string pszServer, IDebugPort2 pPort, string pszExe, string pszArgs, string pszDir, string bstrEnv, string pszOptions, enum_LAUNCH_FLAGS dwLaunchFlags, uint hStdInput, uint hStdOutput, uint hStdError, IDebugEventCallback2 pCallback, out IDebugProcess2 ppProcess)
        {
            DLog.Debug(DContext.VSDebuggerComCall, "IDebugEngine2.LaunchSuspended");

            ppProcess = null;
            var port = pPort as DebugPort;

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

            // Create event callback
            eventCallback = new EngineEventCallback(this, pCallback);

            // Notify creation
            eventCallback.Send(new EngineCreateEvent(this));

            // Get debugger
            var guid     = new Guid(pszOptions);
            var debugger = Launcher.GetAndRemoveDebugger(guid, out stateUpdate);

            // Load map file
            var mapFilePath = Path.ChangeExtension(pszExe, ".d42map");
            var mapFile     = File.Exists(mapFilePath) ? new MapFile(mapFilePath) : new MapFile();

            // copy exception to program now, in case it was delayed
            CopyExceptionMapToProgramIfDirty();

            // Create new process
            var process = new DebugProcess(this, port, debugger, Environment.TickCount, guid, pszExe, mapFile, eventCallback);
            var program = process.Program;

            process.Terminated += (s, x) => ((IDebugEngine2)this).DestroyProgram(program);

            // Record process
            ((DebugPort)pPort).RecordProcess(process);
            // Return result
            ppProcess = process;
            return(VSConstants.S_OK);
        }
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugBreakpointManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program       = program;
     this.eventCallback = eventCallback;
 }
示例#9
0
        /// <summary>
        /// Launch the actual debug process.
        /// </summary>
        public int LaunchSuspended(string pszServer, IDebugPort2 pPort, string pszExe, string pszArgs, string pszDir, string bstrEnv, string pszOptions, enum_LAUNCH_FLAGS dwLaunchFlags, uint hStdInput, uint hStdOutput, uint hStdError, IDebugEventCallback2 pCallback, out IDebugProcess2 ppProcess)
        {
            DLog.Debug(DContext.VSDebuggerComCall, "IDebugEngine2.LaunchSuspended");

            ppProcess = null;
            var port = pPort as DebugPort;
            if (pPort == null)
                return VSConstants.E_INVALIDARG;

            // Create event callback
            eventCallback = new EngineEventCallback(this, pCallback);

            // Notify creation
            eventCallback.Send(new EngineCreateEvent(this));

            // Get debugger
            var guid = new Guid(pszOptions);
            var debugger = Launcher.GetAndRemoveDebugger(guid, out stateUpdate);

            // Load map file
            var mapFilePath = Path.ChangeExtension(pszExe, ".d42map");
            var mapFile = File.Exists(mapFilePath) ? new MapFile(mapFilePath) : new MapFile();
            
            // Create new process
            var process = new DebugProcess(this, port, debugger, Environment.TickCount, guid, pszExe, mapFile, eventCallback);
            var program = process.Program;
            process.Terminated += (s, x) => ((IDebugEngine2)this).DestroyProgram(program);

            // Record process
            ((DebugPort)pPort).RecordProcess(process);
            // Return result
            ppProcess = process;
            return VSConstants.S_OK;
        }
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugExceptionManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program       = program;
     this.eventCallback = eventCallback;
 }
示例#11
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugExceptionManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program = program;
     this.eventCallback = eventCallback;
 }
示例#12
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public ThreadManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program = program;
     this.eventCallback = eventCallback;
 }
示例#13
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public ThreadManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program       = program;
     this.eventCallback = eventCallback;
 }
示例#14
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugBreakpointManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program = program;
     this.eventCallback = eventCallback;
 }