summaryrefslogtreecommitdiff
path: root/plugins/dalvik/operands
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-07-27 22:43:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-07-27 22:49:24 (GMT)
commitd9c8eaac961b6fa097b362b2202c176a5ef16ec2 (patch)
treeba4572719bd7b2f84d7e06e59fbacfcfddc4ddde /plugins/dalvik/operands
parent703e0d10d56bb288b515526f0d0f1994391619bf (diff)
Replaced all BLC_* constants by the new DLC_* values.
Diffstat (limited to 'plugins/dalvik/operands')
-rw-r--r--plugins/dalvik/operands/args.c9
-rw-r--r--plugins/dalvik/operands/pool.c35
2 files changed, 23 insertions, 21 deletions
diff --git a/plugins/dalvik/operands/args.c b/plugins/dalvik/operands/args.c
index d44a36f..a536e8c 100644
--- a/plugins/dalvik/operands/args.c
+++ b/plugins/dalvik/operands/args.c
@@ -30,6 +30,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -238,7 +239,7 @@ static void g_dalvik_args_operand_print(const GDalvikArgsOperand *operand, GBuff
{
size_t i; /* Boucle de parcours */
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "{", 1, RTT_HOOK, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "{", 1, RTT_HOOK, NULL);
if (operand->count > 0)
{
@@ -246,8 +247,8 @@ static void g_dalvik_args_operand_print(const GDalvikArgsOperand *operand, GBuff
for (i = 1; i < operand->count; i++)
{
- g_buffer_line_append_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL);
g_arch_operand_print(operand->args[i], line);
@@ -255,7 +256,7 @@ static void g_dalvik_args_operand_print(const GDalvikArgsOperand *operand, GBuff
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "}", 1, RTT_HOOK, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "}", 1, RTT_HOOK, NULL);
}
diff --git a/plugins/dalvik/operands/pool.c b/plugins/dalvik/operands/pool.c
index d987428..6f16cdc 100644
--- a/plugins/dalvik/operands/pool.c
+++ b/plugins/dalvik/operands/pool.c
@@ -34,6 +34,7 @@
#include <arch/operand-int.h>
#include <arch/operands/targetable-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
#include <plugins/dex/pool.h>
@@ -276,7 +277,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
switch (operand->type)
{
case DPT_NONE:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "????", 4, RTT_ERROR, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "????", 4, RTT_ERROR, NULL);
break;
case DPT_STRING:
@@ -285,14 +286,14 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
if (string != NULL)
{
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL);
len = strlen(string);
if (len > 0)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, string, len, RTT_STRING, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, string, len, RTT_STRING, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL);
}
else
@@ -301,7 +302,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
tmp = calloc(len, sizeof(char));
snprintf(tmp, len, _("<bad string index (%d)>"), operand->index);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
free(tmp);
@@ -318,9 +319,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
tmp = g_data_type_to_string(type, true);
g_object_unref(G_OBJECT(type));
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "<", 1, RTT_HOOK, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, ">", 1, RTT_HOOK, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "<", 1, RTT_HOOK, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, ">", 1, RTT_HOOK, NULL);
}
else
@@ -329,7 +330,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
tmp = calloc(len, sizeof(char));
snprintf(tmp, len, _("<bad type index (%d)>"), operand->index);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
}
@@ -346,7 +347,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
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));
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, strlen(tmp), RTT_LABEL, G_OBJECT(operand));
}
else
@@ -355,7 +356,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
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);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
}
@@ -372,9 +373,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
tmp = g_binary_variable_to_string(field, true);
g_object_unref(G_OBJECT(field));
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "<", 1, RTT_HOOK, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, ">", 1, RTT_HOOK, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "<", 1, RTT_HOOK, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, ">", 1, RTT_HOOK, NULL);
}
else
@@ -383,7 +384,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
tmp = calloc(len, sizeof(char));
snprintf(tmp, len, _("<bad field index (%d)>"), operand->index);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
}
@@ -405,7 +406,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
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));
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, strlen(tmp), RTT_LABEL, G_OBJECT(operand));
}
else
@@ -414,7 +415,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
tmp = calloc(len, sizeof(char));
snprintf(tmp, len, _("<bad method index (%d)>"), operand->index);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL);
}