debugger: refactor passing of options to new dumpers

This commit is contained in:
hjk
2010-01-05 10:48:14 +01:00
parent 2a28741f90
commit 11a300dd92
3 changed files with 63 additions and 30 deletions

View File

@@ -3605,6 +3605,7 @@ void GdbEngine::updateLocals(const QVariant &cookie)
m_toolTipExpression.clear();
WatchHandler *handler = m_manager->watchHandler();
QStringList expanded = handler->expandedINames().toList();
expanded.append(_("defaults"));
QString watchers;
QHash<QString, int> watcherNames = handler->watcherNames();
QHashIterator<QString, int> it(watcherNames);
@@ -3618,8 +3619,17 @@ void GdbEngine::updateLocals(const QVariant &cookie)
watchers += _("%1$%2").arg(it.key()).arg(it.value());
}
postCommand(_("-interpreter-exec console \"bb %1 0 %2 %3\"")
.arg(int(theDebuggerBoolSetting(UseDebuggingHelpers)))
QString options;
if (theDebuggerBoolSetting(UseDebuggingHelpers))
options += _("fancy,");
if (theDebuggerBoolSetting(AutoDerefPointers))
options += _("autoderef,");
if (options.isEmpty())
options += _("defaults,");
options.chop(1);
postCommand(_("-interpreter-exec console \"bb %1 %2 %3\"")
.arg(options)
.arg(expanded.join(_(",")))
.arg(_(watchers.toLatin1().toHex())),
CB(handleStackFrame));