Skip to content

Commit 078bd62

Browse files
committed
List all candidate functions for a function pointer at debug verbosity
1 parent db0a13c commit 078bd62

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/goto-programs/remove_function_pointers.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,26 @@ void remove_function_pointerst::remove_function_pointer(
430430
statistics().source_location=target->source_location;
431431
statistics() << "replacing function pointer by "
432432
<< functions.size() << " possible targets" << eom;
433+
434+
// list the names of functions when verbosity is at debug level
435+
if(get_message_handler().get_verbosity() >= M_DEBUG)
436+
{
437+
debug() << "targets: ";
438+
439+
bool first = true;
440+
for(const auto &function : functions)
441+
{
442+
if(!first)
443+
{
444+
debug() << ", ";
445+
}
446+
447+
debug() << function.get_identifier();
448+
first = false;
449+
}
450+
451+
debug() << eom;
452+
}
433453
}
434454

435455
bool remove_function_pointerst::remove_function_pointers(

0 commit comments

Comments
 (0)