Exemplo n.º 1
0
 void debuggedProcess_DebuggingResumed(object sender, CorDbg.ProcessEventArgs e)
 {
     if (DebugEvent != null)
     {
         DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Resumed));
     }
 }
Exemplo n.º 2
0
 void debuggedProcess_DebuggingResumed(object sender, CorDbg.ProcessEventArgs e)
 {
     OnIsProcessRunningChanged(EventArgs.Empty);
     DebuggerService.RemoveCurrentLineMarker();
 }
Exemplo n.º 3
0
		void debuggedProcess_Paused(object sender, ProcessEventArgs e)
		{
			InvalidatePad();
		}
Exemplo n.º 4
0
 void debugProcessStarted(object sender, ProcessEventArgs e)
 {
     workbench.WidgetController.SetDebugTabsVisible(true);
     workbench.WidgetController.SetPlayButtonsVisible(true);
     workbench.WidgetController.SetDebugStopEnabled();//e.Process.LogMessage += messageEventProc;
     workbench.WidgetController.SetStartDebugDisabled();
     workbench.WidgetController.ChangeStartDebugNameOnContinue();
     workbench.WidgetController.EnableCodeCompletionToolTips(false);
     workbench.WidgetController.SetAddExprMenuVisible(true);
     TooltipServiceManager.hideToolTip();
     IsRunning = true;
     evaluator = new ExpressionEvaluator(e.Process,workbench.VisualEnvironmentCompiler, FileName);
     //CodeFileDocumentControl page = frm.CurrentTabPage;
     //(page.ag as CodeFileDocumentControl).TextEditor.ActiveTextAreaControl.TextArea.ToolTipRequest += TextAreaToolTipRequest;
     //(page.ag as CodeFileDocumentControl).TextEditor.ActiveTextAreaControl.TextArea.MouseLeave += TextAreaMouseLeave;
 }
Exemplo n.º 5
0
 void debuggedProcess_DebuggingResumed(object sender, ProcessEventArgs e)
 {
     //CurrentLineBookmark.Remove();
     //frm.SetDebugStopDisabled();
 }
Exemplo n.º 6
0
 void Paused(object sender, ProcessEventArgs ev)
 {
     Console.Error.WriteLine("Paused:" + ev);
 }
Exemplo n.º 7
0
		void debuggedProcess_DebuggingResumed(object sender, ProcessEventArgs e)
		{
			OnIsProcessRunningChanged(EventArgs.Empty);
			DebuggerService.RemoveCurrentLineMarker();
		}
Exemplo n.º 8
0
		protected virtual void OnProcessSelected(ProcessEventArgs e)
		{
			if (ProcessSelected != null) {
				ProcessSelected(this, e);
			}
		}
Exemplo n.º 9
0
 void debuggedProcess_DebuggeeStateChanged(object sender, ProcessEventArgs e)
 {
     if (currentBreakpoint != null)
     {
     	dbg.RemoveBreakpoint(currentBreakpoint);
         RemoveGotoBreakpoints();
         currentBreakpoint = null; //RemoveBreakpoints();
     }
     JumpToCurrentLine();
     //ChangeLocalVars(e.Process);
     //if (e.Process.IsPaused)
     WorkbenchServiceFactory.DebuggerOperationsService.RefreshPad(new FunctionItem(e.Process.SelectedFunction).SubItems);
     workbench.WidgetController.SetStartDebugEnabled();
 }
Exemplo n.º 10
0
		void debugger_ProcessExited(object sender, ProcessEventArgs e)
		{
			if (debugger.Processes.Count == 0) {
				if (DebugStopped != null) {
					DebugStopped(this, e);
				}
				SelectProcess(null);
			} else {
				SelectProcess(debugger.Processes[0]);
			}
		}
Exemplo n.º 11
0
		void debugger_ProcessStarted(object sender, ProcessEventArgs e)
		{
			if (debugger.Processes.Count == 1) {
				if (DebugStarted != null) {
					DebugStarted(this, EventArgs.Empty);
				}
			}
			e.Process.LogMessage += LogMessage;
		}
Exemplo n.º 12
0
		/// <summary> Is called when the value changes </summary>
		protected virtual void OnChanged(ProcessEventArgs e)
		{
			if (Changed != null) {
				Changed(this, e);
			}
		}
Exemplo n.º 13
0
        void debuggedProcess_DebuggingPaused(object sender, ProcessEventArgs e)
        {
            // Sometimes when we step, we stop and the IP is unknown. If that is the case,
            // execute the same step into/out/over command again.
            // x86: happens when stepping over endfinally
            // x64: happens often, especially when stepping into methods. TODO: This results in
            //		stepping over the first instruction. If we're lucky it's a nop.
            bool isInvalid = debuggedProcess != null &&
                debuggedProcess.SelectedThread != null &&
                debuggedProcess.SelectedThread.MostRecentStackFrame != null &&
                debuggedProcess.SelectedThread.MostRecentStackFrame.IP.IsInvalid;
            if (IntPtr.Size == 8)
                isInvalid = false;

            if (isInvalid) {
                switch (lastStepType) {
                // Call StepOver() and not StepInto() so we don't step into more methods.
                case StepType.StepInto: StepOver(); return;
                case StepType.StepOut: StepOut(); return;
                case StepType.StepOver: StepOver(); return;
                default: Debug.Fail("Unknown StepType"); break;
                }
            }

            lastStepType = StepType.Unknown;
            JumpToCurrentLine();
            if (DebugEvent != null)
                DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Paused));
        }
Exemplo n.º 14
0
 private void Resumed(object sender, ProcessEventArgs ev)
 {
     Console.Error.WriteLine("Resumed:" + ev);
 }
Exemplo n.º 15
0
 private void debuggedProcess_DebuggingPaused(object sender, ProcessEventArgs e)
 {
 	if (MustDebug && e.Process.PausedReason != PausedReason.Exception)
     {
         //System.Threading.Thread.Sleep(10);
         if (Status == DebugStatus.StepOver)
             e.Process.StepOver();
         else
             e.Process.StepInto();
         MustDebug = false;
     }
     workbench.WidgetController.SetDebugPausedDisabled();
 }
Exemplo n.º 16
0
		void debuggedProcess_DebuggingPaused(object sender, ProcessEventArgs e)
		{
			JumpToCurrentLine();
			OnIsProcessRunningChanged(EventArgs.Empty);
		}
Exemplo n.º 17
0
 protected virtual void OnProcessSelected(ProcessEventArgs e)
 {
 }
Exemplo n.º 18
0
		void debuggedProcess_DebuggingPaused(object sender, ProcessEventArgs e)
		{
			OnIsProcessRunningChanged(EventArgs.Empty);
			
			using(new PrintTimes("Jump to current line")) {
				JumpToCurrentLine();
			}
			// TODO update tooltip
			/*if (currentTooltipRow != null && currentTooltipRow.IsShown) {
				using(new PrintTimes("Update tooltip")) {
					try {
						Utils.DoEvents(debuggedProcess);
						AbstractNode updatedNode = ValueNode.Create(currentTooltipExpression);
						currentTooltipRow.SetContentRecursive(updatedNode);
					} catch (AbortedBecauseDebuggeeResumedException) {
					}
				}
			}*/
		}
Exemplo n.º 19
0
 void debugProcessExit(object sender, ProcessEventArgs e)
 {
     if (Exited != null && ExeFileName != null)
         Exited(ExeFileName);
     curPage = null;            
     show_debug_tabs = true;
     workbench.WidgetController.SetPlayButtonsVisible(false);
     workbench.WidgetController.SetAddExprMenuVisible(false);
     DebugWatchListWindowForm.WatchWindow.ClearAllSubTrees();
     IsRunning = false;
     workbench.WidgetController.SetDebugStopDisabled();
     workbench.WidgetController.ChangeContinueDebugNameOnStart();
     //if (cur_brpt != null) dbg.RemoveBreakpoint(cur_brpt);
     CurrentLineBookmark.Remove();
     WorkbenchServiceFactory.DebuggerOperationsService.ClearLocalVarTree();
     WorkbenchServiceFactory.DebuggerOperationsService.ClearDebugTabs();
     WorkbenchServiceFactory.DebuggerOperationsService.ClearWatch();
     workbench.WidgetController.SetDebugTabsVisible(false);
     WorkbenchServiceFactory.OperationsService.ClearTabStack();
     workbench.WidgetController.EnableCodeCompletionToolTips(true);
     RemoveGotoBreakpoints();
     AssemblyHelper.Unload();
     CloseOldToolTip();
     //RemoveMarker(frm.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.Document);
     evaluator = null;
     parser= null;
     FileName = null;
     handle = 0;
     ExeFileName = null;
     FullFileName = null;
     PrevFullFileName = null;
     Status = DebugStatus.None;
     dbg.ProcessStarted -= debugProcessStarted;
     dbg.ProcessExited -= debugProcessExit;
     dbg.BreakpointHit -= debugBreakpointHit;
     debuggedProcess = null;
     //GC.Collect();
     //dbg = null;
 }
Exemplo n.º 20
0
		void debuggedProcess_Paused(object sender, ProcessEventArgs e)
		{
			RefreshPad();
		}
Exemplo n.º 21
0
 void debuggedProcess_DebuggingPaused(object sender, ProcessEventArgs e)
 {
     JumpToCurrentLine();
     if (DebugEvent != null)
         DebugEvent(this, new DebuggerEventArgs(DebuggerEvent.Paused));
 }