caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Possible Preprocessor and Debugger Interactions
@ 2002-10-08 22:35 Josh Stern
  2002-10-09 12:12 ` Daniel de Rauglaudre
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Stern @ 2002-10-08 22:35 UTC (permalink / raw)
  To: caml-list


I noticed in the OCaml reference manual that it is possible to
load special purpose printing routines for particular types into
ocamldebug.   However there is no mention of a facility to
load a special parser for ad hoc queries about variable values
that one might wish to perform within the debugger, using fragments
from the mini-language accepted by a pre-processor.   

I am thinking, for example of writing a library that allows routines with 
prolog-like variable binding.  Suppose a pre-processor is used to allow 
embedded definitions in a prolog-like syntax, which are pre-processed
into OCaml source code.  For debugging purposes, one would ideally like
to query the variable values using a syntax close to the original source
file.

So my question is "Has anyone has hacked ocamldebug in
this type of way and perhaps has a relevant example to share?"
And my topical thought is that there are potentially substantive 
interactions between a sophisticated pre-processor, ocamldebug, 
and what the compiler does with the '-g' flag.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Possible Preprocessor and Debugger Interactions
  2002-10-08 22:35 [Caml-list] Possible Preprocessor and Debugger Interactions Josh Stern
@ 2002-10-09 12:12 ` Daniel de Rauglaudre
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel de Rauglaudre @ 2002-10-09 12:12 UTC (permalink / raw)
  To: caml-list

Hi

On Tue, Oct 08, 2002 at 05:35:11PM -0500, Josh Stern wrote:

> For debugging purposes, one would ideally like to query the variable
> values using a syntax close to the original source file.

A system like Camlp4 could be installed indeed in the debugger (Camlp4
itself would not help since the grammar of the debugger is not the
grammar of OCaml).

For that, the debugger should call its parsing function through a
refeence. That reference could then be modified to specify another
parsing function. And the debugger should be able to load an object
(cmo) file which could modify that reference.

I don't know if somebody have thought of that or implemented something.
You may try to ask the ocaml team: perhaps somebody could implement it.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-09 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 22:35 [Caml-list] Possible Preprocessor and Debugger Interactions Josh Stern
2002-10-09 12:12 ` Daniel de Rauglaudre

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).