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: if len(args) > 2:
watchers = base64.b16decode(args[2], True) watchers = base64.b16decode(args[2], True)
if len(watchers) > 0: if len(watchers) > 0:
for watcher in watchers.split("$$"): for watcher in watchers.split("##"):
(exp, name) = watcher.split("$") (exp, name) = watcher.split("#")
self.handleWatch(d, exp, name) self.handleWatch(d, exp, name)
d.pushOutput() d.pushOutput()
watchers = d.safeoutput watchers = d.safeoutput
@@ -465,7 +465,7 @@ class FrameCommand(gdb.Command):
else: else:
try: try:
value = parseAndEvaluate(exp) value = parseAndEvaluate(exp)
item = Item(value, "watch", None, None) item = Item(value, "watch.%s" % name, None, None)
d.putItemHelper(item) d.putItemHelper(item)
except RuntimeError: except RuntimeError:
d.put(',value="<invalid>",') d.put(',value="<invalid>",')

View File

@@ -3626,11 +3626,11 @@ void GdbEngine::updateLocals(const QVariant &cookie)
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
if (!watchers.isEmpty()) if (!watchers.isEmpty())
watchers += "$$"; watchers += "##";
if (it.key() == WatchHandler::watcherEditPlaceHolder().toLatin1()) if (it.key() == WatchHandler::watcherEditPlaceHolder().toLatin1())
watchers += "<Edit>$" + QByteArray::number(it.value()); watchers += "<Edit>#" + QByteArray::number(it.value());
else else
watchers += it.key() + '$' + QByteArray::number(it.value()); watchers += it.key() + '#' + QByteArray::number(it.value());
} }
QByteArray options; QByteArray options;