Commit e5abb34d authored by hjk's avatar hjk

debugger: fix watchers containing '$' (references to registers)

parent 456abf4c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment