[DynInst_API:] std::cout calls resolved as dynamic calls


Date: Wed, 17 Aug 2016 23:02:37 +0530
From: Manoj Kumar <kumar140976@xxxxxxxxx>
Subject: [DynInst_API:] std::cout calls resolved as dynamic calls
Hello,

I have created the binary file for the below test function on windows platform using VC12 compiler. I am using Dyninst 9.0.3 release to analyze the call points of the test function and checking for the dynamic call site. Below is the test function used for binary analysis and BPatch_point class APIs used for call point filterting.

void test_func()
{
ÂÂÂÂ std::cout << "Test";
Â
ÂÂÂ std::cout << 10;
Â
ÂÂÂÂ int x = 15;
ÂÂÂÂ std::cout << x;

ÂÂÂÂ std::string str = "Test Func Called";
ÂÂÂÂ std::cout << str;
}

BPatch_function* func = point->getCalledFunction();Â
bool dyn_site = point->isDynamic();


While iterating through the call points of the test function 'test_func()'. I observed strange behavior for the call points std::cout << 10; and std::cout << x;

Both the call points returns NULL function object for the API call point->getCalledFunction() whileÂ'isDynamic' call returns true for these
call points. I believe this is the wrong behaviour for these call points as std::cout calls are not function pointer calls.

Could you pls. elaborate on this behaviour. Is there a way to detectÂbothÂtheÂstd::cout calls as normal function calls.

Thanks
Kumar

[← Prev in Thread] Current Thread [Next in Thread→]