按执行顺序列出函数
我在一个文件中定义了几个函数(主要函数是别人定义的)。
我可以使用 gprof 来分析我的函数被调用了多少次,但是有没有办法按照它们在主程序中调用的顺序获取函数列表?
当然,我可以在每个函数的开头写一条消息,但其中有很多。
如果 gdb 可以通过指定“中断此文件中调用的第一个函数”之类的内容来完成,我也会很高兴。 同样,它们太多,无法明确列出。
谢谢。
I define several functions in a file (the main function is defined by someone else).
I can use gprof to analyze how many times my functions have been called, but is there a way of getting a list with the functions by the order they are called in the main program?
of course I could write a message in the beginning of each function but there are quite a few of them.
I would also be happy if it could be done by gdb by specifying something like "break in the first function that is called in this file".
Again they are too many to list explicitly.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不想使用跟踪或桁架或类似的东西吗?
And you don't want to use trace or truss or similar?