summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-08-19 20:25:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-08-19 20:25:20 (GMT)
commit2425953ed7330c8f92ec7d04a5f248db1ed98a9d (patch)
treef389f040f6bcc9f88d837e0e2f37cbd49758f610 /src/arch/instruction.c
parenta0a7b6c1e05c78ae433f353d15e3366107b67d03 (diff)
Added a demo symbol when loading an ELF header.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@390 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 3a62a90..95910ba 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -171,6 +171,32 @@ void g_arch_instruction_set_location(GArchInstruction *instr, const vmpa2t *addr
}
+
+/******************************************************************************
+* *
+* Paramètres : instr = instruction quelconque à consulter. *
+* offset = position physique dans le code binaire/NULL. [OUT] *
+* length = taille de l'instruction ou NULL. [OUT] *
+* address = adresse virtuelle ou position physique/NULL. [OUT] *
+* *
+* Description : Fournit la localisation d'une instruction. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+const vmpa2t *g_arch_instruction_get_location2(const GArchInstruction *instr, off_t *length)
+{
+ if (length != NULL) *length = instr->length;
+
+ return &instr->address2;
+
+}
+
+
+
/******************************************************************************
* *
* Paramètres : instr = instruction quelconque à consulter. *
@@ -854,9 +880,13 @@ GArchInstruction *g_arch_instruction_get_next_iter(const GArchInstruction *list,
result = ainstr_list_next_iter(iter, list);
+ /* FIXME : utiliser les nouvelles adresses !
+
if (result != NULL && result->address >= max)
result = NULL;
+ */
+
return result;
}