diff options
Diffstat (limited to 'src/arch/instruction.h')
-rw-r--r-- | src/arch/instruction.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/arch/instruction.h b/src/arch/instruction.h index 9251a34..0198bb5 100644 --- a/src/arch/instruction.h +++ b/src/arch/instruction.h @@ -76,22 +76,29 @@ void g_arch_instruction_set_flag(GArchInstruction *, ArchInstrFlag); /* Fournit les informations complémentaires d'une instruction. */ ArchInstrFlag g_arch_instruction_get_flags(const GArchInstruction *); + /** * La définition de "GBinFormat", utile aux traitements complémentaires, ne peut * se faire en incluant le fichier d'en-tête "../format/format.h", pour cause * de références circulaires. * * On procède donc à une seconde déclaration, en attendant éventuellement mieux. + * + * Pareil pour "GArchProcessor", définie dans le fichier "processor.h", lequel + * inclut directement ce fichier. */ - /* Format binaire générique (instance) */ typedef struct _GBinFormat GBinFormat; +/* Ligne de représentation générique (instance) */ +typedef struct _GArchProcessor GArchProcessor; + /* Types de crochet de traitement */ typedef enum _InstrProcessHook { + IPH_FETCH, /* Itinéraire de désassemblage */ IPH_LINK, /* Edition des liens */ IPH_POST, /* Résolution des symboles */ @@ -100,13 +107,13 @@ typedef enum _InstrProcessHook } InstrProcessHook; /* Complète un désassemblage accompli pour une instruction. */ -typedef void (* instr_hook_fc) (GArchInstruction *, GProcContext *, GBinFormat *); +typedef void (* instr_hook_fc) (GArchInstruction *, GArchProcessor *, GProcContext *, GBinFormat *); /* Définit un traitement complémentare au désassemblage. */ void g_arch_instruction_set_hook(GArchInstruction *, InstrProcessHook, instr_hook_fc); /* Complète un désassemblage accompli pour une instruction. */ -void g_arch_instruction_call_hook(GArchInstruction *, InstrProcessHook, GProcContext *, GBinFormat *); +void g_arch_instruction_call_hook(GArchInstruction *, InstrProcessHook, GArchProcessor *, GProcContext *, GBinFormat *); /* Définit la localisation d'une instruction. */ void g_arch_instruction_set_range(GArchInstruction *, const mrange_t *); @@ -155,7 +162,8 @@ typedef enum _InstructionLinkType ILT_JUMP_IF_FALSE, /* Saut conditionnel (si faux) */ ILT_LOOP, /* Retour en arrière (boucle) */ ILT_CALL, /* Appel d'une fonction */ - ILT_CATCH_EXCEPTION /* Gestion d'une exception */ + ILT_CATCH_EXCEPTION, /* Gestion d'une exception */ + ILT_REF /* Simple référence croisée */ } InstructionLinkType; |