コード例 #1
0
ファイル: DebugThread.cs プロジェクト: Xtremrules/dot42
 /// <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
ファイル: DebugProgram.cs プロジェクト: rfcclub/dot42
 /// <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
ファイル: DebugProcess.cs プロジェクト: Xtremrules/dot42
 /// <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
ファイル: DebugEngine.cs プロジェクト: luozhiping1987/dot42
        /// <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);
        }
コード例 #8
0
 /// <summary>
 /// Default ctor
 /// </summary>
 internal DebugBreakpointManager(DebugProgram program, EngineEventCallback eventCallback)
     : base(program)
 {
     this.program       = program;
     this.eventCallback = eventCallback;
 }
コード例 #9
0
ファイル: DebugEngine.cs プロジェクト: rfcclub/dot42
        /// <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;
        }
コード例 #10
0
 /// <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
ファイル: ThreadManager.cs プロジェクト: Xtremrules/dot42
 /// <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;
 }