forked from hteso/iaito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqrdisasm.h
74 lines (60 loc) · 1.21 KB
/
qrdisasm.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
#ifndef QRDISASM_H
#define QRDISASM_H
#include <qrcore.h>
enum QRDisasmDataType {
STRING = 'z',
STRUCT = 's',
DATA = 'd',
};
enum QRDisasmOption {
DWARF = 1<<1,
REFS = 1<<2,
ESIL = 1<<3,
HEXPAIRS = 1<<4,
COMMENT = 1<<5,
};
class QRDisasmRow
{
private:
QRCore *core;
public:
ut64 vaddr;
ut64 paddr;
int size;
QString hex;
// Context
// list of flags
// closer function
RFlagItem *flag;
RAnalFunction *fcn;
// Contents
// if instruction
int optype; // jmp, cjmp, ... // aka RAnalOp
QString mnemonic;
QString arg[3]; // each argument splitted here
QString disasm;
QString esil;
// if data
QRDisasmDataType datatype;
QString dataopt; // struct name, aliased name, string, etc
// data type
// string/struct/hex/word
// Comment
QString comment;
QString description;
// References
// refs
// xrefs
};
class QRDisasm
{
QRCore *core;
Sdb *db;
public:
QRDisasm(QRCore *core);
bool disassembleAt (ut64 addr, QRDisasmOption opt, QRDisasmRow &dr);
// high level api for the disasm thing to manage comments, xrefs, etc
//next();
//prev();
};
#endif // QRDISASM_H