[squeak-dev] The Trunk: Tools-eem.751.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 30 22:26:25 UTC 2017
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.751.mcz
==================== Summary ====================
Name: Tools-eem.751
Author: eem
Time: 30 March 2017, 3:24:18.73121 pm
UUID: a07a8811-44e8-4eec-9d25-e8459f1c6ee4
Ancestors: Tools-eem.750
Commit the essential cange of reference from MethodContext to Context before commiting the Kernel that does away with MethodContext.
=============== Diff against Tools-eem.750 ===============
Item was added:
+ ----- Method: Context>>errorReportOn: (in category '*Tools-debugger access') -----
+ errorReportOn: strm
+ "Write a detailed error report on the stack (above me) on a stream. For both the error file, and emailing a bug report. Suppress any errors while getting printStrings. Limit the length."
+
+ | cnt aContext startPos |
+ strm print: Date today; space; print: Time now; cr.
+ strm cr.
+ strm nextPutAll: 'VM: ';
+ nextPutAll: Smalltalk platformName asString;
+ nextPutAll: ' - ';
+ nextPutAll: Smalltalk asString;
+ cr.
+ strm nextPutAll: 'Image: ';
+ nextPutAll: SystemVersion current version asString;
+ nextPutAll: ' [';
+ nextPutAll: Smalltalk lastUpdateString asString;
+ nextPutAll: ']';
+ cr.
+ strm cr.
+ SecurityManager default printStateOn: strm.
+
+ "Note: The following is an open-coded version of ContextPart>>stackOfSize: since this method may be called during a low space condition and we might run out of space for allocating the full stack."
+ cnt := 0. startPos := strm position.
+ aContext := self.
+ [aContext notNil and: [(cnt := cnt + 1) < 20]] whileTrue:
+ [aContext printDetails: strm. "variable values"
+ strm cr.
+ aContext := aContext sender].
+
+ strm cr; nextPutAll: '--- The full stack ---'; cr.
+ aContext := self.
+ cnt := 0.
+ [aContext == nil] whileFalse:
+ [cnt := cnt + 1.
+ cnt = 20 ifTrue: [strm nextPutAll: ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'; cr].
+ strm print: aContext; cr. "just class>>selector"
+
+ "exit early if too long..."
+ strm position > (startPos+ self class maxLengthForASingleDebugLogReport) ifTrue: [strm nextPutAll: '...etc...'. ^ self]. cnt > self class maxStackDepthForASingleDebugLogReport ifTrue: [strm nextPutAll: '-- and more not shown --'. ^ self].
+ aContext := aContext sender].
+ !
Item was added:
+ ----- Method: Context>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+ "Answer the class of the inspector to be used on the receiver. Called by inspect;
+ use basicInspect to get a normal (less useful) type of inspector."
+
+ ^ ContextInspector!
Item was changed:
----- Method: Debugger class>>informExistingDebugger:label: (in category 'instance creation') -----
informExistingDebugger: aContext label: aString
"Walking the context chain, we try to find out if we're in a debugger stepping situation.
If we find the relevant contexts, we must rearrange them so they look just like they would
if the methods were executed outside of the debugger.
hmm 8/3/2001 13:05"
| ctx quickStepMethod oldSender baseContext |
ctx := thisContext.
+ quickStepMethod := Context compiledMethodAt: #quickSend:to:with:super:.
- quickStepMethod := MethodContext compiledMethodAt: #quickSend:to:with:super:.
[ctx sender == nil or: [ctx sender method == quickStepMethod]] whileFalse: [ctx := ctx sender].
ctx sender ifNil: [^self].
baseContext := ctx.
"baseContext is now the context created by the #quickSend... method."
oldSender := ctx := ctx sender home sender.
"oldSender is the context which originally sent the #quickSend... method"
[ctx == nil or: [(ctx objectClass: ctx receiver) includesBehavior: self]] whileFalse: [ctx := ctx sender].
ctx ifNil: [^self].
"ctx is the context of the Debugger method #doStep"
ctx receiver
labelString: aString;
externalInterrupt: false;
proceedValue: aContext receiver.
baseContext swapSender: baseContext sender sender sender. "remove intervening contexts"
thisContext swapSender: oldSender. "make myself return to debugger"
ErrorRecursion := false.
^aContext!
More information about the Squeak-dev
mailing list
|