From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 22:35:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9BCC16A4CE for ; Fri, 9 Apr 2004 22:35:10 -0700 (PDT) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16F9243D45 for ; Fri, 9 Apr 2004 22:35:10 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (210.50.36.31) by smtp01.syd.iprimus.net.au (7.0.024) id 402BA92701430477; Sat, 10 Apr 2004 15:35:07 +1000 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id D32BC41DC; Sat, 10 Apr 2004 15:38:30 +1000 (EST) Date: Sat, 10 Apr 2004 15:38:30 +1000 From: Tim Robbins To: Brandon Erhart Message-ID: <20040410053830.GA59050@cat.robbins.dropbear.id.au> References: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD and Debugging? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 05:35:10 -0000 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