使用Visual Studio编译器,是否有可能编写在调用其他函数之前和执行函数之后调用的2个函数?在gcc中,您可以使用__cyg_profile_func_*()
函数执行此操作:
void __cyg_profile_func_enter(void *func_address, void *call_site )
__attribute__ ((no_instrument_function));
void __cyg_profile_func_exit (void *func_address, void *call_site )
__attribute__ ((no_instrument_function));
我需要一个适用于内核模式软件的解决方案。我认为Microsoft Detours可能会有所帮助,但免费版仅为32位且我的驱动程序是纯64位。
我想为特定代码生成call graph。
感谢。
答案 0 :(得分:5)