caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Damien Doligez <damien.doligez@inria.fr>
To: Aleksey Nogin <nogin@cs.caltech.edu>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] 3.07: debug information on camlp4-processed files is missing the file name?
Date: Mon, 5 Jan 2004 21:18:31 +0100	[thread overview]
Message-ID: <54D8B96E-3FBC-11D8-BEFF-00039310CAE8@inria.fr> (raw)
In-Reply-To: <3FF9BA9E.603@cs.caltech.edu>

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


  reply	other threads:[~2004-01-05 20:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 19:27 Aleksey Nogin
2004-01-05 20:18 ` Damien Doligez [this message]
2004-01-07  5:47   ` Aleksey Nogin
2004-01-07 12:50     ` Damien Doligez
2004-01-08  1:29       ` Aleksey Nogin
2004-01-08  8:17   ` Stefano Zacchiroli
2004-01-08  9:49     ` Damien Doligez
2004-01-08 15:38       ` skaller
2004-01-09 10:46         ` Damien Doligez
2004-01-10 11:15           ` skaller
2004-01-09  8:41       ` Stefano Zacchiroli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D8B96E-3FBC-11D8-BEFF-00039310CAE8@inria.fr \
    --to=damien.doligez@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=nogin@cs.caltech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).