diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-10-23 16:22:50 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-10-23 18:53:25 (GMT) |
commit | 56f7524c4fd0fc14a509be7689f4820b31564dbc (patch) | |
tree | 9c84e11279cd5711a4e0af907ca6160b62317528 /src/arch/dalvik | |
parent | 3f05bacd4fec23824489b51d964a7ce3565bb85b (diff) |
Deleted a level of data to reduce the memory fingerprint.
Diffstat (limited to 'src/arch/dalvik')
-rw-r--r-- | src/arch/dalvik/operands/args.c | 8 | ||||
-rw-r--r-- | src/arch/dalvik/operands/pool.c | 36 | ||||
-rw-r--r-- | src/arch/dalvik/register.c | 2 |
3 files changed, 23 insertions, 23 deletions
diff --git a/src/arch/dalvik/operands/args.c b/src/arch/dalvik/operands/args.c index 2897698..c03d951 100644 --- a/src/arch/dalvik/operands/args.c +++ b/src/arch/dalvik/operands/args.c @@ -201,7 +201,7 @@ static void g_dalvik_args_operand_print(const GDalvikArgsOperand *operand, GBuff { size_t i; /* Boucle de parcours */ - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "{", 1, RTT_HOOK); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "{", 1, RTT_HOOK, NULL); if (operand->count > 0) { @@ -209,8 +209,8 @@ static void g_dalvik_args_operand_print(const GDalvikArgsOperand *operand, GBuff for (i = 1; i < operand->count; i++) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW); + 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_arch_operand_print(operand->args[i], line, syntax); @@ -218,7 +218,7 @@ static void g_dalvik_args_operand_print(const GDalvikArgsOperand *operand, GBuff } - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "}", 1, RTT_HOOK); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "}", 1, RTT_HOOK, NULL); } diff --git a/src/arch/dalvik/operands/pool.c b/src/arch/dalvik/operands/pool.c index 5f98a04..b84d655 100644 --- a/src/arch/dalvik/operands/pool.c +++ b/src/arch/dalvik/operands/pool.c @@ -243,7 +243,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff switch (operand->type) { case DPT_NONE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "????", 4, RTT_ERROR); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "????", 4, RTT_ERROR, NULL); break; case DPT_STRING: @@ -252,14 +252,14 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff if (string != NULL) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL); len = strlen(string); if (len > 0) - g_buffer_line_insert_text(line, BLC_ASSEMBLY, string, len, RTT_STRING); + g_buffer_line_append_text(line, BLC_ASSEMBLY, string, len, RTT_STRING, NULL); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL); } else @@ -268,7 +268,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_insert_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR); + g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL); free(tmp); @@ -285,9 +285,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff tmp = g_data_type_to_string(type); g_object_unref(G_OBJECT(type)); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "<", 1, RTT_HOOK); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, ">", 1, RTT_HOOK); + 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); } else @@ -296,7 +296,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_insert_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR); + g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL); } @@ -305,7 +305,7 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff break; case DPT_PROTO: - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "proto(/*TODO*/)", 5, RTT_SECTION); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "proto(/*TODO*/)", 5, RTT_SECTION, NULL); break; case DPT_FIELD: @@ -317,9 +317,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff tmp = g_binary_variable_to_string(field, false); g_object_unref(G_OBJECT(field)); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "<", 1, RTT_HOOK); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, ">", 1, RTT_HOOK); + 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); } else @@ -328,7 +328,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_insert_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR); + g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL); } @@ -350,9 +350,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff tmp = g_binary_routine_to_string(routine); g_object_unref(G_OBJECT(routine)); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "<", 1, RTT_HOOK); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, tmp, strlen(tmp), RTT_VAR_NAME); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, ">", 1, RTT_HOOK); + 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); } else @@ -361,7 +361,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_insert_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR); + g_buffer_line_append_text(line, BLC_ASSEMBLY, tmp, len - 1, RTT_ERROR, NULL); } diff --git a/src/arch/dalvik/register.c b/src/arch/dalvik/register.c index 7c0b601..35e8f58 100644 --- a/src/arch/dalvik/register.c +++ b/src/arch/dalvik/register.c @@ -237,6 +237,6 @@ void g_dalvik_register_print(const GDalvikRegister *reg, GBufferLine *line, AsmS } - g_buffer_line_insert_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER); + g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL); } |