diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-11-19 21:26:51 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-11-19 21:26:51 (GMT) |
commit | 5a70286f7f56cc72a0249fcaf404afabfb033956 (patch) | |
tree | ef2b94b04a3e84b93832749ccf6cd9b9cc370d3c /src/format/dex/method.c | |
parent | 760e2e7346518dd1264126c1696f9ad88884d64c (diff) |
Handled Dalvik exception handlers in the graphic view.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@285 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/dex/method.c')
-rw-r--r-- | src/format/dex/method.c | 46 |
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; |