lkml.org 
[lkml]   [1997]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjecttrace for shared lib calles ?
Hi,

is there an easy way to trace some/all calls to a shared lib (if possible
without hacking the lib sources and add warppers there) similar to "strace"
for system calls ?


if there is no such tool/method available, I'd like to write wrapper functions
which can be preloaded using LD_PPRELOAD which should call the functions
in he original library then and generaet the "ltrace" output.

but how do I create e.g. a function "malloc" for the preload/wrapper library
which then should call "malloc" from the real shared libc without generating
a recursive call to itself (the wrapper function) ?



thanks for any hints...

Harald

PS: for now it would be possible to hack the according lib sources to
add code (if someone has tools for this for libc or similar...)
but I'd prefer a binary-only solution to be able to trace libs
without sources (e.g. libXm.2) too!
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.036 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site