Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocamldebug and windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-21 (13:21)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] ocamldebug and windows
> I am just curious why ocamldebug cannot work in the native Win32
> Ocaml. Having searched the mailing list archives, I found the following
> Xavier Leroy's article
> where he explains that two main problems are (1) absense of checkpointing
> facilities and (2) absense of unix sockets equivalent.
> Ocaml debugger normally implements checkpoins via fork() syscall, which is
> not available under Win32. But why simply not to use
> ReadProcessMemory()/WriteProcessMemory() Win32 API functions to
> save/restore the process memory image?

You need a bit more than this: file and socket handles also need some
checkpointing (of the kind that fork() does on file descriptors in the
Unix world).

> I think it should be relatively
> easy (BTW Cygwin uses these functions in its fork() implementation).

Yes, and I've looked at the fork() implementation in Cygwin.  It's a
remarkable engineering feat, but not something that I'd call
"relatively easy" :-)

> As for Unix sockets, Win32 has almost the same thing: named pipes.

Agreed, this isn't a show-stopper.

> So maybe is time to bring ocamldebug to Win32? :-)

As soon as someone writes a decent process checkpointing library for
Win32 :-)

- Xavier Leroy
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: