FreeBSD and Debugging?

Tim Robbins tjr at freebsd.org
Fri Apr 9 22:35:10 PDT 2004


On Fri, Apr 09, 2004 at 11:11:49PM -0600, Brandon Erhart wrote:

[...]
> Are there any debuggers out there for BSD that will detect the heap/stack 
> corruption!?

ElectricFence (devel/ElectricFence in the ports collection) detects
most kinds of heap corruption, but not stack corruption. It will reliably
abort the program on the exact instruction that first corrupts the heap
(e.g. overruns a buffer), then you can use gdb on the core dump to
analyze it further.

After installing the port, run your program with "ef.sh".


Tim


More information about the freebsd-hackers mailing list