代码之家  ›  专栏  ›  技术社区  ›  Terminus

用于分析的自定义prolog/epilog函数

  •  4
  • Terminus  · 技术社区  · 17 年前

    __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 对于特定的代码。

    谢谢

    1 回复  |  直到 17 年前
        1
  •  5
  •   Shay Erlichmen    17 年前
    1. 你可以使用 /Gh /GH 切换cl以创建penter/pexit挂钩。
    2. 有关免费挂钩API,请查看:
      2.1 easyhook
      N-CodeHook