2020-12-05 13:08:24 +01:00
|
|
|
#pragma once
|
2018-03-02 15:40:29 -06:00
|
|
|
|
2020-12-22 11:42:57 +03:00
|
|
|
#include "util/types.hpp"
|
2018-03-02 15:40:29 -06:00
|
|
|
|
|
|
|
|
#include <QListWidget>
|
|
|
|
|
|
2020-02-22 20:42:49 +01:00
|
|
|
class CPUDisAsm;
|
|
|
|
|
class cpu_thread;
|
|
|
|
|
class breakpoint_handler;
|
|
|
|
|
|
2018-03-02 15:40:29 -06:00
|
|
|
class breakpoint_list : public QListWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
breakpoint_list(QWidget* parent, breakpoint_handler* handler);
|
2021-01-22 10:11:54 +02:00
|
|
|
void UpdateCPUData(cpu_thread* cpu, CPUDisAsm* disasm);
|
2018-03-02 15:40:29 -06:00
|
|
|
void ClearBreakpoints();
|
2021-07-30 21:30:29 +03:00
|
|
|
bool AddBreakpoint(u32 pc);
|
2018-03-02 15:40:29 -06:00
|
|
|
void RemoveBreakpoint(u32 addr);
|
|
|
|
|
|
|
|
|
|
QColor m_text_color_bp;
|
|
|
|
|
QColor m_color_bp;
|
|
|
|
|
Q_SIGNALS:
|
2021-03-23 20:51:39 +01:00
|
|
|
void RequestShowAddress(u32 addr, bool select_addr = true, bool force = false);
|
2018-03-02 15:40:29 -06:00
|
|
|
public Q_SLOTS:
|
2021-04-07 23:05:18 +02:00
|
|
|
void HandleBreakpointRequest(u32 loc);
|
2018-03-02 15:40:29 -06:00
|
|
|
private Q_SLOTS:
|
|
|
|
|
void OnBreakpointListDoubleClicked();
|
|
|
|
|
void OnBreakpointListRightClicked(const QPoint &pos);
|
|
|
|
|
void OnBreakpointListDelete();
|
|
|
|
|
private:
|
|
|
|
|
breakpoint_handler* m_breakpoint_handler;
|
2021-03-23 23:23:37 +01:00
|
|
|
QMenu* m_context_menu = nullptr;
|
|
|
|
|
QAction* m_delete_action;
|
2021-04-07 23:05:18 +02:00
|
|
|
cpu_thread* m_cpu = nullptr;
|
|
|
|
|
CPUDisAsm* m_disasm = nullptr;
|
2018-03-02 15:40:29 -06:00
|
|
|
};
|