summaryrefslogtreecommitdiff
path: root/plugins
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
parent703e0d10d56bb288b515526f0d0f1994391619bf (diff)
Replaced all BLC_* constants by the new DLC_* values.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/androhelpers/switch.c9
-rw-r--r--plugins/androhelpers/try_n_catch.c7
-rw-r--r--plugins/arm/v7/operands/estate.c5
-rw-r--r--plugins/arm/v7/operands/iflags.c7
-rw-r--r--plugins/arm/v7/operands/it.c3
-rw-r--r--plugins/arm/v7/operands/limitation.c19
-rw-r--r--plugins/arm/v7/operands/maccess.c17
-rw-r--r--plugins/arm/v7/operands/offset.c3
-rw-r--r--plugins/arm/v7/operands/register.c3
-rw-r--r--plugins/arm/v7/operands/reglist.c9
-rw-r--r--plugins/arm/v7/operands/rotation.c5
-rw-r--r--plugins/arm/v7/operands/shift.c13
-rw-r--r--plugins/arm/v7/registers/banked.c5
-rw-r--r--plugins/arm/v7/registers/basic.c5
-rw-r--r--plugins/arm/v7/registers/coproc.c5
-rw-r--r--plugins/arm/v7/registers/simd.c5
-rw-r--r--plugins/arm/v7/registers/special.c5
-rw-r--r--plugins/dalvik/operands/args.c9
-rw-r--r--plugins/dalvik/operands/pool.c35
-rw-r--r--plugins/dalvik/register.c3
-rw-r--r--plugins/pychrysalide/glibext/bufferline.c43
-rw-r--r--plugins/ropgadgets/select.c8
22 files changed, 105 insertions, 118 deletions
diff --git a/plugins/androhelpers/switch.c b/plugins/androhelpers/switch.c
index 605b4aa..39c8bc1 100644
--- a/plugins/androhelpers/switch.c
+++ b/plugins/androhelpers/switch.c
@@ -31,6 +31,7 @@
#include <arch/dalvik/instruction-def.h>
#include <arch/operands/immediate.h>
#include <format/dex/dex-int.h>
+#include <gtkext/gtkblockdisplay.h>
#include <../i18n.h>
@@ -282,13 +283,13 @@ static void mark_all_switch_cases(const GArchInstruction *instr, const dex_switc
value = dswitch->sparse.keys[index];
line = g_code_buffer_insert_at(buffer, (vmpa_t)targets[index], true);
- g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_HEAD);
+ g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_HEAD);
len = strlen(_("; Case for value 0x%08x (%d)")) + 8 + strlen("4294967295U") /* UINT_MAX */;
fulldesc = (char *)calloc(len + 1, sizeof(char));
len = snprintf(fulldesc, len + 1, _("; Case for value 0x%08x (%d)"), value, value);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, fulldesc, len, RTT_INDICATION, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, fulldesc, len, RTT_INDICATION, NULL);
free(fulldesc);
@@ -303,10 +304,10 @@ static void mark_all_switch_cases(const GArchInstruction *instr, const dex_switc
g_arch_instruction_get_location(next, NULL, NULL, &addr);
line = g_code_buffer_insert_at(buffer, addr, true);
- g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_HEAD);
+ g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_HEAD);
fulldesc = _("; Default case");
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD,
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD,
fulldesc, strlen(fulldesc), RTT_INDICATION, NULL);
}
diff --git a/plugins/androhelpers/try_n_catch.c b/plugins/androhelpers/try_n_catch.c
index 137c62f..e859718 100644
--- a/plugins/androhelpers/try_n_catch.c
+++ b/plugins/androhelpers/try_n_catch.c
@@ -30,6 +30,7 @@
#include <format/dex/dex-int.h>
#include <format/dex/pool.h>
+#include <gtkext/gtkblockdisplay.h>
#include <../i18n.h>
@@ -206,15 +207,15 @@ static void mark_exception_handlers(const GLoadedBinary *binary, uleb128_t size,
for (j = 0; j < count[i]; j++)
{
line = g_code_buffer_insert_at(buffer, handlers[i][j].addr, true);
- g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_HEAD);
+ g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_HEAD);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "; ", 2, RTT_INDICATION, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, "; ", 2, RTT_INDICATION, NULL);
len = strlen(_("Handler for caught '%s'")) + strlen(handlers[i][j].desc);
fulldesc = (char *)calloc(len + 1, sizeof(char));
snprintf(fulldesc, len + 1, _("Handler for caught '%s'"), handlers[i][j].desc);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, fulldesc, len, RTT_INDICATION, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, fulldesc, len, RTT_INDICATION, NULL);
free(fulldesc);
diff --git a/plugins/arm/v7/operands/estate.c b/plugins/arm/v7/operands/estate.c
index 23af95b..be6a0ff 100644
--- a/plugins/arm/v7/operands/estate.c
+++ b/plugins/arm/v7/operands/estate.c
@@ -26,6 +26,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -210,9 +211,9 @@ static int g_armv7_endian_operand_compare(const GArmV7EndianOperand *a, const GA
static void g_armv7_endian_operand_print(const GArmV7EndianOperand *operand, GBufferLine *line)
{
if (operand->big)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "BE", 2, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "BE", 2, RTT_KEY_WORD, NULL);
else
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "LE", 2, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "LE", 2, RTT_KEY_WORD, NULL);
}
diff --git a/plugins/arm/v7/operands/iflags.c b/plugins/arm/v7/operands/iflags.c
index 5c3e9ca..ff073c6 100644
--- a/plugins/arm/v7/operands/iflags.c
+++ b/plugins/arm/v7/operands/iflags.c
@@ -25,6 +25,7 @@
#include <arch/operand-int.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -187,13 +188,13 @@ static void g_armv7_iflags_operand_finalize(GArmV7IFlagsOperand *operand)
static void g_armv7_iflags_operand_print(const GArmV7IFlagsOperand *operand, GBufferLine *line)
{
if (operand->abort_bit)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "A", 1, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "A", 1, RTT_REGISTER, NULL);
if (operand->irq_bit)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "I", 1, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "I", 1, RTT_REGISTER, NULL);
if (operand->fiq_bit)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "F", 1, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "F", 1, RTT_REGISTER, NULL);
}
diff --git a/plugins/arm/v7/operands/it.c b/plugins/arm/v7/operands/it.c
index 52ae3c9..e40b52a 100644
--- a/plugins/arm/v7/operands/it.c
+++ b/plugins/arm/v7/operands/it.c
@@ -29,6 +29,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -245,7 +246,7 @@ static void g_armv7_itcond_operand_print(const GArmV7ITCondOperand *operand, GBu
}
if (kw != NULL)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, kw, 2, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, kw, 2, RTT_KEY_WORD, NULL);
}
diff --git a/plugins/arm/v7/operands/limitation.c b/plugins/arm/v7/operands/limitation.c
index 3b088cb..5663aba 100644
--- a/plugins/arm/v7/operands/limitation.c
+++ b/plugins/arm/v7/operands/limitation.c
@@ -26,6 +26,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -212,39 +213,39 @@ static void g_armv7_limitation_operand_print(const GArmV7LimitationOperand *oper
switch (operand->type)
{
case BLT_SY:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "SY", 2, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "SY", 2, RTT_KEY_WORD, NULL);
break;
case BLT_ST:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "ST", 2, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "ST", 2, RTT_KEY_WORD, NULL);
break;
case BLT_ISH:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "ISH", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "ISH", 3, RTT_KEY_WORD, NULL);
break;
case BLT_ISHST:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "ISHST", 5, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "ISHST", 5, RTT_KEY_WORD, NULL);
break;
case BLT_NSH:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "NSH", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "NSH", 3, RTT_KEY_WORD, NULL);
break;
case BLT_NSHST:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "NSHST", 5, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "NSHST", 5, RTT_KEY_WORD, NULL);
break;
case BLT_OSH:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "OSH", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "OSH", 3, RTT_KEY_WORD, NULL);
break;
case BLT_OSHST:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "OSHST", 5, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "OSHST", 5, RTT_KEY_WORD, NULL);
break;
default:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "(reserved)", 10, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "(reserved)", 10, RTT_KEY_WORD, NULL);
break;
}
diff --git a/plugins/arm/v7/operands/maccess.c b/plugins/arm/v7/operands/maccess.c
index 9217d79..be3f0c9 100644
--- a/plugins/arm/v7/operands/maccess.c
+++ b/plugins/arm/v7/operands/maccess.c
@@ -26,6 +26,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -239,17 +240,17 @@ static int g_armv7_maccess_operand_compare(const GArmV7MAccessOperand *a, const
static void g_armv7_maccess_operand_print(const GArmV7MAccessOperand *operand, GBufferLine *line)
{
- 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_arch_operand_print(operand->base, line);
if (operand->post_indexed)
- 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->offset != NULL)
{
- 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->offset, line);
@@ -257,18 +258,18 @@ static void g_armv7_maccess_operand_print(const GArmV7MAccessOperand *operand, G
if (operand->shift != NULL)
{
- 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->shift, line);
}
if (!operand->post_indexed)
- 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->post_indexed && operand->write_back)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "!", 1, RTT_PUNCT, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "!", 1, RTT_PUNCT, NULL);
}
diff --git a/plugins/arm/v7/operands/offset.c b/plugins/arm/v7/operands/offset.c
index 1218324..6bcacaf 100644
--- a/plugins/arm/v7/operands/offset.c
+++ b/plugins/arm/v7/operands/offset.c
@@ -26,6 +26,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -220,7 +221,7 @@ static int g_armv7_offset_operand_compare(const GArmV7OffsetOperand *a, const GA
static void g_armv7_offset_operand_print(const GArmV7OffsetOperand *operand, GBufferLine *line)
{
if (!operand->positive)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "-", 1, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "-", 1, RTT_KEY_WORD, NULL);
g_arch_operand_print(operand->value, line);
diff --git a/plugins/arm/v7/operands/register.c b/plugins/arm/v7/operands/register.c
index 9101618..c9617bd 100644
--- a/plugins/arm/v7/operands/register.c
+++ b/plugins/arm/v7/operands/register.c
@@ -25,6 +25,7 @@
#include <arch/operands/register-int.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -192,7 +193,7 @@ static void g_armv7_register_operand_print(const GArmV7RegisterOperand *operand,
parent->print(G_ARCH_OPERAND(operand), line);
if (operand->write_back)
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "!", 1, RTT_PUNCT, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "!", 1, RTT_PUNCT, NULL);
}
diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c
index 4406a95..99fc269 100644
--- a/plugins/arm/v7/operands/reglist.c
+++ b/plugins/arm/v7/operands/reglist.c
@@ -32,6 +32,7 @@
#include <arch/register.h>
#include <arch/storage.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
#include "../registers/basic.h"
@@ -253,21 +254,21 @@ static void g_armv7_reglist_operand_print(const GArmV7RegListOperand *operand, G
{
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);
for (i = 0; i < operand->count; i++)
{
if (i > 0)
{
- 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_register_print(G_ARCH_REGISTER(operand->registers[i]), line);
}
- 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/arm/v7/operands/rotation.c b/plugins/arm/v7/operands/rotation.c
index ae2c277..b6fe1cf 100644
--- a/plugins/arm/v7/operands/rotation.c
+++ b/plugins/arm/v7/operands/rotation.c
@@ -25,6 +25,7 @@
#include <arch/operand-int.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -212,9 +213,9 @@ static int g_armv7_rotation_operand_compare(const GArmV7RotationOperand *a, cons
static void g_armv7_rotation_operand_print(const GArmV7RotationOperand *operand, GBufferLine *line)
{
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "ror", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "ror", 3, RTT_KEY_WORD, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL);
g_arch_operand_print(operand->value, line);
diff --git a/plugins/arm/v7/operands/shift.c b/plugins/arm/v7/operands/shift.c
index a20b4f1..a0c345a 100644
--- a/plugins/arm/v7/operands/shift.c
+++ b/plugins/arm/v7/operands/shift.c
@@ -26,6 +26,7 @@
#include <arch/operand-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -222,23 +223,23 @@ static void g_armv7_shift_operand_print(const GArmV7ShiftOperand *operand, GBuff
switch (operand->shift_type)
{
case SRType_LSL:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "lsl", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "lsl", 3, RTT_KEY_WORD, NULL);
break;
case SRType_LSR:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "lsr", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "lsr", 3, RTT_KEY_WORD, NULL);
break;
case SRType_ASR:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "asr", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "asr", 3, RTT_KEY_WORD, NULL);
break;
case SRType_ROR:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "ror", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "ror", 3, RTT_KEY_WORD, NULL);
break;
case SRType_RRX:
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "rrx", 3, RTT_KEY_WORD, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "rrx", 3, RTT_KEY_WORD, NULL);
break;
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL);
g_arch_operand_print(operand->shift_value, line);
diff --git a/plugins/arm/v7/registers/banked.c b/plugins/arm/v7/registers/banked.c
index 17eeb28..a74eca0 100644
--- a/plugins/arm/v7/registers/banked.c
+++ b/plugins/arm/v7/registers/banked.c
@@ -27,6 +27,9 @@
#include <stdio.h>
+#include <gtkext/gtkblockdisplay.h>
+
+
#include "../register-int.h"
@@ -309,7 +312,7 @@ static void g_armv7_banked_register_print(const GArmV7BankedRegister *reg, GBuff
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
}
diff --git a/plugins/arm/v7/registers/basic.c b/plugins/arm/v7/registers/basic.c
index 0a4a768..dc491fe 100644
--- a/plugins/arm/v7/registers/basic.c
+++ b/plugins/arm/v7/registers/basic.c
@@ -27,6 +27,9 @@
#include <stdio.h>
+#include <gtkext/gtkblockdisplay.h>
+
+
#include "../register-int.h"
@@ -237,7 +240,7 @@ static void g_armv7_basic_register_print(const GArmV7BasicRegister *reg, GBuffer
break;
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
}
diff --git a/plugins/arm/v7/registers/coproc.c b/plugins/arm/v7/registers/coproc.c
index a8100d2..0190eef 100644
--- a/plugins/arm/v7/registers/coproc.c
+++ b/plugins/arm/v7/registers/coproc.c
@@ -27,6 +27,9 @@
#include <stdio.h>
+#include <gtkext/gtkblockdisplay.h>
+
+
#include "../register-int.h"
@@ -217,7 +220,7 @@ static void g_armv7_cp_register_print(const GArmV7CpRegister *reg, GBufferLine *
break;
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
}
diff --git a/plugins/arm/v7/registers/simd.c b/plugins/arm/v7/registers/simd.c
index ff9a242..957e2f9 100644
--- a/plugins/arm/v7/registers/simd.c
+++ b/plugins/arm/v7/registers/simd.c
@@ -28,6 +28,9 @@
#include <stdio.h>
+#include <gtkext/gtkblockdisplay.h>
+
+
#include "../register-int.h"
@@ -236,7 +239,7 @@ static void g_armv7_simd_register_print(const GArmV7SIMDRegister *reg, GBufferLi
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
}
diff --git a/plugins/arm/v7/registers/special.c b/plugins/arm/v7/registers/special.c
index e0579b4..8591239 100644
--- a/plugins/arm/v7/registers/special.c
+++ b/plugins/arm/v7/registers/special.c
@@ -27,6 +27,9 @@
#include <stdio.h>
+#include <gtkext/gtkblockdisplay.h>
+
+
#include "../register-int.h"
@@ -261,7 +264,7 @@ static void g_armv7_special_register_print(const GArmV7SpecialRegister *reg, GBu
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
}
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);
}
diff --git a/plugins/dalvik/register.c b/plugins/dalvik/register.c
index dc8595d..4145d27 100644
--- a/plugins/dalvik/register.c
+++ b/plugins/dalvik/register.c
@@ -30,6 +30,7 @@
#include <arch/register-int.h>
#include <common/sort.h>
+#include <gtkext/gtkblockdisplay.h>
@@ -242,7 +243,7 @@ static void g_dalvik_register_print(const GDalvikRegister *reg, GBufferLine *lin
klen = snprintf(key, MAX_REGNAME_LEN, "v%hu", reg->index);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, key, klen, RTT_REGISTER, NULL);
}
diff --git a/plugins/pychrysalide/glibext/bufferline.c b/plugins/pychrysalide/glibext/bufferline.c
index d30d11d..e3fd8d4 100644
--- a/plugins/pychrysalide/glibext/bufferline.c
+++ b/plugins/pychrysalide/glibext/bufferline.c
@@ -60,9 +60,6 @@ static PyObject *py_buffer_line_remove_flag(PyObject *, PyObject *);
/* Renseigne sur les propriétés particulières liées à une ligne. */
static PyObject *py_buffer_line_get_flags(PyObject *, void *);
-/* Définit les constantes pour les lignes de tampon. */
-static bool py_buffer_line_define_constants(PyTypeObject *);
-
/******************************************************************************
@@ -216,12 +213,6 @@ static PyObject *py_buffer_line_get_text(PyObject *self, PyObject *args)
ret = PyArg_ParseTuple(args, "IIp", &first, &end, &markup);
if (!ret) return NULL;
- if (first >= BLC_COUNT || end >= BLC_COUNT)
- {
- PyErr_SetString(PyExc_ValueError, _("Invalid range in arguments"));
- return NULL;
- }
-
line = G_BUFFER_LINE(pygobject_get(self));
text = g_buffer_line_get_text(line, first, end, markup);
@@ -345,37 +336,6 @@ static PyObject *py_buffer_line_get_flags(PyObject *self, void *closure)
/******************************************************************************
* *
-* Paramètres : obj_type = type dont le dictionnaire est à compléter. *
-* *
-* Description : Définit les constantes pour les lignes de tampon. *
-* *
-* Retour : true en cas de succès de l'opération, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool py_buffer_line_define_constants(PyTypeObject *obj_type)
-{
- bool result; /* Bilan à retourner */
-
- result = true;
-
- result &= PyDict_AddULongMacro(obj_type, BLC_PHYSICAL);
- result &= PyDict_AddULongMacro(obj_type, BLC_VIRTUAL);
- result &= PyDict_AddULongMacro(obj_type, BLC_BINARY);
- result &= PyDict_AddULongMacro(obj_type, BLC_ASSEMBLY_HEAD);
- result &= PyDict_AddULongMacro(obj_type, BLC_ASSEMBLY);
- result &= PyDict_AddULongMacro(obj_type, BLC_COMMENTS);
- result &= PyDict_AddULongMacro(obj_type, BLC_COUNT);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : - *
* *
* Description : Fournit un accès à une définition de type à diffuser. *
@@ -474,9 +434,6 @@ bool ensure_python_buffer_line_is_registered(void)
if (!define_buffer_line_constants(type))
return false;
- if (!py_buffer_line_define_constants(type))
- return false;
-
}
return true;
diff --git a/plugins/ropgadgets/select.c b/plugins/ropgadgets/select.c
index 1d0521d..a45f043 100644
--- a/plugins/ropgadgets/select.c
+++ b/plugins/ropgadgets/select.c
@@ -1539,12 +1539,12 @@ static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *co
if (j == 0)
{
- raw_virtual = g_buffer_line_get_text(line, BLC_VIRTUAL, BLC_VIRTUAL + 1, false);
- virtual = g_buffer_line_get_text(line, BLC_VIRTUAL, BLC_VIRTUAL + 1, true);
+ raw_virtual = g_buffer_line_get_text(line, DLC_VIRTUAL, DLC_VIRTUAL + 1, false);
+ virtual = g_buffer_line_get_text(line, DLC_VIRTUAL, DLC_VIRTUAL + 1, true);
}
- partial_raw = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, false);
- partial_markup = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true);
+ partial_raw = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, false);
+ partial_markup = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));