Skip to content
Snippets Groups Projects
Commit 6c15d33c authored by hjk's avatar hjk
Browse files

debugger: use dumpers build alongside Qt

parent b278f956
No related branches found
No related tags found
No related merge requests found
......@@ -509,6 +509,11 @@ DebuggerSettings *theDebuggerSettings()
item->setSettingsKey("DebugMode", "BuildDumpersOnTheFly");
item->setCheckable(true);
item = new DebuggerAction(instance);
instance->insertItem(UseQtDumpers, item);
item->setSettingsKey("DebugMode", "UseQtDumpers");
item->setCheckable(true);
item = new DebuggerAction(instance);
instance->insertItem(UsePrebuiltDumpers, item);
item->setSettingsKey("DebugMode", "UsePrebuiltDumpers");
......
......@@ -155,6 +155,7 @@ enum DebuggerActionCode
RecheckDumpers,
UsePrebuiltDumpers,
UseQtDumpers,
PrebuiltDumpersLocation,
BuildDumpersOnTheFly,
UseDumpers,
......
......@@ -331,6 +331,7 @@ public:
QString m_workingDir;
QString m_buildDir;
QStringList m_processArgs;
QString m_dumperLib;
int m_attachedPID;
bool m_useTerminal;
......
......@@ -381,6 +381,8 @@ QWidget *DumperOptionPage::createPage(QWidget *parent)
connect(m_ui.radioButtonUsePrebuiltDumpers, SIGNAL(toggled(bool)),
m_ui.dumperLocationChooser, SLOT(setEnabled(bool)));
theDebuggerAction(UseQtDumpers)
->connectWidget(m_ui.radioButtonUseQtDumpers);
theDebuggerAction(UsePrebuiltDumpers)
->connectWidget(m_ui.radioButtonUsePrebuiltDumpers);
theDebuggerAction(BuildDumpersOnTheFly)
......@@ -414,6 +416,7 @@ void DumperOptionPage::apply()
QSettings *s = ICore::instance()->settings();
theDebuggerAction(UseDumpers)->apply(s);
theDebuggerAction(UseQtDumpers)->apply(s);
theDebuggerAction(UsePrebuiltDumpers)->apply(s);
theDebuggerAction(BuildDumpersOnTheFly)->apply(s);
theDebuggerAction(PrebuiltDumpersLocation)->apply(s);
......
......@@ -128,6 +128,7 @@ void DebuggerRunControl::start()
m_manager->m_environment = rc->environment().toStringList();
m_manager->m_workingDir = rc->workingDirectory();
m_manager->m_processArgs = rc->commandLineArguments();
m_manager->m_dumperLib = rc->dumperLibrary();
m_manager->m_buildDir =
project->buildDirectory(project->activeBuildConfiguration());
m_manager->m_useTerminal = rc->runMode() == ApplicationRunConfiguration::Console;
......
......@@ -21,6 +21,13 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radioButtonUseQtDumpers">
<property name="text">
<string>Use Qt dumpers</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButtonBuildDumpersOnTheFly">
<property name="toolTip">
<string>This is the slowest but safest option.</string>
......@@ -30,14 +37,14 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QRadioButton" name="radioButtonUsePrebuiltDumpers">
<property name="text">
<string>Load pre-built data dumpers</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
......
......@@ -3993,6 +3993,8 @@ QString GdbEngine::dumperLibraryName() const
{
if (theDebuggerAction(UsePrebuiltDumpers)->value().toBool())
return theDebuggerAction(PrebuiltDumpersLocation)->value().toString();
if (theDebuggerAction(UseQtDumpers)->value().toBool())
return q->m_dumperLib;
#if defined(Q_OS_WIN)
return q->m_buildDir + "/qtc-gdbmacros/debug/gdbmacros.dll";
#elif defined(Q_OS_MAC)
......@@ -4010,6 +4012,7 @@ void GdbEngine::tryLoadCustomDumpers()
PENDING_DEBUG("TRY LOAD CUSTOM DUMPERS");
m_dataDumperState = DataDumperUnavailable;
QString lib = dumperLibraryName();
//qDebug() << "DUMPERLIB: " << lib;
if (!QFileInfo(lib).exists()) {
debugMessage(QString("DEBUG HELPER LIBRARY IS NOT USABLE: "
......
......@@ -38,7 +38,7 @@ namespace Internal {
QString dotEscape(QString str)
{
const QChar dot = QLatin1Char(',');
const QChar dot = QLatin1Char('.');
str.replace(QLatin1Char(' '), dot);
str.replace(QLatin1Char('\\'), dot);
str.replace(QLatin1Char('/'), dot);
......
......@@ -710,7 +710,6 @@ void testQString()
str += " World ";
str += " World ";
str += " World ";
str.append(s);
}
void testQString3()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment