summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-02-28 17:39:48 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-03-01 20:15:47 (GMT)
commit2245e2b3c4f4ff96cf462e76e24c04d4d0941996 (patch)
treefe32bed6dd26c4b4fa144c42db19771f02ca3ef5 /src/arch
parent11047009c222d3dba1380e63c3099cce0dbc6996 (diff)
Dealt with the prototypes from the Dex pool.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/dalvik/operands/pool.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/arch/dalvik/operands/pool.c b/src/arch/dalvik/operands/pool.c
index 0d88242..7de8c37 100644
--- a/src/arch/dalvik/operands/pool.c
+++ b/src/arch/dalvik/operands/pool.c
@@ -237,6 +237,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
size_t len; /* Taille du texte à créer */
char *tmp; /* Chaîne de caractères #2 */
GBinVariable *field; /* Champ à représenter */
+ GDexMethod *method; /* Méthode à retrouver */
GBinRoutine *routine; /* Routine à représenter */
switch (operand->type)
@@ -246,6 +247,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
break;
case DPT_STRING:
+
string = get_string_from_dex_pool(operand->format, operand->index);
if (string != NULL)
@@ -269,6 +271,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
break;
case DPT_TYPE:
+
type = get_type_from_dex_pool(operand->format, operand->index);
if (type != NULL)
@@ -300,6 +303,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
break;
case DPT_FIELD:
+
field = get_field_from_dex_pool(operand->format, operand->index);
if (field != NULL)
@@ -327,7 +331,13 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
break;
case DPT_METHOD:
- routine = NULL;//get_routine_from_dex_pool(operand->format, operand->index);
+
+ method = get_method_from_dex_pool(operand->format, operand->index);
+
+ if (method != NULL)
+ routine = g_dex_method_get_routine(method);
+ else
+ routine = NULL;
if (routine != NULL)
{
@@ -351,6 +361,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
free(tmp);
+ if (method != NULL)
+ g_object_unref(G_OBJECT(method));
+
break;
}