From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A70BB7F02D; Mon, 20 Oct 2014 11:35:36 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of whitequark@whitequark.org) identity=pra; client-ip=176.58.103.125; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of whitequark@whitequark.org designates 176.58.103.125 as permitted sender) identity=mailfrom; client-ip=176.58.103.125; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.whitequark.org) identity=helo; client-ip=176.58.103.125; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="postmaster@mail.whitequark.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqijANPWRFSwOmd9/2dsb2JhbABcg2GKDK9lAQEBAQEBBoFCkUCHTQKBJgF9hAMBAQQ4Aj8QBAcYLiwrBhuIOwnBaAEBAQEBBQEBAQEaBIYjhBGEBoEJgQ4HhEsBBItcimqdNYI0gUg4LwGCSgEBAQ X-IPAS-Result: AqijANPWRFSwOmd9/2dsb2JhbABcg2GKDK9lAQEBAQEBBoFCkUCHTQKBJgF9hAMBAQQ4Aj8QBAcYLiwrBhuIOwnBaAEBAQEBBQEBAQEaBIYjhBGEBoEJgQ4HhEsBBItcimqdNYI0gUg4LwGCSgEBAQ X-Spam-Status: Yes X-IronPort-AV: E=Sophos;i="5.04,755,1406584800"; d="scan'208";a="101998040" Received: from fehu.whitequark.org (HELO mail.whitequark.org) ([176.58.103.125]) by mail2-smtp-roc.national.inria.fr with ESMTP; 20 Oct 2014 11:35:35 +0200 Received: by mail.whitequark.org (Postfix, from userid 33) id 6339710BE47; Mon, 20 Oct 2014 09:35:34 +0000 (UTC) To: John Whitington X-PHP-Originating-Script: 1000:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 20 Oct 2014 13:35:34 +0400 From: Peter Zotov Cc: caml-list@inria.fr, caml-list-request@inria.fr In-Reply-To: <5443FCE6.50206@coherentgraphics.co.uk> References: <5443FCE6.50206@coherentgraphics.co.uk> Message-ID: <11999655bb7ce7053f90d1409045ba91@whitequark.org> X-Sender: whitequark@whitequark.org User-Agent: Roundcube Webmail/1.0.1 Subject: Re: [Caml-list] ANN: exn-source - exception backtraces with source code printing On 2014-10-19 22:03, John Whitington wrote: > Hi, > > OCaml 4.02 has new facilities for installing a new backtrace handler, > and processing the back trace symbolically. As a little proof of > concept, I've built a package which you can add to any project to get > backtrace with source code printed and highlighted: > > [snip] Very nice project! However, it looks like the user needs to explicitly specify the paths to the sources. I have some code to perform a similar task[1]; the paths are actually contained inside the bytecode. I think that for native-code you can fetch them in a similar way, though it is a little harder to extract the debug info. [1]: https://github.com/whitequark/pry.ml/blob/master/src/pry_bytecode.ml, see di_paths. -- Peter Zotov