Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Everyone forgets about ltrace: Like strace, but for calls to dynamic libraries.

It gets you something closer to what the program looks like at the source code level: You get calls to printf (well, __printf_chk on a modern Linux) instead of write, for example. The downside is that ltrace doesn't (and can't) know as much about every single function in every single dynamic library, so, while the names are there, the arguments are typically less convenient to work with and may be incorrect. (For example, it doesn't dereference pointers to print out nice strings, and it might not know how many arguments a function takes.)



This is anecdotal, and a number of years ago, but I was using ltrace and it managed to kill the process I had attached to. I think ltrace has to get a little more aggressive with how it extracts data from a process. If it's a situation where data-loss is not allowed, consider the risk.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: