From: Eric Stokes <eric.stokes@csun.edu>
To: "Corey O'Connor" <coreyoconnor@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] <newbie> Debugging mixed ocaml-C code.
Date: Mon, 26 Jul 2004 13:08:53 -0700 [thread overview]
Message-ID: <9E593D9A-DF3F-11D8-BF9D-000A95A1E69A@csun.edu> (raw)
In-Reply-To: <c1291235040722103418486cf0@mail.gmail.com>
On Jul 22, 2004, at 10:34 AM, Corey O'Connor wrote:
> I'm having some troubles wrapping my head around working with both C
> and Ocaml code in the same project. If anybody could answer some
> questions for me that'd be great. :-)
>
> How does ocamldebug behave with mixed ocaml-C code? Can I debug the C
> code within ocamldebug? Or does the C code have to be debugged
> separately from the OCaml code?
gdb should work with C code linked with Ocaml, you should be able to
set a breakpoint
in a C function, and run the caml code which calls the function. I have
also had good luck
with valgrind if you're on x86.
>
> Are there any caveats to using the interactive environment with mixed
> Ocaml-C code?
>
Not many. If your OS does not support dynamic linking, and/or you don't
build
your glue module as a dynamic library then you will need to make a new
custom
toplevel environment. ocamlmktop -custom .... Other than that, and the
fact that
C code is not type safe it is completely transparent.
> Thanks!
> --
> -Corey O'Connor
>
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives:
> http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
> http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2004-07-26 20:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-22 17:34 Corey O'Connor
2004-07-26 20:08 ` Eric Stokes [this message]
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=9E593D9A-DF3F-11D8-BF9D-000A95A1E69A@csun.edu \
--to=eric.stokes@csun.edu \
--cc=caml-list@inria.fr \
--cc=coreyoconnor@gmail.com \
/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