summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-05-05 12:30:14 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-05-05 12:30:14 (GMT)
commit7806ff93441318ad1f724f0b586383b61c4af859 (patch)
treecf74316115480012c51836f69fce8e02971cbf1e /src/arch
parent4d0451c1153eb572f5ab0833c0c0911dfdc5f11a (diff)
Fixed a bug when creating natural execution flows.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@526 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/link.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/link.c b/src/arch/link.c
index 02cda22..3b74e5c 100644
--- a/src/arch/link.c
+++ b/src/arch/link.c
@@ -121,7 +121,7 @@ void handle_branch_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcC
target = g_arch_processor_find_instr_by_address(proc, &addr);
- printf(" @ 0x%08x BRANCH to 0x%08x -->> %p\n",
+ printf(" @ 0x%08x BRANCH true to 0x%08x -->> %p\n",
(unsigned int)instr->range.addr.virtual, (unsigned int)virt, target);
if (target != NULL)
@@ -132,6 +132,14 @@ void handle_branch_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcC
target = g_arch_instruction_get_next_iter(list, instr, ~0);
+
+ if (target != NULL)
+ printf(" @ 0x%08x BRANCH false to 0x%08x -->> %p\n",
+ (unsigned int)instr->range.addr.virtual,
+ (unsigned int)g_arch_instruction_get_range(target)->addr.virtual,
+ target);
+
+
if (target != NULL)
g_arch_instruction_link_with(instr, target, ILT_JUMP_IF_FALSE);