summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/operands/args.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-07-23 19:07:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-07-23 19:07:29 (GMT)
commit8b35a66464636d0c46237af7490a6ca6866ecc4d (patch)
tree92199b36e3af00eb4c175a80c20b9b14511a6a45 /src/arch/dalvik/operands/args.c
parent8b2189a819c7a761cfdb97d9e3382ea963f225fb (diff)
Improved decompilation of Dalvik bytecode.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@252 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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];
+
+}