From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id BCD7EBC57 for ; Tue, 2 Mar 2010 08:36:15 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsUAAEFOjEsmachzmWdsb2JhbACbBhUBAQEBAQYNCgcTIr1XhHsEjjQ X-IronPort-AV: E=Sophos;i="4.49,564,1262559600"; d="scan'208";a="45796091" Received: from mx2.janestreet.com ([38.105.200.115]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Mar 2010 08:36:15 +0100 Received: from nyc-qsv-mail1.delacy.com ([172.25.22.57]) by mx2.janestreet.com with esmtp (Exim 4.71) (envelope-from ) id 1NmMeK-0005JW-AU for caml-list@yquem.inria.fr; Tue, 02 Mar 2010 02:36:12 -0500 Received: from nyc-qsv-004.delacy.com ([172.25.22.194] helo=qsmtp.delacy.com) by nyc-qsv-mail1.delacy.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.71) (envelope-from ) id 1NmMeK-0001in-96; Tue, 02 Mar 2010 02:36:12 -0500 Received: from lon-qws-r01.delacy.com ([172.30.3.51] helo=lon-qws-r01) by qsmtp.delacy.com with smtp (Exim 4.71) (envelope-from ) id 1NmMeI-0007Aa-Rf; Tue, 02 Mar 2010 02:36:11 -0500 Received: by lon-qws-r01 (sSMTP sendmail emulation); Tue, 2 Mar 2010 07:36:10 +0000 From: "Mark Shinwell" Date: Tue, 2 Mar 2010 07:36:10 +0000 To: Jianzhou Zhao Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Debugging C and OCaml Message-ID: <20100302073610.GG26002@janestreet.com> References: <9dfe358d1003010710r69799c1duae37c42a3725b899@mail.gmail.com> <20100301151940.GD26002@janestreet.com> <9dfe358d1003011648g58c07831p9b27bc76276a9461@mail.gmail.com> <9dfe358d1003011652p5732e592t465468d0d8a64b42@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9dfe358d1003011652p5732e592t465468d0d8a64b42@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam: no; 0.00; shinwell:01 ocaml:01 ocaml:01 runtime:01 runtime:01 compilation:01 compilation:01 zhao:98 wrote:01 readable:01 caml-list:01 functions:01 native:03 native:03 seems:03 On Mon, Mar 01, 2010 at 07:52:01PM -0500, Jianzhou Zhao wrote: > > It seems that OCaml runtime is interpreting via 'caml_interprete' the > > OCaml function which C > > calls at runtime. If this is true, we cannot really debug that OCaml > > function, but we can > > see how it is interpreted. But I guess we can debug the real assembly if I do > > native compilation. > > If we do native compilation, will each OCaml function be assembled to > a function in assemly with a readable name? That will help a lot while > reading the assemly code. The names are mangled, but it's pretty easy to work out what they correspond to, except in the case of anonymous functions where you may need to do some detective work. Mark