summaryrefslogtreecommitdiff
path: root/plugins/androhelpers/params.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-12 11:32:03 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-12 11:32:03 (GMT)
commit254254db8c09eb4b4f8523e73551c13ec281d194 (patch)
tree730beb552a9d300e71f583fc40ef5a5b9dc40b42 /plugins/androhelpers/params.c
parentba1d7ae3ae3c82ab2c3d23a900c16baff6f8ca26 (diff)
Only given access to instructions from a processor.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@547 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/androhelpers/params.c')
-rw-r--r--plugins/androhelpers/params.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/androhelpers/params.c b/plugins/androhelpers/params.c
index 6993821..df56fca 100644
--- a/plugins/androhelpers/params.c
+++ b/plugins/androhelpers/params.c
@@ -180,8 +180,9 @@ static void visit_all_method_operands(const GDexMethod *method, GArchInstruction
bool replace_parameters(GLoadedBinary *binary)
{
- GArchInstruction *instrs; /* Instructions Dalvik */
GDexFormat *format; /* Format du binaire chargé */
+ GArchProcessor *proc; /* Processeur de l'architecture*/
+ GArchInstruction *instrs; /* Instructions Dalvik */
size_t cls_count; /* Nombre de classes trouvées */
size_t i; /* Boucle de parcours #1 */
GDexClass *class; /* Classe à analyser */
@@ -189,8 +190,9 @@ bool replace_parameters(GLoadedBinary *binary)
size_t j; /* Boucle de parcours #2 */
GDexMethod *method; /* Méthode à parcourir */
- instrs = g_loaded_binary_get_instructions(binary);
format = G_DEX_FORMAT(g_loaded_binary_get_format(binary));
+ proc = g_loaded_binary_get_processor(binary);
+ instrs = g_arch_processor_get_disassembled_instructions(proc);
cls_count = g_dex_format_count_classes(format);
for (i = 0; i < cls_count; i++)
@@ -213,6 +215,8 @@ bool replace_parameters(GLoadedBinary *binary)
}
+ g_object_unref(G_OBJECT(proc));
+
return true;
}