summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-22 21:53:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-22 21:53:07 (GMT)
commit9c1367eb2e75dfac59f33e851dee8d39542072ac (patch)
treedd999e736e12c47d9d0b90808451d14c6279a85d /src/analysis
parenta2979604ebaa3d564908f13e4f9ab345fca0ff28 (diff)
Shared target operands in memory when possible.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/disass/links.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c
index 036a621..95e8b2e 100644
--- a/src/analysis/disass/links.c
+++ b/src/analysis/disass/links.c
@@ -206,7 +206,7 @@ static void convert_immediate_into_target(GArchInstruction *instr, size_t index,
virt_t addr; /* Adresse visée par le saut */
MemoryDataSize msize; /* Taille de l'opérande */
vmpa2t target; /* Défination finale précise */
- GArchOperand *new; /* Instruction de ciblage */
+ GTargetOperand *new; /* Instruction de ciblage */
op = _g_arch_instruction_get_operand(instr, index);
@@ -224,12 +224,12 @@ static void convert_immediate_into_target(GArchInstruction *instr, size_t index,
if (g_exe_format_translate_address_into_vmpa(G_EXE_FORMAT(format), addr, &target))
{
- new = g_target_operand_new(msize, &target);
+ new = G_TARGET_OPERAND(g_target_operand_new(msize, &target));
- if (!g_target_operand_resolve(G_TARGET_OPERAND(new), format, false))
- g_object_unref(G_OBJECT(new));
+ if (!g_target_operand_resolve(&new, format, false, NULL))
+ /*g_object_unref(G_OBJECT(new))*/;
else
- _g_arch_instruction_replace_operand(instr, op, new);
+ _g_arch_instruction_replace_operand(instr, op, G_ARCH_OPERAND(new));
}