summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2008-11-10 01:28:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2008-11-10 01:28:23 (GMT)
commit12b4201890b4b2eefffaa6615b4b3076253dff6f (patch)
tree3756393810dc392658de2e05fc2589cbd119b2a8 /src/arch/instruction.c
parent7c7109c1a8aaedea40af4b96d4b81d6ba4496226 (diff)
Shown/hidden virtual addresses / binary code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@41 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index ada3d58..a03ced4 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -66,3 +66,24 @@ asm_instr *create_db_instruction(const uint8_t *data, off_t *pos, off_t len)
}
+
+/******************************************************************************
+* *
+* Paramètres : instr = instruction quelconque à traiter. *
+* offset = position physique dans le code binaire / NULL. [OUT]*
+* length = taille de l'instruction ou NULL. [OUT] *
+* *
+* Description : Indique la position et/ou la taille d'une instruction. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void get_asm_instr_offset_and_length(const asm_instr *instr, off_t *offset, off_t *length)
+{
+ if (offset != NULL) *offset = instr->offset;
+ if (length != NULL) *length = instr->length;
+
+}