2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
|
#include "debuggeractions.h"
|
2015-11-23 16:41:54 +01:00
|
|
|
#include "debuggericons.h"
|
2012-04-11 09:16:06 +02:00
|
|
|
|
2010-03-25 16:54:23 +01:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
|
#include "registerpostmortemaction.h"
|
|
|
|
|
#endif
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2014-12-12 08:26:55 +01:00
|
|
|
#include <coreplugin/coreconstants.h>
|
2013-09-04 18:39:43 +02:00
|
|
|
#include <coreplugin/icore.h>
|
2010-03-18 10:59:06 +01:00
|
|
|
#include <utils/savedaction.h>
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QDebug>
|
|
|
|
|
#include <QSettings>
|
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
|
|
|
|
2010-04-08 16:55:25 +02:00
|
|
|
static const char debugModeSettingsGroupC[] = "DebugMode";
|
2013-05-22 00:49:51 -07:00
|
|
|
static const char cdbSettingsGroupC[] = "CDB2";
|
2011-03-04 16:21:57 +01:00
|
|
|
static const char sourcePathMappingArrayNameC[] = "SourcePathMappings";
|
|
|
|
|
static const char sourcePathMappingSourceKeyC[] = "Source";
|
|
|
|
|
static const char sourcePathMappingTargetKeyC[] = "Target";
|
2010-04-08 16:55:25 +02:00
|
|
|
|
2009-03-26 18:02:43 +01:00
|
|
|
namespace Debugger {
|
|
|
|
|
namespace Internal {
|
2009-03-26 15:56:16 +01:00
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
void GlobalDebuggerOptions::toSettings() const
|
2011-03-04 16:21:57 +01:00
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *s = Core::ICore::settings();
|
2018-10-07 22:38:47 +03:00
|
|
|
s->beginWriteArray(sourcePathMappingArrayNameC);
|
2014-09-07 23:24:10 +03:00
|
|
|
if (!sourcePathMap.isEmpty() || !sourcePathRegExpMap.isEmpty()) {
|
2018-10-07 22:38:47 +03:00
|
|
|
const QString sourcePathMappingSourceKey(sourcePathMappingSourceKeyC);
|
|
|
|
|
const QString sourcePathMappingTargetKey(sourcePathMappingTargetKeyC);
|
2011-03-04 16:21:57 +01:00
|
|
|
int i = 0;
|
2014-09-11 22:22:51 +03:00
|
|
|
for (auto it = sourcePathMap.constBegin(), cend = sourcePathMap.constEnd();
|
|
|
|
|
it != cend;
|
|
|
|
|
++it, ++i) {
|
2011-03-04 16:21:57 +01:00
|
|
|
s->setArrayIndex(i);
|
|
|
|
|
s->setValue(sourcePathMappingSourceKey, it.key());
|
|
|
|
|
s->setValue(sourcePathMappingTargetKey, it.value());
|
|
|
|
|
}
|
2014-09-07 23:24:10 +03:00
|
|
|
for (auto it = sourcePathRegExpMap.constBegin(), cend = sourcePathRegExpMap.constEnd();
|
|
|
|
|
it != cend;
|
|
|
|
|
++it, ++i) {
|
|
|
|
|
s->setArrayIndex(i);
|
|
|
|
|
s->setValue(sourcePathMappingSourceKey, it->first.pattern());
|
|
|
|
|
s->setValue(sourcePathMappingTargetKey, it->second);
|
|
|
|
|
}
|
2011-03-04 16:21:57 +01:00
|
|
|
}
|
|
|
|
|
s->endArray();
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
void GlobalDebuggerOptions::fromSettings()
|
2011-03-04 16:21:57 +01:00
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *s = Core::ICore::settings();
|
2011-03-04 16:21:57 +01:00
|
|
|
sourcePathMap.clear();
|
2018-10-07 22:38:47 +03:00
|
|
|
if (const int count = s->beginReadArray(sourcePathMappingArrayNameC)) {
|
|
|
|
|
const QString sourcePathMappingSourceKey(sourcePathMappingSourceKeyC);
|
|
|
|
|
const QString sourcePathMappingTargetKey(sourcePathMappingTargetKeyC);
|
2011-03-04 16:21:57 +01:00
|
|
|
for (int i = 0; i < count; ++i) {
|
|
|
|
|
s->setArrayIndex(i);
|
2014-09-07 23:24:10 +03:00
|
|
|
const QString key = s->value(sourcePathMappingSourceKey).toString();
|
|
|
|
|
const QString value = s->value(sourcePathMappingTargetKey).toString();
|
2018-10-07 22:38:47 +03:00
|
|
|
if (key.startsWith('('))
|
2014-09-07 23:24:10 +03:00
|
|
|
sourcePathRegExpMap.append(qMakePair(QRegExp(key), value));
|
|
|
|
|
else
|
|
|
|
|
sourcePathMap.insert(key, value);
|
2011-03-04 16:21:57 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
s->endArray();
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
//
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
|
|
|
static DebuggerSettings *theDebuggerSettings = nullptr;
|
|
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
DebuggerSettings::DebuggerSettings()
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
|
|
|
theDebuggerSettings = this;
|
|
|
|
|
|
2018-10-07 22:38:47 +03:00
|
|
|
const QString debugModeGroup(debugModeSettingsGroupC);
|
|
|
|
|
const QString cdbSettingsGroup(cdbSettingsGroupC);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2018-02-01 10:59:24 +01:00
|
|
|
SavedAction *item = nullptr;
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SettingsDialog, item);
|
2014-02-20 14:52:10 +01:00
|
|
|
item->setText(tr("Configure Debugger..."));
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
|
// View
|
|
|
|
|
//
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2014-06-03 11:34:52 +02:00
|
|
|
item->setText(tr("Always Adjust View Column Widths to Contents"));
|
2011-03-16 18:48:14 +01:00
|
|
|
item->setCheckable(true);
|
2014-06-02 09:58:20 +02:00
|
|
|
item->setValue(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "AlwaysAdjustColumnWidths");
|
2014-06-03 11:34:52 +02:00
|
|
|
insertItem(AlwaysAdjustColumnWidths, item);
|
2011-03-16 18:48:14 +01:00
|
|
|
|
2014-06-03 11:34:52 +02:00
|
|
|
// Needed by QML Inspector
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Use Alternating Row Colors"));
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseAlternatingRowColours");
|
2009-05-05 10:14:35 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseAlternatingRowColors, item);
|
2009-05-05 10:14:35 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2014-05-02 12:08:44 +02:00
|
|
|
item->setText(tr("Keep Editor Stationary When Stepping"));
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "StationaryEditorWhileStepping");
|
2014-05-02 12:08:44 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(StationaryEditorWhileStepping, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2011-04-01 12:01:14 +02:00
|
|
|
item->setText(tr("Debugger Font Size Follows Main Editor"));
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "FontSizeFollowsEditor");
|
2011-04-01 12:01:14 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(FontSizeFollowsEditor, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Show a Message Box When Receiving a Signal"));
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseMessageBoxForSignals");
|
2009-08-13 14:33:02 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseMessageBoxForSignals, item);
|
2009-08-13 14:33:02 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Log Time Stamps"));
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "LogTimeStamps");
|
2009-06-19 12:04:21 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(LogTimeStamps, item);
|
2009-06-19 12:04:21 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Dereference Pointers Automatically"));
|
2009-10-06 10:54:08 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "AutoDerefPointers");
|
2015-12-18 11:08:40 +01:00
|
|
|
item->setToolTip(tr("<p>This switches the Locals and Expressions view to "
|
2010-08-19 14:04:15 +02:00
|
|
|
"automatically dereference pointers. This saves a level in the "
|
2009-10-06 10:54:08 +02:00
|
|
|
"tree view, but also loses data for the now-missing intermediate "
|
|
|
|
|
"level."));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AutoDerefPointers, item);
|
2009-10-06 10:54:08 +02:00
|
|
|
|
2013-05-22 00:49:51 -07:00
|
|
|
//
|
|
|
|
|
// Cdb Options
|
|
|
|
|
//
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setDefaultValue(QString());
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "AdditionalArguments");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(CdbAdditionalArguments, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setDefaultValue(QStringList());
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "SymbolPaths");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(CdbSymbolPaths, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setDefaultValue(QStringList());
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "SourcePaths");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(CdbSourcePaths, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setDefaultValue(QStringList());
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "BreakEvent");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(CdbBreakEvents, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "BreakOnCrtDbgReport");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(CdbBreakOnCrtDbgReport, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "CDB_Console");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(UseCdbConsole, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "BreakpointCorrection");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(CdbBreakPointCorrection, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2016-12-20 10:02:08 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "UsePythonDumper");
|
2016-12-20 10:02:08 +01:00
|
|
|
insertItem(CdbUsePythonDumper, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-08-14 12:56:56 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "FirstChanceExceptionTaskEntry");
|
2018-08-14 12:56:56 +02:00
|
|
|
insertItem(FirstChanceExceptionTaskEntry, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-08-14 12:56:56 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "SecondChanceExceptionTaskEntry");
|
2018-08-14 12:56:56 +02:00
|
|
|
insertItem(SecondChanceExceptionTaskEntry, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2013-05-22 00:49:51 -07:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(cdbSettingsGroup, "IgnoreFirstChanceAccessViolation");
|
2013-05-22 00:49:51 -07:00
|
|
|
insertItem(IgnoreFirstChanceAccessViolation, item);
|
|
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
|
// Locals & Watchers
|
|
|
|
|
//
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "ShowStandardNamespace");
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Show \"std::\" Namespace in Types"));
|
2015-05-29 11:06:10 +02:00
|
|
|
item->setDialogText(tr("Show \"std::\" namespace in types"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Shows \"std::\" prefix for types from the standard library."));
|
2009-11-25 08:35:02 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ShowStdNamespace, item);
|
2009-11-25 08:35:02 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "ShowQtNamespace");
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Show Qt's Namespace in Types"));
|
2015-05-29 11:06:10 +02:00
|
|
|
item->setDialogText(tr("Show Qt's namespace in types"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Shows Qt namespace prefix for Qt types. This is only "
|
2015-05-29 11:06:10 +02:00
|
|
|
"relevant if Qt was configured with \"-qtnamespace\"."));
|
2009-11-25 08:35:02 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ShowQtNamespace, item);
|
2009-11-25 08:35:02 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "ShowQObjectNames2");
|
2015-12-16 14:13:44 +01:00
|
|
|
item->setText(tr("Show QObject names if available"));
|
|
|
|
|
item->setDialogText(tr("Show QObject names if available"));
|
|
|
|
|
item->setToolTip(tr("<p>Displays the objectName property of QObject based items. "
|
|
|
|
|
"Note that this can negatively impact debugger performance "
|
|
|
|
|
"even if no QObjects are present."));
|
|
|
|
|
item->setCheckable(true);
|
2016-12-01 09:22:53 +01:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2015-12-16 14:13:44 +01:00
|
|
|
insertItem(ShowQObjectNames, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "SortStructMembers");
|
2010-09-23 11:15:56 +02:00
|
|
|
item->setText(tr("Sort Members of Classes and Structs Alphabetically"));
|
2015-05-29 11:06:10 +02:00
|
|
|
item->setDialogText(tr("Sort members of classes and structs alphabetically"));
|
2010-09-23 11:15:56 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SortStructMembers, item);
|
2010-09-23 11:15:56 +02:00
|
|
|
|
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
|
|
|
//
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseDebuggingHelper");
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Use Debugging Helpers"));
|
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);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseDebuggingHelpers, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseCodeModel");
|
2015-05-29 11:06:10 +02:00
|
|
|
item->setDialogText(tr("Use code model"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Selecting this causes the C++ Code Model being asked "
|
2010-02-16 11:28:41 +01:00
|
|
|
"for variable scope information. This might result in slightly faster "
|
|
|
|
|
"debugger operation but may fail for optimized code."));
|
2009-10-16 16:26:28 +02:00
|
|
|
item->setCheckable(true);
|
2009-11-09 16:25:40 +01:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseCodeModel, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "ShowThreadNames");
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Displays names of QThread based threads."));
|
2015-05-29 11:06:10 +02:00
|
|
|
item->setDialogText(tr("Display thread names"));
|
2010-12-20 17:39:51 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
insertItem(ShowThreadNames, 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
|
|
|
//
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Synchronize Breakpoints"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SynchronizeBreakpoints, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-09-21 17:02:41 +02:00
|
|
|
item->setText(tr("Adjust Breakpoint Locations"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Not all source code lines generate "
|
2010-09-21 17:02:41 +02:00
|
|
|
"executable code. Putting a breakpoint on such a line acts as "
|
|
|
|
|
"if the breakpoint was set on the next line that generated code. "
|
|
|
|
|
"Selecting 'Adjust Breakpoint Locations' shifts the red "
|
|
|
|
|
"breakpoint markers in such cases to the location of the true "
|
|
|
|
|
"breakpoint."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "AdjustBreakpointLocations");
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AdjustBreakpointLocations, item);
|
2010-09-21 17:02:41 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-11 17:29:10 +01:00
|
|
|
item->setText(tr("Break on \"throw\""));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "BreakOnThrow");
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(BreakOnThrow, item);
|
2010-02-11 17:29:10 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-11 17:29:10 +01:00
|
|
|
item->setText(tr("Break on \"catch\""));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "BreakOnCatch");
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(BreakOnCatch, item);
|
2010-02-11 17:29:10 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2011-05-30 16:01:50 +02:00
|
|
|
item->setText(tr("Break on \"qWarning\""));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "BreakOnWarning");
|
2011-05-30 16:01:50 +02:00
|
|
|
insertItem(BreakOnWarning, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2011-07-13 16:52:28 +02:00
|
|
|
item->setText(tr("Break on \"qFatal\""));
|
|
|
|
|
item->setCheckable(true);
|
2011-08-05 14:04:01 +02:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "BreakOnFatal");
|
2011-07-13 16:52:28 +02:00
|
|
|
insertItem(BreakOnFatal, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2012-05-08 18:01:28 +03:00
|
|
|
item->setText(tr("Break on \"abort\""));
|
2012-01-15 22:21:59 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "BreakOnAbort");
|
2012-05-08 18:01:28 +03:00
|
|
|
insertItem(BreakOnAbort, item);
|
2012-01-15 22:21:59 +02:00
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
//
|
|
|
|
|
// Settings
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "LoadGdbInit");
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(QString());
|
2010-12-21 11:52:21 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
|
|
|
|
insertItem(LoadGdbInit, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "LoadGdbDumpers2");
|
2013-03-21 17:32:34 +01:00
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
item->setCheckable(true);
|
2014-11-19 12:37:48 +01:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2013-03-21 17:32:34 +01:00
|
|
|
insertItem(LoadGdbDumpers, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "AutoEnrichParameters");
|
2011-09-22 09:30:50 +02:00
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
item->setCheckable(true);
|
2012-05-10 16:22:06 +02:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2011-09-22 09:30:50 +02:00
|
|
|
insertItem(AutoEnrichParameters, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseDynamicType");
|
2012-02-08 23:15:55 +01:00
|
|
|
item->setText(tr("Use Dynamic Object Type for Display"));
|
2011-11-29 12:20:06 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
|
|
|
|
insertItem(UseDynamicType, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "TargetAsync");
|
2011-02-03 16:49:28 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
insertItem(TargetAsync, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "WarnOnReleaseBuilds");
|
2012-06-01 17:21:39 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(WarnOnReleaseBuilds, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "GdbStartupCommands");
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(QString());
|
2011-11-01 17:56:32 +01:00
|
|
|
insertItem(GdbStartupCommands, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "GdbCustomDumperCommands");
|
2013-06-03 14:27:53 +02:00
|
|
|
item->setDefaultValue(QString());
|
2014-06-23 16:33:19 +02:00
|
|
|
insertItem(ExtraDumperCommands, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "ExtraDumperFile");
|
2014-06-23 16:33:19 +02:00
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
insertItem(ExtraDumperFile, item);
|
2013-06-03 14:27:53 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "GdbPostAttachCommands");
|
2012-10-23 10:51:32 +02:00
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
insertItem(GdbPostAttachCommands, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "CloseBuffersOnExit");
|
2010-10-08 17:44:11 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2014-11-17 10:19:18 +01:00
|
|
|
insertItem(CloseSourceBuffersOnExit, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "CloseMemoryBuffersOnExit");
|
2014-11-17 10:19:18 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(CloseMemoryBuffersOnExit, item);
|
2010-10-08 17:44:11 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "SwitchModeOnExit");
|
2010-10-08 17:44:11 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SwitchModeOnExit, item);
|
2010-10-08 17:44:11 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "BreakpointsFullPath");
|
2012-06-10 01:20:30 +04:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(BreakpointsFullPathByDefault, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "RaiseOnInterrupt");
|
2012-03-13 13:50:05 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(RaiseOnInterrupt, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "AutoQuit");
|
2010-02-16 11:28:41 +01: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);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AutoQuit, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "MultiInferior");
|
2012-11-06 15:21:42 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(MultiInferior, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "IntelFlavor");
|
2012-11-09 19:11:19 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(IntelFlavor, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseToolTips");
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setText(tr("Use tooltips in main editor when debugging"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Checking this will enable tooltips for variable "
|
2009-10-01 11:22:44 +02:00
|
|
|
"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);
|
2013-11-01 11:42:30 +01:00
|
|
|
item->setDefaultValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseToolTipsInMainEditor, item);
|
2009-09-23 16:11:25 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseToolTipsInLocalsView");
|
2012-05-14 12:29:27 +02:00
|
|
|
item->setText(tr("Use Tooltips in Locals View when Debugging"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Checking this will enable tooltips in the locals "
|
2009-10-01 11:22:44 +02:00
|
|
|
"view during debugging."));
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseToolTipsInLocalsView, item);
|
2009-03-23 12:28:02 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseToolTipsInBreakpointsView");
|
2012-05-14 12:29:27 +02:00
|
|
|
item->setText(tr("Use Tooltips in Breakpoints View when Debugging"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Checking this will enable tooltips in the breakpoints "
|
2009-10-01 11:22:44 +02:00
|
|
|
"view during debugging."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseToolTipsInBreakpointsView, item);
|
2009-10-01 11:22:44 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "UseToolTipsInStackView");
|
2013-09-24 18:00:48 +02:00
|
|
|
item->setText(tr("Use Tooltips in Stack View when Debugging"));
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>Checking this will enable tooltips in the stack "
|
2013-09-24 18:00:48 +02:00
|
|
|
"view during debugging."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(UseToolTipsInStackView, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "SkipKnownFrames");
|
2010-02-16 11:28:41 +01: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);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SkipKnownFrames, item);
|
2009-05-25 17:19:42 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "EnableReverseDebugging");
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Enable Reverse Debugging"));
|
2009-05-25 17:19:42 +02:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
|
|
|
item->setIcon(Icons::REVERSE_MODE.icon());
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(EnableReverseDebugging, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-03-25 16:54:23 +01:00
|
|
|
#ifdef Q_OS_WIN
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new RegisterPostMortemAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "RegisterForPostMortem");
|
2010-03-25 16:54:23 +01:00
|
|
|
item->setText(tr("Register For Post-Mortem Debugging"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(RegisterForPostMortem, item);
|
2010-03-25 16:54:23 +01:00
|
|
|
#endif
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "AllPluginBreakpoints");
|
2009-04-14 14:24:45 +02:00
|
|
|
item->setDefaultValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AllPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "SelectedPluginBreakpoints");
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SelectedPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "NoPluginBreakpoints");
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(NoPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "SelectedPluginBreakpointsPattern");
|
|
|
|
|
item->setDefaultValue(".*");
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SelectedPluginBreakpointsPattern, item);
|
2009-04-02 15:06:24 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "MaximalStackDepth");
|
2009-04-02 15:06:24 +02:00
|
|
|
item->setDefaultValue(20);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(MaximalStackDepth, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "DisplayStringLimit");
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>The maximum length of string entries in the "
|
2014-05-16 00:18:17 +02:00
|
|
|
"Locals and Expressions pane. Longer than that are cut off "
|
|
|
|
|
"and displayed with an ellipsis attached."));
|
|
|
|
|
item->setDefaultValue(100);
|
|
|
|
|
insertItem(DisplayStringLimit, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "MaximalStringLength");
|
2015-07-02 13:42:22 +03:00
|
|
|
item->setToolTip(tr("<p>The maximum length for strings in separated windows. "
|
2014-05-16 00:18:17 +02:00
|
|
|
"Longer strings are cut off and displayed with an ellipsis attached."));
|
2012-11-11 00:32:33 +01:00
|
|
|
item->setDefaultValue(10000);
|
|
|
|
|
insertItem(MaximalStringLength, item);
|
|
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Reload Full Stack"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ExpandStack, item);
|
2009-04-06 17:27:15 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2010-03-29 18:44:02 +02:00
|
|
|
item->setText(tr("Create Full Backtrace"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(CreateFullBacktrace, item);
|
2010-03-29 18:44:02 +02:00
|
|
|
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "WatchdogTimeout");
|
2009-12-09 15:23:49 +01:00
|
|
|
item->setDefaultValue(20);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(GdbWatchdogTimeout, item);
|
2012-04-18 14:20:54 +02:00
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// QML Tools
|
|
|
|
|
//
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, "ShowQmlObjectTree");
|
2012-04-18 14:20:54 +02:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(ShowQmlObjectTree, item);
|
|
|
|
|
|
2018-10-07 22:38:47 +03:00
|
|
|
const QString qmlInspectorGroup = "QML.Inspector";
|
2019-12-10 08:48:30 +01:00
|
|
|
item = new SavedAction;
|
2018-10-07 22:38:47 +03:00
|
|
|
item->setSettingsKey(qmlInspectorGroup, "QmlInspector.ShowAppOnTop");
|
2012-04-18 14:20:54 +02:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(ShowAppOnTop, item);
|
2010-11-10 16:33:11 +01:00
|
|
|
}
|
2009-12-09 15:23:49 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
DebuggerSettings::~DebuggerSettings()
|
|
|
|
|
{
|
|
|
|
|
qDeleteAll(m_items);
|
2009-03-18 10:04:02 +01:00
|
|
|
}
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
void DebuggerSettings::insertItem(int code, SavedAction *item)
|
|
|
|
|
{
|
|
|
|
|
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());
|
|
|
|
|
m_items[code] = item;
|
|
|
|
|
}
|
2009-04-09 16:51:13 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
void DebuggerSettings::readSettings()
|
|
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *settings = Core::ICore::settings();
|
2019-07-25 17:27:58 +02:00
|
|
|
for (SavedAction *item : qAsConst(m_items))
|
2013-09-04 18:39:43 +02:00
|
|
|
item->readSettings(settings);
|
2010-11-10 16:33:11 +01:00
|
|
|
}
|
2009-04-08 12:11:30 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
void DebuggerSettings::writeSettings() const
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *settings = Core::ICore::settings();
|
2019-07-25 17:27:58 +02:00
|
|
|
for (SavedAction *item : qAsConst(m_items))
|
2013-09-04 18:39:43 +02:00
|
|
|
item->writeSettings(settings);
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
SavedAction *DebuggerSettings::item(int code) const
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2019-07-25 17:27:58 +02:00
|
|
|
QTC_ASSERT(m_items.value(code, nullptr), qDebug() << "CODE: " << code; return nullptr);
|
|
|
|
|
return m_items.value(code, nullptr);
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
|
|
|
QString DebuggerSettings::dump()
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2017-07-14 00:17:35 +03:00
|
|
|
QStringList settings;
|
2019-07-25 17:27:58 +02:00
|
|
|
for (SavedAction *item : qAsConst(theDebuggerSettings->m_items)) {
|
2010-11-10 16:33:11 +01:00
|
|
|
QString key = item->settingsKey();
|
|
|
|
|
if (!key.isEmpty()) {
|
|
|
|
|
const QString current = item->value().toString();
|
|
|
|
|
const QString default_ = item->defaultValue().toString();
|
2017-07-14 00:17:35 +03:00
|
|
|
QString setting = key + ": " + current + " (default: " + default_ + ')';
|
2010-11-10 16:33:11 +01:00
|
|
|
if (current != default_)
|
2017-07-14 00:17:35 +03:00
|
|
|
setting += " ***";
|
|
|
|
|
settings << setting;
|
2010-11-10 16:33:11 +01:00
|
|
|
}
|
|
|
|
|
}
|
2017-07-14 00:17:35 +03:00
|
|
|
settings.sort();
|
|
|
|
|
return "Debugger settings:\n" + settings.join('\n');
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Debugger
|
|
|
|
|
|