Hi all,
my application will use dlopen to open a dynamic linker library, so how
can I use DTrace to track this library's probes?
I know if the dynamic libraries has been identified during link stage,
it is easy. such as:
bash-3.2# ldd ./exclude
libpthread.so.1 => /lib/libpthread.so.1
libodbc.so.2 => /usr/local/lib/libodbc.so.2
librt.so.1 => /lib/librt.so.1
libc.so.1 => /lib/libc.so.1
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libthread.so.1 => /lib/libthread.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
......
dtrace -ln 'pid$target:libodbc.so::entry{}' -c ./exclude
ID PROVIDER MODULE FUNCTION NAME
57379 pid777 libodbc.so.2.0.0 SQLDataSources
entry
57380 pid777 libodbc.so.2.0.0 SQLDataSourcesA
entry
......
But if the dynamic library is opened in the running, like this:
dtrace -ln 'pid$target:libmyodbc5.so::entry{}' -c ./exclude
ID PROVIDER MODULE FUNCTION NAME
dtrace: failed to match pid791:libmyodbc5.so::entry: No probe matches
description
Is it possible? Thanks very much in advance!
Best Regards
Nan Xiao
-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com