2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2010-06-16 11:08:54 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2010-06-16 11:08:54 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2010-06-16 11:08:54 +02: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.
|
2010-06-16 11:08:54 +02: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
|
|
|
****************************************************************************/
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
|
#include "debugger_global.h"
|
|
|
|
|
#include "debuggerconstants.h"
|
2016-07-29 15:55:15 +02:00
|
|
|
#include "debuggeritem.h"
|
2015-11-03 12:01:57 +01:00
|
|
|
#include "debuggerprotocol.h"
|
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
|
|
|
#include "breakhandler.h"
|
2018-08-15 17:28:00 +02:00
|
|
|
#include "threadshandler.h"
|
2015-05-27 13:59:56 +02: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
|
|
|
#include <coreplugin/icontext.h>
|
2015-05-27 13:59:56 +02:00
|
|
|
#include <projectexplorer/devicesupport/idevice.h>
|
2019-03-13 08:06:08 +01:00
|
|
|
#include <projectexplorer/runcontrol.h>
|
2015-07-17 16:33:25 +02:00
|
|
|
#include <texteditor/textmark.h>
|
2018-05-24 11:17:04 +02:00
|
|
|
#include <utils/fileutils.h>
|
2010-10-19 11:14:03 +02:00
|
|
|
|
2015-03-05 11:11:32 +01:00
|
|
|
#include <QProcess>
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QDebug;
|
|
|
|
|
class QPoint;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2012-03-30 17:36:44 +02:00
|
|
|
namespace Core { class IOptionsPage; }
|
2017-03-01 09:35:28 +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
|
|
|
namespace Utils {
|
|
|
|
|
class MacroExpander;
|
|
|
|
|
class Perspective;
|
|
|
|
|
} // Utils
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
|
namespace Debugger {
|
|
|
|
|
|
2017-04-21 10:10:25 +02:00
|
|
|
class DebuggerRunTool;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2019-02-18 15:49:05 +01:00
|
|
|
enum DebuggerState
|
|
|
|
|
{
|
|
|
|
|
DebuggerNotReady, // Debugger not started
|
|
|
|
|
|
|
|
|
|
EngineSetupRequested, // Engine starts
|
|
|
|
|
EngineSetupFailed,
|
|
|
|
|
EngineSetupOk,
|
|
|
|
|
|
|
|
|
|
EngineRunRequested,
|
|
|
|
|
EngineRunFailed,
|
|
|
|
|
|
|
|
|
|
InferiorUnrunnable, // Used in the core dump adapter
|
|
|
|
|
|
|
|
|
|
InferiorRunRequested, // Debuggee requested to run
|
|
|
|
|
InferiorRunOk, // Debuggee running
|
|
|
|
|
InferiorRunFailed, // Debuggee not running
|
|
|
|
|
|
|
|
|
|
InferiorStopRequested, // Debuggee running, stop requested
|
|
|
|
|
InferiorStopOk, // Debuggee stopped
|
|
|
|
|
InferiorStopFailed, // Debuggee not stopped, will kill debugger
|
|
|
|
|
|
|
|
|
|
InferiorShutdownRequested,
|
|
|
|
|
InferiorShutdownFinished,
|
|
|
|
|
|
|
|
|
|
EngineShutdownRequested,
|
|
|
|
|
EngineShutdownFinished,
|
|
|
|
|
|
|
|
|
|
DebuggerFinished
|
|
|
|
|
};
|
|
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
DEBUGGER_EXPORT QDebug operator<<(QDebug str, DebuggerState state);
|
|
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2014-12-12 15:33:16 +01:00
|
|
|
class DebuggerEnginePrivate;
|
2010-11-10 11:39:01 +01:00
|
|
|
class DebuggerPluginPrivate;
|
2010-12-14 12:29:32 +01:00
|
|
|
class DisassemblerAgent;
|
|
|
|
|
class MemoryAgent;
|
2015-03-19 12:42:53 +01:00
|
|
|
class WatchItem;
|
2010-06-16 11:08:54 +02:00
|
|
|
class BreakHandler;
|
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
|
|
|
class BreakpointParameters;
|
2015-07-16 08:14:17 +02:00
|
|
|
class LocationMark;
|
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
|
|
|
class LogWindow;
|
2010-06-16 11:08:54 +02:00
|
|
|
class ModulesHandler;
|
|
|
|
|
class RegisterHandler;
|
2019-07-28 23:32:33 +03:00
|
|
|
class PeripheralRegisterHandler;
|
2010-06-16 11:08:54 +02:00
|
|
|
class StackHandler;
|
|
|
|
|
class StackFrame;
|
|
|
|
|
class SourceFilesHandler;
|
|
|
|
|
class WatchHandler;
|
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
|
|
|
class WatchTreeView;
|
2011-02-11 15:00:13 +01:00
|
|
|
class DebuggerToolTipContext;
|
2018-08-23 15:21:43 +02:00
|
|
|
class DebuggerToolTipManager;
|
2014-12-17 13:14:29 +01:00
|
|
|
class MemoryViewSetupData;
|
2017-09-27 08:22:02 +02:00
|
|
|
class TerminalRunner;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2017-09-12 10:53:56 +02:00
|
|
|
class DebuggerRunParameters
|
2015-05-27 13:59:56 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2017-09-12 10:53:56 +02:00
|
|
|
DebuggerStartMode startMode = NoStartMode;
|
|
|
|
|
DebuggerCloseMode closeMode = KillAtClose;
|
|
|
|
|
|
2018-05-16 15:42:03 +02:00
|
|
|
ProjectExplorer::Runnable inferior;
|
2017-09-12 10:53:56 +02:00
|
|
|
QString displayName; // Used in the Snapshots view.
|
|
|
|
|
Utils::ProcessHandle attachPID;
|
|
|
|
|
QStringList solibSearchPath;
|
|
|
|
|
|
|
|
|
|
// Used by Qml debugging.
|
|
|
|
|
QUrl qmlServer;
|
|
|
|
|
|
|
|
|
|
// Used by general remote debugging.
|
|
|
|
|
QString remoteChannel;
|
|
|
|
|
bool useExtendedRemote = false; // Whether to use GDB's target extended-remote or not.
|
2019-06-20 17:19:12 +02:00
|
|
|
Utils::FilePath symbolFile;
|
2017-09-12 10:53:56 +02:00
|
|
|
|
|
|
|
|
// Used by Mer plugin (3rd party)
|
|
|
|
|
QMap<QString, QString> sourcePathMap;
|
|
|
|
|
|
|
|
|
|
// Used by baremetal plugin
|
|
|
|
|
QString commandsForReset; // commands used for resetting the inferior
|
|
|
|
|
bool useContinueInsteadOfRun = false; // if connected to a hw debugger run is not possible but continue is used
|
|
|
|
|
QString commandsAfterConnect; // additional commands to post after connection to debug target
|
|
|
|
|
|
|
|
|
|
// Used by Valgrind
|
|
|
|
|
QStringList expectedSignals;
|
|
|
|
|
|
|
|
|
|
// For QNX debugging
|
|
|
|
|
bool useCtrlCStub = false;
|
|
|
|
|
|
|
|
|
|
// Used by Android to avoid false positives on warnOnRelease
|
|
|
|
|
bool skipExecutableValidation = false;
|
|
|
|
|
bool useTargetAsync = false;
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::FilePathList additionalSearchDirectories;
|
2017-09-12 10:53:56 +02:00
|
|
|
|
|
|
|
|
// Used by iOS.
|
|
|
|
|
QString platform;
|
|
|
|
|
QString deviceSymbolsRoot;
|
|
|
|
|
bool continueAfterAttach = false;
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::FilePath sysRoot;
|
2017-09-12 10:53:56 +02:00
|
|
|
|
|
|
|
|
// Used by general core file debugging. Public access requested in QTCREATORBUG-17158.
|
|
|
|
|
QString coreFile;
|
|
|
|
|
|
|
|
|
|
// Macro-expanded and passed to debugger startup.
|
|
|
|
|
QString additionalStartupCommands;
|
2015-05-27 13:59:56 +02:00
|
|
|
|
2015-06-26 13:06:08 +02:00
|
|
|
DebuggerEngineType cppEngineType = NoEngineType;
|
|
|
|
|
|
2017-09-20 16:34:54 +02:00
|
|
|
bool isQmlDebugging = false;
|
2015-06-26 13:06:08 +02:00
|
|
|
bool breakOnMain = false;
|
|
|
|
|
bool multiProcess = false; // Whether to set detach-on-fork off.
|
2018-05-03 18:15:49 +02:00
|
|
|
bool useTerminal = false;
|
2015-06-26 13:06:08 +02:00
|
|
|
|
2018-05-16 15:42:03 +02:00
|
|
|
ProjectExplorer::Runnable debugger;
|
2015-05-27 13:59:56 +02:00
|
|
|
QString overrideStartScript; // Used in attach to core and remote debugging
|
|
|
|
|
QString startMessage; // First status message shown.
|
|
|
|
|
QString debugInfoLocation; // Gdb "set-debug-file-directory".
|
|
|
|
|
QStringList debugSourceLocation; // Gdb "directory"
|
2017-12-08 13:55:15 +01:00
|
|
|
QString qtPackageSourceLocation;
|
2015-06-24 08:26:35 +02:00
|
|
|
bool isSnapshot = false; // Set if created internally.
|
2015-06-26 13:06:08 +02:00
|
|
|
ProjectExplorer::Abi toolChainAbi;
|
|
|
|
|
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::FilePath projectSourceDirectory;
|
|
|
|
|
Utils::FilePathList projectSourceFiles;
|
2015-05-27 13:59:56 +02:00
|
|
|
|
2015-07-23 11:23:52 +02:00
|
|
|
// Used by Script debugging
|
|
|
|
|
QString interpreter;
|
|
|
|
|
QString mainScript;
|
|
|
|
|
|
2015-05-27 13:59:56 +02:00
|
|
|
// Used by AttachCrashedExternal.
|
|
|
|
|
QString crashParameter;
|
|
|
|
|
|
2015-10-08 16:19:57 +02:00
|
|
|
bool nativeMixedEnabled = false;
|
|
|
|
|
|
2018-07-25 14:07:08 +02:00
|
|
|
bool isCppDebugging() const;
|
2017-09-19 17:36:12 +02:00
|
|
|
bool isNativeMixedDebugging() const;
|
|
|
|
|
|
2018-02-01 10:59:24 +01:00
|
|
|
Utils::MacroExpander *macroExpander = nullptr;
|
2016-03-22 10:47:03 +01:00
|
|
|
|
2015-05-27 13:59:56 +02:00
|
|
|
// For Debugger testing.
|
2015-06-24 08:26:35 +02:00
|
|
|
int testCase = 0;
|
2017-09-18 14:47:39 +02:00
|
|
|
|
|
|
|
|
QStringList validationErrors;
|
2015-05-27 13:59:56 +02:00
|
|
|
};
|
|
|
|
|
|
2015-06-08 18:07:11 +02:00
|
|
|
class UpdateParameters
|
|
|
|
|
{
|
|
|
|
|
public:
|
2016-11-03 13:28:28 +01:00
|
|
|
UpdateParameters(const QString &partialVariable = QString()) :
|
|
|
|
|
partialVariable(partialVariable) {}
|
2015-06-08 18:07:11 +02:00
|
|
|
|
2016-06-07 17:04:53 +02:00
|
|
|
QStringList partialVariables() const
|
2015-07-06 09:46:08 +02:00
|
|
|
{
|
2016-06-07 17:04:53 +02:00
|
|
|
QStringList result;
|
2015-07-06 09:46:08 +02:00
|
|
|
if (!partialVariable.isEmpty())
|
|
|
|
|
result.append(partialVariable);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-07 17:04:53 +02:00
|
|
|
QString partialVariable;
|
2015-06-08 18:07:11 +02:00
|
|
|
};
|
|
|
|
|
|
2010-12-16 19:06:33 +01:00
|
|
|
class Location
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-07-23 22:28:49 +02:00
|
|
|
Location() = default;
|
2016-08-05 12:29:39 +02:00
|
|
|
Location(quint64 address) { m_address = address; }
|
|
|
|
|
Location(const QString &file) { m_fileName = file; }
|
2010-12-16 19:06:33 +01:00
|
|
|
Location(const QString &file, int line, bool marker = true)
|
2016-08-05 12:29:39 +02:00
|
|
|
{ m_lineNumber = line; m_fileName = file; m_needsMarker = marker; }
|
2011-01-10 10:14:23 +01:00
|
|
|
Location(const StackFrame &frame, bool marker = true);
|
2010-12-16 19:06:33 +01:00
|
|
|
QString fileName() const { return m_fileName; }
|
|
|
|
|
QString functionName() const { return m_functionName; }
|
2011-07-04 09:29:28 +02:00
|
|
|
QString from() const { return m_from; }
|
2010-12-16 19:06:33 +01:00
|
|
|
int lineNumber() const { return m_lineNumber; }
|
|
|
|
|
void setNeedsRaise(bool on) { m_needsRaise = on; }
|
|
|
|
|
void setNeedsMarker(bool on) { m_needsMarker = on; }
|
|
|
|
|
void setFileName(const QString &fileName) { m_fileName = fileName; }
|
2014-11-15 13:13:29 +01:00
|
|
|
void setUseAssembler(bool on) { m_hasDebugInfo = !on; }
|
2010-12-16 19:06:33 +01:00
|
|
|
bool needsRaise() const { return m_needsRaise; }
|
|
|
|
|
bool needsMarker() const { return m_needsMarker; }
|
|
|
|
|
bool hasDebugInfo() const { return m_hasDebugInfo; }
|
2015-02-27 11:56:03 +01:00
|
|
|
bool canBeDisassembled() const
|
|
|
|
|
{ return m_address != quint64(-1) || !m_functionName.isEmpty(); }
|
2010-12-16 19:06:33 +01:00
|
|
|
quint64 address() const { return m_address; }
|
|
|
|
|
|
|
|
|
|
private:
|
2016-08-05 12:29:39 +02:00
|
|
|
bool m_needsMarker = false;
|
|
|
|
|
bool m_needsRaise = true;
|
|
|
|
|
bool m_hasDebugInfo = true;
|
|
|
|
|
int m_lineNumber = -1;
|
2010-12-16 19:06:33 +01:00
|
|
|
QString m_fileName;
|
|
|
|
|
QString m_functionName;
|
2011-07-04 09:29:28 +02:00
|
|
|
QString m_from;
|
2016-08-05 12:29:39 +02:00
|
|
|
quint64 m_address = 0;
|
2010-12-16 19:06:33 +01:00
|
|
|
};
|
|
|
|
|
|
2014-12-12 15:33:16 +01:00
|
|
|
class DebuggerEngine : public QObject
|
2010-06-16 11:08:54 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
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
|
|
|
DebuggerEngine();
|
2018-05-07 15:06:53 +02:00
|
|
|
~DebuggerEngine() override;
|
2010-06-16 11:08:54 +02: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
|
|
|
void setRunTool(DebuggerRunTool *runTool);
|
|
|
|
|
void setRunParameters(const DebuggerRunParameters &runParameters);
|
2017-09-19 17:36:12 +02:00
|
|
|
|
2018-09-04 13:29:15 +02:00
|
|
|
void setRunId(const QString &id);
|
|
|
|
|
QString runId() const;
|
|
|
|
|
|
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
|
|
|
const DebuggerRunParameters &runParameters() const;
|
|
|
|
|
void setCompanionEngine(DebuggerEngine *engine);
|
|
|
|
|
void setSecondaryEngine();
|
2017-04-27 15:39:30 +02:00
|
|
|
|
|
|
|
|
void start();
|
|
|
|
|
|
2016-12-13 13:37:05 +01:00
|
|
|
enum {
|
|
|
|
|
// Remove need to qualify each use.
|
|
|
|
|
NeedsTemporaryStop = DebuggerCommand::NeedsTemporaryStop,
|
|
|
|
|
NeedsFullStop = DebuggerCommand::NeedsFullStop,
|
|
|
|
|
Discardable = DebuggerCommand::Discardable,
|
|
|
|
|
ConsoleCommand = DebuggerCommand::ConsoleCommand,
|
|
|
|
|
NeedsFlush = DebuggerCommand::NeedsFlush,
|
|
|
|
|
ExitRequest = DebuggerCommand::ExitRequest,
|
|
|
|
|
RunRequest = DebuggerCommand::RunRequest,
|
|
|
|
|
LosesChild = DebuggerCommand::LosesChild,
|
|
|
|
|
InUpdateLocals = DebuggerCommand::InUpdateLocals,
|
2017-01-20 10:05:31 +01:00
|
|
|
NativeCommand = DebuggerCommand::NativeCommand,
|
2016-12-13 13:37:05 +01:00
|
|
|
Silent = DebuggerCommand::Silent
|
|
|
|
|
};
|
|
|
|
|
|
2015-06-08 18:07:11 +02:00
|
|
|
virtual bool canHandleToolTip(const DebuggerToolTipContext &) const;
|
2016-06-07 17:04:53 +02:00
|
|
|
virtual void expandItem(const QString &iname); // Called when item in tree gets expanded.
|
|
|
|
|
virtual void updateItem(const QString &iname); // Called for fresh watch items.
|
|
|
|
|
void updateWatchData(const QString &iname); // FIXME: Merge with above.
|
|
|
|
|
virtual void selectWatchData(const QString &iname);
|
2012-11-23 13:35:44 +01:00
|
|
|
|
2018-11-13 09:20:24 +01:00
|
|
|
virtual void validateRunParameters(DebuggerRunParameters &) {}
|
2016-05-27 13:57:21 +02:00
|
|
|
virtual void prepareForRestart() {}
|
2018-05-25 17:33:20 +02:00
|
|
|
virtual void abortDebuggerProcess() {} // second attempt
|
2010-09-13 13:30:35 +02:00
|
|
|
|
2016-12-15 18:30:05 +01:00
|
|
|
virtual void watchPoint(const QPoint &pnt);
|
2015-11-03 12:01:57 +01:00
|
|
|
virtual void runCommand(const DebuggerCommand &cmd);
|
2014-12-17 13:14:29 +01:00
|
|
|
virtual void openMemoryView(const MemoryViewSetupData &data);
|
2016-07-14 10:00:15 +02:00
|
|
|
virtual void fetchMemory(MemoryAgent *, quint64 addr, quint64 length);
|
|
|
|
|
virtual void changeMemory(MemoryAgent *, quint64 addr, const QByteArray &data);
|
2010-12-13 18:17:31 +01:00
|
|
|
virtual void updateMemoryViews();
|
2010-12-16 19:06:33 +01:00
|
|
|
virtual void openDisassemblerView(const Internal::Location &location);
|
2010-12-14 12:29:32 +01:00
|
|
|
virtual void fetchDisassembler(Internal::DisassemblerAgent *);
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void activateFrame(int index);
|
|
|
|
|
|
|
|
|
|
virtual void reloadModules();
|
|
|
|
|
virtual void examineModules();
|
|
|
|
|
virtual void loadSymbols(const QString &moduleName);
|
2010-12-21 13:34:59 +01:00
|
|
|
virtual void loadSymbolsForStack();
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void loadAllSymbols();
|
|
|
|
|
virtual void requestModuleSymbols(const QString &moduleName);
|
2012-11-07 18:31:17 +01:00
|
|
|
virtual void requestModuleSections(const QString &moduleName);
|
2010-09-13 13:30:35 +02:00
|
|
|
|
|
|
|
|
virtual void reloadRegisters();
|
2019-07-28 23:32:33 +03:00
|
|
|
virtual void reloadPeripheralRegisters();
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void reloadSourceFiles();
|
|
|
|
|
virtual void reloadFullStack();
|
2014-02-07 18:10:02 +01:00
|
|
|
virtual void loadAdditionalQmlStack();
|
2013-01-10 12:40:50 +01:00
|
|
|
virtual void reloadDebuggingHelpers();
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2016-06-07 17:04:53 +02:00
|
|
|
virtual void setRegisterValue(const QString &name, const QString &value);
|
2019-07-28 23:32:33 +03:00
|
|
|
virtual void setPeripheralRegisterValue(quint64 address, quint64 value);
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void addOptionPages(QList<Core::IOptionsPage*> *) const;
|
2012-01-12 20:28:17 +01:00
|
|
|
virtual bool hasCapability(unsigned cap) const = 0;
|
2014-01-04 01:34:51 +01:00
|
|
|
virtual void debugLastCommand() {}
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2016-06-07 17:04:53 +02:00
|
|
|
virtual QString qtNamespace() const;
|
|
|
|
|
void setQtNamespace(const QString &ns);
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void createSnapshot();
|
|
|
|
|
virtual void updateAll();
|
2015-06-08 18:07:11 +02:00
|
|
|
virtual void updateLocals();
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2018-10-23 15:32:33 +02:00
|
|
|
Core::Context debuggerContext() const;
|
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
|
|
|
virtual Core::Context languageContext() const { return {}; }
|
2018-09-04 13:29:15 +02:00
|
|
|
QString displayName() const;
|
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
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
virtual bool stateAcceptsBreakpointChanges() const { return true; }
|
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
|
|
|
virtual bool acceptsBreakpoint(const BreakpointParameters &bp) const = 0;
|
|
|
|
|
virtual void insertBreakpoint(const Breakpoint &bp) = 0;
|
|
|
|
|
virtual void removeBreakpoint(const Breakpoint &bp) = 0;
|
|
|
|
|
virtual void updateBreakpoint(const Breakpoint &bp) = 0;
|
|
|
|
|
virtual void enableSubBreakpoint(const SubBreakpoint &sbp, bool enabled);
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2011-02-16 12:41:06 +01:00
|
|
|
virtual bool acceptsDebuggerCommands() const { return true; }
|
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
|
|
|
virtual void executeDebuggerCommand(const QString &command);
|
2014-01-04 01:34:51 +01:00
|
|
|
|
2015-03-19 12:42:53 +01:00
|
|
|
virtual void assignValueInDebugger(WatchItem *item,
|
2010-11-08 15:19:13 +01:00
|
|
|
const QString &expr, const QVariant &value);
|
2018-08-15 17:28:00 +02:00
|
|
|
virtual void selectThread(const Internal::Thread &thread) = 0;
|
2010-07-21 14:24:29 +02: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
|
|
|
virtual void executeRecordReverse(bool) {}
|
|
|
|
|
virtual void executeReverse(bool) {}
|
|
|
|
|
|
|
|
|
|
ModulesHandler *modulesHandler() const;
|
|
|
|
|
RegisterHandler *registerHandler() const;
|
2019-07-28 23:32:33 +03:00
|
|
|
PeripheralRegisterHandler *peripheralRegisterHandler() const;
|
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
|
|
|
StackHandler *stackHandler() const;
|
|
|
|
|
ThreadsHandler *threadsHandler() const;
|
|
|
|
|
WatchHandler *watchHandler() const;
|
|
|
|
|
SourceFilesHandler *sourceFilesHandler() const;
|
|
|
|
|
BreakHandler *breakHandler() const;
|
|
|
|
|
LogWindow *logWindow() const;
|
|
|
|
|
DisassemblerAgent *disassemblerAgent() const;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-07-21 11:02:51 +02:00
|
|
|
void progressPing();
|
2010-06-16 11:08:54 +02:00
|
|
|
bool debuggerActionsEnabled() const;
|
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
|
|
|
virtual bool companionPreventsActions() const;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2018-10-05 12:03:19 +02:00
|
|
|
bool operatesByInstruction() const;
|
|
|
|
|
virtual void operateByInstructionTriggered(bool on); // FIXME: Remove.
|
|
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
DebuggerState state() const;
|
2010-09-13 13:30:35 +02:00
|
|
|
bool isDying() const;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2016-06-07 17:04:53 +02:00
|
|
|
static QString stateName(int s);
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2017-03-01 09:35:28 +01:00
|
|
|
void notifyInferiorPid(const Utils::ProcessHandle &pid);
|
2010-06-16 11:08:54 +02:00
|
|
|
qint64 inferiorPid() const;
|
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
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
bool isReverseDebugging() const;
|
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
|
|
|
void handleBeginOfRecordingReached();
|
|
|
|
|
void handleRecordingFailed();
|
|
|
|
|
void handleRecordReverse(bool);
|
|
|
|
|
void handleReverseDirection(bool);
|
|
|
|
|
|
2010-07-09 08:48:33 +02:00
|
|
|
// Convenience
|
2011-02-21 17:01:40 +01:00
|
|
|
Q_SLOT virtual void showMessage(const QString &msg, int channel = LogDebug,
|
2010-12-14 12:21:29 +01:00
|
|
|
int timeout = -1) const;
|
2010-07-14 16:01:53 +02:00
|
|
|
Q_SLOT void showStatusMessage(const QString &msg, int timeout = -1) const;
|
2010-07-09 08:48:33 +02:00
|
|
|
|
2011-10-12 17:26:18 +02:00
|
|
|
virtual void resetLocation();
|
2010-12-16 19:06:33 +01:00
|
|
|
virtual void gotoLocation(const Internal::Location &location);
|
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
|
|
|
void gotoCurrentLocation();
|
2017-05-19 11:54:13 +02:00
|
|
|
virtual void quitDebugger(); // called when pressing the stop button
|
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
|
|
|
void abortDebugger();
|
2018-11-09 11:36:28 +01:00
|
|
|
void updateUi(bool isCurrentEngine);
|
2017-09-19 12:31:19 +02: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
|
|
|
bool isPrimaryEngine() const;
|
2010-10-27 14:21:33 +02:00
|
|
|
|
2015-06-08 18:07:11 +02:00
|
|
|
virtual bool canDisplayTooltip() const;
|
2011-01-24 16:58:35 +01:00
|
|
|
|
2016-03-22 10:47:03 +01:00
|
|
|
QString expand(const QString &string) const;
|
2017-01-20 09:38:59 +01:00
|
|
|
QString nativeStartupCommands() const;
|
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
|
|
|
Utils::Perspective *perspective() const;
|
|
|
|
|
void updateMarkers();
|
|
|
|
|
|
2018-08-23 15:21:43 +02:00
|
|
|
void updateToolTips();
|
|
|
|
|
DebuggerToolTipManager *toolTipManager();
|
|
|
|
|
|
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
|
|
|
signals:
|
|
|
|
|
void engineStarted();
|
|
|
|
|
void engineFinished();
|
|
|
|
|
void requestRunControlFinish();
|
|
|
|
|
void requestRunControlStop();
|
|
|
|
|
void attachToCoreRequested(const QString &coreFile);
|
|
|
|
|
void appendMessageRequested(const QString &msg,
|
|
|
|
|
Utils::OutputFormat format,
|
|
|
|
|
bool appendNewLine) const;
|
2016-03-22 10:47:03 +01:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
protected:
|
2017-09-12 10:33:59 +02:00
|
|
|
void notifyEngineSetupOk();
|
|
|
|
|
void notifyEngineSetupFailed();
|
|
|
|
|
void notifyEngineRunFailed();
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2017-09-12 10:33:59 +02:00
|
|
|
void notifyEngineRunAndInferiorRunOk();
|
|
|
|
|
void notifyEngineRunAndInferiorStopOk();
|
|
|
|
|
void notifyEngineRunOkAndInferiorUnrunnable(); // Called by CoreAdapter.
|
2010-07-13 08:41:27 +02:00
|
|
|
|
|
|
|
|
// Use notifyInferiorRunRequested() plus notifyInferiorRunOk() instead.
|
2017-09-12 10:33:59 +02:00
|
|
|
// void notifyInferiorSpontaneousRun();
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2017-09-12 10:33:59 +02:00
|
|
|
void notifyInferiorRunRequested();
|
|
|
|
|
void notifyInferiorRunOk();
|
|
|
|
|
void notifyInferiorRunFailed();
|
2010-07-09 17:07:59 +02: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
|
|
|
void notifyInferiorIll();
|
|
|
|
|
void notifyInferiorExited();
|
|
|
|
|
|
2017-09-12 10:33:59 +02:00
|
|
|
void notifyInferiorStopOk();
|
|
|
|
|
void notifyInferiorSpontaneousStop();
|
|
|
|
|
void notifyInferiorStopFailed();
|
2014-12-12 15:33:16 +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
|
|
|
public:
|
2019-03-22 07:35:48 +01:00
|
|
|
void updateState();
|
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 formatStartParameters() const;
|
|
|
|
|
WatchTreeView *inspectorView();
|
|
|
|
|
void updateLocalsWindow(bool showReturn);
|
|
|
|
|
void raiseWatchersWindow();
|
2018-09-04 13:29:15 +02:00
|
|
|
QString debuggerName() const;
|
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
|
|
|
|
|
|
|
|
bool isRegistersWindowVisible() const;
|
2019-07-28 23:32:33 +03:00
|
|
|
bool isPeripheralRegistersWindowVisible() const;
|
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
|
|
|
bool isModulesWindowVisible() const;
|
|
|
|
|
|
|
|
|
|
void openMemoryEditor();
|
|
|
|
|
|
|
|
|
|
void handleExecDetach();
|
|
|
|
|
void handleExecContinue();
|
|
|
|
|
void handleExecInterrupt();
|
|
|
|
|
void handleUserStop();
|
|
|
|
|
void handleAbort();
|
|
|
|
|
void handleReset();
|
2018-10-02 12:53:07 +02:00
|
|
|
void handleExecStepIn();
|
|
|
|
|
void handleExecStepOver();
|
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
|
|
|
void handleExecStepOut();
|
|
|
|
|
void handleExecReturn();
|
|
|
|
|
void handleExecJumpToLine();
|
|
|
|
|
void handleExecRunToLine();
|
|
|
|
|
void handleExecRunToSelectedFunction();
|
|
|
|
|
void handleAddToWatchWindow();
|
|
|
|
|
void handleFrameDown();
|
|
|
|
|
void handleFrameUp();
|
|
|
|
|
|
|
|
|
|
// Breakpoint state transitions
|
|
|
|
|
void notifyBreakpointInsertProceeding(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointInsertOk(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointInsertFailed(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointChangeOk(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointChangeProceeding(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointChangeFailed(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointPending(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointRemoveProceeding(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointRemoveOk(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointRemoveFailed(const Breakpoint &bp);
|
|
|
|
|
void notifyBreakpointNeedsReinsertion(const Breakpoint &bp);
|
2017-09-12 10:33:59 +02: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
|
|
|
protected:
|
|
|
|
|
void setDebuggerName(const QString &name);
|
2015-03-05 11:11:32 +01:00
|
|
|
void notifyDebuggerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus,
|
|
|
|
|
const QString &backendName);
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2017-05-19 13:14:44 +02:00
|
|
|
virtual void setState(DebuggerState state, bool forced = false);
|
|
|
|
|
|
2017-12-14 09:36:41 +01:00
|
|
|
void notifyInferiorShutdownFinished();
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2017-09-12 10:33:59 +02:00
|
|
|
void notifyEngineSpontaneousShutdown();
|
2017-12-14 09:11:16 +01:00
|
|
|
void notifyEngineShutdownFinished();
|
2010-07-09 08:48:33 +02:00
|
|
|
|
2017-09-12 10:33:59 +02:00
|
|
|
void notifyEngineIll();
|
2010-07-09 08:48:33 +02:00
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
virtual void setupEngine() = 0;
|
|
|
|
|
virtual void runEngine() = 0;
|
|
|
|
|
virtual void shutdownInferior() = 0;
|
|
|
|
|
virtual void shutdownEngine() = 0;
|
2014-06-05 17:22:51 +02:00
|
|
|
virtual void resetInferior() {}
|
2010-07-08 18:10:50 +02: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
|
|
|
virtual void detachDebugger() {}
|
2018-10-02 12:53:07 +02:00
|
|
|
virtual void executeStepOver(bool /*byInstruction*/ = false) {}
|
|
|
|
|
virtual void executeStepIn(bool /*byInstruction*/ = 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
|
|
|
virtual void executeStepOut() {}
|
|
|
|
|
virtual void executeReturn() {}
|
2011-01-12 13:43:23 +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
|
|
|
virtual void continueInferior() {}
|
|
|
|
|
virtual void interruptInferior() {}
|
2017-10-16 13:30:53 +02:00
|
|
|
void requestInterruptInferior();
|
2011-01-12 13:43:23 +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
|
|
|
virtual void executeRunToLine(const Internal::ContextData &) {}
|
|
|
|
|
virtual void executeRunToFunction(const QString &) {}
|
|
|
|
|
virtual void executeJumpToLine(const Internal::ContextData &) {}
|
2011-01-12 13:43:23 +01:00
|
|
|
|
|
|
|
|
virtual void frameUp();
|
|
|
|
|
virtual void frameDown();
|
|
|
|
|
|
2015-06-08 18:07:11 +02:00
|
|
|
virtual void doUpdateLocals(const UpdateParameters ¶ms);
|
|
|
|
|
|
2017-09-27 08:22:02 +02:00
|
|
|
TerminalRunner *terminal() const;
|
2010-07-08 15:06:09 +02:00
|
|
|
|
2010-11-17 17:16:34 +01:00
|
|
|
static QString msgStopped(const QString &reason = QString());
|
|
|
|
|
static QString msgStoppedBySignal(const QString &meaning, const QString &name);
|
2010-11-26 09:58:34 +01:00
|
|
|
static QString msgStoppedByException(const QString &description,
|
|
|
|
|
const QString &threadId);
|
2010-11-17 17:16:34 +01:00
|
|
|
static QString msgInterrupted();
|
2016-12-14 09:59:49 +01:00
|
|
|
bool showStoppedBySignalMessageBox(const QString meaning, QString name);
|
2010-11-17 17:16:34 +01:00
|
|
|
void showStoppedByExceptionMessageBox(const QString &description);
|
|
|
|
|
|
2015-03-26 13:03:38 +01:00
|
|
|
void updateLocalsView(const GdbMi &all);
|
2015-09-11 16:51:11 +02:00
|
|
|
void checkState(DebuggerState state, const char *file, int line);
|
2015-10-08 16:19:57 +02:00
|
|
|
bool isNativeMixedEnabled() const;
|
|
|
|
|
bool isNativeMixedActive() const;
|
|
|
|
|
bool isNativeMixedActiveFrame() const;
|
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
|
|
|
void startDying() const;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
ProjectExplorer::IDevice::ConstPtr device() const;
|
|
|
|
|
DebuggerEngine *companionEngine() const;
|
2015-03-26 13:03:38 +01:00
|
|
|
|
2010-06-22 17:18:29 +02:00
|
|
|
private:
|
2014-12-12 15:33:16 +01:00
|
|
|
friend class DebuggerPluginPrivate;
|
2010-07-08 18:10:50 +02:00
|
|
|
friend class DebuggerEnginePrivate;
|
2015-07-16 08:14:17 +02:00
|
|
|
friend class LocationMark;
|
2019-07-28 23:32:33 +03:00
|
|
|
friend class PeripheralRegisterHandler;
|
2010-06-16 11:08:54 +02:00
|
|
|
DebuggerEnginePrivate *d;
|
|
|
|
|
};
|
|
|
|
|
|
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
|
|
|
class CppDebuggerEngine : public DebuggerEngine
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CppDebuggerEngine() {}
|
|
|
|
|
~CppDebuggerEngine() override {}
|
|
|
|
|
|
2018-11-13 09:20:24 +01:00
|
|
|
void validateRunParameters(DebuggerRunParameters &rp) override;
|
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
|
|
|
Core::Context languageContext() const override;
|
|
|
|
|
};
|
|
|
|
|
|
2015-07-17 16:33:25 +02:00
|
|
|
class LocationMark : public TextEditor::TextMark
|
|
|
|
|
{
|
|
|
|
|
public:
|
2019-05-28 13:49:26 +02:00
|
|
|
LocationMark(DebuggerEngine *engine, const Utils::FilePath &file, int line);
|
2015-09-01 15:05:08 +02:00
|
|
|
void removedFromEditor() override { updateLineNumber(0); }
|
2015-07-17 16:33:25 +02: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
|
|
|
void updateIcon();
|
|
|
|
|
|
2015-07-17 16:33:25 +02:00
|
|
|
private:
|
2015-09-09 11:55:30 +02:00
|
|
|
bool isDraggable() const override;
|
|
|
|
|
void dragToLine(int line) override;
|
2015-07-17 16:33:25 +02:00
|
|
|
|
|
|
|
|
QPointer<DebuggerEngine> m_engine;
|
|
|
|
|
};
|
|
|
|
|
|
2014-12-12 15:33:16 +01:00
|
|
|
} // namespace Internal
|
2010-06-16 11:08:54 +02:00
|
|
|
} // namespace Debugger
|
|
|
|
|
|
2015-06-08 18:07:11 +02:00
|
|
|
Q_DECLARE_METATYPE(Debugger::Internal::UpdateParameters)
|
2011-02-23 10:16:11 +01:00
|
|
|
Q_DECLARE_METATYPE(Debugger::Internal::ContextData)
|