summaryrefslogtreecommitdiff
path: root/src/arch/instruction-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-05-11 23:42:48 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-05-11 23:42:48 (GMT)
commit96cb6971ee3ca529958b8cb1e8e55a6eb4e60eae (patch)
tree68e49f325de3e93ef186d3e078da8ddc473aedf7 /src/arch/instruction-int.h
parent80dc0ac97987ad9246bee7c47458a015339453bf (diff)
Reorganized the way the program is built again and added partial support for the JVM.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@63 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction-int.h')
-rw-r--r--src/arch/instruction-int.h61
1 files changed, 57 insertions, 4 deletions
diff --git a/src/arch/instruction-int.h b/src/arch/instruction-int.h
index 32c8c8c..c80c20a 100644
--- a/src/arch/instruction-int.h
+++ b/src/arch/instruction-int.h
@@ -26,7 +26,6 @@
#include "instruction.h"
-#include "operand.h"
#include "operand-int.h" /* TODO: remove me */
@@ -40,7 +39,7 @@
#define DB_OPCODE 0x00
-
+#if 0
/* Typage des instructions rencontrées */
typedef enum _AsmInstrType
{
@@ -55,7 +54,7 @@ typedef enum _AsmInstrType
AIT_CALL /* Appel d'une fonction */
} AsmInstrType;
-
+#endif
/* Définition générique d'une instruction */
@@ -68,7 +67,7 @@ struct _asm_instr
off_t offset; /* Position physique de départ */
off_t length; /* Taille de l'instruction */
- AsmInstrType type; /* Type d'instruction */
+ int/*AsmInstrType*/ type; /* Type d'instruction */
asm_operand **operands; /* Liste des opérandes */
size_t operands_count; /* Nbre. d'opérandes utilisées */
@@ -81,4 +80,58 @@ struct _asm_instr
+
+
+#include "archbase.h"
+
+
+
+/* Traduit une instruction en version humainement lisible. */
+typedef const char * (* get_instruction_text_fc) (const GArchInstruction *, const exe_format *, AsmSyntax);
+
+
+/* Définition générique d'une instruction d'architecture (instance) */
+struct _GArchInstruction
+{
+ GObject parent; /* A laisser en premier */
+
+ ArchInstructionType type; /* Type d'instruction */
+
+ off_t offset; /* Position physique de départ */
+ off_t length; /* Taille de l'instruction */
+
+ vmpa_t address; /* Position associée */
+
+ GArchOperand **operands; /* Liste des opérandes */
+ size_t operands_count; /* Nbre. d'opérandes utilisées */
+
+ get_instruction_text_fc get_text; /* Texte humain équivalent */
+
+};
+
+
+
+
+
+/* Définition générique d'une instruction d'architecture (classe) */
+struct _GArchInstructionClass
+{
+ GObjectClass parent; /* A laisser en premier */
+
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#endif /* _ARCH_INSTRUCTION_INT_H */