From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA05755 for caml-redistribution; Thu, 4 Mar 1999 19:57:42 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA14352 for ; Thu, 4 Mar 1999 18:01:30 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id SAA27106; Thu, 4 Mar 1999 18:01:27 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA02324; Thu, 4 Mar 1999 18:01:27 +0100 (MET) Message-ID: <19990304180127.57187@pauillac.inria.fr> Date: Thu, 4 Mar 1999 18:01:27 +0100 From: Xavier Leroy To: Manuel Fahndrich , "'caml-list@inria.fr'" Subject: Re: Debugger under Windows... References: <25983782061AD111B0800000F86310FE1026CB4B@RED-MSG-42> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <25983782061AD111B0800000F86310FE1026CB4B@RED-MSG-42>; from Manuel Fahndrich on Wed, Mar 03, 1999 at 01:50:07PM -0800 Sender: weis > What would be involved in porting the OCAML debugger to Windows? > - Is the problem just the debugger application and the graphical user > interface, or > - the generation of debuggable OCAML code by the compiler under windows. > I'm especially interested in the native code debugger, but even a bytecode > debugger would be useful under Windows. OCaml doesn't support debugging of native code on any platform. Well, you can use gdb to debug at the assembly level, but I don't recommend it... Concerning bytecode debugging under Windows, the major issue is the way our debugger performs periodic checkpointing of the running program (in order to implement reverse execution). We just use the Unix fork() system call, which does everything we want (checkpointing of memory and file descriptors, using lazy copy-on-write to minimize copying). Unfortunately, Win32 doesn't have any equivalent to fork(). The POSIX subsystem of NT does have fork(), but is otherwise unusable (no sockets, no GUI, etc). I looked hard on the Web but couldn't find any general-purpose checkpointing library for Win32. Some Unix compatibility libraries provide decent emulations of fork() (although they run a bit slowly). This is the case for Cygnus's Cygwin system. However, Cygwin doesn't support threads, and I doubt that it supports some other Win32 features that are important for us, such as COM. So, the current alternatives are: - Port the debugger without the replay facilitity. Unfortunately, that would make it a lot less usable. - Recompile the whole OCaml system with Cygwin gcc instead of Microsoft VC++. We'd lose threads and probably more. - Find or write a decent checkpointing facility for Win32. Any help with this would be great. All the best, - Xavier Leroy