author | Claus Gittinger <cg@exept.de> |
Thu, 20 Mar 1997 22:04:26 +0100 | |
changeset 1092 | 059c29fac604 |
parent 1091 | 92a5ea4c0e10 |
child 1101 | 4db36b95dac4 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
45 | 3 |
All Rights Reserved |
0 | 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 |
||
13 |
StandardSystemView subclass:#DebugView |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
14 |
instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
15 |
receiverInspector contextInspector contextArray selectedContext |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
16 |
catchBlock grabber traceView tracing bigStep skipLineNr |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
17 |
steppedContextAddress canAbort abortButton terminateButton |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
18 |
continueButton stepButton nextButton nextOverButton nextOutButton |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
19 |
sendButton returnButton restartButton exclusive inspecting |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
20 |
nChainShown inspectedProcess updateProcess stopButton |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
21 |
updateButton monitorToggle stepping steppedContextLineno |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
22 |
stepForReturn actualContext inWrap stackInspector steppedContext |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
23 |
wrapperContext verboseBacktrace firstContext stepHow' |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
24 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
25 |
DebuggingDebugger VerboseBacktraceDefault DefaultIcon |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
26 |
InitialNCHAINShown' |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
27 |
poolDictionaries:'' |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
28 |
category:'Interface-Debugger' |
0 | 29 |
! |
30 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
31 |
!DebugView class methodsFor:'documentation'! |
29 | 32 |
|
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
45 | 36 |
All Rights Reserved |
29 | 37 |
|
38 |
This software is furnished under a license and may be used |
|
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
" |
|
45 |
! |
|
0 | 46 |
|
29 | 47 |
documentation |
48 |
" |
|
49 |
this class implements a graphical debugger interface. |
|
50 |
The debugger usually sits on top of the faulting process, |
|
51 |
taking over its event processing. Thus only the 'stopped' process is affected; |
|
52 |
other processes continue to respond to events. |
|
53 |
||
54 |
The one exception is when an error occurs within the dispatcher process |
|
55 |
or in one of the eventhandler processes - in this case, the debugger |
|
56 |
will sit on an exclusive display connection. |
|
57 |
||
58 |
The whole debugging will be changed, once the required process primitives |
|
59 |
are available, which allow control of another processes execution |
|
60 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
61 |
to have the debugger control the debuggee (i.e. two processes) |
|
35 | 62 |
|
63 |
See additional information in 'doc/misc/debugger.doc'. |
|
53 | 64 |
|
65 |
Notice: the DebugView class caches the last used debugger in a class |
|
66 |
variable. It may happen, that a malfunctioning debugger (for example, |
|
67 |
a halfway destoyed one) is kept there. You will notice this, if a |
|
68 |
debugger comes up without showing any contents. In this case, close |
|
69 |
(or destroy) the broken debugView, and execute |
|
508 | 70 |
Debugger newDebugger |
53 | 71 |
which removes the cached debugger and forces creation of a new one the |
72 |
next time. This is a temporary workaround - the debugger will be fixed to |
|
73 |
avoid this problem. |
|
508 | 74 |
|
75 |
[author:] |
|
76 |
Claus Gittinger |
|
77 |
||
78 |
[see also:] |
|
79 |
Exception Signal |
|
80 |
Process |
|
29 | 81 |
" |
82 |
! ! |
|
0 | 83 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
84 |
!DebugView class methodsFor:'initialization'! |
243 | 85 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
86 |
initialize |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
87 |
InitialNCHAINShown := 20. |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
88 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
89 |
"Created: 20.3.1997 / 16:53:37 / cg" |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
90 |
"Modified: 20.3.1997 / 16:54:32 / cg" |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
91 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
92 |
|
243 | 93 |
reinitialize |
94 |
self newDebugger |
|
95 |
! ! |
|
96 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
97 |
!DebugView class methodsFor:'instance creation'! |
0 | 98 |
|
266 | 99 |
enter |
100 |
"another way of entering the debugger" |
|
73 | 101 |
|
266 | 102 |
^ self enter:(thisContext sender) withMessage:'Debugger' |
73 | 103 |
|
266 | 104 |
"Debugger enter" |
73 | 105 |
! |
106 |
||
266 | 107 |
enter:aContext |
108 |
"enter the debugger on aContext" |
|
29 | 109 |
|
266 | 110 |
^ self enter:aContext withMessage:'Debugger' |
0 | 111 |
! |
112 |
||
29 | 113 |
enter:aContext withMessage:aString |
53 | 114 |
"enter a debugger; if this is a recursive invocation, enter |
115 |
a MiniDebugger instead. |
|
116 |
This is the standard way of entering the debugger; |
|
117 |
sent from error- and halt messages." |
|
0 | 118 |
|
745
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
119 |
|active found c| |
93 | 120 |
|
57 | 121 |
StepInterruptPending := nil. |
122 |
||
62 | 123 |
thisContext isRecursive ifTrue:[ |
745
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
124 |
"/ care for the special case, were the Debugger was autoloaded. |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
125 |
"/ in this case, thisContext IS recursive, but thats no error |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
126 |
"/ condition. |
941 | 127 |
|
745
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
128 |
found := false. |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
129 |
c := thisContext sender. |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
130 |
[found not |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
131 |
and:[c notNil |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
132 |
and:[c selector ~~ #enter:withMessage:]]] whileTrue:[ |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
133 |
c selector == #noByteCode ifTrue:[ |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
134 |
found := true |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
135 |
]. |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
136 |
c := c sender |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
137 |
]. |
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
138 |
|
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
139 |
found ifFalse:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
140 |
('DebugView [warning]: reentered with: ', aString) errorPrintCR. |
941 | 141 |
^ MiniDebugger |
142 |
enterWithMessage:'DebugView [error]: recursive error (in debugger)'. |
|
745
89a242c66cda
handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
143 |
] |
62 | 144 |
]. |
145 |
||
57 | 146 |
" |
147 |
well, it could be a stepping or sending debugger up there; |
|
148 |
in this case, return to it. This happens, when a stepping process |
|
149 |
runs into an error (for example, a halt). In this case, we want the |
|
150 |
stepping debugger to come up again instead of a new one. |
|
151 |
" |
|
152 |
OpenDebuggers notNil ifTrue:[ |
|
526 | 153 |
active := Processor activeProcess. |
154 |
OpenDebuggers do:[:aDebugger | |
|
775
f741dc4afe19
changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents:
755
diff
changeset
|
155 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
526 | 156 |
(aDebugger inspectedProcess == active) ifTrue:[ |
57 | 157 |
"/ 'entering stepping debugger again' printNL. |
526 | 158 |
aDebugger unstep. |
159 |
aDebugger setLabelFor:aString in:active. |
|
160 |
^ aDebugger enter:aContext. |
|
161 |
] |
|
162 |
] |
|
163 |
] |
|
57 | 164 |
]. |
165 |
||
53 | 166 |
^ self enterUnconditional:aContext withMessage:aString |
526 | 167 |
|
941 | 168 |
"Modified: 11.1.1997 / 14:04:11 / cg" |
53 | 169 |
! |
170 |
||
266 | 171 |
enterUnconditional:aContext withMessage:aString |
172 |
"enter a debugger - do not check for recursive invocation" |
|
173 |
||
174 |
|aDebugger| |
|
175 |
||
176 |
StepInterruptPending := nil. |
|
177 |
aDebugger := self new. |
|
178 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
|
179 |
aDebugger enter:aContext. |
|
180 |
^ nil |
|
181 |
||
182 |
"nil halt" |
|
183 |
! |
|
184 |
||
185 |
enterWithMessage:aString |
|
186 |
"the standard way of entering the debugger - sent from Objects |
|
187 |
error- and halt messages" |
|
188 |
||
189 |
^ self enter:(thisContext sender) withMessage:aString |
|
190 |
||
191 |
"Debugger enterWithMessage:'hi there'" |
|
192 |
! |
|
193 |
||
194 |
new |
|
195 |
"return a new DebugView - return a cached debugger if it already |
|
196 |
exists" |
|
53 | 197 |
|
73 | 198 |
|debugger| |
14 | 199 |
|
266 | 200 |
" |
201 |
need a blocking debugger if no processes or |
|
202 |
or if its a timing/interrupt process |
|
203 |
(because otherwise we would not get any events here ... |
|
204 |
" |
|
205 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
959
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
206 |
(CachedExclusive isNil |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
207 |
or:[CachedExclusive device ~~ Screen current]) ifTrue:[ |
875 | 208 |
debugger := self newExclusive |
209 |
] ifFalse:[ |
|
210 |
debugger := CachedExclusive. |
|
211 |
CachedExclusive := nil. |
|
212 |
]. |
|
266 | 213 |
] ifFalse:[ |
959
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
214 |
(CachedDebugger notNil and:[CachedDebugger device ~~ Screen current]) ifTrue:[ |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
215 |
CachedDebugger := nil |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
216 |
]. |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
217 |
(CachedDebugger isNil |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
218 |
or:[CachedDebugger device ~~ Screen current]) ifTrue:[ |
875 | 219 |
debugger := super new. |
220 |
debugger label:'Debugger'. |
|
221 |
debugger icon:self defaultIcon. |
|
222 |
] ifFalse:[ |
|
223 |
debugger := CachedDebugger. |
|
224 |
CachedDebugger := nil. |
|
225 |
] |
|
266 | 226 |
]. |
73 | 227 |
^ debugger |
875 | 228 |
|
959
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
229 |
"Modified: 15.2.1997 / 18:52:16 / cg" |
73 | 230 |
! |
0 | 231 |
|
266 | 232 |
newExclusive |
233 |
"return a debugger for exclusive display access" |
|
234 |
||
235 |
|debugger| |
|
105 | 236 |
|
266 | 237 |
debugger := super new. |
238 |
debugger label:'Debugger'. |
|
875 | 239 |
debugger icon:self defaultIcon. |
266 | 240 |
debugger exclusive:true. |
241 |
^ debugger |
|
875 | 242 |
|
243 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 244 |
! |
245 |
||
29 | 246 |
openOn:aProcess |
247 |
"start a debugger on aProcess |
|
248 |
(actually not more than a good-looking inspector)" |
|
15 | 249 |
|
52 | 250 |
|aDebugger label nm| |
15 | 251 |
|
252 |
aDebugger := super new. |
|
875 | 253 |
aDebugger icon:self defaultIcon. |
29 | 254 |
aProcess notNil ifTrue:[ |
875 | 255 |
nm := aProcess name. |
256 |
nm notNil ifTrue:[ |
|
257 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
258 |
] ifFalse:[ |
|
259 |
nm := aProcess id printString |
|
260 |
]. |
|
261 |
label := 'Debugger [' , nm , ']'. |
|
29 | 262 |
] ifFalse:[ |
875 | 263 |
label := 'no process' |
29 | 264 |
]. |
265 |
aDebugger label:label. |
|
15 | 266 |
aDebugger iconLabel:'Debugger'. |
267 |
aDebugger openOn:aProcess. |
|
268 |
^ nil |
|
875 | 269 |
|
270 |
"Modified: 19.12.1996 / 14:07:50 / cg" |
|
126 | 271 |
! ! |
272 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
273 |
!DebugView class methodsFor:'cleanup'! |
485 | 274 |
|
275 |
lowSpaceCleanup |
|
276 |
"in low memory situations, give up cached debuggers" |
|
277 |
||
278 |
CachedDebugger := nil. |
|
279 |
CachedExclusive := nil. |
|
280 |
OpenDebuggers := nil. |
|
281 |
||
282 |
" |
|
283 |
DebugView lowSpaceCleanup |
|
284 |
" |
|
285 |
||
286 |
"Modified: 18.4.1996 / 16:48:03 / cg" |
|
287 |
! |
|
288 |
||
289 |
newDebugger |
|
290 |
"force creation of a new debugger" |
|
291 |
||
292 |
CachedDebugger := nil. |
|
293 |
CachedExclusive := nil. |
|
294 |
OpenDebuggers := nil. |
|
295 |
||
296 |
" |
|
297 |
DebugView newDebugger |
|
298 |
" |
|
299 |
! ! |
|
300 |
||
875 | 301 |
!DebugView class methodsFor:'defaults'! |
302 |
||
303 |
defaultIcon |
|
1082 | 304 |
DefaultIcon isNil ifTrue:[ |
1091 | 305 |
DefaultIcon := self classResources at:'ICON' default:nil. |
1082 | 306 |
DefaultIcon isNil ifTrue:[ |
307 |
DefaultIcon := Image fromFile:'bitmaps/Debugger.xbm' resolution:100 |
|
308 |
]. |
|
309 |
DefaultIcon notNil ifTrue:[ |
|
310 |
DefaultIcon := DefaultIcon on:Display |
|
311 |
] |
|
312 |
]. |
|
313 |
^ DefaultIcon |
|
314 |
||
315 |
" |
|
316 |
DebugView defaultIcon |
|
317 |
" |
|
318 |
||
1091 | 319 |
"Modified: 19.3.1997 / 22:23:56 / cg" |
937
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
320 |
! |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
321 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
322 |
defaultVerboseBacktrace |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
323 |
^ VerboseBacktraceDefault |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
324 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
325 |
"Created: 11.1.1997 / 12:14:35 / cg" |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
326 |
! |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
327 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
328 |
defaultVerboseBacktrace:aBoolean |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
329 |
VerboseBacktraceDefault := aBoolean |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
330 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
331 |
"Created: 11.1.1997 / 12:14:44 / cg" |
875 | 332 |
! ! |
333 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
334 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
335 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
336 |
interestingContextFrom:aContext |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
337 |
"return an interesting contexts offset, or nil. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
338 |
This is the context initially shown in the walkback. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
339 |
We move up the calling chain, skipping all intermediate Signal |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
340 |
and Exception contexts, to present the context in which the error |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
341 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
342 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
343 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
344 |
|delta con| |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
345 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
346 |
delta := self interestingContextIndexFrom:aContext. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
347 |
con := aContext. |
944 | 348 |
[con notNil and:[delta > 1]] whileTrue:[ |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
349 |
con := con sender. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
350 |
delta := delta - 1. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
351 |
]. |
944 | 352 |
con isNil ifTrue:[ |
353 |
^ aContext |
|
354 |
]. |
|
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
355 |
^ con |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
356 |
|
944 | 357 |
"Modified: 11.1.1997 / 17:58:44 / cg" |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
358 |
! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
359 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
360 |
interestingContextIndexFrom:aContext |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
361 |
"return an interesting contexts offset, or nil. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
362 |
This is the context initially shown in the walkback. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
363 |
We move up the calling chain, skipping all intermediate Signal |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
364 |
and Exception contexts, to present the context in which the error |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
365 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
366 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
367 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
368 |
|c found offset sel prev ex| |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
369 |
|
998 | 370 |
aContext isNil ifTrue:[^ 1]. |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
371 |
aContext isBlockContext ifTrue:[^ 1]. |
944 | 372 |
VerboseBacktraceDefault == true ifTrue:[^ 1]. |
373 |
||
374 |
"/ somewhere, at the bottom, there must be a raise ... |
|
375 |
"/ find the exception |
|
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
376 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
377 |
c := aContext. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
378 |
1 to:5 do:[:i | |
944 | 379 |
c isNil ifTrue:[^ 1]. |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
380 |
sel := c selector. |
923
3878260918ee
better skip raiseRequest as well
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
381 |
((sel == #raise) |
3878260918ee
better skip raiseRequest as well
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
382 |
or:[sel == #raiseRequest]) ifTrue:[ |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
383 |
(c receiver isKindOf:Exception) ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
384 |
ex := c receiver. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
385 |
offset := i. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
386 |
found := c |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
387 |
] ifFalse:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
388 |
(c receiver isSignal) ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
389 |
offset := i. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
390 |
found := c |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
391 |
] |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
392 |
] |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
393 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
394 |
c := c sender. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
395 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
396 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
397 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
398 |
if this is a noHandler exception, skip forward |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
399 |
to the erronous context |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
400 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
401 |
ex notNil ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
402 |
ex signal == Signal noHandlerSignal ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
403 |
c := ex suspendedContext |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
404 |
] |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
405 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
406 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
407 |
(c := found) isNil ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
408 |
"/ this is a kludge, but convenient. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
409 |
"/ show the place where the divisionByZero happend, |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
410 |
"/ not where the signal was raised. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
411 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
412 |
sel := aContext selector. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
413 |
(sel == #// |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
414 |
or:[sel == #/ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
415 |
or:[sel == #\\]]) ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
416 |
^ 2 |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
417 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
418 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
419 |
^ 1 |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
420 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
421 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
422 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
423 |
got it; move up, skipping all intermediate Signal and |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
424 |
Exception contexts |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
425 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
426 |
prev := nil. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
427 |
[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
428 |
((c receiver isSignal) |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
429 |
or:[(c receiver isKindOf:Exception)]) |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
430 |
] whileTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
431 |
prev := c. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
432 |
(c := c sender) isNil ifTrue:[^ offset]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
433 |
offset := offset + 1. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
434 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
435 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
436 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
437 |
now, we are one above the raising context |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
438 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
439 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
440 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
441 |
if the sender-method of the raise is one of objects error methods ... |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
442 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
443 |
( #( halt halt: |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
444 |
error error: |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
445 |
doesNotUnderstand: |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
446 |
subclassResponsibility |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
447 |
primitiveFailed) includes:c selector) |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
448 |
ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
449 |
c selector == #doesNotUnderstand: ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
450 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
451 |
one more up, to get to the originating context |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
452 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
453 |
(c := c sender) isNil ifTrue:[^ offset]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
454 |
offset := offset + 1. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
455 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
456 |
(c := c sender) isNil ifTrue:[^ offset]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
457 |
offset := offset + 1. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
458 |
] ifFalse:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
459 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
460 |
ok, got the raise - if its a BreakPoint, look for the sender |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
461 |
" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
462 |
(MessageTracer notNil and:[prev receiver == MessageTracer breakpointSignal]) ifTrue:[ |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
463 |
offset := offset + 1 |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
464 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
465 |
]. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
466 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
467 |
^ offset |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
468 |
|
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
469 |
"Created: 7.1.1997 / 21:26:05 / cg" |
944 | 470 |
"Modified: 11.1.1997 / 18:42:17 / cg" |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
471 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
472 |
|
73 | 473 |
!DebugView methodsFor:'basic'! |
474 |
||
266 | 475 |
enter |
476 |
"enter the debugger - on the sending context" |
|
477 |
||
478 |
|where| |
|
479 |
||
480 |
busy := true. |
|
481 |
||
482 |
where := thisContext. "enter" |
|
483 |
where := where sender. "the calling context" |
|
484 |
where notNil ifTrue:[ |
|
485 |
(where receiver == DebugView) ifTrue:[ |
|
486 |
where := where sender |
|
487 |
] |
|
488 |
"where is now interrupted methods context" |
|
489 |
]. |
|
490 |
^ self enter:where |
|
491 |
! |
|
492 |
||
73 | 493 |
enter:aContext |
494 |
"enter the debugger - get and display the context, then start an |
|
495 |
exclusive event loop on top of eveything else" |
|
496 |
||
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
497 |
|con selection m idx retval enteredByInterrupt sel con1 con2| |
73 | 498 |
|
939 | 499 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
500 |
||
73 | 501 |
busy := true. |
502 |
inspecting := false. |
|
503 |
inspectedProcess := Processor activeProcess. |
|
504 |
stepping := false. |
|
505 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
506 |
stepHow := nil. |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
507 |
nChainShown := InitialNCHAINShown. |
73 | 508 |
|
509 |
"if debugger is entered while a box has grabbed the |
|
510 |
pointer, we must ungrab - otherwise X wont talk to |
|
511 |
us here |
|
512 |
" |
|
513 |
(grabber := device activePointerGrab) notNil ifTrue:[ |
|
425
92f7a92f5c44
ungrab keyboard when entering debugger
Claus Gittinger <cg@exept.de>
parents:
407
diff
changeset
|
514 |
device ungrabPointer. |
92f7a92f5c44
ungrab keyboard when entering debugger
Claus Gittinger <cg@exept.de>
parents:
407
diff
changeset
|
515 |
device ungrabKeyboard. |
73 | 516 |
]. |
517 |
||
1004
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
518 |
("inspectedProcess suspendedContext isNil |
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
519 |
or:["Processor isSystemProcess:inspectedProcess"]") ifTrue:[ |
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
520 |
|
374 | 521 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
522 |
] ifFalse:[ |
374 | 523 |
terminateButton enable. |
524 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
525 |
]. |
73 | 526 |
|
527 |
drawableId notNil ifTrue:[ |
|
374 | 528 |
" |
529 |
not the first time - disable buttons & menus |
|
530 |
from previous life |
|
531 |
" |
|
532 |
terminateButton turnOffWithoutRedraw. |
|
533 |
continueButton turnOffWithoutRedraw. |
|
534 |
returnButton turnOffWithoutRedraw. |
|
535 |
restartButton turnOffWithoutRedraw. |
|
536 |
abortButton turnOffWithoutRedraw. |
|
537 |
nextButton turnOffWithoutRedraw. |
|
538 |
stepButton turnOffWithoutRedraw. |
|
539 |
sendButton turnOffWithoutRedraw. |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
540 |
|
374 | 541 |
m := contextView middleButtonMenu. |
542 |
m notNil ifTrue:[ |
|
939 | 543 |
m disableAll:#(showMore skip skipForReturn inspectContext). |
544 |
]. |
|
545 |
verboseBacktrace |
|
546 |
ifTrue:[self showVerboseBacktrace] |
|
547 |
ifFalse:[self showDenseBacktrace]. |
|
73 | 548 |
] ifFalse:[ |
374 | 549 |
self iconLabel:'Debugger'. |
132 | 550 |
]. |
551 |
||
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
552 |
windowGroup isNil ifTrue:[ |
374 | 553 |
windowGroup := WindowGroup new. |
554 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
555 |
]. |
132 | 556 |
exclusive ifFalse:[ |
374 | 557 |
"/ create a (modal) windowGroup for myself |
132 | 558 |
|
374 | 559 |
windowGroup setModal:true. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
560 |
] ifTrue:[ |
374 | 561 |
"/ create a windowGroup with a synchronous sensor for me |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
562 |
|
579
d461478b2ac2
device is not needed in SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
563
diff
changeset
|
563 |
windowGroup sensor:(SynchronousWindowSensor new). |
73 | 564 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
565 |
windowGroup setProcess:Processor activeProcess. |
73 | 566 |
|
567 |
" |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
568 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
73 | 569 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
570 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
73 | 571 |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
572 |
|
73 | 573 |
" |
574 |
and find the one context to show initially |
|
575 |
- if we came here by a send (single step), its the top context; |
|
576 |
- if we came here by a step (i.e. bigStep), its the top context |
|
577 |
(for ifs and whiles) or the sender (for regular sends). |
|
303
1d94813f1977
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
301
diff
changeset
|
578 |
- otherwise, we came here by some signal raise, and we are interested |
73 | 579 |
in the context where the raise actually occured. |
580 |
" |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
581 |
con1 := (contextArray at:1 ifAbsent:nil). |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
582 |
con2 := (contextArray at:2 ifAbsent:nil). |
73 | 583 |
exitAction == #step ifTrue:[ |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
584 |
|
374 | 585 |
selection := 1. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
586 |
steppedContext notNil ifTrue:[ |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
587 |
|
374 | 588 |
" |
589 |
if we came here by a big-step, show the method where we are |
|
590 |
" |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
591 |
con1 == steppedContext ifTrue:[ |
374 | 592 |
selection := 1 |
593 |
] ifFalse:[ |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
594 |
con2 == steppedContext ifTrue:[ |
374 | 595 |
selection := 2 |
596 |
] |
|
597 |
]. |
|
598 |
" |
|
599 |
for bigStep, we could also be in a block below the actual method ... |
|
600 |
" |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
601 |
(con1 home notNil |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
602 |
and:[con1 home == steppedContext]) ifTrue:[ |
374 | 603 |
selection := 1 |
604 |
] ifFalse:[ |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
605 |
(con2 home notNil |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
606 |
and:[con2 home == steppedContext]) ifTrue:[ |
374 | 607 |
selection := 2 |
608 |
] |
|
609 |
]. |
|
610 |
] |
|
73 | 611 |
] ifFalse:[ |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
612 |
steppedContext isNil ifTrue:[ |
374 | 613 |
" |
614 |
preselect a more interesting context, (where halt/raise was ...) |
|
615 |
" |
|
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
616 |
selection := self class interestingContextIndexFrom:aContext. |
374 | 617 |
] ifFalse:[ |
618 |
" |
|
619 |
if we came here by a big-step, show the method where we are |
|
620 |
" |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
621 |
con1 == steppedContext ifTrue:[ |
374 | 622 |
selection := 1 |
623 |
] ifFalse:[ |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
624 |
con2 == steppedContext ifTrue:[ |
374 | 625 |
selection := 2 |
626 |
] |
|
627 |
] |
|
628 |
] |
|
73 | 629 |
]. |
630 |
||
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
631 |
con1 := nil. |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
632 |
con2 := nil. |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
633 |
|
73 | 634 |
selection notNil ifTrue:[ |
374 | 635 |
self showSelection:selection. |
563 | 636 |
contextView setSelection:selection. |
374 | 637 |
selection > 1 ifTrue:[ |
638 |
contextView scrollToLine:(selection - 1) |
|
639 |
] |
|
73 | 640 |
]. |
641 |
||
642 |
m := contextView middleButtonMenu. |
|
643 |
m notNil ifTrue:[ |
|
374 | 644 |
canAbort := inspecting or:[Object abortSignal isHandled]. |
645 |
canAbort ifTrue:[ |
|
646 |
abortButton enable. |
|
647 |
m enable:#doAbort. |
|
648 |
] ifFalse:[ |
|
649 |
abortButton disable. |
|
650 |
m disable:#doAbort. |
|
651 |
]. |
|
652 |
exclusive ifTrue:[ |
|
653 |
terminateButton disable. |
|
654 |
m disable:#doTerminate. |
|
655 |
] ifFalse:[ |
|
656 |
terminateButton enable. |
|
657 |
m enable:#doTerminate. |
|
658 |
] |
|
73 | 659 |
]. |
660 |
||
661 |
" |
|
662 |
drawableId is nil, if this is a new debugger. Then do a realize. |
|
528
a5ba1a3d0b45
Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents:
527
diff
changeset
|
663 |
Otherwise, its probably better to do a map, which shows the |
73 | 664 |
view at the previous position, without a need for the user to set the |
665 |
position again |
|
666 |
" |
|
667 |
drawableId notNil ifTrue:[ |
|
545 | 668 |
self remap. |
73 | 669 |
] ifFalse:[ |
374 | 670 |
self realize. |
73 | 671 |
]. |
870 | 672 |
self realizeAllSubViews. |
73 | 673 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
674 |
exclusive ifTrue:[ |
374 | 675 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
676 |
Debugging system process `' , (inspectedProcess nameOrId) printString , '''. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
677 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
678 |
This is a modal debugger - all event processing is stopped.. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
679 |
Therefore, you cannot interact with other views or |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
680 |
open any other tools while this debugger is active. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
681 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
682 |
Also, there is no event processing (redraw) for other views.' |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
683 |
]. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
684 |
|
73 | 685 |
" |
686 |
bring us to the top |
|
687 |
" |
|
688 |
self raise. |
|
105 | 689 |
device flush. |
73 | 690 |
|
691 |
canContinue := true. |
|
692 |
exitAction := nil. |
|
693 |
||
694 |
" |
|
695 |
enter private event handling loop. This is left (and we come back here again) |
|
696 |
when any button was pressed which requires continuation of the debuggee or |
|
697 |
closedown of the debugger. |
|
698 |
" |
|
699 |
||
132 | 700 |
[self controlLoop] valueOnUnwindDo:[ |
374 | 701 |
windowGroup notNil ifTrue:[ |
702 |
windowGroup setProcess:nil. |
|
703 |
]. |
|
704 |
self destroy |
|
132 | 705 |
]. |
73 | 706 |
|
707 |
" |
|
708 |
release all context stuff. |
|
709 |
This is required to avoid keeping references to the debuggees objects |
|
710 |
forever. (since the debugger is reused for faster startup next time) |
|
711 |
" |
|
712 |
contextArray := nil. |
|
942 | 713 |
contextView contents:nil. |
714 |
||
73 | 715 |
codeView acceptAction:nil. |
942 | 716 |
codeView doItAction:nil. |
717 |
codeView contents:nil. |
|
73 | 718 |
|
719 |
(exitAction ~~ #step) ifTrue:[ |
|
374 | 720 |
receiverInspector release. |
721 |
contextInspector release. |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
722 |
|
528
a5ba1a3d0b45
Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents:
527
diff
changeset
|
723 |
self unmap. |
374 | 724 |
device flush. |
73 | 725 |
|
374 | 726 |
(exitAction == #abort) ifTrue:[ |
727 |
self cacheMyself. |
|
942 | 728 |
|
374 | 729 |
" |
730 |
have to catch errors occuring in unwind-blocks |
|
731 |
" |
|
732 |
ErrorSignal handle:[:ex | |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
733 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
734 |
ex errorString infoPrintCR. |
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
735 |
|
374 | 736 |
ex proceed |
737 |
] do:[ |
|
738 |
Object abortSignal raise. |
|
739 |
]. |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
740 |
'DebugView [warning]: abort failed' errorPrintCR |
374 | 741 |
]. |
61 | 742 |
|
374 | 743 |
(exitAction == #return) ifTrue:[ |
744 |
selectedContext notNil ifTrue:[ |
|
745 |
" |
|
746 |
if there is a selection in the codeView, |
|
747 |
evaluate it and use the result as return value |
|
748 |
" |
|
73 | 749 |
"/ disabled for now, there is almost always a selection (the current line) |
750 |
"/ and that is syntactically incorrect ... |
|
751 |
"/ ... leading to a popup warning from the codeView |
|
752 |
"/ |
|
753 |
"/ codeView hasSelection ifTrue:[ |
|
754 |
"/ Object errorSignal handle:[:ex | |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
755 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
73 | 756 |
"/ retval := nil. |
757 |
"/ ex return |
|
758 |
"/ ] do:[ |
|
687 | 759 |
"/ |s| |
657 | 760 |
"/ |
761 |
"/ s := codeView selection asString. |
|
73 | 762 |
"/ retval := codeView doItAction value:s. |
763 |
"/ ]. |
|
764 |
"/ ]. |
|
765 |
||
374 | 766 |
con := selectedContext. |
767 |
self cacheMyself. |
|
768 |
" |
|
769 |
have to catch errors occuring in unwind-blocks |
|
770 |
" |
|
771 |
Object errorSignal handle:[:ex | |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
772 |
'DebugView [info]: ignored error while unwinding: ' errorPrint. |
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
773 |
ex errorString errorPrintCR. |
374 | 774 |
ex proceed |
775 |
] do:[ |
|
776 |
con unwind:retval. |
|
777 |
]. |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
778 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
374 | 779 |
] |
780 |
]. |
|
73 | 781 |
|
374 | 782 |
(exitAction == #restart) ifTrue:[ |
783 |
selectedContext notNil ifTrue:[ |
|
784 |
con := selectedContext. |
|
785 |
self cacheMyself. |
|
786 |
" |
|
787 |
have to catch errors occuring in unwind-blocks |
|
788 |
" |
|
789 |
Object errorSignal handle:[:ex | |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
790 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
791 |
ex errorString infoPrintCR. |
374 | 792 |
ex proceed |
793 |
] do:[ |
|
794 |
con unwindAndRestart. |
|
795 |
]. |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
796 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
374 | 797 |
] |
798 |
]. |
|
73 | 799 |
|
374 | 800 |
(exitAction == #quickTerminate) ifTrue:[ |
801 |
self cacheMyself. |
|
802 |
Processor activeProcess terminateNoSignal |
|
803 |
]. |
|
73 | 804 |
|
374 | 805 |
(exitAction == #terminate) ifTrue:[ |
806 |
self cacheMyself. |
|
807 |
" |
|
808 |
have to catch errors occuring in unwind-blocks |
|
809 |
" |
|
810 |
Object errorSignal handle:[:ex | |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
811 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
812 |
ex errorString infoPrintCR. |
374 | 813 |
ex proceed |
814 |
] do:[ |
|
815 |
Processor activeProcess terminate. |
|
816 |
]. |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
817 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
374 | 818 |
] |
73 | 819 |
]. |
820 |
||
940 | 821 |
selectedContext := actualContext := firstContext := nil. |
73 | 822 |
|
823 |
grabber notNil ifTrue:[ |
|
374 | 824 |
device grabPointerInView:grabber. |
825 |
grabber := nil. |
|
61 | 826 |
]. |
73 | 827 |
|
828 |
(exitAction == #step) ifTrue:[ |
|
374 | 829 |
" |
830 |
schedule another stepInterrupt |
|
831 |
- must enter myself into the collection of open debuggers, |
|
832 |
in case the stepping process comes back again via a halt or signal |
|
833 |
before the step is finished. In this case, the stepping debugger should |
|
834 |
come up (instead of a new one) |
|
835 |
- must flush caches since optimized methods not always |
|
836 |
look for pending interrupts |
|
837 |
" |
|
838 |
OpenDebuggers isNil ifTrue:[ |
|
839 |
OpenDebuggers := WeakArray with:self |
|
840 |
] ifFalse:[ |
|
841 |
(OpenDebuggers includes:self) ifFalse:[ |
|
842 |
idx := OpenDebuggers identityIndexOf:nil. |
|
775
f741dc4afe19
changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents:
755
diff
changeset
|
843 |
idx == 0 ifTrue:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
844 |
idx := OpenDebuggers identityIndexOf:0 |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
845 |
]. |
374 | 846 |
idx ~~ 0 ifTrue:[ |
847 |
OpenDebuggers at:idx put:self |
|
848 |
] ifFalse:[ |
|
849 |
OpenDebuggers := OpenDebuggers copyWith:self |
|
850 |
] |
|
851 |
] |
|
852 |
]. |
|
853 |
self label:'single stepping - please wait ...'. |
|
854 |
stepping := true. |
|
73 | 855 |
|
374 | 856 |
ObjectMemory stepInterruptHandler:self. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
857 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
858 |
"bigStep" steppedContextLineno notNil ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
859 |
Context singleStepInterruptRequest raiseWith:#next |
529
57a78164dae5
allow different implementations of singleStep (JAVA support)
Claus Gittinger <cg@exept.de>
parents:
528
diff
changeset
|
860 |
] ifFalse:[ |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
861 |
Context singleStepInterruptRequest raiseWith:#step |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
862 |
] |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
863 |
] ifFalse:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
864 |
"/ see if we came here through an interrupt-action |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
865 |
"/ (i.e. aProcess interruptWith:...) |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
866 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
867 |
enteredByInterrupt := false. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
868 |
con := thisContext sender. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
869 |
[enteredByInterrupt not |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
870 |
and:[con notNil |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
871 |
and:[con ~~ aContext]]] whileTrue:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
872 |
((sel := con selector) == #timerInterrupt |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
873 |
or:[sel == #ioInterrupt]) ifTrue:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
874 |
enteredByInterrupt := true. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
875 |
] ifFalse:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
876 |
con := con sender |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
877 |
]. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
878 |
]. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
879 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
880 |
ObjectMemory flushInlineCaches. |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
881 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
882 |
enteredByInterrupt ifTrue:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
883 |
"/ dont want to step through all intermediate |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
884 |
"/ (scheduler-) contexts; place a return-trap on the |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
885 |
"/ one right below the interresting one |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
886 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
887 |
"/ 'special unwind return' printCR. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
888 |
con unwindThenDo:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
889 |
ObjectMemory stepInterruptHandler:self. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
890 |
InStepInterrupt := nil. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
891 |
StepInterruptPending := 1. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
892 |
InterruptPending := 1]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
893 |
] ifFalse:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
894 |
"/ 'normal step return' printCR. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
895 |
skipLineNr ~~ #return ifTrue:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
896 |
StepInterruptPending := 1. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
897 |
InterruptPending := 1. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
898 |
] ifFalse:[ |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
899 |
"/ 'step for return' printCR. |
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
900 |
] |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
901 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
902 |
InStepInterrupt := nil |
374 | 903 |
] |
73 | 904 |
] ifFalse:[ |
374 | 905 |
OpenDebuggers notNil ifTrue:[ |
906 |
idx := OpenDebuggers identityIndexOf:self. |
|
907 |
idx ~~ 0 ifTrue:[ |
|
908 |
OpenDebuggers at:idx put:nil |
|
909 |
] |
|
910 |
]. |
|
911 |
self cacheMyself. |
|
73 | 912 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
913 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
914 |
"Created: 24.11.1995 / 19:52:54 / cg" |
528
a5ba1a3d0b45
Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents:
527
diff
changeset
|
915 |
"Modified: 3.5.1996 / 23:58:16 / stefan" |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
916 |
"Modified: 20.3.1997 / 16:53:53 / cg" |
73 | 917 |
! |
918 |
||
919 |
openOn:aProcess |
|
920 |
"enter the debugger on a process - |
|
921 |
in this case, we are just inspecting the context chain of the process, |
|
922 |
not running on top of the debugged process, but as a separate |
|
923 |
one. (think of it as an inspector showing more detail, and offering |
|
924 |
some more control operations)" |
|
925 |
||
127 | 926 |
|bpanel dummy| |
73 | 927 |
|
939 | 928 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
929 |
||
73 | 930 |
busy := true. |
931 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
932 |
stepHow := nil. |
73 | 933 |
inspecting := true. |
934 |
inspectedProcess := aProcess. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
935 |
nChainShown := InitialNCHAINShown. |
73 | 936 |
|
937 |
bpanel := abortButton superView. |
|
938 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
939 |
"/ stopButton := Button new. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
940 |
"/ stopButton label:(resources at:'stop'); |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
941 |
"/ action:[self doStop]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
942 |
"/ bpanel addSubView:stopButton after:continueButton. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
943 |
"/ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
944 |
bpanel elementsChangeSize:true. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
945 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
946 |
aProcess state == #run ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
947 |
device hasColors ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
948 |
continueButton foregroundColor:Color red darkened. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
949 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
950 |
continueButton label:(resources at:'stop'). |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
951 |
continueButton action:[self doStop]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
952 |
returnButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
953 |
restartButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
954 |
] ifFalse:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
955 |
device hasColors ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
956 |
continueButton foregroundColor:Color green darkened darkened. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
957 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
958 |
continueButton label:(resources at:'continue'). |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
959 |
continueButton action:[self doContinue]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
960 |
returnButton enable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
961 |
restartButton enable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
962 |
]. |
73 | 963 |
|
92 | 964 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 965 |
dummy borderWidth:0; level:0. |
61 | 966 |
|
73 | 967 |
"/ stepButton destroy. |
968 |
"/ sendButton destroy. |
|
969 |
||
970 |
updateButton := Button |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
971 |
label:(resources at:'update') |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
972 |
action:[self updateContext] |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
973 |
in:bpanel. |
73 | 974 |
monitorToggle := Toggle in:bpanel. |
975 |
monitorToggle label:(resources at:'monitor'). |
|
976 |
monitorToggle pressAction:[self autoUpdateOn]. |
|
977 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
978 |
||
979 |
"can only look into process - context chain is not active" |
|
980 |
canContinue := true. |
|
981 |
||
982 |
terminateButton enable. |
|
983 |
abortButton enable. |
|
984 |
||
985 |
sendButton disable. |
|
986 |
stepButton disable. |
|
78 | 987 |
nextButton disable. |
73 | 988 |
"/ continueButton disable. |
989 |
"/ returnButton disable. |
|
990 |
"/ restartButton disable. |
|
991 |
||
992 |
aProcess isNil ifTrue:[ |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
993 |
terminateButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
994 |
abortButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
995 |
continueButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
996 |
returnButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
997 |
restartButton disable. |
73 | 998 |
] ifFalse:[ |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
999 |
(aProcess suspendedContext isNil |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1000 |
or:[Processor isSystemProcess:aProcess]) ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1001 |
terminateButton disable. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1002 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1003 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1004 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1005 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1006 |
catchBlock := [ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1007 |
catchBlock := nil. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1008 |
contextArray := nil. |
940 | 1009 |
selectedContext := actualContext := firstContext := nil. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1010 |
steppedContext := wrapperContext := nil. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1011 |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1012 |
(exitAction == #terminate) ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1013 |
aProcess terminate. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1014 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1015 |
(exitAction == #quickTerminate) ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1016 |
aProcess terminateNoSignal. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1017 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1018 |
super destroy |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1019 |
]. |
73 | 1020 |
]. |
1021 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1022 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1023 |
"Modified: 20.3.1997 / 16:53:56 / cg" |
266 | 1024 |
! ! |
1025 |
||
1026 |
!DebugView methodsFor:'help'! |
|
1027 |
||
1028 |
helpTextFor:aComponent |
|
1029 |
|s| |
|
1030 |
||
1031 |
aComponent == abortButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1032 |
s := 'HELP_ABORT' |
266 | 1033 |
]. |
1034 |
aComponent == terminateButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1035 |
s := 'HELP_TERMINATE' |
266 | 1036 |
]. |
1037 |
aComponent == continueButton ifTrue:[ |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1038 |
continueButton label = (resources string:'stop') ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1039 |
s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1040 |
] ifFalse:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1041 |
s := 'HELP_CONTINUE' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1042 |
] |
266 | 1043 |
]. |
1044 |
aComponent == stepButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1045 |
s := 'HELP_STEP' |
266 | 1046 |
]. |
1047 |
aComponent == nextButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1048 |
s := 'HELP_NEXT' |
266 | 1049 |
]. |
1065 | 1050 |
aComponent == nextOverButton ifTrue:[ |
1051 |
s := 'HELP_NEXTOVER' |
|
1052 |
]. |
|
1053 |
aComponent == nextOutButton ifTrue:[ |
|
1054 |
s := 'HELP_NEXTOUT' |
|
1055 |
]. |
|
266 | 1056 |
aComponent == stepButton ifTrue:[ |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1057 |
s := 'HELP_STEP' |
266 | 1058 |
]. |
1059 |
aComponent == sendButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1060 |
s := 'HELP_SEND' |
266 | 1061 |
]. |
1062 |
aComponent == returnButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1063 |
s := 'HELP_RETURN' |
266 | 1064 |
]. |
1065 |
aComponent == restartButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1066 |
s := 'HELP_RESTART' |
266 | 1067 |
]. |
1068 |
aComponent == contextView ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1069 |
s := 'HELP_WALKBACK' |
266 | 1070 |
]. |
1071 |
aComponent == codeView ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1072 |
s := 'HELP_CODEVIEW' |
266 | 1073 |
]. |
1074 |
aComponent == monitorToggle ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1075 |
s := 'HELP_MONITOR' |
266 | 1076 |
]. |
1077 |
aComponent == updateButton ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1078 |
s := 'HELP_UPDATE' |
266 | 1079 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1080 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1081 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1082 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1083 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1084 |
s := 'HELP_REC_INSP' |
266 | 1085 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1086 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1087 |
s := 'HELP_CON_INSP' |
266 | 1088 |
]. |
1089 |
||
1090 |
s notNil ifTrue:[ |
|
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1091 |
^ resources string:s |
266 | 1092 |
]. |
1093 |
^ nil |
|
1094 |
||
1095 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 1096 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 1097 |
! ! |
1098 |
||
1099 |
!DebugView methodsFor:'initialization'! |
|
1100 |
||
1101 |
addToCurrentProject |
|
1102 |
"ignored here" |
|
1103 |
||
1104 |
^ self |
|
1105 |
! |
|
1106 |
||
1107 |
initialize |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1108 |
|v panel hpanel bpanel separator img| |
266 | 1109 |
|
1110 |
super initialize. |
|
1111 |
||
1112 |
font := font on:device. |
|
1113 |
||
937
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1114 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1115 |
|
266 | 1116 |
busy := false. |
1117 |
exclusive := false. |
|
1118 |
inspecting := false. |
|
1119 |
exitAction := nil. |
|
1120 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1121 |
stepHow := nil. |
266 | 1122 |
canContinue := false. |
1123 |
canAbort := false. |
|
1124 |
||
1125 |
bpanel := HorizontalPanelView |
|
1126 |
"/ origin:(0.0 @ 0.0) |
|
1127 |
"/ extent:(1.0 @ (font height * 2)) |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1128 |
in:self. |
266 | 1129 |
bpanel horizontalLayout:#leftSpace. |
1130 |
bpanel verticalSpace:ViewSpacing // 2. |
|
1131 |
||
1132 |
terminateButton := Button |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1133 |
label:(resources at:'terminate') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1134 |
action:[terminateButton turnOffWithoutRedraw. self doTerminate] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1135 |
in:bpanel. |
266 | 1136 |
separator := View extent:(10 @ 5) in:bpanel. |
1137 |
separator borderWidth:0; level:0. |
|
1138 |
||
1139 |
abortButton := Button |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1140 |
label:(resources at:'abort') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1141 |
action:[abortButton turnOffWithoutRedraw. self doAbort] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1142 |
in:bpanel. |
266 | 1143 |
returnButton := Button |
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1144 |
label:(resources at:'return') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1145 |
action:[returnButton turnOff. self doReturn] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1146 |
in:bpanel. |
266 | 1147 |
|
1148 |
restartButton := Button |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1149 |
label:(resources at:'restart') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1150 |
action:[restartButton turnOff. self doRestart] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1151 |
in:bpanel. |
266 | 1152 |
|
1153 |
separator := View extent:(10 @ 5) in:bpanel. |
|
1154 |
separator borderWidth:0; level:0. |
|
73 | 1155 |
|
266 | 1156 |
continueButton := Button |
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1157 |
label:(resources at:'continue') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1158 |
action:[continueButton turnOffWithoutRedraw. self doContinue] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1159 |
in:bpanel. |
266 | 1160 |
|
1161 |
separator := View extent:(10 @ 5) in:bpanel. |
|
1162 |
separator borderWidth:0; level:0. |
|
1163 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1164 |
img := Image fromFile:'bitmaps/stepIn.xpm'. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1165 |
img isNil ifTrue:[ |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1166 |
img := (resources at:'next') |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1167 |
]. |
266 | 1168 |
nextButton := Button |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1169 |
label:img |
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1170 |
action:[stepButton turnOff. self doNext] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1171 |
in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1172 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1173 |
img := Image fromFile:'bitmaps/stepOver.xpm'. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1174 |
img isNil ifTrue:[ |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1175 |
img := (resources at:'over') |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1176 |
]. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1177 |
nextOverButton := Button |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1178 |
label:img |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1179 |
action:[stepButton turnOff. self doNextOver] |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1180 |
in:bpanel. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1181 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1182 |
img := Image fromFile:'bitmaps/stepOut.xpm'. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1183 |
img isNil ifTrue:[ |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1184 |
img := (resources at:'out') |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1185 |
]. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1186 |
nextOutButton := Button |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1187 |
label:img |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1188 |
action:[stepButton turnOff. self doNextOut] |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1189 |
in:bpanel. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1190 |
|
266 | 1191 |
stepButton := Button |
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1192 |
label:(resources at:'step') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1193 |
action:[stepButton turnOff. self doStep] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1194 |
in:bpanel. |
266 | 1195 |
sendButton := Button |
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1196 |
label:(resources at:'send') |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1197 |
action:[sendButton turnOff. self doSend] |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1198 |
in:bpanel. |
266 | 1199 |
|
1200 |
bpanel origin:(0.0 @ 0.0) |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1201 |
extent:(1.0 @ (bpanel preferredExtent y)). |
73 | 1202 |
|
266 | 1203 |
panel := VariableVerticalPanel |
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1204 |
origin:(0.0 @ bpanel height) |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1205 |
corner:(1.0 @ 1.0) |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1206 |
in:self. |
266 | 1207 |
|
1208 |
v := ScrollableView for:SelectionInListView in:panel. |
|
1209 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
1210 |
||
1211 |
contextView := v scrolledView. |
|
1212 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1213 |
contextView doubleClickAction:[:line | self browse]. |
266 | 1214 |
|
1215 |
v := ScrollableView for:CodeView in:panel. |
|
1216 |
v origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
1217 |
||
1218 |
codeView := v scrolledView. |
|
1219 |
||
1220 |
hpanel := VariableHorizontalPanel in:panel. |
|
1221 |
hpanel origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
1222 |
||
1223 |
receiverInspector := InspectorView |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1224 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1225 |
in:hpanel. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1226 |
receiverInspector label:'receiver'. |
266 | 1227 |
|
1228 |
contextInspector := ContextInspectorView |
|
494
0d35a48c45bc
double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents:
485
diff
changeset
|
1229 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1230 |
in:hpanel. |
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1231 |
contextInspector label:'context'. |
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1232 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1233 |
"Modified: 3.3.1997 / 21:32:55 / cg" |
266 | 1234 |
! |
1235 |
||
1236 |
initializeMiddleButtonMenu |
|
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1237 |
|labels selectors m| |
266 | 1238 |
|
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1239 |
exclusive ifTrue:[ |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1240 |
labels := resources array:#( |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1241 |
'show more' |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1242 |
'show verbose backtrace' |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1243 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1244 |
'remove breakpoint' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1245 |
'remove all trace & breakpoints' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1246 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1247 |
'copy walkback text' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1248 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1249 |
'quickTerminate' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1250 |
'=' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1251 |
'exit smalltalk (no confirmation)' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1252 |
). |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1253 |
selectors := #( |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1254 |
showMore |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1255 |
showVerboseBacktrace |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1256 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1257 |
removeBreakpoint |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1258 |
removeAllBreakpoints |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1259 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1260 |
copyWalkbackText |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1261 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1262 |
quickTerminate |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1263 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1264 |
exit |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1265 |
) |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1266 |
] ifFalse:[ |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1267 |
labels := resources array:#( |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1268 |
'show more' |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1269 |
'show verbose backtrace' |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1270 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1271 |
'skip' |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1272 |
'step out' |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1273 |
'-' |
266 | 1274 |
" |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1275 |
'continue' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1276 |
'terminate' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1277 |
'abort' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1278 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1279 |
'step' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1280 |
'send' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1281 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1282 |
'return' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1283 |
'restart' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1284 |
'-' |
266 | 1285 |
" |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1286 |
'remove breakpoint' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1287 |
'remove all trace & breakpoints' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1288 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1289 |
'browse' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1290 |
'browse class' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1291 |
'browse class hierarchy' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1292 |
'browse full class protocol' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1293 |
'implementors' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1294 |
'senders' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1295 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1296 |
'inspect context' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1297 |
'copy walkback text' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1298 |
'-' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1299 |
'quickTerminate' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1300 |
'=' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1301 |
'exit smalltalk (no confirmation)' |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1302 |
). |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1303 |
|
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1304 |
selectors := #( |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1305 |
showMore |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1306 |
showVerboseBacktrace |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1307 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1308 |
skip |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1309 |
skipForReturn |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1310 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1311 |
" |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1312 |
doContinue |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1313 |
doTerminate |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1314 |
doAbort |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1315 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1316 |
doStep |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1317 |
doSend |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1318 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1319 |
doReturn |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1320 |
doRestart |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1321 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1322 |
" |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1323 |
removeBreakpoint |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1324 |
removeAllBreakpoints |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1325 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1326 |
browse |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1327 |
browseClass |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1328 |
browseClassHierarchy |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1329 |
browseFullClassProtocol |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1330 |
implementors |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1331 |
senders |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1332 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1333 |
inspectContext |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1334 |
copyWalkbackText |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1335 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1336 |
quickTerminate |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1337 |
nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1338 |
exit |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1339 |
). |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1340 |
]. |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1341 |
|
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1342 |
m := PopUpMenu |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1343 |
labels:(resources array:labels) |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1344 |
selectors:selectors |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1345 |
receiver:self |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1346 |
for:contextView. |
266 | 1347 |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1348 |
verboseBacktrace ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1349 |
m labelAt:#showVerboseBacktrace put:(resources string:'show dense backtrace'). |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1350 |
m selectorAt:#showVerboseBacktrace put:#showDenseBacktrace |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1351 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1352 |
|
266 | 1353 |
contextView middleButtonMenu:m. |
1354 |
||
1355 |
inspecting ifTrue:[ |
|
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1356 |
m notNil ifTrue:[ |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1357 |
m disableAll:#(doTraceStep removeBreakpoint browse browseClass |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1358 |
browseClassHierarchy browseFullClassProtocol |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1359 |
implementors senders inspectContext skip doStepOut). |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
1360 |
]. |
266 | 1361 |
] |
1362 |
||
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1363 |
"Modified: 10.1.1997 / 21:35:36 / cg" |
266 | 1364 |
! |
1365 |
||
1366 |
realize |
|
1367 |
super realize. |
|
1368 |
"/ exclusive ifTrue:[ |
|
1369 |
"/ windowGroup := nil |
|
1370 |
"/ ]. |
|
1371 |
||
1372 |
inspecting ifTrue:[ |
|
1373 |
inspectedProcess notNil ifTrue:[ |
|
1374 |
" |
|
1375 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
1376 |
to run between mine and the debugged processes prio) |
|
1377 |
" |
|
1378 |
Processor activeProcess |
|
1379 |
priority:(inspectedProcess priority + 2 min:16). |
|
73 | 1380 |
] |
266 | 1381 |
] |
1382 |
! |
|
1383 |
||
1384 |
setLabelFor:aMessage in:aProcess |
|
1385 |
|l nm| |
|
1386 |
||
1387 |
l := aMessage , ' ('. |
|
1030 | 1388 |
Object errorSignal handle:[:ex | |
1389 |
l := l , '???' |
|
1390 |
] do:[ |
|
1391 |
nm := aProcess name. |
|
1392 |
nm notNil ifTrue:[ |
|
1393 |
l := l , (nm contractTo:17) , ''. |
|
1394 |
]. |
|
1395 |
l := l , '[' , aProcess id printString , ']'. |
|
73 | 1396 |
]. |
1030 | 1397 |
l := l , ')'. |
266 | 1398 |
self label:l. |
0 | 1399 |
! ! |
1400 |
||
1401 |
!DebugView methodsFor:'interrupt handling'! |
|
1402 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1403 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1404 |
DebuggingDebugger == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1405 |
'contextIRQ' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1406 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1407 |
^ self stepOrNext |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1408 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1409 |
"Modified: 14.10.1996 / 13:30:47 / cg" |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1410 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1411 |
|
0 | 1412 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1413 |
DebuggingDebugger == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1414 |
'stepIRQ' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1415 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1416 |
^ self stepOrNext |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1417 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1418 |
"Modified: 14.10.1996 / 13:30:56 / cg" |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1419 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1420 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1421 |
stepOrNext |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1422 |
|where here s isWrap method lastWrappedConAddr wrappedMethod |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1423 |
inBlock left ignore contextBelow lastWrappedContext |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1424 |
leftWrap enteredWrap anyStepBlocks belowSteppedContext| |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1425 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1426 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
1427 |
"/ DebuggingDebugger := false |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1428 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1429 |
skipLineNr == #return ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1430 |
name := Processor activeProcess nameOrId. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1431 |
self label:('context returned ' , ' (process: ' , name , ')'). |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1432 |
here := thisContext sender sender. |
755 | 1433 |
here setLineNumber:nil. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1434 |
here := nil. |
755 | 1435 |
self enter:thisContext sender sender sender. |
554 | 1436 |
^ self |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1437 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1438 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1439 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1440 |
"/ "/ should no longer happen |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1441 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1442 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1443 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1444 |
"/ self enter:thisContext sender. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1445 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1446 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1447 |
|
52 | 1448 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1449 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
554 | 1450 |
^ self |
52 | 1451 |
]. |
1452 |
||
29 | 1453 |
here := thisContext. "stepInterrupt" |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1454 |
here := here sender. "the caller; step- or contextIRQ" |
29 | 1455 |
here := here sender. "the interrupted context" |
1456 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1457 |
DebuggingDebugger == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1458 |
'*******' printNL. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1459 |
'here in ' print. |
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1460 |
inWrap ifTrue:['(wrap) ' print.]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1461 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1462 |
here selector printNL. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1463 |
]. |
10 | 1464 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1465 |
" |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1466 |
kludge to hide breakpoint wrappers in the context list: |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1467 |
check if we are in a wrapper methods hidden setup-sequence |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1468 |
if so, ignore the interrupt and continue single sending |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1469 |
" |
29 | 1470 |
isWrap := false. |
57 | 1471 |
left := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1472 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1473 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1474 |
where := here. |
57 | 1475 |
inWrap ifTrue:[ |
554 | 1476 |
wrappedMethod := nil. |
1477 |
5 timesRepeat:[ |
|
1478 |
(where notNil and:[where isBlockContext not]) ifTrue:[ |
|
1479 |
method := where method. |
|
1480 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
1481 |
" |
|
1482 |
in a wrapper method |
|
1483 |
" |
|
1484 |
wrappedMethod ~~ method ifTrue:[ |
|
1485 |
wrappedMethod := method. |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1486 |
lastWrappedContext := where. |
554 | 1487 |
where sender receiver == method originalMethod ifFalse:[ |
1488 |
isWrap := true. |
|
1489 |
] |
|
1490 |
] ifFalse:[ |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1491 |
where == steppedContext ifTrue:[ |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1492 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1493 |
DebuggingDebugger == true ifTrue:[ |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1494 |
'change stepCon from: ' print. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1495 |
steppedContext print. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1496 |
' to lastWrapped: ' print. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1497 |
lastWrappedContext printNL. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1498 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1499 |
|
554 | 1500 |
inWrap := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1501 |
leftWrap := true. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1502 |
wrapperContext := steppedContext. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1503 |
steppedContext := lastWrappedContext |
554 | 1504 |
] |
1505 |
] |
|
1506 |
]. |
|
1507 |
where := where sender |
|
1508 |
] |
|
1509 |
]. |
|
29 | 1510 |
]. |
1511 |
||
1512 |
isWrap ifTrue:[ |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1513 |
DebuggingDebugger == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1514 |
'ignore wrap' printNL. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1515 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1516 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1517 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1518 |
"/ ignore, while in wrappers hidden setup |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1519 |
"/ |
554 | 1520 |
where := nil. here := nil. |
1521 |
ObjectMemory flushInlineCaches. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1522 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1523 |
skipLineNr == #return ifTrue:[ |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1524 |
DebuggingDebugger == true ifTrue:[ |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1525 |
'skipRet in wrap' printCR. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1526 |
] |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1527 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1528 |
|
554 | 1529 |
StepInterruptPending := 1. |
1530 |
InterruptPending := 1. |
|
1531 |
InStepInterrupt := nil. |
|
1532 |
^ nil |
|
29 | 1533 |
]. |
1534 |
||
57 | 1535 |
inBlock := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1536 |
anyStepBlocks := false. |
57 | 1537 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1538 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1539 |
"/ is this for a send or a step/next ? |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1540 |
"/ |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1541 |
(bigStep |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1542 |
and:[steppedContext notNil]) ifTrue:[ |
554 | 1543 |
" |
1544 |
a step or next - ignore all contexts below the interesting one |
|
1545 |
" |
|
1546 |
where := here. "the interrupted context" |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1547 |
contextBelow := nil. |
57 | 1548 |
|
554 | 1549 |
where home notNil ifTrue:[ |
1550 |
"/ |
|
1551 |
"/ in a block called by 'our' context ? |
|
1552 |
"/ |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1553 |
where home == steppedContext ifTrue:[ |
57 | 1554 |
"/ '*block*' printNL. |
554 | 1555 |
inBlock := true |
1556 |
] |
|
1557 |
]. |
|
57 | 1558 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1559 |
where == steppedContext ifFalse:[ |
554 | 1560 |
where := where sender. |
57 | 1561 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1562 |
where notNil ifTrue:[ |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1563 |
where home == steppedContext ifTrue:[ |
57 | 1564 |
"/ '*block*' printNL. |
554 | 1565 |
inBlock := true. |
1566 |
] |
|
1567 |
]. |
|
57 | 1568 |
|
1569 |
"/ 'looking for ' print. |
|
29 | 1570 |
"/ (steppedContextAddress printStringRadix:16)print. '' printNL. |
57 | 1571 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1572 |
"/where print. ' ' print. ((ObjectMemory addressOf:where)printStringRadix:16) printCR. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1573 |
"/steppedContext print. ' ' print. ((ObjectMemory addressOf:steppedContext)printStringRadix:16) printCR. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1574 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1575 |
where == steppedContext ifFalse:[ |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1576 |
|
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1577 |
"/ check if we are in a context below steppedContext |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1578 |
"/ (i.e. if steppedContext can be reached from |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1579 |
"/ interrupted context. Not using context-ref but its |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1580 |
"/ address to avoid creation of many useless contexts.) |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1581 |
|
554 | 1582 |
inBlock ifFalse:[ |
1583 |
[where notNil] whileTrue:[ |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1584 |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1585 |
"/ if either the receiver or any arg of this context |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1586 |
"/ is a block of the steppedContext, we must really |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1587 |
"/ do a single step. Otherwise, stepping through a |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1588 |
"/ do:-loop would be very difficult. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1589 |
|
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1590 |
(where receiver isBlock |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1591 |
and:[where receiver home == steppedContext]) |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1592 |
ifTrue:[ |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1593 |
anyStepBlocks := true. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1594 |
] ifFalse:[ |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1595 |
where args do:[:arg | |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1596 |
(arg isBlock |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1597 |
and:[arg home == steppedContext]) |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1598 |
ifTrue:[ |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1599 |
anyStepBlocks := true. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1600 |
] |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1601 |
] |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1602 |
]. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1603 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1604 |
DebuggingDebugger == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1605 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1606 |
where selector printNL. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1607 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1608 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1609 |
where == steppedContext ifTrue:[ |
57 | 1610 |
"/ 'found it - below; ignore' printNL. |
554 | 1611 |
" |
1612 |
found the interesting context somwehere up in the |
|
1613 |
chain. We seem to be still below the interesting one ... |
|
1614 |
" |
|
1615 |
tracing == true ifTrue:[ |
|
1616 |
here printString printCR |
|
1617 |
]. |
|
1618 |
" |
|
1619 |
yes, a context below |
|
1620 |
- continue and schedule another stepInterrupt. |
|
1621 |
Must flush caches since optimized methods not always |
|
1622 |
look for pending interrupts |
|
1623 |
" |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1624 |
|
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1625 |
contextBelow notNil ifTrue:[ |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1626 |
"/ 'prepare for unwind-catch' printNL. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1627 |
"/ 'con= ' print. contextBelow printCR. |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1628 |
contextBelow selector notNil ifTrue:[ |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1629 |
self label:'single stepping - please wait ...(' , contextBelow selector , ')'. |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1630 |
]. |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1631 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1632 |
DebuggingDebugger == true ifTrue:[ |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1633 |
'below stepCon; continue until unwind of: ' print. |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1634 |
contextBelow printCR. |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1635 |
]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1636 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1637 |
StepInterruptPending := nil. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1638 |
] ifFalse:[ |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1639 |
ObjectMemory flushInlineCaches. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1640 |
|
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1641 |
here selector notNil ifTrue:[ |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1642 |
self label:'single stepping - please wait ...(' , here selector , ')'. |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1643 |
]. |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1644 |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1645 |
DebuggingDebugger == true ifTrue:[ |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
1646 |
'in stepCon; continue single stepping' printCR. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1647 |
]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1648 |
StepInterruptPending := 1. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1649 |
InterruptPending := 1. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1650 |
]. |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1651 |
where := nil. here := nil. |
554 | 1652 |
InStepInterrupt := nil. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1653 |
|
554 | 1654 |
^ nil |
1655 |
]. |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1656 |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1657 |
where methodHome == steppedContext methodHome ifTrue:[ |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1658 |
inBlock := true. |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1659 |
]. |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1660 |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1661 |
anyStepBlocks ifFalse:[ |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1662 |
inBlock ifFalse:[ |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1663 |
contextBelow := where |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1664 |
] |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1665 |
]. |
554 | 1666 |
where := where sender |
1667 |
]. |
|
799 | 1668 |
s := 'context returned'. |
554 | 1669 |
left := true. |
1670 |
]. |
|
1671 |
] ifTrue:[ |
|
29 | 1672 |
"/ 'found it right in sender' printNL. |
554 | 1673 |
s := 'after step' |
1674 |
]. |
|
1675 |
] ifTrue:[ |
|
29 | 1676 |
"/ 'found it right away' printNL. |
554 | 1677 |
s := 'after step' |
1678 |
]. |
|
0 | 1679 |
] ifFalse:[ |
57 | 1680 |
"/ ' send' printNL. |
554 | 1681 |
" |
1682 |
a send |
|
1683 |
" |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1684 |
DebuggingDebugger == true ifTrue:[ |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1685 |
'clear steppedContext' printCR. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1686 |
]. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1687 |
steppedContext := nil. |
554 | 1688 |
s := 'after send' |
0 | 1689 |
]. |
7 | 1690 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1691 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1692 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1693 |
ignore := true. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1694 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1695 |
|
790 | 1696 |
"/ handle the case, when a subBlock leaves; |
1697 |
"/ continue stepping in the home context. |
|
1698 |
||
1699 |
left ifTrue:[ |
|
1700 |
steppedContext home notNil ifTrue:[ |
|
1701 |
steppedContext := steppedContext home. |
|
1702 |
s := 'after step'. |
|
1703 |
left := false. |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1704 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
1705 |
|
790 | 1706 |
] |
1707 |
]. |
|
1708 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1709 |
" |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1710 |
kludge to hide breakpoint wrappers in the context list: |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1711 |
check if we are in a wrapper methods hidden exit-sequence |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1712 |
if so, ignore the interrupt and continue single sending |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1713 |
" |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1714 |
(where isNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1715 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1716 |
ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1717 |
"/ did not find our steppedContext along the chain; |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1718 |
"/ could be in a wrappedMethods exitBlock ... |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1719 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1720 |
leftWrap ifFalse:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1721 |
where := here. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1722 |
wrappedMethod := nil. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1723 |
5 timesRepeat:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1724 |
where notNil ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1725 |
where isBlockContext ifFalse:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1726 |
method := where method. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1727 |
(method notNil and:[method isWrapped]) ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1728 |
where == wrapperContext ifTrue:[ |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1729 |
DebuggingDebugger == true ifTrue:[ |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1730 |
'change stepCon fromWrapped: ' print. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1731 |
steppedContext print. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1732 |
' to: ' print. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1733 |
wrapperContext printNL. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1734 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1735 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1736 |
inWrap := true. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1737 |
enteredWrap := true. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1738 |
steppedContext := wrapperContext. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1739 |
wrapperContext := nil. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1740 |
] |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1741 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1742 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1743 |
where := where sender |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1744 |
] |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1745 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1746 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1747 |
enteredWrap ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1748 |
ignore := true |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1749 |
] |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1750 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1751 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1752 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1753 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1754 |
left ifTrue:[ |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1755 |
"/ special care for stepInterrupt in send, |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1756 |
"/ when created a dummy context (lineNr == 1) |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1757 |
|
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1758 |
steppedContext lineNumber isNil ifTrue:[ |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1759 |
steppedContext selector == here sender selector ifTrue:[ |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1760 |
left := false. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1761 |
s := 'after step'. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1762 |
steppedContext := here sender. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1763 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1764 |
] |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1765 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
1766 |
|
57 | 1767 |
inBlock ifTrue:[ |
1768 |
"/ 'inBlock' printNL. |
|
554 | 1769 |
s := 'in block'. |
57 | 1770 |
]. |
1771 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1772 |
DebuggingDebugger == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1773 |
where notNil ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1774 |
'(' print. steppedContextLineno print. ') ' print. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1775 |
where print. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1776 |
'[' print. where lineNumber print. ']' printNL. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1777 |
]. |
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
1778 |
]. |
57 | 1779 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1780 |
ignore ifFalse:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1781 |
(bigStep |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1782 |
and:[steppedContextLineno notNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1783 |
and:[where notNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1784 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1785 |
(here isBlockContext |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1786 |
and:[(here methodHome == steppedContext) |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1787 |
or:[here home == steppedContext]]) ifTrue:[ |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1788 |
DebuggingDebugger == true ifTrue:[ |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1789 |
'same line but in block' printNL. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1790 |
]. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1791 |
|
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1792 |
steppedContext := actualContext := here. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1793 |
steppedContextLineno := here lineNumber. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1794 |
] ifFalse:[ |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1795 |
DebuggingDebugger == true ifTrue:[ |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1796 |
'same line - ignored' printNL. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1797 |
]. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
1798 |
ignore := true |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1799 |
]. |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1800 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1801 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1802 |
(left not |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1803 |
and:[skipLineNr notNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1804 |
and:[where notNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1805 |
and:[where lineNumber < skipLineNr]]]) ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1806 |
DebuggingDebugger == true ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1807 |
'skip (' print. skipLineNr print. ' unreached - ignored' printNL. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1808 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1809 |
ignore := true |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1810 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1811 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1812 |
(steppedContextLineno isNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1813 |
and:[skipLineNr isNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1814 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1815 |
DebuggingDebugger == true ifTrue:[ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1816 |
'same line2 (after conIRQ) - ignored' printNL. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1817 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1818 |
ignore := true |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
1819 |
]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1820 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1821 |
|
57 | 1822 |
ignore ifTrue:[ |
1823 |
"/' ' printNL. |
|
554 | 1824 |
where := nil. here := nil. |
1825 |
" |
|
1826 |
yes, a context below |
|
1827 |
- continue and schedule another stepInterrupt. |
|
1828 |
Must flush caches since optimized methods not always |
|
1829 |
look for pending interrupts |
|
1830 |
" |
|
1831 |
ObjectMemory flushInlineCaches. |
|
1832 |
StepInterruptPending := 1. |
|
1833 |
InterruptPending := 1. |
|
1834 |
InStepInterrupt := nil. |
|
1835 |
^ nil |
|
57 | 1836 |
]. |
1837 |
||
1838 |
"/ ' ' printNL. |
|
1839 |
||
29 | 1840 |
name := Processor activeProcess nameOrId. |
7 | 1841 |
self label:(s , ' (process: ' , name , ')'). |
1842 |
||
57 | 1843 |
tracing := false. |
1844 |
bigStep := false. |
|
1845 |
||
0 | 1846 |
"release refs to context" |
1847 |
where := nil. here := nil. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1848 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1849 |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
1850 |
DebuggingDebugger == true ifTrue:[ |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
1851 |
'==> enter on: ' print. thisContext sender sender printCR. |
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
1852 |
]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1853 |
self enter:thisContext sender sender |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1854 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
1855 |
"Created: 14.10.1996 / 12:53:39 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1856 |
"Modified: 3.3.1997 / 21:36:35 / cg" |
0 | 1857 |
! ! |
1858 |
||
266 | 1859 |
!DebugView methodsFor:'menu / button actions'! |
1860 |
||
1861 |
autoUpdateOff |
|
1862 |
"stop the update process" |
|
1863 |
||
1864 |
updateProcess notNil ifTrue:[ |
|
1865 |
monitorToggle lampColor:(Color yellow). |
|
1866 |
updateProcess terminate. |
|
1867 |
updateProcess := nil |
|
1868 |
] |
|
1869 |
! |
|
1870 |
||
1871 |
autoUpdateOn |
|
1872 |
"fork a subprocess which updates the contextList in regular intervals" |
|
1873 |
||
1874 |
updateProcess isNil ifTrue:[ |
|
1875 |
updateProcess := |
|
1876 |
[ |
|
1877 |
[true] whileTrue:[ |
|
1878 |
monitorToggle showLamp ifTrue:[ |
|
1879 |
monitorToggle lampColor:(Color yellow). |
|
1880 |
] ifFalse:[ |
|
1881 |
monitorToggle activeForegroundColor:Color black. |
|
1882 |
]. |
|
1883 |
(Delay forSeconds:0.25) wait. |
|
1884 |
self updateContext. |
|
1885 |
monitorToggle showLamp ifTrue:[ |
|
1886 |
monitorToggle lampColor:(Color red). |
|
1887 |
] ifFalse:[ |
|
1888 |
monitorToggle activeForegroundColor:Color red. |
|
1889 |
]. |
|
1890 |
(Delay forSeconds:0.25) wait. |
|
1891 |
self updateContext. |
|
1892 |
] |
|
1893 |
] forkAt:(Processor activePriority - 1) |
|
1894 |
] |
|
1895 |
||
1896 |
! |
|
1897 |
||
1898 |
browse |
|
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1899 |
|mthd who sel cls| |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1900 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1901 |
mthd := selectedContext method. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1902 |
mthd notNil ifTrue:[ |
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1903 |
who := selectedContext method who. |
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1904 |
who notNil ifTrue:[ |
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1905 |
cls := who methodClass. |
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1906 |
sel := who methodSelector. |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1907 |
] |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1908 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1909 |
cls isNil ifTrue:[ |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1910 |
"/ class not found - try receiver |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1911 |
cls := selectedContext receiver class |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1912 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1913 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
1914 |
cls browserClass openInClass:cls selector:sel. |
266 | 1915 |
|
1916 |
"Created: 22.11.1995 / 21:27:01 / cg" |
|
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1917 |
"Modified: 1.11.1996 / 16:22:13 / cg" |
266 | 1918 |
! |
1919 |
||
1920 |
browseClass |
|
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1921 |
|cls| |
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1922 |
|
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1923 |
cls := selectedContext method containingClass. |
527 | 1924 |
cls browserClass browseClass:cls |
1925 |
||
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1926 |
"Modified: 1.11.1996 / 16:34:19 / cg" |
266 | 1927 |
! |
1928 |
||
1929 |
browseClassHierarchy |
|
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1930 |
|cls| |
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1931 |
|
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1932 |
cls := selectedContext method containingClass. |
527 | 1933 |
cls browserClass browseClassHierarchy:cls. |
1934 |
||
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1935 |
"Modified: 1.11.1996 / 16:34:31 / cg" |
266 | 1936 |
! |
1937 |
||
1938 |
browseFullClassProtocol |
|
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1939 |
|cls| |
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1940 |
|
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1941 |
cls := selectedContext method containingClass. |
527 | 1942 |
cls browserClass browseFullClassProtocol:cls. |
1943 |
||
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
1944 |
"Modified: 1.11.1996 / 16:34:41 / cg" |
266 | 1945 |
! |
1946 |
||
1947 |
copyWalkbackText |
|
1948 |
"place the contents of the walkback view into the copy-paste buffer. |
|
1949 |
This allows pasting it into some other view for printing ..." |
|
1950 |
||
1951 |
self setTextSelection:(contextArray collect:[:con | con fullPrintString]) asStringCollection |
|
1952 |
||
1953 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
1954 |
! |
|
1955 |
||
1956 |
doAbort |
|
1957 |
"abort - send Object>>abortSignal, which is usually cought |
|
1958 |
at save places (for example: in the event loop) and returns back |
|
1959 |
from whatever the process is doing, but does not terminate it." |
|
1960 |
||
1961 |
inspecting ifTrue:[ |
|
477 | 1962 |
inspectedProcess isDead ifTrue:[ |
1963 |
self showTerminated. |
|
1964 |
^ self |
|
1965 |
]. |
|
1966 |
(Object abortSignal isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
1967 |
self showError:'** the process does not handle the abort signal **' |
|
1968 |
] ifTrue:[ |
|
1969 |
self interruptProcessWith:[Object abortSignal raise]. |
|
1970 |
]. |
|
1971 |
^ self |
|
266 | 1972 |
]. |
1973 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
1974 |
steppedContext := wrapperContext := nil. |
266 | 1975 |
haveControl := false. |
1976 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1977 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1978 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1979 |
catchBlock notNil ifTrue:[ |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1980 |
abortButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1981 |
catchBlock value. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1982 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1983 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1984 |
'DebugView [warning]: abort failed' errorPrintCR. |
266 | 1985 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
1986 |
|
266 | 1987 |
^ self. |
1988 |
||
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1989 |
"Modified: 10.1.1997 / 17:38:28 / cg" |
266 | 1990 |
! |
1991 |
||
1992 |
doContinue |
|
1993 |
"continue from menu" |
|
1994 |
||
1995 |
inspecting ifTrue:[ |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1996 |
device hasColors ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1997 |
continueButton foregroundColor:Color red darkened. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1998 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1999 |
continueButton label:(resources string:'stop'). |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2000 |
continueButton action:[self doStop]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2001 |
|
477 | 2002 |
self processPerform:#resume. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2003 |
|
477 | 2004 |
^ self |
266 | 2005 |
]. |
2006 |
canContinue ifTrue:[ |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2007 |
steppedContext := wrapperContext := nil. |
477 | 2008 |
tracing := false. |
2009 |
haveControl := false. |
|
2010 |
exitAction := #continue. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2011 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2012 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2013 |
catchBlock notNil ifTrue:[catchBlock value]. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2014 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2015 |
"/ not reached. |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2016 |
'DebugView [warning]: continue failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2017 |
continueButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2018 |
|
266 | 2019 |
] ifFalse:[ |
477 | 2020 |
inspecting ifFalse:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2021 |
'DebugView [info]: resuming top context' infoPrintCR. |
477 | 2022 |
self showSelection:1. |
2023 |
self doReturn |
|
2024 |
] |
|
266 | 2025 |
] |
477 | 2026 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2027 |
"Modified: 10.1.1997 / 17:38:34 / cg" |
266 | 2028 |
! |
2029 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2030 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2031 |
"single send; reenter with next message send" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2032 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2033 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2034 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2035 |
canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2036 |
steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2037 |
haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2038 |
exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2039 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2040 |
"exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2041 |
catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2042 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2043 |
"/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2044 |
'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2045 |
sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2046 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2047 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2048 |
"Modified: 10.1.1997 / 17:38:41 / cg" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2049 |
"Created: 6.3.1997 / 21:09:36 / cg" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2050 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2051 |
|
266 | 2052 |
doNext |
1072 | 2053 |
"skip for next source-code line; entering blocks" |
266 | 2054 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2055 |
stepHow := #nextIn. |
266 | 2056 |
self doStep:nil |
790 | 2057 |
|
1072 | 2058 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2059 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2060 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2061 |
doNextOut |
1072 | 2062 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2063 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2064 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2065 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2066 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2067 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 2068 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2069 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2070 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2071 |
doNextOver |
1072 | 2072 |
"skip for next source-code line; skip over blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2073 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2074 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2075 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2076 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2077 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 2078 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 2079 |
! |
2080 |
||
2081 |
doNoTrace |
|
2082 |
traceView notNil ifTrue:[ |
|
2083 |
traceView topView destroy. |
|
2084 |
traceView := nil. |
|
2085 |
]. |
|
2086 |
tracing := false |
|
2087 |
! |
|
2088 |
||
2089 |
doRestart |
|
2090 |
"restart - the selected context will be restarted" |
|
2091 |
||
2092 |
inspecting ifTrue:[ |
|
477 | 2093 |
selectedContext isNil ifTrue:[ |
2094 |
^ self showError:'** select a context first **' |
|
2095 |
]. |
|
2096 |
self interruptProcessWith:[selectedContext unwindAndRestart]. |
|
2097 |
^ self |
|
266 | 2098 |
]. |
2099 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2100 |
steppedContext := wrapperContext := nil. |
266 | 2101 |
haveControl := false. |
2102 |
exitAction := #restart. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2103 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2104 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2105 |
catchBlock notNil ifTrue:[catchBlock value]. |
477 | 2106 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2107 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2108 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2109 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2110 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2111 |
"Modified: 10.1.1997 / 17:38:36 / cg" |
266 | 2112 |
! |
2113 |
||
2114 |
doReturn |
|
2115 |
"return - the selected context will do a ^nil" |
|
2116 |
||
2117 |
inspecting ifTrue:[ |
|
477 | 2118 |
selectedContext isNil ifTrue:[ |
2119 |
^ self showError:'** select a context first **' |
|
2120 |
]. |
|
2121 |
self interruptProcessWith:[selectedContext unwind]. |
|
2122 |
^ self |
|
266 | 2123 |
]. |
2124 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2125 |
steppedContext := wrapperContext := nil. |
266 | 2126 |
haveControl := false. |
2127 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2128 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2129 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2130 |
catchBlock notNil ifTrue:[catchBlock value]. |
477 | 2131 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2132 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2133 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2134 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2135 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2136 |
"Modified: 10.1.1997 / 17:38:39 / cg" |
266 | 2137 |
! |
2138 |
||
2139 |
doSend |
|
2140 |
"single send; reenter with next message send" |
|
2141 |
||
1072 | 2142 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2143 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2144 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2145 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2146 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2147 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2148 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2149 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2150 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2151 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2152 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2153 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2154 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2155 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2156 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2157 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2158 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2159 |
|
1072 | 2160 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 2161 |
! |
2162 |
||
2163 |
doStep |
|
2164 |
"skip for next send in selected method" |
|
2165 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2166 |
stepHow := #step. |
790 | 2167 |
self doStep:-1 |
2168 |
||
1072 | 2169 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 2170 |
! |
2171 |
||
2172 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2173 |
"common helper for step, skip & next. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2174 |
Arrange for single-steppping until we pass lineNr (if nonNil) |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2175 |
or to next line (if nil) or to next send (if -1)" |
266 | 2176 |
|
2177 |
|con method| |
|
2178 |
||
2179 |
inspecting ifTrue:[^ self]. |
|
2180 |
||
2181 |
canContinue ifTrue:[ |
|
477 | 2182 |
selectedContext notNil ifTrue:[ |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2183 |
con := actualContext. "/ selectedContext. |
477 | 2184 |
steppedContextLineno := actualContext lineNumber. |
2185 |
] ifFalse:[ |
|
2186 |
con := contextArray at:2. |
|
2187 |
steppedContextLineno := con lineNumber. |
|
2188 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2189 |
|
477 | 2190 |
skipLineNr := lineNr. |
266 | 2191 |
|
477 | 2192 |
lineNr == -1 ifTrue:[ |
2193 |
steppedContextLineno := skipLineNr := nil. |
|
2194 |
]. |
|
266 | 2195 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2196 |
stepHow == #send ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2197 |
steppedContext := contextArray at:1. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2198 |
stepHow := #nextIn. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2199 |
] ifFalse:[ |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2200 |
stepHow == #nextOut ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2201 |
steppedContext := con home. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2202 |
] ifFalse:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2203 |
steppedContext := con. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2204 |
]. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2205 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2206 |
wrapperContext := nil. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2207 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2208 |
"/ ' step con:' print. (ObjectMemory addressOf:steppedContext) printHex. ' ' print. steppedContext printCR. |
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2209 |
|
477 | 2210 |
" |
2211 |
if we step in a wrapped method, |
|
2212 |
prepare to skip the prolog ... |
|
2213 |
" |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2214 |
|
477 | 2215 |
inWrap := false. |
2216 |
method := con method. |
|
2217 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
2218 |
inWrap := true |
|
2219 |
]. |
|
266 | 2220 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2221 |
lineNr == #return ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2222 |
Processor activeProcess forceInterruptOnReturnOf:con. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2223 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2224 |
|
477 | 2225 |
con := nil. |
2226 |
bigStep := true. |
|
2227 |
haveControl := false. |
|
2228 |
exitAction := #step. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2229 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2230 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2231 |
catchBlock notNil ifTrue:[catchBlock value]. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2232 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2233 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2234 |
'DebugView [warning]: step failed' errorPrintCR. |
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2235 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
266 | 2236 |
] |
477 | 2237 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
2238 |
"Modified: 6.3.1997 / 21:11:38 / cg" |
266 | 2239 |
! |
2240 |
||
2241 |
doStop |
|
2242 |
"stop the process (if its running, otherwise this is a no-op)" |
|
2243 |
||
2244 |
inspecting ifTrue:[ |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2245 |
device hasColors ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2246 |
continueButton foregroundColor:Color green darkened darkened. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2247 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2248 |
continueButton label:(resources string:'continue'). |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2249 |
continueButton action:[self doContinue]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2250 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2251 |
self processPerform:#stop. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2252 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2253 |
^ self |
266 | 2254 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2255 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2256 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 2257 |
! |
2258 |
||
2259 |
doTerminate |
|
2260 |
"terminate - the process has a chance for cleanup" |
|
2261 |
||
2262 |
inspecting ifTrue:[ |
|
477 | 2263 |
self processPerform:#terminate. |
2264 |
^ self |
|
266 | 2265 |
]. |
2266 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2267 |
steppedContext := wrapperContext := nil. |
266 | 2268 |
haveControl := false. |
2269 |
exitAction := #terminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2270 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2271 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2272 |
catchBlock notNil ifTrue:[catchBlock value]. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2273 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2274 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2275 |
inspecting ifFalse:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2276 |
'DebugView [warning]: terminate failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2277 |
self warn:'terminate failed'. |
266 | 2278 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2279 |
terminateButton turnOff. |
477 | 2280 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2281 |
"Modified: 10.1.1997 / 17:38:22 / cg" |
266 | 2282 |
! |
2283 |
||
2284 |
doTrace |
|
2285 |
"tracing - not really implemented ..." |
|
2286 |
||
2287 |
self warn:'this function is not yet implemented'. |
|
2288 |
||
2289 |
"/ |v b| |
|
2290 |
"/ |
|
2291 |
"/ traceView isNil ifTrue:[ |
|
2292 |
"/ v := StandardSystemView on:Display. |
|
2293 |
"/ v label:'Debugger-Trace'. |
|
2294 |
"/ v icon:icon. |
|
2295 |
"/ |
|
2296 |
"/ b := Button label:'untrace' in:v. |
|
2297 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
2298 |
"/ b action:[ |
|
2299 |
"/ StepInterruptPending := nil. |
|
2300 |
"/ tracing := false. |
|
2301 |
"/ v unrealize. |
|
2302 |
"/ traceView := nil |
|
2303 |
"/ ]. |
|
2304 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
2305 |
"/ traceView origin:(0 @ (b height)) |
|
2306 |
"/ extent:[v width @ (v height - b height)] |
|
2307 |
"/ ]. |
|
2308 |
"/ v realize. |
|
2309 |
"/ |
|
2310 |
"/ tracing := true. |
|
2311 |
! |
|
2312 |
||
2313 |
doTraceStep |
|
2314 |
"tracestep - not implemented yet" |
|
2315 |
||
2316 |
canContinue ifTrue:[ |
|
2317 |
tracing := true. |
|
2318 |
self doStep |
|
2319 |
] |
|
2320 |
! |
|
2321 |
||
2322 |
exit |
|
2323 |
"exit from menu: immediate exit from smalltalk" |
|
2324 |
||
2325 |
OperatingSystem exit |
|
2326 |
! |
|
2327 |
||
2328 |
implementors |
|
2329 |
"open a browser on the implementors" |
|
2330 |
||
2331 |
selectedContext isNil ifTrue:[ |
|
2332 |
^ self showError:'** select a context first **' |
|
2333 |
]. |
|
2334 |
SystemBrowser browseImplementorsOf:selectedContext selector. |
|
2335 |
! |
|
2336 |
||
2337 |
inspectContext |
|
2338 |
"launch an inspector on the currently selected context" |
|
2339 |
||
2340 |
contextView selection notNil ifTrue:[ |
|
2341 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
|
2342 |
(contextArray at:(contextView selection)) inspect. |
|
2343 |
] |
|
2344 |
] |
|
2345 |
! |
|
2346 |
||
2347 |
quickTerminate |
|
2348 |
"quick terminate - the process will get no chance for cleanup actions" |
|
2349 |
||
2350 |
inspecting ifTrue:[ |
|
477 | 2351 |
self processPerform:#terminateNoSignal. |
2352 |
^ self |
|
266 | 2353 |
]. |
2354 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2355 |
steppedContext := wrapperContext := nil. |
266 | 2356 |
haveControl := false. |
2357 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2358 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2359 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2360 |
catchBlock notNil ifTrue:[catchBlock value]. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2361 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2362 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2363 |
inspecting ifFalse:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2364 |
'DebugView [warning]: terminate failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2365 |
self warn:'terminate failed'. |
266 | 2366 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
2367 |
terminateButton turnOff. |
477 | 2368 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2369 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 2370 |
! |
2371 |
||
2372 |
removeAllBreakpoints |
|
2373 |
"remove all trace & breakpoints - if any" |
|
2374 |
||
2375 |
MessageTracer unwrapAllMethods |
|
2376 |
! |
|
2377 |
||
2378 |
removeBreakpoint |
|
2379 |
"remove breakpoint on the selected contexts method - if any" |
|
2380 |
||
2381 |
|implementorClass method| |
|
2382 |
||
2383 |
selectedContext isNil ifTrue:[ |
|
2384 |
^ self showError:'** select a context first **' |
|
2385 |
]. |
|
2386 |
||
2387 |
implementorClass := selectedContext methodClass. |
|
2388 |
implementorClass notNil ifTrue:[ |
|
2389 |
method := implementorClass compiledMethodAt:selectedContext selector. |
|
2390 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
2391 |
MessageTracer unwrapMethod:method |
|
2392 |
] |
|
2393 |
]. |
|
2394 |
contextView middleButtonMenu disable:#removeBreakpoint. |
|
2395 |
! |
|
2396 |
||
2397 |
senders |
|
2398 |
"open a browser on the senders" |
|
2399 |
||
2400 |
selectedContext isNil ifTrue:[ |
|
2401 |
^ self showError:'** select a context first **' |
|
2402 |
]. |
|
2403 |
SystemBrowser browseAllCallsOn:selectedContext selector. |
|
2404 |
! |
|
2405 |
||
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2406 |
showDenseBacktrace |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2407 |
verboseBacktrace := false. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2408 |
contextView middleButtonMenu labelAt:#showDenseBacktrace put:(resources string:'show verbose backtrace'). |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2409 |
contextView middleButtonMenu selectorAt:#showDenseBacktrace put:#showVerboseBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2410 |
self redisplayBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2411 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2412 |
"Created: 10.1.1997 / 21:33:55 / cg" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2413 |
"Modified: 10.1.1997 / 21:37:21 / cg" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2414 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2415 |
|
266 | 2416 |
showMore |
2417 |
"double number of contexts shown" |
|
2418 |
||
2419 |
contextArray notNil ifTrue:[ |
|
563 | 2420 |
nChainShown := nChainShown * 2. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2421 |
self redisplayBacktrace. |
266 | 2422 |
] |
563 | 2423 |
|
950 | 2424 |
"Modified: 12.1.1997 / 01:24:26 / cg" |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2425 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2426 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2427 |
showVerboseBacktrace |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2428 |
verboseBacktrace := true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2429 |
contextView middleButtonMenu labelAt:#showVerboseBacktrace put:(resources string:'dense stack backtrace'). |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2430 |
contextView middleButtonMenu selectorAt:#showVerboseBacktrace put:#showDenseBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2431 |
self redisplayBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2432 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2433 |
"Modified: 10.1.1997 / 21:37:13 / cg" |
266 | 2434 |
! |
2435 |
||
2436 |
skip |
|
2437 |
"skip for cursor line in selected method" |
|
2438 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2439 |
stepHow := #skip. |
266 | 2440 |
self doStep:codeView cursorLine. |
790 | 2441 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2442 |
"Modified: 3.3.1997 / 20:56:23 / cg" |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2443 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2444 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2445 |
skipForReturn |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2446 |
"skip until context is left." |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2447 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2448 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2449 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2450 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2451 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
266 | 2452 |
! ! |
2453 |
||
2454 |
!DebugView methodsFor:'private'! |
|
2455 |
||
2456 |
busy |
|
2457 |
^ busy |
|
2458 |
! |
|
2459 |
||
2460 |
cacheMyself |
|
2461 |
"remember myself for next debug session" |
|
2462 |
||
2463 |
"caching the last debugger will make the next debugger appear |
|
2464 |
faster, since no resources have to be allocated in the display. |
|
2465 |
We have to be careful to release all refs to the debuggee, though. |
|
2466 |
Otherwise, the GC will not be able to release it" |
|
2467 |
||
2468 |
windowGroup notNil ifTrue:[ |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2469 |
windowGroup setProcess:nil. |
266 | 2470 |
]. |
2471 |
||
2472 |
busy := false. |
|
2473 |
codeView acceptAction:nil. |
|
2474 |
codeView doItAction:nil. |
|
2475 |
codeView contents:nil. |
|
2476 |
receiverInspector release. |
|
2477 |
contextInspector release. |
|
2478 |
inspectedProcess := nil. |
|
2479 |
exitAction := nil. |
|
2480 |
contextArray := nil. |
|
940 | 2481 |
selectedContext := actualContext := firstContext := nil. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2482 |
steppedContext := wrapperContext := nil. |
266 | 2483 |
catchBlock := nil. |
2484 |
grabber := nil. |
|
2485 |
self autoUpdateOff. |
|
2486 |
||
959
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2487 |
"/ |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2488 |
"/ only cache if I am on the Display |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2489 |
"/ |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2490 |
device == Display ifTrue:[ |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2491 |
exclusive ifTrue:[ |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2492 |
CachedExclusive := self |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2493 |
] ifFalse:[ |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2494 |
CachedDebugger := self |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2495 |
]. |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2496 |
] |
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2497 |
|
f1faf693f0d7
only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
2498 |
"Modified: 15.2.1997 / 18:53:48 / cg" |
266 | 2499 |
! |
2500 |
||
2501 |
exclusive:aBoolean |
|
2502 |
exclusive := aBoolean |
|
2503 |
! |
|
2504 |
||
2505 |
inspectedProcess |
|
2506 |
^ inspectedProcess |
|
2507 |
! |
|
2508 |
||
2509 |
interruptProcessWith:aBlock |
|
2510 |
"let inspected process do something, then update the context list" |
|
2511 |
||
2512 |
inspectedProcess isDead ifTrue:[ |
|
2513 |
self showTerminated. |
|
2514 |
^ self |
|
2515 |
]. |
|
2516 |
inspectedProcess interruptWith:aBlock. |
|
2517 |
" |
|
2518 |
give the process a chance to run, then update |
|
2519 |
" |
|
2520 |
(Delay forSeconds:0.2) wait. |
|
2521 |
self setContext:(inspectedProcess suspendedContext). |
|
2522 |
! |
|
2523 |
||
2524 |
processPerform:aMessage |
|
2525 |
"do something, then update the context list" |
|
2526 |
||
2527 |
inspectedProcess isDead ifTrue:[ |
|
2528 |
self showTerminated. |
|
2529 |
^ self |
|
2530 |
]. |
|
2531 |
inspectedProcess perform:aMessage. |
|
2532 |
" |
|
2533 |
give the process a chance to run, then update |
|
2534 |
" |
|
2535 |
(Delay forSeconds:0.2) wait. |
|
2536 |
self setContext:(inspectedProcess suspendedContext). |
|
2537 |
! |
|
2538 |
||
939 | 2539 |
redisplayBacktrace |
2540 |
|oldSelection oldContext con idx| |
|
2541 |
||
2542 |
contextArray notNil ifTrue:[ |
|
950 | 2543 |
self withWaitCursorDo:[ |
2544 |
oldSelection := contextView selection. |
|
2545 |
oldSelection notNil ifTrue:[ |
|
2546 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
2547 |
]. |
|
2548 |
||
2549 |
con := firstContext. |
|
2550 |
"/ con := contextArray at:1. |
|
2551 |
contextArray at:1 put:nil. |
|
2552 |
self setContext:con. |
|
2553 |
||
2554 |
oldContext isNil ifTrue:[ |
|
2555 |
idx := oldSelection |
|
2556 |
] ifFalse:[ |
|
2557 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
2558 |
]. |
|
2559 |
contextView setSelection:idx. |
|
2560 |
idx notNil ifTrue:[ |
|
2561 |
self showSelection:idx |
|
2562 |
] |
|
939 | 2563 |
] |
2564 |
] |
|
2565 |
||
2566 |
"Created: 10.1.1997 / 21:36:46 / cg" |
|
950 | 2567 |
"Modified: 12.1.1997 / 01:24:17 / cg" |
939 | 2568 |
! |
2569 |
||
266 | 2570 |
setContext:aContext |
2571 |
"show calling chain from aContext in the walk-back listview" |
|
2572 |
||
641 | 2573 |
^ self setContext:aContext releaseInspectors:true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2574 |
|
641 | 2575 |
"Modified: 27.6.1996 / 17:21:59 / cg" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2576 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2577 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2578 |
setContext:aContext releaseInspectors:releaseInspectors |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2579 |
"show calling chain from aContext in the walk-back listview" |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2580 |
|
949 | 2581 |
|con text method caller caller2 m count showIt c suspendContext nm| |
266 | 2582 |
|
2583 |
(contextArray notNil and:[aContext == (contextArray at:1)]) ifTrue:[ |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2584 |
"no change" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2585 |
^ false |
266 | 2586 |
]. |
2587 |
||
939 | 2588 |
firstContext := aContext. |
2589 |
||
266 | 2590 |
m := contextView middleButtonMenu. |
2591 |
m notNil ifTrue:[ |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2592 |
m disable:#showMore. |
266 | 2593 |
]. |
2594 |
||
2595 |
aContext isNil ifTrue:[ |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2596 |
text := Array with:'** no context **'. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2597 |
contextArray := nil. |
266 | 2598 |
] ifFalse:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2599 |
text := OrderedCollection new:nChainShown. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2600 |
contextArray := OrderedCollection new:nChainShown. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2601 |
con := aContext. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2602 |
|
939 | 2603 |
verboseBacktrace ~~ true ifTrue:[ |
2604 |
"/ with dense backtrace, hide the ProcessorScheduler |
|
944 | 2605 |
"/ contexts at the top; look for a Process>>suspend* |
939 | 2606 |
"/ context within the first 10 contexts |
2607 |
||
2608 |
suspendContext := nil. |
|
2609 |
c := con. |
|
2610 |
1 to:10 do:[:i | |
|
944 | 2611 |
|sel| |
2612 |
||
940 | 2613 |
c notNil ifTrue:[ |
944 | 2614 |
(sel := c selector) notNil ifTrue:[ |
2615 |
((sel startsWith:'suspend') |
|
940 | 2616 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
2617 |
suspendContext := c |
|
2618 |
]. |
|
2619 |
]. |
|
2620 |
c := c sender. |
|
2621 |
] |
|
939 | 2622 |
]. |
2623 |
suspendContext notNil ifTrue:[ |
|
949 | 2624 |
con := suspendContext. suspendContext := nil |
939 | 2625 |
]. |
2626 |
]. |
|
2627 |
||
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2628 |
" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2629 |
get them all |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2630 |
" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2631 |
count := 0. |
949 | 2632 |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2633 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
949 | 2634 |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2635 |
(self showingContext:con) ifTrue:[ |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2636 |
contextArray add:con. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2637 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2638 |
(MoreDebuggingDetail == true) ifTrue:[ |
949 | 2639 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2640 |
] ifFalse:[ |
949 | 2641 |
nm := con printString. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2642 |
]. |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2643 |
text add:nm. |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2644 |
count := count + 1. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2645 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2646 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2647 |
method := con method. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2648 |
(method notNil and:[method isWrapped]) ifTrue:[ |
949 | 2649 |
"/ |
2650 |
"/ kludge: if its a wrapped method, then hide the wrap-call |
|
2651 |
"/ |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2652 |
caller := con sender. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2653 |
(caller notNil and:[caller receiver == method originalMethod]) ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2654 |
caller2 := caller sender. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2655 |
(caller2 notNil and:[caller2 method == method]) ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2656 |
con := caller2 |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2657 |
] |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2658 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2659 |
caller := caller2 := nil |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2660 |
]. |
949 | 2661 |
|
2662 |
"/ with dense backtrace, skip the doIt methods context |
|
2663 |
"/ (its dummy anyway) and fake that contexts name |
|
2664 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2665 |
verboseBacktrace ~~ true ifTrue:[ |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2666 |
(con isBlockContext |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2667 |
and:[con home == con sender |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2668 |
and:[((con home selector == #doIt) |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2669 |
or:[con home selector == #doIt:]) |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2670 |
and:[con home method who isNil]]]) ifTrue:[ |
949 | 2671 |
con := con sender. |
2672 |
text removeLast. |
|
2673 |
text add:(con methodHome printString) |
|
2674 |
] |
|
2675 |
]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2676 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2677 |
"/ and also, all lazy loading intermediates |
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2678 |
|
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2679 |
verboseBacktrace ~~ true ifTrue:[ |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2680 |
(con selector == #noByteCode |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2681 |
and:[con receiver isMethod]) ifTrue:[ |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2682 |
contextArray removeLast. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2683 |
text removeLast. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2684 |
con := con sender. |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2685 |
count := count - 1. |
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2686 |
] |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2687 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2688 |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2689 |
con := con sender |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2690 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2691 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2692 |
" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2693 |
did we reach the end ? |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2694 |
" |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2695 |
(con isNil or:[con sender isNil]) ifTrue:[ |
949 | 2696 |
|
2697 |
"/ the very last one is the startup context |
|
2698 |
"/ (in main) - it has nil as receiver and nil as selector |
|
2699 |
||
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2700 |
contextArray last selector isNil ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2701 |
contextArray removeLast. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2702 |
text removeLast |
949 | 2703 |
]. |
2704 |
||
2705 |
verboseBacktrace ~~ true ifTrue:[ |
|
2706 |
"/ in dense mode, remove the process startup |
|
2707 |
"/ contexts (if any) |
|
2708 |
||
2709 |
(con := contextArray last) methodClass == Process ifTrue:[ |
|
2710 |
con selector == #start ifTrue:[ |
|
2711 |
contextArray removeLast. |
|
2712 |
text removeLast. |
|
2713 |
||
2714 |
[contextArray size > 0 |
|
2715 |
and:[contextArray last methodHome == con]] whileTrue:[ |
|
2716 |
contextArray removeLast. |
|
2717 |
text removeLast. |
|
2718 |
] |
|
2719 |
] |
|
2720 |
] |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2721 |
] |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2722 |
] ifFalse:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2723 |
m notNil ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2724 |
m enable:#showMore. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2725 |
text add:(resources string:'*** more walkback follows - click here to see them ***') |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2726 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2727 |
]. |
266 | 2728 |
]. |
2729 |
||
2730 |
contextView setList:text. |
|
944 | 2731 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2732 |
releaseInspectors ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2733 |
receiverInspector release. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2734 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2735 |
]. |
266 | 2736 |
|
2737 |
m notNil ifTrue:[ |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2738 |
m disable:#removeBreakpoint. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2739 |
m disable:#implementors. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2740 |
m disable:#senders. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2741 |
m disable:#browseClass. |
266 | 2742 |
]. |
2743 |
^ true |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2744 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2745 |
"Created: 14.12.1995 / 19:10:31 / cg" |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2746 |
"Modified: 20.3.1997 / 16:52:54 / cg" |
266 | 2747 |
! |
2748 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2749 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2750 |
"show calling chain from aContext in the walk-back listview. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2751 |
Ignore any non-interresting interrupt-context." |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2752 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2753 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2754 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2755 |
con := aContext. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2756 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2757 |
con := con sender. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2758 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2759 |
con := con sender. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2760 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2761 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2762 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2763 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2764 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2765 |
"Modified: 27.6.1996 / 17:21:59 / cg" |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2766 |
"Created: 20.10.1996 / 18:10:21 / cg" |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2767 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2768 |
|
266 | 2769 |
showError:message |
2770 |
codeView contents:(resources string:message). |
|
2771 |
shown ifTrue:[ |
|
2772 |
exclusive ifTrue:[ |
|
2773 |
"/ consider this a kludge: |
|
2774 |
"/ if exclusive, cannot use flash, since it suspends |
|
2775 |
"/ (but we cannot suspend here ...) |
|
2776 |
codeView redrawInverted. device flush. |
|
2777 |
OperatingSystem millisecondDelay:200. |
|
2778 |
codeView redraw |
|
2779 |
] ifFalse:[ |
|
2780 |
codeView flash |
|
2781 |
] |
|
2782 |
] |
|
2783 |
||
2784 |
"Modified: 24.11.1995 / 22:07:30 / cg" |
|
2785 |
! |
|
2786 |
||
2787 |
showTerminated |
|
2788 |
self showError:'** the process has terminated **' |
|
2789 |
! |
|
2790 |
||
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2791 |
showingContext:aContext |
939 | 2792 |
"return false, if this context is to be skipped. |
2793 |
Here, we hide some wellKnown methods, which are usually |
|
2794 |
not too interresting; the set of methods which are suppressed |
|
2795 |
is my (claus's) own choice." |
|
2796 |
||
2797 |
|sel rec mClass| |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2798 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2799 |
verboseBacktrace ifTrue:[^ true]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2800 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2801 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2802 |
sel := aContext selector. |
939 | 2803 |
mClass := aContext methodClass. |
2804 |
||
2805 |
sel == #withCursor:do: ifTrue:[ |
|
2806 |
(mClass == WindowGroup) ifTrue:[^ false]. |
|
2807 |
(mClass == TopView) ifTrue:[^ false]. |
|
2808 |
]. |
|
2809 |
(sel == #withExecuteCursorDo: |
|
2810 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
2811 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
|
2812 |
]. |
|
2813 |
||
2814 |
(mClass == Object) ifTrue:[ |
|
2815 |
(sel startsWith:'perform:') ifTrue:[^ false] |
|
2816 |
]. |
|
2817 |
||
2818 |
(mClass == Method) ifTrue:[ |
|
2819 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
|
2820 |
]. |
|
2821 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2822 |
(mClass == SmallInteger) ifTrue:[ |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2823 |
(sel == #to:do:) ifTrue:[^ false]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2824 |
(sel == #to:by:do:) ifTrue:[^ false]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2825 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2826 |
|
939 | 2827 |
(mClass == Block) ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2828 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2829 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2830 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2831 |
sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2832 |
sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2833 |
sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2834 |
sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2835 |
sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2836 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2837 |
sel == #value:value:value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2838 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2839 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2840 |
"/ aContext isBlockContext ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2841 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2842 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2843 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2844 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2845 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2846 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2847 |
"/ sel == #value:value:value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2848 |
"/ ]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2849 |
|
939 | 2850 |
((mClass == Signal) |
2851 |
or:[(mClass == QuerySignal) |
|
2852 |
or:[mClass == SignalSet]] |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2853 |
) ifTrue:[ |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2854 |
sel == #handle:do: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2855 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2856 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2857 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2858 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2859 |
"Created: 10.1.1997 / 21:01:39 / cg" |
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
2860 |
"Modified: 14.1.1997 / 13:25:13 / cg" |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2861 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2862 |
|
266 | 2863 |
stepping |
2864 |
^ stepping |
|
2865 |
! |
|
2866 |
||
2867 |
unstep |
|
2868 |
stepping := false. |
|
2869 |
bigStep := false. |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2870 |
steppedContext := wrapperContext := nil. |
266 | 2871 |
exitAction := nil |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2872 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2873 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
266 | 2874 |
! |
2875 |
||
2876 |
updateContext |
|
2877 |
|oldContext idx| |
|
2878 |
||
2879 |
inspectedProcess state == #dead ifTrue:[ |
|
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2880 |
self showTerminated. |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2881 |
^ self |
266 | 2882 |
]. |
2883 |
||
2884 |
oldContext := selectedContext. |
|
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2885 |
[ |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2886 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2887 |
oldContext notNil ifTrue:[ |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2888 |
contextArray notNil ifTrue:[ |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2889 |
idx := contextArray identityIndexOf:oldContext. |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2890 |
idx ~~ 0 ifTrue:[ |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2891 |
self showSelection:idx |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2892 |
] ifFalse:[ |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2893 |
codeView contents:('** context returned **') |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2894 |
] |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2895 |
] |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2896 |
] |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2897 |
]. |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2898 |
] valueUninterruptably. |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
2899 |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2900 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
266 | 2901 |
! ! |
2902 |
||
2903 |
!DebugView methodsFor:'private control loop'! |
|
2904 |
||
2905 |
controlLoop |
|
2906 |
"this is a kludge: |
|
664 | 2907 |
start a dispatchloop which exits when |
2908 |
either continue, return or step is pressed |
|
266 | 2909 |
" |
2910 |
||
2911 |
haveControl := true. |
|
664 | 2912 |
[ |
2913 |
[haveControl] whileTrue:[ |
|
2914 |
self controlLoopCatchingErrors |
|
2915 |
]. |
|
2916 |
] valueNowOrOnUnwindDo:[ |
|
2917 |
catchBlock := nil. |
|
2918 |
haveControl := false |
|
266 | 2919 |
]. |
664 | 2920 |
|
2921 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 2922 |
! |
2923 |
||
2924 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
2925 |
"this is the debuggers own private event handling loop; |
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
2926 |
errors are cought, to prevent recursive debugger-invocations." |
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
2927 |
|
266 | 2928 |
"setup a self removing catch-block" |
2929 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
2930 |
||
2931 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
448 | 2932 |
"if we do not have multiple processes or its a system process |
2933 |
we start another dispatch loop, which exits when |
|
2934 |
either continue, return or step is pressed |
|
2935 |
or (via the catchBlock) if an error occurs. |
|
2936 |
Since our display is an extra exclusive one, |
|
2937 |
all processing for normal views stops here ... |
|
2938 |
" |
|
266 | 2939 |
|
448 | 2940 |
WindowGroup setActiveGroup:windowGroup. |
2941 |
SignalSet anySignal handle:[:ex | |
|
2942 |
|signal| |
|
334 | 2943 |
|
448 | 2944 |
signal := ex signal. |
1016 | 2945 |
|
448 | 2946 |
self showError:'*** Error in modal debugger: |
266 | 2947 |
|
334 | 2948 |
>>>> Signal: ' , signal printString , ' |
266 | 2949 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 2950 |
>>>> From: ' , ex suspendedContext sender printString , ' |
2951 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
2952 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
2953 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
266 | 2954 |
>>>> Message: ' , ex errorString , ' |
2955 |
||
2956 |
cought & ignored.'. |
|
448 | 2957 |
ex return. |
2958 |
] do:[ |
|
2959 |
Object userNotificationSignal handle:[:ex | |
|
2960 |
(ex signal == ActivityNotificationSignal) ifTrue:[ |
|
2961 |
ex proceed |
|
2962 |
]. |
|
2963 |
self showError:ex errorString |
|
2964 |
] do:[ |
|
530 | 2965 |
device dispatchModalWhile:[Processor activeProcess state:#debug. |
2966 |
haveControl]. |
|
448 | 2967 |
] |
2968 |
]. |
|
2969 |
WindowGroup setActiveGroup:nil. |
|
266 | 2970 |
] ifFalse:[ |
448 | 2971 |
"we do have multiple processes - |
2972 |
simply enter the DebugViews-Windowgroup event loop. |
|
2973 |
effectively suspending event processing for the currently |
|
2974 |
active group. |
|
2975 |
" |
|
2976 |
SignalSet anySignal handle:[:ex | |
|
2977 |
|answer signal| |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
2978 |
|
448 | 2979 |
signal := ex signal. |
266 | 2980 |
|
801
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2981 |
DebuggingDebugger ~~ true ifTrue:[ |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2982 |
"/ |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2983 |
"/ ignore recursive breakpoints |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2984 |
"/ |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2985 |
signal == MessageTracer breakpointSignal ifTrue:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2986 |
'DebugView [info]: breakpoint in debugger ignored' infoPrintCR. |
801
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2987 |
ex proceed |
448 | 2988 |
]. |
801
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2989 |
(signal == ActivityNotificationSignal) ifTrue:[ |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2990 |
ex proceed |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2991 |
]. |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2992 |
signal == Exception recursiveExceptionSignal ifTrue:[ |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2993 |
ex parameter signal == MessageTracer breakpointSignal ifTrue:[ |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
2994 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
801
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2995 |
ex proceed. |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2996 |
]. |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2997 |
|
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
2998 |
self showError:'*** Recursive error in debugger: |
266 | 2999 |
|
3000 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 3001 |
>>>> ' , ex parameter signal printString , ' |
266 | 3002 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 3003 |
>>>> From: ' , ex suspendedContext sender printString , ' |
3004 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
3005 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
3006 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
266 | 3007 |
>>>> Message: ' , ex errorString , ' |
3008 |
||
3009 |
cought & ignored.'. |
|
801
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
3010 |
ex return |
9aac5620fff5
allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents:
799
diff
changeset
|
3011 |
]. |
448 | 3012 |
]. |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
3013 |
|
448 | 3014 |
self topView raiseDeiconified. |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
3015 |
|
448 | 3016 |
answer := Dialog |
3017 |
choose:('error in debugger: ' , ex errorString , '\\debug again ?') withCRs |
|
949 | 3018 |
labels:#( 'proceed' 'cancel' 'debug' ) |
3019 |
values:#( #proceed #cancel #debug ) |
|
448 | 3020 |
default:#cancel. |
3021 |
answer == #debug ifTrue:[ |
|
3022 |
Debugger enterUnconditional:(ex suspendedContext) withMessage:'error in debugger: ' , ex errorString. |
|
3023 |
ex proceed. |
|
3024 |
]. |
|
3025 |
answer == #proceed ifTrue:[ |
|
3026 |
ex proceed. |
|
3027 |
]. |
|
3028 |
ex return. |
|
3029 |
] do:[ |
|
530 | 3030 |
windowGroup eventLoopWhile:[Processor activeProcess state:#debug. |
3031 |
true] onLeave:[] |
|
448 | 3032 |
]. |
266 | 3033 |
]. |
3034 |
catchBlock := nil. |
|
3035 |
||
3036 |
"Created: 24.11.1995 / 20:33:45 / cg" |
|
1016 | 3037 |
"Modified: 29.1.1997 / 20:39:11 / cg" |
266 | 3038 |
! ! |
3039 |
||
0 | 3040 |
!DebugView methodsFor:'user interaction'! |
3041 |
||
266 | 3042 |
codeAccept:someCode |
3043 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
3044 |
and including selected method cannot be continued." |
|
3045 |
||
3046 |
" |
|
3047 |
actually, this is not true, since the active methods will still be |
|
3048 |
executed correctly - however, the code shown in the debugger is no |
|
3049 |
longer in sync (showing the new code) with the executed code. |
|
3050 |
Therefore, we hide those contexts to avoid confusion .... |
|
3051 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
3052 |
||
3053 |
"walk up context chain and find highest context which is either the selected context, |
|
3054 |
or - if its a block-context - whose home is the selected context" |
|
3055 |
||
3056 |
|con top sel implementorClass method newMethod| |
|
3057 |
||
3058 |
codeView cursor:Cursor execute. |
|
3059 |
||
3060 |
" |
|
3061 |
find the method-home context for this one |
|
3062 |
" |
|
3063 |
con := selectedContext. |
|
3064 |
top := con. |
|
3065 |
[con notNil] whileTrue:[ |
|
1019
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3066 |
(con methodHome == selectedContext) ifTrue:[ |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3067 |
top := con |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3068 |
]. |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3069 |
con := con sender |
266 | 3070 |
]. |
3071 |
" |
|
3072 |
use class&selector to find the method for the compilation |
|
3073 |
and compile. |
|
3074 |
" |
|
3075 |
sel := selectedContext selector. |
|
3076 |
implementorClass := selectedContext methodClass. |
|
3077 |
method := implementorClass compiledMethodAt:sel. |
|
1019
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3078 |
|
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3079 |
"/ |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3080 |
"/ provide the classes nameSpace on a query; |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3081 |
"/ in case we accept while in another nameSpace context, |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3082 |
"/ (but for a class which is somewhere else) |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3083 |
"/ |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3084 |
Class nameSpaceQuerySignal |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3085 |
answer:(implementorClass nameSpace) |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3086 |
do:[ |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3087 |
newMethod := implementorClass compilerClass |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3088 |
compile:someCode |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3089 |
forClass:implementorClass |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3090 |
inCategory:(method category) |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3091 |
notifying:codeView. |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3092 |
]. |
266 | 3093 |
|
3094 |
inspecting ifFalse:[ |
|
1019
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3095 |
" |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3096 |
if it worked, remove everything up to and including top |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3097 |
from context chain |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3098 |
" |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3099 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3100 |
self setContext:(top sender). |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3101 |
|
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3102 |
" |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3103 |
continue/step is no longer possible |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3104 |
" |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3105 |
canContinue := false. |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3106 |
self showSelection:1. |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3107 |
exitAction := #return |
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3108 |
]. |
266 | 3109 |
]. |
3110 |
codeView cursor:Cursor normal |
|
1019
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3111 |
|
c997b2d576c5
when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
3112 |
"Modified: 31.1.1997 / 15:02:33 / cg" |
266 | 3113 |
! |
3114 |
||
3115 |
destroy |
|
3116 |
"closing the debugger implies an abort or continue" |
|
3117 |
||
3118 |
contextView middleButtonMenu hide. |
|
3119 |
||
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3120 |
inspecting ifFalse:[ |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3121 |
CachedExclusive == self ifTrue:[ |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3122 |
CachedExclusive := nil. |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3123 |
]. |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3124 |
CachedDebugger == self ifTrue:[ |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3125 |
CachedDebugger := nil |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3126 |
]. |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3127 |
|
669
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3128 |
"/ |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3129 |
"/ catch invalid return; |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3130 |
"/ this happens, when my process has somehow died (quickterminate) |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3131 |
"/ and I am a leftOver view, which gets terminated via the launchers |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3132 |
"/ #destroy-window function. |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3133 |
"/ |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3134 |
Context invalidReturnSignal handle:[:ex | |
934 | 3135 |
'DebugView [info]: OOPS - non regular debugView closing' infoPrintCR. |
669
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3136 |
DebugView newDebugger. |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3137 |
ex return. |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3138 |
] do:[ |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3139 |
inspecting ifFalse:[ |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3140 |
canAbort ifTrue:[ |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3141 |
self doAbort. |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3142 |
] ifFalse:[ |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3143 |
self doContinue |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3144 |
] |
4ac860cdf673
care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
3145 |
]. |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3146 |
]. |
934 | 3147 |
'DebugView [info]: OOPS - non regular debugView closing' infoPrintCR. |
430
45d1b89689a0
when destroyed (via Launchers menu) dont halt - output a debugMessage
Claus Gittinger <cg@exept.de>
parents:
425
diff
changeset
|
3148 |
DebugView newDebugger. |
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3149 |
]. |
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3150 |
|
266 | 3151 |
" |
3152 |
we manually release all private data, since the Debugger |
|
3153 |
is cached for reuse - thus the memory would not be collectable |
|
3154 |
otherwise. |
|
3155 |
" |
|
3156 |
codeView acceptAction:nil. |
|
3157 |
codeView doItAction:nil. |
|
3158 |
codeView contents:nil. |
|
3159 |
catchBlock := nil. |
|
3160 |
||
3161 |
receiverInspector release. |
|
3162 |
contextInspector release. |
|
3163 |
inspectedProcess := nil. |
|
3164 |
exitAction := nil. |
|
3165 |
contextArray := nil. |
|
940 | 3166 |
selectedContext := actualContext := firstContext := nil. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3167 |
steppedContext := wrapperContext := nil. |
266 | 3168 |
grabber := nil. |
3169 |
self autoUpdateOff. |
|
3170 |
||
407
cf196c7cd2e6
oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents:
384
diff
changeset
|
3171 |
super destroy "/ 1.12.94 |
266 | 3172 |
|
940 | 3173 |
"Modified: 11.1.1997 / 13:55:09 / cg" |
266 | 3174 |
! |
3175 |
||
0 | 3176 |
showSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
3177 |
"user clicked on a header line - show selected code in textView. |
303
1d94813f1977
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
301
diff
changeset
|
3178 |
Also sent to autoselect an interesting context on entry." |
0 | 3179 |
|
56 | 3180 |
|con homeContext sel method code canAccept |
105 | 3181 |
implementorClass lineNrInMethod rec m line |
193
8d0b4658249c
added browse-menu function; disable inappropriate menu items; fixed walkback-copy
Claus Gittinger <cg@exept.de>
parents:
189
diff
changeset
|
3182 |
sender selSender tryVars possibleBlocks errMsg |
945 | 3183 |
mthd cls codeSet| |
0 | 3184 |
|
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3185 |
MessageTracer breakpointSignal handle:[:ex | |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3186 |
'DebugView [info]: breakpoint in debugger ignored' infoPrintCR. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3187 |
ex proceed |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3188 |
] do:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3189 |
contextArray notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3190 |
lineNr <= contextArray size ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3191 |
con := contextArray at:lineNr. |
939 | 3192 |
]. |
563 | 3193 |
" |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3194 |
clicking on the '** ...'-line shows more ... |
563 | 3195 |
" |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3196 |
con isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3197 |
line := contextView list at:lineNr. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3198 |
(line startsWith:'**') ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3199 |
self showMore. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3200 |
contextView setSelection:lineNr. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3201 |
con := contextArray at:lineNr |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3202 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3203 |
con isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3204 |
codeView contents:nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3205 |
^ self |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
3206 |
]. |
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
3207 |
]. |
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
3208 |
|
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3209 |
self withWaitCursorDo:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3210 |
codeSet := false. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3211 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3212 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3213 |
give it to the (lower right) inspector |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3214 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3215 |
contextInspector inspect:con. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3216 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3217 |
con hasStackToShow ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3218 |
stackInspector isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3219 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3220 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3221 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3222 |
stackInspector := InspectorView |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3223 |
origin:(0.6 @ 0.0) corner:(1.0 @ 1.0) |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3224 |
in:contextInspector superView. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3225 |
stackInspector realize. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3226 |
stackInspector label:'stack'. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3227 |
stackInspector hideReceiver:true. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3228 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3229 |
stackInspector inspect:(con stackFrame asArray). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3230 |
stackInspector showLast. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3231 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3232 |
stackInspector notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3233 |
stackInspector destroy. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3234 |
stackInspector := nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3235 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3236 |
contextInspector origin:(0.5 @ 0.0) corner:(1.0 @ 1.0). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3237 |
] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3238 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3239 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3240 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3241 |
get the home context |
563 | 3242 |
" |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3243 |
con isBlockContext ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3244 |
homeContext := con methodHome |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3245 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3246 |
homeContext := con |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3247 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3248 |
con canReturn ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3249 |
returnButton enable. restartButton enable. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3250 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3251 |
returnButton disable. restartButton disable. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3252 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3253 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3254 |
lineNrInMethod := con lineNumber. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3255 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3256 |
canAccept := false. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3257 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3258 |
homeContext isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3259 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3260 |
mhmh - an optimized block |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3261 |
should get the block here, and get the method from |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3262 |
that one ... |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3263 |
But in 2.10.x, there is no easy way to get to the block |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3264 |
since that one is not in the context. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3265 |
Starting with 2.11, the new block calling scheme will fix this. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3266 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3267 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3268 |
"temporary kludge - peek into the sender context. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3269 |
If its a do-like method and there is a single block variable |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3270 |
in the args or temporaries, that must be the one. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3271 |
This helps in some cases. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3272 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3273 |
(sender := con sender) notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3274 |
tryVars := false. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3275 |
(selSender := sender selector) notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3276 |
(selSender endsWith:'do:') ifTrue:[ |
563 | 3277 |
tryVars := true. |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3278 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3279 |
(selSender endsWith:'Do:') ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3280 |
tryVars := true. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3281 |
] |
563 | 3282 |
] |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3283 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3284 |
tryVars ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3285 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3286 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3287 |
possibleBlocks size == 1 ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3288 |
method := possibleBlocks first method. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3289 |
]. |
563 | 3290 |
] |
3291 |
]. |
|
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3292 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3293 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3294 |
"fetch rec here - so we wont need context in doItAction" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3295 |
rec := homeContext receiver. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3296 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3297 |
sel := homeContext selector. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3298 |
sel notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3299 |
canAccept := true. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3300 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3301 |
implementorClass := homeContext methodClass. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3302 |
implementorClass isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3303 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3304 |
special: look if this context was created by |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3305 |
valueWithReceiver kind of method invocation; |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3306 |
if so, grab the method from the sender and show it |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3307 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3308 |
((sender := homeContext sender) notNil |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3309 |
and:[(sender selector startsWith:'valueWithReceiver:') |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3310 |
and:[sender receiver isMethod]]) ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3311 |
method := sender receiver. |
655
c9a1de4e627a
secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents:
654
diff
changeset
|
3312 |
self sensor shiftDown ifTrue:[ |
c9a1de4e627a
secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents:
654
diff
changeset
|
3313 |
code := method decompiledSource |
c9a1de4e627a
secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents:
654
diff
changeset
|
3314 |
] ifFalse:[ |
c9a1de4e627a
secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents:
654
diff
changeset
|
3315 |
code := method source. |
c9a1de4e627a
secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents:
654
diff
changeset
|
3316 |
]. |
563 | 3317 |
canAccept := false. |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3318 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3319 |
(method := con method) notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3320 |
self sensor shiftDown ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3321 |
code := method decompiledSource |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3322 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3323 |
code := method source. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3324 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3325 |
canAccept := false. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3326 |
] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3327 |
] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3328 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3329 |
method := implementorClass compiledMethodAt:sel. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3330 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3331 |
] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3332 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3333 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3334 |
code isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3335 |
errMsg := nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3336 |
method notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3337 |
self sensor shiftDown ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3338 |
code := method decompiledSource |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3339 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3340 |
code := method source. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3341 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3342 |
code isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3343 |
method sourceFilename notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3344 |
codeView contents:(resources |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3345 |
string:'** no sourcefile: %1 **' |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3346 |
with:method sourceFilename). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3347 |
codeView flash. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3348 |
codeSet := true. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3349 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3350 |
errMsg := '** no source **' |
563 | 3351 |
] |
3352 |
] |
|
3353 |
] ifFalse:[ |
|
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3354 |
homeContext isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3355 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
563 | 3356 |
] ifFalse:[ |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3357 |
errMsg := '** no method - no source **' |
563 | 3358 |
] |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3359 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3360 |
errMsg notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3361 |
self showError:errMsg. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3362 |
codeSet := true. |
563 | 3363 |
] |
3364 |
]. |
|
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3365 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3366 |
code isNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3367 |
canAccept := false. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3368 |
codeSet ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3369 |
codeView contents:nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3370 |
] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3371 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3372 |
codeView contents:code. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3373 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3374 |
(lineNrInMethod notNil and:[lineNrInMethod ~~ 0]) ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3375 |
"/ lineNrInMethod > codeView list size ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3376 |
"/ lineNrInMethod := codeView list size + 1 |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3377 |
"/ ]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3378 |
"/ codeView selectLine:lineNrInMethod. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3379 |
"/ codeView makeSelectionVisible |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3380 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3381 |
lineNrInMethod <= codeView list size ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3382 |
(lineNrInMethod == 255 |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3383 |
and:[method notNil |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3384 |
and:[method code isNil]]) ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3385 |
"/ means: do not really know in interpreted methods |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3386 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3387 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3388 |
codeView selectLine:lineNrInMethod. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3389 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3390 |
codeView makeSelectionVisible |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3391 |
] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3392 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3393 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3394 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3395 |
canAccept ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3396 |
codeView acceptEnabled:true. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3397 |
codeView acceptAction:[:code | self codeAccept:code asString] |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3398 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3399 |
codeView acceptEnabled:false. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3400 |
codeView acceptAction:[:code | self device beep]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3401 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3402 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3403 |
receiverInspector inspect:rec. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3404 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3405 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3406 |
the one below is wrong: currently, the |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3407 |
evaluator cannot handle passed contexts. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3408 |
Once it does, pass con as in:-arg |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3409 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3410 |
codeView doItAction:[:theCode | |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3411 |
rec class evaluatorClass |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3412 |
evaluate:theCode |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3413 |
in:nil "/ *** con |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3414 |
receiver:rec |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3415 |
notifying:codeView |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3416 |
logged:true |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3417 |
ifFail:nil |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3418 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3419 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3420 |
selectedContext := homeContext. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3421 |
actualContext := con |
563 | 3422 |
]. |
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3423 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3424 |
codeView contents:nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3425 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3426 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3427 |
con isContext ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3428 |
sendButton disable. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3429 |
] ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3430 |
sendButton enable. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3431 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3432 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3433 |
"clear out locals to prevent keeping around unneeded contexts |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3434 |
(due to the block held in codeView). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3435 |
(not really needed, since stuff gets collected away sooner or later ... |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3436 |
... but this makes it a bit sooner) |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3437 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3438 |
con := nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3439 |
homeContext := nil. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3440 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3441 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3442 |
enable/disable some menu items |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3443 |
" |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3444 |
m := contextView middleButtonMenu. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3445 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3446 |
m enableAll:#(implementors senders inspectContext skip skipForReturn). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3447 |
|
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3448 |
(method notNil and:[method isWrapped]) ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3449 |
m enable:#removeBreakpoint. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3450 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3451 |
m disable:#removeBreakpoint. |
563 | 3452 |
]. |
45 | 3453 |
|
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3454 |
mthd := selectedContext method. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3455 |
mthd notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3456 |
cls := mthd containingClass. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3457 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3458 |
m enable:#browseClass. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3459 |
cls notNil ifTrue:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3460 |
m enableAll:#(browse browseClass browseClassHierarchy browseFullClassProtocol). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3461 |
] ifFalse:[ |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3462 |
m disableAll:#(browse browseClass browseClassHierarchy browseFullClassProtocol). |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3463 |
]. |
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3464 |
] |
0 | 3465 |
]. |
3466 |
||
1076
8c4e8ee0b863
ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
3467 |
"Modified: 17.3.1997 / 15:01:43 / cg" |
73 | 3468 |
! ! |
3469 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
3470 |
!DebugView class methodsFor:'documentation'! |
78 | 3471 |
|
266 | 3472 |
version |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
3473 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.153 1997-03-20 21:04:26 cg Exp $' |
0 | 3474 |
! ! |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
3475 |
DebugView initialize! |