forked from qt-creator/qt-creator
QNX: Fix shutdown of inferior and inserting breakpoints on Windows
When debugging on a QNX device on Windows, neither DebugBreakProcess(..) nor "-exec-interrupt" works for interrupting the inferior process. Neither does sending it a SIGINT signal using "kill" on the device. This changes the local gdb process to run under the CtrlC stub on Windows when debugging on QNX. This enables us to send a Ctrl+C message to gdb, which interrupts the inferior, and allows us to insert breakpoints during runtime on Windows. Change-Id: I4b01fbe81138f3fe7a939a7e64267bac4eb8bf43 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -62,6 +62,9 @@ GdbRemoteServerEngine::GdbRemoteServerEngine(const DebuggerStartParameters &star
|
||||
{
|
||||
m_isMulti = false;
|
||||
m_targetPid = -1;
|
||||
#ifdef Q_OS_WIN
|
||||
m_gdbProc.setUseCtrlCStub(!startParameters.remoteExecutable.isEmpty()); // This is only set for QNX
|
||||
#endif
|
||||
connect(&m_uploadProc, SIGNAL(error(QProcess::ProcessError)),
|
||||
SLOT(uploadProcError(QProcess::ProcessError)));
|
||||
connect(&m_uploadProc, SIGNAL(readyReadStandardOutput()),
|
||||
@@ -427,6 +430,10 @@ void GdbRemoteServerEngine::interruptInferior2()
|
||||
if (debuggerCore()->boolSetting(TargetAsync)) {
|
||||
postCommand("-exec-interrupt", GdbEngine::Immediate,
|
||||
CB(handleInterruptInferior));
|
||||
#ifdef Q_OS_WIN
|
||||
} else if (m_isQnxGdb) {
|
||||
m_gdbProc.winInterruptByCtrlC();
|
||||
#endif
|
||||
} else {
|
||||
bool ok = m_gdbProc.interrupt();
|
||||
if (!ok) {
|
||||
|
||||
Reference in New Issue
Block a user