fix non-stop mode for executeNext and executeStep

Following the  Change-Id: I18e8b77b615cfceec402b140337709074ad96dc5, I have
found the same behaviour in handleExecuteNext and HandleExecuteStep than in
hanleExecuteContinue. The fix is the same, If you click one of the two
buttons while having a different thread selected, notify the GUI of the gdb
error message but do not kill the debugger neither the inferior as the situation
can be addressed by clicking again step or next after switching to the
stopped thread.

Change-Id: I9f2951ea9846621156ceb3998514d7667d59e7af
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
cnavarro
2012-03-05 19:22:07 +01:00
committed by hjk
parent 8b6a2b0a85
commit 2fa4e8e26d

View File

@@ -2097,6 +2097,9 @@ void GdbEngine::handleExecuteStep(const GdbResponse &response)
if (!m_commandsToRunOnTemporaryBreak.isEmpty()) if (!m_commandsToRunOnTemporaryBreak.isEmpty())
flushQueuedCommands(); flushQueuedCommands();
executeStepI(); // Fall back to instruction-wise stepping. executeStepI(); // Fall back to instruction-wise stepping.
} else if (msg.startsWith("Cannot execute this command while the selected thread is running.")) {
showExecutionError(QString::fromLocal8Bit(msg));
notifyInferiorRunFailed();
} else { } else {
showExecutionError(QString::fromLocal8Bit(msg)); showExecutionError(QString::fromLocal8Bit(msg));
notifyInferiorIll(); notifyInferiorIll();
@@ -2165,6 +2168,9 @@ void GdbEngine::handleExecuteNext(const GdbResponse &response)
notifyInferiorRunFailed(); notifyInferiorRunFailed();
if (!isDying()) if (!isDying())
executeNextI(); // Fall back to instruction-wise stepping. executeNextI(); // Fall back to instruction-wise stepping.
} else if (msg.startsWith("Cannot execute this command while the selected thread is running.")) {
showExecutionError(QString::fromLocal8Bit(msg));
notifyInferiorRunFailed();
} else { } else {
showMessageBox(QMessageBox::Critical, tr("Execution Error"), showMessageBox(QMessageBox::Critical, tr("Execution Error"),
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg)); tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));