The Trunk: ST80Tools-mt.9.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-mt.9.mcz

commits-2
Marcel Taeumel uploaded a new version of ST80Tools to project The Trunk:
http://source.squeak.org/trunk/ST80Tools-mt.9.mcz

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

Name: ST80Tools-mt.9
Author: mt
Time: 17 April 2016, 7:57:02.055544 pm
UUID: 78153c5c-bc6b-df4e-83da-a5a28bfee072
Ancestors: ST80Tools-cmm.8

Use tool set to "debug it".

=============== Diff against ST80Tools-cmm.8 ===============

Item was removed:
- ----- Method: ParagraphEditor>>debug:receiver:in: (in category '*ST80Tools') -----
- debug: aCompiledMethod receiver: anObject in: evalContext
-
- | guineaPig debugger debuggerWindow context |
- guineaPig :=
- [aCompiledMethod
- valueWithReceiver: anObject
- arguments: (evalContext ifNil: [ #() ] ifNotNil: [ { evalContext } ]).
- guineaPig := nil "spot the return from aCompiledMethod"] newProcess.
- context := guineaPig suspendedContext.
- debugger := Debugger new
- process: guineaPig
- controller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess]) ifTrue:
- [ScheduledControllers activeController])
- 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 interruptedContext method == aCompiledMethod]
- whileFalse:
- [(guineaPig isNil
-  and: [debugger interruptedContext home == thisContext]) ifTrue:
- [debuggerWindow controller closeAndUnschedule.
- UIManager default inform: 'Nothing to debug; expression is optimized'.
- ^self].
- debugger send]!

Item was changed:
  ----- Method: ParagraphEditor>>debugIt (in category '*ST80Tools') -----
  debugIt
 
+ | receiver context |
- | method receiver context |
- (model respondsTo: #doItReceiver)
- ifTrue:
- [receiver := model doItReceiver.
- context := model doItContext]
- ifFalse:
- [receiver := context := nil].
  self lineSelectAndEmptyCheck: [^self].
+
+ (model respondsTo: #doItReceiver)
+ ifTrue: [receiver := model doItReceiver].
+
+ (model respondsTo: #doItContext)
+ ifTrue: [context := model doItContext].
+
+ (self compileSelectionFor: receiver in: context) ifNotNil: [:method |
+ ToolSet debugMethod: method forReceiver: receiver inContext: context].!
- method := self compileSelectionFor: receiver in: context.
- method notNil ifTrue:
- [self debug: method receiver: receiver in: context].!