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 33AFEBB9A for ; Wed, 26 Oct 2005 12:20:58 +0200 (CEST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.199]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9QAKvSr025505 for ; Wed, 26 Oct 2005 12:20:57 +0200 Received: by xproxy.gmail.com with SMTP id s17so230977wxc for ; Wed, 26 Oct 2005 03:20:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GcBiM4kXQkzqJ2j0DVVLP5pfEorUXS1/H4VliMbnFqB+MfDISXa3IHfIfxggwD0j06V65KByLKbVgFriJPHK19ZSWQXMIwY697aGQBQpHKJfYwGVrQjhcvu0YjlHLxOueMYeD+kkIU1yLxJLHXbaZ7E+9WTDKDZMsVtAPJkjdVs= Received: by 10.64.208.5 with SMTP id f5mr514735qbg; Wed, 26 Oct 2005 03:20:56 -0700 (PDT) Received: by 10.65.35.7 with HTTP; Wed, 26 Oct 2005 03:20:56 -0700 (PDT) Message-ID: Date: Wed, 26 Oct 2005 23:20:56 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] The Bytecode Interpreter... In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Miltered: at nez-perce with ID 435F5889.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bytecode:01 printf:01 interprete:01 ocamlrun:01 bytecode:01 endline:01 printf:01 endline:01 ocamlc:01 -output-obj:01 argv:01 argv:01 scanf:01 hashtbl:01 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 Hmm, It might not be the interpreter afterall, or at least I'm ending up with some very volatile machine code =3D/ Adding a printf() and a clear_screen() just before "res =3D caml_interprete(caml_start_code, code_size);" startup.c/caml_startup_code, and the problematic code runs fine... So, not sure where the fault lies on this one... =3D/ On 10/26/05, Jonathan Roewen wrote: > Hi once again, > > Hopefully this'll be my last problem to solve ;-) > > I've got ocamlrun + a bytecode app running on the bare metal, finally =3D= ) > > The following works fine: > > print_endline "Hello, World";; > > but, the following fails: > > Printf.printf "Hello, World\n%!";; > > with a print_endline statement before it, not even that gets run, so > it appears to be a problem with loading the bytecode itself. > > The bytecode app is created using ocamlc -output-obj, and the .o file > is linked into my kernel. I then call caml_startup(argv), where argv =3D > { "" }. > > I've also experienced the same problem (appearing to not load/run the > bytecode) when using Scanf & Hashtbl modules (so it's not isolated to > Printf). > > What is the bytecode interpreter trying to do? Any clues? ;-) I'm > trying to debug file open calls and things, but nothing appears to > show up, and I don't get any errors printed to stdout/stderr by the > interpreter. > > Jonathan >