summaryrefslogtreecommitdiff
path: root/src/format/dex
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/dex')
-rw-r--r--src/format/dex/dex-int.c2
-rwxr-xr-xsrc/format/dex/dex_def.h2
-rw-r--r--src/format/dex/method.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/format/dex/dex-int.c b/src/format/dex/dex-int.c
index 1626dde..c49445d 100644
--- a/src/format/dex/dex-int.c
+++ b/src/format/dex/dex-int.c
@@ -376,6 +376,8 @@ bool read_dex_encoded_method(const GDexFormat *format, vmpa2t *pos, encoded_meth
content = G_BIN_FORMAT(format)->content;
+ copy_vmpa(&method->origin, pos);
+
result &= g_binary_content_read_uleb128(content, pos, &method->method_idx_diff);
result &= g_binary_content_read_uleb128(content, pos, &method->access_flags);
result &= g_binary_content_read_uleb128(content, pos, &method->code_off);
diff --git a/src/format/dex/dex_def.h b/src/format/dex/dex_def.h
index 8ddcf30..e1521e8 100755
--- a/src/format/dex/dex_def.h
+++ b/src/format/dex/dex_def.h
@@ -191,6 +191,8 @@ typedef struct _encoded_method
uleb128_t access_flags; /* Conditions d'accès */
uleb128_t code_off; /* Position du code associé */
+ vmpa2t origin; /* Rajout pour suivi interne */
+
} encoded_method;
/* Type quelconque */
diff --git a/src/format/dex/method.c b/src/format/dex/method.c
index f487c0a..ec12119 100644
--- a/src/format/dex/method.c
+++ b/src/format/dex/method.c
@@ -387,7 +387,7 @@ void g_dex_method_include_as_portion(const GDexMethod *method, GExeFormat *forma
g_binary_portion_set_rights(new, PAC_READ | PAC_EXEC);
- g_exe_format_include_portion(format, new);
+ g_exe_format_include_portion(format, new, &method->info.origin);
}