From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id EF6597EEAF for ; Thu, 24 Jan 2013 13:21:14 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of philippe.veber@gmail.com) identity=pra; client-ip=209.85.223.181; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of philippe.veber@gmail.com designates 209.85.223.181 as permitted sender) identity=mailfrom; client-ip=209.85.223.181; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f181.google.com) identity=helo; client-ip=209.85.223.181; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="postmaster@mail-ie0-f181.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkMBAFYmAVHRVd+1m2dsb2JhbABEDoY3t3oIFg4BAQEBAQgJCwkUJ4IVCQEBBAEjHQEbHQEDAQsGAwIDAQc3AgIiAREBBQEcBhOIBwEDCQaQBY8Zi2VPgnuEcgoZJw1ZiHYBBQyPXIETA5YMjmcWKYNcPw X-IronPort-AV: E=Sophos;i="4.84,529,1355094000"; d="scan'208";a="169513425" Received: from mail-ie0-f181.google.com ([209.85.223.181]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jan 2013 13:21:14 +0100 Received: by mail-ie0-f181.google.com with SMTP id 16so15466958iea.12 for ; Thu, 24 Jan 2013 04:21:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ZSSHxOq55R05wPPFGnXQfGnu/h3eoBIKnMzchJOuoBU=; b=v69GjfkfFSoqXda5T1GI02ArKxG8nfsdGpuMQl2wkyHAT+lXlO1Ez1XKKFZfc0Ol44 pI9sxblsWESQrWpdsNAH1obiiLkFFLentj/C86jB7cTdXru81mzygCg97O6TiD7HZP1M T0YcyOxXQSVSqnJlOd+ww365w19hp69buQQH01ddePxcg454ZzraUx4hiAIHKdSE9a5/ RXXEhAo/FNqabhRXosQActQq0RVtP0y6tjgIUZs4cHSluUxmmvhdWSZhWI0Zj4s/QyMH B3IJCZ7QXMluC78Mph871rFj5c0SWalBSijRGHLDt9HsOKFiSZGnsmQFdmIu+4iTeGD+ 3+Iw== X-Received: by 10.50.170.66 with SMTP id ak2mr1293623igc.38.1359030072910; Thu, 24 Jan 2013 04:21:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.6.226 with HTTP; Thu, 24 Jan 2013 04:20:52 -0800 (PST) In-Reply-To: <24b397e9.3d7.13c6c7b5296.Coremail.syshen@nudt.edu.cn> References: <24b397e9.3d7.13c6c7b5296.Coremail.syshen@nudt.edu.cn> From: Philippe Veber Date: Thu, 24 Jan 2013 13:20:52 +0100 Message-ID: To: =?UTF-8?B?5rKI6IOc5a6H?= Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=e89a8f2351a9bc222604d407d839 X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] :: how to locate the source of exception --e89a8f2351a9bc222604d407d839 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Shen, you can run your program in bytecode setting the OCAMLRUNPARAM correctly and you'll see the whole backtrace, like in OCAMLRUNPARAM=3Db ./myprogram hope this helps, Philippe. 2013/1/24 =E6=B2=88=E8=83=9C=E5=AE=87 > Dear all: > > My program written in ocaml terminate with the following output: > > Fatal error: exception Invalid_argument("index out of bounds") > > > So how should I find out the lcoation in source code that raise this > exception? > > Shen > --e89a8f2351a9bc222604d407d839 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Shen,

you can run your program in bytecode setting the OCAMLRUN= PARAM correctly and you'll see the whole backtrace, like in

OCAM= LRUNPARAM=3Db ./myprogram

hope this helps,
=C2=A0 Philippe.

2013/1/24 =E6=B2=88=E8=83=9C=E5=AE=87 <syshen= @nudt.edu.cn>
Dear all:

My program written in ocaml terminate with the= following output:

Fatal error: exception Inv= alid_argument("index out of bounds")


So how should I find out the lcoation in source code th= at raise this exception?

Shen

--e89a8f2351a9bc222604d407d839--