mirror of https://github.com/mgba-emu/mgba.git
Qt: GDB debugger can now accept without blocking main thread
This commit is contained in:
parent
ddfffd22de
commit
29623ecd0b
|
@ -40,13 +40,13 @@ void GDBController::attach() {
|
|||
return;
|
||||
}
|
||||
m_gameController->setDebugger(&m_gdbStub.d);
|
||||
ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED);
|
||||
}
|
||||
|
||||
void GDBController::detach() {
|
||||
if (!isAttached()) {
|
||||
return;
|
||||
}
|
||||
disconnect(m_gameController, SIGNAL(frameAvailable(const uint32_t*)), this, SLOT(updateGDB()));
|
||||
m_gameController->threadInterrupt();
|
||||
GDBStubShutdown(&m_gdbStub);
|
||||
m_gameController->setDebugger(nullptr);
|
||||
|
@ -58,13 +58,6 @@ void GDBController::listen() {
|
|||
if (!isAttached()) {
|
||||
attach();
|
||||
}
|
||||
connect(m_gameController, SIGNAL(frameAvailable(const uint32_t*)), this, SLOT(updateGDB()));
|
||||
GDBStubListen(&m_gdbStub, m_port, &m_bindAddress);
|
||||
m_gameController->threadContinue();
|
||||
}
|
||||
|
||||
void GDBController::updateGDB() {
|
||||
m_gameController->threadInterrupt();
|
||||
GDBStubUpdate(&m_gdbStub);
|
||||
m_gameController->threadContinue();
|
||||
}
|
||||
|
|
|
@ -35,9 +35,6 @@ public slots:
|
|||
void detach();
|
||||
void listen();
|
||||
|
||||
private slots:
|
||||
void updateGDB();
|
||||
|
||||
private:
|
||||
GDBStub m_gdbStub;
|
||||
GameController* m_gameController;
|
||||
|
|
Loading…
Reference in New Issue