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