开发者

Recording function calls to a library

开发者 https://www.devze.com 2023-03-21 09:43 出处:网络
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 int

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

精彩评论

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