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 09890BBBB for ; Wed, 25 Jan 2006 22:29:45 +0100 (CET) Received: from web30505.mail.mud.yahoo.com (web30505.mail.mud.yahoo.com [68.142.200.118]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id k0PLThkb025661 for ; Wed, 25 Jan 2006 22:29:44 +0100 Received: (qmail 92350 invoked by uid 60001); 25 Jan 2006 21:29:43 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Eyi1XVWhuug/l1FzQkeMb+OJUAWWbDNvlHSlhArq68botDPSiVIzYVkBtA4ZXUFBx7mZzg7EeooKUpnWBl9n6XtNPe/bldArT2HE/jm0eFkl25uyNtT6YYpdaNcVIqMr3yrCAlGZi+C0UGAvhkh2KtNxrZ9qcfShs5V5NYrTTww= ; Message-ID: <20060125212943.92348.qmail@web30505.mail.mud.yahoo.com> Received: from [216.73.248.39] by web30505.mail.mud.yahoo.com via HTTP; Wed, 25 Jan 2006 13:29:43 PST Date: Wed, 25 Jan 2006 13:29:43 -0800 (PST) From: vinh le sy Subject: Debugging problem To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 43D7EDC7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; debugging:01 debugging:01 val:01 mutable:01 ocamlc:01 ocamlc:01 -custom:01 cmo:01 debugger:01 debugger:01 cmo:01 compile:01 int:01 defined:01 newline:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=5.0 tests=DNS_FROM_RFC_ABUSE, FORGED_YAHOO_RCVD autolearn=disabled version=3.0.3 Hi all, I am debugging using camldebugger. I got the same problem as Robin posted few years ago. Here comes the problem: Let's take a simple example (took from the manual): (***** File essai.ml *******) class point = object val mutable x = 0 method get_x = x method move d = x <- x + d end;; let my_p = new point;; (****************************) In order to print the value x of my_p, I separately defined a printer function as (***** File essai_printer.ml *******) open Format let my_print_point s = open_box 0; print_string ("The point is situated at" ^ string_of_int (s#get_x)); print_space (); close_box (); print_newline () ;; Here are the steps I followed: 1. Compile essai.ml and essai_printer.ml ocamlc -c -g essai.ml ocamlc -c -g essai_printer.ml 2. Create the executable file "essai" ocamlc -custom -g -o essai essai.cmo 3. Launch the debugger on the file "essai" 4. load the printer (I show also the answer of the debugger) (ocd) load_printer "essai_printer.cmo" File ./essai_printer.cmo loaded 5. install the printer function my_print_point (ocd) install_printer Essai_printer.my_print_point 6. ....put a breakpoint immediately after the definition of my_p 7. print my_p (ocd) p my_p my_p : point = Do anyone know the solution for the problem? Thank you, VInh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com