forked from qt-creator/qt-creator
debugger: use target-async/exec-interrupt for remote debugging
This seems to be the only way to make the setup work on Windows at all. Change-Id: Ib70c8422dceea84ae5cc9e671de977de0887c80e Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -715,7 +715,7 @@ void GdbEngine::interruptInferior()
|
||||
QTC_ASSERT(state() == InferiorStopRequested,
|
||||
qDebug() << "INTERRUPT INFERIOR: " << state(); return);
|
||||
|
||||
if (0 && debuggerCore()->boolSetting(TargetAsync)) {
|
||||
if (usesExecInterrupt()) {
|
||||
postCommand("-exec-interrupt");
|
||||
} else {
|
||||
showStatusMessage(tr("Stop requested..."), 5000);
|
||||
@@ -1715,6 +1715,11 @@ void GdbEngine::handleShowVersion(const GdbResponse &response)
|
||||
|
||||
if (m_gdbVersion > 70300)
|
||||
m_hasBreakpointNotifications = true;
|
||||
|
||||
if (usesExecInterrupt())
|
||||
postCommand("set target-async on", ConsoleCommand);
|
||||
else
|
||||
postCommand("set target-async off", ConsoleCommand);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4707,11 +4712,7 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &settingsIdHint)
|
||||
postCommand("set trust-readonly-sections on", ConsoleCommand);
|
||||
postCommand("set auto-solib-add on", ConsoleCommand);
|
||||
postCommand("set remotecache on", ConsoleCommand);
|
||||
|
||||
if (0 && debuggerCore()->boolSetting(TargetAsync)) {
|
||||
postCommand("set target-async on", ConsoleCommand);
|
||||
postCommand("set non-stop on", ConsoleCommand);
|
||||
}
|
||||
//postCommand("set non-stop on", ConsoleCommand);
|
||||
|
||||
// Work around https://bugreports.qt-project.org/browse/QTCREATORBUG-2004
|
||||
postCommand("maintenance set internal-warning quit no", ConsoleCommand);
|
||||
@@ -5130,6 +5131,17 @@ bool GdbEngine::isHiddenBreakpoint(const BreakpointResponseId &id) const
|
||||
return isQFatalBreakpoint(id) || isQmlStepBreakpoint(id);
|
||||
}
|
||||
|
||||
bool GdbEngine::usesExecInterrupt() const
|
||||
{
|
||||
if (m_gdbVersion < 70000)
|
||||
return false;
|
||||
|
||||
// debuggerCore()->boolSetting(TargetAsync)
|
||||
DebuggerStartMode mode = startParameters().startMode;
|
||||
return mode == AttachToRemoteServer
|
||||
|| mode == AttachToRemoteProcess;
|
||||
}
|
||||
|
||||
void GdbEngine::scheduleTestResponse(int testCase, const QByteArray &response)
|
||||
{
|
||||
if (!m_testCases.contains(testCase) && startParameters().testCase != testCase)
|
||||
|
||||
Reference in New Issue
Block a user