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

Attachment: libdl-ltrace.patch
Description: Binary data

_______________________________________________
Ltrace-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/ltrace-devel

Reply via email to