From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A6F87BC6C for ; Wed, 6 Feb 2008 19:22:53 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJiJqUfAXQInh2dsb2JhbACQMgEBAQgKKZYvhic X-IronPort-AV: E=Sophos;i="4.25,313,1199660400"; d="scan'208";a="7721840" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 06 Feb 2008 19:22:53 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m16IMrj1002631 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 6 Feb 2008 19:22:53 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAA+KqUfRVY6+nmdsb2JhbACQMgEBAQEBBgQGBwoYljCGIw X-IronPort-AV: E=Sophos;i="4.25,313,1199660400"; d="scan'208";a="22308253" Received: from ti-out-0910.google.com ([209.85.142.190]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Feb 2008 19:22:51 +0100 Received: by ti-out-0910.google.com with SMTP id b8so322402tic.9 for ; Wed, 06 Feb 2008 10:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Pm/xIpYLDJKafQH4/0CH3Og/63nldZdRxDGact4bxGs=; b=qB0tSuwvnIklAmGBcA/aDUZb9utQz+1sJCPa1sgbUGcWLL8yyRyb6wbCvHX34Q4HUAAyUkRSahDT5h1cspnAg8nWEfiKk+ck5Y5QJ5X8DJmugNDnCyLOL14/nw+DirhiW/8LkcnUKhp5m169TDrDzOqilLVz8MFiPW0KpC0Ui9w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BDcATlaCVUab1GTAwG786yT7fJs2CDIjWujuKBoam9qzZD4sgd9boMHrvMJcTrPw0XwXSHa3btTpMxqfuJQHKJVJO4zt2ofnjMAVK5p8VH6HxiyfYyEHrt7koBQh6gUG7K+rqbt56AabvKpWvT8NWuhcUxcjUIWRMCN7DUNkjOA= Received: by 10.110.62.14 with SMTP id k14mr5427201tia.18.1202322169081; Wed, 06 Feb 2008 10:22:49 -0800 (PST) Received: by 10.110.26.14 with HTTP; Wed, 6 Feb 2008 10:22:49 -0800 (PST) Message-ID: <90823c940802061022j4135581cp7a086cc5f03379d5@mail.gmail.com> Date: Wed, 6 Feb 2008 21:22:49 +0300 From: "Dmitry Bely" To: "Xavier Leroy" Subject: Re: [Caml-list] Ocaml debugger under Windows Cc: "Alain Frisch" , ocaml In-Reply-To: <47A9EA89.5050407@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <90823c940802050146u7cac0aape4e72b4fc6a3089@mail.gmail.com> <47A83251.7010306@frisch.fr> <90823c940802050923h77a95192gdabcd9c0807dccd6@mail.gmail.com> <47A9EA89.5050407@inria.fr> X-Miltered: at concorde with ID 47A9FAFD.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 debugger:01 ocamldebug:01 ocaml:01 trivial:01 debugger:01 ocamldebug:01 sockets:01 descriptors:01 pitfalls:01 cygwin:01 threads:01 threads:01 wrote:01 unix:01 On Feb 6, 2008 8:12 PM, Xavier Leroy wrote: > Hello Dmitry, > > I'm delighted to see your attempts at getting ocamldebug to work under > Windows. > > Generally speaking, the Windows port is the part of OCaml where we > most desperately need outside help, as (1) it consumes quite a bit of > my very limited time, (2) it's a cost center for the Caml development > team (none of us uses Windows for our research activities), and (3) > none of us is competent with Win32 programming. > > (For example, if anyone could help debugging PR#4399, that would be > much appreciated.) Alas, I have not migrated to Vista yet. But once the reporter has Visual C++ experience I would recommend him to build OCaml from sources with debug info enabled (if won't compile out-of-the-box but the fix is trivial) and launch ocamlwin under debugger. When it should become obvious where the access violation occurs. > Coming back to ocamldebug: > > > The point is not to modify win32unix library or write Win32-specific C > > functions for ocamldebug. I believe it's necessary to be ever accepted > > by INRIA. > > Actually, I would be happy with a Win32 implementation of Unix.select > that works over any combination of sockets and file descriptors. > Unfortunately, it looks like we'd need a gross hack involving threads, > WaitForMultipleObjects() and select(), but if someone comes up with an > implementation that isn't too gross, I'll be interested. Indeed, porting select() to Windows would be preferable. WaitForMultipleObjects() can wait for console, pipe and network events simultaneously so this should not be that hard (and multiple threads are probably not necessary). Of course, there are some pitfalls like this (taken from Cygwin sources): /* Some types of object (e.g., consoles) wake up on "inappropriate" events like mouse movements. The verify function will detect these situations. If it returns false, then this wakeup was a false alarm and we should go back to waiting. */ But at least I'll try. - Dmitry Bely