diff options
author | hjk <qtc-committer@nokia.com> | 2011-11-29 12:20:06 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-11-30 11:50:20 +0100 |
commit | 600a2f839e8e37aef410aa20df653d580943bcf9 (patch) | |
tree | 45fb9a269807d02fffb72ff4e4816cdfecb14d8b /src | |
parent | a24c49720a0068826ad1c2d160cf644efabfa20b (diff) | |
download | qt-creator-600a2f839e8e37aef410aa20df653d580943bcf9.tar.gz |
debugger: make use of dynamic type for dumpers configurable
It's too expensive to have it unconditionally on in some settings.
Giving the user the possibility to switch it off seems ok.
Change-Id: I7bdcb0ce919f0dca83a4563ac83958efdeb251e7
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/debugger/debuggeractions.cpp | 8 | ||||
-rw-r--r-- | src/plugins/debugger/debuggeractions.h | 1 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdboptionspage.cpp | 3 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdboptionspage.ui | 20 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/pythongdbengine.cpp | 6 | ||||
-rw-r--r-- | src/plugins/debugger/watchwindow.cpp | 1 |
6 files changed, 32 insertions, 7 deletions
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 86fac6ecf0..b50a72b9c9 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -358,6 +358,14 @@ DebuggerSettings::DebuggerSettings(QSettings *settings) insertItem(AutoEnrichParameters, item); item = new SavedAction(this); + item->setSettingsKey(debugModeGroup, QLatin1String("UseDynamicType")); + item->setText(tr("Use dynamic object type for display")); + item->setCheckable(true); + item->setDefaultValue(true); + item->setValue(true); + insertItem(UseDynamicType, item); + + item = new SavedAction(this); item->setSettingsKey(debugModeGroup, QLatin1String("TargetAsync")); item->setCheckable(true); item->setDefaultValue(false); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index 3f0c4bb86f..fadfce9b24 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -120,6 +120,7 @@ enum DebuggerActionCode GdbStartupCommands, GdbWatchdogTimeout, AutoEnrichParameters, + UseDynamicType, TargetAsync, // Stack diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index 2828ee0ec6..01a60a9a29 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -88,6 +88,8 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent) m_ui->checkBoxLoadGdbInit); m_group.insert(debuggerCore()->action(AutoEnrichParameters), m_ui->checkBoxAutoEnrichParameters); + m_group.insert(debuggerCore()->action(UseDynamicType), + m_ui->checkBoxUseDynamicType); m_group.insert(debuggerCore()->action(TargetAsync), m_ui->checkBoxTargetAsync); m_group.insert(debuggerCore()->action(AdjustBreakpointLocations), @@ -120,6 +122,7 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent) << sep << m_ui->groupBoxLocations->title() << sep << m_ui->checkBoxLoadGdbInit->text() << sep << m_ui->checkBoxTargetAsync->text() + << sep << m_ui->checkBoxUseDynamicType->text() << sep << m_ui->labelGdbWatchdogTimeout->text() << sep << m_ui->checkBoxEnableReverseDebugging->text() << sep << m_ui->checkBoxSkipKnownFrames->text() diff --git a/src/plugins/debugger/gdb/gdboptionspage.ui b/src/plugins/debugger/gdb/gdboptionspage.ui index a53133d4aa..a63038e07a 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.ui +++ b/src/plugins/debugger/gdb/gdboptionspage.ui @@ -92,6 +92,16 @@ on slow machines. In this case, the value should be increased.</string> </widget> </item> <item row="4" column="0" colspan="2"> + <widget class="QCheckBox" name="checkBoxUseDynamicType"> + <property name="toolTip"> + <string>This specifies whether the dynamic or the static type of objects will be displayed. Choosing the dynamic type might be slower.</string> + </property> + <property name="text"> + <string>Use dynamic object type for display</string> + </property> + </widget> + </item> + <item row="5" column="0" colspan="2"> <widget class="QCheckBox" name="checkBoxLoadGdbInit"> <property name="toolTip"> <string>This allows or inhibits reading the user's default .gdbinit file on debugger startup.</string> @@ -101,14 +111,14 @@ on slow machines. In this case, the value should be increased.</string> </property> </widget> </item> - <item row="5" column="0" colspan="2"> + <item row="6" column="0" colspan="2"> <widget class="QCheckBox" name="checkBoxTargetAsync"> <property name="text"> <string>Use asynchronous mode to control the inferior</string> </property> </widget> </item> - <item row="6" column="0" colspan="2"> + <item row="7" column="0" colspan="2"> <widget class="QCheckBox" name="checkBoxAutoEnrichParameters"> <property name="toolTip"> <string>This adds common paths to locations of debug information at debugger startup.</string> @@ -118,21 +128,21 @@ on slow machines. In this case, the value should be increased.</string> </property> </widget> </item> - <item row="7" column="0" colspan="2"> + <item row="8" column="0" colspan="2"> <widget class="QCheckBox" name="checkBoxBreakOnWarning"> <property name="text"> <string>Stop when a qWarning is issued</string> </property> </widget> </item> - <item row="8" column="0" colspan="2"> + <item row="9" column="0" colspan="2"> <widget class="QCheckBox" name="checkBoxBreakOnFatal"> <property name="text"> <string>Stop when a qFatal is issued</string> </property> </widget> </item> - <item row="9" column="0" colspan="2"> + <item row="10" column="0" colspan="2"> <widget class="QCheckBox" name="checkBoxEnableReverseDebugging"> <property name="toolTip"> <string><html><head/><body><p>Selecting this enables reverse debugging.</p><.p><b>Note:</b> This feature is very slow and unstable on the GDB side. It exhibits unpredictable behavior when going backwards over system calls and is very likely to destroy your debugging session.</p><body></html></string> diff --git a/src/plugins/debugger/gdb/pythongdbengine.cpp b/src/plugins/debugger/gdb/pythongdbengine.cpp index 17f54be00d..81baea0fe9 100644 --- a/src/plugins/debugger/gdb/pythongdbengine.cpp +++ b/src/plugins/debugger/gdb/pythongdbengine.cpp @@ -93,12 +93,14 @@ void GdbEngine::updateLocalsPython(const UpdateParameters ¶ms) const static bool alwaysVerbose = !qgetenv("QTC_DEBUGGER_PYTHON_VERBOSE").isEmpty(); QByteArray options; + if (alwaysVerbose) + options += "pe,"; if (debuggerCore()->boolSetting(UseDebuggingHelpers)) options += "fancy,"; if (debuggerCore()->boolSetting(AutoDerefPointers)) options += "autoderef,"; - if (alwaysVerbose) - options += "pe,"; + if (debuggerCore()->boolSetting(UseDynamicType)) + options += "dyntype,"; if (options.isEmpty()) options += "defaults,"; if (params.tryPartial) diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 28bef18d5c..7149becdbe 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -864,6 +864,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addAction(debuggerCore()->action(ShowStdNamespace)); menu.addAction(debuggerCore()->action(ShowQtNamespace)); menu.addAction(debuggerCore()->action(SortStructMembers)); + menu.addAction(debuggerCore()->action(UseDynamicType)); QAction *actClearCodeModelSnapshot = new QAction(tr("Refresh Code Model Snapshot"), &menu); |