Skip to content

Commit 4311c58

Browse files
committed
List all candidate functions for a function pointer at debug verbosity
1 parent e8749bd commit 4311c58

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
@@ -429,6 +429,26 @@ void remove_function_pointerst::remove_function_pointer(
429429
statistics().source_location=target->source_location;
430430
statistics() << "replacing function pointer by "
431431
<< functions.size() << " possible targets" << eom;
432+
433+
// list the names of functions when verbosity is at debug level
434+
if(get_message_handler().get_verbosity() >= M_DEBUG)
435+
{
436+
debug() << "targets: ";
437+
438+
bool first = true;
439+
for(const auto &function : functions)
440+
{
441+
if(!first)
442+
{
443+
debug() << ", ";
444+
}
445+
446+
debug() << function.get_identifier();
447+
first = false;
448+
}
449+
450+
debug() << eom;
451+
}
432452
}
433453

434454
bool remove_function_pointerst::remove_function_pointers(

0 commit comments

Comments
 (0)