summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dalvik/operands/pool.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/plugins/dalvik/operands/pool.c b/plugins/dalvik/operands/pool.c
index d913149..8f6ccff 100644
--- a/plugins/dalvik/operands/pool.c
+++ b/plugins/dalvik/operands/pool.c
@@ -266,9 +266,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
GDataType *type; /* Type à représenter */
size_t len; /* Taille du texte à créer */
char *tmp; /* Chaîne de caractères #2 */
+ GBinRoutine *routine; /* Routine à représenter */
GBinVariable *field; /* Champ à représenter */
GDexMethod *method; /* Méthode à retrouver */
- GBinRoutine *routine; /* Routine à représenter */
switch (operand->type)
{
@@ -335,7 +335,29 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
break;
case DPT_PROTO:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "proto(/*TODO*/)", 5, RTT_SECTION, NULL);
+
+ routine = get_prototype_from_dex_pool(operand->format, operand->index);
+
+ if (routine != NULL)
+ {
+ tmp = g_binary_symbol_get_label(G_BIN_SYMBOL(routine));
+ g_object_unref(G_OBJECT(routine));
+
+ g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, strlen(tmp), RTT_LABEL, G_OBJECT(operand));
+
+ }
+ else
+ {
+ len = strlen(_("<bad prototype index (%d)>")) + 10 /* 4294967295U */ + 1;
+ tmp = calloc(len, sizeof(char));
+ snprintf(tmp, len, _("<bad prototype index (%d)>"), operand->index);
+
+ g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
+
+ }
+
+ free(tmp);
+
break;
case DPT_FIELD: