diff options
Diffstat (limited to 'src/arch/instruction-int.h')
-rw-r--r-- | src/arch/instruction-int.h | 61 |
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 */ |