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:
@@ -56,6 +56,7 @@
|
||||
#ifdef Q_OS_WIN
|
||||
# include "peutils.h"
|
||||
#endif
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
@@ -79,6 +80,7 @@
|
||||
#include <QtGui/QTextCursor>
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QToolTip>
|
||||
|
||||
using namespace Debugger;
|
||||
@@ -1466,6 +1468,52 @@ void DebuggerManager::reloadRegisters()
|
||||
m_engine->reloadRegisters();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dumpers. "Custom dumpers" are a library compiled against the current
|
||||
// Qt containing functions to evaluate values of Qt classes
|
||||
// (such as QString, taking pointers to their addresses).
|
||||
// The library must be loaded into the debuggee.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool DebuggerManager::qtDumperLibraryEnabled() const
|
||||
{
|
||||
return theDebuggerBoolSetting(UseDebuggingHelpers);
|
||||
}
|
||||
|
||||
QString DebuggerManager::qtDumperLibraryName() const
|
||||
{
|
||||
if (theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool())
|
||||
return theDebuggerAction(CustomDebuggingHelperLocation)->value().toString();
|
||||
return m_dumperLib;
|
||||
}
|
||||
|
||||
void DebuggerManager::showQtDumperLibraryWarning(const QString &details)
|
||||
{
|
||||
QMessageBox dialog(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."));
|
||||
if (!details.isEmpty())
|
||||
dialog.setDetailedText(details);
|
||||
dialog.exec();
|
||||
if (dialog.clickedButton() == qtPref) {
|
||||
Core::ICore::instance()->showOptionsDialog(QLatin1String("Qt4"), QLatin1String("Qt Versions"));
|
||||
} else if (dialog.clickedButton() == helperOff) {
|
||||
theDebuggerAction(UseDebuggingHelpers)->setValue(qVariantFromValue(false), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user