gpt4 book ai didi

c++ - 我如何告诉编译器为每个编译的函数添加一个函数调用?

转载 作者:太空狗 更新时间:2023-10-29 20:15:43 25 4
gpt4 key购买 nike

我记得读过一种告诉 visual studio 在编译时向每个函数添加函数调用的方法。如果您想推出自己的穷人分析器,它会很方便。但我不记得怎么做,或者它叫什么。我想用 g++ 做同样的事情。有谁知道如何做到这一点?

编辑:因此看起来 visual studio 等效项是使用/Gh 进行编译并给出 _penter 和 _pexit 函数的定义。对于 g++,您应该查找 -finstrument-functions 编译器选项。

最佳答案

"So it looks like the visual studio equivalent is to compile with /Gh and give a definition for _penter and _pexit functions. For g++, you should look up -finstrument-functions compiler option."

关于c++ - 我如何告诉编译器为每个编译的函数添加一个函数调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12079247/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com