forked from qt-creator/qt-creator
Start on dumper support for CDB, bug fixes.
Make command execution output shown, use Wide version of Debug Callbacks and output, provide bases classes for other output and event handlers, move common dumper functionality into debugger manager.
This commit is contained in:
@@ -4128,36 +4128,6 @@ void GdbEngine::assignValueInDebugger(const QString &expression, const QString &
|
||||
sendCommand("-var-assign assign " + value, WatchVarAssign);
|
||||
}
|
||||
|
||||
QString GdbEngine::dumperLibraryName() const
|
||||
{
|
||||
if (theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool())
|
||||
return theDebuggerAction(CustomDebuggingHelperLocation)->value().toString();
|
||||
return q->m_dumperLib;
|
||||
}
|
||||
|
||||
void GdbEngine::showDebuggingHelperWarning()
|
||||
{
|
||||
QMessageBox dialog(q->mainWindow());
|
||||
QPushButton *qtPref = dialog.addButton(tr("Open Qt preferences"), QMessageBox::ActionRole);
|
||||
QPushButton *helperOff = dialog.addButton(tr("Turn helper usage off"), QMessageBox::ActionRole);
|
||||
QPushButton *justContinue = dialog.addButton(tr("Continue anyway"), QMessageBox::AcceptRole);
|
||||
dialog.setDefaultButton(justContinue);
|
||||
dialog.setWindowTitle(tr("Debugging helper missing"));
|
||||
dialog.setText(tr("The debugger did not find the debugging helper library."));
|
||||
dialog.setInformativeText(tr("The debugging helper is used to nicely format the values of Qt "
|
||||
"data types and some STL data types. "
|
||||
"It must be compiled for each Qt version, "
|
||||
"you can do this in the Qt preferences page by selecting "
|
||||
"a Qt installation and clicking on 'Rebuild' for the debugging "
|
||||
"helper."));
|
||||
dialog.exec();
|
||||
if (dialog.clickedButton() == qtPref) {
|
||||
Core::ICore::instance()->showOptionsDialog("Qt4", "Qt Versions");
|
||||
} else if (dialog.clickedButton() == helperOff) {
|
||||
theDebuggerAction(UseDebuggingHelpers)->setValue(qVariantFromValue(false), false);
|
||||
}
|
||||
}
|
||||
|
||||
void GdbEngine::tryLoadDebuggingHelpers()
|
||||
{
|
||||
if (m_debuggingHelperState != DebuggingHelperUninitialized)
|
||||
@@ -4165,16 +4135,16 @@ void GdbEngine::tryLoadDebuggingHelpers()
|
||||
|
||||
PENDING_DEBUG("TRY LOAD CUSTOM DUMPERS");
|
||||
m_debuggingHelperState = DebuggingHelperUnavailable;
|
||||
QString lib = dumperLibraryName();
|
||||
if (!q->qtDumperLibraryEnabled())
|
||||
return;
|
||||
const QString lib = q->qtDumperLibraryName();
|
||||
//qDebug() << "DUMPERLIB: " << lib;
|
||||
|
||||
if (!QFileInfo(lib).exists()) {
|
||||
debugMessage(QString("DEBUG HELPER LIBRARY IS NOT USABLE: "
|
||||
" %1 EXISTS: %2, EXECUTABLE: %3").arg(lib)
|
||||
.arg(QFileInfo(lib).exists())
|
||||
.arg(QFileInfo(lib).isExecutable()));
|
||||
if (theDebuggerBoolSetting(UseDebuggingHelpers))
|
||||
showDebuggingHelperWarning();
|
||||
// @TODO: same in CDB engine...
|
||||
const QFileInfo fi(lib);
|
||||
if (!fi.exists()) {
|
||||
const QString msg = tr("The dumper library '%1' does not exist.").arg(lib);
|
||||
debugMessage(msg);
|
||||
q->showQtDumperLibraryWarning(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user