mirror of https://github.com/buggins/dlangide.git
gdb support, continuing
This commit is contained in:
parent
3b94eda9c1
commit
e0a406578c
|
@ -33,6 +33,16 @@ interface Debugger : ProgramExecution {
|
||||||
void execStart();
|
void execStart();
|
||||||
/// continue execution
|
/// continue execution
|
||||||
void execContinue();
|
void execContinue();
|
||||||
|
/// stop program execution
|
||||||
|
void execStop();
|
||||||
|
/// interrupt execution
|
||||||
|
void execPause();
|
||||||
|
/// step over
|
||||||
|
void execStepOver();
|
||||||
|
/// step in
|
||||||
|
void execStepIn();
|
||||||
|
/// step out
|
||||||
|
void execStepOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ResponseCode : int {
|
enum ResponseCode : int {
|
||||||
|
@ -143,6 +153,26 @@ class DebuggerProxy : Debugger, DebuggerCallback {
|
||||||
void execContinue() {
|
void execContinue() {
|
||||||
_debugger.postRequest(delegate() { _debugger.execContinue(); });
|
_debugger.postRequest(delegate() { _debugger.execContinue(); });
|
||||||
}
|
}
|
||||||
|
/// stop program execution
|
||||||
|
void execStop() {
|
||||||
|
_debugger.postRequest(delegate() { _debugger.execStop(); });
|
||||||
|
}
|
||||||
|
/// interrupt execution
|
||||||
|
void execPause() {
|
||||||
|
_debugger.postRequest(delegate() { _debugger.execPause(); });
|
||||||
|
}
|
||||||
|
/// step over
|
||||||
|
void execStepOver() {
|
||||||
|
_debugger.postRequest(delegate() { _debugger.execStepOver(); });
|
||||||
|
}
|
||||||
|
/// step in
|
||||||
|
void execStepIn() {
|
||||||
|
_debugger.postRequest(delegate() { _debugger.execStepIn(); });
|
||||||
|
}
|
||||||
|
/// step out
|
||||||
|
void execStepOut() {
|
||||||
|
_debugger.postRequest(delegate() { _debugger.execStepOut(); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class DebuggerBase : Thread, Debugger {
|
abstract class DebuggerBase : Thread, Debugger {
|
||||||
|
|
|
@ -229,6 +229,9 @@ class GDBInterface : ConsoleDebuggerInterface {
|
||||||
if (_stopRequested)
|
if (_stopRequested)
|
||||||
return;
|
return;
|
||||||
Log.d("GDBInterface.stop()");
|
Log.d("GDBInterface.stop()");
|
||||||
|
postRequest(delegate() {
|
||||||
|
execStop();
|
||||||
|
});
|
||||||
_stopRequested = true;
|
_stopRequested = true;
|
||||||
postRequest(delegate() {
|
postRequest(delegate() {
|
||||||
});
|
});
|
||||||
|
@ -251,6 +254,32 @@ class GDBInterface : ConsoleDebuggerInterface {
|
||||||
_continueRequestId = sendCommand("-exec-continue");
|
_continueRequestId = sendCommand("-exec-continue");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// stop program execution
|
||||||
|
int _stopRequestId;
|
||||||
|
void execStop() {
|
||||||
|
_continueRequestId = sendCommand("-gdb-exit");
|
||||||
|
}
|
||||||
|
/// interrupt execution
|
||||||
|
int _pauseRequestId;
|
||||||
|
void execPause() {
|
||||||
|
_pauseRequestId = sendCommand("-exec-interrupt");
|
||||||
|
}
|
||||||
|
/// step over
|
||||||
|
int _stepOverRequestId;
|
||||||
|
void execStepOver() {
|
||||||
|
_stepOverRequestId = sendCommand("-exec-next");
|
||||||
|
}
|
||||||
|
/// step in
|
||||||
|
int _stepInRequestId;
|
||||||
|
void execStepIn() {
|
||||||
|
_stepInRequestId = sendCommand("-exec-step");
|
||||||
|
}
|
||||||
|
/// step out
|
||||||
|
int _stepOutRequestId;
|
||||||
|
void execStepOut() {
|
||||||
|
_stepOutRequestId = sendCommand("-exec-finish");
|
||||||
|
}
|
||||||
|
|
||||||
// ~message
|
// ~message
|
||||||
void handleStreamLineCLI(string s) {
|
void handleStreamLineCLI(string s) {
|
||||||
Log.d("GDB CLI: ", s);
|
Log.d("GDB CLI: ", s);
|
||||||
|
|
Loading…
Reference in New Issue