[Ltrace-devel] [PATCH] (almost) full libdl support for ltrace

Joe Damato ice799 at gmail.com
Wed Oct 7 22:20:05 UTC 2009


Hi -

I've finally had some time to finish off (mostly) full libdl support
for ltrace. I've attached a patch to this email which applies against
the 0.5.3 commit (sha: 163765561621a9127cee3243dd94011e70a2c580) x86
and x86_64 only. The only major caveat is that I haven't added support
for removing libdl libraries via dlclose. This could be a problem if a
library is removed and new one is mapped in at the same address.
Should be pretty simple to fix, I provided some commented out code
with my thoughts about how to implement it. If I have some time I'll
give it a shot, but none of the code I trace ever removes libraries
after they've been loaded with libdl.

An example usage which will search for "function" in each library as
it is loaded would be:

ltrace -x function -p <pid>    or      ltrace -x function someprogram args

Questions, comments, and suggestions are welcome.

Thanks,
Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltrace-full.patch
Type: application/octet-stream
Size: 29249 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20091007/3aaf8e44/attachment-0001.obj>


More information about the Ltrace-devel mailing list