OCaml language support for gdb

Yao Qi qiyaoltc@gmail.com
Mon Oct 24 11:33:00 GMT 2016


Hi Mark,

On Mon, Oct 10, 2016 at 3:30 PM, Mark Shinwell <mshinwell@janestreet.com> wrote:
> The ocaml-lang.c file in gdb defers basically all functionality to
> libmonda, which is a shared library dynamically loaded into gdb as
> required.  The library is written almost entirely in OCaml with a
> small portion in C.  It is statically linked against both the OCaml
> runtime code and the OCaml compiler library.  The majority of the
> library is parameterised over the particular debugger being
> used---currently there is only a gdb implementation, but others are
> likely to follow (in particular for lldb; and also perhaps a
> "debugger" which is actually implemented by a program introspecting
> itself, for testing purposes).  In the case of libmonda for gdb, the
> library calls back into gdb itself to perform tasks such as reading
> target memory, etc.

Please add some gdb tests for OCaml language if you haven't done
that.   You can make use of unittest framework to test OCaml lexer,
if any, in GDB too.  Take a look at gdb/testsuite/gdb.gdb/unittest.exp
and commit dcd1f97951b432032fd0728992b1384064663701

> The combination of licences involved in a gdb executable using this
> new functionality, that is to say: gdb (GPLv3), libmonda (MIT) and the
> OCaml core system (LGPLv2.1 + linking exception) deserves some
> attention.  To the best of my knowledge the combination of GPLv3, MIT
> and LGPLv2.1 "used as a library" is compatible (cf.
> https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility).  However
> the OCaml core system has an exception [4] which makes its license
> slightly more permissive than the LGPLv2.1.  I presume that the FSF
> would have to attest that this would be compatible with the GPLv3.
> (If one of the gdb maintainers has a contact with whom I could enquire
> about this, I would be grateful.)
>

I don't know much on this.  The Official FSF-appointed GDB Maintainers
are right people to ask, and they may have the answer or direct you to
the right people in FSF.  I cc'ed them.

> I would be pleased if a maintainer could provide information on the
> current requirements/forms regarding copyright assignment.  My
> CodeSourcery one will be out of date now.  Much of this work has been
> conducted on work time at my current employer, Jane Street, who would
> need to be involved in such assignment.

https://sourceware.org/gdb/wiki/ContributionChecklist#FSF_copyright_Assignment
You need the 3rd form, request-assign.future.

Looking forward to your contribution....

-- 
Yao (齐尧)



More information about the Gdb mailing list