2009-03-18 10:04:02 +01:00
|
|
|
/**************************************************************************
|
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
|
|
|
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
|
**
|
2009-06-17 00:01:27 +10:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
|
|
|
** Commercial Usage
|
|
|
|
**
|
|
|
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
|
|
|
** accordance with the Qt Commercial License Agreement provided with the
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
** a written agreement between you and Nokia.
|
|
|
|
**
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
**
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
**
|
|
|
|
** If you are unsure which license is appropriate for your use, please
|
2009-08-14 09:30:56 +02:00
|
|
|
** contact the sales department at http://qt.nokia.com/contact.
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#include "debuggeractions.h"
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
#include <utils/pathchooser.h>
|
|
|
|
|
2009-03-23 14:34:01 +01:00
|
|
|
#include <QtCore/QDebug>
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <QtCore/QSettings>
|
2009-03-24 16:39:01 +01:00
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
#include <QtGui/QAction>
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <QtGui/QAbstractButton>
|
|
|
|
#include <QtGui/QRadioButton>
|
|
|
|
#include <QtGui/QCheckBox>
|
|
|
|
#include <QtGui/QLineEdit>
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-10-05 11:06:05 +02:00
|
|
|
using namespace Utils;
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-03-26 18:02:43 +01:00
|
|
|
namespace Debugger {
|
|
|
|
namespace Internal {
|
2009-03-26 15:56:16 +01:00
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2009-03-19 15:44:26 +01:00
|
|
|
// DebuggerSettings
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-03-19 15:44:26 +01:00
|
|
|
DebuggerSettings::DebuggerSettings(QObject *parent)
|
2009-08-13 16:16:19 +02:00
|
|
|
: QObject(parent)
|
2009-03-19 09:32:09 +01:00
|
|
|
{}
|
|
|
|
|
2009-03-19 15:44:26 +01:00
|
|
|
DebuggerSettings::~DebuggerSettings()
|
2009-03-18 10:04:02 +01:00
|
|
|
{
|
2009-03-19 09:32:09 +01:00
|
|
|
qDeleteAll(m_items);
|
|
|
|
}
|
2010-01-29 21:33:57 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
void DebuggerSettings::insertItem(int code, SavedAction *item)
|
2009-03-18 10:04:02 +01:00
|
|
|
{
|
2009-06-26 13:17:44 +02:00
|
|
|
QTC_ASSERT(!m_items.contains(code),
|
|
|
|
qDebug() << code << item->toString(); return);
|
|
|
|
QTC_ASSERT(item->settingsKey().isEmpty() || item->defaultValue().isValid(),
|
|
|
|
qDebug() << "NO DEFAULT VALUE FOR " << item->settingsKey());
|
2009-03-19 09:32:09 +01:00
|
|
|
m_items[code] = item;
|
|
|
|
}
|
|
|
|
|
2009-03-19 15:44:26 +01:00
|
|
|
void DebuggerSettings::readSettings(QSettings *settings)
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2009-03-26 17:27:44 +01:00
|
|
|
foreach (SavedAction *item, m_items)
|
2009-03-19 09:32:09 +01:00
|
|
|
item->readSettings(settings);
|
|
|
|
}
|
|
|
|
|
2009-04-09 16:51:13 +02:00
|
|
|
void DebuggerSettings::writeSettings(QSettings *settings) const
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2009-03-26 17:27:44 +01:00
|
|
|
foreach (SavedAction *item, m_items)
|
2009-03-19 09:32:09 +01:00
|
|
|
item->writeSettings(settings);
|
|
|
|
}
|
2010-01-29 21:33:57 +01:00
|
|
|
|
2009-04-09 16:51:13 +02:00
|
|
|
SavedAction *DebuggerSettings::item(int code) const
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2009-10-05 12:00:47 +02:00
|
|
|
QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
|
2009-03-19 09:32:09 +01:00
|
|
|
return m_items.value(code, 0);
|
|
|
|
}
|
|
|
|
|
2009-04-09 16:51:13 +02:00
|
|
|
QString DebuggerSettings::dump() const
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
QString out;
|
|
|
|
QTextStream ts(&out);
|
2009-06-26 13:17:44 +02:00
|
|
|
ts << "Debugger settings: ";
|
|
|
|
foreach (SavedAction *item, m_items) {
|
|
|
|
QString key = item->settingsKey();
|
|
|
|
if (!key.isEmpty())
|
|
|
|
ts << '\n' << key << ": " << item->value().toString()
|
|
|
|
<< " (default: " << item->defaultValue().toString() << ")";
|
|
|
|
}
|
2009-03-19 09:32:09 +01:00
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
2009-04-08 12:11:30 +02:00
|
|
|
DebuggerSettings *DebuggerSettings::instance()
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2009-03-19 15:44:26 +01:00
|
|
|
static DebuggerSettings *instance = 0;
|
2009-03-19 09:32:09 +01:00
|
|
|
if (instance)
|
|
|
|
return instance;
|
|
|
|
|
2009-05-05 10:14:35 +02:00
|
|
|
const QString debugModeGroup = QLatin1String("DebugMode");
|
2009-03-19 15:44:26 +01:00
|
|
|
instance = new DebuggerSettings;
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
SavedAction *item = 0;
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-27 13:04:23 +01:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
instance->insertItem(SettingsDialog, item);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Debugger properties..."));
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
// View
|
|
|
|
//
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Adjust column widths to contents"));
|
2009-08-13 14:33:02 +02:00
|
|
|
instance->insertItem(AdjustColumnWidths, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Always adjust column widths to contents"));
|
2009-03-19 15:54:52 +01:00
|
|
|
item->setCheckable(true);
|
2009-08-13 14:33:02 +02:00
|
|
|
instance->insertItem(AlwaysAdjustColumnWidths, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-05-05 10:14:35 +02:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setText(tr("Use alternating row colors"));
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseAlternatingRowColours"));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(UseAlternatingRowColors, item);
|
|
|
|
|
2009-06-19 12:04:21 +02:00
|
|
|
item = new SavedAction(instance);
|
2009-08-13 14:33:02 +02:00
|
|
|
item->setText(tr("Show a message box when receiving a signal"));
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseMessageBoxForSignals"));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
item->setValue(true);
|
|
|
|
instance->insertItem(UseMessageBoxForSignals, item);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
2009-06-19 12:04:21 +02:00
|
|
|
item->setText(tr("Log time stamps"));
|
2009-08-13 14:33:02 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("LogTimeStamps"));
|
2009-06-19 12:04:21 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(LogTimeStamps, item);
|
|
|
|
|
2010-01-15 12:01:26 +01:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setText(tr("Verbose Log"));
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("VerboseLog"));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(VerboseLog, item);
|
|
|
|
|
2009-08-14 13:04:05 +02:00
|
|
|
item = new SavedAction(instance);
|
2009-09-29 11:13:19 +02:00
|
|
|
item->setText(tr("Operate by instruction"));
|
2009-08-14 13:04:05 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
item->setIcon(QIcon(":/debugger/images/debugger_stepoverproc_small.png"));
|
2009-09-29 11:13:19 +02:00
|
|
|
item->setToolTip(tr("This switches the debugger to instruction-wise "
|
|
|
|
"operation mode. In this mode, stepping operates on single "
|
|
|
|
"instructions and the source location view also shows the "
|
|
|
|
"disassembled instructions."));
|
|
|
|
instance->insertItem(OperateByInstruction, item);
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2009-10-06 10:54:08 +02:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setText(tr("Dereference pointers automatically"));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
item->setToolTip(tr("This switches the Locals&Watchers view to "
|
|
|
|
"automatically derefence pointers. This saves a level in the "
|
|
|
|
"tree view, but also loses data for the now-missing intermediate "
|
|
|
|
"level."));
|
|
|
|
instance->insertItem(AutoDerefPointers, item);
|
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
// Locals & Watchers
|
|
|
|
//
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setTextPattern(tr("Watch expression \"%1\""));
|
2009-05-05 10:14:35 +02:00
|
|
|
instance->insertItem(WatchExpression, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setTextPattern(tr("Remove watch expression \"%1\""));
|
2009-05-05 10:14:35 +02:00
|
|
|
instance->insertItem(RemoveWatchExpression, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setTextPattern(tr("Watch expression \"%1\" in separate window"));
|
2009-05-05 10:14:35 +02:00
|
|
|
instance->insertItem(WatchExpressionInWindow, item);
|
2009-03-19 15:24:18 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-03-19 15:24:18 +01:00
|
|
|
instance->insertItem(AssignValue, item);
|
2009-03-19 12:24:04 +01:00
|
|
|
|
2009-04-03 13:39:14 +02:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
instance->insertItem(AssignType, item);
|
|
|
|
|
2009-07-01 12:49:41 +02:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
instance->insertItem(WatchPoint, item);
|
|
|
|
|
2009-11-25 08:35:02 +01:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowStandardNamespace"));
|
|
|
|
item->setText(tr("Show std:: namespace for types"));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
item->setValue(true);
|
|
|
|
instance->insertItem(ShowStdNamespace, item);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowQtNamespace"));
|
|
|
|
item->setText(tr("Show Qt's namespace for types"));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
item->setValue(true);
|
|
|
|
instance->insertItem(ShowQtNamespace, item);
|
|
|
|
|
2009-03-19 12:24:04 +01:00
|
|
|
//
|
2009-04-07 16:39:17 +02:00
|
|
|
// DebuggingHelper
|
2009-05-05 10:14:35 +02:00
|
|
|
//
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseDebuggingHelper"));
|
2009-04-16 14:42:19 +02:00
|
|
|
item->setText(tr("Use debugging helper"));
|
2009-03-27 13:04:23 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(true);
|
2009-06-30 14:31:33 +02:00
|
|
|
item->setValue(true);
|
2009-05-05 10:14:35 +02:00
|
|
|
instance->insertItem(UseDebuggingHelpers, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseCustomDebuggingHelperLocation"));
|
2009-03-27 13:04:23 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-06-30 14:31:33 +02:00
|
|
|
item->setValue(false);
|
2009-06-26 13:17:44 +02:00
|
|
|
instance->insertItem(UseCustomDebuggingHelperLocation, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("CustomDebuggingHelperLocation"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(QString());
|
2009-06-30 14:31:33 +02:00
|
|
|
item->setValue(QString());
|
2009-04-28 15:08:52 +02:00
|
|
|
instance->insertItem(CustomDebuggingHelperLocation, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("DebugDebuggingHelpers"));
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Debug debugging helper"));
|
2009-03-19 15:54:52 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-06-30 14:31:33 +02:00
|
|
|
item->setValue(false);
|
2009-04-28 15:08:52 +02:00
|
|
|
instance->insertItem(DebugDebuggingHelpers, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-10-16 16:26:28 +02:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel"));
|
|
|
|
item->setText(tr("Use code model"));
|
|
|
|
item->setCheckable(true);
|
2009-11-09 16:25:40 +01:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
item->setValue(true);
|
2009-10-16 16:26:28 +02:00
|
|
|
instance->insertItem(UseCodeModel, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Recheck debugging helper availability"));
|
2009-04-07 16:39:17 +02:00
|
|
|
instance->insertItem(RecheckDebuggingHelpers, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
//
|
2009-03-19 09:32:09 +01:00
|
|
|
// Breakpoints
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-05-07 15:34:52 +02:00
|
|
|
item->setText(tr("Synchronize breakpoints"));
|
2009-03-24 16:39:01 +01:00
|
|
|
instance->insertItem(SynchronizeBreakpoints, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-12-09 11:13:20 +01:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setText(tr("Use precise breakpoints"));
|
|
|
|
item->setCheckable(true);
|
2009-12-09 12:27:20 +01:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
item->setValue(false);
|
2009-12-09 11:13:20 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UsePreciseBreakpoints"));
|
|
|
|
instance->insertItem(UsePreciseBreakpoints, item);
|
|
|
|
|
2010-02-11 17:29:10 +01:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setText(tr("Break on \"throw\""));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
item->setValue(false);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnThrow"));
|
|
|
|
instance->insertItem(BreakOnThrow, item);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setText(tr("Break on \"catch\""));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
item->setValue(false);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnCatch"));
|
|
|
|
instance->insertItem(BreakOnCatch, item);
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
//
|
|
|
|
// Settings
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("Location"));
|
2010-02-03 16:50:28 +01:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
item->setDefaultValue(QLatin1String("gdb-i686-pc-mingw32.exe"));
|
|
|
|
#else
|
|
|
|
item->setDefaultValue(QLatin1String("gdb"));
|
|
|
|
#endif
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(GdbLocation, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("Environment"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(QString());
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(GdbEnvironment, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ScriptFile"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(QString());
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(GdbScriptFile, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AutoQuit"));
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Automatically quit debugger"));
|
2009-03-24 15:01:35 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-03-24 15:01:35 +01:00
|
|
|
instance->insertItem(AutoQuit, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setText(tr("Use tooltips in main editor when debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("Checking this will 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."));
|
2009-03-23 12:28:02 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-09-23 16:11:25 +02:00
|
|
|
instance->insertItem(UseToolTipsInMainEditor, item);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView"));
|
|
|
|
item->setText(tr("Use tooltips in locals view when debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("Checking this will enable tooltips in the locals "
|
|
|
|
"view during debugging."));
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(UseToolTipsInLocalsView, item);
|
2009-03-23 12:28:02 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView"));
|
|
|
|
item->setText(tr("Use tooltips in breakpoints view when debugging"));
|
|
|
|
item->setToolTip(tr("Checking this will enable tooltips in the breakpoints "
|
|
|
|
"view during debugging."));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(UseToolTipsInBreakpointsView, item);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInBreakpointsView"));
|
|
|
|
item->setText(tr("Show address data in breakpoints view when debugging"));
|
|
|
|
item->setToolTip(tr("Checking this will show a column with address "
|
|
|
|
"information in the breakpoint view during debugging."));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(UseAddressInBreakpointsView, item);
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInStackView"));
|
|
|
|
item->setText(tr("Show address data in stack view when debugging"));
|
|
|
|
item->setToolTip(tr("Checking this will show a column with address "
|
|
|
|
"information in the stack view during debugging."));
|
|
|
|
item->setCheckable(true);
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
instance->insertItem(UseAddressInStackView, item);
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ListSourceFiles"));
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("List source files"));
|
2009-03-27 12:25:58 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(ListSourceFiles, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SkipKnownFrames"));
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Skip known frames"));
|
2009-03-27 13:04:23 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(SkipKnownFrames, item);
|
2009-05-25 17:19:42 +02:00
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("EnableReverseDebugging"));
|
|
|
|
item->setText(tr("Enable reverse debugging"));
|
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-05-25 17:19:42 +02:00
|
|
|
instance->insertItem(EnableReverseDebugging, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AllPluginBreakpoints"));
|
2009-04-14 14:24:45 +02:00
|
|
|
item->setDefaultValue(true);
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(AllPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpoints"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(SelectedPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("NoPluginBreakpoints"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(NoPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpointsPattern"));
|
2009-08-19 12:32:23 +02:00
|
|
|
item->setDefaultValue(QLatin1String(".*"));
|
2009-04-02 15:06:24 +02:00
|
|
|
instance->insertItem(SelectedPluginBreakpointsPattern, item);
|
|
|
|
|
|
|
|
item = new SavedAction(instance);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStackDepth"));
|
2009-04-02 15:06:24 +02:00
|
|
|
item->setDefaultValue(20);
|
|
|
|
instance->insertItem(MaximalStackDepth, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-04-06 17:27:15 +02:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Reload full stack"));
|
2009-04-06 17:27:15 +02:00
|
|
|
instance->insertItem(ExpandStack, item);
|
|
|
|
|
2009-04-03 15:46:40 +02:00
|
|
|
item = new SavedAction(instance);
|
2009-04-08 12:11:30 +02:00
|
|
|
item->setText(tr("Execute line"));
|
2009-04-03 15:46:40 +02:00
|
|
|
instance->insertItem(ExecuteCommand, item);
|
|
|
|
|
2009-12-09 15:23:49 +01:00
|
|
|
item = new SavedAction(instance);
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
|
|
|
|
item->setDefaultValue(20);
|
|
|
|
instance->insertItem(GdbWatchdogTimeout, item);
|
|
|
|
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
return instance;
|
2009-03-18 10:04:02 +01:00
|
|
|
}
|
|
|
|
|
2009-04-09 16:51:13 +02:00
|
|
|
|
2009-04-08 12:11:30 +02:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// DebuggerActions
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
SavedAction *theDebuggerAction(int code)
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2009-04-08 12:11:30 +02:00
|
|
|
return DebuggerSettings::instance()->item(code);
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool theDebuggerBoolSetting(int code)
|
|
|
|
{
|
2009-04-08 12:11:30 +02:00
|
|
|
return DebuggerSettings::instance()->item(code)->value().toBool();
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
QString theDebuggerStringSetting(int code)
|
|
|
|
{
|
2009-04-08 12:11:30 +02:00
|
|
|
return DebuggerSettings::instance()->item(code)->value().toString();
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
} // namespace Internal
|
|
|
|
} // namespace Debugger
|
|
|
|
|