gpt4 book ai didi

c - 告诉 C 内联函数但仍然可以调用调试器

转载 作者:太空宇宙 更新时间:2023-11-04 07:52:49 25 4
gpt4 key购买 nike

有没有办法将函数标记为内联,但仍然可以在调试器中调用?我想调用的所有函数都标记为 static inline,因为我们只允许在我们的文件中公开某些函数。我正在使用 gcc。

最佳答案

-ginline-points 可以帮助:

Generate extended debug information for inlined functions. Location view tracking markers are inserted at inlined entry points, so that address and view numbers can be computed and output in debug information. This can be enabled independently of location views, in which case the view numbers won’t be output, but it can only be enabled along with statement frontiers, and it is only enabled by default if location views are enabled.

关于c - 告诉 C 内联函数但仍然可以调用调试器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52690601/

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