Commit 7eec0f63 authored by hjk's avatar hjk

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's avatarChristian Stenger <christian.stenger@qt.io>
parent 7f2cb9ea
......@@ -33,7 +33,6 @@
#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
......
......@@ -51,7 +51,6 @@
#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
namespace Autotest {
namespace Internal {
......
......@@ -29,7 +29,6 @@ HEADERS += \
debuggerprotocol.h \
debuggerrunconfigurationaspect.h \
debuggerruncontrol.h \
debuggerstartparameters.h \
debuggerkitconfigwidget.h \
debuggerkitinformation.h \
disassembleragent.h \
......
......@@ -59,7 +59,6 @@ Project {
"debuggerrunconfigurationaspect.cpp", "debuggerrunconfigurationaspect.h",
"debuggerruncontrol.cpp", "debuggerruncontrol.h",
"debuggersourcepathmappingwidget.cpp", "debuggersourcepathmappingwidget.h",
"debuggerstartparameters.h",
"debuggertooltipmanager.cpp", "debuggertooltipmanager.h",
"disassembleragent.cpp", "disassembleragent.h",
"disassemblerlines.cpp", "disassemblerlines.h",
......
......@@ -26,7 +26,6 @@
#include "debuggerdialogs.h"
#include "debuggerkitinformation.h"
#include "debuggerstartparameters.h"
#include "debuggerruncontrol.h"
#include "cdb/cdbengine.h"
......@@ -40,6 +39,8 @@
#include <utils/fancylineedit.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
#include <QButtonGroup>
#include <QCheckBox>
#include <QComboBox>
......
......@@ -30,7 +30,6 @@
#include "debuggercore.h"
#include "debuggericons.h"
#include "debuggerruncontrol.h"
#include "debuggerstartparameters.h"
#include "debuggertooltipmanager.h"
#include "breakhandler.h"
......
......@@ -29,7 +29,6 @@
#include "debuggerconstants.h"
#include "debuggeritem.h"
#include "debuggerprotocol.h"
#include "debuggerstartparameters.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/runnables.h>
......@@ -77,11 +76,58 @@ class MemoryViewSetupData;
class Terminal;
class ThreadId;
class DebuggerRunParameters : public DebuggerStartParameters
class DebuggerRunParameters
{
public:
DebuggerRunParameters() {}
DebuggerRunParameters(const DebuggerStartParameters &sp) : DebuggerStartParameters(sp) {}
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;
DebuggerEngineType masterEngineType = NoEngineType;
DebuggerEngineType cppEngineType = NoEngineType;
......
......@@ -26,7 +26,6 @@
#include "debuggerplugin.h"
#include "debuggermainwindow.h"
#include "debuggerstartparameters.h"
#include "debuggeractions.h"
#include "debuggerinternalconstants.h"
#include "debuggercore.h"
......@@ -105,6 +104,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
#include <projectexplorer/toolchain.h>
#include <ssh/sshconnection.h>
#include <texteditor/texteditor.h>
#include <texteditor/textdocument.h>
......
......@@ -33,7 +33,6 @@
#include "debuggerkitinformation.h"
#include "debuggerplugin.h"
#include "debuggerrunconfigurationaspect.h"
#include "debuggerstartparameters.h"
#include "breakhandler.h"
#include "shared/peutils.h"
......@@ -63,6 +62,8 @@
#include <qtsupport/qtkitinformation.h>
#include <ssh/sshconnection.h>
#include <QTcpServer>
using namespace Debugger::Internal;
......
......@@ -32,6 +32,9 @@
#include <projectexplorer/runconfiguration.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 {
class DEBUGGER_EXPORT DebuggerRunTool : public ProjectExplorer::RunWorker
......
/****************************************************************************
**
** 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
#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)
// Remove after downstream was adapted
......@@ -30,7 +30,6 @@
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerinternalconstants.h"
#include "debuggerstartparameters.h"
#include "disassemblerlines.h"
#include "sourceutils.h"
......
......@@ -25,7 +25,6 @@
#include "gdbengine.h"
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/disassemblerlines.h>
......
......@@ -31,7 +31,6 @@
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggermainwindow.h>
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/breakhandler.h>
......
......@@ -25,7 +25,6 @@
#include "loadcoredialog.h"
#include "debuggerstartparameters.h"
#include "debuggerdialogs.h"
#include "debuggerkitinformation.h"
#include "gdb/gdbengine.h"
......@@ -33,6 +32,7 @@
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <ssh/sftpfilesystemmodel.h>
#include <ssh/sshconnection.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/temporaryfile.h>
......
......@@ -27,7 +27,6 @@
#include "breakhandler.h"
#include "debuggerengine.h"
#include "debuggerstartparameters.h"
#include "debuggercore.h"
#include "debuggerinternalconstants.h"
#include "registerhandler.h"
......
......@@ -30,7 +30,6 @@
#include <debugger/debuggerdialogs.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/threaddata.h>
......
......@@ -29,7 +29,6 @@
#include <debugger/debuggercore.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/breakhandler.h>
#include <debugger/stackhandler.h>
#include <debugger/threaddata.h>
......
......@@ -67,6 +67,7 @@
#include <QDir>
#include <QDockWidget>
#include <QFileInfo>
#include <QHostAddress>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
......
......@@ -31,7 +31,6 @@
#include "xmlprotocol/status.h"
#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerruncontrol.h>
#include <projectexplorer/buildconfiguration.h>
......@@ -43,6 +42,8 @@
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
using namespace Debugger;
using namespace ProjectExplorer;
using namespace Valgrind::XmlProtocol;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment