summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
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;
+
+}