aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-11-27 14:31:02 +0100
committerhjk <hjk121@nokiamail.com>2014-11-27 14:52:20 +0100
commitc5d86757a1ed7f07cf993bd64e43683475934a4b (patch)
tree5824ee92e29866760d748c6ad219b50b85866d1b /src
parent28fb4cc01514d26e48f136d61113f6facfe14aca (diff)
Debugger: Fix engine state after "unreasonable jump requests"
After attempting to jump to an inaccessible location, the engine was still expecting a ^running, while in fact GDB was stopped. Add the right state transition. Change-Id: I69aec785a1e9d2a23771f74ae35064ae61405fa5 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 54a429933df..8862f1ebc1b 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1292,6 +1292,14 @@ void GdbEngine::handleExecuteJumpToLine(const GdbResponse &response)
// All is fine. Waiting for a *running
// and the temporary breakpoint to be hit.
notifyInferiorRunOk(); // Only needed for gdb < 7.0.
+ } else if (response.resultClass == GdbResultError) {
+ // Could be "Unreasonable jump request" or similar.
+ QString out = tr("Cannot jump. Stopped");
+ QByteArray msg = response.data["msg"].data();
+ if (!msg.isEmpty())
+ out += QString::fromLatin1(". " + msg);
+ showStatusMessage(out);
+ notifyInferiorRunFailed();
} else if (response.resultClass == GdbResultDone) {
// This happens on old gdb. Trigger the effect of a '*stopped'.
showStatusMessage(tr("Jumped. Stopped"));