summaryrefslogtreecommitdiff
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
parent703e0d10d56bb288b515526f0d0f1994391619bf (diff)
Replaced all BLC_* constants by the new DLC_* values.
-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
-rw-r--r--src/analysis/binary.c6
-rw-r--r--src/analysis/db/items/comment.c3
-rw-r--r--src/analysis/disass/block.c6
-rw-r--r--src/analysis/routine.c19
-rw-r--r--src/arch/instruction.c8
-rw-r--r--src/arch/instructions/raw.c22
-rw-r--r--src/arch/instructions/undefined.c4
-rw-r--r--src/arch/operands/target.c2
-rw-r--r--src/format/strsym.c7
-rw-r--r--src/format/symbol.c6
-rw-r--r--src/glibext/bufferline.c11
-rw-r--r--src/glibext/bufferline.h2
-rw-r--r--src/glibext/gbinportion.c4
-rw-r--r--src/glibext/generators/prologue.c5
-rw-r--r--src/glibext/generators/rborder.c4
-rw-r--r--src/glibext/widthtracker.c12
-rw-r--r--src/gtkext/gtkblockdisplay.c2
-rw-r--r--src/gui/dialogs/export_disass.c6
-rw-r--r--src/gui/dialogs/gotox.c5
41 files changed, 175 insertions, 182 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));
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index c671827..7957f2e 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -1670,9 +1670,9 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca
has_virt = g_arch_processor_has_virtual_space(binary->proc);
- g_display_options_set(binary->options[BVW_HEX], 0, false);
- g_display_options_set(binary->options[BVW_BLOCK], BLC_VIRTUAL, has_virt);
- g_display_options_set(binary->options[BVW_GRAPH], BLC_VIRTUAL, has_virt);
+ g_display_options_set(binary->options[BVW_HEX], HLC_PHYSICAL, false);
+ g_display_options_set(binary->options[BVW_BLOCK], DLC_VIRTUAL, has_virt);
+ g_display_options_set(binary->options[BVW_GRAPH], DLC_VIRTUAL, has_virt);
/* Phase de désassemblage pur */
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index a4a62b0..4b22502 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -40,6 +40,7 @@
#include "../../../common/extstr.h"
#include "../../../glibext/gbinarycursor.h"
#include "../../../glibext/linegen-int.h"
+#include "../../../gtkext/gtkblockdisplay.h"
@@ -1458,7 +1459,7 @@ static void g_db_comment_print(GDbComment *comment, GBufferLine *line, size_t in
assert(count == comment->count);
- g_buffer_line_append_text(line, BLC_COMMENTS, SL(lines[repeat]), RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_COMMENTS, SL(lines[repeat]), RTT_COMMENT, NULL);
for (i = 0; i < count; i++)
free(lines[i]);
diff --git a/src/analysis/disass/block.c b/src/analysis/disass/block.c
index f0bee99..a141d68 100644
--- a/src/analysis/disass/block.c
+++ b/src/analysis/disass/block.c
@@ -577,7 +577,7 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block)
g_buffer_cache_append(cache, G_LINE_GENERATOR(symbol), BLF_NONE);
line = g_buffer_cache_find_line_by_index(cache, 0);
- name = g_buffer_line_get_text(line, BLC_ASSEMBLY_LABEL, BLC_COUNT, true);
+ name = g_buffer_line_get_text(line, DLC_ASSEMBLY_LABEL, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));
g_object_unref(G_OBJECT(cache));
@@ -690,7 +690,7 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block)
if (line != NULL)
{
- info = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true);
+ info = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));
}
@@ -746,7 +746,7 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block)
if (line != NULL)
{
- info = g_buffer_line_get_text(line, BLC_ASSEMBLY, BLC_COUNT, true);
+ info = g_buffer_line_get_text(line, DLC_ASSEMBLY, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));
}
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index 82f30f8..aca47ee 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -39,6 +39,7 @@
#include "../common/extstr.h"
#include "../core/params.h"
#include "../glibext/gbinarycursor.h"
+#include "../gtkext/gtkblockdisplay.h"
@@ -940,7 +941,7 @@ void g_binary_routine_output_info(const GBinRoutine *routine, GLangOutput *lang,
g_data_type_output(routine->ret_type, lang, line, true, false);
- g_buffer_line_append_text(line, BLC_LAST_USED, " ", 1, RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_LAST_USED, " ", 1, RTT_COMMENT, NULL);
/* Nom de la routine */
@@ -952,22 +953,22 @@ void g_binary_routine_output_info(const GBinRoutine *routine, GLangOutput *lang,
len = 3;
}
- g_buffer_line_append_text(line, BLC_LAST_USED, name, len, RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_LAST_USED, name, len, RTT_COMMENT, NULL);
/* Arguments éventuels... */
- g_buffer_line_append_text(line, BLC_LAST_USED, "(", 1, RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_LAST_USED, "(", 1, RTT_COMMENT, NULL);
for (i = 0; i < routine->args_count; i++)
{
if (i > 0)
- g_buffer_line_append_text(line, BLC_LAST_USED, ", ", 2, RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_LAST_USED, ", ", 2, RTT_COMMENT, NULL);
g_binary_variable_output(routine->args[i], lang, line, true, false);
}
- g_buffer_line_append_text(line, BLC_LAST_USED, ")", 1, RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_LAST_USED, ")", 1, RTT_COMMENT, NULL);
//g_lang_output_end_routine_prototype(lang, buffer, line);
@@ -1000,7 +1001,7 @@ void g_binary_routine_print_code(const GBinRoutine *routine, GLangOutput *lang,
line = g_lang_output_start_routine_prototype(lang, buffer, routine->ret_type);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL);
/* Nom de la routine */
@@ -1012,7 +1013,7 @@ void g_binary_routine_print_code(const GBinRoutine *routine, GLangOutput *lang,
len = 3;
}
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, name, len, RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, name, len, RTT_COMMENT, NULL);
@@ -1158,7 +1159,7 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi
if (line != NULL)
{
- info = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true);
+ info = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));
}
@@ -1214,7 +1215,7 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi
if (line != NULL)
{
- info = g_buffer_line_get_text(line, BLC_ASSEMBLY, BLC_COUNT, true);
+ info = g_buffer_line_get_text(line, DLC_ASSEMBLY, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));
}
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 73b68f2..ea19dab 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -1967,14 +1967,14 @@ static void _g_arch_instruction_print(GArchInstruction *instr, GBufferLine *line
g_buffer_line_fill_virt(line, DLC_VIRTUAL, MDS_32_BITS_UNSIGNED, get_mrange_addr(&instr->range));
- g_buffer_line_fill_content(line, content, &instr->range, VMPA_NO_PHYSICAL);
+ g_buffer_line_fill_content(line, DLC_BINARY, content, &instr->range, VMPA_NO_PHYSICAL);
/* Instruction proprement dite */
key = g_arch_instruction_get_keyword(instr);
klen = strlen(key);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, G_OBJECT(instr));
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, G_OBJECT(instr));
/* Liste des opérandes */
@@ -1990,8 +1990,8 @@ static void _g_arch_instruction_print(GArchInstruction *instr, GBufferLine *line
for (i = 1; i < 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);
op = _g_arch_instruction_get_operand(instr, i);
diff --git a/src/arch/instructions/raw.c b/src/arch/instructions/raw.c
index 84a79e9..0c27258 100644
--- a/src/arch/instructions/raw.c
+++ b/src/arch/instructions/raw.c
@@ -648,17 +648,17 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s
max_displayed_len /= g_arch_instruction_count_operands(base);
}
- g_buffer_line_fill_content(line, content, &base->range, max_displayed_len);
+ g_buffer_line_fill_content(line, DLC_BINARY, content, &base->range, max_displayed_len);
/* Zone du code d'assemblage */
key = g_arch_instruction_get_keyword(base);
klen = strlen(key);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, NULL);
if (g_raw_instruction_is_padding(instr))
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "...", 3, RTT_RAW, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "...", 3, RTT_RAW, NULL);
else
{
@@ -723,15 +723,15 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s
{
if (!first)
{
- 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);
}
else
first = false;
string[iter++] = '"';
- g_buffer_line_append_text(line, BLC_ASSEMBLY, string, iter, RTT_STRING, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, string, iter, RTT_STRING, NULL);
iter = 1;
@@ -741,8 +741,8 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s
if (!first)
{
- 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);
}
else
first = false;
@@ -759,13 +759,13 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s
{
if (!first)
{
- 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);
}
string[iter++] = '"';
- g_buffer_line_append_text(line, BLC_ASSEMBLY, string, iter, RTT_STRING, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, string, iter, RTT_STRING, NULL);
}
diff --git a/src/arch/instructions/undefined.c b/src/arch/instructions/undefined.c
index 1623d7b..dab7864 100644
--- a/src/arch/instructions/undefined.c
+++ b/src/arch/instructions/undefined.c
@@ -390,14 +390,14 @@ static void g_undef_instruction_print(GUndefInstruction *instr, GBufferLine *lin
g_buffer_line_fill_virt(line, DLC_VIRTUAL, MDS_32_BITS_UNSIGNED, get_mrange_addr(&base->range));
- g_buffer_line_fill_content(line, content, &base->range, VMPA_NO_PHYSICAL);
+ g_buffer_line_fill_content(line, DLC_BINARY, content, &base->range, VMPA_NO_PHYSICAL);
/* Instruction proprement dite */
key = g_arch_instruction_get_keyword(base);
klen = strlen(key);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_ERROR, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, key, klen, RTT_ERROR, NULL);
}
diff --git a/src/arch/operands/target.c b/src/arch/operands/target.c
index 9b93548..78a2fc1 100644
--- a/src/arch/operands/target.c
+++ b/src/arch/operands/target.c
@@ -419,7 +419,7 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const
if (line != NULL)
{
- result = g_buffer_line_get_text(line, BLC_ASSEMBLY, BLC_COUNT, true);
+ result = g_buffer_line_get_text(line, DLC_ASSEMBLY, DLC_COUNT, true);
g_object_unref(G_OBJECT(line));
}
diff --git a/src/format/strsym.c b/src/format/strsym.c
index 5774a0c..aedd779 100644
--- a/src/format/strsym.c
+++ b/src/format/strsym.c
@@ -33,6 +33,7 @@
#include "symbol-int.h"
#include "../arch/operands/feeder-int.h"
#include "../common/alloc.h"
+#include "../gtkext/gtkblockdisplay.h"
@@ -835,12 +836,12 @@ void g_string_symbol_print(const GStrSymbol *symbol, GBufferLine *line)
string = g_string_symbol_get_utf8(symbol, &len);
- g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL);
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);
}
diff --git a/src/format/symbol.c b/src/format/symbol.c
index 918b006..9e57e14 100644
--- a/src/format/symbol.c
+++ b/src/format/symbol.c
@@ -858,9 +858,9 @@ static void g_binary_symbol_print(GBinSymbol *symbol, GBufferLine *line, size_t
if (label != NULL)
{
- g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_LABEL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, SL(label), RTT_LABEL, NULL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, ":", 1, RTT_PUNCT, NULL);
+ g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_LABEL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, SL(label), RTT_LABEL, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, ":", 1, RTT_PUNCT, NULL);
free(label);
diff --git a/src/glibext/bufferline.c b/src/glibext/bufferline.c
index ec1176b..b5fe7ed 100644
--- a/src/glibext/bufferline.c
+++ b/src/glibext/bufferline.c
@@ -351,6 +351,7 @@ void g_buffer_line_fill_virt(GBufferLine *line, size_t col, MemoryDataSize size,
/******************************************************************************
* *
* Paramètres : line = ligne à venir compléter. *
+* col = indice de la colonne à constituer. *
* content = contenu binaire global à venir lire. *
* range = localisation des données à venir lire et présenter.*
* max = taille maximale de la portion binaire en octets. *
@@ -363,7 +364,7 @@ void g_buffer_line_fill_virt(GBufferLine *line, size_t col, MemoryDataSize size,
* *
******************************************************************************/
-void g_buffer_line_fill_content(GBufferLine *line, const GBinContent *content, const mrange_t *range, phys_t max)
+void g_buffer_line_fill_content(GBufferLine *line, size_t col, const GBinContent *content, const mrange_t *range, phys_t max)
{
phys_t length; /* Taille de la couverture */
bool truncated; /* Indique si le code est coupé*/
@@ -436,7 +437,7 @@ void g_buffer_line_fill_content(GBufferLine *line, const GBinContent *content, c
/* Conclusion */
- g_buffer_line_append_text(line, BLC_BINARY, bin_code, iter - bin_code, RTT_RAW_CODE, NULL);
+ g_buffer_line_append_text(line, col, bin_code, iter - bin_code, RTT_RAW_CODE, NULL);
if (bin_code != static_buffer)
free(bin_code);
@@ -462,7 +463,7 @@ GObject *g_buffer_line_find_first_segment_creator(const GBufferLine *line, Buffe
GObject *result; /* Trouvaille à retourner */
size_t i; /* Boucle de parcours */
- assert(column < BLC_COUNT);
+ assert(column < line->col_count);
result = NULL;
@@ -946,7 +947,7 @@ line_segment *g_buffer_line_get_segment_from_coord(const GBufferLine *line, cons
{
line_segment *result; /* Trouvaille à retourner */
- if (coord->column < BLC_COUNT)
+ if (coord->column < line->col_count)
result = get_line_column_content_from_index(&line->columns[coord->column], coord->index);
else
result = NULL;
@@ -994,7 +995,7 @@ bool g_buffer_line_get_coord_at(const GBufferLine *line, size_t index, GWidthTra
*base = 0;
- last = BLC_COUNT;
+ last = line->col_count;
last_base = 0;
/* On cible déjà la colonne idéale */
diff --git a/src/glibext/bufferline.h b/src/glibext/bufferline.h
index 319f9b7..f21c5d1 100644
--- a/src/glibext/bufferline.h
+++ b/src/glibext/bufferline.h
@@ -103,7 +103,7 @@ void g_buffer_line_fill_phys(GBufferLine *, size_t, MemoryDataSize, const vmpa2t
void g_buffer_line_fill_virt(GBufferLine *, size_t, MemoryDataSize, const vmpa2t *);
/* Construit le tronc commun d'une ligne autour de son contenu. */
-void g_buffer_line_fill_content(GBufferLine *, const GBinContent *, const mrange_t *, phys_t);
+void g_buffer_line_fill_content(GBufferLine *, size_t, const GBinContent *, const mrange_t *, phys_t);
/* Recherche le premier créateur enregistré dans des segments. */
GObject *g_buffer_line_find_first_segment_creator(const GBufferLine *, BufferLineColumn);
diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c
index 670e0ec..884c31d 100644
--- a/src/glibext/gbinportion.c
+++ b/src/glibext/gbinportion.c
@@ -1128,9 +1128,9 @@ static void g_binary_portion_print(GBinPortion *portion, GBufferLine *line, size
if (portion->text[repeat] != NULL)
{
- g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_LABEL);
+ g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_LABEL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, SL(portion->text[repeat]), RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, SL(portion->text[repeat]), RTT_COMMENT, NULL);
}
diff --git a/src/glibext/generators/prologue.c b/src/glibext/generators/prologue.c
index 5829fde..e19107b 100644
--- a/src/glibext/generators/prologue.c
+++ b/src/glibext/generators/prologue.c
@@ -33,6 +33,7 @@
#include "../linegen-int.h"
#include "../linesegment.h"
#include "../../format/executable.h"
+#include "../../gtkext/gtkblockdisplay.h"
@@ -380,9 +381,9 @@ static void g_intro_generator_print(GIntroGenerator *generator, GBufferLine *lin
if ((repeat + 1) != generator->count)
{
- g_buffer_line_start_merge_at(line, BLC_PHYSICAL);
+ g_buffer_line_start_merge_at(line, DLC_PHYSICAL);
- g_buffer_line_append_text(line, BLC_PHYSICAL, SL(generator->text[repeat]), RTT_COMMENT, NULL);
+ g_buffer_line_append_text(line, DLC_PHYSICAL, SL(generator->text[repeat]), RTT_COMMENT, NULL);
if (repeat == 0)
g_buffer_line_add_flag(line, BLF_WIDTH_MANAGER);
diff --git a/src/glibext/generators/rborder.c b/src/glibext/generators/rborder.c
index 42ffc23..97e7a22 100644
--- a/src/glibext/generators/rborder.c
+++ b/src/glibext/generators/rborder.c
@@ -367,8 +367,8 @@ static void g_border_generator_print(GBorderGenerator *generator, GBufferLine *l
text = strdup(generator->start ? ROUTINE_INTRO_MSG : ROUTINE_OUTRO_MSG);
g_coding_language_encapsulate_comment(generator->lang, &text);
- g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_LABEL);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, SL(text), RTT_COMMENT, NULL);
+ g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_LABEL);
+ g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, SL(text), RTT_COMMENT, NULL);
free(text);
diff --git a/src/glibext/widthtracker.c b/src/glibext/widthtracker.c
index f0e2068..a3c8cba 100644
--- a/src/glibext/widthtracker.c
+++ b/src/glibext/widthtracker.c
@@ -329,7 +329,7 @@ static void g_width_update_process(GWidthUpdate *update, GtkStatusStack *status)
{
summary = g_width_tracker_get_up_to_date_widths(update->tracker, i);
- for (k = 0; k < BLC_COUNT; k++)
+ for (k = 0; k < update->tracker->col_count; k++)
local->max_widths[k] = MAX(local->max_widths[k], summary->max_widths[k]);
local->merged_width = MAX(local->merged_width, summary->merged_width);
@@ -361,7 +361,7 @@ static void g_width_update_collect(GWidthUpdate *update, line_width_summary *glo
local = &update->summary;
- for (i = 0; i < BLC_COUNT; i++)
+ for (i = 0; i < update->tracker->col_count; i++)
global->max_widths[i] = MAX(global->max_widths[i], local->max_widths[i]);
global->merged_width = MAX(global->merged_width, local->merged_width);
@@ -718,7 +718,7 @@ static void g_width_tracker_reset_widths(GWidthTracker *tracker, size_t index)
if (portion->cached)
{
- for (k = 0; k < BLC_COUNT && tracker->cached; k++)
+ for (k = 0; k < tracker->col_count && tracker->cached; k++)
tracker->cached &= (tracker->summary.max_widths[k] != portion->summary.max_widths[k]);
tracker->cached &= (tracker->summary.merged_width != portion->summary.merged_width);
@@ -1163,7 +1163,7 @@ static void g_width_tracker_ensure_valid_required_widths(GWidthTracker *tracker)
{
summary = g_width_tracker_get_up_to_date_widths(tracker, i);
- for (k = 0; k < BLC_COUNT; k++)
+ for (k = 0; k < tracker->col_count; k++)
global->max_widths[k] = MAX(global->max_widths[k], summary->max_widths[k]);
global->merged_width = MAX(global->merged_width, summary->merged_width);
@@ -1212,7 +1212,7 @@ gint g_width_tracker_get_width(GWidthTracker *tracker, const GDisplayOptions *op
/* Première méthode */
- for (i = 0; i < BLC_COUNT; i++)
+ for (i = 0; i < tracker->col_count; i++)
{
if (i < count)
{
@@ -1222,7 +1222,7 @@ gint g_width_tracker_get_width(GWidthTracker *tracker, const GDisplayOptions *op
col_width += summary->max_widths[i];
- if ((i + 1) < BLC_COUNT)
+ if ((i + 1) < tracker->col_count)
col_width += COL_MARGIN;
}
diff --git a/src/gtkext/gtkblockdisplay.c b/src/gtkext/gtkblockdisplay.c
index f34df3c..69a7325 100644
--- a/src/gtkext/gtkblockdisplay.c
+++ b/src/gtkext/gtkblockdisplay.c
@@ -427,7 +427,7 @@ void gtk_block_display_override_view_index(GtkBlockDisplay *display, unsigned in
cache = g_buffer_view_get_cache(GTK_BUFFER_DISPLAY(display)->view);
tracker = g_buffer_cache_get_width_tracker(cache);
- g_width_tracker_set_column_min_width(tracker, BLC_ASSEMBLY_LABEL, 0);
+ g_width_tracker_set_column_min_width(tracker, DLC_ASSEMBLY_LABEL, 0);
g_object_unref(G_OBJECT(tracker));
g_object_unref(G_OBJECT(cache));
diff --git a/src/gui/dialogs/export_disass.c b/src/gui/dialogs/export_disass.c
index c15dcbc..84ccc0a 100644
--- a/src/gui/dialogs/export_disass.c
+++ b/src/gui/dialogs/export_disass.c
@@ -245,13 +245,13 @@ static void export_assistant_close(GtkAssistant *assistant, GObject *ref)
g_object_unref(G_OBJECT(template));
checkbutton = GTK_TOGGLE_BUTTON(g_object_get_data(ref, "physical_off"));
- g_display_options_set(options, BLC_PHYSICAL, gtk_toggle_button_get_active(checkbutton));
+ g_display_options_set(options, DLC_PHYSICAL, gtk_toggle_button_get_active(checkbutton));
checkbutton = GTK_TOGGLE_BUTTON(g_object_get_data(ref, "virtual_addr"));
- g_display_options_set(options, BLC_VIRTUAL, gtk_toggle_button_get_active(checkbutton));
+ g_display_options_set(options, DLC_VIRTUAL, gtk_toggle_button_get_active(checkbutton));
checkbutton = GTK_TOGGLE_BUTTON(g_object_get_data(ref, "binary_code"));
- g_display_options_set(options, BLC_BINARY, gtk_toggle_button_get_active(checkbutton));
+ g_display_options_set(options, DLC_BINARY, gtk_toggle_button_get_active(checkbutton));
/* Options éventuelles */
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c
index 5ea7c07..ec665c1 100644
--- a/src/gui/dialogs/gotox.c
+++ b/src/gui/dialogs/gotox.c
@@ -36,6 +36,7 @@
#include "../../format/symiter.h"
#include "../../glibext/gbinarycursor.h"
#include "../../gtkext/easygtk.h"
+#include "../../gtkext/gtkblockdisplay.h"
@@ -408,7 +409,7 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
/* Adresse en mémoire virtuelle */
if (line != NULL)
- virtual = g_buffer_line_get_text(line, BLC_VIRTUAL, BLC_VIRTUAL + 1, true);
+ virtual = g_buffer_line_get_text(line, DLC_VIRTUAL, DLC_VIRTUAL + 1, true);
else
virtual = strdup(_("<line address not found>"));
@@ -498,7 +499,7 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
/* Contenu d'assemblage */
if (line != NULL)
- content = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true);
+ content = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true);
else
content = strdup(_("<assembly line not found>"));