| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QDockWidget> |
| 7 |
#include <QString> |
| 8 |
|
| 9 |
#include "Common/CommonTypes.h" |
| 10 |
#include "DolphinQt/Debugger/CodeViewWidget.h" |
| 11 |
|
| 12 |
class BranchWatchDialog; |
| 13 |
class QCloseEvent; |
| 14 |
class QLineEdit; |
| 15 |
class QShowEvent; |
| 16 |
class QSplitter; |
| 17 |
class QListWidget; |
| 18 |
class QPushButton; |
| 19 |
class QTableWidget; |
| 20 |
class QToolButton; |
| 21 |
|
| 22 |
namespace Common |
| 23 |
{ |
| 24 |
struct Symbol; |
| 25 |
} |
| 26 |
namespace Core |
| 27 |
{ |
| 28 |
class System; |
| 29 |
} |
| 30 |
class PPCSymbolDB; |
| 31 |
|
| 32 |
class CodeWidget : public QDockWidget |
| 33 |
{ |
| 34 |
Q_OBJECT |
| 35 |
public: |
| 36 |
explicit CodeWidget(QWidget* parent = nullptr); |
| 37 |
~CodeWidget() override; |
| 38 |
|
| 39 |
void Step(); |
| 40 |
void StepOver(); |
| 41 |
void StepOut(); |
| 42 |
void Skip(); |
| 43 |
void ShowPC(); |
| 44 |
void SetPC(); |
| 45 |
|
| 46 |
void OnBranchWatchDialog(); |
| 47 |
void OnSetCodeAddress(u32 address); |
| 48 |
void ToggleBreakpoint(); |
| 49 |
void AddBreakpoint(); |
| 50 |
void SetAddress(u32 address, CodeViewWidget::SetAddressUpdate update); |
| 51 |
|
| 52 |
void Update(); |
| 53 |
void UpdateSymbols(); |
| 54 |
void ActivateSearchAddress(); |
| 55 |
signals: |
| 56 |
void RequestPPCComparison(u32 address, bool translate_address); |
| 57 |
void ShowMemory(u32 address); |
| 58 |
|
| 59 |
private: |
| 60 |
void CreateWidgets(); |
| 61 |
void ConnectWidgets(); |
| 62 |
void UpdateCallstack(); |
| 63 |
void UpdateFunctionCalls(const Common::Symbol* symbol); |
| 64 |
void UpdateFunctionCallers(const Common::Symbol* symbol); |
| 65 |
void UpdateNotes(); |
| 66 |
|
| 67 |
void OnPPCSymbolsChanged(); |
| 68 |
void OnSearchAddress(); |
| 69 |
void OnSearchSymbols(); |
| 70 |
void OnSelectSymbol(); |
| 71 |
void OnSelectNote(); |
| 72 |
void OnSelectCallstack(); |
| 73 |
void OnSelectFunctionCallers(); |
| 74 |
void OnSelectFunctionCalls(); |
| 75 |
|
| 76 |
void closeEvent(QCloseEvent*) override; |
| 77 |
void showEvent(QShowEvent* event) override; |
| 78 |
|
| 79 |
Core::System& m_system; |
| 80 |
PPCSymbolDB& m_ppc_symbol_db; |
| 81 |
|
| 82 |
BranchWatchDialog* m_branch_watch_dialog = nullptr; |
| 83 |
QLineEdit* m_search_address; |
| 84 |
QToolButton* m_lock_btn; |
| 85 |
QPushButton* m_branch_watch; |
| 86 |
|
| 87 |
QLineEdit* m_search_callstack; |
| 88 |
QListWidget* m_callstack_list; |
| 89 |
QLineEdit* m_search_symbols; |
| 90 |
QListWidget* m_symbols_list; |
| 91 |
QListWidget* m_note_list; |
| 92 |
QLineEdit* m_search_calls; |
| 93 |
QListWidget* m_function_calls_list; |
| 94 |
QLineEdit* m_search_callers; |
| 95 |
QListWidget* m_function_callers_list; |
| 96 |
CodeViewWidget* m_code_view; |
| 97 |
QSplitter* m_box_splitter; |
| 98 |
QSplitter* m_code_splitter; |
| 99 |
|
| 100 |
QString m_symbol_filter; |
| 101 |
}; |