Re: [agide] ocaml debugger support

Bram Moolenaar <[email protected]>
Newsgroups gmane.editors.vim,gmane.comp.tools.aap.devel
Message-ID <[email protected]>
[ This is more an A-A-P question than a Vim question. ]

Stefano Zacchiroli wrote:

>   I'm an ocaml programmer and a vim user. Unfortunately the ocaml world
> is 95% made of emacs user and life for we vimers is really hard ...
> Still, OCaml vim support has increased a lot and now we have proper
> syntax highlight, indentation and I've just written support for inquiry
> of the type of an expression at a given cursor position in vim-python.
> 
> The feature that now I miss more is support for the ocamldebugger, which
> is working properly under emacs. I know that there is no way to
> implement that directly in vim, but I've googled a bit about agide.
> 
> I've had a look at it, but I have no time (yet) to study the internals.
> 
> Still I think that the DebugTool should be generic, shouldn't it?
> Knowing the ocamldebug interface, how hard it will be to extend
> DebugTool (or write a new OCamlDebugTool) to support ocaml debugging?
> 
> ocamldebug is really similar to gdb and has a simple stdin/stdout
> interface ... the only notably difference is that it support going not
> only forward but also backward during the debugging of a program.

Agide was indeed made with the intention that other debuggers can be
supported.  How this can be implemented depends on how the debugger
works exactly.

Unfortunately, there is no simple interface for a debugger.  Most
commands towards the debugger can be done as if you typed them, that is
easy.  But obtaining info requires parsing what the debugger sends back.

You could start with the GDB implementation.  Making a copy of
DebugTool.py and then fixing things that don't work.  If ocamldebug is
really much like gdb it might be possible to tweak DebugTool directly.

-- 
hundred-and-one symptoms of being an internet addict:
241. You try to look for Net Search even when you're in File Manager.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.