[Openmcl-devel] Cocoa IDE and :RETURN-FROM-FRAME debugger command

Gary Byers gb at clozure.com
Tue May 12 17:51:26 UTC 2009


None of this has anything to do with Cocoa or the IDE; it does have to do
with RETURN-FROM-FRAME not being globally defined on the PPC.

On Tue, 12 May 2009, Arthur W Cater wrote:

> Hello,
> I do not understand here how (in Cocoa IDE, Alt-Console debug session) there does and
> yet does not seem to be a function :RETURN-FROM-FRAME
> I've never used that command before, hence some syntactic fumbling, but this seems very odd
> and I wonder if anyone can shed light on
> a) how I should use it

If it was up to me, I'd say "don't".  :RETURN-FROM-FRAME is supposed
to allow you to transfer control from a break loop to some arbitrary
point in program execution that likely never expected to have arbitrary
code transfer control to it.  Once in a while, that might work (and
might be worth a try, if the alternative was to abandon a long-running
computation because of some silly error.)

> b) how come it is undefined yet knows how many args it expects

The function that implements the :RETURN-FROM-FRAME break loop command happens
to have a FUNCTION-NAME of RETURN-FROM-FRAME; that function is not the global
function definition of CCL::RETURN-FROM-FRAME (on the PPC, there isn't such
a thing) and so it prints as

#<Compiled-function CCL::RETURN-FROM-FRAME (Non-Global)  #x81A827E>

That non-global function tries to call (via APPLY) the global function named
RETURN-FROM-FRAME; we really should have gotten a compiler warning when compiling
that on the PPC, since CCL::RETURN-FROM-FRAME isn't defined there.

>
> Arthur
>
> 1 > (:return-from-frame 1 nil)
>> Error: Undefined function CCL::RETURN-FROM-FRAME called with arguments (-65822028 NIL) .
>> While executing: CCL::CHECK-TOPLEVEL-COMMAND, in process Eval-Queue(7).
>> Type :GO to continue, :POP to abort, :R for a list of available restarts.
>> If continued: Retry applying CCL::RETURN-FROM-FRAME to (-65822028 NIL).
>> Type :? for other options.
> 2 > :pop
>
> 1 > :return-from-frame
>> Error: Too few arguments in call to #<Compiled-function CCL::RETURN-FROM-FRAME (Non-Global)  #x81A827E>:
>>        0 arguments provided, at least 1 required. 
>> While executing: CCL::RETURN-FROM-FRAME, in process Eval-Queue(7).
>> Type :POP to abort, :R for a list of available restarts.
>> Type :? for other options.
> 2 > :pop
>
> 1 > :return-from-frame 1 nil
>> Error: Undefined function CCL::RETURN-FROM-FRAME called with arguments (-65822028 NIL) .
>> While executing: CCL::CHECK-TOPLEVEL-COMMAND, in process Eval-Queue(7).
>> Type :GO to continue, :POP to abort, :R for a list of available restarts.
>> If continued: Retry applying CCL::RETURN-FROM-FRAME to (-65822028 NIL).
>> Type :? for other options.
> 2 > 
>


More information about the Openmcl-devel mailing list