caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: vinh le sy <vinhioi@yahoo.com>
To: caml-list@yquem.inria.fr
Subject: Debugging problem
Date: Wed, 25 Jan 2006 13:29:43 -0800 (PST)	[thread overview]
Message-ID: <20060125212943.92348.qmail@web30505.mail.mud.yahoo.com> (raw)

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 = <cannot fetch remote object>


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 


             reply	other threads:[~2006-01-25 21:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25 21:29 vinh le sy [this message]
2006-01-26  0:54 ` [Caml-list] " Jacques Garrigue

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=20060125212943.92348.qmail@web30505.mail.mud.yahoo.com \
    --to=vinhioi@yahoo.com \
    --cc=caml-list@yquem.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).