summaryrefslogtreecommitdiff
path: root/src/format/dex
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-09-17 21:36:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-09-17 21:36:49 (GMT)
commit65768127dea4c2760fe07cf843da7b4ad9e67da5 (patch)
treed0023eb7f378a4118fd074f3f61d5eae02e0882b /src/format/dex
parentaf083f8bd6da340214ae392451dde5782fb79039 (diff)
Introduced memory ranges.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@406 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/dex')
-rw-r--r--src/format/dex/method.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/format/dex/method.c b/src/format/dex/method.c
index d7900f8..22e7039 100644
--- a/src/format/dex/method.c
+++ b/src/format/dex/method.c
@@ -131,6 +131,10 @@ GDexMethod *g_dex_method_new(const GDexFormat *format, const encoded_method *see
GBinRoutine *routine;
+ vmpa2t addr;
+ mrange_t range;
+
+
offset = seed->code_off;
if (!read_dex_code_item(format, &offset, &item))
@@ -168,9 +172,11 @@ GDexMethod *g_dex_method_new(const GDexFormat *format, const encoded_method *see
//printf(" method off :: 0x%08x\n", result->offset);
+ init_vmpa(&addr, result->offset, VMPA_NO_VIRTUAL);
+ init_mrange(&range, &addr, item.insns_size * sizeof(uint16_t));
+
- g_binary_routine_set_address(routine, result->offset);
- g_binary_routine_set_size(routine, item.insns_size * sizeof(uint16_t));
+ g_binary_routine_set_range(routine, &range);
result->routine = routine;