summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/instruction-int.h1
-rw-r--r--src/arch/instruction.c19
-rw-r--r--src/arch/instruction.h3
3 files changed, 23 insertions, 0 deletions
diff --git a/src/arch/instruction-int.h b/src/arch/instruction-int.h
index af72a87..25d65e5 100644
--- a/src/arch/instruction-int.h
+++ b/src/arch/instruction-int.h
@@ -87,6 +87,7 @@ struct _GArchInstructionClass
};
+#define ainstr_list_last(head) dl_list_last(head, GArchInstruction, flow)
#define ainstr_list_prev_iter(iter, head) dl_list_prev_iter(iter, head, GArchInstruction, flow)
#define ainstr_list_next_iter(iter, head) dl_list_next_iter(iter, head, GArchInstruction, flow)
#define ainstr_list_add_tail(new, head) dl_list_add_tail(new, head, GArchInstruction, flow)
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index a45e8fa..b460b37 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -623,6 +623,25 @@ GDecInstruction *g_arch_instruction_decompile(const GArchInstruction *instr, GDe
/******************************************************************************
* *
+* Paramètres : list = liste d'instructions à consulter. *
+* *
+* Description : Renvoie vers la dernière instruction d'une série. *
+* *
+* Retour : Dernière instruction trouvée (ou NULL ?!). *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *g_arch_instruction_find_last(const GArchInstruction *list)
+{
+ return ainstr_list_last(list);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : list = liste d'instructions à compléter, ou NULL. *
* instr = nouvelle instruction à intégrer à l'ensemble. *
* *
diff --git a/src/arch/instruction.h b/src/arch/instruction.h
index 8963284..2eddc3c 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -136,6 +136,9 @@ GDecInstruction *g_arch_instruction_decompile(const GArchInstruction *, GDecCont
/* -------------------- TRAITEMENT DES INSTRUCTIONS PAR ENSEMBLE -------------------- */
+/* Renvoie vers la dernière instruction d'une série. */
+GArchInstruction *g_arch_instruction_find_last(const GArchInstruction *);
+
/* Ajoute une instruction à un ensemble existant. */
void g_arch_instruction_add_to_list(GArchInstruction **, GArchInstruction *);