-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
debugger_list.h
49 lines (41 loc) · 1.21 KB
/
debugger_list.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "stdafx.h"
#include <QListWidget>
class breakpoint_handler;
class CPUDisAsm;
class cpu_thread;
class gui_settings;
class debugger_list : public QListWidget
{
Q_OBJECT
public:
u32 m_pc = 0;
u32 m_item_count = 30;
bool m_no_thread_selected;
QColor m_color_bp;
QColor m_color_pc;
QColor m_text_color_bp;
QColor m_text_color_pc;
Q_SIGNALS:
void BreakpointRequested(u32 loc);
public:
debugger_list(QWidget* parent, std::shared_ptr<gui_settings> settings, breakpoint_handler* handler);
void UpdateCPUData(std::weak_ptr<cpu_thread> cpu, std::shared_ptr<CPUDisAsm> disasm);
public Q_SLOTS:
void ShowAddress(u32 addr, bool force = false);
protected:
void keyPressEvent(QKeyEvent* event) override;
void mouseDoubleClickEvent(QMouseEvent* event) override;
void wheelEvent(QWheelEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
private:
/**
* It really upsetted me I had to copy this code to make debugger_list/frame not circularly dependent.
*/
u32 GetPc() const;
u32 GetCenteredAddress(u32 address) const;
std::shared_ptr<gui_settings> xgui_settings;
breakpoint_handler* m_breakpoint_handler;
std::weak_ptr<cpu_thread> cpu;
std::shared_ptr<CPUDisAsm> m_disasm;
};