[Ltrace-devel] [PATCH] Early support for libdl in ltrace

Joe Damato ice799 at gmail.com
Mon Sep 7 05:36:04 UTC 2009


Hi -

I've attached a patch with early support for libdl in ltrace. This is
patch is pretty rough, intended as a first cut.

A few important notes:

- I don't know much at all about libelf, so proceed with caution.
- This patch ONLY supports x86_64 right now and I probably should have
put this code in the architecture specific subdirectory (oops)
- This patch does not support launching the process (ltrace
/usr/bin/blah does NOT work - coming soon), but attaching (ltrace -p
whatever) works.
- The usage is slightly painful. You must specify the library on the
command line and the name must match the name passed to dlopen.

To test it, simply apply the patch, build ltrace, edit ltrace.conf to
include information for the symbols you'd like to trace and then:

ltrace -l /usr/lib/whatever.so -F /etc/ltrace.conf -p 24784

If it doesn't work, make sure you are passing the DSO name that was
passed to dlopen. If it still doesn't work, it's most likely a bug =]

Questions, comments, and suggestions are very welcome!

Thanks,
Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libdl-ltrace.patch
Type: application/octet-stream
Size: 11959 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20090906/e0e69afc/attachment.obj>


More information about the Ltrace-devel mailing list