2017-10-03 10:43:44 -06:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-04 19:22:19 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-10-03 10:43:44 -06:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2022-11-20 21:11:15 -07:00
|
|
|
#include "Core/PowerPC/BreakPoints.h"
|
|
|
|
#include "Core/PowerPC/PowerPC.h"
|
2017-10-03 10:43:44 -06:00
|
|
|
|
|
|
|
class BreakpointWidget;
|
|
|
|
class QCheckBox;
|
|
|
|
class QDialogButtonBox;
|
|
|
|
class QGroupBox;
|
|
|
|
class QLabel;
|
|
|
|
class QLineEdit;
|
|
|
|
class QRadioButton;
|
2022-09-02 03:57:30 -06:00
|
|
|
class QPushButton;
|
2017-10-03 10:43:44 -06:00
|
|
|
|
2022-11-20 21:11:15 -07:00
|
|
|
class BreakpointDialog : public QDialog
|
2017-10-03 10:43:44 -06:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-11-20 21:11:15 -07:00
|
|
|
enum class OpenMode
|
|
|
|
{
|
|
|
|
New,
|
|
|
|
EditBreakPoint,
|
|
|
|
EditMemCheck
|
|
|
|
};
|
|
|
|
|
|
|
|
explicit BreakpointDialog(BreakpointWidget* parent);
|
|
|
|
BreakpointDialog(BreakpointWidget* parent, const TBreakPoint* breakpoint);
|
|
|
|
BreakpointDialog(BreakpointWidget* parent, const TMemCheck* memcheck);
|
2017-10-03 10:43:44 -06:00
|
|
|
|
2018-05-17 14:15:59 -06:00
|
|
|
void accept() override;
|
2017-10-03 10:43:44 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
|
|
|
|
void OnBPTypeChanged();
|
|
|
|
void OnAddressTypeChanged();
|
2022-10-08 14:23:24 -06:00
|
|
|
void ShowConditionHelp();
|
2017-10-03 10:43:44 -06:00
|
|
|
|
|
|
|
// Instruction BPs
|
|
|
|
QRadioButton* m_instruction_bp;
|
|
|
|
QGroupBox* m_instruction_box;
|
|
|
|
QLineEdit* m_instruction_address;
|
|
|
|
|
|
|
|
// Memory BPs
|
|
|
|
QRadioButton* m_memory_bp;
|
|
|
|
QRadioButton* m_memory_use_address;
|
|
|
|
QRadioButton* m_memory_use_range;
|
|
|
|
QGroupBox* m_memory_box;
|
|
|
|
QLabel* m_memory_address_from_label;
|
|
|
|
QLineEdit* m_memory_address_from;
|
|
|
|
QLabel* m_memory_address_to_label;
|
|
|
|
QLineEdit* m_memory_address_to;
|
|
|
|
QRadioButton* m_memory_on_read;
|
|
|
|
QRadioButton* m_memory_on_read_and_write;
|
|
|
|
QRadioButton* m_memory_on_write;
|
2020-07-06 16:16:32 -06:00
|
|
|
|
|
|
|
// Action
|
|
|
|
QRadioButton* m_do_log;
|
|
|
|
QRadioButton* m_do_break;
|
|
|
|
QRadioButton* m_do_log_and_break;
|
2017-10-03 10:43:44 -06:00
|
|
|
|
2022-09-02 03:57:30 -06:00
|
|
|
QLineEdit* m_conditional;
|
|
|
|
QPushButton* m_cond_help_btn;
|
|
|
|
|
2017-10-03 10:43:44 -06:00
|
|
|
QDialogButtonBox* m_buttons;
|
|
|
|
BreakpointWidget* m_parent;
|
2022-11-20 21:11:15 -07:00
|
|
|
|
|
|
|
OpenMode m_open_mode;
|
2017-10-03 10:43:44 -06:00
|
|
|
};
|