summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/operands/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/operands/args.c')
-rw-r--r--src/arch/dalvik/operands/args.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/arch/dalvik/operands/args.c b/src/arch/dalvik/operands/args.c
index 367a718..16d995c 100644
--- a/src/arch/dalvik/operands/args.c
+++ b/src/arch/dalvik/operands/args.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* args.c - listes d'opérandes rassemblées en arguments
*
- * Copyright (C) 2010 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -187,3 +187,44 @@ void g_dalvik_args_operand_add(GDalvikArgsOperand *operand, GArchOperand *arg)
operand->args[operand->count - 1] = arg;
}
+
+
+/******************************************************************************
+* *
+* Paramètres : operand = opérande à compléter. *
+* *
+* Description : Fournit le nombre d'arguments pris en charge. *
+* *
+* Retour : Nombre positif ou nul. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+size_t g_dalvik_args_count(const GDalvikArgsOperand *operand)
+{
+ return operand->count;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : operand = opérande à compléter. *
+* index = indice de l'argument recherché. *
+* *
+* Description : Founit un élément de la liste d'arguments Dalvik. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchOperand *g_dalvik_args_operand_get(const GDalvikArgsOperand *operand, size_t index)
+{
+ /* BUG_ON(index >= operand->count) */
+
+ return operand->args[index];
+
+}