From: eric@tantalus.nrl.navy.mil (Eric Youngdale) Subject: Re: IMPORTANT Re: How do I safely back out of Libc4.3 ? Date: Mon, 1 Mar 1993 01:18:41 GMT
In article <59096@sunquest.UUCP> thain@sunquest.UUCP (Greg Thain) writes:
>In article <C30urH.511@boulder.parcplace.com> imp@boulder.parcplace.com (Warner Losh) writes:
>>Maybe it is time for an LD_LIBRARY_PATH variable that you can set in
>>your shell that tells the dynamic libraries where to load from. This
>>would allow you to do a trial installation and back it out if things
>>went badly w/o the effort of backing up your system. I know on Suns
>>it has saved my butt more times that I care to think about.
>
>There are other tasks this could be used for as well. Several people have
>asked for the functionality of trace, or truss. These are commands which
>enable system call level tracing of binaries for which one has no source.
>
>Instead of providing this functionality at the kernel level, one could have
>an alternate libc.so.x.y with wrappers around all the system calls,
>printing out their calling parameters and the return values. This method
>could also allow for tracing at the C library level, which you can't do
>with trace or truss. If there were such a libc.so.x.y, one could stick it
>in, say, /lib/debug/libc.so.x.y, set the LD_LIBRARY_PATH (or equivalent)
>to /lib/debug, and away you go. Simple, no kernel changes, and
>flexible.
Funny that you should mention this. As almost an afterthought, I added
an option to the sharable library building tools that partially implements
somthing along these lines. Currently, it is only able to print the name of
each routine as it is entered - no arguments, and it does not tell you when you
return from each function (which would be nice if there were a lot of nested
calls). I have tried this with libc, and it prints out a godawful amount of
stuff to the screen, and it was difficult to pick through it all. Ideally one
would also want the arguments printed as well but that will be another hack,
and another day. The next time I hack this, I will probably fix it so that you
can select which functions you want to trace.
-Eric
--
"When Grigor Samsa woke up one morning from unsettling dreams, he
found himself changed in his bed into a monstrous vermin."
-F. Kafka