caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ivan Gotovchits <ivg@ieee.org>
To: Tom Ridge <tom.j.ridge+list@googlemail.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] OCamldebug
Date: Thu, 23 Feb 2017 11:31:25 -0500	[thread overview]
Message-ID: <CALdWJ+zWf-H28K7Y-kxLs3ddh5_RsJrG8gV9RG5aX0k5DRBzhA@mail.gmail.com> (raw)
In-Reply-To: <CABooLwOsurM8bsdUzz0AkaaKiuxWqHdE7H62bcEAnZs1=3HMzg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Probably it is an abstract type, that is represented as string. In any case
you can use the `#install_printer` directive to enable printing any type.
The argument
is a function of type `t -> Format.formatter -> unit`, where `t` is a name
of your type.

On Thu, Feb 23, 2017 at 11:24 AM, Tom Ridge <tom.j.ridge+list@googlemail.com
> wrote:

> Dear All,
>
> I am debugging some code. For various reasons I have started to use
> ocamldebug rather than printf.
>
> I should say that ocamldebug is excellent. Really excellent. Especially
> the "backwards" stepping.
>
> However, sometimes I want to see the value of a particular variable. I can
> use the "p" (print) command as:
>
> (ocd) p kra
> kra: Key_value_types.key = <abstr>
>
> The problem is that I know that kra is a string. But ocamldebug only shows
> <abstr>.
>
> Admittedly the code is functorized. But I have a feeling I should be able
> to tweak something to get ocamldebug to print the value of kra.
>
> Any ideas?
>
> T
>

[-- Attachment #2: Type: text/html, Size: 1594 bytes --]

  reply	other threads:[~2017-02-23 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 16:24 Tom Ridge
2017-02-23 16:31 ` Ivan Gotovchits [this message]
2017-02-23 16:49   ` Tom Ridge
2017-02-23 17:02     ` Ivan Gotovchits
2017-02-24  9:16       ` Tom Ridge
2017-02-24  9:20         ` Tom Ridge
2017-02-24  9:28         ` Sébastien Hinderer
2017-02-24  8:41     ` Sébastien Hinderer
2017-02-24  9:14       ` Tom Ridge

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=CALdWJ+zWf-H28K7Y-kxLs3ddh5_RsJrG8gV9RG5aX0k5DRBzhA@mail.gmail.com \
    --to=ivg@ieee.org \
    --cc=caml-list@inria.fr \
    --cc=tom.j.ridge+list@googlemail.com \
    /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).