Debugger: Handle extra dumpers with LLDB

This generalizes part of the previously GDB-only code paths

Change-Id: Id32798073e3c8bcb23bfedf463bebc866c8275e2
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2015-01-23 19:09:08 +01:00
parent 39a1293e71
commit eafde22e16
7 changed files with 103 additions and 123 deletions

View File

@@ -1737,22 +1737,7 @@ void GdbEngine::handlePythonSetup(const GdbResponse &response)
if (response.resultClass == GdbResultDone) {
GdbMi data;
data.fromStringMultiple(response.consoleStreamOutput);
const GdbMi dumpers = data["dumpers"];
foreach (const GdbMi &dumper, dumpers.children()) {
QByteArray type = dumper["type"].data();
QStringList formats(tr("Raw structure"));
foreach (const QByteArray &format,
dumper["formats"].data().split(',')) {
if (format == "Normal")
formats.append(tr("Normal"));
else if (format == "Displayed")
formats.append(tr("Displayed"));
else if (!format.isEmpty())
formats.append(_(format));
}
watchHandler()->addTypeFormats(type, formats);
}
watchHandler()->addDumpers(data["dumpers"]);
loadInitScript();
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
showMessage(_("ENGINE SUCCESSFULLY STARTED"));