caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nicolas Cannasse <ncannasse@motion-twin.com>
To: caml-list@inria.fr
Subject: [Caml-list] Missing stack frames
Date: Thu, 07 Apr 2011 12:45:57 +0200	[thread overview]
Message-ID: <4D9D95E5.1040701@motion-twin.com> (raw)

Hi,

While debugging the haXe compiler (http://haxe.org, entirely written in 
OCaml) I got a Not_found exception in native mode. However using 
OCAMLRUNPARAM=b was only giving me the first 4-5 stack frames, making it 
impossible to debug.

I noticed that it was caused by an exception raised from a CMXA library 
that was not compiled with -g. That would not be a big issue since I 
don't want to debug the library itself but a lot of my software stack 
frames was also removed.

Is it a known issue ?

I'm using 3.11.0 MSVC on WinXP32 (since there is no 3.12 MSVC available 
yet).

In order to reproduce, you can :

a) download haXe SVN r3766 (binary on http://haxe.cmt.tc/, sources on 
http://haxe.googlecode.com/svn/trunk/

b) create the following file named "Test.hx" :

enum E { A; B; }
class Test {
   public function run() {
     switch(A) { case A: var id = 0; return; case B: var id = 0; }
   }
}

c) compile with "haxe Test.hx"

The full actual stack frame should be :

Fatal error: exception Not_found
Raised at file "pMap.ml", line 107, characters 21-30
Called from file "pMap.ml", line 150, characters 15-20
Called from file "pMap.ml", line 151, characters 21-29
Called from file "codegen.ml", line 686, characters 30-47
Called from file "list.ml", line 69, characters 12-15
Called from file "list.ml", line 69, characters 12-15
Called from file "codegen.ml", line 710, characters 3-27
Called from file "codegen.ml", line 746, characters 3-22
Called from file "codegen.ml", line 798, characters 1-24
Called from file "list.ml", line 74, characters 24-34
Called from file "codegen.ml", line 812, characters 23-66
Called from file "list.ml", line 69, characters 12-15
Called from file "codegen.ml", line 814, characters 3-46
Called from file "list.ml", line 69, characters 12-15
Called from file "main.ml", line 609, characters 2-34
Called from file "main.ml", line 726, characters 0-52

The stack frame we get if extLib (which contains pMap.ml) is not 
compiled with -g is :

Called from file "main.ml", line 609, characters 2-34
Called from file "main.ml", line 726, characters 0-52

Best Regards,
Nicolas

             reply	other threads:[~2011-04-07 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 10:45 Nicolas Cannasse [this message]
2011-04-09  9:33 ` ygrek

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=4D9D95E5.1040701@motion-twin.com \
    --to=ncannasse@motion-twin.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).