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

This commit is contained in:
hjk
2010-01-06 12:52:41 +01:00
parent 456abf4cbb
commit e5abb34db3
2 changed files with 6 additions and 6 deletions

View File

@@ -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>",')

View File

@@ -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;