"A great way to debug glibc functions is to override the function of interest with your own version. This can be done without having
root permissions and without recompiling the libc source. Imagine the pure thrill of writing your own version of open()!" More at IBM developerWorks.
May 20, 2002
Override the GNU C library--painlessly