[Openmcl-devel] OpenMCL for Linux x86-64 available for testing

Gary Byers gb at clozure.com
Wed May 3 12:58:24 PDT 2006


The problems that James mentioned (and a few that he didn't) all
have one root cause: he was using yesterday's version.  Fortunately,
a fix is available (in the form of an updated archive and README
file.)

Until something better can be provided, CCL::FRAME-SUPPLIED-ARGS
is available on x8664; its return values are sometimes sensible
and sometimes not, but I don't -think- that any recent changes
I made made the result less sensible.  (It seems to look at stack
frame locations and tries to associate argument names with those
locations; it might work better to find the location/register which
contain the values of each argument.)

I sometimes dismiss the foundations of functionality like
RETURN-FROM-FRAME as being too fragile to work reliably.  That may be
true, but it could probably be made very reliable if some
metainformation (information about auxiliary stack usage) was
maintained by the compiler and associated with some functions.  Do
people actually use RETURN-FROM-FRAME ? (Or is this a chicken-and-egg
situation, where it's not widely used because it's not 100% reliable ?)
Or is it something that makes an impressive demo but is rarely used
in practice ?

On Tue, 2 May 2006, James Bielman wrote:

> The following message is a courtesy copy of an article
> that has been posted to gmane.lisp.openmcl.devel as well.
>
> Gary Byers <gb at clozure.com> writes:
>
>> A version of OpenMCL for Linux X86-64 systems is now available for
>> testing at:
>
> Very cool!
>
>> The FFI seems to be able to do simple FF-CALLS and callbacks; the
>> X86-64 ABI seems to sometimes pass structures by value (somewhat
>> similar to the way that this is done on DarwinPPC), but this isn't
>> handled at all.
>
> I tried to build the CFFI test suite and ran into a few things:
>
> - FF-CALL doesn't seem to work unless compiled.  It looks like there's
>  a PPC LAP function %FF-CALL that doesn't exist on X86-64?
>
> ? (external-call "abs" :int -1 :int)
>> Error: Undefined function %FF-CALL called with arguments (5864064068465 :SIGNED-FULLWORD -1 :SIGNED-FULLWORD) .
>> While executing: CCL::TOPLEVEL-EVAL, in process listener(1).
>
> - When compiled, FF-CALL hits an error with :LONG arguments in some
>  situations:
>
> ? (compile nil (lambda (x) (external-call "labs" :long x :void)))
>> Error: value 9 is not of the expected type (MEMBER 0 8 7 2 1 3 4 5 6).
>> While executing: CCL::X862-COPY-REGISTER, in process listener(1).
>
> Also, I was able to get SLIME up and running, but the debugger doesn't
> work---I assume this is also related to backtracing:
>
> ;; in slime repl
> CL-USER> (error "blam")
>> Error: Undefined function CCL::FRAME-SUPPLIED-ARGS called with arguments (0 5864064610397 229 NIL NIL) .
>> While executing: #<Anonymous Function #x300004CA2ABF>, in process new-repl-thread(9).
>
> IIRC the Slime debugger support in OpenMCL does all sorts of unsavory
> internals-poking---it would be nice to have a documented interface for
> programmatically getting backtrace information.
>
> James
>
>



More information about the Openmcl-devel mailing list