QNX: Fix interrupting when debugging on Windows

This fixes interrupting the inferior process when debugging
BlackBerry applications on Windows. The code was already in use
for pure QNX application, but never BlackBerry.

Change-Id: Icbf8f913475f523ca178250087bfdf3b89086605
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Tobias Nätterlund
2013-10-31 14:25:38 +01:00
committed by David Schulz
parent 0c02cef432
commit 0e2ed3f27c
4 changed files with 6 additions and 2 deletions

View File

@@ -73,7 +73,8 @@ public:
closeMode(KillAtClose), closeMode(KillAtClose),
testReceiver(0), testReceiver(0),
testCallback(0), testCallback(0),
testCase(0) testCase(0),
useCtrlCStub(false)
{} {}
//Core::Id profileId; //Core::Id profileId;
@@ -136,6 +137,7 @@ public:
// For QNX debugging // For QNX debugging
QString remoteExecutable; QString remoteExecutable;
bool useCtrlCStub;
// For Debugger testing. // For Debugger testing.
QObject *testReceiver; QObject *testReceiver;

View File

@@ -63,7 +63,7 @@ GdbRemoteServerEngine::GdbRemoteServerEngine(const DebuggerStartParameters &star
m_isMulti = false; m_isMulti = false;
m_targetPid = -1; m_targetPid = -1;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
m_gdbProc->setUseCtrlCStub(!startParameters.remoteExecutable.isEmpty()); // This is only set for QNX m_gdbProc->setUseCtrlCStub(startParameters.useCtrlCStub); // This is only set for QNX/BlackBerry
#endif #endif
connect(&m_uploadProc, SIGNAL(error(QProcess::ProcessError)), connect(&m_uploadProc, SIGNAL(error(QProcess::ProcessError)),
SLOT(uploadProcError(QProcess::ProcessError))); SLOT(uploadProcError(QProcess::ProcessError)));

View File

@@ -127,6 +127,7 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
params.startMode = Debugger::AttachToRemoteServer; params.startMode = Debugger::AttachToRemoteServer;
params.debuggerCommand = Debugger::DebuggerKitInformation::debuggerCommand(k).toString(); params.debuggerCommand = Debugger::DebuggerKitInformation::debuggerCommand(k).toString();
params.sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toString(); params.sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toString();
params.useCtrlCStub = true;
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k)) if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k))
params.toolChainAbi = tc->targetAbi(); params.toolChainAbi = tc->targetAbi();

View File

@@ -76,6 +76,7 @@ static DebuggerStartParameters createDebuggerStartParameters(const QnxRunConfigu
params.startMode = AttachToRemoteServer; params.startMode = AttachToRemoteServer;
params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString(); params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
params.sysRoot = SysRootKitInformation::sysRoot(k).toString(); params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
params.useCtrlCStub = true;
if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
params.toolChainAbi = tc->targetAbi(); params.toolChainAbi = tc->targetAbi();