Debugger: Merge DebuggerStartParameter into *RunParameters

The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.

Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-09-12 10:53:56 +02:00
parent 7f2cb9ead9
commit 7eec0f63ac
20 changed files with 63 additions and 124 deletions

View File

@@ -33,7 +33,6 @@
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerrunconfigurationaspect.h> #include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerruncontrol.h> #include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>

View File

@@ -51,7 +51,6 @@
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerruncontrol.h> #include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -29,7 +29,6 @@ HEADERS += \
debuggerprotocol.h \ debuggerprotocol.h \
debuggerrunconfigurationaspect.h \ debuggerrunconfigurationaspect.h \
debuggerruncontrol.h \ debuggerruncontrol.h \
debuggerstartparameters.h \
debuggerkitconfigwidget.h \ debuggerkitconfigwidget.h \
debuggerkitinformation.h \ debuggerkitinformation.h \
disassembleragent.h \ disassembleragent.h \

View File

@@ -59,7 +59,6 @@ Project {
"debuggerrunconfigurationaspect.cpp", "debuggerrunconfigurationaspect.h", "debuggerrunconfigurationaspect.cpp", "debuggerrunconfigurationaspect.h",
"debuggerruncontrol.cpp", "debuggerruncontrol.h", "debuggerruncontrol.cpp", "debuggerruncontrol.h",
"debuggersourcepathmappingwidget.cpp", "debuggersourcepathmappingwidget.h", "debuggersourcepathmappingwidget.cpp", "debuggersourcepathmappingwidget.h",
"debuggerstartparameters.h",
"debuggertooltipmanager.cpp", "debuggertooltipmanager.h", "debuggertooltipmanager.cpp", "debuggertooltipmanager.h",
"disassembleragent.cpp", "disassembleragent.h", "disassembleragent.cpp", "disassembleragent.h",
"disassemblerlines.cpp", "disassemblerlines.h", "disassemblerlines.cpp", "disassemblerlines.h",

View File

@@ -26,7 +26,6 @@
#include "debuggerdialogs.h" #include "debuggerdialogs.h"
#include "debuggerkitinformation.h" #include "debuggerkitinformation.h"
#include "debuggerstartparameters.h"
#include "debuggerruncontrol.h" #include "debuggerruncontrol.h"
#include "cdb/cdbengine.h" #include "cdb/cdbengine.h"
@@ -40,6 +39,8 @@
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
#include <QButtonGroup> #include <QButtonGroup>
#include <QCheckBox> #include <QCheckBox>
#include <QComboBox> #include <QComboBox>

View File

@@ -30,7 +30,6 @@
#include "debuggercore.h" #include "debuggercore.h"
#include "debuggericons.h" #include "debuggericons.h"
#include "debuggerruncontrol.h" #include "debuggerruncontrol.h"
#include "debuggerstartparameters.h"
#include "debuggertooltipmanager.h" #include "debuggertooltipmanager.h"
#include "breakhandler.h" #include "breakhandler.h"

View File

@@ -29,7 +29,6 @@
#include "debuggerconstants.h" #include "debuggerconstants.h"
#include "debuggeritem.h" #include "debuggeritem.h"
#include "debuggerprotocol.h" #include "debuggerprotocol.h"
#include "debuggerstartparameters.h"
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/runnables.h> #include <projectexplorer/runnables.h>
@@ -77,11 +76,58 @@ class MemoryViewSetupData;
class Terminal; class Terminal;
class ThreadId; class ThreadId;
class DebuggerRunParameters : public DebuggerStartParameters class DebuggerRunParameters
{ {
public: public:
DebuggerRunParameters() {} DebuggerStartMode startMode = NoStartMode;
DebuggerRunParameters(const DebuggerStartParameters &sp) : DebuggerStartParameters(sp) {} DebuggerCloseMode closeMode = KillAtClose;
ProjectExplorer::StandardRunnable inferior;
QString displayName; // Used in the Snapshots view.
Utils::Environment stubEnvironment;
Utils::ProcessHandle attachPID;
QStringList solibSearchPath;
bool useTerminal = false;
bool needFixup = true; // FIXME: Make false the default...
// 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.
QString symbolFile;
// 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;
QStringList additionalSearchDirectories;
// Used by iOS.
QString platform;
QString deviceSymbolsRoot;
bool continueAfterAttach = false;
QString sysRoot;
// Used by general core file debugging. Public access requested in QTCREATORBUG-17158.
QString coreFile;
// Macro-expanded and passed to debugger startup.
QString additionalStartupCommands;
DebuggerEngineType masterEngineType = NoEngineType; DebuggerEngineType masterEngineType = NoEngineType;
DebuggerEngineType cppEngineType = NoEngineType; DebuggerEngineType cppEngineType = NoEngineType;

View File

@@ -26,7 +26,6 @@
#include "debuggerplugin.h" #include "debuggerplugin.h"
#include "debuggermainwindow.h" #include "debuggermainwindow.h"
#include "debuggerstartparameters.h"
#include "debuggeractions.h" #include "debuggeractions.h"
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "debuggercore.h" #include "debuggercore.h"
@@ -105,6 +104,7 @@
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <ssh/sshconnection.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>

View File

@@ -33,7 +33,6 @@
#include "debuggerkitinformation.h" #include "debuggerkitinformation.h"
#include "debuggerplugin.h" #include "debuggerplugin.h"
#include "debuggerrunconfigurationaspect.h" #include "debuggerrunconfigurationaspect.h"
#include "debuggerstartparameters.h"
#include "breakhandler.h" #include "breakhandler.h"
#include "shared/peutils.h" #include "shared/peutils.h"
@@ -63,6 +62,8 @@
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <ssh/sshconnection.h>
#include <QTcpServer> #include <QTcpServer>
using namespace Debugger::Internal; using namespace Debugger::Internal;

View File

@@ -32,6 +32,9 @@
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h> #include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <ssh/sshconnection.h> // FIXME: Remove after downstream was adapted
#include <QHostAddress> // FIXME: Remove after downstream was adapted
namespace Debugger { namespace Debugger {
class DEBUGGER_EXPORT DebuggerRunTool : public ProjectExplorer::RunWorker class DEBUGGER_EXPORT DebuggerRunTool : public ProjectExplorer::RunWorker

View File

@@ -1,105 +1,2 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** 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
** 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.
**
** 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.
**
****************************************************************************/
#pragma once // Remove after downstream was adapted
#include "debugger_global.h"
#include "debuggerconstants.h"
#include <ssh/sshconnection.h>
#include <utils/environment.h>
#include <utils/port.h>
#include <utils/processhandle.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/runnables.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <QMetaType>
#include <QVector>
#include <QPointer>
namespace Debugger {
// Note: This is part of the "soft interface" of the debugger plugin.
// Do not add anything that needs implementation in a .cpp file.
class DEBUGGER_EXPORT DebuggerStartParameters
{
public:
DebuggerStartMode startMode = NoStartMode;
DebuggerCloseMode closeMode = KillAtClose;
ProjectExplorer::StandardRunnable inferior;
QString displayName; // Used in the Snapshots view.
Utils::Environment stubEnvironment;
Utils::ProcessHandle attachPID;
QStringList solibSearchPath;
bool useTerminal = false;
bool needFixup = true; // FIXME: Make false the default...
// 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.
QString symbolFile;
// 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;
QStringList additionalSearchDirectories;
// Used by iOS.
QString platform;
QString deviceSymbolsRoot;
bool continueAfterAttach = false;
QString sysRoot;
// Used by general core file debugging. Public access requested in QTCREATORBUG-17158.
QString coreFile;
// Macro-expanded and passed to debugger startup.
QString additionalStartupCommands;
};
} // namespace Debugger
Q_DECLARE_METATYPE(Debugger::DebuggerStartParameters)

View File

@@ -30,7 +30,6 @@
#include "debuggercore.h" #include "debuggercore.h"
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "debuggerstartparameters.h"
#include "disassemblerlines.h" #include "disassemblerlines.h"
#include "sourceutils.h" #include "sourceutils.h"

View File

@@ -25,7 +25,6 @@
#include "gdbengine.h" #include "gdbengine.h"
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerinternalconstants.h> #include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggerruncontrol.h> #include <debugger/debuggerruncontrol.h>
#include <debugger/disassemblerlines.h> #include <debugger/disassemblerlines.h>

View File

@@ -31,7 +31,6 @@
#include <debugger/debuggerinternalconstants.h> #include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggermainwindow.h> #include <debugger/debuggermainwindow.h>
#include <debugger/debuggerprotocol.h> #include <debugger/debuggerprotocol.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggertooltipmanager.h> #include <debugger/debuggertooltipmanager.h>
#include <debugger/breakhandler.h> #include <debugger/breakhandler.h>

View File

@@ -25,7 +25,6 @@
#include "loadcoredialog.h" #include "loadcoredialog.h"
#include "debuggerstartparameters.h"
#include "debuggerdialogs.h" #include "debuggerdialogs.h"
#include "debuggerkitinformation.h" #include "debuggerkitinformation.h"
#include "gdb/gdbengine.h" #include "gdb/gdbengine.h"
@@ -33,6 +32,7 @@
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <ssh/sftpfilesystemmodel.h> #include <ssh/sftpfilesystemmodel.h>
#include <ssh/sshconnection.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/temporaryfile.h> #include <utils/temporaryfile.h>

View File

@@ -27,7 +27,6 @@
#include "breakhandler.h" #include "breakhandler.h"
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggerstartparameters.h"
#include "debuggercore.h" #include "debuggercore.h"
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "registerhandler.h" #include "registerhandler.h"

View File

@@ -30,7 +30,6 @@
#include <debugger/debuggerdialogs.h> #include <debugger/debuggerdialogs.h>
#include <debugger/debuggerplugin.h> #include <debugger/debuggerplugin.h>
#include <debugger/debuggerprotocol.h> #include <debugger/debuggerprotocol.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggertooltipmanager.h> #include <debugger/debuggertooltipmanager.h>
#include <debugger/threaddata.h> #include <debugger/threaddata.h>

View File

@@ -29,7 +29,6 @@
#include <debugger/debuggercore.h> #include <debugger/debuggercore.h>
#include <debugger/debuggerruncontrol.h> #include <debugger/debuggerruncontrol.h>
#include <debugger/debuggertooltipmanager.h> #include <debugger/debuggertooltipmanager.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/breakhandler.h> #include <debugger/breakhandler.h>
#include <debugger/stackhandler.h> #include <debugger/stackhandler.h>
#include <debugger/threaddata.h> #include <debugger/threaddata.h>

View File

@@ -67,6 +67,7 @@
#include <QDir> #include <QDir>
#include <QDockWidget> #include <QDockWidget>
#include <QFileInfo> #include <QFileInfo>
#include <QHostAddress>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>

View File

@@ -31,7 +31,6 @@
#include "xmlprotocol/status.h" #include "xmlprotocol/status.h"
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerruncontrol.h> #include <debugger/debuggerruncontrol.h>
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
@@ -43,6 +42,8 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
using namespace Debugger; using namespace Debugger;
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Valgrind::XmlProtocol; using namespace Valgrind::XmlProtocol;