author | Claus Gittinger <cg@exept.de> |
Sun, 25 May 1997 15:44:47 +0200 | |
changeset 2661 | fea131f9f062 |
parent 2118 | 2b1d0b19484c |
child 2772 | 89f7289950b1 |
permissions | -rw-r--r-- |
1 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1988 by Claus Gittinger |
159 | 3 |
All Rights Reserved |
1 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
720 | 13 |
Object subclass:#MiniDebugger |
976 | 14 |
instanceVariableNames:'tracing stepping traceBlock' |
15 |
classVariableNames:'TheOneAndOnlyDebugger' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Debugging-Support' |
|
1 | 18 |
! |
19 |
||
618 | 20 |
!MiniDebugger class methodsFor:'documentation'! |
89 | 21 |
|
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1988 by Claus Gittinger |
|
159 | 25 |
All Rights Reserved |
1 | 26 |
|
89 | 27 |
This software is furnished under a license and may be used |
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
1 | 35 |
|
89 | 36 |
documentation |
37 |
" |
|
38 |
a primitive (non graphical) debugger for use on systems without |
|
39 |
graphics or when the real debugger dies (i.e. an error occurs in |
|
40 |
the graphical debugger). |
|
93 | 41 |
Also, if an interrupt occurs within the debuger, this one is called |
42 |
for. |
|
1297 | 43 |
|
44 |
[author:] |
|
45 |
Claus Gittinger |
|
89 | 46 |
" |
47 |
! ! |
|
1 | 48 |
|
618 | 49 |
!MiniDebugger class methodsFor:'instance creation'! |
50 |
||
51 |
enter |
|
52 |
^ self enterWithMessage:'MiniDebugger' |
|
53 |
! |
|
54 |
||
55 |
enter:aContext |
|
56 |
^ self enterWithMessage:'MiniDebugger' |
|
57 |
! |
|
58 |
||
59 |
enter:aContext withMessage:aString |
|
60 |
^ self enterWithMessage:aString |
|
61 |
! |
|
62 |
||
63 |
enterWithMessage:aString |
|
64 |
|active| |
|
65 |
||
66 |
StepInterruptPending := nil. |
|
67 |
||
2661
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
68 |
Object errorSignal handle:[:ex | |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
69 |
ex return |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
70 |
] do:[ |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
71 |
thisContext isRecursive ifTrue:[ |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
72 |
"/ 'recursive error in debugger ignored' errorPrintCR. |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
73 |
^ self |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
74 |
]. |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
75 |
aString printCR. |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
76 |
Processor notNil ifTrue:[ |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
77 |
active := Processor activeProcess. |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
78 |
'process: id=' print. active id print. ' name=' print. active name printCR. |
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
79 |
]. |
618 | 80 |
]. |
81 |
self new enter. |
|
82 |
^ nil |
|
1424 | 83 |
|
84 |
"Modified: 20.5.1996 / 10:28:31 / cg" |
|
618 | 85 |
! |
1 | 86 |
|
87 |
new |
|
1424 | 88 |
TheOneAndOnlyDebugger printCR. |
33 | 89 |
TheOneAndOnlyDebugger isNil ifTrue:[ |
1424 | 90 |
TheOneAndOnlyDebugger := self basicNew initialize |
1 | 91 |
]. |
33 | 92 |
^ TheOneAndOnlyDebugger |
1424 | 93 |
|
94 |
"Modified: 20.5.1996 / 10:28:35 / cg" |
|
1 | 95 |
! |
96 |
||
97 |
singleStep:aBlock |
|
98 |
|aDebugger| |
|
99 |
||
100 |
aDebugger := self new stepping. |
|
241 | 101 |
ObjectMemory stepInterruptHandler:aDebugger. |
2 | 102 |
ObjectMemory flushInlineCaches. |
241 | 103 |
StepInterruptPending := 1. |
104 |
InterruptPending := 1. |
|
1 | 105 |
aBlock value. |
2 | 106 |
StepInterruptPending := nil. |
107 |
ObjectMemory stepInterruptHandler:nil |
|
1 | 108 |
! |
109 |
||
110 |
trace:aBlock |
|
1424 | 111 |
self trace:aBlock with:[:where | where printCR] |
112 |
||
113 |
"Modified: 20.5.1996 / 10:27:37 / cg" |
|
1 | 114 |
! |
115 |
||
116 |
trace:aBlock on:aStream |
|
117 |
self trace:aBlock with:[:where | where printString printOn:aStream. |
|
159 | 118 |
aStream cr] |
1 | 119 |
! |
120 |
||
121 |
trace:aBlock with:aTraceBlock |
|
122 |
|aDebugger| |
|
123 |
||
124 |
aDebugger := self new tracingWith:aTraceBlock. |
|
241 | 125 |
ObjectMemory stepInterruptHandler:aDebugger. |
1 | 126 |
ObjectMemory flushInlineCaches. |
241 | 127 |
StepInterruptPending := 1. |
128 |
InterruptPending := 1. |
|
1 | 129 |
aBlock value. |
2 | 130 |
ObjectMemory stepInterruptHandler:nil. |
1 | 131 |
StepInterruptPending := nil. |
132 |
^ nil |
|
133 |
! ! |
|
134 |
||
618 | 135 |
!MiniDebugger methodsFor:'initialization'! |
1 | 136 |
|
137 |
initialize |
|
138 |
traceBlock := nil. |
|
139 |
tracing := false. |
|
140 |
stepping := false |
|
141 |
! ! |
|
142 |
||
618 | 143 |
!MiniDebugger methodsFor:'interrupt handling'! |
1 | 144 |
|
145 |
enter |
|
159 | 146 |
|leaveCmd stillHere| |
74 | 147 |
|
148 |
stillHere := true. |
|
149 |
[stillHere] whileTrue:[ |
|
159 | 150 |
leaveCmd := self commandLoop. |
1 | 151 |
|
159 | 152 |
(leaveCmd == $s) ifTrue: [ |
153 |
self stepping. |
|
154 |
ObjectMemory flushInlineCaches. |
|
155 |
ObjectMemory stepInterruptHandler:self. |
|
156 |
stillHere := false. |
|
241 | 157 |
StepInterruptPending := 1. |
158 |
InterruptPending := 1 |
|
159 | 159 |
]. |
160 |
(leaveCmd == $t) ifTrue: [ |
|
161 |
traceBlock := [:where | where fullPrint]. |
|
162 |
ObjectMemory flushInlineCaches. |
|
163 |
ObjectMemory stepInterruptHandler:self. |
|
164 |
stillHere := false. |
|
241 | 165 |
StepInterruptPending := 1. |
166 |
InterruptPending := 1 |
|
159 | 167 |
]. |
168 |
(leaveCmd == $c) ifTrue: [ |
|
169 |
stillHere := false. |
|
170 |
stepping := false. |
|
171 |
tracing := false. |
|
172 |
StepInterruptPending := nil. |
|
173 |
InterruptPending := nil |
|
174 |
]. |
|
175 |
(leaveCmd == $a) ifTrue: [ |
|
176 |
"abort" |
|
177 |
stepping := false. |
|
178 |
tracing := false. |
|
179 |
StepInterruptPending := nil. |
|
180 |
InterruptPending := nil. |
|
181 |
self doAbort. |
|
182 |
stillHere := true. |
|
183 |
"failed abort" |
|
184 |
]. |
|
1 | 185 |
]. |
186 |
^ nil |
|
618 | 187 |
! |
188 |
||
189 |
stepInterrupt |
|
190 |
|where| |
|
191 |
||
192 |
where := thisContext. "where is stepInterrupt context" |
|
193 |
where notNil ifTrue:[ |
|
1424 | 194 |
where := where sender "where is now interrupted methods context" |
618 | 195 |
]. |
196 |
stepping ifTrue:[ |
|
1424 | 197 |
where notNil ifTrue:[ |
198 |
where fullPrint |
|
199 |
] ifFalse:[ |
|
200 |
'stepInterrupt: no context' errorPrintCR |
|
201 |
]. |
|
202 |
self enter |
|
618 | 203 |
] ifFalse:[ |
1424 | 204 |
where notNil ifTrue:[ |
205 |
traceBlock notNil ifTrue:[ |
|
206 |
traceBlock value:where |
|
207 |
] |
|
208 |
] ifFalse:[ |
|
209 |
'traceInterrupt: no context' errorPrintCR |
|
210 |
]. |
|
211 |
ObjectMemory flushInlineCaches. |
|
212 |
StepInterruptPending := 1. |
|
213 |
InterruptPending := 1 |
|
618 | 214 |
] |
1424 | 215 |
|
216 |
"Modified: 20.5.1996 / 10:23:11 / cg" |
|
1 | 217 |
! ! |
218 |
||
618 | 219 |
!MiniDebugger methodsFor:'private'! |
74 | 220 |
|
618 | 221 |
findContext:aSelector |
222 |
|con| |
|
74 | 223 |
|
618 | 224 |
con := thisContext sender. |
225 |
[con notNil] whileTrue:[ |
|
226 |
(con isBlockContext not and:[con selector == aSelector]) ifTrue:[ |
|
227 |
"got it" |
|
228 |
^ con |
|
229 |
]. |
|
230 |
con := con sender |
|
74 | 231 |
]. |
618 | 232 |
^ nil |
74 | 233 |
! |
234 |
||
618 | 235 |
getContext |
236 |
|backtrace| |
|
237 |
backtrace := thisContext. |
|
238 |
(backtrace notNil) ifTrue: [ |
|
239 |
"remove Context getContext frame" |
|
240 |
backtrace := backtrace sender. |
|
241 |
"remove Debugger showContext frame" |
|
242 |
backtrace := backtrace sender. |
|
243 |
"remove Debugger commandLoop frame" |
|
244 |
backtrace := backtrace sender. |
|
245 |
"remove Debugger enter frame" |
|
246 |
backtrace := backtrace sender |
|
247 |
]. |
|
248 |
^ backtrace |
|
249 |
! |
|
74 | 250 |
|
618 | 251 |
stepping |
252 |
traceBlock := nil. |
|
253 |
tracing := false. |
|
254 |
stepping := true |
|
74 | 255 |
! |
256 |
||
618 | 257 |
tracingWith:aBlockOrNil |
258 |
traceBlock := aBlockOrNil. |
|
259 |
stepping := false. |
|
260 |
tracing := true |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
261 |
! |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
262 |
|
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
263 |
printBacktraceFrom:aContext |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
264 |
aContext notNil ifTrue:[ |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
265 |
aContext fullPrintAll |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
266 |
] ifFalse:[ |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
267 |
'no context' errorPrintCR |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
268 |
] |
618 | 269 |
! ! |
270 |
||
271 |
!MiniDebugger methodsFor:'user commands'! |
|
272 |
||
1 | 273 |
commandLoop |
274 |
|cmd done valid context| |
|
275 |
||
276 |
done := false. |
|
277 |
[done] whileFalse:[ |
|
1424 | 278 |
valid := false. |
279 |
cmd := self getCommand. |
|
280 |
(cmd == $p) ifTrue:[ |
|
281 |
valid := true. |
|
282 |
context isNil ifTrue: [ |
|
283 |
context := self getContext |
|
284 |
]. |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
285 |
self printBacktraceFrom:context |
1424 | 286 |
]. |
287 |
(cmd == $b) ifTrue:[ |
|
288 |
valid := true. |
|
289 |
Smalltalk printStackBacktrace |
|
290 |
]. |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
291 |
(cmd == $B) ifTrue:[ |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
292 |
valid := true. |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
293 |
self printAllBacktraces |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
294 |
]. |
1424 | 295 |
(cmd == $P) ifTrue:[ |
296 |
valid := true. |
|
297 |
self showProcesses. |
|
298 |
]. |
|
299 |
(cmd == $r) ifTrue:[ |
|
300 |
valid := true. |
|
301 |
context isNil ifTrue: [ |
|
302 |
context := self getContext |
|
303 |
]. |
|
304 |
context notNil ifTrue:[ |
|
305 |
"remove Debugger stepinterrupt/halt frame" |
|
306 |
context sender receiver printCR |
|
307 |
] ifFalse:[ |
|
308 |
'no context - dont know receiver' errorPrintCR |
|
309 |
] |
|
310 |
]. |
|
311 |
(cmd == $R) ifTrue:[ |
|
312 |
valid := true. |
|
313 |
context isNil ifTrue: [ |
|
314 |
context := self getContext |
|
315 |
]. |
|
316 |
context notNil ifTrue:[ |
|
317 |
"remove Debugger stepinterrupt/halt frame" |
|
318 |
context sender receiver storeOn:Stdout |
|
319 |
] ifFalse:[ |
|
320 |
'no context - dont know receiver' errorPrintCR |
|
321 |
] |
|
322 |
]. |
|
323 |
(cmd == $i) ifTrue:[ |
|
324 |
valid := true. |
|
325 |
context isNil ifTrue: [ |
|
326 |
context := self getContext |
|
327 |
]. |
|
328 |
context notNil ifTrue:[ |
|
329 |
"remove Debugger stepinterrupt/halt frame" |
|
330 |
MiniInspector openOn:(context sender receiver) |
|
331 |
] ifFalse:[ |
|
332 |
'no context - dont know receiver' errorPrintCR |
|
333 |
] |
|
334 |
]. |
|
335 |
(cmd == $I) ifTrue:[ |
|
336 |
valid := true. |
|
337 |
context isNil ifTrue: [ |
|
338 |
context := self getContext |
|
339 |
]. |
|
216 | 340 |
"/ context notNil ifTrue:[ |
341 |
"/ "remove Debugger stepinterrupt/halt frame" |
|
342 |
"/ self interpreterLoopWith:(context sender receiver) |
|
343 |
"/ ] ifFalse:[ |
|
1424 | 344 |
"/ 'no context - dont know receiver' errorPrintCR. |
345 |
self interpreterLoopWith:nil |
|
216 | 346 |
"/ ] |
1424 | 347 |
]. |
348 |
context := nil. |
|
349 |
(cmd == $c) ifTrue:[valid := true. done := true]. |
|
350 |
(cmd == $s) ifTrue:[valid := true. done := true]. |
|
351 |
(cmd == $t) ifTrue:[valid := true. done := true]. |
|
352 |
(cmd == $a) ifTrue:[valid := true. done := true]. |
|
353 |
(cmd == $T) ifTrue:[valid := true. Processor terminateActive]. |
|
354 |
(cmd == $Q) ifTrue:[valid := true. Processor terminateActiveNoSignal]. |
|
355 |
(cmd == $U) ifTrue:[MessageTracer unwrapAllMethods]. |
|
356 |
(cmd == $X) ifTrue:[Smalltalk fatalAbort]. |
|
357 |
(cmd == $x) ifTrue:[OperatingSystem exit]. |
|
358 |
valid ifFalse: [ |
|
359 |
'valid commands: |
|
74 | 360 |
(c)ontinue |
361 |
(s)tep |
|
216 | 362 |
(t)race (continue with trace) |
363 |
(p)rint context chain |
|
940 | 364 |
(b)full backtrace |
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
365 |
(B)backtrace of all other processes |
93 | 366 |
(r)eceiver printString |
367 |
(R)eceiver storeString |
|
216 | 368 |
(i)nspect (enter inspector on receiver) |
369 |
(I)nterpreter (expression evaluator) |
|
370 |
(a)bort (raise abort signal) |
|
371 |
(P)rocess list |
|
93 | 372 |
(T)terminate current process |
159 | 373 |
(Q)uick terminate current process (no unwinds) |
360 | 374 |
(U)nwrap all traced/breakpointed methods |
74 | 375 |
(X)exit (+core) |
1424 | 376 |
(x)exit Smalltalk' errorPrintCR |
377 |
] |
|
1 | 378 |
]. |
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
379 |
context := nil. |
1 | 380 |
^ cmd |
1424 | 381 |
|
382 |
"Modified: 20.5.1996 / 10:22:50 / cg" |
|
1 | 383 |
! |
384 |
||
618 | 385 |
doAbort |
386 |
|con sig| |
|
387 |
||
388 |
(sig := Object abortSignal) isHandled ifTrue:[ |
|
1424 | 389 |
sig raise. |
390 |
'abort raise failed' errorPrintCR. |
|
618 | 391 |
]. |
392 |
||
393 |
"TEMPORARY kludge - find event handler context |
|
394 |
this will be removed, once real debugging is possible |
|
395 |
" |
|
396 |
con := self findContext:#processEvent. |
|
397 |
con isNil ifTrue:[ |
|
1424 | 398 |
con := self findContext:#dispatch. |
618 | 399 |
]. |
400 |
con notNil ifTrue:[ |
|
1424 | 401 |
"got it" |
402 |
con return. |
|
403 |
'return failed' errorPrintCR. |
|
618 | 404 |
]. |
405 |
||
1424 | 406 |
'found no context to resume' errorPrintCR. |
407 |
||
408 |
"Modified: 20.5.1996 / 10:23:00 / cg" |
|
618 | 409 |
! |
410 |
||
1 | 411 |
getCommand |
412 |
|cmd c| |
|
93 | 413 |
|
852
5c4a0585ba0b
ungrab pointer for every input
Claus Gittinger <cg@exept.de>
parents:
720
diff
changeset
|
414 |
Display notNil ifTrue:[ |
976 | 415 |
Display ungrabPointer. |
416 |
Display ungrabKeyboard. |
|
852
5c4a0585ba0b
ungrab pointer for every input
Claus Gittinger <cg@exept.de>
parents:
720
diff
changeset
|
417 |
]. |
5c4a0585ba0b
ungrab pointer for every input
Claus Gittinger <cg@exept.de>
parents:
720
diff
changeset
|
418 |
|
1 | 419 |
'MiniDebugger> ' print. |
93 | 420 |
|
976 | 421 |
UserInterruptSignal handle:[:ex | |
422 |
ex restart |
|
159 | 423 |
] do:[ |
976 | 424 |
cmd := Character fromUser. |
425 |
cmd isNil ifTrue:[ |
|
426 |
" |
|
427 |
mhmh end-of-file; |
|
428 |
return a 'c' (for continue); hope thats ok. |
|
429 |
" |
|
430 |
cmd := $c |
|
431 |
]. |
|
93 | 432 |
|
976 | 433 |
" |
434 |
ignore to end-of-line |
|
435 |
" |
|
436 |
c := cmd. |
|
437 |
[c isNil or:[c isEndOfLineCharacter]] whileFalse: [ |
|
438 |
c := Character fromUser. |
|
439 |
]. |
|
1 | 440 |
]. |
441 |
^ cmd |
|
976 | 442 |
|
443 |
"Modified: 20.2.1996 / 20:24:13 / cg" |
|
1 | 444 |
! |
445 |
||
446 |
interpreterLoopWith:anObject |
|
447 |
|line done| |
|
1424 | 448 |
'read-eval-print loop; exit with empty line' printCR. |
1 | 449 |
done := false. |
450 |
[done] whileFalse:[ |
|
1424 | 451 |
line := Stdin nextLine. |
452 |
(line size == 0) ifTrue:[ |
|
453 |
done := true |
|
454 |
] ifFalse:[ |
|
455 |
(Compiler evaluate:line |
|
456 |
receiver:anObject |
|
457 |
notifying:nil) printCR |
|
458 |
] |
|
1 | 459 |
] |
1424 | 460 |
|
461 |
"Modified: 20.5.1996 / 10:27:29 / cg" |
|
618 | 462 |
! |
463 |
||
464 |
showProcesses |
|
465 |
|active| |
|
466 |
||
467 |
active := Processor activeProcess. |
|
1424 | 468 |
'current id=' print. active id print. ' name=' print. active name printCR. |
618 | 469 |
|
470 |
Process allInstancesDo:[:p | |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
471 |
'proc id=' print. p id print. |
2118 | 472 |
' name=''' print. p name print. |
473 |
''' createdBy: ' print. p creatorId print. |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
474 |
' state=' print. |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
475 |
p state print. |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
476 |
' prio=' print. p priority printCR. |
618 | 477 |
] |
1424 | 478 |
|
479 |
"Modified: 20.5.1996 / 10:28:25 / cg" |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
480 |
! |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
481 |
|
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
482 |
printAllBacktraces |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
483 |
Process allInstancesDo:[:p | |
2115 | 484 |
(p ~~ Processor activeProcess |
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
485 |
and:[p isDead not]) ifTrue:[ |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
486 |
'---------------------------------------------------------' printCR. |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
487 |
' proc id=' print. p id print. |
2118 | 488 |
' name=''' print. p name print. |
489 |
''' createdBy: ' print. p creatorId print. |
|
490 |
' state=' print. p state print. |
|
2113
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
491 |
' prio=' print. p priority printCR. |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
492 |
'' printCR. '' printCR. |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
493 |
|
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
494 |
self printBacktraceFrom:(p suspendedContext) |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
495 |
] |
6a310e15ad58
added print-other-stacks command
Claus Gittinger <cg@exept.de>
parents:
1424
diff
changeset
|
496 |
] |
1 | 497 |
! ! |
618 | 498 |
|
658 | 499 |
!MiniDebugger class methodsFor:'documentation'! |
500 |
||
501 |
version |
|
2661
fea131f9f062
care for recursive errors in MiniDebugger
Claus Gittinger <cg@exept.de>
parents:
2118
diff
changeset
|
502 |
^ '$Header: /cvs/stx/stx/libbasic/MiniDebugger.st,v 1.31 1997-05-25 13:44:47 cg Exp $' |
658 | 503 |
! ! |