forked from qt-creator/qt-creator
Debugger: Replace GdbMi::findChild() with an operator[]
Less noise. Change-Id: I8e533c97207ff5b9c79182c4fb99993f1992154f Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -424,30 +424,30 @@ void ThreadsHandler::updateThreads(const GdbMi &data)
|
||||
}
|
||||
|
||||
ThreadId currentId;
|
||||
const GdbMi current = data.findChild("current-thread-id");
|
||||
const GdbMi current = data["current-thread-id"];
|
||||
if (current.isValid())
|
||||
currentId = ThreadId(current.data().toLongLong());
|
||||
|
||||
const QList<GdbMi> items = data.findChild("threads").children();
|
||||
const QList<GdbMi> items = data["threads"].children();
|
||||
const int n = items.size();
|
||||
for (int index = 0; index != n; ++index) {
|
||||
bool ok = false;
|
||||
const GdbMi item = items.at(index);
|
||||
const GdbMi frame = item.findChild("frame");
|
||||
const GdbMi frame = item["frame"];
|
||||
ThreadData thread;
|
||||
thread.id = ThreadId(item.findChild("id").data().toInt());
|
||||
thread.targetId = QString::fromLatin1(item.findChild("target-id").data());
|
||||
thread.details = QString::fromLatin1(item.findChild("details").data());
|
||||
thread.core = QString::fromLatin1(item.findChild("core").data());
|
||||
thread.state = QString::fromLatin1(item.findChild("state").data());
|
||||
thread.address = frame.findChild("addr").data().toULongLong(&ok, 0);
|
||||
thread.function = QString::fromLatin1(frame.findChild("func").data());
|
||||
thread.fileName = QString::fromLatin1(frame.findChild("fullname").data());
|
||||
thread.lineNumber = frame.findChild("line").data().toInt();
|
||||
thread.module = QString::fromLocal8Bit(frame.findChild("from").data());
|
||||
thread.id = ThreadId(item["id"].data().toInt());
|
||||
thread.targetId = QString::fromLatin1(item["target-id"].data());
|
||||
thread.details = QString::fromLatin1(item["details"].data());
|
||||
thread.core = QString::fromLatin1(item["core"].data());
|
||||
thread.state = QString::fromLatin1(item["state"].data());
|
||||
thread.address = frame["addr"].data().toULongLong(&ok, 0);
|
||||
thread.function = QString::fromLatin1(frame["func"].data());
|
||||
thread.fileName = QString::fromLatin1(frame["fullname"].data());
|
||||
thread.lineNumber = frame["line"].data().toInt();
|
||||
thread.module = QString::fromLocal8Bit(frame["from"].data());
|
||||
thread.stopped = true;
|
||||
// Non-GDB (Cdb2) output name here.
|
||||
thread.name = QString::fromLatin1(frame.findChild("name").data());
|
||||
thread.name = QString::fromLatin1(frame["name"].data());
|
||||
if (thread.state == QLatin1String("running"))
|
||||
thread.stopped = false;
|
||||
if (thread.id == currentId)
|
||||
|
||||
Reference in New Issue
Block a user