diff options
| author | 2015-01-03 15:51:14 -0800 | |
|---|---|---|
| committer | 2015-01-06 04:51:54 -0800 | |
| commit | b0a14cfe7f0075d0758371276b7f6384856aa6ff (patch) | |
| tree | 1c7c0f0f9c707138a0a7f37583c0ef31cd94bec3 /src/citra_qt/debugger/disassembler.h | |
| parent | Merge pull request #419 from linkmauve/no-x86-specifics (diff) | |
| download | yuzu-b0a14cfe7f0075d0758371276b7f6384856aa6ff.tar.gz yuzu-b0a14cfe7f0075d0758371276b7f6384856aa6ff.tar.xz yuzu-b0a14cfe7f0075d0758371276b7f6384856aa6ff.zip | |
citra-qt: Renamed all .hxx headers to .h
Diffstat (limited to 'src/citra_qt/debugger/disassembler.h')
| -rw-r--r-- | src/citra_qt/debugger/disassembler.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/disassembler.h b/src/citra_qt/debugger/disassembler.h new file mode 100644 index 000000000..6d3cef108 --- /dev/null +++ b/src/citra_qt/debugger/disassembler.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <QAbstractItemModel> | ||
| 6 | #include <QDockWidget> | ||
| 7 | #include "ui_disassembler.h" | ||
| 8 | |||
| 9 | #include "common/common.h" | ||
| 10 | #include "common/break_points.h" | ||
| 11 | |||
| 12 | class QAction; | ||
| 13 | class EmuThread; | ||
| 14 | |||
| 15 | class DisassemblerModel : public QAbstractItemModel | ||
| 16 | { | ||
| 17 | Q_OBJECT | ||
| 18 | |||
| 19 | public: | ||
| 20 | DisassemblerModel(QObject* parent); | ||
| 21 | |||
| 22 | QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; | ||
| 23 | QModelIndex parent(const QModelIndex& child) const override; | ||
| 24 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; | ||
| 25 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
| 26 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||
| 27 | |||
| 28 | QModelIndex IndexFromAbsoluteAddress(unsigned int address) const; | ||
| 29 | const BreakPoints& GetBreakPoints() const; | ||
| 30 | |||
| 31 | public slots: | ||
| 32 | void ParseFromAddress(unsigned int address); | ||
| 33 | void OnSelectionChanged(const QModelIndex&); | ||
| 34 | void OnSetOrUnsetBreakpoint(); | ||
| 35 | void SetNextInstruction(unsigned int address); | ||
| 36 | |||
| 37 | private: | ||
| 38 | unsigned int base_address; | ||
| 39 | unsigned int code_size; | ||
| 40 | unsigned int program_counter; | ||
| 41 | |||
| 42 | QModelIndex selection; | ||
| 43 | |||
| 44 | // TODO: Make BreakPoints less crappy (i.e. const-correct) so that this needn't be mutable. | ||
| 45 | mutable BreakPoints breakpoints; | ||
| 46 | }; | ||
| 47 | |||
| 48 | class DisassemblerWidget : public QDockWidget | ||
| 49 | { | ||
| 50 | Q_OBJECT | ||
| 51 | |||
| 52 | public: | ||
| 53 | DisassemblerWidget(QWidget* parent, EmuThread& emu_thread); | ||
| 54 | |||
| 55 | void Init(); | ||
| 56 | |||
| 57 | public slots: | ||
| 58 | void OnContinue(); | ||
| 59 | void OnStep(); | ||
| 60 | void OnStepInto(); | ||
| 61 | void OnPause(); | ||
| 62 | void OnToggleStartStop(); | ||
| 63 | |||
| 64 | void OnCPUStepped(); | ||
| 65 | |||
| 66 | private: | ||
| 67 | // returns -1 if no row is selected | ||
| 68 | int SelectedRow(); | ||
| 69 | |||
| 70 | Ui::DockWidget disasm_ui; | ||
| 71 | |||
| 72 | DisassemblerModel* model; | ||
| 73 | |||
| 74 | u32 base_addr; | ||
| 75 | |||
| 76 | EmuThread& emu_thread; | ||
| 77 | }; | ||