2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-01-10 10:35:41 +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-10 10:35:41 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-01-10 10:35:41 +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-10 10:35:41 +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-10 10:35:41 +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-10 10:35:41 +01:00
|
|
|
|
2014-10-17 13:40:04 +02:00
|
|
|
#ifndef DEBUGGERRUNCONTROL_H
|
|
|
|
|
#define DEBUGGERRUNCONTROL_H
|
2011-01-10 10:35:41 +01:00
|
|
|
|
2014-10-17 13:40:04 +02:00
|
|
|
#include "debugger_global.h"
|
2014-10-17 13:06:37 +02:00
|
|
|
#include "debuggerconstants.h"
|
|
|
|
|
|
2011-01-10 10:35:41 +01:00
|
|
|
#include <projectexplorer/runconfiguration.h>
|
|
|
|
|
|
|
|
|
|
namespace Debugger {
|
2012-08-15 13:21:37 +02:00
|
|
|
|
2014-12-12 15:33:16 +01:00
|
|
|
class RemoteSetupResult;
|
2012-08-15 13:21:37 +02:00
|
|
|
class DebuggerStartParameters;
|
2015-05-27 16:09:43 +02:00
|
|
|
class DebuggerRunControl;
|
2012-08-15 13:21:37 +02:00
|
|
|
|
2015-06-04 10:31:27 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
class DebuggerRunParameters;
|
|
|
|
|
DebuggerRunControl *createDebuggerRunControlInternal(const DebuggerRunParameters &, QString *);
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-27 16:09:43 +02:00
|
|
|
DEBUGGER_EXPORT DebuggerRunControl *createDebuggerRunControl(const DebuggerStartParameters &sp,
|
|
|
|
|
QString *errorMessage);
|
|
|
|
|
|
|
|
|
|
namespace Internal { class DebuggerEngine; }
|
2015-05-27 13:59:56 +02:00
|
|
|
|
2014-10-17 13:40:04 +02:00
|
|
|
class DEBUGGER_EXPORT DebuggerRunControl
|
|
|
|
|
: public ProjectExplorer::RunControl
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
~DebuggerRunControl();
|
|
|
|
|
|
|
|
|
|
// ProjectExplorer::RunControl
|
|
|
|
|
void start();
|
|
|
|
|
bool promptToStop(bool *prompt = 0) const;
|
|
|
|
|
StopResult stop(); // Called from SnapshotWindow.
|
|
|
|
|
bool isRunning() const;
|
|
|
|
|
QString displayName() const;
|
|
|
|
|
|
|
|
|
|
void startFailed();
|
2014-12-12 15:33:16 +01:00
|
|
|
void notifyEngineRemoteServerRunning(const QByteArray &msg, int pid);
|
|
|
|
|
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result);
|
|
|
|
|
void notifyInferiorIll();
|
|
|
|
|
Q_SLOT void notifyInferiorExited();
|
|
|
|
|
void quitDebugger();
|
|
|
|
|
void abortDebugger();
|
2014-10-17 13:40:04 +02:00
|
|
|
void debuggingFinished();
|
2014-12-12 15:33:16 +01:00
|
|
|
|
|
|
|
|
void showMessage(const QString &msg, int channel = LogDebug);
|
|
|
|
|
|
|
|
|
|
DebuggerStartParameters &startParameters();
|
2014-10-17 13:40:04 +02:00
|
|
|
|
|
|
|
|
signals:
|
2014-12-12 15:33:16 +01:00
|
|
|
void requestRemoteSetup();
|
|
|
|
|
void aboutToNotifyInferiorSetupOk();
|
|
|
|
|
void stateChanged(Debugger::DebuggerState state);
|
2014-10-17 13:40:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2015-02-26 17:43:41 +01:00
|
|
|
void handleFinished();
|
2015-05-27 16:09:43 +02:00
|
|
|
|
2015-06-04 10:31:27 +02:00
|
|
|
friend DebuggerRunControl *Debugger::Internal::createDebuggerRunControlInternal(
|
|
|
|
|
const Internal::DebuggerRunParameters &rp, QString *errorMessage);
|
2015-05-27 16:09:43 +02:00
|
|
|
|
2015-04-22 16:11:00 +02:00
|
|
|
DebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
2014-12-12 15:33:16 +01:00
|
|
|
Internal::DebuggerEngine *engine);
|
2014-10-17 13:40:04 +02:00
|
|
|
|
2014-12-12 15:33:16 +01:00
|
|
|
Internal::DebuggerEngine *m_engine;
|
2014-10-17 13:40:04 +02:00
|
|
|
bool m_running;
|
|
|
|
|
};
|
2011-01-10 10:35:41 +01:00
|
|
|
|
|
|
|
|
} // namespace Debugger
|
|
|
|
|
|
2014-10-17 13:40:04 +02:00
|
|
|
#endif // DEBUGGERRUNCONTROL_H
|