Commit 6f10a1cb authored by hjk's avatar hjk
Browse files

Debugger: Make Watchers work with LLDB



Change-Id: Ie39a38c6646c3c19819e2c122d7f8be285eae09e
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent fbd3f735
......@@ -1185,15 +1185,11 @@ class Dumper(DumperBase):
iname = watcher['iname']
index = iname[iname.find('.') + 1:]
exp = binascii.unhexlify(watcher['exp'])
warn("EXP: %s" % exp)
warn("INDEX: %s" % index)
if exp == "":
self.put('type="",value="",exp=""')
continue
value = self.dummyValue.CreateValueFromExpression(iname, exp)
#value = self.dummyValue
warn("VALUE: %s" % value)
self.currentIName = 'watch'
with SubItem(self, index):
self.put('exp="%s",' % exp)
......@@ -1530,11 +1526,6 @@ class Dumper(DumperBase):
error = str(result.GetError())
self.report('success="%d",output="%s",error="%s"' % (success, output, error))
def setWatchers(self, args):
#self.currentWatchers = args['watchers']
#warn("WATCHERS %s" % self.currentWatchers)
self.reportData()
def updateData(self, args):
if 'expanded' in args:
self.expandedINames = set(args['expanded'].split(','))
......@@ -1546,6 +1537,8 @@ class Dumper(DumperBase):
self.useFancy = int(args['fancy'])
if 'passexceptions' in args:
self.passExceptions = int(args['passexceptions'])
if 'watchers' in args:
self.currentWatchers = args['watchers']
self.reportVariables(args)
def disassemble(self, args):
......
......@@ -187,7 +187,6 @@ void LldbEngine::setupInferior()
? sp.remoteChannel : QString()));
cmd.arg("platform", sp.platform);
runCommand(cmd);
requestUpdateWatchers();
updateLocals(); // update display options
}
......@@ -730,8 +729,6 @@ void LldbEngine::updateLocals()
{
WatchHandler *handler = watchHandler();
//requestUpdateWatchers();
Command cmd("updateData");
cmd.arg("expanded", handler->expansionRequests());
cmd.arg("typeformats", handler->typeFormatRequests());
......@@ -776,6 +773,18 @@ void LldbEngine::updateLocals()
cmd.arg("fancy", debuggerCore()->boolSetting(UseDebuggingHelpers));
cmd.arg("autoderef", debuggerCore()->boolSetting(AutoDerefPointers));
cmd.arg("dyntype", debuggerCore()->boolSetting(UseDynamicType));
cmd.beginList("watchers");
QHashIterator<QByteArray, int> it(WatchHandler::watcherNames());
while (it.hasNext()) {
it.next();
cmd.beginGroup()
.arg("iname", "watch." + QByteArray::number(it.value()))
.arg("exp", it.key().toHex())
.endGroup();
}
cmd.endList();
//cmd.arg("partial", ??)
//cmd.arg("tooltipOnly", ??)
//cmd.arg("resultvarname", m_resultVarName);
......@@ -862,22 +871,6 @@ void LldbEngine::readLldbStandardOutput()
}
}
void LldbEngine::requestUpdateWatchers()
{
QHashIterator<QByteArray, int> it(WatchHandler::watcherNames());
QList<QByteArray> watcherData;
while (it.hasNext()) {
it.next();
QHash<QByteArray, QByteArray> hash;
hash["iname"] = "\"watch." + QByteArray::number(it.value()) + '"';
hash["exp"] = '"' + it.key().toHex() + '"';
watcherData.append(Command::toData(hash));
}
Command cmd("setWatchers");
cmd.args.append("\"watchers\":" + Command::toData(watcherData) + ',');
runCommand(cmd);
}
void LldbEngine::refreshLocals(const GdbMi &vars)
{
//const bool partial = response.cookie.toBool();
......
......@@ -135,7 +135,6 @@ private:
bool supportsThreads() const { return true; }
bool isSynchronous() const { return true; }
void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags);
void requestUpdateWatchers();
void setRegisterValue(int regnr, const QString &value);
void fetchMemory(Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length);
......
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