Commit 6c15d33c authored by hjk's avatar hjk
Browse files

debugger: use dumpers build alongside Qt

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