Object method traceRM: reportObject levels: levCount withContext: thisContext sender
Last updated at 6:26 pm UTC on 14 October 2020
The following method is a method of the SRE Execution Tracer tool.
traceRM: reportObject levels: levCount withContext: aContext
" Write debug trace in Transcript with info about levCount no. of stack entries from its top. "
" 19971204 als (g03): Do not include numbering when only one level "
" 20040204 tree (squeak3.6-5429) Ported from OOram. "
| reportString context count |
reportString := (reportObject respondsTo: #asString)
ifTrue: [reportString := reportObject asString]
ifFalse: [reportObject printString].
context := aContext.
count := 1.
[count <= levCount and: [context notNil]] whileTrue:
[Transcript cr.
levCount > 1 ifTrue: [Transcript show: count printString, ' '].
Transcript show:
'[' , context receiver identityHash asString , '] : '
, context receiver class name
, ' >> ' , context selector.
reportString ifNotNil: [Transcript show: ' {' , reportString , '}'].
reportString := nil.
context := context sender.
count := count+1].
Transcript cr.