caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] ocamldebug question
Date: Sun, 14 Oct 2012 14:19:18 +0100	[thread overview]
Message-ID: <507ABBD6.9040405@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]

Hello,

I have decided to play a little with ocamldebug.
Stepping through programs that rely on the standard library works fine.
I can step into functions defined in stdlib and see the relevant source
code.

I am trying to figure out how to do similar thing with batteries.

This directory:

	/home/me/godi/lib/ocaml/pkg-lib/batteries

contains installed "batteries included" library.

This directory:

	/home/me/godi/build/distfiles/batteries-1.4.1/src

contains its source code.
(Where library was in

I have a small testing program like this:

  open Batteries_uni

  let v = Vect.of_list ["foo"; "bar"; "baz"]

  ;;

  Vect.iter print_string v;
  print_newline ();

I start the debugger:

  $ ocamldebug -I /home/me/godi/build/distfiles/batteries-1.4.1/src \
               -I /home/me/godi/lib/ocaml/pkg-lib/batteries \
               main

I set up a breakpoint at some convenient place:

  (ocd) break @ Main 1
  Loading program... done.
  Breakpoint 1 at 1129200 : file main.ml, line 3, characters 9-43

and try to go on:

  (ocd) run
  Time : 47989 - pc : 1129200 - module Main
  Breakpoint : 1
  3 let v = Vect.of_list ["foo"; "bar"; "baz"]<|a|>

Now, when I try to step into the Vect.of_list function:

  (ocd) step

I get a complaint:

  Time : 47990 - pc : 808516 - module BatVect
  No source file for BatVect.

I can continue with debugging, but I cannot display the corresponding
source-code.

Now, I am not sure what to do. Is there any way how can I use ocamldebug
and, when necessary, step also into modules bundled by batteries.cma?

I have attached listing of the contents of the two corresponding
directories.

Thanks in advance, for any [clues; hints; help].

[-- Attachment #2: listing.txt.gz --]
[-- Type: application/gzip, Size: 2734 bytes --]

             reply	other threads:[~2012-10-14 13:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 13:19 Matej Kosik [this message]
2013-08-09 10:53 Matej Kosik
2013-08-09 10:59 ` Daniel Bünzli

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=507ABBD6.9040405@gmail.com \
    --to=5764c029b688c1c0d24a2e97cd764f@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).