summaryrefslogtreecommitdiff
path: root/src/arch/instruction.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-06-16 22:46:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-06-16 22:46:35 (GMT)
commit23c7cd436e2ec980a68e6d12a6d8a750e357763c (patch)
tree0c27434a3ab3946e9b4766ae8ebe28ab399d9d84 /src/arch/instruction.h
parentdf1f4c4e1a5bb929f4345b1273d16558c0ba77de (diff)
Made links between lines of code (x86 only).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@79 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction.h')
-rw-r--r--src/arch/instruction.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/arch/instruction.h b/src/arch/instruction.h
index ff0fd4a..b8be830 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -36,19 +36,15 @@
/* Typage des instructions rencontrées */
-typedef enum _ArchInstructionType
+typedef enum _InstructionLinkType
{
- AIT_OTHER, /* Instruction inintéressante */
+ ILT_NONE, /* Aucune instruction visée */
+ ILT_JUMP, /* Saut inconditionnel */
+ ILT_JUMP_IF_TRUE, /* Saut conditionnel (si vrai) */
+ ILT_JUMP_IF_FALSE, /* Saut conditionnel (si faux) */
+ ILT_CALL /* Appel d'une fonction */
- AIT_DB, /* Instruction non décodée */
-
- AIT_PUSH, /* Empilement de valeur */
- AIT_POP, /* Dépilement de valeur */
- AIT_JUMP, /* Saut à une adresse */
-
- AIT_CALL /* Appel d'une fonction */
-
-} ArchInstructionType;
+} InstructionLinkType;
#define G_TYPE_ARCH_INSTRUCTION g_arch_instruction_get_type()
@@ -82,12 +78,18 @@ void g_arch_instruction_attach_two_operands(GArchInstruction *, GArchOperand *,
/* Attache un opérande supplémentaire à une instruction. */
void g_arch_instruction_attach_extra_operand(GArchInstruction *, GArchOperand *);
+/* Fournit un opérande donné d'une instruction. */
+const GArchOperand *g_arch_instruction_get_operand(GArchInstruction *, size_t);
+
/* Détache un opérande liée d'une instruction. */
void g_arch_instruction_detach_operand(GArchInstruction *, GArchOperand *);
/* Traduit une instruction en version humainement lisible. */
char *g_arch_instruction_get_text(const GArchInstruction *, const exe_format *, AsmSyntax);
+/* Informe sur une éventuelle référence à une autre instruction. */
+InstructionLinkType g_arch_instruction_get_link(const GArchInstruction *, vmpa_t *);
+
#endif /* _ARCH_INSTRUCTION_H */