summaryrefslogtreecommitdiff
path: root/instr.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-11-02 18:21:49 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2025-11-12 00:47:10 +0100
commitb16e2f67e7d392890c6835f98ca9b2a7bb44fe2e (patch)
treecf07afb610395dd182e1f243ffccf2a55a13effe /instr.h
First commitHEADmaster
Diffstat (limited to 'instr.h')
-rw-r--r--instr.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/instr.h b/instr.h
new file mode 100644
index 0000000..942e474
--- /dev/null
+++ b/instr.h
@@ -0,0 +1,24 @@
+#ifndef INSTR_H
+#define INSTR_H
+
+#include "types.h"
+#include <QString>
+#include <stdio.h>
+
+struct WasmInstr
+{
+ quint32 address;
+ QString instr;
+
+ static int parse(FILE *f, WasmInstr &instr, QString &error,
+ bool *end = nullptr);
+ static int parse(FILE *f, varuint32 maxlen, QVector<WasmInstr> &instr,
+ QString &error);
+ bool operator==(const WasmInstr &other) const
+ {
+ return address == other.address
+ && instr == other.instr;
+ }
+};
+
+#endif