Hello Joel, Joel Reymont <joe...@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 -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs