caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Josh Berdine <josh@berdine.net>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Introspection of functions with Utop
Date: Mon, 27 Apr 2020 17:11:29 +0100	[thread overview]
Message-ID: <1AA65D1D-C7D8-4DE8-AF99-C8E5130F28D4@berdine.net> (raw)
In-Reply-To: <ed42fc15-8eb5-5143-9c48-f975de076b44@starynkevitch.net>

> On Apr 25, 2020, at 2:37 PM, Basile Starynkevitch <basile@starynkevitch.net> wrote:
>> On 4/25/20 3:12 PM, Alan Schmitt wrote:
>>> On 2020-04-25 08:43, Malcolm Matalka <mmatalka@gmail.com> writes:
>> 
>>> What's the answer??
>>> 
>> There is no way to print the code of the function. It is compiled to
>> bytecode by the toplevel and added to the current environment.
>> 
> 
> Unless (on Linux/x86-64 at least) you compile the code with the -g debugging option.
> 
> Adventurous developers could even couple that with Ian Taylor's libbacktrace library. I leave them to check license compatibility with their lawyers.
> 
> https://github.com/ianlancetaylor/libbacktrace
> 
> The real issue is of course funding, as usual. DWARF support in Ocaml needs improvement.

Note that in the particular case of DWARF support, my reading of the "Improved DWARF and GDB support" section of https://blog.janestreet.com/a-look-at-ocaml-4.08/ leaves the impression that it is at least as much about upstream receptiveness as about resources.


      reply	other threads:[~2020-04-27 16:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 11:40 orbifx
2020-04-21 14:08 ` Ali M.
2020-04-24 16:05   ` orbifx
2020-04-25  6:43     ` Malcolm Matalka
2020-04-25 13:12       ` Alan Schmitt
2020-04-25 13:37         ` Basile Starynkevitch
2020-04-27 16:11           ` Josh Berdine [this message]

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=1AA65D1D-C7D8-4DE8-AF99-C8E5130F28D4@berdine.net \
    --to=josh@berdine.net \
    --cc=caml-list@inria.fr \
    /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).