* [Caml-list] debugging hints and camlp4 macros
@ 2002-06-11 9:12 Basile STARYNKEVITCH
2002-06-13 6:58 ` Daniel de Rauglaudre
0 siblings, 1 reply; 2+ messages in thread
From: Basile STARYNKEVITCH @ 2002-06-11 9:12 UTC (permalink / raw)
To: caml-list
Dear All,
Does anyone have debugging hints, particularily when coding a
server. (See on http://www2.poesia-filter.org:8000/ the CVS of
PoesiaSoft/PoesiaMonIcap - it is GPL-ed opensource code).
I am coding an ICAP server (ICAP = Internet Content Adaptation
Protocol, see www.i-cap.org is a textual protocol similar to HTTP in
spirit) .
I find the Ocaml debugger difficult to use (even under emacs). For
example, I cannot interactiveley interrupt the debugged program. And
the debugger does not reload automatically the program after a
recompilation.
I am using Printf.eprintf to debug. But I would like to add a more
parameterable debugging code.
Does anyone have any hints or Camlp4 code for that. In particular, I
am missing the equivalent of (in C, using Gnu GCC preprocessor
extensions)
#define dbgprintf(Fmt, Args...) printf("@@ " __FILE__ ":%d: " Fmt "\n", __LINE__, ##Args)
or even
#define dbgprintf(Fmt, Args...) {if (qish_debug) \
printf("%s:%d@%s!! " Fmt "\n", __FILE__, __LINE__, __FUNCTION__, ##Args);}
a macro used like
dbgprintf("here i=%d", i);
BTW, a feature I am missing in Camlp4 (and I do thanks Daniel de
Rauglaudre for his Camlp4) is to mix preprocessOR and preprocessED
source code in the same file.
Regards.
N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
---------------------------------------------------------------------
Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique * France
DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX
phone:+33 1,6908.6055; fax: 1,6908.8395 home: 1,4665.4553; mobile: 6,8501.2359
work email: Basile point Starynkevitch at cea point fr
home email: Basile at Starynkevitch point net
-------------------
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] debugging hints and camlp4 macros
2002-06-11 9:12 [Caml-list] debugging hints and camlp4 macros Basile STARYNKEVITCH
@ 2002-06-13 6:58 ` Daniel de Rauglaudre
0 siblings, 0 replies; 2+ messages in thread
From: Daniel de Rauglaudre @ 2002-06-13 6:58 UTC (permalink / raw)
To: caml-list
Hi,
On Tue, Jun 11, 2002 at 11:12:56AM +0200, Basile STARYNKEVITCH wrote:
> Does anyone have any hints or Camlp4 code for that. In particular, I
> am missing the equivalent of (in C, using Gnu GCC preprocessor
> extensions)
> #define dbgprintf(Fmt, Args...) printf("@@ " __FILE__ ":%d: " Fmt "\n", __LINE__, ##Args)
> [...]
I started something like that some time ago, to provide a general
extension allowing to create one's macros (pa_macros.ml), but not
terminated.
--
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-06-13 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-11 9:12 [Caml-list] debugging hints and camlp4 macros Basile STARYNKEVITCH
2002-06-13 6:58 ` 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