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 VAA24345; Mon, 5 Jan 2004 21:18:22 +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 VAA23698 for ; Mon, 5 Jan 2004 21:18:21 +0100 (MET) Received: from kraid.nerim.net (smtp-101-monday.nerim.net [62.4.16.101]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i05KIKH24711 for ; Mon, 5 Jan 2004 21:18:20 +0100 (MET) Received: from inria.fr (planar.net0.nerim.net [213.41.168.102]) by kraid.nerim.net (Postfix) with ESMTP id C734E40E81; Mon, 5 Jan 2004 21:18:16 +0100 (CET) Date: Mon, 5 Jan 2004 21:18:31 +0100 Subject: Re: [Caml-list] 3.07: debug information on camlp4-processed files is missing the file name? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) Cc: Caml List To: Aleksey Nogin From: Damien Doligez In-Reply-To: <3FF9BA9E.603@cs.caltech.edu> Message-Id: <54D8B96E-3FBC-11D8-BEFF-00039310CAE8@inria.fr> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.553) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 3.07:01 camlp:01 damien:01 damien:01 3.07:01 backtrace:01 camlp:01 backtraces:01 3.06:01 artem:01 pcaml:01 val:01 pcaml:01 val:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday, January 5, 2004, at 08:27 PM, Aleksey Nogin wrote: > I noticed that in 3.07 the backtrace (OCAMLRUNPARAM=b) has empty file > names for the files was compiled with a camlp4 preprocessor. Since in > our project most of the files are camlp4-processed, this makes the > backtraces completely unusable :-( > > Is there some workaround for this (short of staying with 3.06)? You can try this patch, developed by Artem Prysyznuk. We haven't incorporated it because we are doing extensive changes to camlp4 to deal correctly with new-style locations. Please let me know whether it works for you. -- Damien ---------- begin patch file diff -ru ocaml-3.07/camlp4/camlp4/argl.ml ocaml-3.07.tema/camlp4/camlp4/argl.ml --- ocaml-3.07/camlp4/camlp4/argl.ml 2003-07-10 15:28:14.000000000 +0300 +++ ocaml-3.07.tema/camlp4/camlp4/argl.ml 2003-11-06 17:43:28.000000000 +0200 @@ -397,11 +397,12 @@ exit 2 } ]; try - if Pcaml.input_file.val <> "" then + if Pcaml.input_file.val <> "" then do { + Ast2pt.glob_fname.val := Pcaml.input_file.val; match file_kind.val with [ Intf -> process_intf () | Impl -> process_impl () ] - else () + } else () with exc -> do { Format.set_formatter_out_channel stderr; diff -ru ocaml-3.07/camlp4/camlp4/ast2pt.mli ocaml-3.07.tema/camlp4/camlp4/ast2pt.mli --- ocaml-3.07/camlp4/camlp4/ast2pt.mli 2002-07-19 17:53:44.000000000 +0300 +++ ocaml-3.07.tema/camlp4/camlp4/ast2pt.mli 2003-11-06 17:43:28.000000000 +0200 @@ -12,6 +12,7 @@ (* $Id: ast2pt.mli,v 1.3 2002/07/19 14:53:44 mauny Exp $ *) +value glob_fname : ref string; value fast : ref bool; value no_constructors_arity : ref bool; value mkloc : (int * int) -> Location.t; ---------- end patch file ------------------- 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