[squeak-dev] Re: process-faithful debugging?

Andreas Raab andreas.raab at gmx.de
Fri Jul 17 01:26:51 UTC 2009


Didn't we talk about this earlier?

Process>>currentProcess
   "Answer the currently active process.
   If the receiver is simulating another process,
   answer the other process. If not, answer self."
   ^currentProcess ifNil:[self]

Process>>currentProcess: aProcess
   "Set the currently active process.
   Return the previous active process."
   | prior |
   prior := currentProcess.
   currentProcess := aProcess.
   ^prior

ProcessorScheduler>>activeProcess
   ^activeProcess currentProcess

ProcessorScheduler>>currentProcess: aProcess
   "For debugging only.
    Pretend that aProcess is the activeProcess"
   ^activeProcess currentProcess: aProcess

and then:

Debugger>>step
   prior := Processor currentProcess: interruptedProcess.
   [self doStep] ensure:[Processor currentProcess: prior].

etc.

Eliot Miranda wrote:
> Hi All,
> 
>     does anyone have a neat hack to make Processor activeProcess answer 
> what's expected in the context of the debugger?  i.e. anyone made the 
> Squeak debugger answer the process being debugger when Processor 
> activeProcess is stepped over or through, rather than the debugger 
> process, or made the debugger run as the process being debugged rather 
> than its own?
> 
> TIA
> Eliot
> 
> 
> ------------------------------------------------------------------------
> 
> 




More information about the Squeak-dev mailing list