forked from qt-creator/qt-creator
debugger: fix watchers containing '$' (references to registers)
This commit is contained in:
@@ -401,8 +401,8 @@ class FrameCommand(gdb.Command):
|
||||
if len(args) > 2:
|
||||
watchers = base64.b16decode(args[2], True)
|
||||
if len(watchers) > 0:
|
||||
for watcher in watchers.split("$$"):
|
||||
(exp, name) = watcher.split("$")
|
||||
for watcher in watchers.split("##"):
|
||||
(exp, name) = watcher.split("#")
|
||||
self.handleWatch(d, exp, name)
|
||||
d.pushOutput()
|
||||
watchers = d.safeoutput
|
||||
@@ -465,7 +465,7 @@ class FrameCommand(gdb.Command):
|
||||
else:
|
||||
try:
|
||||
value = parseAndEvaluate(exp)
|
||||
item = Item(value, "watch", None, None)
|
||||
item = Item(value, "watch.%s" % name, None, None)
|
||||
d.putItemHelper(item)
|
||||
except RuntimeError:
|
||||
d.put(',value="<invalid>",')
|
||||
|
@@ -3626,11 +3626,11 @@ void GdbEngine::updateLocals(const QVariant &cookie)
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
if (!watchers.isEmpty())
|
||||
watchers += "$$";
|
||||
watchers += "##";
|
||||
if (it.key() == WatchHandler::watcherEditPlaceHolder().toLatin1())
|
||||
watchers += "<Edit>$" + QByteArray::number(it.value());
|
||||
watchers += "<Edit>#" + QByteArray::number(it.value());
|
||||
else
|
||||
watchers += it.key() + '$' + QByteArray::number(it.value());
|
||||
watchers += it.key() + '#' + QByteArray::number(it.value());
|
||||
}
|
||||
|
||||
QByteArray options;
|
||||
|
Reference in New Issue
Block a user