-
Notifications
You must be signed in to change notification settings - Fork 20
/
mainwindow.h
120 lines (93 loc) · 2.49 KB
/
mainwindow.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#define _WIN32_WINNT 0x0601
#include <QMainWindow>
#include <QString>
#include <QTextDocument>
#include <QFileDialog>
#include <QInputDialog>
#include <QMessageBox>
#include <QTextStream>
#include <QTreeWidgetItem>
#include <QSet>
#include "core_decompiler.h"
#include "interfacedisasm.h"
#include "interfacememory.h"
#include <stdint.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void log(QString logged);
void load_asm(QString file_loc);
void update_view(QString addr);
bool save_project(QString location);
bool restore_project(QString location);
void InitRegs();
void UpdateRegs();
private slots:
void on_actionOpen_Session_triggered();
void on_actionSave_Session_triggered();
void on_actionRestore_Session_triggered();
void on_actionQuit_triggered();
void on_actionStart_Debugg_triggered();
void on_actionStop_Debugg_triggered();
void on_actionBaby_Step_triggered();
void debugMessage(QString msg);
void disasmLine(QString address);
void on_actionGiant_Step_triggered();
void on_actionAbout_triggered();
void on_actionDump_Memory_triggered();
void on_actionRun_triggered();
void on_actionAdd_Breakpoint_triggered();
void on_actionRemove_Breakpoint_triggered();
private:
void InitUi();
bool LoadsOrSaves;
bool debug_stats;
Ui::MainWindow *ui;
uint32_t img_base;
uint32_t machine_entry;
uint32_t handler_1;
uint32_t handler_2;
uint32_t machine_quit;
QSet<uint32_t> addresses;
QString bin_loc;
InterfaceDisasm* DisasmInterface;
InterfaceMemory* MemDumper;
//machine registers (UI);
QTreeWidgetItem* Data_Rtab;
QTreeWidgetItem* Main_rtab;
QTreeWidgetItem* IP;
QTreeWidgetItem* stack;
QTreeWidgetItem* N1;
QTreeWidgetItem* N2;
QTreeWidgetItem* N3;
QTreeWidgetItem* R0;
QTreeWidgetItem* R1;
QTreeWidgetItem* R2;
QTreeWidgetItem* R3;
QTreeWidgetItem* R4;
QTreeWidgetItem* R5;
QTreeWidgetItem* R6;
QTreeWidgetItem* R7;
QTreeWidgetItem* R8;
QTreeWidgetItem* R9;
QTreeWidgetItem* Ra;
QTreeWidgetItem* Rb;
QTreeWidgetItem* Rc;
QTreeWidgetItem* Rd;
QTreeWidgetItem* Re;
QTreeWidgetItem* Rf;
QTreeWidgetItem* R10;
QTreeWidgetItem* R11;
QTreeWidgetItem* R12;
QTreeWidgetItem* R13;
QTreeWidgetItem* R14;
};
#endif // MAINWINDOW_H