summaryrefslogtreecommitdiff
path: root/src/arch/instruction-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-02 11:58:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-02 12:39:30 (GMT)
commit1db4ef323b7a76093356ae76268132f3760e1631 (patch)
treefec36ee0ec1b6b2010b62ca4177edca0e31e2114 /src/arch/instruction-int.h
parent1bc80837dde03a32b5ab185067f7bd4c499a9850 (diff)
Rewritten the whole instruction definition format.
Diffstat (limited to 'src/arch/instruction-int.h')
-rw-r--r--src/arch/instruction-int.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/arch/instruction-int.h b/src/arch/instruction-int.h
index 081adba..782c827 100644
--- a/src/arch/instruction-int.h
+++ b/src/arch/instruction-int.h
@@ -40,6 +40,9 @@ typedef const char * (* get_instruction_keyword_fc) (GArchInstruction *, AsmSynt
/* Construit un petit résumé concis de l'instruction. */
typedef char * (* build_instruction_tooltip_fc) (const GArchInstruction *);
+/* Fournit une description pour l'instruction manipulée. */
+typedef const char * (* get_instruction_desc_fc) (const GArchInstruction *);
+
/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
typedef GBufferLine * (* print_instruction_fc) (const GArchInstruction *, GBufferLine *, size_t, size_t, const GBinContent *);
@@ -82,6 +85,8 @@ struct _GArchInstruction
flat_array_t *from; /* Origines des références */
flat_array_t *to; /* Instructions visées */
+ itid_t uid; /* Identifiant unique du type */
+
ArchInstrFlag flags; /* Informations complémentaires*/
};
@@ -95,6 +100,7 @@ struct _GArchInstructionClass
get_instruction_encoding_fc get_encoding; /* Obtention de l'encodage */
get_instruction_keyword_fc get_keyword; /* Texte humain équivalent */
build_instruction_tooltip_fc build_tooltip; /* Construction d'une bulle*/
+ get_instruction_desc_fc get_desc; /* Description assez complète */
print_instruction_fc print; /* Imprime l'ensemble */
@@ -103,5 +109,13 @@ struct _GArchInstructionClass
};
+/**
+ * Fournit une marge pour toutes les instructions particulières communes
+ * à l'ensemble des architectures (GRawInstruction, GUndefInstruction).
+ */
+
+#define INSTR_TYPE_ID_OFFSET 5
+
+
#endif /* _ARCH_INSTRUCTION_INT_H */