From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA29206 for caml-red; Fri, 30 Jun 2000 17:35:27 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA03957 for ; Fri, 30 Jun 2000 15:08:25 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e5UD8N517006; Fri, 30 Jun 2000 15:08:23 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA21986; Fri, 30 Jun 2000 15:08:23 +0200 (MET DST) Message-ID: <20000630150823.24021@pauillac.inria.fr> Date: Fri, 30 Jun 2000 15:08:23 +0200 From: Xavier Leroy To: Scott McPeak , caml-list@inria.fr Subject: Re: how to set breakpoint at exception throw? References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: ; from Scott McPeak on Wed, Jun 28, 2000 at 04:24:39PM -0700 Sender: weis@pauillac.inria.fr > In the debugger, I'd like to put a breakpoint essentially in the > 'raise' function. The idea is to get control whenever an exception is > raised, and be able to take a backtrace. > Any ideas on how to do this? Reverse execution is your friend: simply run the program under the debugger; if an uncaught exception causes the program to terminate, back-step (command "back") once, and voila, you're at the point where the exception was raised, and you can examine the backtrace. If your program traps all exceptions or performs finalization before re-raising exceptions, you may have to back-step several times, but eventually you'll hit the point where the exception was raised. - Xavier Leroy