The Trunk: ST80Tools-eem.2.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ST80Tools-eem.2.mcz

commits-2
Eliot Miranda uploaded a new version of ST80Tools to project The Trunk:
http://source.squeak.org/trunk/ST80Tools-eem.2.mcz

==================== Summary ====================

Name: ST80Tools-eem.2
Author: eem
Time: 6 October 2014, 1:11:46.54 pm
UUID: 513b7a04-1c98-41a7-99a6-0852b3bb9a94
Ancestors: ST80Tools-fbs.1

Fix debugging of optimized expressions.

=============== Diff against ST80Tools-fbs.1 ===============

Item was changed:
  ----- Method: ParagraphEditor>>debug:receiver:in: (in category '*ST80Tools') -----
  debug: aCompiledMethod receiver: anObject in: evalContext
 
+ | guineaPig debugger debuggerWindow context |
- | guineaPig debugger context |
  guineaPig := [
  aCompiledMethod
  valueWithReceiver: anObject
  arguments: (evalContext ifNil: [ #() ] ifNotNil: [ { evalContext } ]) ] newProcess.
  context := guineaPig suspendedContext.
  debugger := Debugger new
  process: guineaPig
+ controller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess]) ifTrue:
+ [ScheduledControllers activeController])
- controller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])
- ifTrue: [ScheduledControllers activeController]
- ifFalse: [nil])
  context: context.
+ debuggerWindow := debugger openFullNoSuspendLabel: 'Debug it'.
+ "Now step into the expression.  But if it is quick (is implemented as a primtiive, e.g. `0')
+ it will return immediately back to the block that is sent newProcess above.  Guard
+ against that with the check for home being thisContext."
- debugger openFullNoSuspendLabel: 'Debug it'.
  [debugger interruptedContext method == aCompiledMethod]
+ whileFalse:
+ [debugger interruptedContext home == thisContext ifTrue:
+ [debuggerWindow controller closeAndUnschedule.
+ UIManager default inform: 'Nothing to debug; expression is optimized'.
+ ^self].
+ debugger send]!
- whileFalse: [debugger send]!