debugger: fix quoting of watched expressions with funny chars inside

Base 64 to the rescue.

Reviewed-by: con
This commit is contained in:
hjk
2011-04-08 14:46:07 +02:00
parent d40c15abea
commit 9dc3e3ed44
2 changed files with 12 additions and 7 deletions

View File

@@ -152,7 +152,15 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response)
foreach (const GdbMi &child, data.children()) {
WatchData dummy;
dummy.iname = child.findChild("iname").data();
dummy.name = _(child.findChild("name").data());
GdbMi wname = child.findChild("wname");
if (wname.isValid()) {
// Happens (only) for watched expressions. They are encoded as.
// base64 encoded 8 bit data, without quotes
dummy.name = decodeData(wname.data(), 5);
dummy.exp = dummy.name.toUtf8();
} else {
dummy.name = _(child.findChild("name").data());
}
//qDebug() << "CHILD: " << child.toString();
parseWatchData(watchHandler()->expandedINames(), dummy, child, &list);
}