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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id CE7A3BB9A for ; Tue, 15 Nov 2005 06:03:15 +0100 (CET) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAF53FEP017078 for ; Tue, 15 Nov 2005 06:03:15 +0100 Received: by xproxy.gmail.com with SMTP id t5so1397760wxc for ; Mon, 14 Nov 2005 21:03:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IcTC2auxOjP2hHtTGiveaC31ROEsRXxoF3KGPereOr02GdoiQXM11294+e+txh65wHrJDr5z6wvvBLm3LKf444u1pWdABTxZK3DzbfU84ltTO4ZrQTwznE4L1SkTWtDGvUi4ZWxwJHhcPMN/yc3Qz0GmBlyhktzlEgy2jGjtI4Y= Received: by 10.64.201.3 with SMTP id y3mr6646801qbf; Mon, 14 Nov 2005 21:03:14 -0800 (PST) Received: by 10.64.10.5 with HTTP; Mon, 14 Nov 2005 21:03:14 -0800 (PST) Message-ID: Date: Tue, 15 Nov 2005 18:03:14 +1300 From: Jonathan Roewen To: skaller Subject: Re: [Caml-list] ocamlc -output-obj problems Cc: caml-list@yquem.inria.fr In-Reply-To: <1132028623.11813.99.camel@rosella> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1132028623.11813.99.camel@rosella> X-Miltered: at nez-perce with ID 43796C13.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlc:01 -output-obj:01 ocaml:01 bytecode:01 debugging:01 interprete:01 bytecode:01 printf:01 printf:01 simpler:01 functions:01 kernel:01 argument:01 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > Maybe one of those is actually being used? > > Your basic argument is: > > (a) the make process works for normal Ocaml > (b) you removed only unused functions from one library being linked in > by stubbing them out > (c) now it crashes > > =3D=3D> contradiation. > > Clearly the most likely is that (b) is wrong :) Perhaps, but I've tried adding a few, and can't find anything. Anyways, how can I find out what the given bytecode instruction is? I've added some debugging to caml_interprete() to list the how many instructions have passed. Here's an even simpler example of what causes my bytecode to 'crash': external print_string: string -> unit =3D "my_print_string";; let printf args =3D Printf.ksprintf print_string args;; print_string "Kernel shutting down..";; the declaration of printf above causes it to fail. comment it out, it's fin= e. Jonathan