Package: electric-fence Version: 2.0.5-4 README.debian does not explain how to use Electric Fence from within gdb without having to relink the binary. One can find out how to do this by perusing the gdb docs thoroughly, but it would be nice if this readme would include an enlightening example, like these definitions for ~/.gdbinit:
############################################################################### # Electric Fence # # Debian's Electric Fence package provides efence as a shared library, which is # very useful. ############################################################################### define efence set environment EF_PROTECT_BELOW 0 set environment LD_PRELOAD /usr/lib/libefence.so.0.0 echo Enabled Electric Fence\n end document efence Enable memory allocation debugging through Electric Fence (efence(3)). See also nofence and underfence. end define underfence set environment EF_PROTECT_BELOW 1 set environment LD_PRELOAD /usr/lib/libefence.so.0.0 echo Enabled Electric Fence for undeflow detection\n end document underfence Enable memory allocation debugging for underflows through Electric Fence (efence(3)). See also nofence and underfence. end define nofence unset environment LD_PRELOAD echo Disabled Electric Fence\n end document nofence Disable memory allocation debugging through Electric Fence (efence(3)). end I'm not sure this is the best way to do it: this assumes LD_PRELOAD isn't needed otherwise. Perhaps it is possible to rework an existing LD_PRELOAD value, but I'm not familiar enough with gdb's extension language. -- System Information Debian Release: 2.1 Kernel Version: Linux zensunni 2.2.1-ac5 #1 Sat Feb 6 14:20:09 CET 1999 i686 unknown -- Ray Dassen <[EMAIL PROTECTED]>