Skip to content

Commit

Permalink
Added more debug logging to NaiveDevirtualisation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHaas committed Aug 23, 2023
1 parent eca403f commit acd34c9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ private void findAndTransformAddressTakenFunctions(Function function, Map<Functi
applyTransformerToEvent(e, functionCollector);
for (Function func : functionCollector.collectedFunctions) {
if (!func2AddressMap.containsKey(func)) {
logger.debug("Assigned address \"{}\" to function \"{}\"", nextAvailableFuncAddress, func);
func2AddressMap.put(func, expressions.makeValue(BigInteger.valueOf(nextAvailableFuncAddress++), ptrType));
}
}
Expand Down Expand Up @@ -119,6 +120,8 @@ private void devirtualise(Function function, Map<Function, IValue> func2AddressM
throw new MalformedProgramException(error);
}

logger.trace("Devirtualizing call \"{}\" with possible targets: {}", call, possibleTargets);

final List<Label> caseLabels = new ArrayList<>(possibleTargets.size());
final List<CondJump> caseJumps = new ArrayList<>(possibleTargets.size());
final Expression funcPtr = call.getCallTarget();
Expand Down

0 comments on commit acd34c9

Please sign in to comment.