summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-12-16 21:55:04 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-12-16 21:55:04 (GMT)
commit64e09a6c3e39785975b5322973ed83734cedb82e (patch)
treea87d29cca9d86ccd26676460282ddf59c4e9cb17 /src/arch
parent2581d80875304c466e8930dbe67986ceb95752b2 (diff)
Reintroduced the delayed disassembling of binaries.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@304 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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 *);