From: "Dmitry Bely" <dmitry.bely@gmail.com>
To: ocaml <caml-list@inria.fr>
Subject: Ocaml debugger under Windows
Date: Tue, 5 Feb 2008 12:46:26 +0300 [thread overview]
Message-ID: <90823c940802050146u7cac0aape4e72b4fc6a3089@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
The topic has a long history [1], but since then nothing has actually
changed. It's easy to understand: INRIA people are busy and there are
probably quite few Ocaml users in the Windows land to worry about. So I
decided to do something myself :) (as it was with mingw port several years
ago).
Let's go into detail. Ocam debugger consists of the the two parts: the
client (byterun/debugger.c linked into debuggee) and the server
(ocamldebug). The following issues should be addressed to make a Windows
port:
1. Checkpointing is done via Unix fork() (client)
The most problematic one. I have spend a fair amount of time trying to find
an acceptable solution.
a) direct port of fork() to Windows. There is a BSD-licenced Windows fork()
in tcsh sources [2] that could be used. It's based on Cygwin ideas. But how
to handle dynamically loaded DLLs (loaded via LoadLibrary())? I asked the
author (Amol Deshpande) and he replied:
"DLLs that are dynamically loaded are a can of worms. I would not support
those if I were you."
BTW, does Cygwin do this right? I doubt at least.
b) some checkpoint library. Although Web search gives many references, e.g.
[3], I have not found yet anything ready-to-use, even commercial!
2. Unix select (server)
It is a problem because server waits for network and console events
simultaneously. To work on Windows the main loop should probably be
multi-threaded.
3. Unix sockets (client & server)
Probably can be ignored. Internet sockets are quite enough.
So what is done now.
- Client
It's ported without (1) and (3). To me it's quite usable even without
checkpoints.
- Server
I don't bother to do (2) right now (until the whole idea is accepted).
Currently I use cygwin-compiled ocamldebug with checkpoints and Unix sockets
disabled by default. It works well with the native Win32 clients.
- OcaIDE
Yes, with minor changes in OcaIDE the debugged works there.
If it's interesting for anyone I can publish a patch against Ocaml 3.10.1
- Dmitry Bely
[1]
http://caml.inria.fr/pub/ml-archives/caml-list/1999/03/f44178e212e78826bcbdee52ddf6fd91.en.html
http://caml.inria.fr/pub/ml-archives/caml-list/2002/10/ed776d7376ed7a9676d4a9981372ccdf.fr.html
[2] http://www.tcsh.org/MostRecentRelease
[3]
http://www.usenix.org/publications/library/proceedings/usenix-nt98/full_papers/srouji/srouji_html/srouji.html
[-- Attachment #2: Type: text/html, Size: 2950 bytes --]
next reply other threads:[~2008-02-05 9:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 9:46 Dmitry Bely [this message]
2008-02-05 9:54 ` [Caml-list] " Alain Frisch
2008-02-05 17:23 ` Dmitry Bely
2008-02-05 17:40 ` Benedikt Grundmann
2008-02-05 19:39 ` Dmitry Bely
2008-02-05 21:00 ` Alain Frisch
2008-02-06 8:56 ` Dmitry Bely
2008-02-06 17:12 ` Xavier Leroy
2008-02-06 18:22 ` Dmitry Bely
2008-05-03 18:39 ` Dmitry Bely
2008-02-08 13:27 ` Kuba Ober
2008-02-08 16:33 ` Dmitry Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90823c940802050146u7cac0aape4e72b4fc6a3089@mail.gmail.com \
--to=dmitry.bely@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).