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 c5ff346549e7 (Postfix) with ESMTPS id F37D75D4 for ; Sat, 25 Apr 2020 13:37:18 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.73,316,1583190000"; d="scan'208,217";a="446860468" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 25 Apr 2020 15:37:17 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id D17787F487; Sat, 25 Apr 2020 15:37:17 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 0E71B7F42C for ; Sat, 25 Apr 2020 15:37:12 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=basile@starynkevitch.net; spf=Pass smtp.mailfrom=basile@starynkevitch.net; spf=None smtp.helo=postmaster@relay12.mail.gandi.net IronPort-PHdr: =?us-ascii?q?9a23=3Am9T8ghHODZskWAmspdH5Ap1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ7zr82wAkXT6L1XgUPTWs2DsrQY0reQ7vyrBTZIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSizexfLN/IA+2oAjeucUbjpVuIbstxxXUpXdFZ/?= =?us-ascii?q?5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnM?= =?us-ascii?q?VhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1ji?= =?us-ascii?q?oMKjw3/3zNisFokaxVvhyhqRx8zYDabo6aO/hxcb/GcNwAWWZMRNxcWz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R9d0+OcgJkZwH9L40kLZ0i6jEuZP0bmCBZhy/ava03m3IcthmS6fhf?= =?us-ascii?q?sRymI+S84KDlWIw6t29gzdHYnMyhTLjLqjb7Ua3yPT9XuIzSyIsV0KCQM=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DMAgClO6Reh+iyRtlmHAEBAQEBBwEBE?= =?us-ascii?q?QEEBAEBggODFgNSMiqEH48JgWQIJYNyhgSRYgsBAwEMIwwEAQGERAKCJhwHAQQ?= =?us-ascii?q?0EwIQAQEFAQEBAgECAwQBEwEBAQgNCQgphV0MgjsigxUBAgMjZgsEFCoCAiE2E?= =?us-ascii?q?wYCAQGDIgGCSwMyC7B5gTIfhTCCaA1igUCBOIw5Gj6BQoE4DIIvLj6CHj4LAgO?= =?us-ascii?q?CL4JFgl8EmHSYZEqCT4gPiyqEQSOBAoJgjCCMeZgBDYE0gkWDC44WgWmBeHsKO?= =?us-ascii?q?4JpCUcYDZFOg1iEWTuFRD8zNQIGCAEBAwmPLwEB?= X-IPAS-Result: =?us-ascii?q?A0DMAgClO6Reh+iyRtlmHAEBAQEBBwEBEQEEBAEBggODFgN?= =?us-ascii?q?SMiqEH48JgWQIJYNyhgSRYgsBAwEMIwwEAQGERAKCJhwHAQQ0EwIQAQEFAQEBA?= =?us-ascii?q?gECAwQBEwEBAQgNCQgphV0MgjsigxUBAgMjZgsEFCoCAiE2EwYCAQGDIgGCSwM?= =?us-ascii?q?yC7B5gTIfhTCCaA1igUCBOIw5Gj6BQoE4DIIvLj6CHj4LAgOCL4JFgl8EmHSYZ?= =?us-ascii?q?EqCT4gPiyqEQSOBAoJgjCCMeZgBDYE0gkWDC44WgWmBeHsKO4JpCUcYDZFOg1i?= =?us-ascii?q?EWTuFRD8zNQIGCAEBAwmPLwEB?= X-IronPort-AV: E=Sophos;i="5.73,316,1583190000"; d="scan'208,217";a="346949913" X-MGA-submission: =?us-ascii?q?MDHRMSvLfvK9NR6QI5JOcWvcwGnNlEL2QzBX/Z?= =?us-ascii?q?x+woRkHQCllu82ffQyB29rEh3AZtTMsnzHXsCMp5AhKRLZhNTIJFYf57?= =?us-ascii?q?lxlEwwERQMnJfKHSY2vjog3omPI/9SqO/Vw3eFeWBzY0uBdsDliJo//F?= =?us-ascii?q?cymVvrcGh4k8R1kFP8qw5olA=3D=3D?= Received: from relay12.mail.gandi.net ([217.70.178.232]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2020 15:37:11 +0200 Received: from [192.168.1.10] (82-64-88-163.subs.proxad.net [82.64.88.163]) (Authenticated sender: basile@starynkevitch.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id A395E20000E for ; Sat, 25 Apr 2020 13:37:10 +0000 (UTC) To: caml-list@inria.fr References: <37e47dfd-580b-725f-725b-190580bee8f6@orbitalfox.eu> <3ab1f224-dfce-9496-6570-c518cb367008@orbitalfox.eu> <86d07wgj5z.fsf@gmail.com> <87eesbiu91.fsf@m4x.org> From: Basile Starynkevitch Message-ID: Date: Sat, 25 Apr 2020 15:37:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87eesbiu91.fsf@m4x.org> Content-Type: multipart/alternative; boundary="------------6D3C6B0FE2BBB28A73D735C6" Content-Language: en-US Subject: Re: [Caml-list] Introspection of functions with Utop Reply-To: Basile Starynkevitch X-Loop: caml-list@inria.fr X-Sequence: 18118 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This is a multi-part message in MIME format. --------------6D3C6B0FE2BBB28A73D735C6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 4/25/20 3:12 PM, Alan Schmitt wrote: > On 2020-04-25 08:43, Malcolm Matalka 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. https://en.wikipedia.org/wiki/DWARF > -- Basile STARYNKEVITCH == http://starynkevitch.net/Basile opinions are mine only - les opinions sont seulement miennes Bourg La Reine, France; (mobile phone: cf my web page / voir ma page web...) --------------6D3C6B0FE2BBB28A73D735C6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit


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.

https://en.wikipedia.org/wiki/DWARF


--
Basile STARYNKEVITCH   == http://starynkevitch.net/Basile
opinions are mine only - les opinions sont seulement miennes
Bourg La Reine, France; <basile@starynkevitch.net>
(mobile phone: cf my web page / voir ma page web...)
--------------6D3C6B0FE2BBB28A73D735C6--