From f88e15bf6bd0df8ed3bb928a9da10732bca913c4 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Tue, 7 Apr 2009 14:14:43 +0200 Subject: [PATCH] debugger: fix potential endless loop --- src/plugins/debugger/gdbengine.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index 2a82bbda4cf..ec552df2fbf 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -377,18 +377,18 @@ void GdbEngine::handleResponse(const QByteArray &buff) GdbMi record; while (from != to) { GdbMi data; - if (*from == ',') { - ++from; // skip ',' - data.parseResultOrValue(from, to); - if (data.isValid()) { - //qDebug() << "parsed response: " << data.toString(); - record.m_children += data; - record.m_type = GdbMi::Tuple; - } - } else { + if (*from != ',') { // happens on archer where we get // 23^running <NL> *running,thread-id="all" <NL> (gdb) record.m_type = GdbMi::Tuple; + break; + } + ++from; // skip ',' + data.parseResultOrValue(from, to); + if (data.isValid()) { + //qDebug() << "parsed response: " << data.toString(); + record.m_children += data; + record.m_type = GdbMi::Tuple; } } if (asyncClass == "stopped") { -- GitLab