Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know of strace, which is super handy for watching system calls. Is there an equivalent that can trace calls to external libraries?

For example, I'm trying to debug some SSLeay misbehavior with a third-party binary that I cannot access the code for (and who's developer is unresponsive). I believe I have nailed down the problem, but I can't test this without seeing exactly how the data being signature-checked is being formatted for sending off to SSLeay.

share|improve this question
up vote 11 down vote accepted

ltrace -- A library call tracer.

It only works on Linux and in a small subset of architectures. Calls to dlopen()ed libraries will not be traced. Further pointers from man page and /etc/ltrace.conf

share|improve this answer
Is there any solution available for dlopen()ed libraries? – draeath Jan 4 '12 at 19:41

Sometimes ltrace works. In general, this calls for a debugger such as GDB. You can get an idea of which functions to put trace points or break points on by looking at the call structure in the disassembly (objdump -d /path/to/executable).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.