Commit ab316404 authored by hjk's avatar hjk
Browse files

Fixes: debugger: work on more fine-grained breakpoints-in-plugins

setting
parent 7ebfeb03
......@@ -200,6 +200,11 @@ public:
bool m_useToolTips;
QString m_scriptFile;
bool m_pluginAllBreakpoints;
bool m_pluginSelectedBreakpoints;
bool m_pluginNoBreakpoints;
QString m_pluginSelectedBreakpointsPattern;
};
//
......
......@@ -274,15 +274,24 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
m_ui.scriptFileChooser->setPromptDialogTitle(tr("Choose Location of Startup Script File"));
m_ui.scriptFileChooser->setPath(m_settings.m_scriptFile);
m_ui.environmentEdit->setText(m_settings.m_gdbEnv);
m_ui.autoStartBox->setChecked(m_settings.m_autoRun);
m_ui.autoQuitBox->setChecked(m_settings.m_autoQuit);
m_ui.radioButtonAllPluginBreakpoints->
setChecked(m_settings.m_pluginAllBreakpoints);
m_ui.radioButtonSelectedPluginBreakpoints->
setChecked(m_settings.m_pluginSelectedBreakpoints);
m_ui.radioButtonNoPluginBreakpoints->
setChecked(m_settings.m_pluginNoBreakpoints);
m_ui.lineEditSelectedPluginBreakpointsPattern->
setEnabled(m_settings.m_pluginSelectedBreakpoints);
m_ui.checkBoxSkipKnownFrames->setChecked(m_settings.m_skipKnownFrames);
m_ui.checkBoxDebugDumpers->setChecked(m_settings.m_debugDumpers);
m_ui.checkBoxUseCustomDumpers->setChecked(m_settings.m_useCustomDumpers);
m_ui.checkBoxFastStart->setChecked(m_settings.m_useFastStart);
m_ui.checkBoxUseToolTips->setChecked(m_settings.m_useToolTips);
connect(m_ui.radioButtonSelectedPluginBreakpoints, SIGNAL(toggled(bool)),
m_ui.lineEditSelectedPluginBreakpointsPattern, SLOT(setEnabled(bool)));
#ifndef QT_DEBUG
#if 0
cmd = am->registerAction(m_manager->m_dumpLogAction,
......@@ -294,14 +303,9 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
#endif
// FIXME
m_ui.autoStartBox->hide();
m_ui.autoQuitBox->hide();
m_ui.environmentEdit->hide();
m_ui.labelEnvironment->hide();
m_ui.checkBoxFastStart->setChecked(false);
m_ui.checkBoxFastStart->hide();
//m_dumpLogAction = new QAction(this);
//m_dumpLogAction->setText(tr("Dump Log File for Debugging Purposes"));
//
......@@ -315,16 +319,23 @@ void GdbOptionPage::apply()
{
m_settings.m_gdbCmd = m_ui.gdbLocationChooser->path();
m_settings.m_gdbEnv = m_ui.environmentEdit->text();
m_settings.m_autoRun = m_ui.autoStartBox->isChecked();
m_settings.m_autoQuit = m_ui.autoQuitBox->isChecked();
m_settings.m_scriptFile = m_ui.scriptFileChooser->path();
m_settings.m_skipKnownFrames = m_ui.checkBoxSkipKnownFrames->isChecked();
m_settings.m_debugDumpers = m_ui.checkBoxDebugDumpers->isChecked();
m_settings.m_useCustomDumpers = m_ui.checkBoxUseCustomDumpers->isChecked();
m_settings.m_useFastStart = m_ui.checkBoxFastStart->isChecked();
m_settings.m_useToolTips = m_ui.checkBoxUseToolTips->isChecked();
m_settings.m_pluginAllBreakpoints =
m_ui.radioButtonAllPluginBreakpoints->isChecked();
m_settings.m_pluginSelectedBreakpoints =
m_ui.radioButtonSelectedPluginBreakpoints->isChecked();
m_settings.m_pluginNoBreakpoints =
m_ui.radioButtonNoPluginBreakpoints->isChecked();
m_settings.m_pluginSelectedBreakpointsPattern =
m_ui.lineEditSelectedPluginBreakpointsPattern->text();
*m_plugin->m_manager->settings() = m_settings;
m_plugin->writeSettings();
}
......@@ -889,11 +900,16 @@ void DebuggerPlugin::writeSettings() const
s->setValue("AutoRun", m->m_autoRun);
s->setValue("AutoQuit", m->m_autoQuit);
s->setValue("UseFastStart", m->m_useFastStart);
s->setValue("UseToolTips", m->m_useToolTips);
s->setValue("UseCustomDumpers", m->m_useCustomDumpers);
s->setValue("SkipKnowFrames", m->m_skipKnownFrames);
s->setValue("DebugDumpers", m->m_debugDumpers);
s->setValue("AllPluginBreakpoints", m->m_pluginAllBreakpoints);
s->setValue("SelectedPluginBreakpoints", m->m_pluginSelectedBreakpoints);
s->setValue("NoPluginBreakpoints", m->m_pluginNoBreakpoints);
s->setValue("SelectedPluginBreakpointsPattern", m->m_pluginSelectedBreakpointsPattern);
s->endGroup();
}
......@@ -911,6 +927,7 @@ void DebuggerPlugin::readSettings()
QString defaultScript;
s->beginGroup(QLatin1String("DebugMode"));
QByteArray ba = s->value("State", QByteArray()).toByteArray();
m_toggleLockedAction->setChecked(s->value("Locked", true).toBool());
m->m_gdbCmd = s->value("Location", defaultCommand).toString();
......@@ -922,8 +939,17 @@ void DebuggerPlugin::readSettings()
m->m_skipKnownFrames = s->value("SkipKnownFrames", false).toBool();
m->m_debugDumpers = s->value("DebugDumpers", false).toBool();
m->m_useCustomDumpers = s->value("UseCustomDumpers", true).toBool();
m->m_useFastStart = s->value("UseFastStart", false).toBool();
m->m_useToolTips = s->value("UseToolTips", false).toBool();
m->m_pluginAllBreakpoints =
s->value("AllPluginBreakpoints", false).toBool();
m->m_pluginSelectedBreakpoints =
s->value("SelectedPluginBreakpoints", false).toBool();
m->m_pluginNoBreakpoints =
s->value("NoPluginBreakpoints", true).toBool();
m->m_pluginSelectedBreakpointsPattern =
s->value("SelectedPluginBreakpointsPattern").toString();
s->endGroup();
m_manager->mainWindow()->restoreState(ba);
......
......@@ -764,7 +764,7 @@ void GdbEngine::handleResult(const GdbResultRecord & record, int type,
handleExecStart1(record);
break;
case GdbExecStart2:
handleExecStart2(record);
//handleExecStart2(record);
break;
case GdbExecStart3:
handleExecStart3(record);
......@@ -1726,7 +1726,7 @@ void GdbEngine::handleExecStart1(const GdbResultRecord &response)
}
}
void GdbEngine::handleExecStart3(const GdbResultRecord &response)
void GdbEngine::handleExecStart3(const GdbResultRecord &)
{
#if defined(Q_OS_WIN)
sendCommand("info proc", GdbInfoProc);
......
......@@ -186,7 +186,6 @@ private:
void handleFileExecAndSymbols(const GdbResultRecord &response);
void handleExecRun(const GdbResultRecord &response);
void handleExecStart1(const GdbResultRecord &response);
void handleExecStart2(const GdbResultRecord &response);
void handleExecStart3(const GdbResultRecord &response);
void handleExecJumpToLine(const GdbResultRecord &response);
void handleExecRunToFunction(const GdbResultRecord &response);
......
......@@ -6,22 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>465</width>
<height>372</height>
<width>398</width>
<height>385</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBoxLocations">
<property name="title">
<string>Locations</string>
</property>
......@@ -74,27 +68,80 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxUseCustomDumpers">
<property name="toolTip">
<string>Checking this will make the debugger try to use code to format certain data (QObject, QString, std::string etc.) nicely.</string>
</property>
<property name="text">
<string>Use custom display for Qt and Standard Library objects</string>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBoxPluginDebugging">
<property name="title">
<string>Behaviour of breakpoint setting in plugins</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radioButtonAllPluginBreakpoints">
<property name="toolTip">
<string>This is the slowest but safest option.</string>
</property>
<property name="text">
<string>Try to set breakpoints in plugins always automatically.</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButtonSelectedPluginBreakpoints">
<property name="text">
<string>Try to set breakpoints in selected plugins</string>
</property>
</widget>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labelSelectedPluginBreakpoints">
<property name="text">
<string>Matching regular expression: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditSelectedPluginBreakpointsPattern"/>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="radioButtonNoPluginBreakpoints">
<property name="text">
<string>Never set breakpoints in plugins automatically</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxFastStart">
<item row="2" column="0">
<widget class="QCheckBox" name="checkBoxUseCustomDumpers">
<property name="toolTip">
<string>Checking this will make the debugger start fast by loading only very few debug symbols on start up. This might lead to situations where breakpoints can not be set properly. So uncheck this option if you experience breakpoint related problems.</string>
<string>Checking this will make the debugger try to use code to format certain data (QObject, QString, std::string etc.) nicely.</string>
</property>
<property name="text">
<string>Fast debugger start</string>
<string>Use custom display for Qt and Standard Library objects</string>
</property>
</widget>
</item>
<item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBoxSkipKnownFrames">
<property name="toolTip">
<string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic
......@@ -105,7 +152,7 @@
</property>
</widget>
</item>
<item>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBoxUseToolTips">
<property name="toolTip">
<string>Checking this will make enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default.</string>
......@@ -115,7 +162,7 @@
</property>
</widget>
</item>
<item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBoxDebugDumpers">
<property name="toolTip">
<string notr="true">This is an internal tool to make debugging the Custom Data Dumper code easier. Using this action is in general not needed unless you want do debug Qt Creator itself.</string>
......@@ -125,29 +172,15 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoStartBox">
<property name="text">
<string>Auto run executable on debugger startup</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoQuitBox">
<property name="text">
<string>Quit debugger when the executable exits</string>
</property>
</widget>
</item>
<item>
<spacer>
<item row="6" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>415</width>
<height>41</height>
<width>10</width>
<height>1</height>
</size>
</property>
</spacer>
......
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