2018-06-12 08:43:14 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-02-22 16:50:45 +00:00
|
|
|
#include "core/Cutter.h"
|
2019-11-20 08:50:07 +00:00
|
|
|
#include "dialogs/RemoteDebugDialog.h"
|
2018-06-12 08:43:14 +00:00
|
|
|
|
2019-10-31 09:50:08 +00:00
|
|
|
#include <QAction>
|
|
|
|
|
2018-06-12 08:43:14 +00:00
|
|
|
class MainWindow;
|
2018-12-21 20:36:40 +00:00
|
|
|
class QToolBar;
|
2019-01-12 23:36:23 +00:00
|
|
|
class QToolButton;
|
2018-06-12 08:43:14 +00:00
|
|
|
|
2018-12-21 20:36:40 +00:00
|
|
|
class DebugActions : public QObject
|
2018-06-12 08:43:14 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-12-21 20:36:40 +00:00
|
|
|
explicit DebugActions(QToolBar *toolBar, MainWindow *main);
|
|
|
|
|
|
|
|
void addToToolBar(QToolBar *toolBar);
|
|
|
|
|
2018-07-17 07:26:20 +00:00
|
|
|
QAction *actionStart;
|
2019-11-20 08:50:07 +00:00
|
|
|
QAction *actionStartRemote;
|
2018-07-17 07:26:20 +00:00
|
|
|
QAction *actionStartEmul;
|
|
|
|
QAction *actionAttach;
|
|
|
|
QAction *actionContinue;
|
|
|
|
QAction *actionContinueUntilMain;
|
|
|
|
QAction *actionContinueUntilCall;
|
|
|
|
QAction *actionContinueUntilSyscall;
|
|
|
|
QAction *actionStep;
|
|
|
|
QAction *actionStepOver;
|
2018-07-30 06:55:39 +00:00
|
|
|
QAction *actionStepOut;
|
2018-07-31 17:16:05 +00:00
|
|
|
QAction *actionStop;
|
2018-10-03 11:30:12 +00:00
|
|
|
QAction *actionAllContinues;
|
2019-11-20 08:50:07 +00:00
|
|
|
|
2019-10-31 09:50:08 +00:00
|
|
|
// Continue and suspend interchange during runtime
|
|
|
|
QIcon continueIcon;
|
|
|
|
QIcon suspendIcon;
|
|
|
|
QString suspendLabel;
|
|
|
|
QString continueLabel;
|
2018-06-12 08:43:14 +00:00
|
|
|
|
2019-12-07 13:28:05 +00:00
|
|
|
// Stop and Detach interchange during runtime
|
|
|
|
QIcon detachIcon;
|
|
|
|
QIcon stopIcon;
|
|
|
|
|
2018-06-12 08:43:14 +00:00
|
|
|
private:
|
2019-10-31 09:50:08 +00:00
|
|
|
/**
|
|
|
|
* @brief buttons that will be disabled/enabled on (disable/enable)DebugToolbar
|
|
|
|
*/
|
|
|
|
QList<QAction *> toggleActions;
|
2019-11-20 08:50:07 +00:00
|
|
|
QList<QAction *> toggleConnectionActions;
|
2018-10-03 11:30:12 +00:00
|
|
|
QList<QAction *> allActions;
|
2019-01-12 23:36:23 +00:00
|
|
|
QToolButton *continueUntilButton;
|
2019-11-20 08:50:07 +00:00
|
|
|
RemoteDebugDialog *remoteDialog = nullptr;
|
|
|
|
MainWindow *main;
|
2018-06-12 08:43:14 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void continueUntilMain();
|
2018-07-01 21:29:38 +00:00
|
|
|
void attachProcessDialog();
|
|
|
|
void attachProcess(int pid);
|
2019-11-20 08:50:07 +00:00
|
|
|
void attachRemoteDialog();
|
|
|
|
void attachRemoteDebugger();
|
|
|
|
void onAttachedRemoteDebugger(bool successfully);
|
2018-10-03 11:30:12 +00:00
|
|
|
void setAllActionsVisible(bool visible);
|
2019-01-12 23:36:23 +00:00
|
|
|
void setButtonVisibleIfMainExists();
|
2019-10-31 09:50:08 +00:00
|
|
|
};
|