axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: debugging


From: Camm Maguire
Subject: Re: [Axiom-developer] Re: debugging
Date: 13 Jul 2007 22:04:26 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Greetings!  And thanks for the report!

Waldek Hebisch <address@hidden> writes:

> I wrote:
> > > Greetings!  
> > > 
> > > Previous message a false alarm, as my fresh build just failed, though
> > > not with any segfault.  Again, but in a different place:
> > > 
> > > (DEFUN |DFLOAT;base;Pi;7| ($)
> > >   (PROG ()
> > >     (RETURN
> > >       (FLOAT-RADIX
> > >           '#1=#((|DoubleFloat|)
> > >                 (#<compiled-function |lookupComplete|> #1#
> > > 
> > > 
> > > Same function that you found with the objnull.  Question -- what
> > > function(s) write this source?
> > > 
> > 
> > There are several functions involved.  In case of #<OBJNULL> using
> > traces I see that |compDefineCapsuleFunction| function (defined
> > in 'define.boot.pamphlet') gets:
> > 
> >  1> (|compDefineCapsuleFunction|
> >          (DEF (|base|) (NIL) (NIL)
> >               ((|elt| |Lisp| FLOAT-RADIX) (|elt| $ (|Zero|))))
> > ...
> > ...
> > 

In which package is this?  Is it present in interpsys?

> > 
> > It seems that (|elt| $ (|Zero|)) give us '#<OBJNULL>.  |elt| is
> > handled in 'compiler.boot.pamphlet':
> > 
> > 
> >     2> (|compForm1| ((|elt| |Lisp| FLOAT-RADIX) (|elt| $ (|Zero|)))
> > 
> >       3> (|compElt| (|elt| $ (|Zero|)) |$EmptyMode|
> > ....
> > ....
> >       <3 (|compElt|
> >              ((|call| (XLAM |ignore| '#<OBJNULL>)) $
> > 
> 

Can you please post the full call to compElt in 3> above?

> I have narrowed down the problem:
> 
>    compiling exported base : () -> PositiveInteger
>   1> (|genDeltaEntry| (|Zero| ($ $) (T (CONST $ 18))))
>     2> (|optDeltaEntry| |Zero| ($) $ CONST)
>       3> (|compiledLookup| |Zero| ((|DoubleFloat|))
>              #<vector 0000000002b66f90>)
>       <3 (|compiledLookup|
>              (|makeSpadConstant|
>                  #<compiled-function |DFLOAT;Zero;$;15|>
>                  #<vector 0000000002b66f90> 25))
>     <2 (|optDeltaEntry| (XLAM |ignore| '#<OBJNULL>))
>   <1 (|genDeltaEntry| (XLAM |ignore| '#<OBJNULL>))
> 
> 
> |makeSpadConstant| calls its argument.  Checking this I get:
> 

Why are there 3 arguments above?  The definition appears to take one.

> )lisp (|DFLOAT;Zero;$;15| nil)
> 
> Value = #<OBJNULL>
> 
> )lisp (disassemble '|DFLOAT;Zero;$;15|)
> ^M
>    >> System error:
>    Condition in DISASSEMBLE [or a callee]: INTERNAL-SIMPLE-END-OF-FILE: 
> Stream error on stream #<input stream "/tmp/gazonk0.c">: Unexpected end of 
> file:
> 

This is a simple .h file naming bug I'll try to fix soon.


> Looking at "/tmp/gazonk0.c" I see:
> 
> 
> #include "cmpinclude.h"
> #include "gazonk0.h"
> void init__tmp_gazonk0(){do_init((void *)VV);}
> /*      local entry for function DFLOAT;Zero;$;15       */
> 
> static double LI1__DFLOAT$Zero$$$15___gazonk0(V2)
> 
> object V2;
> {        VMB1 VMS1 VMV1
>         goto TTL;
> TTL:;
>         /*(FLOAT 0 MOST-POSITIVE-DOUBLE-FLOAT)*/
>         {fixnum V3;
>         V3= (fixnum)0;
>         V3= (fixnum)0;
>         {double V4 = (    1.    )*((fixnum)0);VMR1
>         (V4);}}
>         /* END (FLOAT 0 MOST-POSITIVE-DOUBLE-FLOAT)*/
>         {double V5 = lf(Cnil);VMR1
>         (V5);}

This is correct but unpleasant C which needs tidying.  There can be
extra 'unwinds' scheduled currently in GCL -- these are harmless but
misleading.  The function returns from the macro VMR1.  I'll try to
clean this up too.

Why does this function take an argument which is ignored -- is this right? 

The compElt above, together with which package it is in, the full call
from your trace output, and at what stage the function has appeared
(and is called) will I think do the trick -- thank you so much!!

Take care,


> }
> /*      global entry for the function DFLOAT;Zero;$;15  */
> 
> static void L1__DFLOAT$Zero$$$15___gazonk0()
> {       register object *base=vs_base;
>         check_arg(1);
>         base[0]=make_longfloat(LI1__DFLOAT$Zero$$$15___gazonk0((base[0])));
>         vs_top=(vs_base=base)+1;
> }
> 
>         #ifdef SYSTEM_SPECIAL_INIT
>         SYSTEM_SPECIAL_INIT
>         #endif
> 
> 
> The assignment to V5 looks wrong...
> 
> The file DFLOAT.o where |DFLOAT;Zero;$;15| lives was compiled in
> the previous step.
> 
> -- 
>                               Waldek Hebisch
> address@hidden 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]