summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/debuggerprotocol.cpp')
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index d01e82f649..cb9302211b 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -457,7 +457,13 @@ void extractGdbVersion(const QString &msg,
QString build;
bool inClean = true;
bool inParenthesis = false;
- for (QChar c : msg) {
+
+ int gdbMsgBegin = msg.indexOf("GNU gdb");
+ if (gdbMsgBegin == -1)
+ gdbMsgBegin = 0;
+
+ for (int i = gdbMsgBegin, gdbMsgSize = msg.size(); i < gdbMsgSize; ++i) {
+ QChar c = msg.at(i);
if (inClean && !cleaned.isEmpty() && c != dot && (c.isPunct() || c.isSpace()))
inClean = false;
if (ignoreParenthesisContent) {