summaryrefslogtreecommitdiff
path: root/plugins/dex
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dex')
-rw-r--r--plugins/dex/core.c2
-rwxr-xr-xplugins/dex/format.c5
-rw-r--r--plugins/dex/pool.c5
3 files changed, 9 insertions, 3 deletions
diff --git a/plugins/dex/core.c b/plugins/dex/core.c
index b163be9..c7f9aa4 100644
--- a/plugins/dex/core.c
+++ b/plugins/dex/core.c
@@ -34,7 +34,7 @@
DEFINE_CHRYSALIDE_PLUGIN("dex", "Add suport for the DEX format", "0.1.0",
- RL("PyChrysalide"), AL(PGA_PLUGIN_INIT));
+ RL("PyChrysalide", "dexbnf"), AL(PGA_PLUGIN_INIT));
diff --git a/plugins/dex/format.c b/plugins/dex/format.c
index 72d0dd5..fc49a15 100755
--- a/plugins/dex/format.c
+++ b/plugins/dex/format.c
@@ -24,10 +24,12 @@
#include "format.h"
+#include <assert.h>
#include <string.h>
#include <i18n.h>
+#include <core/demanglers.h>
#include <core/global.h>
#include <plugins/pglist.h>
@@ -189,6 +191,9 @@ static void g_dex_format_init(GDexFormat *format)
bin_format = G_BIN_FORMAT(format);
+ bin_format->demangler = get_compiler_demangler_for_type("dex");
+ assert(bin_format->demangler != NULL);
+
bin_format->decompile = (format_decompile_fc)g_dex_format_decompile;
}
diff --git a/plugins/dex/pool.c b/plugins/dex/pool.c
index 19e9e36..46c431e 100644
--- a/plugins/dex/pool.c
+++ b/plugins/dex/pool.c
@@ -31,7 +31,6 @@
#include <i18n.h>
#include <core/global.h>
#include <mangling/demangler.h>
-#include <mangling/dex/context.h>
#include "dex-int.h"
@@ -235,6 +234,7 @@ GDataType *get_type_from_dex_pool(GDexFormat *format, uint32_t index)
type_id_item type_id; /* Définition de la classe */
string_id_item str_id; /* Identifiant de chaîne */
string_data_item str_data; /* Description de chaîne */
+ GCompDemangler *demangler; /* Accès plus lisible */
result = NULL;
@@ -261,7 +261,8 @@ GDataType *get_type_from_dex_pool(GDexFormat *format, uint32_t index)
if (!read_dex_string_data_item(format, &addr, &str_data))
goto gtfdp_error;
- format->types[index] = demangle_type(G_TYPE_DEX_DEMANGLER, (char *)str_data.data);
+ demangler = G_BIN_FORMAT(format)->demangler;
+ format->types[index] = g_compiler_demangler_decode_type(demangler, (char *)str_data.data);
}