diff --git a/src/ddebug/common/debugger.d b/src/ddebug/common/debugger.d index 26eb6f2..99a7f2f 100644 --- a/src/ddebug/common/debugger.d +++ b/src/ddebug/common/debugger.d @@ -71,6 +71,8 @@ interface Debugger : ProgramExecution { void execStepIn(); /// step out void execStepOut(); + /// restart + void execRestart(); /// update list of breakpoints void setBreakpoints(Breakpoint[] bp); @@ -217,6 +219,10 @@ class DebuggerProxy : Debugger, DebuggerCallback { void execStepOut() { _debugger.postRequest(delegate() { _debugger.execStepOut(); }); } + /// restart + void execRestart() { + _debugger.postRequest(delegate() { _debugger.execRestart(); }); + } /// update list of breakpoints void setBreakpoints(Breakpoint[] breakpoints) { Breakpoint[] cloned; diff --git a/src/ddebug/gdb/gdbinterface.d b/src/ddebug/gdb/gdbinterface.d index 1d165ab..5bf125d 100644 --- a/src/ddebug/gdb/gdbinterface.d +++ b/src/ddebug/gdb/gdbinterface.d @@ -281,6 +281,11 @@ class GDBInterface : ConsoleDebuggerInterface { void execStepOut() { _stepOutRequestId = sendCommand("-exec-finish"); } + /// restart + int _restartRequestId; + void execRestart() { + //_restartRequestId = sendCommand("-exec-restart"); + } private GDBBreakpoint[] _breakpoints; private static class GDBBreakpoint { diff --git a/src/dlangide/ui/debuggerui.d b/src/dlangide/ui/debuggerui.d index 9251483..96e8d64 100644 --- a/src/dlangide/ui/debuggerui.d +++ b/src/dlangide/ui/debuggerui.d @@ -107,7 +107,9 @@ class DebuggerUIHandler : DebuggerCallback { _debugger.execContinue(); return true; case IDEActions.DebugStop: - _debugger.execStop(); + //_debugger.execStop(); + Log.d("Trying to stop debugger"); + _debugger.stop(); return true; case IDEActions.DebugStepInto: if (_state == DebuggingState.paused) @@ -122,7 +124,7 @@ class DebuggerUIHandler : DebuggerCallback { _debugger.execStepOut(); return true; case IDEActions.DebugRestart: - //_debugger.execStepOut(); + _debugger.execRestart(); return true; default: return false;