开发者

Recording function calls to a library

I am trying to find a tool which will generate wrappers around a library and record all the function 开发者_C百科calls. The project I am working on is quite large and the 3rd party refuses to dive into such a large codebase to debug their problem. Any suggestions?

PS: I am working on linux.


ltrace might do just that.

If that's now powerful enough, you can clobber something together thus: assuming you have a debug build with the symbols available, you could extract those symbols and write a script which inserts breakpoints into gdb based on that, runs it, and iteratively extract the location and continue.

Or you could go raw and use ptrace.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜