--- a/MiniDebugger.st Thu Jan 27 11:30:24 2005 +0100
+++ b/MiniDebugger.st Thu Jan 27 11:30:57 2005 +0100
@@ -362,7 +362,7 @@
].
c notNil ifTrue:[
dot := c.
- self printDot.
+ dot fullPrint.
] ifFalse:[
'** dot is the bottom of the calling chain' printCR.
].
@@ -371,7 +371,7 @@
moveDotUp
dot sender notNil ifTrue:[
dot := dot sender.
- self printDot.
+ dot fullPrint.
] ifFalse:[
'** dot is the top of the calling chain' printCR.
].
@@ -400,7 +400,42 @@
!
printDot
- dot fullPrint
+ dot fullPrint.
+ 'receiver: ' print. dot receiver printCR.
+ 'selector: ' print. dot selector printCR.
+ 'args: ' printCR.
+ dot args keysAndValuesDo:[:idx :eachArg |
+ ' ' print. idx print. ': ' print. eachArg printCR.
+ ].
+ 'vars: ' printCR.
+ dot vars keysAndValuesDo:[:idx :eachVar |
+ ' ' print. idx print. ': ' print. eachVar printCR.
+ ].
+!
+
+printDotsMethodSource
+ |home mthd src|
+
+ home := dot methodHome.
+ mthd := home method.
+ mthd isNil ifTrue:[
+ '** no source **' printCR.
+ ^ self.
+ ].
+ src := mthd source.
+ src isNil ifTrue:[
+ '** no source **' printCR.
+ ^ self.
+ ].
+ src := src asCollectionOfLines.
+ src keysAndValuesDo:[:lNr :line |
+ lNr == dot lineNumber ifTrue:[
+ '>> ' print.
+ ] ifFalse:[
+ ' ' print.
+ ].
+ line printCR.
+ ]
!
stepping
@@ -577,6 +612,7 @@
(cmd == $x) ifTrue:[valid := true. OperatingSystem exit].
(cmd == $.) ifTrue:[valid := true. self printDot ].
+ (cmd == $m) ifTrue:[valid := true. self printDotsMethodSource ].
(cmd == $-) ifTrue:[valid := true. self moveDotUp ].
(cmd == $+) ifTrue:[valid := true. self moveDotDown ].
@@ -776,8 +812,9 @@
X ..... exit Smalltalk (+core dump)
. ..... print dot (the current context)
- - ..... move dot up
- + ..... move dot down
+ m ..... print dots method source code
+ - ..... move dot up (sender)
+ + ..... move dot down (called context)
r ..... receiver (in dot) printString
i ..... inspect receiver (in dot)
@@ -797,5 +834,5 @@
!MiniDebugger class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/MiniDebugger.st,v 1.64 2004-06-11 17:09:49 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MiniDebugger.st,v 1.65 2005-01-27 10:30:57 cg Exp $'
! !