Commit 2fa4e8e2 authored by cnavarro's avatar cnavarro Committed by hjk
Browse files

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: default avatarhjk <qthjk@ovi.com>
parent 8b6a2b0a
......@@ -2097,6 +2097,9 @@ void GdbEngine::handleExecuteStep(const GdbResponse &response)
if (!m_commandsToRunOnTemporaryBreak.isEmpty())
flushQueuedCommands();
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 {
showExecutionError(QString::fromLocal8Bit(msg));
notifyInferiorIll();
......@@ -2165,6 +2168,9 @@ void GdbEngine::handleExecuteNext(const GdbResponse &response)
notifyInferiorRunFailed();
if (!isDying())
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 {
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment