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,
|
QTC_ASSERT(state() == InferiorStopRequested,
|
||||||
qDebug() << "INTERRUPT INFERIOR: " << state(); return);
|
qDebug() << "INTERRUPT INFERIOR: " << state(); return);
|
||||||
|
|
||||||
if (0 && debuggerCore()->boolSetting(TargetAsync)) {
|
if (usesExecInterrupt()) {
|
||||||
postCommand("-exec-interrupt");
|
postCommand("-exec-interrupt");
|
||||||
} else {
|
} else {
|
||||||
showStatusMessage(tr("Stop requested..."), 5000);
|
showStatusMessage(tr("Stop requested..."), 5000);
|
||||||
@@ -1715,6 +1715,11 @@ void GdbEngine::handleShowVersion(const GdbResponse &response)
|
|||||||
|
|
||||||
if (m_gdbVersion > 70300)
|
if (m_gdbVersion > 70300)
|
||||||
m_hasBreakpointNotifications = true;
|
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 trust-readonly-sections on", ConsoleCommand);
|
||||||
postCommand("set auto-solib-add on", ConsoleCommand);
|
postCommand("set auto-solib-add on", ConsoleCommand);
|
||||||
postCommand("set remotecache on", ConsoleCommand);
|
postCommand("set remotecache on", ConsoleCommand);
|
||||||
|
//postCommand("set non-stop on", ConsoleCommand);
|
||||||
if (0 && debuggerCore()->boolSetting(TargetAsync)) {
|
|
||||||
postCommand("set target-async on", ConsoleCommand);
|
|
||||||
postCommand("set non-stop on", ConsoleCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Work around https://bugreports.qt-project.org/browse/QTCREATORBUG-2004
|
// Work around https://bugreports.qt-project.org/browse/QTCREATORBUG-2004
|
||||||
postCommand("maintenance set internal-warning quit no", ConsoleCommand);
|
postCommand("maintenance set internal-warning quit no", ConsoleCommand);
|
||||||
@@ -5130,6 +5131,17 @@ bool GdbEngine::isHiddenBreakpoint(const BreakpointResponseId &id) const
|
|||||||
return isQFatalBreakpoint(id) || isQmlStepBreakpoint(id);
|
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)
|
void GdbEngine::scheduleTestResponse(int testCase, const QByteArray &response)
|
||||||
{
|
{
|
||||||
if (!m_testCases.contains(testCase) && startParameters().testCase != testCase)
|
if (!m_testCases.contains(testCase) && startParameters().testCase != testCase)
|
||||||
|
|||||||
@@ -732,6 +732,8 @@ private: ////////// View & Data Stuff //////////
|
|||||||
BreakpointResponseId m_qFatalBreakpointResponseId;
|
BreakpointResponseId m_qFatalBreakpointResponseId;
|
||||||
bool m_actingOnExpectedStop;
|
bool m_actingOnExpectedStop;
|
||||||
|
|
||||||
|
bool usesExecInterrupt() const;
|
||||||
|
|
||||||
QHash<int, QByteArray> m_scheduledTestResponses;
|
QHash<int, QByteArray> m_scheduledTestResponses;
|
||||||
QSet<int> m_testCases;
|
QSet<int> m_testCases;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user