From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA01875; Fri, 4 Jan 2002 14:46:20 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 OAA01980 for ; Fri, 4 Jan 2002 14:46:20 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g04DkID03558; Fri, 4 Jan 2002 14:46:18 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA00206; Fri, 4 Jan 2002 14:46:17 +0100 (MET) Date: Fri, 4 Jan 2002 14:46:17 +0100 From: Xavier Leroy To: Magesh Kannan Cc: caml-list@inria.fr Subject: Re: [Caml-list] Stop at exception Message-ID: <20020104144617.G941@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from magesh@ittc.ku.edu on Thu, Jan 03, 2002 at 08:55:13PM -0600 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I am debugging a large OCaml program and am stuck with an exception. The > exception is thrown by a utility function that is invoked several times in > the program. I want to know which invocation of the utility function > throws the exception. I cannot keep a breakpoint inside the utility > function because it is called several times in the program. > > Is it possible to make the ocaml debugger stop at the invocation where the > exception is being thrown? > > Are there other ways to accomplish the above objective? Easy: let the program run until it stops on the exception, then use the "backstep" command to go back in time to the point where the exception is raised; then do a "backtrace" command to see where you are. In OCaml 3.04, you can also run the program outside of the debugger and request a stack backtrace (set the OCAMLRUNPARAM environment variable to "b"). - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr