[squeak-dev] The Trunk: System-topa.710.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 26 21:31:56 UTC 2015


Tobias Pape uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-topa.710.mcz

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

Name: System-topa.710
Author: topa
Time: 26 March 2015, 10:31:31.508 pm
UUID: ece5d55e-e9c3-4048-a6cc-46570ec16b3b
Ancestors: System-eem.709

Port the wrapping breakpoint implementation from OB-SUnitintegration.

(An addition to BreakPoint, no replacement)

=============== Diff against System-eem.709 ===============

Item was added:
+ ProtoObject subclass: #WrappedBreakpoint
+ 	instanceVariableNames: 'method'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'System-Tools'!
+ 
+ !WrappedBreakpoint commentStamp: 'topa 3/26/2015 21:51' prior: 0!
+ I am a wrapper around an actual method that should be debugged.
+ Contrary to my siblings BreakPoint and BreakpointManager I do not need
+ to modify the original method nor its source but rather implant me in my
+ method's position.
+ 
+ I am based on OBBreakpoint from the OmniBrowser framework.
+ 
+ Instance Variables
+ 	method:		<CompiledMethod>
+ 
+ method
+ 	- actual method I wrap
+ !

Item was added:
+ ----- Method: WrappedBreakpoint class>>on: (in category 'instance creation') -----
+ on: aCompiledMethod
+ 	^ self basicNew initializeOn: aCompiledMethod!

Item was added:
+ ----- Method: WrappedBreakpoint>>doesNotUnderstand: (in category 'private') -----
+ doesNotUnderstand: aMessage
+ 	^ method 
+ 		perform: aMessage selector
+ 		withArguments: aMessage arguments!

Item was added:
+ ----- Method: WrappedBreakpoint>>flushCache (in category 'private') -----
+ flushCache
+ 	method selector flushCache!

Item was added:
+ ----- Method: WrappedBreakpoint>>hasBreakpoint (in category 'public') -----
+ hasBreakpoint
+ 	^ true!

Item was added:
+ ----- Method: WrappedBreakpoint>>initializeOn: (in category 'initialization') -----
+ initializeOn: aCompiledMethod
+ 	method := aCompiledMethod!

Item was added:
+ ----- Method: WrappedBreakpoint>>install (in category 'public') -----
+ install
+ 	method methodClass methodDictionary
+ 		at: method selector
+ 		put: self!

Item was added:
+ ----- Method: WrappedBreakpoint>>literalsDo: (in category 'literals') -----
+ literalsDo: aBlock
+ 	"This method is necessary to show the breakpoint-flag in the browser."
+ 	
+ 	aBlock value: #break.
+ 	method literalsDo: aBlock!

Item was added:
+ ----- Method: WrappedBreakpoint>>printOn: (in category 'private') -----
+ printOn: aStream
+ 
+ 	aStream nextPutAll: 'Break in '.
+ 	method printOn: aStream.!

Item was added:
+ ----- Method: WrappedBreakpoint>>printStringLimitedTo: (in category 'private') -----
+ printStringLimitedTo: limit
+ 	"Answer a String whose characters are a description of the receiver.
+ 	If you want to print without a character limit, use fullPrintString."
+ 	| limitedString |
+ 	limitedString := String streamContents: [:s | self printOn: s] limitedTo: limit.
+ 	limitedString size < limit ifTrue: [^ limitedString].
+ 	^ limitedString , '...etc...'!

Item was added:
+ ----- Method: WrappedBreakpoint>>run:with:in: (in category 'evaluation') -----
+ run: aSelector with: anArray in: aReceiver
+ 	| process |
+ 	process := Process 
+ 		forContext: (MethodContext
+ 			sender: thisContext sender
+ 			receiver: aReceiver
+ 			method: method
+ 			arguments: anArray)
+ 		priority: Processor activeProcess priority.
+ 	Debugger
+ 		openOn: process context: process suspendedContext
+ 		label:  'Breakpoint in ' , method methodClass name , '>>#' , method selector
+ 		contents: nil fullView: true.
+ 	Project spawnNewProcessIfThisIsUI: Processor activeProcess.
+ 	thisContext swapSender: nil.
+ 	Processor activeProcess terminate.!

Item was added:
+ ----- Method: WrappedBreakpoint>>uninstall (in category 'public') -----
+ uninstall
+ 	method methodClass methodDictionary
+ 		at: method selector
+ 		put: method!



More information about the Squeak-dev mailing list