summaryrefslogtreecommitdiff
path: root/src/format/dex/method.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/dex/method.c')
-rw-r--r--src/format/dex/method.c46
1 files changed, 43 insertions, 3 deletions
diff --git a/src/format/dex/method.c b/src/format/dex/method.c
index 25145f5..6ea9697 100644
--- a/src/format/dex/method.c
+++ b/src/format/dex/method.c
@@ -147,7 +147,9 @@ GDexMethod *g_dex_method_new(const GDexFormat *format, const encoded_method *see
result->info = *seed;
result->body = item;
- //printf(" ==== %s ====\n", g_binary_routine_get_name(routine));
+ //printf(" ==== (%p) %s ====\n", routine, g_binary_routine_to_string(routine));
+
+ //printf(" try ? %d\n", item.tries_size);
//printf(" method idx :: %d\n", seed->method_idx_diff);
//printf(" code size :: %d\n", item.insns_size);
@@ -180,6 +182,44 @@ GDexMethod *g_dex_method_new(const GDexFormat *format, const encoded_method *see
/******************************************************************************
* *
+* Paramètres : method = représentation interne de la méthode à consulter. *
+* *
+* Description : Fournit les indications Dex concernant la méthode. *
+* *
+* Retour : Données brutes du binaire. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+const encoded_method *g_dex_method_get_dex_info(const GDexMethod *method)
+{
+ return &method->info;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : method = représentation interne de la méthode à consulter. *
+* *
+* Description : Fournit les indications Dex relatives au corps de la méthode.*
+* *
+* Retour : Données brutes du binaire. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+const code_item *g_dex_method_get_dex_body(const GDexMethod *method)
+{
+ return &method->body;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : method = représentation interne du format DEX à consulter. *
* *
* Description : Fournit la routine OpenIDA correspondant à la méthode. *
@@ -272,7 +312,7 @@ DexVariableIndex g_dex_method_get_variable(const GDexMethod *method, uint32_t in
pivot = body->registers_size - body->ins_size;
- if (!(method->info.access_flags & ACC_STATIC))
+ if (!(info->access_flags & ACC_STATIC))
pivot++;
if (index >= pivot)
@@ -280,7 +320,7 @@ DexVariableIndex g_dex_method_get_variable(const GDexMethod *method, uint32_t in
/* S'agit-il de "this" ? */
- if (!(method->info.access_flags & ACC_STATIC)
+ if (!(info->access_flags & ACC_STATIC)
&& index == (body->registers_size - body->ins_size))
return DVI_THIS;