-
Notifications
You must be signed in to change notification settings - Fork 2
/
msp430emu_ui_qt.h
150 lines (133 loc) · 3.34 KB
/
msp430emu_ui_qt.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
Source for MSP430 emulator IdaPro plugin
Copyright (c) 2014 Chris Eagle
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __MSP430EMU_QT_H__
#define __MSP430EMU_QT_H__
#ifdef __QT__
#ifndef QT_NAMESPACE
#define QT_NAMESPACE QT
#endif
#endif
#include <QtGui>
#include <QDialog>
#include <QListWidget>
#include <QLineEdit>
#include <QComboBox>
#include <QMainWindow>
#include <QRadioButton>
#include <QValidator>
#include <QSpinBox>
#include <QPushButton>
#include <QCheckBox>
#include <QAction>
#include "msp430defs.h"
#include "msp430emu_ui.h"
using namespace QT;
class AllIntValidator : public QValidator {
Q_OBJECT
public:
AllIntValidator(QObject *parent = 0) : QValidator(parent) {}
State validate(QString &input, int &pos) const;
};
class MSP430Dialog : public QMainWindow {
Q_OBJECT
public:
MSP430Dialog(QWidget *parent = 0);
public slots:
void changePC();
void changeSP();
void changeSR();
void changeCG();
void changeR4();
void changeR5();
void changeR6();
void changeR7();
void changeR8();
void changeR9();
void changeR10();
void changeR11();
void changeR12();
void changeR13();
void changeR14();
void changeR15();
void dumpRange();
void reset();
void breakOnSyscalls();
void microCorruptionBugs();
void trackExec();
void traceExec();
void setBreak();
void clearBreak();
void hideEmu();
void step();
void skip();
void run();
void doBreak();
void runCursor();
void jumpCursor();
void pushData();
void setMemory();
public:
QLineEdit *QPC;
QLineEdit *QSP;
QLineEdit *QSR;
QLineEdit *QCG;
QLineEdit *QR4;
QLineEdit *QR5;
QLineEdit *QR6;
QLineEdit *QR7;
QLineEdit *QR8;
QLineEdit *QR9;
QLineEdit *QR10;
QLineEdit *QR11;
QLineEdit *QR12;
QLineEdit *QR13;
QLineEdit *QR14;
QLineEdit *QR15;
private:
QAction *emulateTrack_fetched_bytesAction;
QAction *emulateTrace_executionAction;
QAction *emulateMicrocorruptionBugModeAction;
QAction *emulateBreakOnSyscallsAction;
QPushButton *BREAK;
};
class SetMemoryDialog : public QDialog {
Q_OBJECT
public:
SetMemoryDialog(QWidget *parent = 0);
QRadioButton *type_dword;
QRadioButton *type_word;
QRadioButton *type_byte;
QRadioButton *type_ascii;
QRadioButton *type_asciiz;
QRadioButton *type_file;
QLineEdit *mem_start;
QLineEdit *mem_values;
private slots:
void do_ok();
};
class CustomInputDialog : public QDialog {
Q_OBJECT
public:
CustomInputDialog(const char *console, unsigned int max, QWidget *parent = 0);
QCheckBox *hex_or_not;
QLineEdit *inputText;
bytevec_t data;
private:
unsigned int _max;
private slots:
void do_ok();
};
#endif