Debugger: Show simple values with LLDB backend

Change-Id: Iccef8c0ddb1951da1b09b13b1ce2a0cee716c30f
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-04-04 16:43:25 +02:00
parent fe1f7e4bf6
commit 70fc039796
3 changed files with 106 additions and 59 deletions

View File

@@ -853,35 +853,33 @@ void LldbEngine::handleBacktrace(const LldbResponse &response)
void LldbEngine::handleListLocals(const LldbResponse &response)
{
//qDebug() << " LOCALS: '" << response.data << "'";
QByteArray out = response.data.trimmed();
QByteArray out = response.data;
// GdbMi all;
// all.fromStringMultiple(out);
// //qDebug() << "ALL: " << all.toString();
{
int pos = out.indexOf("data=");
if (pos == -1) {
showMessage(_("UNEXPECTED LOCALS OUTPUT:" + out));
return;
}
// //GdbMi data = all.findChild("data");
// QList<WatchData> list;
// WatchHandler *handler = watchHandler();
// foreach (const GdbMi &child, all.children()) {
// WatchData dummy;
// dummy.iname = child.findChild("iname").data();
// dummy.name = _(child.findChild("name").data());
// //qDebug() << "CHILD: " << child.toString();
// parseWatchData(handler->expandedINames(), dummy, child, &list);
// }
// handler->insertData(list);
const bool partial = response.cookie.toBool();
int pos = out.indexOf("data=");
if (pos != 0) {
showMessage(_("DISCARDING JUNK AT BEGIN OF RESPONSE: "
+ out.left(pos)));
// The value in 'out' should be single-quoted as this is
// what the command line does with strings.
if (pos != 1) {
showMessage(_("DISCARDING JUNK AT BEGIN OF RESPONSE: "
+ out.left(pos)));
}
out = out.mid(pos);
if (out.endsWith('\''))
out.chop(1);
else
showMessage(_("JUNK AT END OF RESPONSE: " + out));
}
GdbMi all;
all.fromStringMultiple(out);
GdbMi data = all.findChild("data");
const bool partial = response.cookie.toBool();
WatchHandler *handler = watchHandler();
QList<WatchData> list;