caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Mentre <David.Mentre@inria.fr>
To: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] A few questions regarding the compiler
Date: 14 Nov 2001 14:20:37 +0100	[thread overview]
Message-ID: <qtl8zd9ebfe.fsf@pochi.inria.fr> (raw)
In-Reply-To: <slrn9v3not.28d.qrczak@qrnik.zagroda>

"Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl> writes:

> It would be ideal to be able to obtain the backtrace programmatically
> after I catch an exception.

Maybe I have missed something but the point of raising an exception and
getting its location has already been discussed on the list:
http://caml.inria.fr/archives/200007/msg00028.html (look also at the thread)

To generate a backtrace, just do an "assert(false)" with the environment
variable OCAMLRUNPARAM set to "b=1" (without quotes, see man ocamlrun).

> I could even think about translating positions to real source in this
> case. Is that possible?

Yes. Somebody has written a tool to convert a trace in source position:
http://caml.inria.fr/archives/200109/msg00111.html

Best regards,
d.
-- 
 David.Mentre@inria.fr
 Opinions expressed here are only mine.
-------------------
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


  parent reply	other threads:[~2001-11-14 13:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-29 15:43 Marcin 'Qrczak' Kowalczyk
2001-11-11 17:38 ` Xavier Leroy
     [not found] ` <9smdf7$511$1@qrnik.zagroda>
2001-11-11 21:54   ` Marcin 'Qrczak' Kowalczyk
2001-11-11 22:09     ` Patrick M Doane
2001-11-13 20:36     ` Xavier Leroy
     [not found]     ` <9ssfsl$fa4$1@qrnik.zagroda>
2001-11-14  3:03       ` Marcin 'Qrczak' Kowalczyk
2001-11-14  9:52         ` Markus Mottl
2001-11-14 13:20         ` David Mentre [this message]
     [not found]         ` <9sttmn$kei$1@qrnik.zagroda>
2001-11-14 14:47           ` Marcin 'Qrczak' Kowalczyk
2001-11-14 16:45             ` Marcin 'Qrczak' Kowalczyk

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=qtl8zd9ebfe.fsf@pochi.inria.fr \
    --to=david.mentre@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=qrczak@knm.org.pl \
    /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).