2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-01-07 09:44:23 +01:00
|
|
|
**
|
2015-01-14 18:07:15 +01:00
|
|
|
** Copyright (C) 2015 The Qt Company Ltd.
|
|
|
|
|
** Contact: http://www.qt.io/licensing
|
2011-01-07 09:44:23 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-01-07 09:44:23 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2015-01-14 18:07:15 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms and
|
|
|
|
|
** conditions see http://www.qt.io/terms-conditions. For further information
|
2014-10-01 13:21:18 +02:00
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2011-01-07 09:44:23 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2012-10-02 09:12:39 +02:00
|
|
|
**
|
2015-01-14 18:07:15 +01:00
|
|
|
** In addition, as a special exception, The Qt Company gives you certain additional
|
|
|
|
|
** rights. These rights are described in The Qt Company LGPL Exception
|
2011-01-07 09:44:23 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-01-07 09:44:23 +01:00
|
|
|
|
|
|
|
|
#ifndef DEBUGGER_DEBUGGERSTARTPARAMETERS_H
|
|
|
|
|
#define DEBUGGER_DEBUGGERSTARTPARAMETERS_H
|
|
|
|
|
|
|
|
|
|
#include "debugger_global.h"
|
2011-01-10 10:14:23 +01:00
|
|
|
#include "debuggerconstants.h"
|
2011-01-07 09:44:23 +01:00
|
|
|
|
2012-05-18 10:49:35 +02:00
|
|
|
#include <ssh/sshconnection.h>
|
2011-01-07 09:44:23 +01:00
|
|
|
#include <utils/environment.h>
|
2011-02-01 18:36:00 +01:00
|
|
|
#include <projectexplorer/abi.h>
|
2015-02-10 13:21:22 +01:00
|
|
|
#include <projectexplorer/runconfiguration.h>
|
2011-01-07 09:44:23 +01:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QMetaType>
|
2015-02-10 10:17:46 +02:00
|
|
|
#include <QVector>
|
2015-02-26 15:29:28 +01:00
|
|
|
#include <QPointer>
|
2011-01-07 09:44:23 +01:00
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
2014-09-18 19:21:27 +02:00
|
|
|
const int InvalidPort = -1;
|
|
|
|
|
const int InvalidPid = -1;
|
|
|
|
|
|
|
|
|
|
class DEBUGGER_EXPORT RemoteSetupResult
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RemoteSetupResult()
|
|
|
|
|
: gdbServerPort(InvalidPort),
|
|
|
|
|
qmlServerPort(InvalidPort),
|
|
|
|
|
inferiorPid(InvalidPid),
|
|
|
|
|
success(false)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
int gdbServerPort;
|
|
|
|
|
int qmlServerPort;
|
|
|
|
|
int inferiorPid;
|
|
|
|
|
bool success;
|
|
|
|
|
QString reason;
|
|
|
|
|
};
|
|
|
|
|
|
2011-01-07 09:44:23 +01:00
|
|
|
class DEBUGGER_EXPORT DebuggerStartParameters
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
DebuggerStartParameters()
|
2012-08-15 13:21:37 +02:00
|
|
|
: masterEngineType(NoEngineType),
|
2015-02-10 13:21:22 +01:00
|
|
|
runConfiguration(0),
|
2011-01-07 09:44:23 +01:00
|
|
|
attachPID(-1),
|
|
|
|
|
useTerminal(false),
|
2011-05-02 18:22:32 +02:00
|
|
|
breakOnMain(false),
|
2013-11-19 10:42:57 +01:00
|
|
|
continueAfterAttach(false),
|
2012-03-28 09:37:02 +02:00
|
|
|
multiProcess(false),
|
2012-02-01 09:03:05 +01:00
|
|
|
languages(AnyLanguage),
|
2011-01-07 09:44:23 +01:00
|
|
|
qmlServerAddress(QLatin1String("127.0.0.1")),
|
2013-03-27 13:03:15 +01:00
|
|
|
qmlServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
|
2012-06-13 11:29:26 +02:00
|
|
|
remoteSetupNeeded(false),
|
2013-09-12 18:46:35 +02:00
|
|
|
useContinueInsteadOfRun(false),
|
2011-01-07 09:44:23 +01:00
|
|
|
startMode(NoStartMode),
|
2012-03-26 16:03:25 +02:00
|
|
|
closeMode(KillAtClose),
|
2013-11-04 11:44:12 +02:00
|
|
|
useCtrlCStub(false),
|
2015-05-27 13:59:56 +02:00
|
|
|
skipExecutableValidation(false)
|
2011-01-07 09:44:23 +01:00
|
|
|
{}
|
|
|
|
|
|
2012-08-15 13:21:37 +02:00
|
|
|
DebuggerEngineType masterEngineType;
|
2012-06-28 10:00:04 +02:00
|
|
|
QString sysRoot;
|
2013-12-10 12:53:20 +01:00
|
|
|
QString deviceSymbolsRoot;
|
2012-06-28 10:00:04 +02:00
|
|
|
QString debuggerCommand;
|
|
|
|
|
ProjectExplorer::Abi toolChainAbi;
|
2015-02-10 13:21:22 +01:00
|
|
|
QPointer<ProjectExplorer::RunConfiguration> runConfiguration;
|
2012-06-28 10:00:04 +02:00
|
|
|
|
2013-10-31 10:07:28 +01:00
|
|
|
QString platform;
|
2011-01-07 09:44:23 +01:00
|
|
|
QString executable;
|
2011-02-08 13:48:04 +01:00
|
|
|
QString displayName; // Used in the Snapshots view.
|
2011-01-07 09:44:23 +01:00
|
|
|
QString processArgs;
|
|
|
|
|
Utils::Environment environment;
|
|
|
|
|
QString workingDirectory;
|
|
|
|
|
qint64 attachPID;
|
|
|
|
|
bool useTerminal;
|
2011-05-02 18:22:32 +02:00
|
|
|
bool breakOnMain;
|
2013-11-19 10:42:57 +01:00
|
|
|
bool continueAfterAttach;
|
2012-03-28 09:37:02 +02:00
|
|
|
bool multiProcess;
|
2012-02-01 09:03:05 +01:00
|
|
|
DebuggerLanguages languages;
|
2011-01-07 09:44:23 +01:00
|
|
|
|
|
|
|
|
// Used by Qml debugging.
|
|
|
|
|
QString qmlServerAddress;
|
|
|
|
|
quint16 qmlServerPort;
|
2011-04-26 09:46:05 +02:00
|
|
|
QString projectSourceDirectory;
|
2015-04-23 19:05:56 +02:00
|
|
|
QStringList additionalSearchDirectories;
|
2011-04-26 09:46:05 +02:00
|
|
|
QString projectBuildDirectory;
|
|
|
|
|
QStringList projectSourceFiles;
|
2011-01-07 09:44:23 +01:00
|
|
|
|
|
|
|
|
// Used by remote debugging.
|
|
|
|
|
QString remoteChannel;
|
2012-05-18 10:49:35 +02:00
|
|
|
QSsh::SshConnectionParameters connParams;
|
2012-06-13 11:29:26 +02:00
|
|
|
bool remoteSetupNeeded;
|
2011-01-07 09:44:23 +01:00
|
|
|
|
2013-09-12 18:46:35 +02:00
|
|
|
// Used by baremetal plugin
|
2014-06-05 17:22:51 +02:00
|
|
|
QByteArray commandsForReset; // commands used for resetting the inferior
|
2013-09-12 18:46:35 +02:00
|
|
|
bool useContinueInsteadOfRun; // if connected to a hw debugger run is not possible but continue is used
|
|
|
|
|
QByteArray commandsAfterConnect; // additional commands to post after connection to debug target
|
|
|
|
|
|
2015-02-10 10:17:46 +02:00
|
|
|
// Used by Valgrind
|
|
|
|
|
QVector<QByteArray> expectedSignals;
|
|
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
QStringList solibSearchPath;
|
2011-01-07 09:44:23 +01:00
|
|
|
DebuggerStartMode startMode;
|
2012-03-26 16:03:25 +02:00
|
|
|
DebuggerCloseMode closeMode;
|
2011-01-07 09:44:23 +01:00
|
|
|
|
2012-06-29 07:23:13 +02:00
|
|
|
// For QNX debugging
|
|
|
|
|
QString remoteExecutable;
|
2013-10-31 14:25:38 +01:00
|
|
|
bool useCtrlCStub;
|
2012-06-29 07:23:13 +02:00
|
|
|
|
2015-03-31 07:55:00 +02:00
|
|
|
// Used by Android to avoid false positives on warnOnRelease
|
|
|
|
|
bool skipExecutableValidation;
|
2011-01-07 09:44:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Debugger
|
|
|
|
|
|
2014-09-18 19:21:27 +02:00
|
|
|
Q_DECLARE_METATYPE(Debugger::RemoteSetupResult)
|
2011-01-07 09:44:23 +01:00
|
|
|
Q_DECLARE_METATYPE(Debugger::DebuggerStartParameters)
|
|
|
|
|
|
|
|
|
|
#endif // DEBUGGER_DEBUGGERSTARTPARAMETERS_H
|
|
|
|
|
|