forked from qt-creator/qt-creator
debugger: don't duplicated "full name" information in break response
Less information to keep in sync. Change-Id: Icd862bbf8965eefd8ea3ad17b6f574b1f85bb8d2 Reviewed-on: http://codereview.qt.nokia.com/1069 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
@@ -1269,10 +1269,10 @@ const BreakpointResponse &BreakHandler::response(BreakpointModelId id) const
|
|||||||
{
|
{
|
||||||
static BreakpointResponse dummy;
|
static BreakpointResponse dummy;
|
||||||
ConstIterator it = m_storage.find(id);
|
ConstIterator it = m_storage.find(id);
|
||||||
BREAK_ASSERT(it != m_storage.end(),
|
if (it == m_storage.end()) {
|
||||||
qDebug() << "NO RESPONSE FOR " << id; return dummy);
|
qDebug() << "NO RESPONSE FOR " << id;
|
||||||
if (it == m_storage.end())
|
|
||||||
return dummy;
|
return dummy;
|
||||||
|
}
|
||||||
return it->response;
|
return it->response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -317,8 +317,6 @@ QString BreakpointResponse::toString() const
|
|||||||
ts << " Number: " << id.toString();
|
ts << " Number: " << id.toString();
|
||||||
if (pending)
|
if (pending)
|
||||||
ts << " [pending]";
|
ts << " [pending]";
|
||||||
if (!fullName.isEmpty())
|
|
||||||
ts << " FullName: " << fullName;
|
|
||||||
if (!functionName.isEmpty())
|
if (!functionName.isEmpty())
|
||||||
ts << " Function: " << functionName;
|
ts << " Function: " << functionName;
|
||||||
if (multiple)
|
if (multiple)
|
||||||
@@ -334,7 +332,6 @@ void BreakpointResponse::fromParameters(const BreakpointParameters &p)
|
|||||||
{
|
{
|
||||||
BreakpointParameters::operator=(p);
|
BreakpointParameters::operator=(p);
|
||||||
id = BreakpointResponseId();
|
id = BreakpointResponseId();
|
||||||
fullName.clear();
|
|
||||||
multiple = false;
|
multiple = false;
|
||||||
correctedLineNumber = 0;
|
correctedLineNumber = 0;
|
||||||
hitCount = 0;
|
hitCount = 0;
|
||||||
|
|||||||
@@ -246,7 +246,6 @@ public:
|
|||||||
BreakpointResponseId id; //!< Breakpoint number assigned by the debugger engine.
|
BreakpointResponseId id; //!< Breakpoint number assigned by the debugger engine.
|
||||||
bool pending; //!< Breakpoint not fully resolved.
|
bool pending; //!< Breakpoint not fully resolved.
|
||||||
int hitCount; //!< Number of times this has been hit.
|
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.
|
bool multiple; //!< Happens in constructors/gdb.
|
||||||
int correctedLineNumber; //!< Line number as seen by gdb.
|
int correctedLineNumber; //!< Line number as seen by gdb.
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ QDataStream &operator<<(QDataStream &stream, const BreakpointResponse &s)
|
|||||||
stream << s.condition;
|
stream << s.condition;
|
||||||
stream << s.ignoreCount;
|
stream << s.ignoreCount;
|
||||||
stream << s.fileName;
|
stream << s.fileName;
|
||||||
stream << s.fullName;
|
|
||||||
stream << s.lineNumber;
|
stream << s.lineNumber;
|
||||||
//stream << s.bpCorrectedLineNumber;
|
//stream << s.bpCorrectedLineNumber;
|
||||||
stream << s.threadSpec;
|
stream << s.threadSpec;
|
||||||
@@ -169,7 +168,6 @@ QDataStream &operator>>(QDataStream &stream, BreakpointResponse &s)
|
|||||||
stream >> s.condition;
|
stream >> s.condition;
|
||||||
stream >> s.ignoreCount;
|
stream >> s.ignoreCount;
|
||||||
stream >> s.fileName;
|
stream >> s.fileName;
|
||||||
stream >> s.fullName;
|
|
||||||
stream >> s.lineNumber;
|
stream >> s.lineNumber;
|
||||||
//stream >> s.bpCorrectedLineNumber;
|
//stream >> s.bpCorrectedLineNumber;
|
||||||
stream >> s.threadSpec;
|
stream >> s.threadSpec;
|
||||||
|
|||||||
@@ -2504,13 +2504,19 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response)
|
|||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
BreakpointModelId id = response.cookie.value<BreakpointModelId>();
|
BreakpointModelId id = response.cookie.value<BreakpointModelId>();
|
||||||
if (response.resultClass == GdbResultDone) {
|
if (response.resultClass == GdbResultDone) {
|
||||||
const GdbMi bkpt = response.data.findChild("bkpt");
|
// The result is a list with the first entry marked "bkpt"
|
||||||
const BreakpointResponseId rid(bkpt.findChild("number").data());
|
// 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)) {
|
if (!isHiddenBreakpoint(rid)) {
|
||||||
BreakpointResponse br = handler->response(id);
|
BreakpointResponse br = handler->response(id);
|
||||||
foreach (const GdbMi bkpt, response.data.children()) {
|
foreach (const GdbMi bkpt, response.data.children()) {
|
||||||
QByteArray nr = bkpt.findChild("number").data();
|
nr = bkpt.findChild("number").data();
|
||||||
BreakpointResponseId rid(nr);
|
rid = BreakpointResponseId(nr);
|
||||||
if (nr.contains('.')) {
|
if (nr.contains('.')) {
|
||||||
// A sub-breakpoint.
|
// A sub-breakpoint.
|
||||||
BreakpointResponse sub;
|
BreakpointResponse sub;
|
||||||
@@ -2519,7 +2525,7 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response)
|
|||||||
sub.type = br.type;
|
sub.type = br.type;
|
||||||
handler->insertSubBreakpoint(id, sub);
|
handler->insertSubBreakpoint(id, sub);
|
||||||
} else {
|
} else {
|
||||||
// A primary breakpoint.
|
// A (the?) primary breakpoint.
|
||||||
updateResponse(br, bkpt);
|
updateResponse(br, bkpt);
|
||||||
br.id = rid;
|
br.id = rid;
|
||||||
handler->setResponse(id, br);
|
handler->setResponse(id, br);
|
||||||
|
|||||||
Reference in New Issue
Block a user