From 1f51b4cb33c24fa0ad02ffac7c018277d0f134c8 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Thu, 28 Oct 2021 16:13:56 -0400 Subject: [PATCH] Adjust analysis code to compile with older Dyninst 9 The Block getInsn method and InsnLoc constructor have different signature in older Dyninst 9. To hide those differences between version of Dyninst just put the method invocation in the constructor and let the compiler figure out which type the parameter is. --- analysis.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/analysis.cxx b/analysis.cxx index 1c11c87a2..a7a579eb9 100644 --- a/analysis.cxx +++ b/analysis.cxx @@ -273,10 +273,9 @@ int liveness(string executable, if (func_to_analyze.co->findBlocks(NULL, addr, bb_s) != 1 ) return 0; // too many (or too few) basic blocks, punt Block *bb = *bb_s.begin(); - Instruction curInsn = bb->getInsn(addr); // Construct a liveness query location for the probe point. - InsnLoc i(bb, addr, curInsn); + InsnLoc i(bb, addr, bb->getInsn(addr)); Location iloc(func, i); // Query to see if whether the register is live at that point -- 2.43.5