diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index ad912ac9d4b247e2ce41bd13a3b7c1a6152cc395..8e73a8fbfd8cbf2b266046f98a55a5603b8fd2b5 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -1269,10 +1269,10 @@ const BreakpointResponse &BreakHandler::response(BreakpointModelId id) const { static BreakpointResponse dummy; ConstIterator it = m_storage.find(id); - BREAK_ASSERT(it != m_storage.end(), - qDebug() << "NO RESPONSE FOR " << id; return dummy); - if (it == m_storage.end()) + if (it == m_storage.end()) { + qDebug() << "NO RESPONSE FOR " << id; return dummy; + } return it->response; } diff --git a/src/plugins/debugger/breakpoint.cpp b/src/plugins/debugger/breakpoint.cpp index 4c0983d1ddf74e58e3e259d284918782308d623d..f348cf45c24797af2f1bdffa256ff9a484bdf38a 100644 --- a/src/plugins/debugger/breakpoint.cpp +++ b/src/plugins/debugger/breakpoint.cpp @@ -317,8 +317,6 @@ QString BreakpointResponse::toString() const ts << " Number: " << id.toString(); if (pending) ts << " [pending]"; - if (!fullName.isEmpty()) - ts << " FullName: " << fullName; if (!functionName.isEmpty()) ts << " Function: " << functionName; if (multiple) @@ -334,7 +332,6 @@ void BreakpointResponse::fromParameters(const BreakpointParameters &p) { BreakpointParameters::operator=(p); id = BreakpointResponseId(); - fullName.clear(); multiple = false; correctedLineNumber = 0; hitCount = 0; diff --git a/src/plugins/debugger/breakpoint.h b/src/plugins/debugger/breakpoint.h index c1c2c3074e9449094db645cab946436f9ebaabca..82831320369147287e390b344e12de582c1045d6 100644 --- a/src/plugins/debugger/breakpoint.h +++ b/src/plugins/debugger/breakpoint.h @@ -246,7 +246,6 @@ public: BreakpointResponseId id; //!< Breakpoint number assigned by the debugger engine. bool pending; //!< Breakpoint not fully resolved. int hitCount; //!< Number of times this has been hit. - QString fullName; //!< Full file name acknowledged by the debugger engine. bool multiple; //!< Happens in constructors/gdb. int correctedLineNumber; //!< Line number as seen by gdb. }; diff --git a/src/plugins/debugger/debuggerstreamops.cpp b/src/plugins/debugger/debuggerstreamops.cpp index 81cb608b2a072c37bdcdccd2da32f457ab4937c2..7aec95d12cdb6f943d4aaa8f490befb4dbdd6d9a 100644 --- a/src/plugins/debugger/debuggerstreamops.cpp +++ b/src/plugins/debugger/debuggerstreamops.cpp @@ -151,7 +151,6 @@ QDataStream &operator<<(QDataStream &stream, const BreakpointResponse &s) stream << s.condition; stream << s.ignoreCount; stream << s.fileName; - stream << s.fullName; stream << s.lineNumber; //stream << s.bpCorrectedLineNumber; stream << s.threadSpec; @@ -169,7 +168,6 @@ QDataStream &operator>>(QDataStream &stream, BreakpointResponse &s) stream >> s.condition; stream >> s.ignoreCount; stream >> s.fileName; - stream >> s.fullName; stream >> s.lineNumber; //stream >> s.bpCorrectedLineNumber; stream >> s.threadSpec; diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index e95f4a42770d4fb9d5744038de71075e7aae2443..2227b12ae304b847e617086df45d44481efa1a14 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2504,13 +2504,19 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response) BreakHandler *handler = breakHandler(); BreakpointModelId id = response.cookie.value<BreakpointModelId>(); if (response.resultClass == GdbResultDone) { - const GdbMi bkpt = response.data.findChild("bkpt"); - const BreakpointResponseId rid(bkpt.findChild("number").data()); + // The result is a list with the first entry marked "bkpt" + // and "unmarked" rest. The "bkpt" one seems to always be + // the "main" entry. Use the "main" entry to retrieve the + // already known data from the BreakpointManager, and then + // iterate over all items to update main- and sub-data. + const GdbMi mainbkpt = response.data.findChild("bkpt"); + QByteArray nr = mainbkpt.findChild("number").data(); + BreakpointResponseId rid(nr); if (!isHiddenBreakpoint(rid)) { BreakpointResponse br = handler->response(id); foreach (const GdbMi bkpt, response.data.children()) { - QByteArray nr = bkpt.findChild("number").data(); - BreakpointResponseId rid(nr); + nr = bkpt.findChild("number").data(); + rid = BreakpointResponseId(nr); if (nr.contains('.')) { // A sub-breakpoint. BreakpointResponse sub; @@ -2519,7 +2525,7 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response) sub.type = br.type; handler->insertSubBreakpoint(id, sub); } else { - // A primary breakpoint. + // A (the?) primary breakpoint. updateResponse(br, bkpt); br.id = rid; handler->setResponse(id, br);