From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6A07FBB83 for ; Sun, 21 May 2006 09:40:29 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4L7eS62016675 for ; Sun, 21 May 2006 09:40:28 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA20936 for ; Sun, 21 May 2006 09:40:27 +0200 (MET DST) Received: from eigen.apisnetworks.com (eigen.apisnetworks.com [67.15.52.22]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4L7ePnx016669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 21 May 2006 09:40:27 +0200 Received: from [10.1.0.105] (dsl231-050-014.sea1.dsl.speakeasy.net [216.231.50.14]) (authenticated bits=0) by eigen.apisnetworks.com (8.12.11.20060308/8.12.10) with ESMTP id k4L7eN6Q020616 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Sun, 21 May 2006 03:40:24 -0400 Mime-Version: 1.0 (Apple Message framework v750) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: caml-list From: Frederick Akalin Subject: ocamldebug and abstract record types Date: Sun, 21 May 2006 00:40:20 -0700 X-Mailer: Apple Mail (2.750) X-Miltered: at concorde with ID 4470196C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44701969.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamldebug:01 flamewar:01 mli:01 debugger:01 abstr:01 debugger:01 gdb:01 non-trivial:01 debugging:01 debugging:01 toplevel:01 abstract:01 abstract:01 functions:01 data:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 At the risk of starting another flamewar, I have another question. I notice that if I have a record type that's defined in an .mli file, I am able to print objects of that type and see its contents in the debugger. However, if I make that type abstract (only defining it in the .ml file), I am unable to do so, instead seeing "", unless I am in the .ml file where the type is defined. Surely this information is available to the debugger from anywhere in the program? Currently I make most of my types non-abstract simply because it is impossible to debug my programs without being able to check record contents, a practice which I would like to avoid having to do. I am used to gdb, which prints out all a struct's contents regardless of protected/private modifiers, or Perl, which provides a similar facility with the Data::Dumper module. I am aware that the debugger lets you load printing functions, a facility which I am now exploring. Although my first impression is that it requires a non-trivial amount of work, both on the coding and debugging side. Incidentally, how sophisticated is the debugger planned to be? Is it only supposed to be used for quick-and-dirty debugging and not as a replacement for the toplevel? Frederick Akalin