Qt: GDB debugger can now accept without blocking main thread

This commit is contained in:
Jeffrey Pfau 2015-01-19 01:46:06 -08:00
parent ddfffd22de
commit 29623ecd0b
2 changed files with 1 additions and 11 deletions

View File

@ -40,13 +40,13 @@ void GDBController::attach() {
return; return;
} }
m_gameController->setDebugger(&m_gdbStub.d); m_gameController->setDebugger(&m_gdbStub.d);
ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED);
} }
void GDBController::detach() { void GDBController::detach() {
if (!isAttached()) { if (!isAttached()) {
return; return;
} }
disconnect(m_gameController, SIGNAL(frameAvailable(const uint32_t*)), this, SLOT(updateGDB()));
m_gameController->threadInterrupt(); m_gameController->threadInterrupt();
GDBStubShutdown(&m_gdbStub); GDBStubShutdown(&m_gdbStub);
m_gameController->setDebugger(nullptr); m_gameController->setDebugger(nullptr);
@ -58,13 +58,6 @@ void GDBController::listen() {
if (!isAttached()) { if (!isAttached()) {
attach(); attach();
} }
connect(m_gameController, SIGNAL(frameAvailable(const uint32_t*)), this, SLOT(updateGDB()));
GDBStubListen(&m_gdbStub, m_port, &m_bindAddress); GDBStubListen(&m_gdbStub, m_port, &m_bindAddress);
m_gameController->threadContinue(); m_gameController->threadContinue();
} }
void GDBController::updateGDB() {
m_gameController->threadInterrupt();
GDBStubUpdate(&m_gdbStub);
m_gameController->threadContinue();
}

View File

@ -35,9 +35,6 @@ public slots:
void detach(); void detach();
void listen(); void listen();
private slots:
void updateGDB();
private: private:
GDBStub m_gdbStub; GDBStub m_gdbStub;
GameController* m_gameController; GameController* m_gameController;