From 2cfee5420fe74e6aa95d4b584e610775debe1732 Mon Sep 17 00:00:00 2001
From: Jason Hiser <jdhiser@gmail.com>
Date: Fri, 16 Aug 2019 10:09:18 -0400
Subject: [PATCH] added warning message about odd fixed calls

---
 irdb-libs/ir_builders/fix_calls.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/irdb-libs/ir_builders/fix_calls.cpp b/irdb-libs/ir_builders/fix_calls.cpp
index f5d508fa8..044dcf9ff 100644
--- a/irdb-libs/ir_builders/fix_calls.cpp
+++ b/irdb-libs/ir_builders/fix_calls.cpp
@@ -511,7 +511,15 @@ class FixCalls_t : public TransformStep_t
 				return;
 
 			/* record the possibly new indirect branch target if this call gets fixed */
-			Instruction_t* newindirtarg=insn->getFallthrough();
+			const auto newindirtarg=insn->getFallthrough();
+
+			if(!newindirtarg)
+			{
+				cout << "Warning!  No fallthrough for fixed call at " << hex
+				     << insn->getBaseID() << ":" << insn->getDisassembly() 
+				     << "@" << insn->getAddress()->getVirtualOffset()
+				     << endl;
+			}
 
 			/* Disassemble the instruction */
 			auto disasmp=DecodedInstruction_t::factory (insn);
@@ -605,6 +613,7 @@ class FixCalls_t : public TransformStep_t
 
 
 
+
 			/* If the fallthrough is not marked as indirectly branchable-to, then mark it so */
 			if(newindirtarg && !newindirtarg->getIndirectBranchTargetAddress())
 			{
-- 
GitLab