From: Wojciech Meyer <wojciech.meyer@googlemail.com>
To: Joel Reymont <joelr1@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] debugging c wrappers
Date: Fri, 04 May 2012 23:28:32 +0100 [thread overview]
Message-ID: <wf4nrv7f8v.fsf@gmail.com> (raw)
In-Reply-To: <CAOQwdX2tiD3U0urR_x61RLUVwAbiFqRV9dbEEabM2nKWFtA0gw@mail.gmail.com> (Joel Reymont's message of "Fri, 4 May 2012 21:56:51 +0100")
Hello Joel,
Joel Reymont <joelr1@gmail.com> writes:
> How do I look inside the values in C functions called from OCaml when
> running in gdb?
>
> I swear there's a way but I don't remember it now.
>
> For example, I want to check if a particular value is a variant
> constructor and whether its first argument is a closure.
>
> Help!
In general case this is not currently possible, but I think there is
some work going on by OCamlPro for better gdb integration [1], if you
are talking about showing precise types - as it needs some extra debug
information.
To see if it's a variant constructor, array, string or closure etc. you
can look at the tag however.
There is a Python script by Ygrek [2] that probably to some extent does what
you want.
- Wojciech
[1] http://caml.inria.fr/mantis/view.php?id=5487
[2] http://ygrek.org.ua/p/code/mlvalues.py.html
next prev parent reply other threads:[~2012-05-04 22:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 20:56 Joel Reymont
2012-05-04 22:28 ` Wojciech Meyer [this message]
2012-05-05 12:16 ` Goswin von Brederlow
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=wf4nrv7f8v.fsf@gmail.com \
--to=wojciech.meyer@googlemail.com \
--cc=caml-list@inria.fr \
--cc=joelr1@gmail.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