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 RAA09475; Mon, 16 Jun 2003 17:05:06 +0200 (MET DST) 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 RAA06236 for ; Mon, 16 Jun 2003 17:05:05 +0200 (MET DST) 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 h5GF53H08019; Mon, 16 Jun 2003 17:05:03 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA09557; Mon, 16 Jun 2003 17:05:03 +0200 (MET DST) Date: Mon, 16 Jun 2003 17:05:03 +0200 From: Xavier Leroy To: Lex Stein Cc: caml-list@inria.fr Subject: Re: [Caml-list] exception stack trace from --output-obj'ed Caml code Message-ID: <20030616170503.A9308@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from stein@eecs.harvard.edu on Sun, Jun 15, 2003 at 10:59:17PM -0400 X-Spam: no; 0.00; caml-list:01 gcc:01 -output-obj:01 backtrace:01 backtraces:01 c-like:01 linked:01 debug:01 caml:01 exception:02 linking:02 uncaught:02 stack:02 objects:02 string:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Hi, I have OCAMLRUNPARAM set to b=1 and have compiled and linked with the > -g flag. I am doing linking with gcc because I have a C main and C > objects. The Caml code is compiled with the -output-obj flag to create a > .o that gcc links with. Unfortunately, I'm not seeing exception stack > traces for uncaught exceptions. For example, I get: > > Fatal error: exception Invalid_argument("String.get") > (Program not linked with -g, cannot print stack backtrace) This is a known limitation of -output-obj: the debug info that is used to generate stack backtraces is not included in the generated object file. > Is there a way to solve this while continuing to use -output-obj to > generate a C-like object for gcc to link against ? No, not currently. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners