author | Claus Gittinger <cg@exept.de> |
Wed, 22 Feb 2006 15:02:11 +0100 | |
changeset 6600 | 985a13c5e7b1 |
parent 6579 | d20144004dd5 |
child 6601 | b347199a06cb |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
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 |
||
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
13 |
"{ Package: 'stx:libtool' }" |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
14 |
|
0 | 15 |
StandardSystemView subclass:#DebugView |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
16 |
instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView |
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
17 |
receiverInspector contextInspector contextArray selectedContext |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
18 |
catchBlock grabber mayProceed traceView tracing bigStep |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
19 |
skipLineNr steppedContextAddress abortButton terminateButton |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
20 |
continueButton stepButton nextButton nextOverButton nextOutButton |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
21 |
sendButton returnButton restartButton exclusive inspecting |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
22 |
nChainShown inspectedProcess updateProcess stopButton |
3187 | 23 |
updateButton defineButton monitorToggle stepping |
24 |
steppedContextLineno stepForReturn actualContext inWrap |
|
25 |
stackInspector steppedContext wrapperContext verboseBacktrace |
|
26 |
firstContext stepHow cachable currentMethod ignoreBreakpoints |
|
27 |
stepUntilEntering lastStepUntilEntering |
|
3269 | 28 |
lastSelectionInReceiverInspector lastSelectionInContextInspector |
4356 | 29 |
canShowMore exitAbort reportButton' |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
30 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
31 |
DebuggingDebugger VerboseBacktraceDefault DefaultIcon |
3387 | 32 |
DefaultDebuggerBackgroundColor InitialNCHAINShown' |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
33 |
poolDictionaries:'' |
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
34 |
category:'Interface-Debugger' |
0 | 35 |
! |
36 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
37 |
!DebugView class methodsFor:'documentation'! |
29 | 38 |
|
39 |
copyright |
|
40 |
" |
|
41 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
42 |
All Rights Reserved |
29 | 43 |
|
44 |
This software is furnished under a license and may be used |
|
45 |
only in accordance with the terms of that license and with the |
|
46 |
inclusion of the above copyright notice. This software may not |
|
47 |
be provided or otherwise made available to, or used by, any |
|
48 |
other person. No title to or ownership of the software is |
|
49 |
hereby transferred. |
|
50 |
" |
|
51 |
! |
|
0 | 52 |
|
29 | 53 |
documentation |
54 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
55 |
This class implements a graphical debugger interface. |
29 | 56 |
The debugger usually sits on top of the faulting process, |
2358 | 57 |
taking over its event processing. |
58 |
(this is different from other Smalltalk debuggers, which control |
|
59 |
the debuggee as a separate process. Consider this an historic |
|
60 |
leftover - the debugger was one of the first applications written for |
|
61 |
ST/X; however, why should we change it without a particular need ...). |
|
62 |
||
63 |
Only the 'stopped' debugged process is affected; |
|
29 | 64 |
other processes continue to respond to events. |
65 |
||
66 |
The one exception is when an error occurs within the dispatcher process |
|
67 |
or in one of the eventhandler processes - in this case, the debugger |
|
68 |
will sit on an exclusive display connection. |
|
69 |
||
70 |
The whole debugging will be changed, once the required process primitives |
|
71 |
are available, which allow control of another processes execution |
|
72 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
73 |
to have the debugger control the debuggee (i.e. two processes) |
|
35 | 74 |
|
75 |
See additional information in 'doc/misc/debugger.doc'. |
|
53 | 76 |
|
77 |
Notice: the DebugView class caches the last used debugger in a class |
|
78 |
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
|
79 |
a halfway destroyed one) is kept there. You will notice this, if a |
53 | 80 |
debugger comes up without showing any contents. In this case, close |
81 |
(or destroy) the broken debugView, and execute |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
82 |
Debugger newDebugger |
53 | 83 |
which removes the cached debugger and forces creation of a new one the |
84 |
next time. This is a temporary workaround - the debugger will be fixed to |
|
85 |
avoid this problem. |
|
508 | 86 |
|
87 |
[author:] |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
88 |
Claus Gittinger |
508 | 89 |
|
90 |
[see also:] |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
91 |
Exception Signal |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
92 |
Process |
29 | 93 |
" |
94 |
! ! |
|
0 | 95 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
96 |
!DebugView class methodsFor:'initialization'! |
243 | 97 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
98 |
initialize |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
99 |
InitialNCHAINShown := 20. |
3387 | 100 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
101 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
102 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
103 |
"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
|
104 |
"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
|
105 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
106 |
|
243 | 107 |
reinitialize |
108 |
self newDebugger |
|
109 |
! ! |
|
110 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
111 |
!DebugView class methodsFor:'instance creation'! |
0 | 112 |
|
2421 | 113 |
enter |
114 |
"enter a debugger" |
|
115 |
||
5455 | 116 |
<context: #return> |
117 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
118 |
self enter:thisContext sender withMessage:'debugger entered' mayProceed:true. |
2421 | 119 |
! |
120 |
||
2355 | 121 |
enter:aContext withMessage:aString |
122 |
"enter a debugger" |
|
123 |
||
5455 | 124 |
<context: #return> |
125 |
||
2355 | 126 |
^ self |
127 |
enter:aContext |
|
128 |
withMessage:aString |
|
129 |
mayProceed:true |
|
130 |
! |
|
131 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
132 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 133 |
"enter a debugger; if this is a recursive invocation, enter |
134 |
a MiniDebugger instead. |
|
135 |
This is the standard way of entering the debugger; |
|
136 |
sent from error- and halt messages." |
|
0 | 137 |
|
3447 | 138 |
<context: #return> |
139 |
||
3702 | 140 |
|active| |
93 | 141 |
|
57 | 142 |
StepInterruptPending := nil. |
3998 | 143 |
ControlInterrupt handle:[:ex | |
4676
c809ebc38db9
more info on an ignored breakpoint
Claus Gittinger <cg@exept.de>
parents:
4644
diff
changeset
|
144 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
c809ebc38db9
more info on an ignored breakpoint
Claus Gittinger <cg@exept.de>
parents:
4644
diff
changeset
|
145 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
3998 | 146 |
ex proceed |
147 |
] do:[ |
|
148 |
" |
|
149 |
well, it could be a stepping or sending debugger up there; |
|
150 |
in this case, return to it. This happens, when a stepping process |
|
151 |
runs into an error (for example, a halt). In this case, we want the |
|
152 |
stepping debugger to come up again instead of a new one. |
|
153 |
" |
|
154 |
OpenDebuggers notNil ifTrue:[ |
|
155 |
active := Processor activeProcess. |
|
156 |
OpenDebuggers do:[:aDebugger | |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
157 |
(aDebugger inspectedProcess == active) ifTrue:[ |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
158 |
aDebugger device isOpen ifTrue:[ |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
159 |
"/ 'entering stepping debugger again' printNL. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
160 |
aDebugger unstep. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
161 |
aDebugger setLabelFor:aString in:active. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
162 |
aDebugger mayProceed:mayProceed. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
163 |
^ aDebugger enter:aContext select:nil. |
2426 | 164 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
165 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
166 |
] |
3998 | 167 |
]. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
168 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
169 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 170 |
|
3447 | 171 |
"Modified: / 18.11.2001 / 00:48:03 / cg" |
53 | 172 |
! |
173 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
174 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 175 |
"enter a debugger - do not check for recursive invocation" |
176 |
||
5455 | 177 |
<context: #return> |
178 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
179 |
|aDebugger| |
266 | 180 |
|
181 |
StepInterruptPending := nil. |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
182 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
183 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
184 |
"/ to avoid recursive debugging ... |
3447 | 185 |
ControlInterrupt handle:[:ex | |
186 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
|
4676
c809ebc38db9
more info on an ignored breakpoint
Claus Gittinger <cg@exept.de>
parents:
4644
diff
changeset
|
187 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
188 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
189 |
] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
190 |
aDebugger := self new. |
3447 | 191 |
]. |
192 |
||
193 |
aDebugger isNil ifTrue:[ |
|
194 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
|
195 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
196 |
mayProceed ifTrue:[ |
|
197 |
(Dialog confirm:'Error/Breakpoint cought.\\Press Continue or Abort.' withCRs |
|
198 |
yesLabel:'Continue' noLabel:'Abort') |
|
199 |
ifTrue:[ |
|
200 |
^ nil |
|
201 |
]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
202 |
] ifFalse:[ |
3447 | 203 |
self information:'Error cought.\\Press OK to abort the operation.' withCRs. |
204 |
]. |
|
205 |
AbortOperationRequest raise. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
206 |
"not reached" |
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
207 |
]. |
3447 | 208 |
|
209 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
210 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 211 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
212 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
213 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
214 |
" |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
215 |
nil halt |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
216 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
217 |
|
3447 | 218 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 219 |
! |
220 |
||
6430 | 221 |
enterWithMessage:message |
222 |
"enter a debugger" |
|
223 |
||
224 |
<context: #return> |
|
225 |
||
226 |
self enter:(thisContext sender) withMessage:message mayProceed:true. |
|
227 |
! |
|
228 |
||
266 | 229 |
new |
2358 | 230 |
"return a new DebugView. |
231 |
- return a cached debugger if it already exists. |
|
232 |
Also, care for remote displays on which no debugger is wanted |
|
233 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
234 |
||
235 |
|debugger currentScreen debuggerDevice| |
|
236 |
||
237 |
currentScreen := Screen current. |
|
14 | 238 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
239 |
currentScreen notNil ifTrue:[ |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
240 |
(currentScreen suppressDebugger) ifTrue:[ |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
241 |
"/ no debuggers with that device - show an alertBox which aborts... |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
242 |
^ nil. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
243 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
244 |
(currentScreen mayOpenDebugger) ifFalse:[ |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
245 |
"/ no debugger on that device - but on the main screen |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
246 |
currentScreen := Screen default. |
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
247 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
248 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
249 |
|
266 | 250 |
" |
251 |
need a blocking debugger if no processes or |
|
252 |
or if its a timing/interrupt process |
|
253 |
(because otherwise we would not get any events here ... |
|
254 |
" |
|
255 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
256 |
((debugger := CachedExclusive) isNil |
2426 | 257 |
or:[debugger device ~~ currentScreen |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
258 |
or:[currentScreen isNil |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
259 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
260 |
debugger := self newExclusive |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
261 |
]. |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
262 |
CachedExclusive := nil. |
266 | 263 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
264 |
CachedDebugger notNil ifTrue:[ |
2358 | 265 |
(CachedDebugger device ~~ currentScreen |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
266 |
or:[currentScreen isNil |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
267 |
or:[currentScreen isOpen not]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
268 |
CachedDebugger := nil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
269 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
270 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
271 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
272 |
(debugger := CachedDebugger) notNil ifTrue:[ |
2358 | 273 |
CachedDebugger := nil. |
274 |
] ifFalse:[ |
|
275 |
debuggerDevice := currentScreen. |
|
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
276 |
debuggerDevice isNil ifTrue:[ |
2352 | 277 |
"/ use the default display |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
278 |
debuggerDevice := Screen default. |
2358 | 279 |
]. |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
280 |
(debuggerDevice isNil |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
281 |
or:[debuggerDevice isOpen not |
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
282 |
"/ or:[debuggerDevice mayOpenDebugger not] |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
283 |
]) ifTrue:[ |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
284 |
"/ no debugger |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
285 |
^ nil. |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
286 |
]. |
2358 | 287 |
|
288 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
289 |
do:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
290 |
debugger := super new. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
291 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
292 |
debugger label:'Debugger'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
293 |
debugger icon:self defaultIcon. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
294 |
] |
266 | 295 |
]. |
73 | 296 |
^ debugger |
875 | 297 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
298 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 299 |
! |
0 | 300 |
|
266 | 301 |
newExclusive |
302 |
"return a debugger for exclusive display access" |
|
303 |
||
304 |
|debugger| |
|
105 | 305 |
|
266 | 306 |
debugger := super new. |
307 |
debugger label:'Debugger'. |
|
875 | 308 |
debugger icon:self defaultIcon. |
266 | 309 |
debugger exclusive:true. |
310 |
^ debugger |
|
875 | 311 |
|
312 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 313 |
! |
314 |
||
29 | 315 |
openOn:aProcess |
316 |
"start a debugger on aProcess |
|
317 |
(actually not more than a good-looking inspector)" |
|
15 | 318 |
|
52 | 319 |
|aDebugger label nm| |
15 | 320 |
|
321 |
aDebugger := super new. |
|
875 | 322 |
aDebugger icon:self defaultIcon. |
29 | 323 |
aProcess notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
324 |
nm := aProcess name. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
325 |
nm notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
326 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
327 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
328 |
nm := aProcess id printString |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
329 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
330 |
label := 'Debugger [' , nm , ']'. |
29 | 331 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
332 |
label := 'no process' |
29 | 333 |
]. |
1114 | 334 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 335 |
aDebugger openOn:aProcess. |
336 |
^ nil |
|
875 | 337 |
|
1114 | 338 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 339 |
! ! |
340 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
341 |
!DebugView class methodsFor:'cleanup'! |
485 | 342 |
|
343 |
lowSpaceCleanup |
|
344 |
"in low memory situations, give up cached debuggers" |
|
345 |
||
346 |
CachedDebugger := nil. |
|
347 |
CachedExclusive := nil. |
|
348 |
OpenDebuggers := nil. |
|
349 |
||
350 |
" |
|
351 |
DebugView lowSpaceCleanup |
|
352 |
" |
|
353 |
||
354 |
"Modified: 18.4.1996 / 16:48:03 / cg" |
|
355 |
! |
|
356 |
||
357 |
newDebugger |
|
2358 | 358 |
"force creation of a new debugger (give up cached debuggers)" |
485 | 359 |
|
360 |
CachedDebugger := nil. |
|
361 |
CachedExclusive := nil. |
|
362 |
OpenDebuggers := nil. |
|
363 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
364 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
4356 | 365 |
Debugger := self |
366 |
]. |
|
367 |
||
485 | 368 |
" |
369 |
DebugView newDebugger |
|
370 |
" |
|
371 |
! ! |
|
372 |
||
875 | 373 |
!DebugView class methodsFor:'defaults'! |
374 |
||
375 |
defaultIcon |
|
1148 | 376 |
"return the debuggers default window icon" |
377 |
||
378 |
<resource: #style (#ICON #ICON_FILE)> |
|
379 |
||
3447 | 380 |
|nm i resources| |
1148 | 381 |
|
382 |
(i := DefaultIcon) isNil ifTrue:[ |
|
3447 | 383 |
resources := self classResources. |
384 |
i := resources at:'ICON' default:nil. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
385 |
i isNil ifTrue:[ |
3447 | 386 |
nm := resources at:'ICON_FILE' default:'Debugger.xbm'. |
2476 | 387 |
i := Smalltalk imageFromFileNamed:nm forClass:self. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
388 |
i isNil ifTrue:[ |
2452
2cb5d3d8f8c4
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
2445
diff
changeset
|
389 |
i := StandardSystemView defaultIcon |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
390 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
391 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
392 |
i notNil ifTrue:[ |
2340 | 393 |
DefaultIcon := i := i onDevice:Display |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
394 |
] |
1082 | 395 |
]. |
1148 | 396 |
^ i |
397 |
||
3447 | 398 |
"Modified: / 19.3.1997 / 20:48:34 / ca" |
399 |
"Modified: / 17.11.2001 / 23:09:45 / cg" |
|
937
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
400 |
! |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
401 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
402 |
defaultVerboseBacktrace |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
403 |
^ VerboseBacktraceDefault |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
404 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
405 |
"Created: 11.1.1997 / 12:14:35 / cg" |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
406 |
! |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
407 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
408 |
defaultVerboseBacktrace:aBoolean |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
409 |
VerboseBacktraceDefault := aBoolean |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
410 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
411 |
"Created: 11.1.1997 / 12:14:44 / cg" |
3441 | 412 |
! |
413 |
||
414 |
updateStyleCache |
|
6136 | 415 |
"extract values from the styleSheet and cache them in class variables" |
416 |
||
417 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
418 |
||
3441 | 419 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
420 |
||
421 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
875 | 422 |
! ! |
423 |
||
3269 | 424 |
!DebugView class methodsFor:'menu specs'! |
425 |
||
426 |
menuSpec |
|
427 |
"This resource specification was automatically generated |
|
428 |
by the MenuEditor of ST/X." |
|
429 |
||
430 |
"Do not manually edit this!! If it is corrupted, |
|
431 |
the MenuEditor may not be able to read the specification." |
|
432 |
||
433 |
" |
|
434 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
435 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
436 |
" |
|
437 |
||
438 |
<resource: #menu> |
|
439 |
||
440 |
^ |
|
5875 | 441 |
#(Menu |
442 |
( |
|
443 |
(MenuItem |
|
444 |
label: 'View' |
|
445 |
translateLabel: true |
|
446 |
submenu: |
|
447 |
(Menu |
|
448 |
( |
|
449 |
(MenuItem |
|
450 |
enabled: canShowMore |
|
451 |
label: 'Show more WalkBack' |
|
452 |
itemValue: showMore |
|
453 |
translateLabel: true |
|
5110 | 454 |
) |
5875 | 455 |
(MenuItem |
456 |
label: 'Show verbose WalkBack' |
|
457 |
itemValue: toggleVerboseWalkback |
|
458 |
translateLabel: true |
|
459 |
isVisible: showingDenseWalkback |
|
5110 | 460 |
) |
5875 | 461 |
(MenuItem |
462 |
label: 'Show dense WalkBack' |
|
463 |
itemValue: toggleVerboseWalkback |
|
464 |
translateLabel: true |
|
465 |
isVisible: showingVerboseWalkback |
|
5110 | 466 |
) |
5875 | 467 |
(MenuItem |
468 |
label: '-' |
|
5110 | 469 |
) |
5875 | 470 |
(MenuItem |
471 |
label: 'Exit' |
|
472 |
itemValue: closeRequest |
|
473 |
translateLabel: true |
|
474 |
isVisible: isInspecting |
|
5110 | 475 |
) |
5875 | 476 |
(MenuItem |
477 |
label: 'Close Debugger and Abort' |
|
478 |
itemValue: closeRequest |
|
479 |
translateLabel: true |
|
480 |
isVisible: isNotInspecting |
|
5110 | 481 |
) |
482 |
) |
|
483 |
nil |
|
484 |
nil |
|
485 |
) |
|
486 |
) |
|
5875 | 487 |
(MenuItem |
488 |
label: 'Process' |
|
489 |
translateLabel: true |
|
490 |
submenu: |
|
491 |
(Menu |
|
492 |
( |
|
493 |
(MenuItem |
|
494 |
label: 'Continue' |
|
495 |
itemValue: doContinue |
|
496 |
translateLabel: true |
|
3269 | 497 |
) |
5875 | 498 |
(MenuItem |
499 |
label: '-' |
|
3269 | 500 |
) |
5875 | 501 |
(MenuItem |
502 |
label: 'Abort' |
|
503 |
itemValue: doAbort |
|
504 |
translateLabel: true |
|
3269 | 505 |
) |
5875 | 506 |
(MenuItem |
6487 | 507 |
enabled: abortAllIsHandled |
508 |
label: 'Abort All' |
|
509 |
itemValue: doAbortAll |
|
510 |
translateLabel: true |
|
511 |
) |
|
512 |
(MenuItem |
|
5875 | 513 |
label: '-' |
3269 | 514 |
) |
5875 | 515 |
(MenuItem |
516 |
label: 'Terminate' |
|
517 |
itemValue: doTerminate |
|
518 |
translateLabel: true |
|
3269 | 519 |
) |
520 |
) |
|
521 |
nil |
|
522 |
nil |
|
523 |
) |
|
524 |
) |
|
5875 | 525 |
(MenuItem |
526 |
label: 'Context' |
|
527 |
translateLabel: true |
|
528 |
submenu: |
|
529 |
(Menu |
|
530 |
( |
|
531 |
(MenuItem |
|
532 |
enabled: canReturn |
|
533 |
label: 'Return' |
|
534 |
itemValue: doReturn |
|
535 |
translateLabel: true |
|
536 |
) |
|
537 |
(MenuItem |
|
538 |
enabled: canRestart |
|
539 |
label: 'Restart' |
|
540 |
itemValue: doRestart |
|
541 |
translateLabel: true |
|
3447 | 542 |
) |
5875 | 543 |
(MenuItem |
544 |
label: '-' |
|
3447 | 545 |
) |
5875 | 546 |
(MenuItem |
547 |
enabled: hasContextSelected |
|
548 |
label: 'Inspect' |
|
549 |
itemValue: inspectContext |
|
550 |
translateLabel: true |
|
3447 | 551 |
) |
5875 | 552 |
(MenuItem |
553 |
label: 'Copy WalkBack Text' |
|
554 |
itemValue: copyWalkbackText |
|
555 |
translateLabel: true |
|
3447 | 556 |
) |
5875 | 557 |
(MenuItem |
558 |
label: 'Bookmark Method in SystemBrowser' |
|
559 |
itemValue: addBrowserBookmark |
|
560 |
translateLabel: true |
|
3447 | 561 |
) |
562 |
) |
|
563 |
nil |
|
564 |
nil |
|
565 |
) |
|
566 |
) |
|
5875 | 567 |
(MenuItem |
568 |
label: 'Class' |
|
569 |
translateLabel: true |
|
570 |
submenu: |
|
571 |
(Menu |
|
572 |
( |
|
573 |
(MenuItem |
|
574 |
enabled: canBrowseImplementingClass |
|
575 |
label: 'Browse Implementing Class' |
|
576 |
itemValue: browseImplementingClass |
|
577 |
translateLabel: true |
|
3269 | 578 |
) |
5875 | 579 |
(MenuItem |
580 |
enabled: canBrowseReceiversClass |
|
581 |
label: 'Browse Receivers Class' |
|
582 |
itemValue: browseReceiversClass |
|
583 |
translateLabel: true |
|
3269 | 584 |
) |
5875 | 585 |
(MenuItem |
586 |
label: '-' |
|
3269 | 587 |
) |
5875 | 588 |
(MenuItem |
589 |
enabled: canBrowseClassHierarchy |
|
590 |
label: 'Browse Receivers Class Hierarchy' |
|
591 |
itemValue: browseClassHierarchy |
|
592 |
translateLabel: true |
|
3269 | 593 |
) |
5875 | 594 |
(MenuItem |
595 |
enabled: canBrowseFullClassProtocol |
|
596 |
label: 'Browse Receivers Full Protocol' |
|
597 |
itemValue: browseFullClassProtocol |
|
598 |
translateLabel: true |
|
3269 | 599 |
) |
600 |
) |
|
601 |
nil |
|
602 |
nil |
|
603 |
) |
|
604 |
) |
|
5875 | 605 |
(MenuItem |
606 |
label: 'Selector' |
|
607 |
translateLabel: true |
|
608 |
submenu: |
|
609 |
(Menu |
|
610 |
( |
|
611 |
(MenuItem |
|
612 |
label: 'Browse Implementors...' |
|
613 |
itemValue: browseImplementorsOf |
|
614 |
translateLabel: true |
|
3269 | 615 |
) |
5875 | 616 |
(MenuItem |
617 |
label: 'Browse Senders...' |
|
618 |
itemValue: browseSendersOf |
|
619 |
translateLabel: true |
|
3269 | 620 |
) |
5875 | 621 |
(MenuItem |
622 |
label: '-' |
|
3269 | 623 |
) |
5875 | 624 |
(MenuItem |
625 |
enabled: canDefineMethod |
|
626 |
label: 'Define' |
|
627 |
itemValue: doDefineMethod |
|
628 |
translateLabel: true |
|
3269 | 629 |
) |
630 |
) |
|
631 |
nil |
|
632 |
nil |
|
633 |
) |
|
634 |
) |
|
5875 | 635 |
(MenuItem |
636 |
label: 'Breakpoint' |
|
637 |
translateLabel: true |
|
638 |
submenu: |
|
639 |
(Menu |
|
640 |
( |
|
641 |
(MenuItem |
|
642 |
enabled: canRemoveBreakpoint |
|
643 |
label: 'Remove' |
|
644 |
itemValue: removeBreakpoint |
|
645 |
translateLabel: true |
|
3269 | 646 |
) |
5875 | 647 |
(MenuItem |
648 |
label: 'Remove all Breakpoints' |
|
649 |
itemValue: removeAllBreakpoints |
|
650 |
translateLabel: true |
|
3511 | 651 |
) |
5875 | 652 |
(MenuItem |
653 |
label: '-' |
|
3511 | 654 |
) |
5875 | 655 |
(MenuItem |
656 |
enabled: canAddBreakpoint |
|
657 |
label: 'Add' |
|
658 |
itemValue: addBreakpoint |
|
659 |
translateLabel: true |
|
3269 | 660 |
) |
5875 | 661 |
(MenuItem |
662 |
label: '-' |
|
3269 | 663 |
) |
5875 | 664 |
(MenuItem |
665 |
label: 'Allow Breakpoints in Debugger' |
|
666 |
itemValue: allowBreakPointsInDebugger: |
|
667 |
translateLabel: true |
|
668 |
indication: allowBreakPointsInDebugger |
|
3269 | 669 |
) |
670 |
) |
|
671 |
nil |
|
672 |
nil |
|
673 |
) |
|
674 |
) |
|
5875 | 675 |
(MenuItem |
676 |
label: 'Help' |
|
677 |
translateLabel: true |
|
678 |
startGroup: right |
|
679 |
submenu: |
|
680 |
(Menu |
|
681 |
( |
|
682 |
(MenuItem |
|
683 |
label: 'Debuggers Documentation' |
|
684 |
itemValue: openHTMLDocument: |
|
685 |
translateLabel: true |
|
686 |
argument: 'tools/debugView/TOP.html' |
|
3269 | 687 |
) |
5875 | 688 |
(MenuItem |
689 |
label: '-' |
|
3269 | 690 |
) |
5875 | 691 |
(MenuItem |
692 |
label: 'About DebugView...' |
|
693 |
itemValue: openAboutThisApplication |
|
694 |
translateLabel: true |
|
3269 | 695 |
) |
696 |
) |
|
697 |
nil |
|
698 |
nil |
|
699 |
) |
|
700 |
) |
|
701 |
) |
|
702 |
nil |
|
703 |
nil |
|
704 |
) |
|
705 |
! ! |
|
706 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
707 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
708 |
|
4121 | 709 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
710 |
"return an interesting context to be shown in an error notifier. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
711 |
We move up the calling chain, skipping intermediate Signal |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
712 |
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
|
713 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
714 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
715 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
716 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
717 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
718 |
someContexts := Array new:25. |
2042 | 719 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
720 |
idx := 1. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
721 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
722 |
someContexts at:idx put:con. |
2042 | 723 |
con := con sender. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
724 |
idx := idx + 1. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
725 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
726 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
727 |
^ someContexts at:idx. |
3447 | 728 |
! |
729 |
||
730 |
interestingContextIndexIn:aContextArray |
|
731 |
"return an interesting contexts offset, or nil. |
|
732 |
This is the context initially shown in the walkback. |
|
733 |
We move up the calling chain, skipping all intermediate Signal |
|
734 |
and Exception contexts, to present the context in which the error |
|
735 |
actually occured. |
|
736 |
Just for your convenience :-)" |
|
737 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
738 |
|con found offset sel prev ex rcvr nMax idx| |
3447 | 739 |
|
740 |
nMax := aContextArray size. |
|
741 |
nMax <= 1 ifTrue:[^ 1]. |
|
742 |
con := aContextArray at:1. |
|
743 |
con isBlockContext ifTrue:[^ 1]. |
|
744 |
||
745 |
"/ somewhere, at the bottom, there must be a raise ... |
|
746 |
"/ find the exception |
|
747 |
||
748 |
1 to:5 do:[:i | |
|
749 |
con := aContextArray at:i ifAbsent:nil. |
|
750 |
con notNil ifTrue:[ |
|
751 |
||
752 |
sel := con selector. |
|
753 |
((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
|
754 |
^ i + 1 |
|
755 |
]. |
|
756 |
((sel == #raise) or:[sel == #raiseRequest]) ifTrue:[ |
|
757 |
rcvr := con receiver. |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
758 |
(rcvr isLazyValue not and:[rcvr isException]) ifTrue:[ |
3447 | 759 |
ex := rcvr. |
760 |
offset := i. |
|
761 |
found := con |
|
762 |
] ifFalse:[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
763 |
(rcvr isLazyValue not and:[rcvr isExceptionCreator]) ifTrue:[ |
3447 | 764 |
offset := i. |
765 |
found := con |
|
766 |
] |
|
767 |
] |
|
768 |
]. |
|
769 |
]. |
|
770 |
]. |
|
771 |
||
772 |
" |
|
773 |
if this is a noHandler exception, skip forward |
|
774 |
to the erronous context |
|
775 |
" |
|
776 |
ex notNil ifTrue:[ |
|
777 |
ex signal == Signal noHandlerSignal ifTrue:[ |
|
778 |
found := ex suspendedContext |
|
779 |
] |
|
780 |
]. |
|
781 |
||
782 |
found isNil ifTrue:[ |
|
783 |
"/ this is a kludge, but convenient. |
|
6579 | 784 |
"/ show the place where the error (divisionByZero...) happend, |
3447 | 785 |
"/ not where the signal was raised. |
786 |
sel := (aContextArray at:1) methodHome selector. |
|
787 |
||
788 |
"/ typically a DivisionByZero - show caller of division |
|
789 |
(sel == #// |
|
790 |
or:[sel == #/ |
|
791 |
or:[sel == #\\]]) ifTrue:[ |
|
792 |
^ 2 |
|
793 |
]. |
|
794 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
795 |
"/ show the place of the bad message; not where the Signal was raised... |
3447 | 796 |
(sel == #doesNotUnderstand:) ifTrue:[ |
797 |
^ 3 min:nMax |
|
798 |
]. |
|
799 |
||
800 |
"/ show the bad method; not where the Signal was raised... |
|
801 |
(sel == #noByteCode) ifTrue:[ |
|
802 |
^ 2 |
|
803 |
]. |
|
804 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
805 |
"/ show the place of the halt; not where the HaltSignal was raised... |
3447 | 806 |
((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
807 |
^ 2 |
|
808 |
]. |
|
809 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
810 |
"/ show the place of error-call; not where the ErrorSignal was raised... |
3447 | 811 |
(sel == #error:mayProceed:) ifTrue:[ |
812 |
nMax > 2 ifTrue:[ |
|
813 |
sel := (aContextArray at:2) selector. |
|
814 |
sel == #mustBeBoolean ifTrue:[ |
|
815 |
^ 3 |
|
816 |
]. |
|
5896
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
817 |
sel == #assert:message: ifTrue:[ |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
818 |
nMax > 3 ifTrue:[ |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
819 |
sel := (aContextArray at:3) selector. |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
820 |
sel == #assert: ifTrue:[ |
6579 | 821 |
nMax > 4 ifTrue:[ |
822 |
sel := (aContextArray at:4) selector. |
|
823 |
sel == #deny: ifTrue:[ |
|
824 |
^ 5 |
|
825 |
] |
|
826 |
]. |
|
5896
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
827 |
^ 4 |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
828 |
]. |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
829 |
^ 3 |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
830 |
]. |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
831 |
]. |
3447 | 832 |
]. |
833 |
^ 2 |
|
834 |
]. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
835 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
836 |
(sel == #signalInterrupt:) ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
837 |
^ 2 |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
838 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
839 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
840 |
"/ show the place of error-call; not where the ErrorSignal was raised... |
3447 | 841 |
(sel == #error:) ifTrue:[ |
842 |
^ 2 |
|
843 |
]. |
|
844 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
845 |
"/ show the place of the assert; not where the Signal was raised... |
5114 | 846 |
(sel == #assert:) ifTrue:[ |
6579 | 847 |
nMax > 2 ifTrue:[ |
848 |
sel := (aContextArray at:2) selector. |
|
849 |
sel == #deny: ifTrue:[ |
|
850 |
^ 3 |
|
851 |
]. |
|
852 |
]. |
|
5114 | 853 |
^ 2 |
854 |
]. |
|
855 |
||
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
856 |
"/ show the place of the send; not where the Signal was raised... |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
857 |
(sel == #subclassResponsibility) ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
858 |
^ 2 |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
859 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
860 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
861 |
"/ show the place of the bad index; not where the Signal was raised... |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
862 |
( #(#notIndexed |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
863 |
#indexNotIntegerOrOutOfBounds: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
864 |
#subscriptBoundsError: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
865 |
#elementBoundsError: |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
866 |
"/ #subclassResponsibility |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
867 |
) includes:sel) ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
868 |
idx := 2. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
869 |
[ idx <= 3 |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
870 |
and:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
871 |
sel := (aContextArray at:idx) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
872 |
#(#notIndexed |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
873 |
#indexNotIntegerOrOutOfBounds: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
874 |
#subscriptBoundsError: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
875 |
#elementBoundsError: ) includes:sel |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
876 |
] |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
877 |
] whileTrue:[ idx := idx + 1 ]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
878 |
sel := (aContextArray at:idx) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
879 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
880 |
ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
881 |
sel := (aContextArray at:idx+1) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
882 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
883 |
ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
884 |
sel := (aContextArray at:idx+2) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
885 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
886 |
ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
887 |
^ idx+3 |
3447 | 888 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
889 |
^ idx+2 |
3447 | 890 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
891 |
^ idx+1 |
3447 | 892 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
893 |
^ idx |
3447 | 894 |
]. |
895 |
||
896 |
^ 1 |
|
897 |
]. |
|
898 |
||
899 |
con := found. |
|
900 |
||
901 |
" |
|
902 |
got it; move up, skipping all intermediate Signal and |
|
903 |
Exception contexts |
|
904 |
" |
|
905 |
prev := nil. |
|
906 |
rcvr := con receiver. |
|
907 |
[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
908 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 909 |
] whileTrue:[ |
910 |
prev := con. |
|
911 |
nMax > offset ifFalse:[^ offset]. |
|
912 |
||
913 |
offset := offset + 1. |
|
914 |
con := aContextArray at:offset. |
|
915 |
rcvr := con receiver. |
|
916 |
]. |
|
917 |
||
918 |
" |
|
919 |
now, we are one above the raising context |
|
920 |
" |
|
921 |
||
922 |
" |
|
923 |
if the sender-method of the raise is one of objects error methods ... |
|
924 |
" |
|
925 |
( #( halt halt: |
|
926 |
error error: |
|
927 |
doesNotUnderstand: |
|
928 |
subclassResponsibility |
|
929 |
primitiveFailed) includes:con selector) |
|
930 |
ifTrue:[ |
|
931 |
con selector == #doesNotUnderstand: ifTrue:[ |
|
932 |
" |
|
933 |
one more up, to get to the originating context |
|
934 |
" |
|
935 |
con := aContextArray at:(offset + 1). |
|
936 |
con isNil ifTrue:[^ offset]. |
|
937 |
offset := offset + 1. |
|
938 |
]. |
|
939 |
con := aContextArray at:(offset + 1). |
|
940 |
con isNil ifTrue:[^ offset]. |
|
941 |
offset := offset + 1. |
|
942 |
] ifFalse:[ |
|
943 |
" |
|
944 |
ok, got the raise - if its a BreakPoint, look for the sender |
|
945 |
" |
|
946 |
(prev receiver == BreakPointInterrupt) ifTrue:[ |
|
947 |
offset := offset + 1 |
|
948 |
]. |
|
949 |
]. |
|
950 |
||
951 |
^ offset |
|
952 |
||
953 |
"Created: / 17.11.2001 / 20:37:49 / cg" |
|
954 |
"Modified: / 17.11.2001 / 21:44:06 / cg" |
|
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
955 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
956 |
|
73 | 957 |
!DebugView methodsFor:'basic'! |
958 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
959 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
960 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
961 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
962 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
963 |
m notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
964 |
self updateMenuItems. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
965 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
966 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
967 |
abortButton enable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
968 |
m enable:#doAbort. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
969 |
] ifFalse:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
970 |
abortButton disable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
971 |
m disable:#doAbort. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
972 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
973 |
exclusive ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
974 |
terminateButton disable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
975 |
m disable:#doTerminate. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
976 |
] ifFalse:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
977 |
terminateButton enable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
978 |
m enable:#doTerminate. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
979 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
980 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
981 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
982 |
mayProceed == false ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
983 |
continueButton disable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
984 |
m notNil ifTrue:[m disable:#doContinue]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
985 |
] ifFalse:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
986 |
continueButton enable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
987 |
m notNil ifTrue:[m enable:#doContinue] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
988 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
989 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
990 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
991 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
992 |
|
1364 | 993 |
enter:aContext select:initialSelectionOrNil |
73 | 994 |
"enter the debugger - get and display the context, then start an |
995 |
exclusive event loop on top of eveything else" |
|
996 |
||
3447 | 997 |
<context: #return> |
998 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
999 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext c| |
3447 | 1000 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1001 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1002 |
'==> enter: (' print. aContext print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1003 |
') select: ' print. initialSelectionOrNil printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1004 |
]. |
3447 | 1005 |
thisContext isRecursive ifTrue:[ |
1006 |
"/ care for the special case, were the Debugger was autoloaded. |
|
1007 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1008 |
"/ condition. |
|
1009 |
foundNoByteCodeContext := false. |
|
1010 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:nil. |
|
1011 |
[foundNoByteCodeContext not |
|
1012 |
and:[c notNil |
|
1013 |
and:[c selector ~~ #enter:withMessage:mayProceed:]]] whileTrue:[ |
|
1014 |
c selector == #noByteCode ifTrue:[ |
|
1015 |
foundNoByteCodeContext := true |
|
1016 |
]. |
|
1017 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:nil. |
|
1018 |
]. |
|
1019 |
||
1020 |
foundNoByteCodeContext ifFalse:[ |
|
1021 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1022 |
||
1023 |
^ MiniDebugger |
|
1024 |
enter:aContext |
|
1025 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1026 |
mayProceed:mayProceed. |
|
1027 |
] |
|
1028 |
]. |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1029 |
|
2591
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1030 |
"/'entering: ' print. aContext printCR. |
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1031 |
"/'initial: ' print. initialSelectionOrNil printCR. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1032 |
iAmNew := drawableId isNil. |
73 | 1033 |
|
939 | 1034 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
1035 |
||
3580 | 1036 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1037 |
busy := cachable := true. |
73 | 1038 |
inspecting := false. |
1039 |
inspectedProcess := Processor activeProcess. |
|
1040 |
stepping := false. |
|
1041 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1042 |
stepHow := nil. |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1043 |
nChainShown := InitialNCHAINShown. |
73 | 1044 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1045 |
"/ if debugger is entered while a box has grabbed the |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1046 |
"/ pointer, we must ungrab - otherwise X wont talk to us here. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1047 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1048 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1049 |
"/ Q: this is good for multi-screen apps (where an error should not happen), |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1050 |
"/ but not for multi-user development, where the debugger is entered often. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1051 |
"/ What is a good solution to this dilemma ? |
1279
84ec8d33eba8
ungrab all screens in case of an error
Claus Gittinger <cg@exept.de>
parents:
1274
diff
changeset
|
1052 |
Screen allScreens do:[:aScreen | |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1053 |
aScreen ungrabPointer. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1054 |
aScreen ungrabKeyboard. |
73 | 1055 |
]. |
1056 |
||
1004
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
1057 |
("inspectedProcess suspendedContext isNil |
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1058 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
1004
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
1059 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1060 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1061 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1062 |
terminateButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1063 |
abortButton enable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1064 |
]. |
73 | 1065 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1066 |
iAmNew ifFalse:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1067 |
"/ not the first time - disable buttons & menus |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1068 |
"/ from the previous life |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1069 |
self turnOffAllButtons. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1070 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1071 |
m := contextView middleButtonMenu. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1072 |
m notNil ifTrue:[ |
5195
5a2d612e1adb
oops - skip was always disabled
Claus Gittinger <cg@exept.de>
parents:
5170
diff
changeset
|
1073 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1074 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1075 |
verboseBacktrace |
3447 | 1076 |
ifTrue:[self showVerboseWalkback] |
1077 |
ifFalse:[self showDenseWalkback]. |
|
132 | 1078 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1079 |
self iconLabel:'Debugger'. |
132 | 1080 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1081 |
windowGroup isNil ifTrue:[ |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1082 |
self windowGroup: WindowGroup new. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1083 |
windowGroup addTopView:self. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1084 |
]. |
132 | 1085 |
exclusive ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1086 |
"/ create a (modal) windowGroup for myself |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1087 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1088 |
windowGroup setModal:true. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1089 |
] ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1090 |
"/ create a windowGroup with a synchronous sensor for me |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1091 |
|
3769 | 1092 |
windowGroup beSynchronous. |
73 | 1093 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1094 |
windowGroup setProcess:Processor activeProcess. |
73 | 1095 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1096 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
73 | 1097 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1098 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
2591
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1099 |
"/'after setContext; first is ' print. |
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1100 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1101 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
73 | 1102 |
|
1103 |
m := contextView middleButtonMenu. |
|
1104 |
m notNil ifTrue:[ |
|
3269 | 1105 |
self updateMenuItems. |
1106 |
||
5821
a5ef70570c6c
Check for AbortOperationRequest in suspendedContext.
Stefan Vogel <sv@exept.de>
parents:
5798
diff
changeset
|
1107 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1108 |
abortButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1109 |
m enable:#doAbort. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1110 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1111 |
abortButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1112 |
m disable:#doAbort. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1113 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1114 |
exclusive ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1115 |
terminateButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1116 |
m disable:#doTerminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1117 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1118 |
terminateButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1119 |
m enable:#doTerminate. |
3447 | 1120 |
]. |
1121 |
iAmNew ifFalse:[ |
|
5195
5a2d612e1adb
oops - skip was always disabled
Claus Gittinger <cg@exept.de>
parents:
5170
diff
changeset
|
1122 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
3447 | 1123 |
]. |
73 | 1124 |
]. |
1125 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1126 |
mayProceed == false ifTrue:[ |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1127 |
continueButton disable. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1128 |
m notNil ifTrue:[m disable:#doContinue]. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1129 |
] ifFalse:[ |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1130 |
continueButton enable. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1131 |
m notNil ifTrue:[m enable:#doContinue] |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1132 |
]. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1133 |
|
73 | 1134 |
" |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1135 |
If this is a new debugger, do a realize. |
528
a5ba1a3d0b45
Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents:
527
diff
changeset
|
1136 |
Otherwise, its probably better to do a map, which shows the |
73 | 1137 |
view at the previous position, without a need for the user to set the |
1138 |
position again |
|
1139 |
" |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1140 |
iAmNew ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1141 |
self remap. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1142 |
] ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1143 |
self realize. |
73 | 1144 |
]. |
1145 |
||
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1146 |
exclusive ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1147 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1148 |
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
|
1149 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1150 |
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
|
1151 |
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
|
1152 |
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
|
1153 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1154 |
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
|
1155 |
]. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1156 |
|
73 | 1157 |
self raise. |
1486
6ae442626f20
wait until visible before starting to draw
Claus Gittinger <cg@exept.de>
parents:
1484
diff
changeset
|
1158 |
|
73 | 1159 |
canContinue := true. |
1160 |
exitAction := nil. |
|
1161 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1162 |
"/ enter private event handling loop. This is left (and we come back here again) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1163 |
"/ when any button was pressed which requires continuation of the debuggee or |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1164 |
"/ closedown of the debugger. |
3701
ef73aac8e8d5
Use #ifCurtailed: instead of #valueOnUnwindDo:
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
1165 |
[self controlLoop] ifCurtailed:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1166 |
windowGroup notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1167 |
windowGroup setProcess:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1168 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1169 |
self destroy |
132 | 1170 |
]. |
73 | 1171 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1172 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1173 |
"/ This is required to avoid keeping references to the debuggees objects |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1174 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1175 |
contextView contents:nil. |
1176 |
||
73 | 1177 |
codeView acceptAction:nil. |
942 | 1178 |
codeView doItAction:nil. |
73 | 1179 |
|
4892 | 1180 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
1181 |
ObjectMemory stepInterruptHandler:nil. |
|
1182 |
]. |
|
1183 |
||
3447 | 1184 |
"/ not stepping - close window |
73 | 1185 |
(exitAction ~~ #step) ifTrue:[ |
3165
03d3c485e67d
remember selected entry in inspectors;
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1186 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
03d3c485e67d
remember selected entry in inspectors;
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1187 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1188 |
receiverInspector release. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1189 |
contextInspector release. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1190 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1191 |
self unmap. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1192 |
device flush. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1193 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1194 |
(exitAction == #abort) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1195 |
self exit_abort. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1196 |
]. |
6487 | 1197 |
(exitAction == #abortAll) ifTrue:[ |
1198 |
self exit_abortAll. |
|
1199 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1200 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1201 |
(exitAction == #return) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1202 |
self exit_return. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1203 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1204 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1205 |
(exitAction == #restart) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1206 |
self exit_restart. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1207 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1208 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1209 |
(exitAction == #quickTerminate) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1210 |
self exit_quickTerminate. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1211 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1212 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1213 |
(exitAction == #terminate) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1214 |
self exit_terminate. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1215 |
] |
73 | 1216 |
]. |
1217 |
||
3447 | 1218 |
"/ stepping - window stays open |
1219 |
||
940 | 1220 |
selectedContext := actualContext := firstContext := nil. |
73 | 1221 |
|
2472 | 1222 |
"/ restore the previous pointer grab |
73 | 1223 |
grabber notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1224 |
device grabPointerInView:grabber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1225 |
grabber := nil. |
61 | 1226 |
]. |
73 | 1227 |
|
1228 |
(exitAction == #step) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1229 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1230 |
schedule another stepInterrupt |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1231 |
- must enter myself into the collection of open debuggers, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1232 |
in case the stepping process comes back again via a halt or signal |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1233 |
before the step is finished. In this case, the stepping debugger should |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1234 |
come up (instead of a new one) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1235 |
- must flush caches since optimized methods not always |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1236 |
look for pending interrupts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1237 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1238 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1239 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1240 |
"/ also must care for stepping into a return |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1241 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1242 |
steppedContext notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1243 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1244 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1245 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1246 |
OpenDebuggers isNil ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1247 |
OpenDebuggers := WeakIdentitySet new. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1248 |
]. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1249 |
OpenDebuggers add:self. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1250 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1251 |
self label:'single stepping - please wait ...'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1252 |
stepping := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1253 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1254 |
ObjectMemory stepInterruptHandler:self. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1255 |
Processor activeProcess stepInterruptHandler:self. |
2963 | 1256 |
ObjectMemory flushCaches. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1257 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1258 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1259 |
"bigStep" steppedContextLineno notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1260 |
Context singleStepInterruptRequest raiseWith:#next |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1261 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1262 |
Context singleStepInterruptRequest raiseWith:#step |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1263 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1264 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1265 |
"/ see if we came here through an interrupt-action |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1266 |
"/ (i.e. aProcess interruptWith:...) |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1267 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1268 |
enteredByInterrupt := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1269 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1270 |
[enteredByInterrupt not |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1271 |
and:[con notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1272 |
and:[con ~~ aContext]]] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1273 |
((sel := con selector) == #timerInterrupt |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1274 |
or:[sel == #ioInterrupt]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1275 |
enteredByInterrupt := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1276 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1277 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1278 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1279 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1280 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1281 |
ObjectMemory flushInlineCaches. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1282 |
|
1456 | 1283 |
DebuggingDebugger == true ifTrue:[ |
1284 |
enteredByInterrupt printCR. |
|
1285 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1286 |
enteredByInterrupt ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1287 |
"/ dont want to step through all intermediate |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1288 |
"/ (scheduler-) contexts; place a return-trap on the |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1289 |
"/ one right below the interesting one |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1290 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1291 |
"/ 'special unwind return' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1292 |
con unwindThenDo:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1293 |
Processor activeProcess stepInterruptHandler:self. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1294 |
ObjectMemory stepInterruptHandler:self. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1295 |
InStepInterrupt := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1296 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1297 |
InterruptPending := 1]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1298 |
] ifFalse:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1299 |
"/ 'normal step return' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1300 |
skipLineNr ~~ #return ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1301 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1302 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1303 |
] ifFalse:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1304 |
"/ 'step for return' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1305 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1306 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1307 |
InStepInterrupt := nil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1308 |
] |
73 | 1309 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1310 |
OpenDebuggers notNil ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1311 |
OpenDebuggers remove:self ifAbsent:[]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1312 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1313 |
self cacheMyself. |
73 | 1314 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1315 |
|
1364 | 1316 |
"Modified: / 17.4.1997 / 13:01:32 / stefan" |
1317 |
"Created: / 30.10.1997 / 21:08:18 / cg" |
|
1926
3fbf7b616bcd
changed an errorPrint into an infoPrint
Claus Gittinger <cg@exept.de>
parents:
1917
diff
changeset
|
1318 |
"Modified: / 13.10.1998 / 19:56:59 / ps" |
3447 | 1319 |
"Modified: / 18.11.2001 / 00:48:47 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1320 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1321 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1322 |
exit_abort |
5455 | 1323 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
1324 |
"/ that one would run on top of this context. |
|
1325 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1326 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1327 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
1328 |
"/ done in the #enter:select method. |
|
1329 |
"/ You are not expected to understand this. |
|
1330 |
||
6487 | 1331 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
1332 |
! |
|
1333 |
||
1334 |
exit_abortAll |
|
1335 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1336 |
"/ that one would run on top of this context. |
|
1337 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1338 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1339 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
1340 |
"/ done in the #enter:select method. |
|
1341 |
"/ You are not expected to understand this. |
|
1342 |
||
1343 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1344 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1345 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1346 |
exit_quickTerminate |
3447 | 1347 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1348 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1349 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1350 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 1351 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1352 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1353 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1354 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1355 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1356 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1357 |
selectedContext notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1358 |
con := selectedContext. |
3447 | 1359 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1360 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1361 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1362 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1363 |
Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1364 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
4816 | 1365 |
ex description infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1366 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1367 |
] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1368 |
con unwindAndRestart. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1369 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1370 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1371 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1372 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1373 |
"Created: / 16.11.2001 / 17:23:17 / cg" |
3447 | 1374 |
"Modified: / 17.11.2001 / 23:37:09 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1375 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1376 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1377 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1378 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1379 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1380 |
selectedContext notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1381 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1382 |
if there is a selection in the codeView, |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1383 |
evaluate it and use the result as return value |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1384 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1385 |
"/ disabled for now, there is almost always a selection (the current line) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1386 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1387 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1388 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1389 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1390 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1391 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1392 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1393 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1394 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1395 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1396 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1397 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1398 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1399 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1400 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1401 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1402 |
con := selectedContext. |
3447 | 1403 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1404 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1405 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1406 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1407 |
Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1408 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
4816 | 1409 |
ex description infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1410 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1411 |
] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1412 |
con unwind:retVal. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1413 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1414 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1415 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1416 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1417 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 1418 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1419 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1420 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1421 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1422 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1423 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1424 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1425 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1426 |
Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1427 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
4816 | 1428 |
ex description infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1429 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1430 |
] do:[ |
3447 | 1431 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1432 |
Processor activeProcess terminate. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1433 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1434 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1435 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1436 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 1437 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
1438 |
! |
|
1439 |
||
6487 | 1440 |
exit_unwindThenDo:aBlock |
1441 |
|con| |
|
1442 |
||
1443 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1444 |
"/ that one would run on top of this context. |
|
1445 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1446 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1447 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
1448 |
"/ done in the #enter:select method. |
|
1449 |
"/ You are not expected to understand this. |
|
1450 |
||
1451 |
" |
|
1452 |
have to catch errors occuring in unwind-blocks |
|
1453 |
" |
|
1454 |
self cacheMyself. |
|
1455 |
||
1456 |
Error handle:[:ex | |
|
1457 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1458 |
ex description infoPrintCR. |
|
1459 |
||
1460 |
ex proceed |
|
1461 |
] do:[ |
|
1462 |
"/ find the enter:select context. |
|
1463 |
con := thisContext sender. |
|
1464 |
[ |
|
1465 |
(con selector == #enter:select:) |
|
1466 |
and:[con receiver == self] |
|
1467 |
] |
|
1468 |
whileFalse:[ con := con sender ]. |
|
1469 |
||
1470 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
1471 |
con sender receiver == self class ifTrue:[ |
|
1472 |
con := con sender. |
|
1473 |
con sender receiver == self class ifTrue:[ |
|
1474 |
con := con sender. |
|
1475 |
con isBlockContext ifTrue:[ |
|
1476 |
con := con methodHome. |
|
1477 |
] |
|
1478 |
]. |
|
1479 |
]. |
|
1480 |
||
1481 |
con unwindThenDo:aBlock. |
|
1482 |
]. |
|
1483 |
'DebugView [warning]: abort failed' errorPrintCR |
|
1484 |
||
1485 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
1486 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
1487 |
! |
|
1488 |
||
3447 | 1489 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
1490 |
|selection con1 con2 h| |
|
1491 |
||
1492 |
initialSelectionOrNil notNil ifTrue:[ |
|
1493 |
^ initialSelectionOrNil |
|
1494 |
]. |
|
1495 |
||
1496 |
" |
|
1497 |
and find the one context to show initially |
|
1498 |
- if we came here by a send (single step), its the top context; |
|
1499 |
- if we came here by a step (i.e. bigStep), its the top context |
|
1500 |
(for ifs and whiles) or the sender (for regular sends). |
|
1501 |
- otherwise, we came here by some signal raise, and we are interested |
|
1502 |
in the context where the raise actually occured. |
|
1503 |
" |
|
1504 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
1505 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
1506 |
||
1507 |
exitAction == #step ifTrue:[ |
|
1508 |
selection := 1. |
|
1509 |
steppedContext notNil ifTrue:[ |
|
1510 |
||
1511 |
" |
|
1512 |
if we came here by a big-step, show the method where we are |
|
1513 |
" |
|
1514 |
con1 == steppedContext ifTrue:[ |
|
1515 |
selection := 1 |
|
1516 |
] ifFalse:[ |
|
1517 |
con2 == steppedContext ifTrue:[ |
|
1518 |
selection := 2 |
|
1519 |
] |
|
1520 |
]. |
|
1521 |
" |
|
1522 |
for bigStep, we could also be in a block below the actual method ... |
|
1523 |
" |
|
1524 |
((h := con1 home) notNil |
|
1525 |
and:[h == steppedContext]) ifTrue:[ |
|
1526 |
selection := 1 |
|
1527 |
] ifFalse:[ |
|
1528 |
(con2 notNil |
|
1529 |
and:[(h := con2 home) notNil |
|
1530 |
and:[h == steppedContext]]) ifTrue:[ |
|
1531 |
selection := 2 |
|
1532 |
] |
|
1533 |
]. |
|
1534 |
h := nil. |
|
1535 |
] |
|
1536 |
] ifFalse:[ |
|
1537 |
steppedContext isNil ifTrue:[ |
|
1538 |
" |
|
1539 |
preselect a more interesting context, (where halt/raise was ...) |
|
1540 |
" |
|
1541 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
1542 |
selection := self class interestingContextIndexIn:contextArray. |
|
1543 |
selection := selection min:(contextArray size). |
|
1544 |
] ifFalse:[ |
|
1545 |
" |
|
1546 |
if we came here by a big-step, show the method where we are |
|
1547 |
" |
|
1548 |
con1 == steppedContext ifTrue:[ |
|
1549 |
selection := 1 |
|
1550 |
] ifFalse:[ |
|
1551 |
con2 == steppedContext ifTrue:[ |
|
1552 |
selection := 2. |
|
1553 |
] |
|
1554 |
] |
|
1555 |
] |
|
1556 |
]. |
|
1557 |
^ selection |
|
1558 |
||
1559 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
1560 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 1561 |
! |
1562 |
||
5110 | 1563 |
isInspecting |
1564 |
^ inspecting |
|
1565 |
! |
|
1566 |
||
1567 |
isNotInspecting |
|
1568 |
^ inspecting not |
|
1569 |
! |
|
1570 |
||
73 | 1571 |
openOn:aProcess |
1572 |
"enter the debugger on a process - |
|
1573 |
in this case, we are just inspecting the context chain of the process, |
|
1574 |
not running on top of the debugged process, but as a separate |
|
1575 |
one. (think of it as an inspector showing more detail, and offering |
|
1576 |
some more control operations)" |
|
1577 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1578 |
|bpanel dummy w| |
73 | 1579 |
|
939 | 1580 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
1581 |
||
73 | 1582 |
busy := true. |
1583 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1584 |
stepHow := nil. |
73 | 1585 |
inspecting := true. |
1586 |
inspectedProcess := aProcess. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1587 |
nChainShown := InitialNCHAINShown. |
73 | 1588 |
|
1589 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1590 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1591 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1592 |
"/ get the max size & freeze button |
5451 | 1593 |
continueButton label:(resources at:'Continue'). |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1594 |
w := continueButton preferredExtent x. |
5451 | 1595 |
continueButton label:(resources at:'Stop'). |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1596 |
w := w max:(continueButton preferredExtent x). |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1597 |
continueButton preferredExtent:(w @ continueButton preferredExtent y). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1598 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1599 |
aProcess state == #run ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1600 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1601 |
continueButton foregroundColor:Color red darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1602 |
]. |
5451 | 1603 |
continueButton label:(resources at:'Stop'). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1604 |
continueButton action:[self doStop]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1605 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1606 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1607 |
continueButton foregroundColor:Color green darkened darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1608 |
]. |
5451 | 1609 |
continueButton label:(resources at:'Continue'). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1610 |
continueButton action:[self doContinue]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1611 |
]. |
5451 | 1612 |
continueButton preferredExtent:(w @ continueButton preferredExtent y). |
73 | 1613 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1614 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1615 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1616 |
|
92 | 1617 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 1618 |
dummy borderWidth:0; level:0. |
61 | 1619 |
|
73 | 1620 |
"/ stepButton destroy. |
1621 |
"/ sendButton destroy. |
|
1622 |
||
1623 |
updateButton := Button |
|
5450 | 1624 |
label:(resources at:'Update') |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1625 |
action:[self updateContext] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1626 |
in:bpanel. |
73 | 1627 |
monitorToggle := Toggle in:bpanel. |
5450 | 1628 |
monitorToggle label:(resources at:'Monitor'). |
73 | 1629 |
monitorToggle pressAction:[self autoUpdateOn]. |
1630 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
1631 |
||
1632 |
"can only look into process - context chain is not active" |
|
1633 |
canContinue := true. |
|
1634 |
||
1635 |
terminateButton enable. |
|
1636 |
abortButton enable. |
|
1637 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1638 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1639 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1640 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1641 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1642 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 1643 |
|
1644 |
aProcess isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1645 |
terminateButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1646 |
abortButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1647 |
continueButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1648 |
returnButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1649 |
restartButton disable. |
73 | 1650 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1651 |
(aProcess suspendedContext isNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1652 |
or:[aProcess isSystemProcess]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1653 |
terminateButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1654 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1655 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1656 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1657 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1658 |
catchBlock := [ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1659 |
catchBlock := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1660 |
contextArray := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1661 |
selectedContext := actualContext := firstContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1662 |
steppedContext := wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1663 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1664 |
(exitAction == #terminate) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1665 |
aProcess terminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1666 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1667 |
(exitAction == #quickTerminate) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1668 |
aProcess terminateNoSignal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1669 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1670 |
super destroy |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1671 |
]. |
73 | 1672 |
]. |
1673 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1674 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1675 |
"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
|
1676 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1677 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1678 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1679 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 1680 |
|selection| |
1681 |
||
1682 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1683 |
selection notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1684 |
self showSelection:selection. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1685 |
contextView setSelection:selection. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1686 |
selection > 1 ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1687 |
contextView scrollToLine:(selection - 1) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1688 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1689 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1690 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1691 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 1692 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1693 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1694 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1695 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1696 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1697 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1698 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1699 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1700 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1701 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1702 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1703 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1704 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1705 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 1706 |
! ! |
1707 |
||
1708 |
!DebugView methodsFor:'help'! |
|
1709 |
||
3510 | 1710 |
flyByHelpTextFor:aComponent |
1711 |
|s| |
|
1712 |
||
1713 |
aComponent == abortButton ifTrue:[ |
|
1714 |
s := 'Abort (Unwind to EventLoop)' |
|
1715 |
]. |
|
1716 |
aComponent == terminateButton ifTrue:[ |
|
1717 |
s := 'Terminate Process (Close View)' |
|
1718 |
]. |
|
1719 |
aComponent == continueButton ifTrue:[ |
|
1720 |
continueButton label = (resources string:'stop') ifTrue:[ |
|
1721 |
s := 'Stop' |
|
1722 |
] ifFalse:[ |
|
1723 |
s := 'Continue Execution' |
|
1724 |
] |
|
1725 |
]. |
|
1726 |
aComponent == stepButton ifTrue:[ |
|
1727 |
s := 'Step to Next Send' |
|
1728 |
]. |
|
1729 |
aComponent == nextButton ifTrue:[ |
|
1730 |
s := 'Step to Next Line' |
|
1731 |
]. |
|
1732 |
aComponent == nextOverButton ifTrue:[ |
|
1733 |
s := 'Step Over' |
|
1734 |
]. |
|
1735 |
aComponent == nextOutButton ifTrue:[ |
|
1736 |
s := 'Step Out' |
|
1737 |
]. |
|
1738 |
aComponent == sendButton ifTrue:[ |
|
1739 |
s := 'Send Next Message' |
|
1740 |
]. |
|
1741 |
aComponent == returnButton ifTrue:[ |
|
1742 |
s := 'Return from selected Method' |
|
1743 |
]. |
|
1744 |
aComponent == restartButton ifTrue:[ |
|
1745 |
s := 'Restart selected Method' |
|
1746 |
]. |
|
1747 |
aComponent == monitorToggle ifTrue:[ |
|
1748 |
s := 'Toggle Monitoring' |
|
1749 |
]. |
|
1750 |
aComponent == updateButton ifTrue:[ |
|
1751 |
s := 'Update' |
|
1752 |
]. |
|
1753 |
s notNil ifTrue:[ |
|
1754 |
^ resources string:s |
|
1755 |
]. |
|
1756 |
^ nil |
|
1757 |
||
1758 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1759 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
|
1760 |
! |
|
1761 |
||
266 | 1762 |
helpTextFor:aComponent |
1763 |
|s| |
|
1764 |
||
1765 |
aComponent == abortButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1766 |
s := 'HELP_ABORT' |
266 | 1767 |
]. |
1768 |
aComponent == terminateButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1769 |
s := 'HELP_TERMINATE' |
266 | 1770 |
]. |
1771 |
aComponent == continueButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1772 |
continueButton label = (resources string:'stop') ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1773 |
s := 'HELP_STOP' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1774 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1775 |
s := 'HELP_CONTINUE' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1776 |
] |
266 | 1777 |
]. |
1778 |
aComponent == stepButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1779 |
s := 'HELP_STEP' |
266 | 1780 |
]. |
1781 |
aComponent == nextButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1782 |
s := 'HELP_NEXT' |
266 | 1783 |
]. |
1065 | 1784 |
aComponent == nextOverButton ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1785 |
s := 'HELP_NEXTOVER' |
1065 | 1786 |
]. |
1787 |
aComponent == nextOutButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1788 |
s := 'HELP_NEXTOUT' |
1065 | 1789 |
]. |
266 | 1790 |
aComponent == stepButton ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1791 |
s := 'HELP_STEP' |
266 | 1792 |
]. |
1793 |
aComponent == sendButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1794 |
s := 'HELP_SEND' |
266 | 1795 |
]. |
1796 |
aComponent == returnButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1797 |
s := 'HELP_RETURN' |
266 | 1798 |
]. |
1799 |
aComponent == restartButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1800 |
s := 'HELP_RESTART' |
266 | 1801 |
]. |
1802 |
aComponent == contextView ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1803 |
s := 'HELP_WALKBACK' |
266 | 1804 |
]. |
1805 |
aComponent == codeView ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1806 |
s := 'HELP_CODEVIEW' |
266 | 1807 |
]. |
1808 |
aComponent == monitorToggle ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1809 |
s := 'HELP_MONITOR' |
266 | 1810 |
]. |
1811 |
aComponent == updateButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1812 |
s := 'HELP_UPDATE' |
266 | 1813 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1814 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1815 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1816 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1817 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1818 |
s := 'HELP_REC_INSP' |
266 | 1819 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1820 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1821 |
s := 'HELP_CON_INSP' |
266 | 1822 |
]. |
1823 |
||
1824 |
s notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1825 |
^ resources string:s |
266 | 1826 |
]. |
1827 |
^ nil |
|
1828 |
||
1829 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 1830 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 1831 |
! ! |
1832 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
1833 |
!DebugView methodsFor:'initialization & release'! |
266 | 1834 |
|
1835 |
addToCurrentProject |
|
1836 |
"ignored here" |
|
1837 |
||
1838 |
^ self |
|
1839 |
! |
|
1840 |
||
2115 | 1841 |
destroy |
1842 |
"closing the debugger implies an abort or continue" |
|
1843 |
||
2404 | 1844 |
|m| |
1845 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
1846 |
self checkIfCodeIsReallyModified ifTrue:[ |
2115 | 1847 |
(self confirm:('Code modified - exit anyway ?')) |
1848 |
ifFalse:[ |
|
1849 |
^ self |
|
1850 |
] |
|
1851 |
]. |
|
1852 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
1853 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
1854 |
|
2404 | 1855 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 1856 |
inspecting ifFalse:[ |
1857 |
"I am running on top of a process, abort or continue it" |
|
1858 |
||
1859 |
windowGroup notNil ifTrue:[ |
|
1860 |
windowGroup setProcess:nil. |
|
1861 |
]. |
|
1862 |
self uncacheMyself. |
|
1863 |
||
1864 |
"/ |
|
1865 |
"/ catch invalid return; |
|
1866 |
"/ this happens, when my process has somehow died (quickterminate) |
|
1867 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
1868 |
"/ #destroy-window function. |
|
1869 |
"/ |
|
3124
540feceebffa
invalidReturnSignal -> cannotReturnSignal
Claus Gittinger <cg@exept.de>
parents:
3121
diff
changeset
|
1870 |
Context cannotReturnSignal handle:[:ex | |
2115 | 1871 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
1872 |
self uncacheMyself. |
|
1873 |
Debugger newDebugger. |
|
1874 |
ex return. |
|
1875 |
] do:[ |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1876 |
AbortOperationRequest isHandled ifTrue:[ |
2115 | 1877 |
self doAbort. |
1878 |
] ifFalse:[ |
|
1879 |
self doContinue |
|
1880 |
] |
|
1881 |
]. |
|
1882 |
"/ We don't reach this point normally |
|
1883 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
1884 |
Debugger newDebugger. |
|
1885 |
self uncacheMyself. |
|
1886 |
]. |
|
1887 |
||
2299 | 1888 |
Debugger newDebugger. |
2115 | 1889 |
"/ since I am going to be destroyed, remove me from the cache |
1890 |
self uncacheMyself. |
|
1891 |
super destroy. |
|
1892 |
||
1893 |
"Modified: / 10.7.1997 / 17:15:41 / stefan" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1894 |
"Modified: / 16.11.2001 / 17:38:15 / cg" |
2115 | 1895 |
! |
1896 |
||
266 | 1897 |
initialize |
3269 | 1898 |
|menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel oldLayout v| |
266 | 1899 |
|
1900 |
super initialize. |
|
1901 |
||
2340 | 1902 |
font := font onDevice:device. |
266 | 1903 |
|
937
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1904 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1905 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1906 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1907 |
|
266 | 1908 |
busy := false. |
1909 |
exclusive := false. |
|
1910 |
inspecting := false. |
|
1911 |
exitAction := nil. |
|
1912 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1913 |
stepHow := nil. |
266 | 1914 |
canContinue := false. |
1915 |
||
3269 | 1916 |
mH := 0. |
1917 |
||
3447 | 1918 |
menuPanel := MenuPanel in:self. |
1919 |
menuPanel verticalLayout:false. |
|
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
1920 |
menuPanel menu:(self class menuSpec). |
3447 | 1921 |
menuPanel receiver:self. |
1922 |
||
1923 |
mH := menuPanel preferredExtent y. |
|
1924 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
|
1925 |
||
3269 | 1926 |
oldLayout := true. |
3462 | 1927 |
"/ oldLayout := false. |
3269 | 1928 |
oldLayout ifTrue:[ |
1929 |
bpanel := HorizontalPanelView in:self. |
|
3447 | 1930 |
|
3269 | 1931 |
self initializeButtonsIn:bpanel. |
1932 |
||
1933 |
bH := bpanel preferredExtent y. |
|
1934 |
bpanel origin:(0.0 @ mH) |
|
1935 |
extent:(1.0 @ bH). |
|
1936 |
panel := VariableVerticalPanel |
|
1937 |
origin:(0.0 @ (mH + bH)) |
|
1938 |
corner:(1.0 @ 1.0) |
|
1939 |
in:self. |
|
1940 |
||
1941 |
v := self initializeContextListViewIn:panel. |
|
1942 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
1943 |
||
1944 |
codePanel := View in:panel. |
|
1945 |
v := self initializeCodeViewIn:codePanel. |
|
1946 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
1947 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
1948 |
||
1949 |
v := self initializeInspectorViewsIn:panel. |
|
1950 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
1951 |
||
1952 |
] ifFalse:[ |
|
1953 |
bpanel1 := HorizontalPanelView in:self. |
|
1954 |
self initializeButtons1In:bpanel1. |
|
1955 |
||
1956 |
bH1 := bpanel1 preferredExtent y. |
|
1957 |
bpanel1 origin:(0.0 @ mH) |
|
1958 |
extent:(1.0 @ bH1). |
|
1959 |
panel := VariableVerticalPanel |
|
1960 |
origin:(0.0 @ (mH + bH1)) |
|
1961 |
corner:(1.0 @ 1.0) |
|
1962 |
in:self. |
|
1963 |
||
1964 |
v := self initializeContextListViewIn:panel. |
|
1965 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
1966 |
||
1967 |
codePanel := View in:panel. |
|
1968 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
1969 |
self initializeButtons2In:bpanel2. |
|
1970 |
||
1971 |
bH2 := bpanel2 preferredExtent y. |
|
1972 |
bpanel2 origin:(0.0 @ 0.0) |
|
1973 |
extent:(1.0 @ bH2). |
|
1974 |
||
1975 |
v := self initializeCodeViewIn:codePanel. |
|
1976 |
v origin:(0.0 @ bH2) corner:(1.0 @ 1.0). |
|
1977 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
1978 |
||
1979 |
v := self initializeInspectorViewsIn:panel. |
|
1980 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
1981 |
]. |
|
1982 |
||
3387 | 1983 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
1984 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
|
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
1985 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
1986 |
|
3387 | 1987 |
|
3269 | 1988 |
" |
1989 |
Debugger newDebugger |
|
1990 |
" |
|
3447 | 1991 |
|
1992 |
"Modified: / 17.11.2001 / 20:50:24 / cg" |
|
3269 | 1993 |
! |
1994 |
||
3447 | 1995 |
initializeAbortButtonIn:bpanel |
3269 | 1996 |
abortButton := Button |
3447 | 1997 |
label:(resources at:'Abort') |
3269 | 1998 |
action:[ |
1999 |
abortButton turnOffWithoutRedraw. |
|
2000 |
self doAbort |
|
2001 |
] |
|
2002 |
in:bpanel. |
|
3447 | 2003 |
|
2004 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2005 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2006 |
! |
|
2007 |
||
2008 |
initializeButtons1In:bpanel |
|
2009 |
|separator| |
|
2010 |
||
2011 |
bpanel horizontalLayout:#leftMax. "was: #left. " |
|
2012 |
bpanel verticalLayout:#centerMax. |
|
2013 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2014 |
||
2015 |
self initializeAbortButtonIn:bpanel. |
|
2016 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
|
2017 |
"/ separator borderWidth:0; level:0. |
|
2018 |
||
2019 |
self initializeContinueButtonIn:bpanel. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2020 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2021 |
separator := View extent:(10 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2022 |
separator borderWidth:0; level:0. |
3269 | 2023 |
|
3447 | 2024 |
self initializeTerminateButtonIn:bpanel. |
2025 |
||
2026 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2027 |
separator borderWidth:0; level:0. |
|
2028 |
||
2029 |
self initializeDefineButtonIn:bpanel. |
|
4356 | 2030 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
2031 |
self initializeReportButtonIn:bpanel. |
|
2032 |
]. |
|
3447 | 2033 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2034 |
! |
2035 |
||
2036 |
initializeButtons2In:bpanel |
|
2037 |
|separator| |
|
2038 |
||
3447 | 2039 |
bpanel horizontalLayout:#leftMax. "was: #left. " |
3269 | 2040 |
bpanel verticalLayout:#centerMax. |
2041 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2042 |
||
3447 | 2043 |
self initializeNextButtonIn:bpanel. |
2044 |
self initializeStepButtonIn:bpanel. |
|
2045 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2046 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2047 |
"/ I disabled the stepIn / stepOut buttons - for now. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2048 |
"/ they do not work relyable with inlined blocks yet. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2049 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2050 |
|
3269 | 2051 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2052 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2053 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2054 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2055 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2056 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2057 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2058 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2059 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2060 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2061 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2062 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2063 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2064 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2065 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2066 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2067 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2068 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2069 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2070 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2071 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2072 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2073 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2074 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2075 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2076 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2077 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2078 |
|
3447 | 2079 |
self initializeSendButtonIn:bpanel. |
2080 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2081 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2082 |
separator borderWidth:0; level:0. |
3269 | 2083 |
|
3447 | 2084 |
self initializeReturnButtonIn:bpanel. |
2085 |
self initializeRestartButtonIn:bpanel. |
|
2086 |
||
2087 |
"Modified: / 17.11.2001 / 21:01:38 / cg" |
|
3269 | 2088 |
! |
2089 |
||
2090 |
initializeButtonsIn:bpanel |
|
2091 |
|separator| |
|
2092 |
||
2093 |
bpanel horizontalLayout:#left. |
|
2094 |
bpanel verticalLayout:#centerMax. |
|
2095 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2096 |
||
3447 | 2097 |
self initializeAbortButtonIn:bpanel. |
2098 |
||
3269 | 2099 |
separator := View extent:(10 @ 5) in:bpanel. |
2100 |
separator borderWidth:0; level:0. |
|
2101 |
||
3447 | 2102 |
self initializeContinueButtonIn:bpanel. |
3269 | 2103 |
|
2104 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2105 |
separator borderWidth:0; level:0. |
|
2106 |
||
3447 | 2107 |
self initializeReturnButtonIn:bpanel. |
2108 |
self initializeRestartButtonIn:bpanel. |
|
3269 | 2109 |
|
2110 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2111 |
separator borderWidth:0; level:0. |
|
2112 |
||
3447 | 2113 |
self initializeNextButtonIn:bpanel. |
2114 |
self initializeStepButtonIn:bpanel. |
|
2115 |
||
3269 | 2116 |
"/ cg: |
2117 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2118 |
"/ they do not work relyable with inlined blocks yet. |
|
2119 |
"/ |
|
2120 |
||
2121 |
||
2122 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
2123 |
"/ img isNil ifTrue:[ |
|
2124 |
"/ img := (resources at:'next') |
|
2125 |
"/ ]. |
|
2126 |
"/ nextButton := Button |
|
2127 |
"/ label:img |
|
2128 |
"/ action:[stepButton turnOff. self doNext] |
|
2129 |
"/ in:bpanel. |
|
2130 |
"/ |
|
2131 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
2132 |
"/ img isNil ifTrue:[ |
|
2133 |
"/ img := (resources at:'over') |
|
2134 |
"/ ]. |
|
2135 |
"/ nextOverButton := Button |
|
2136 |
"/ label:img |
|
2137 |
"/ action:[stepButton turnOff. self doNextOver] |
|
2138 |
"/ in:bpanel. |
|
2139 |
"/ |
|
2140 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
2141 |
"/ img isNil ifTrue:[ |
|
2142 |
"/ img := (resources at:'out') |
|
2143 |
"/ ]. |
|
2144 |
"/ nextOutButton := Button |
|
2145 |
"/ label:img |
|
2146 |
"/ action:[stepButton turnOff. self doNextOut] |
|
2147 |
"/ in:bpanel. |
|
2148 |
||
3447 | 2149 |
self initializeSendButtonIn:bpanel. |
2150 |
||
3187 | 2151 |
separator := View extent:(30 @ 5) in:bpanel. |
2152 |
separator borderWidth:0; level:0. |
|
3269 | 2153 |
|
3447 | 2154 |
self initializeTerminateButtonIn:bpanel. |
2155 |
||
3269 | 2156 |
separator := View extent:(30 @ 5) in:bpanel. |
2157 |
separator borderWidth:0; level:0. |
|
2158 |
||
3447 | 2159 |
self initializeDefineButtonIn:bpanel. |
4356 | 2160 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
2161 |
self initializeReportButtonIn:bpanel. |
|
2162 |
]. |
|
2163 |
||
3447 | 2164 |
|
2165 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
2166 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 2167 |
! |
2168 |
||
2169 |
initializeCodeViewIn:panel |
|
2170 |
|v| |
|
2171 |
||
2172 |
v := HVScrollableView |
|
2173 |
for:CodeView |
|
2174 |
miniScrollerH:true |
|
2175 |
miniScrollerV:false |
|
2176 |
in:panel. |
|
2177 |
||
2178 |
"/ v autoHideScrollBars:true. |
|
2179 |
codeView := v scrolledView. |
|
2180 |
||
2181 |
^ v |
|
2182 |
! |
|
2183 |
||
2184 |
initializeContextListViewIn:panel |
|
2185 |
|v| |
|
266 | 2186 |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2187 |
v := HVScrollableView |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2188 |
for:SelectionInListView |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2189 |
miniScrollerH:true |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2190 |
miniScrollerV:false |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2191 |
in:panel. |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2192 |
v autoHideHorizontalScrollBar:true. |
266 | 2193 |
|
2194 |
contextView := v scrolledView. |
|
2195 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 2196 |
contextView doubleClickAction:[:line | self browseImplementingClass]. |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
2197 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 2198 |
|
5453 | 2199 |
contextView middleButtonMenu:(self middleButtonMenu). |
2200 |
||
3269 | 2201 |
^ v |
2202 |
! |
|
2203 |
||
5453 | 2204 |
initializeContextViewsMiddleButtonMenu |
2205 |
<resource: #programMenu > |
|
2206 |
||
2207 |
contextView middleButtonMenu:(self middleButtonMenu). |
|
2208 |
! |
|
2209 |
||
3447 | 2210 |
initializeContinueButtonIn:bpanel |
2211 |
continueButton := Button |
|
2212 |
label:(resources at:'Continue') |
|
2213 |
action:[ |
|
2214 |
continueButton turnOffWithoutRedraw. |
|
2215 |
self doContinue |
|
2216 |
] |
|
2217 |
in:bpanel. |
|
2218 |
||
2219 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
2220 |
! |
|
2221 |
||
2222 |
initializeDefineButtonIn:bpanel |
|
2223 |
defineButton := Button |
|
2224 |
label:(resources at:'Define') |
|
2225 |
action:[ |
|
2226 |
defineButton turnOffWithoutRedraw. |
|
2227 |
self doDefine |
|
2228 |
] |
|
2229 |
in:bpanel. |
|
2230 |
defineButton beInvisible |
|
2231 |
||
2232 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
2233 |
! |
|
2234 |
||
3269 | 2235 |
initializeInspectorViewsIn:panel |
2236 |
|hpanel| |
|
266 | 2237 |
|
2238 |
hpanel := VariableHorizontalPanel in:panel. |
|
2239 |
||
2240 |
receiverInspector := InspectorView |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2241 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2242 |
in:hpanel. |
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2243 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 2244 |
|
2245 |
contextInspector := ContextInspectorView |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2246 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2247 |
in:hpanel. |
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2248 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2249 |
|
3269 | 2250 |
^ hpanel |
266 | 2251 |
! |
2252 |
||
3447 | 2253 |
initializeNextButtonIn:bpanel |
2254 |
nextButton := Button |
|
2255 |
label:(resources at:'Next') |
|
2256 |
action:[ |
|
2257 |
stepButton turnOff. |
|
2258 |
self doNext |
|
2259 |
] |
|
2260 |
in:bpanel. |
|
2261 |
||
2262 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
2263 |
! |
|
2264 |
||
4356 | 2265 |
initializeReportButtonIn:bpanel |
2266 |
reportButton := Button |
|
2267 |
label:(resources at:'Report by Mail') |
|
2268 |
action:[ |
|
2269 |
reportButton turnOffWithoutRedraw. |
|
2270 |
self doOpenReportMailApp. |
|
2271 |
] |
|
2272 |
in:bpanel. |
|
2273 |
||
2274 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
2275 |
! |
|
2276 |
||
3447 | 2277 |
initializeRestartButtonIn:bpanel |
2278 |
restartButton := Button |
|
2279 |
label:(resources at:'Restart') |
|
2280 |
action:[ |
|
2281 |
restartButton turnOff. |
|
2282 |
self doRestart |
|
2283 |
] |
|
2284 |
in:bpanel. |
|
2285 |
||
2286 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
2287 |
! |
|
2288 |
||
2289 |
initializeReturnButtonIn:bpanel |
|
2290 |
returnButton := Button |
|
2291 |
label:(resources at:'Return') |
|
2292 |
action:[ |
|
2293 |
returnButton turnOff. |
|
2294 |
self doReturn |
|
2295 |
] |
|
2296 |
in:bpanel. |
|
2297 |
||
2298 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
2299 |
! |
|
2300 |
||
2301 |
initializeSendButtonIn:bpanel |
|
2302 |
sendButton := Button |
|
2303 |
label:(resources at:'Send') |
|
2304 |
action:[ |
|
2305 |
sendButton turnOff. |
|
2306 |
self doSend |
|
2307 |
] |
|
2308 |
in:bpanel. |
|
2309 |
||
2310 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
2311 |
! |
|
2312 |
||
2313 |
initializeStepButtonIn:bpanel |
|
2314 |
stepButton := Button |
|
2315 |
label:(resources at:'Step') |
|
2316 |
action:[ |
|
2317 |
stepButton turnOff. |
|
2318 |
self doStep |
|
2319 |
] |
|
2320 |
in:bpanel. |
|
2321 |
||
2322 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
2323 |
! |
|
2324 |
||
2325 |
initializeTerminateButtonIn:bpanel |
|
2326 |
terminateButton := Button |
|
2327 |
label:(resources at:'Terminate') |
|
2328 |
action:[ |
|
2329 |
terminateButton turnOffWithoutRedraw. |
|
2330 |
self doTerminate |
|
2331 |
] |
|
2332 |
in:bpanel. |
|
2333 |
||
2334 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
266 | 2335 |
! |
2336 |
||
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2337 |
middleButtonMenu |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2338 |
<resource: #programMenu > |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2339 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2340 |
|items m| |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2341 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2342 |
exclusive ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2343 |
items := #( |
3694 | 2344 |
('Show Longer WalkBack' showMore ) |
2345 |
('Show Verbose WalkBack' showVerboseWalkback ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2346 |
('-' ) |
3511 | 2347 |
('Add Breakpoint' addBreakpoint ) |
2348 |
('Remove Breakpoint' removeBreakpoint ) |
|
2349 |
('Remove all Trace & Breakpoints' removeAllBreakpoints ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2350 |
('-' ) |
3694 | 2351 |
('Copy WalkBack Text' copyWalkbackText ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2352 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2353 |
('QuickTerminate' quickTerminate ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2354 |
('=' ) |
3694 | 2355 |
('Exit Smalltalk (no Confirmation)' exit ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2356 |
). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2357 |
] ifFalse:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2358 |
items := #( |
3694 | 2359 |
('Show Longer Walkback' showMore ) |
2360 |
('Show Verbose Walkback' showVerboseWalkback ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2361 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2362 |
('Skip' skip ) |
3694 | 2363 |
('Step Out' skipForReturn ) |
2364 |
('Skip until Entering...' skipUntilEntering ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2365 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2366 |
" |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2367 |
('Continue' doContinue ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2368 |
('Terminate' doTerminate ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2369 |
('Abort' doAbort ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2370 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2371 |
('Step' doStep ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2372 |
('Send' doSend ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2373 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2374 |
('Return' doReturn ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2375 |
('Restart' doRestart ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2376 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2377 |
" |
3511 | 2378 |
('Add Breakpoint' addBreakpoint ) |
2379 |
('Remove Breakpoint' removeBreakpoint ) |
|
2380 |
('Remove all Trace & Breakpoints' removeAllBreakpoints ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2381 |
). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2382 |
|
5798 | 2383 |
self allowBreakPointsInDebugger ifFalse:[ |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2384 |
items := items , #( |
5664 | 2385 |
('Allow Halt & Breakpoint in Debugger' doNotIgnoreBreakpoints ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2386 |
). |
5798 | 2387 |
] ifTrue:[ |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2388 |
items := items , #( |
5798 | 2389 |
('Ignore Halt & Breakpoints in Debugger' doIgnoreBreakpoints ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2390 |
). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2391 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2392 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2393 |
items := items , #( |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2394 |
('-' ) |
3694 | 2395 |
('Browse (Implementing Class)' browseImplementingClass ) |
2396 |
('Browse (Receivers Class)' browseReceiversClass ) |
|
2397 |
('Browse Class Hierarchy' browseClassHierarchy ) |
|
2398 |
('Browse Full Class Protocol' browseFullClassProtocol ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2399 |
('Implementors' browseImplementors ) |
3694 | 2400 |
('Implementors Of...' browseImplementorsOf ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2401 |
('Senders' browseSenders ) |
3694 | 2402 |
('Senders Of...' browseSendersOf ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2403 |
('-' ) |
3694 | 2404 |
('Inspect Context' inspectContext ) |
2405 |
('Copy WalkBack Text' copyWalkbackText ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2406 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2407 |
('QuickTerminate' quickTerminate ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2408 |
('=' ) |
3694 | 2409 |
('Exit Smalltalk (no Confirmation)' exit ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2410 |
). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2411 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2412 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2413 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2414 |
m := PopUpMenu |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2415 |
itemList:items |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2416 |
resources:resources |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2417 |
receiver:self |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2418 |
for:contextView. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2419 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2420 |
verboseBacktrace ifTrue:[ |
3694 | 2421 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2422 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2423 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2424 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2425 |
inspecting ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2426 |
m notNil ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2427 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2428 |
browseClassHierarchy browseFullClassProtocol |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2429 |
browseImplementors browseSenders inspectContext skip doStepOut). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2430 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2431 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2432 |
self updateMenuItems. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2433 |
|
3510 | 2434 |
^ m. |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2435 |
! |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2436 |
|
1249 | 2437 |
postRealize |
2438 |
super postRealize. |
|
266 | 2439 |
|
2440 |
inspecting ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2441 |
inspectedProcess notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2442 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2443 |
set prio somewhat higher (by 2, to allow walkBack-update process |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2444 |
to run between mine and the debugged processes prio) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2445 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2446 |
Processor activeProcess |
6464 | 2447 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2448 |
] |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2449 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2450 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2451 |
self sensor addEventListener:self. |
1249 | 2452 |
|
2453 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 2454 |
! |
2455 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2456 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2457 |
"/ redefined - since the debugView runs on top of |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2458 |
"/ the debuggee, there would be no event loop for me. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2459 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2460 |
drawableId notNil ifTrue:[ |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2461 |
^ self |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2462 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2463 |
"physically create the view & subviews" |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2464 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2465 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2466 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2467 |
|
266 | 2468 |
setLabelFor:aMessage in:aProcess |
2469 |
|l nm| |
|
2470 |
||
2471 |
l := aMessage , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2472 |
Error handle:[:ex | |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2473 |
l := l , '???' |
1030 | 2474 |
] do:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2475 |
nm := aProcess name. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2476 |
nm notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2477 |
l := l , (nm contractTo:17) , ''. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2478 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2479 |
l := l , '[' , aProcess id printString , ']'. |
73 | 2480 |
]. |
1030 | 2481 |
l := l , ')'. |
266 | 2482 |
self label:l. |
0 | 2483 |
! ! |
2484 |
||
2485 |
!DebugView methodsFor:'interrupt handling'! |
|
2486 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2487 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2488 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2489 |
'contextIRQ' printCR. |
2581 | 2490 |
thisContext sender fullPrint. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2491 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2492 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2493 |
|
1364 | 2494 |
"Modified: / 30.10.1997 / 21:22:25 / cg" |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2495 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2496 |
|
0 | 2497 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2498 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2499 |
'stepIRQ' printCR. |
2581 | 2500 |
thisContext sender fullPrint. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2501 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
2502 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2503 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2504 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
2505 |
"Modified: / 13.1.1998 / 21:14:11 / cg" |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2506 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2507 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2508 |
stepOrNext |
3055 | 2509 |
|where here con s isWrap method wrappedMethod |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2510 |
inBlock left ignore contextBelow lastWrappedContext |
3055 | 2511 |
leftWrap enteredWrap anyStepBlocks |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2512 |
oneMore initiallyShown inBlockBelow receiver| |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2513 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2514 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
2515 |
"/ DebuggingDebugger := false |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2516 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2517 |
skipLineNr == #return ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2518 |
name := Processor activeProcess nameOrId. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2519 |
self label:('stepping context returned ' , ' (process: ' , name , ')'). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2520 |
here := thisContext sender sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2521 |
here setLineNumber:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2522 |
here := nil. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2523 |
con := thisContext sender sender sender. |
3435 | 2524 |
|
2525 |
BreakPointInterrupt handle:[:ex | |
|
2526 |
'DebugView [info]: breakpoint in debugger ignored [stepOrNext]' infoPrintCR. |
|
2527 |
ex proceed |
|
2528 |
] do:[ |
|
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2529 |
self enter:con select:nil. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2530 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2531 |
con := nil. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2532 |
^ self |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2533 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2534 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2535 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2536 |
"/ "/ 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
|
2537 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2538 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2539 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2540 |
"/ 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
|
2541 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2542 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2543 |
|
52 | 2544 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2545 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2546 |
^ self |
52 | 2547 |
]. |
2548 |
||
29 | 2549 |
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
|
2550 |
here := here sender. "the caller; step- or contextIRQ" |
29 | 2551 |
here := here sender. "the interrupted context" |
2552 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2553 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2554 |
'*******' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2555 |
'here in ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2556 |
inWrap ifTrue:['(wrap) ' print.]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2557 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
3055 | 2558 |
here selector printCR. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2559 |
]. |
10 | 2560 |
|
2581 | 2561 |
"/ kludge an bug-workaround; |
2562 |
"/ I should not see those ... |
|
2563 |
||
2564 |
here selector == #ioInterrupt ifTrue:[ |
|
2565 |
DebuggingDebugger == true ifTrue:[ |
|
2566 |
'oops - should not get that one' printCR. |
|
2567 |
]. |
|
2568 |
Processor ioInterrupt. |
|
2569 |
StepInterruptPending := 1. |
|
2570 |
InterruptPending := 1. |
|
2571 |
where := nil. here := nil. |
|
2572 |
InStepInterrupt := nil. |
|
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2573 |
^ self |
2581 | 2574 |
]. |
2575 |
||
2576 |
stepUntilEntering notNil ifTrue:[ |
|
2577 |
DebuggingDebugger == true ifTrue:[ |
|
2578 |
'check if entering ' print. stepUntilEntering printCR. |
|
2579 |
]. |
|
2580 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
2581 |
DebuggingDebugger == true ifTrue:[ |
|
2582 |
'entering...' printCR. |
|
2583 |
]. |
|
2584 |
name := Processor activeProcess nameOrId. |
|
2585 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , name , ')'). |
|
2586 |
||
2587 |
lastStepUntilEntering := stepUntilEntering. |
|
2588 |
stepUntilEntering := nil. |
|
2589 |
self enter:here select:nil. |
|
2590 |
con := nil. |
|
2591 |
^ self |
|
2592 |
]. |
|
2593 |
"/ see if stepping context is still active ... |
|
2594 |
||
2595 |
con := here. |
|
2596 |
||
2597 |
DebuggingDebugger == true ifTrue:[ |
|
2598 |
'start searching at: ' print. |
|
2599 |
con fullPrint. |
|
2600 |
]. |
|
2601 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
2602 |
con := con sender |
|
2603 |
]. |
|
2604 |
con notNil ifTrue:[ |
|
2605 |
DebuggingDebugger == true ifTrue:[ |
|
2606 |
'steppingContext still active - continue stepping' printCR. |
|
2607 |
]. |
|
2608 |
con := nil. |
|
2609 |
where := nil. here := nil. |
|
2610 |
StepInterruptPending := 1. |
|
2611 |
InterruptPending := 1. |
|
2612 |
InStepInterrupt := nil. |
|
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2613 |
^ self |
2581 | 2614 |
]. |
2615 |
stepUntilEntering := nil. |
|
2616 |
]. |
|
2617 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2618 |
" |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2619 |
kludge to hide breakpoint wrappers in the context list: |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2620 |
check if we are in a wrapper methods hidden setup-sequence |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2621 |
if so, ignore the interrupt and continue single sending |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2622 |
" |
29 | 2623 |
isWrap := false. |
57 | 2624 |
left := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2625 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2626 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2627 |
where := here. |
57 | 2628 |
inWrap ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2629 |
wrappedMethod := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2630 |
5 timesRepeat:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2631 |
(where notNil and:[where isBlockContext not]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2632 |
method := where method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2633 |
(method notNil and:[method isWrapped]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2634 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2635 |
in a wrapper method |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2636 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2637 |
wrappedMethod ~~ method ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2638 |
wrappedMethod := method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2639 |
lastWrappedContext := where. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2640 |
where sender receiver == method originalMethod ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2641 |
isWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2642 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2643 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2644 |
where == steppedContext ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2645 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2646 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2647 |
'change stepCon from: ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2648 |
steppedContext print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2649 |
' to lastWrapped: ' print. |
3055 | 2650 |
lastWrappedContext printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2651 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2652 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2653 |
inWrap := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2654 |
leftWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2655 |
wrapperContext := steppedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2656 |
steppedContext := lastWrappedContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2657 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2658 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2659 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2660 |
where := where sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2661 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2662 |
]. |
29 | 2663 |
]. |
2664 |
||
2665 |
isWrap ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2666 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2667 |
'ignore wrap' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2668 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2669 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2670 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2671 |
"/ ignore, while in wrappers hidden setup |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2672 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2673 |
where := nil. here := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2674 |
ObjectMemory flushInlineCaches. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2675 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2676 |
skipLineNr == #return ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2677 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2678 |
'skipRet in wrap' printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2679 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2680 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2681 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2682 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2683 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2684 |
InStepInterrupt := nil. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2685 |
^ self |
29 | 2686 |
]. |
2687 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2688 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 2689 |
|
2581 | 2690 |
DebuggingDebugger == true ifTrue:[ |
2691 |
'bigStep is: ' print. bigStep printCR. |
|
2692 |
'steppedContext is: ' print. steppedContext printCR. |
|
2693 |
]. |
|
2694 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2695 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2696 |
"/ 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
|
2697 |
"/ |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
2698 |
(bigStep |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
2699 |
and:[steppedContext notNil]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2700 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2701 |
a step or next - ignore all contexts below the interesting one |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2702 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2703 |
where := here. "the interrupted context" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2704 |
contextBelow := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2705 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2706 |
where home notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2707 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2708 |
"/ in a block called by 'our' context ? |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2709 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2710 |
where home == steppedContext ifTrue:[ |
3055 | 2711 |
"/ '*block*' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2712 |
inBlock := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2713 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2714 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2715 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2716 |
where == steppedContext ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2717 |
where := where sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2718 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2719 |
where notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2720 |
where home == steppedContext ifTrue:[ |
3055 | 2721 |
"/ '*block*' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2722 |
inBlock := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2723 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2724 |
]. |
57 | 2725 |
|
2726 |
"/ 'looking for ' print. |
|
3055 | 2727 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 2728 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2729 |
"/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
|
2730 |
"/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
|
2731 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2732 |
where == steppedContext ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2733 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2734 |
"/ check if we are in a context below steppedContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2735 |
"/ (i.e. if steppedContext can be reached from |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2736 |
"/ interrupted context. Not using context-ref but its |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2737 |
"/ address to avoid creation of many useless contexts.) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2738 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2739 |
inBlock ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2740 |
[where notNil] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2741 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2742 |
"/ if either the receiver or any arg of this context |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2743 |
"/ is a block of the steppedContext, we must really |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2744 |
"/ do a single step. Otherwise, stepping through a |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2745 |
"/ do:-loop would be very difficult. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2746 |
receiver := where receiver. |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2747 |
(receiver isBlock |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2748 |
and:[(receiver isKindOf:Block) |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2749 |
and:[receiver home == steppedContext]]) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2750 |
ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2751 |
anyStepBlocks := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2752 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2753 |
where args do:[:arg | |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2754 |
(arg isBlock |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2755 |
and:[(arg isKindOf:Block) |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2756 |
and:[arg home == steppedContext]]) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2757 |
ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2758 |
anyStepBlocks := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2759 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2760 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2761 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2762 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2763 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2764 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
3055 | 2765 |
where selector printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2766 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2767 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2768 |
where == steppedContext ifTrue:[ |
3055 | 2769 |
"/ 'found it - below; ignore' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2770 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2771 |
found the interesting context somwehere up in the |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2772 |
chain. We seem to be still below the interesting one ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2773 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2774 |
tracing == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2775 |
here printString printCR |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2776 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2777 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2778 |
yes, a context below |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2779 |
- continue and schedule another stepInterrupt. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2780 |
Must flush caches since optimized methods not always |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2781 |
look for pending interrupts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2782 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2783 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2784 |
contextBelow notNil ifTrue:[ |
3055 | 2785 |
"/ 'prepare for unwind-catch' printCR. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2786 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2787 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2788 |
"/ self label:'single stepping - please wait ...(' , contextBelow selector , ')'. |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2789 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2790 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2791 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2792 |
'below stepCon; continue until unwind of: ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2793 |
contextBelow printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2794 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2795 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2796 |
StepInterruptPending := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2797 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2798 |
ObjectMemory flushInlineCaches. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2799 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2800 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2801 |
"/ self label:'single stepping - please wait ...(' , here selector , ')'. |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2802 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2803 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2804 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2805 |
'in stepCon; continue single stepping' printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2806 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2807 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2808 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2809 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2810 |
where := nil. here := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2811 |
InStepInterrupt := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2812 |
|
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2813 |
^ self |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2814 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2815 |
|
1537 | 2816 |
(steppedContext notNil and:[ |
2817 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2818 |
inBlockBelow := true. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2819 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2820 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2821 |
anyStepBlocks ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2822 |
inBlock ifFalse:[ |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2823 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2824 |
"/ which does not honor interrupt-on-return of block contexts |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2825 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2826 |
where isBlockContext ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2827 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2828 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2829 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2830 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2831 |
where := where sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2832 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2833 |
s := 'context returned'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2834 |
left := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2835 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2836 |
] ifTrue:[ |
3055 | 2837 |
"/ 'found it right in sender' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2838 |
s := 'after step' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2839 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2840 |
] ifTrue:[ |
3055 | 2841 |
"/ 'found it right away' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2842 |
s := 'after step' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2843 |
]. |
0 | 2844 |
] ifFalse:[ |
3055 | 2845 |
"/ ' send' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2846 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2847 |
a send |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2848 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2849 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2850 |
'clear steppedContext' printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2851 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2852 |
steppedContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2853 |
s := 'after send' |
0 | 2854 |
]. |
7 | 2855 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2856 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2857 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2858 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2859 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2860 |
|
790 | 2861 |
"/ handle the case, when a subBlock leaves; |
2862 |
"/ continue stepping in the home context. |
|
2863 |
||
2864 |
left ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2865 |
steppedContext home notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2866 |
steppedContext := steppedContext home. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2867 |
s := 'after step'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2868 |
left := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
2869 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
2870 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2871 |
] |
790 | 2872 |
]. |
2873 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2874 |
" |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2875 |
kludge to hide breakpoint wrappers in the context list: |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2876 |
check if we are in a wrapper methods hidden exit-sequence |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2877 |
if so, ignore the interrupt and continue single sending |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2878 |
" |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2879 |
(where isNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2880 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2881 |
ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2882 |
"/ did not find our steppedContext along the chain; |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2883 |
"/ could be in a wrappedMethods exitBlock ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2884 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2885 |
leftWrap ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2886 |
where := here. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2887 |
wrappedMethod := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2888 |
5 timesRepeat:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2889 |
where notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2890 |
where isBlockContext ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2891 |
method := where method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2892 |
(method notNil and:[method isWrapped]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2893 |
where == wrapperContext ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2894 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2895 |
'change stepCon fromWrapped: ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2896 |
steppedContext print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2897 |
' to: ' print. |
3055 | 2898 |
wrapperContext printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2899 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2900 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2901 |
inWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2902 |
enteredWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2903 |
steppedContext := wrapperContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2904 |
wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2905 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2906 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2907 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2908 |
where := where sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2909 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2910 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2911 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2912 |
enteredWrap ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2913 |
ignore := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2914 |
] |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2915 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2916 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2917 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2918 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2919 |
left ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2920 |
"/ special care for stepInterrupt in send, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2921 |
"/ when created a dummy context (lineNr == 1) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2922 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2923 |
steppedContext lineNumber isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2924 |
steppedContext selector == here sender selector ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2925 |
left := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2926 |
s := 'after step'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2927 |
steppedContext := here sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2928 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2929 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2930 |
oneMore := true |
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2931 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2932 |
|
57 | 2933 |
inBlock ifTrue:[ |
3055 | 2934 |
"/ 'inBlock' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2935 |
s := 'in block'. |
57 | 2936 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2937 |
inBlockBelow ifTrue:[ |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2938 |
ignore := true |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2939 |
]. |
57 | 2940 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2941 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2942 |
where notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2943 |
'(' print. steppedContextLineno print. ') ' print. |
3055 | 2944 |
where printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2945 |
]. |
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
2946 |
]. |
57 | 2947 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2948 |
ignore ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2949 |
(bigStep |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2950 |
and:[steppedContextLineno notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2951 |
and:[where notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2952 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2953 |
(here isBlockContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2954 |
and:[(here methodHome == steppedContext) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2955 |
or:[here home == steppedContext]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2956 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2957 |
'same line but in block' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2958 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2959 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2960 |
steppedContext := actualContext := here. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2961 |
steppedContextLineno := here lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2962 |
] ifFalse:[ |
3063 | 2963 |
"/ kludge - I only have the info for up to 255 lines |
2964 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
2965 |
DebuggingDebugger == true ifTrue:[ |
|
2966 |
'same line - ignored' printCR. |
|
2967 |
]. |
|
2968 |
ignore := true |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2969 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2970 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2971 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2972 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2973 |
(left not |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2974 |
and:[skipLineNr notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2975 |
and:[where notNil |
1764
e7aa6f50e766
care for nil-linenumber in stepOrNext.
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2976 |
and:[where lineNumber notNil |
e7aa6f50e766
care for nil-linenumber in stepOrNext.
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2977 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2978 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2979 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2980 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2981 |
ignore := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2982 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2983 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2984 |
(steppedContextLineno isNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2985 |
and:[skipLineNr isNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2986 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2987 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2988 |
'same line2 (after conIRQ) - ignored' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2989 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2990 |
ignore := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2991 |
]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2992 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2993 |
|
57 | 2994 |
ignore ifTrue:[ |
3055 | 2995 |
"/' ' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2996 |
where := nil. here := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2997 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2998 |
yes, a context below |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2999 |
- continue and schedule another stepInterrupt. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3000 |
Must flush caches since optimized methods not always |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3001 |
look for pending interrupts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3002 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3003 |
ObjectMemory flushInlineCaches. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3004 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3005 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3006 |
InStepInterrupt := nil. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3007 |
^ self |
57 | 3008 |
]. |
3009 |
||
3055 | 3010 |
"/ ' ' printCR. |
57 | 3011 |
|
29 | 3012 |
name := Processor activeProcess nameOrId. |
7 | 3013 |
self label:(s , ' (process: ' , name , ')'). |
3014 |
||
57 | 3015 |
tracing := false. |
3016 |
bigStep := false. |
|
3017 |
||
0 | 3018 |
"release refs to context" |
3019 |
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
|
3020 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3021 |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3022 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3023 |
'==> enter on: ' print. thisContext sender sender printCR. |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3024 |
]. |
1364 | 3025 |
|
3026 |
initiallyShown := nil. |
|
3027 |
(oneMore == true) ifTrue:[ |
|
1871
971fe3afd573
care for nil lineNumber in context (how can this happen ?)
Claus Gittinger <cg@exept.de>
parents:
1824
diff
changeset
|
3028 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3029 |
initiallyShown := 2 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3030 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3031 |
initiallyShown := 1 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3032 |
] |
1364 | 3033 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3034 |
con := thisContext sender sender. |
3435 | 3035 |
|
3036 |
BreakPointInterrupt handle:[:ex | |
|
3447 | 3037 |
'DebugView [info]: breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
3435 | 3038 |
ex proceed |
3039 |
] do:[ |
|
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3040 |
self enter:con select:initiallyShown |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3041 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3042 |
con := nil |
1364 | 3043 |
|
3044 |
"Created: / 14.10.1996 / 12:53:39 / cg" |
|
3447 | 3045 |
"Modified: / 18.11.2001 / 01:00:55 / cg" |
0 | 3046 |
! ! |
3047 |
||
4867 | 3048 |
!DebugView methodsFor:'menu & button actions'! |
266 | 3049 |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3050 |
addBreakpoint |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3051 |
"add a breakpoint on the selected contexts method - if any" |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3052 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3053 |
|implementorClass method| |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3054 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3055 |
selectedContext isNil ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3056 |
^ self showError:'** select a context first **' |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3057 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3058 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3059 |
^ self |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3060 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3061 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3062 |
implementorClass := selectedContext methodClass. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3063 |
implementorClass notNil ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3064 |
method := implementorClass compiledMethodAt:selectedContext selector. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3065 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3066 |
method setBreakPoint |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3067 |
] |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3068 |
]. |
3511 | 3069 |
contextView middleButtonMenu disable:#addBreakpoint. |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3070 |
contextView middleButtonMenu enable:#removeBreakpoint. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3071 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3072 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3073 |
! |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3074 |
|
5875 | 3075 |
addBrowserBookmark |
3076 |
"add a browser-bookmark for the selected contexts method" |
|
3077 |
||
3078 |
|cls sel| |
|
3079 |
||
3080 |
selectedContext isNil ifTrue:[^ self]. |
|
3081 |
||
3082 |
cls := selectedContext receiver class. |
|
3083 |
sel := selectedContext selector. |
|
3084 |
(cls includesSelector:sel) ifFalse:[ |
|
3085 |
sel := nil |
|
3086 |
]. |
|
3087 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
3088 |
! |
|
3089 |
||
3511 | 3090 |
allowBreakPointsInDebugger |
3091 |
^ ignoreBreakpoints not |
|
3092 |
! |
|
3093 |
||
3094 |
allowBreakPointsInDebugger:aBoolean |
|
3095 |
ignoreBreakpoints := aBoolean not. |
|
5798 | 3096 |
self initializeMiddleButtonMenu. |
3097 |
self initializeContextViewsMiddleButtonMenu. |
|
3511 | 3098 |
! |
3099 |
||
266 | 3100 |
autoUpdateOff |
3101 |
"stop the update process" |
|
3102 |
||
3103 |
updateProcess notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3104 |
monitorToggle lampColor:(Color yellow). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3105 |
updateProcess terminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3106 |
updateProcess := nil |
266 | 3107 |
] |
3108 |
! |
|
3109 |
||
3110 |
autoUpdateOn |
|
3111 |
"fork a subprocess which updates the contextList in regular intervals" |
|
3112 |
||
3113 |
updateProcess isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3114 |
updateProcess := |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3115 |
[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3116 |
[true] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3117 |
monitorToggle showLamp ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3118 |
monitorToggle lampColor:(Color yellow). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3119 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3120 |
monitorToggle activeForegroundColor:Color black. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3121 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3122 |
(Delay forSeconds:0.25) wait. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3123 |
self updateContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3124 |
monitorToggle showLamp ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3125 |
monitorToggle lampColor:(Color red). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3126 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3127 |
monitorToggle activeForegroundColor:Color red. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3128 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3129 |
(Delay forSeconds:0.25) wait. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3130 |
self updateContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3131 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3132 |
] forkAt:(Processor activePriority - 1) |
266 | 3133 |
] |
3134 |
||
3135 |
! |
|
3136 |
||
3269 | 3137 |
browseClass |
3138 |
"browse the reveivers class (of the selected contexts message)" |
|
3139 |
||
3140 |
|cls sel| |
|
3141 |
||
3142 |
selectedContext isNil ifTrue:[^ self]. |
|
3143 |
||
3144 |
cls := selectedContext receiver class. |
|
3145 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3146 |
(cls includesSelector:sel) ifFalse:[ |
3269 | 3147 |
sel := nil |
3148 |
]. |
|
3149 |
cls browserClass openInClass:cls selector:sel. |
|
3150 |
||
3151 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3152 |
! |
|
3153 |
||
3154 |
browseClassHierarchy |
|
3155 |
"browse the reveivers classHierarchy (of the selected contexts message)" |
|
3156 |
||
3157 |
|cls mthd| |
|
3158 |
||
3159 |
selectedContext isNil ifTrue:[^ self]. |
|
3160 |
||
3161 |
mthd := selectedContext method. |
|
3447 | 3162 |
mthd notNil ifTrue:[ |
3163 |
cls := mthd containingClass. |
|
3164 |
"/ still nil if unbound - then use receivers class |
|
3165 |
]. |
|
3166 |
cls isNil ifTrue:[ |
|
3269 | 3167 |
cls := selectedContext receiver class |
3168 |
]. |
|
3169 |
cls browserClass browseClassHierarchy:cls. |
|
3170 |
||
3447 | 3171 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 3172 |
! |
3173 |
||
3174 |
browseFullClassProtocol |
|
3175 |
"browse the reveivers full protocol (of the selected contexts message)" |
|
3176 |
||
3177 |
|cls mthd| |
|
3178 |
||
3179 |
selectedContext isNil ifTrue:[^ self]. |
|
3180 |
||
3181 |
mthd := selectedContext method. |
|
3447 | 3182 |
mthd notNil ifTrue:[ |
3183 |
cls := mthd containingClass. |
|
3184 |
"/ still nil if unbound - then use receivers class |
|
3185 |
]. |
|
3186 |
cls isNil ifTrue:[ |
|
3269 | 3187 |
cls := selectedContext receiver class |
3188 |
]. |
|
3189 |
cls browserClass browseFullClassProtocol:cls. |
|
3190 |
||
3447 | 3191 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 3192 |
! |
3193 |
||
3194 |
browseImplementingClass |
|
3195 |
"browse the implementing class (of the selected contexts message)" |
|
3196 |
||
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
3197 |
|mthd who sel cls| |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3198 |
|
1452 | 3199 |
selectedContext isNil ifTrue:[^ self]. |
3200 |
||
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3201 |
mthd := selectedContext method. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3202 |
mthd notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3203 |
who := selectedContext method who. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3204 |
who notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3205 |
cls := who methodClass. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3206 |
sel := who methodSelector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3207 |
] |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3208 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3209 |
cls isNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3210 |
"/ class not found - try receiver |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3211 |
cls := selectedContext receiver class |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3212 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3213 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3214 |
cls browserClass openInClass:cls selector:sel. |
266 | 3215 |
|
1452 | 3216 |
"Created: / 22.11.1995 / 21:27:01 / cg" |
3217 |
"Modified: / 3.2.1998 / 19:46:40 / cg" |
|
266 | 3218 |
! |
3219 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3220 |
browseImplementors |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3221 |
"open a browser on the implementors of the selected methods selector" |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3222 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3223 |
selectedContext isNil ifTrue:[ |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3224 |
^ self showError:'** select a context first **' |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3225 |
]. |
4153 | 3226 |
"/ selectedContext receiver class browserClass |
3227 |
UserPreferences systemBrowserClass |
|
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2678
diff
changeset
|
3228 |
browseImplementorsOf:selectedContext selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3229 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3230 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3231 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3232 |
"open a browser on the implementors of some selector" |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3233 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3234 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3235 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3236 |
(sel := codeView selection) notNil ifTrue:[ |
2812 | 3237 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3238 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3239 |
initial isNil ifTrue:[ |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3240 |
initial := selectedContext isNil |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3241 |
ifTrue:[nil] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3242 |
ifFalse:[selectedContext selector]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3243 |
]. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3244 |
selector := Dialog |
3320 | 3245 |
requestSelector:'Selector to browse implementors of:' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3246 |
initialAnswer:initial. |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3247 |
selector size == 0 ifFalse:[ |
3140 | 3248 |
UserPreferences systemBrowserClass |
4153 | 3249 |
browseImplementorsMatching:selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3250 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3251 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3252 |
"Modified: / 6.2.2000 / 01:05:14 / cg" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3253 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3254 |
|
3269 | 3255 |
browseReceiversClass |
3256 |
"browse the reveivers class (of the selected contexts message)" |
|
3257 |
||
3258 |
|cls sel| |
|
3259 |
||
3260 |
selectedContext isNil ifTrue:[^ self]. |
|
3261 |
||
3262 |
cls := selectedContext receiver class. |
|
3263 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3264 |
(cls includesSelector:sel) ifFalse:[ |
3269 | 3265 |
sel := nil |
3266 |
]. |
|
3267 |
cls browserClass openInClass:cls selector:sel. |
|
3268 |
||
3269 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3270 |
! |
|
3271 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3272 |
browseSenders |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3273 |
"open a browser on the senders of the selected methods selector" |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3274 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3275 |
selectedContext isNil ifTrue:[ |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3276 |
^ self showError:'** select a context first **' |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3277 |
]. |
3140 | 3278 |
UserPreferences systemBrowserClass |
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2678
diff
changeset
|
3279 |
browseAllCallsOn:selectedContext selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3280 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3281 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3282 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3283 |
"open a browser on the senders of some selector" |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3284 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3285 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3286 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3287 |
(sel := codeView selection) notNil ifTrue:[ |
2812 | 3288 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3289 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3290 |
initial isNil ifTrue:[ |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3291 |
initial := selectedContext isNil |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3292 |
ifTrue:[nil] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3293 |
ifFalse:[selectedContext selector]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3294 |
]. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3295 |
selector := Dialog |
3333 | 3296 |
requestSelector:'Selector to browse senders of:' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3297 |
initialAnswer:initial. |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3298 |
selector size == 0 ifFalse:[ |
3140 | 3299 |
UserPreferences systemBrowserClass |
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2678
diff
changeset
|
3300 |
browseAllCallsOn:selector asSymbol. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3301 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3302 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3303 |
"Modified: / 6.2.2000 / 01:05:29 / cg" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3304 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3305 |
|
266 | 3306 |
copyWalkbackText |
3307 |
"place the contents of the walkback view into the copy-paste buffer. |
|
3308 |
This allows pasting it into some other view for printing ..." |
|
3309 |
||
6034 | 3310 |
self setClipboardText:(contextArray collect:[:con | con fullPrintString]) asStringCollection |
266 | 3311 |
|
3312 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
3313 |
! |
|
3314 |
||
3315 |
doAbort |
|
1187 | 3316 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 3317 |
at save places (for example: in the event loop) and returns back |
3318 |
from whatever the process is doing, but does not terminate it." |
|
3319 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3320 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3321 |
(self confirm:('Code modified - abort anyway ?')) |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3322 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3323 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3324 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3325 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3326 |
|
266 | 3327 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3328 |
inspectedProcess isDead ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3329 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3330 |
^ self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3331 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
3332 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3333 |
self showError:'** the process does not handle the abort signal **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3334 |
] ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
3335 |
self interruptProcessWith:[AbortOperationRequest raise]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3336 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3337 |
^ self |
266 | 3338 |
]. |
3339 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3340 |
steppedContext := wrapperContext := nil. |
266 | 3341 |
haveControl := false. |
3342 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3343 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3344 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3345 |
catchBlock notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3346 |
abortButton turnOff. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3347 |
catchBlock value. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3348 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3349 |
"/ not reached |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3350 |
'DebugView [warning]: abort failed' errorPrintCR. |
266 | 3351 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3352 |
|
266 | 3353 |
^ self. |
3354 |
||
3447 | 3355 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 3356 |
! |
3357 |
||
6487 | 3358 |
doAbortAll |
3359 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
3360 |
at save places (for example: in the event loop) and returns back |
|
3361 |
from whatever the process is doing, but does not terminate it." |
|
3362 |
||
3363 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
3364 |
(self confirm:('Code modified - abort anyway ?')) |
|
3365 |
ifFalse:[ |
|
3366 |
^ self |
|
3367 |
] |
|
3368 |
]. |
|
3369 |
||
3370 |
inspecting ifTrue:[ |
|
3371 |
inspectedProcess isDead ifTrue:[ |
|
3372 |
self showTerminated. |
|
3373 |
^ self |
|
3374 |
]. |
|
3375 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
3376 |
self showError:'** the process does not handle the abort signal **' |
|
3377 |
] ifTrue:[ |
|
3378 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
3379 |
]. |
|
3380 |
^ self |
|
3381 |
]. |
|
3382 |
||
3383 |
steppedContext := wrapperContext := nil. |
|
3384 |
haveControl := false. |
|
3385 |
exitAction := #abortAll. |
|
3386 |
||
3387 |
"exit private event-loop" |
|
3388 |
catchBlock notNil ifTrue:[ |
|
3389 |
abortButton turnOff. |
|
3390 |
catchBlock value. |
|
3391 |
||
3392 |
"/ not reached |
|
3393 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
3394 |
]. |
|
3395 |
||
3396 |
^ self. |
|
3397 |
||
3398 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
3399 |
! |
|
3400 |
||
266 | 3401 |
doContinue |
3402 |
"continue from menu" |
|
3403 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3404 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3405 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3406 |
self checkIfCodeIsReallyModified ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3407 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3408 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3409 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3410 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3411 |
|
266 | 3412 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3413 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3414 |
continueButton foregroundColor:Color red darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3415 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3416 |
continueButton label:(resources string:'stop'). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3417 |
continueButton action:[self doStop]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3418 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3419 |
self processPerform:#resume. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3420 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3421 |
^ self |
266 | 3422 |
]. |
3423 |
canContinue ifTrue:[ |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3424 |
exContext := thisContext findSpecialHandle:false raise:true. |
1725 | 3425 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
3426 |
(exContext notNil |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
3427 |
and:[ (ex := exContext receiver) isLazyValue not |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
3428 |
and:[ ex isException |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3429 |
and:[ ex signal == NoHandlerError |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3430 |
and:[ ex parameter signal == RecursionError]]]]) |
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3431 |
ifTrue:[ |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3432 |
"/ debug due to unhandled recursionInterrupt. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3433 |
"/ ask if we should proceed with more stack. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3434 |
|
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3435 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3436 |
answer == true ifTrue:[ |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3437 |
proc := Processor activeProcess. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3438 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3439 |
]. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3440 |
]. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3441 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3442 |
steppedContext := wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3443 |
tracing := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3444 |
haveControl := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3445 |
exitAction := #continue. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3446 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3447 |
"exit private event-loop" |
6365 | 3448 |
catchBlock value. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3449 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3450 |
"/ not reached. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3451 |
'DebugView [warning]: continue failed' errorPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3452 |
continueButton turnOff. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3453 |
|
266 | 3454 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3455 |
inspecting ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3456 |
'DebugView [info]: resuming top context' infoPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3457 |
self showSelection:1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3458 |
self doReturn |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3459 |
] |
266 | 3460 |
] |
477 | 3461 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
3462 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 3463 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 3464 |
! |
3465 |
||
3187 | 3466 |
doDefine |
5955 | 3467 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
3468 |
bagOfClassNames bagOfUsedClassNames| |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3469 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3470 |
selectionIndex := contextView selection. |
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3471 |
|
3283 | 3472 |
selector := actualContext selector. |
5955 | 3473 |
|
3474 |
"generate nice argument names" |
|
3475 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
3476 |
bagOfUsedClassNames := Bag new. |
|
3477 |
argNames := actualContext args |
|
3478 |
collect: |
|
3479 |
[:eachArg | |
|
3480 |
|nm| |
|
3481 |
||
3482 |
nm := eachArg class name. |
|
3483 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
|
3484 |
nm article , nm |
|
3485 |
] ifFalse:[ |
|
3486 |
bagOfUsedClassNames add:nm. |
|
3487 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
3488 |
]. |
|
3489 |
]. |
|
3490 |
||
3491 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 3492 |
|
3447 | 3493 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
3494 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
3495 |
||
3496 |
actualContext receiver isNil ifTrue:[ |
|
3497 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
|
3498 |
ifFalse:[ |
|
3499 |
^ self |
|
3500 |
] |
|
3501 |
]. |
|
3502 |
||
3503 |
receiversClass := actualContext receiver class. |
|
3504 |
||
3505 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
|
3506 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
|
3507 |
cat := 'accessing'. |
|
3508 |
]. |
|
3509 |
(selector numArgs == 1 |
|
3510 |
and:[(selector endsWith:':') |
|
3511 |
and:[receiversClass instVarNames includes:(selector copyWithoutLast:1)]]) |
|
3512 |
ifTrue:[ |
|
3513 |
code := '%1\' , haltStmtFix , '\ %2 := arg.'. |
|
3514 |
cat := 'accessing'. |
|
3515 |
]. |
|
3516 |
||
3517 |
"/ actualContext receiver isClass ifTrue:[ |
|
3518 |
"/ selector == #new ifTrue:[ |
|
3519 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
3520 |
"/ ]. |
|
3521 |
"/ selector == #'new:' ifTrue:[ |
|
3522 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
3523 |
"/ ]. |
|
3524 |
"/ ]. |
|
3525 |
code isNil ifTrue:[ |
|
3526 |
code := '%1\' , haltStmtDef |
|
3527 |
]. |
|
3528 |
||
3187 | 3529 |
self |
3447 | 3530 |
codeAccept:(code bindWith:proto with:selector) withCRs |
3427 | 3531 |
unwind:false |
3447 | 3532 |
category:cat |
3427 | 3533 |
onCancel:[^ self]. |
3269 | 3534 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3535 |
self doShowSelection:selectionIndex. |
3269 | 3536 |
self doRestart |
3427 | 3537 |
|
3447 | 3538 |
"Modified: / 17.11.2001 / 23:43:54 / cg" |
3187 | 3539 |
! |
3540 |
||
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3541 |
doIgnoreBreakpoints |
3511 | 3542 |
self allowBreakPointsInDebugger:false |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3543 |
! |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3544 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3545 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3546 |
"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
|
3547 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3548 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3549 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3550 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3551 |
(self confirm:('Code modified - step anyway ?')) |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3552 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3553 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3554 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3555 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3556 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3557 |
canContinue ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3558 |
steppedContext := wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3559 |
haveControl := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3560 |
exitAction := #step. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3561 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3562 |
"exit private event-loop" |
6365 | 3563 |
catchBlock value. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3564 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3565 |
"/ not reached |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3566 |
'DebugView [warning]: send failed' errorPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3567 |
sendButton turnOff. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3568 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3569 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3570 |
"Created: / 6.3.1997 / 21:09:36 / cg" |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3571 |
"Modified: / 29.7.1998 / 21:49:29 / cg" |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3572 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3573 |
|
266 | 3574 |
doNext |
1072 | 3575 |
"skip for next source-code line; entering blocks" |
266 | 3576 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3577 |
stepHow := #nextIn. |
266 | 3578 |
self doStep:nil |
790 | 3579 |
|
1072 | 3580 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3581 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3582 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3583 |
doNextOut |
1072 | 3584 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3585 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3586 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3587 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3588 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3589 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 3590 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3591 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3592 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3593 |
doNextOver |
1072 | 3594 |
"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
|
3595 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3596 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3597 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3598 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3599 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 3600 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 3601 |
! |
3602 |
||
3603 |
doNoTrace |
|
3604 |
traceView notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3605 |
traceView topView destroy. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3606 |
traceView := nil. |
266 | 3607 |
]. |
3608 |
tracing := false |
|
3609 |
! |
|
3610 |
||
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3611 |
doNotIgnoreBreakpoints |
3511 | 3612 |
self allowBreakPointsInDebugger:true |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3613 |
! |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3614 |
|
4356 | 3615 |
doOpenReportMailApp |
3616 |
"open a mail report tool" |
|
3617 |
||
3618 |
| str | |
|
3619 |
str := '' writeStream. |
|
3620 |
||
3621 |
str nextPutLine:('Error notification from ' |
|
3622 |
, OperatingSystem getLoginName |
|
3623 |
, '@' |
|
3624 |
, OperatingSystem getHostName). |
|
3625 |
str cr. |
|
3626 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
3627 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 3628 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
3629 |
str nextPutLine:('Description: ' , self label). |
|
3630 |
"/ str nextPutLine:('Error: ', printedException description). |
|
3631 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
3632 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
3633 |
str nextPutLine:'Backtrace:'. |
|
3634 |
str cr. |
|
3635 |
||
3636 |
firstContext notNil ifTrue:[ |
|
3637 |
firstContext fullPrintAllOn:str. |
|
3638 |
]. |
|
3639 |
str cr;cr. |
|
3640 |
SendMailTool openForMessage:(str contents) withSubject:('STX Error:[', self label, ']') preOpenBlock:[:inst| |
|
3641 |
inst recipientEntryField value:'error@exept.de' |
|
3642 |
]. |
|
3643 |
str close. |
|
3644 |
! |
|
3645 |
||
266 | 3646 |
doRestart |
3647 |
"restart - the selected context will be restarted" |
|
6365 | 3648 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3649 |
self checkIfCodeIsReallyModified ifTrue:[ |
6365 | 3650 |
(self confirm:('Code modified - restart anyway ?')) ifFalse:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3651 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3652 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3653 |
]. |
266 | 3654 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3655 |
selectedContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3656 |
^ self showError:'** select a context first **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3657 |
]. |
6365 | 3658 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3659 |
^ self |
266 | 3660 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3661 |
steppedContext := wrapperContext := nil. |
266 | 3662 |
haveControl := false. |
6365 | 3663 |
exitAction := #restart. "exit private event-loop" |
3664 |
||
3665 |
catchBlock value. |
|
3666 |
||
3667 |
"/ normally not reached |
|
3668 |
||
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3669 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3670 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3671 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3672 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 3673 |
! |
3674 |
||
3675 |
doReturn |
|
3676 |
"return - the selected context will do a ^nil" |
|
3677 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3678 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3679 |
(self confirm:('Code modified - return anyway ?')) |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3680 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3681 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3682 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3683 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3684 |
|
266 | 3685 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3686 |
selectedContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3687 |
^ self showError:'** select a context first **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3688 |
]. |
2313 | 3689 |
self interruptProcessWith:[selectedContext unwind:nil]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3690 |
^ self |
266 | 3691 |
]. |
3692 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3693 |
steppedContext := wrapperContext := nil. |
266 | 3694 |
haveControl := false. |
3695 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3696 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3697 |
"exit private event-loop" |
6365 | 3698 |
catchBlock value. |
477 | 3699 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3700 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3701 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3702 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3703 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3704 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 3705 |
! |
3706 |
||
3707 |
doSend |
|
3708 |
"single send; reenter with next message send" |
|
3709 |
||
1072 | 3710 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3711 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3712 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3713 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3714 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3715 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3716 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3717 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3718 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3719 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3720 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3721 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3722 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3723 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3724 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3725 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3726 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3727 |
|
1072 | 3728 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 3729 |
! |
3730 |
||
3731 |
doStep |
|
3732 |
"skip for next send in selected method" |
|
3733 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3734 |
stepHow := #step. |
790 | 3735 |
self doStep:-1 |
3736 |
||
1072 | 3737 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 3738 |
! |
3739 |
||
3740 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3741 |
"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
|
3742 |
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
|
3743 |
or to next line (if nil) or to next send (if -1)" |
266 | 3744 |
|
3745 |
|con method| |
|
3746 |
||
3747 |
inspecting ifTrue:[^ self]. |
|
3748 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3749 |
self checkIfCodeIsReallyModified ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3750 |
(self confirm:('Code modified - step anyway ?')) |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3751 |
ifFalse:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3752 |
^ self |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3753 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3754 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3755 |
|
266 | 3756 |
canContinue ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3757 |
selectedContext notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3758 |
con := actualContext. "/ selectedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3759 |
steppedContextLineno := actualContext lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3760 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3761 |
con := contextArray at:2. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3762 |
steppedContextLineno := con lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3763 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3764 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3765 |
skipLineNr := lineNr. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3766 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3767 |
lineNr == -1 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3768 |
steppedContextLineno := skipLineNr := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3769 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3770 |
|
2581 | 3771 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3772 |
steppedContext := contextArray at:1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3773 |
stepHow := #nextIn. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3774 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3775 |
stepHow == #nextOut ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3776 |
steppedContext := con home. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3777 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3778 |
steppedContext := con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3779 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3780 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3781 |
wrapperContext := nil. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3782 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3783 |
"/ ' 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
|
3784 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3785 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3786 |
if we step in a wrapped method, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3787 |
prepare to skip the prolog ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3788 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3789 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3790 |
inWrap := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3791 |
method := con method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3792 |
(method notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3793 |
and:[method isWrapped |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3794 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3795 |
inWrap := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3796 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3797 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3798 |
lineNr == #return ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3799 |
Processor activeProcess forceInterruptOnReturnOf:con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3800 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3801 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3802 |
con := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3803 |
bigStep := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3804 |
haveControl := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3805 |
exitAction := #step. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3806 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3807 |
"exit private event-loop" |
6365 | 3808 |
catchBlock value. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3809 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3810 |
"/ not reached |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3811 |
'DebugView [warning]: step failed' errorPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3812 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
266 | 3813 |
] |
477 | 3814 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3815 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 3816 |
! |
3817 |
||
3818 |
doStop |
|
3819 |
"stop the process (if its running, otherwise this is a no-op)" |
|
3820 |
||
3821 |
inspecting ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3822 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3823 |
continueButton foregroundColor:Color green darkened darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3824 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3825 |
continueButton label:(resources string:'continue'). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3826 |
continueButton action:[self doContinue]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3827 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3828 |
self processPerform:#stop. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3829 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3830 |
^ self |
266 | 3831 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
3832 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
3833 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 3834 |
! |
3835 |
||
3836 |
doTerminate |
|
3837 |
"terminate - the process has a chance for cleanup" |
|
3838 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3839 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3840 |
(self confirm:('Code modified - terminate anyway ?')) |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3841 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3842 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3843 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3844 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3845 |
|
266 | 3846 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3847 |
self processPerform:#terminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3848 |
^ self |
266 | 3849 |
]. |
3850 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3851 |
steppedContext := wrapperContext := nil. |
266 | 3852 |
haveControl := false. |
3853 |
exitAction := #terminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3854 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3855 |
"exit private event-loop" |
6365 | 3856 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3857 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3858 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3859 |
inspecting ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3860 |
'DebugView [warning]: terminate failed' errorPrintCR. |
5884 | 3861 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
3862 |
Debugger newDebugger. |
|
3863 |
Processor activeProcess terminate. |
|
3864 |
] |
|
266 | 3865 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3866 |
terminateButton turnOff. |
477 | 3867 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3868 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 3869 |
! |
3870 |
||
3871 |
doTrace |
|
3872 |
"tracing - not really implemented ..." |
|
3873 |
||
3874 |
self warn:'this function is not yet implemented'. |
|
3875 |
||
3876 |
"/ |v b| |
|
3877 |
"/ |
|
3878 |
"/ traceView isNil ifTrue:[ |
|
3879 |
"/ v := StandardSystemView on:Display. |
|
3880 |
"/ v label:'Debugger-Trace'. |
|
3881 |
"/ v icon:icon. |
|
3882 |
"/ |
|
3883 |
"/ b := Button label:'untrace' in:v. |
|
3884 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
3885 |
"/ b action:[ |
|
3886 |
"/ StepInterruptPending := nil. |
|
3887 |
"/ tracing := false. |
|
3888 |
"/ v unrealize. |
|
3889 |
"/ traceView := nil |
|
3890 |
"/ ]. |
|
3891 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
3892 |
"/ traceView origin:(0 @ (b height)) |
|
3893 |
"/ extent:[v width @ (v height - b height)] |
|
3894 |
"/ ]. |
|
3895 |
"/ v realize. |
|
3896 |
"/ |
|
3897 |
"/ tracing := true. |
|
3898 |
! |
|
3899 |
||
3900 |
doTraceStep |
|
3901 |
"tracestep - not implemented yet" |
|
3902 |
||
3903 |
canContinue ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3904 |
tracing := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3905 |
self doStep |
266 | 3906 |
] |
3907 |
! |
|
3908 |
||
3909 |
exit |
|
3910 |
"exit from menu: immediate exit from smalltalk" |
|
3911 |
||
3912 |
OperatingSystem exit |
|
3913 |
! |
|
3914 |
||
3915 |
inspectContext |
|
3916 |
"launch an inspector on the currently selected context" |
|
3917 |
||
3918 |
contextView selection notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3919 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3920 |
(contextArray at:(contextView selection)) inspect. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3921 |
] |
266 | 3922 |
] |
3923 |
! |
|
3924 |
||
3447 | 3925 |
openAboutThisApplication |
3926 |
"opens an about box for this application." |
|
3927 |
||
3503 | 3928 |
DialogBox aboutClass:self class. |
3929 |
"/ |rev myClass clsRev msg| |
|
3930 |
"/ |
|
3931 |
"/ rev := ''. |
|
3932 |
"/ myClass := self class. |
|
3933 |
"/ |
|
3934 |
"/ (clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
|
3935 |
"/ |
|
3936 |
"/ msg := '\' withCRs , myClass name asBoldText, rev. |
|
3937 |
"/ |
|
3938 |
"/ Dialog |
|
3939 |
"/ about:(resources string:msg) |
|
3940 |
"/ label:(resources string:'About DebugView') |
|
3941 |
"/ icon:self class defaultIcon |
|
3942 |
"/ |
|
3943 |
"/ "Created: / 17.11.2001 / 23:08:22 / cg" |
|
3447 | 3944 |
! |
3945 |
||
266 | 3946 |
quickTerminate |
3947 |
"quick terminate - the process will get no chance for cleanup actions" |
|
3948 |
||
3949 |
inspecting ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3950 |
self processPerform:#terminateNoSignal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3951 |
^ self |
266 | 3952 |
]. |
3953 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3954 |
steppedContext := wrapperContext := nil. |
266 | 3955 |
haveControl := false. |
3956 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3957 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3958 |
"exit private event-loop" |
6365 | 3959 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3960 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3961 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3962 |
inspecting ifFalse:[ |
5884 | 3963 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
3964 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
3965 |
Debugger newDebugger. |
|
3966 |
Processor activeProcess terminateNoSignal. |
|
3967 |
] |
|
266 | 3968 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3969 |
terminateButton turnOff. |
477 | 3970 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3971 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 3972 |
! |
3973 |
||
3974 |
removeAllBreakpoints |
|
3975 |
"remove all trace & breakpoints - if any" |
|
3976 |
||
1327 | 3977 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
1661 | 3978 |
self withExecuteCursorDo:[ |
3979 |
MessageTracer unwrapAllMethods |
|
3980 |
] |
|
1319 | 3981 |
] |
1327 | 3982 |
|
1661 | 3983 |
"Modified: / 21.5.1998 / 01:44:43 / cg" |
266 | 3984 |
! |
3985 |
||
3986 |
removeBreakpoint |
|
3987 |
"remove breakpoint on the selected contexts method - if any" |
|
3988 |
||
3989 |
|implementorClass method| |
|
3990 |
||
3991 |
selectedContext isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3992 |
^ self showError:'** select a context first **' |
266 | 3993 |
]. |
1327 | 3994 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3995 |
^ self |
1319 | 3996 |
]. |
266 | 3997 |
|
3998 |
implementorClass := selectedContext methodClass. |
|
3999 |
implementorClass notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4000 |
method := implementorClass compiledMethodAt:selectedContext selector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4001 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4002 |
method clearBreakPoint |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4003 |
] |
266 | 4004 |
]. |
4005 |
contextView middleButtonMenu disable:#removeBreakpoint. |
|
3511 | 4006 |
contextView middleButtonMenu enable:#addBreakpoint. |
1327 | 4007 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4008 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
266 | 4009 |
! |
4010 |
||
3447 | 4011 |
showDenseWalkback |
3427 | 4012 |
|m| |
4013 |
||
4014 |
m := contextView middleButtonMenu. |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4015 |
verboseBacktrace := false. |
3694 | 4016 |
m labelAt:#showDenseWalkback put:(resources string:'Show Verbose WalkBack'). |
3447 | 4017 |
m selectorAt:#showDenseWalkback put:#showVerboseWalkback. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4018 |
self redisplayBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4019 |
|
3447 | 4020 |
"Created: / 17.11.2001 / 20:08:08 / cg" |
4021 |
"Modified: / 17.11.2001 / 22:39:48 / cg" |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4022 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4023 |
|
266 | 4024 |
showMore |
3447 | 4025 |
"double the number of contexts shown" |
266 | 4026 |
|
4027 |
contextArray notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4028 |
nChainShown := nChainShown * 2. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4029 |
self redisplayBacktrace. |
266 | 4030 |
] |
563 | 4031 |
|
3447 | 4032 |
"Modified: / 17.11.2001 / 20:14:31 / cg" |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4033 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4034 |
|
3447 | 4035 |
showVerboseWalkback |
4036 |
|m| |
|
4037 |
||
4038 |
verboseBacktrace := true. |
|
4039 |
m := contextView middleButtonMenu. |
|
3694 | 4040 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
3447 | 4041 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback. |
4042 |
||
4043 |
self redisplayBacktrace. |
|
4044 |
||
4045 |
"Created: / 17.11.2001 / 20:07:57 / cg" |
|
4046 |
"Modified: / 17.11.2001 / 22:39:41 / cg" |
|
4047 |
! |
|
4048 |
||
4049 |
showingDenseWalkback |
|
4050 |
^ verboseBacktrace == false. |
|
4051 |
||
4052 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
4053 |
! |
|
4054 |
||
4055 |
showingVerboseWalkback |
|
4056 |
^ verboseBacktrace == true. |
|
4057 |
||
4058 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
4059 |
! |
|
4060 |
||
266 | 4061 |
skip |
4062 |
"skip for cursor line in selected method" |
|
4063 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4064 |
stepHow := #skip. |
266 | 4065 |
self doStep:codeView cursorLine. |
790 | 4066 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4067 |
"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
|
4068 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4069 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4070 |
skipForReturn |
2581 | 4071 |
"skip until the selected context is left." |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4072 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4073 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4074 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4075 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4076 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 4077 |
! |
4078 |
||
4079 |
skipUntilEntering |
|
4080 |
"skip until some particular method is invoked." |
|
4081 |
||
4082 |
|selector| |
|
4083 |
||
4084 |
selector := Dialog |
|
4085 |
request:'Skip until entering what (matchpattern):' |
|
4086 |
initialAnswer:self goodSkipUntilSelector. |
|
4087 |
selector size == 0 ifTrue:[^ self]. |
|
4088 |
||
4089 |
stepUntilEntering := selector asSymbol. |
|
4090 |
stepHow := #send. |
|
4091 |
self doStep:-1. |
|
4092 |
||
4093 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 4094 |
! |
4095 |
||
4096 |
toggleVerboseWalkback |
|
4097 |
verboseBacktrace ifFalse:[ |
|
4098 |
self showVerboseWalkback |
|
4099 |
] ifTrue:[ |
|
4100 |
self showDenseWalkback |
|
4101 |
]. |
|
4102 |
||
4103 |
"Modified: / 17.11.2001 / 20:07:45 / cg" |
|
266 | 4104 |
! ! |
4105 |
||
4106 |
!DebugView methodsFor:'private'! |
|
4107 |
||
6487 | 4108 |
abortAllIsHandled |
4109 |
^ AbortAllOperationRequest isHandled |
|
4110 |
! |
|
4111 |
||
266 | 4112 |
busy |
4113 |
^ busy |
|
4114 |
! |
|
4115 |
||
3511 | 4116 |
canAddBreakpoint |
4117 |
|m| |
|
4118 |
||
4119 |
m := contextView middleButtonMenu. |
|
4120 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
4121 |
! |
|
4122 |
||
3269 | 4123 |
canBrowseClassHierarchy |
4124 |
|m| |
|
4125 |
||
4126 |
m := contextView middleButtonMenu. |
|
4127 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
|
4128 |
! |
|
4129 |
||
4130 |
canBrowseFullClassProtocol |
|
4131 |
|m| |
|
4132 |
||
4133 |
m := contextView middleButtonMenu. |
|
4134 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
|
4135 |
! |
|
4136 |
||
4137 |
canBrowseImplementingClass |
|
4138 |
|m| |
|
4139 |
||
4140 |
m := contextView middleButtonMenu. |
|
4141 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
|
4142 |
! |
|
4143 |
||
4144 |
canBrowseReceiversClass |
|
4145 |
|m| |
|
4146 |
||
4147 |
m := contextView middleButtonMenu. |
|
4148 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
|
4149 |
! |
|
4150 |
||
4151 |
canDefineMethod |
|
4152 |
^ defineButton isVisible |
|
4153 |
! |
|
4154 |
||
4155 |
canRemoveBreakpoint |
|
4156 |
|m| |
|
4157 |
||
4158 |
m := contextView middleButtonMenu. |
|
4159 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
4160 |
! |
|
4161 |
||
3447 | 4162 |
canRestart |
4163 |
^ restartButton isEnabled |
|
4164 |
||
4165 |
"Modified: / 17.11.2001 / 19:59:49 / cg" |
|
4166 |
! |
|
4167 |
||
4168 |
canReturn |
|
4169 |
^ returnButton isEnabled |
|
4170 |
||
4171 |
"Modified: / 17.11.2001 / 19:59:18 / cg" |
|
4172 |
! |
|
4173 |
||
3269 | 4174 |
canShowMore |
4175 |
^ canShowMore |
|
4176 |
! |
|
4177 |
||
266 | 4178 |
exclusive:aBoolean |
4179 |
exclusive := aBoolean |
|
4180 |
! |
|
4181 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4182 |
explainSelection |
3518 | 4183 |
|interval node definingNode crsrPos nm varIdx| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4184 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4185 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4186 |
interval isEmpty ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4187 |
crsrPos := codeView characterPositionOfCursor. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4188 |
codeView characterUnderCursor isSeparator ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4189 |
crsrPos := (crsrPos - 1) max:1 |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4190 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4191 |
interval := crsrPos to:crsrPos. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4192 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4193 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4194 |
node := self findNodeForInterval:interval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4195 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4196 |
node notNil ifTrue: [ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4197 |
node isVariable ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4198 |
nm := node name. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4199 |
|
3540 | 4200 |
(nm = 'self') ifTrue:[ |
4201 |
self showValue:(actualContext methodHome receiver). |
|
4202 |
^ self |
|
4203 |
]. |
|
4204 |
(#( 'super' 'thisContext') includes:nm) ifTrue:[ |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4205 |
^ self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4206 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4207 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4208 |
definingNode := node whoDefines:nm. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4209 |
definingNode notNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4210 |
definingNode isMethod ifTrue:[ |
3518 | 4211 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
4212 |
varIdx ~~ 0 ifTrue:[ |
|
4213 |
self showValue:(actualContext methodHome argAt:varIdx) |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4214 |
] |
3518 | 4215 |
]. |
4216 |
definingNode isBlock ifTrue:[ |
|
4217 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
|
4218 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
4219 |
varIdx ~~ 0 ifTrue:[ |
|
4220 |
] |
|
4221 |
]. |
|
4222 |
]. |
|
4223 |
definingNode parent notNil ifTrue:[ |
|
4224 |
definingNode parent isMethod ifTrue:[ |
|
4225 |
varIdx := definingNode temporaries findFirst:[:arg | arg name = nm]. |
|
4226 |
varIdx ~~ 0 ifTrue:[ |
|
3542 | 4227 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
4228 |
self showValue:(actualContext methodHome varAt:varIdx) |
|
4229 |
] |
|
3518 | 4230 |
]. |
4231 |
]. |
|
4232 |
definingNode parent isBlock ifTrue:[ |
|
4233 |
varIdx := definingNode temporaries findFirst:[:arg | arg name = nm]. |
|
4234 |
varIdx ~~ 0 ifTrue:[ |
|
4235 |
]. |
|
4236 |
] |
|
4237 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4238 |
]. |
3518 | 4239 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4240 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4241 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4242 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4243 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4244 |
findNodeForInterval:interval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4245 |
|tree node source| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4246 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4247 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4248 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4249 |
source := codeView contents asString string. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4250 |
source := currentMethod source. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4251 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4252 |
Error handle:[:ex | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4253 |
Transcript showCR:ex description. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4254 |
] do:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4255 |
Compiler parseErrorSignal handle:[:ex | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4256 |
] do:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4257 |
tree := RBParser |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4258 |
parseMethod:source |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4259 |
onError: [:str :err ":nodesSoFar" | ]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4260 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4261 |
tree isNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4262 |
Compiler parseErrorSignal handle:[:ex | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4263 |
] do:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4264 |
tree := RBParser |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4265 |
parseDoItMethodBody:source |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4266 |
onError: [:str :err ":nodesSoFar" | ]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4267 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4268 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4269 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4270 |
tree isNil ifTrue:[^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4271 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4272 |
node := tree whichNodeIsContainedBy:interval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4273 |
node isNil ifTrue: [ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4274 |
node := self findNodeIn:tree forInterval:interval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4275 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4276 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4277 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4278 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4279 |
findNodeIn:tree forInterval:interval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4280 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4281 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4282 |
node := nil. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4283 |
tree nodesDo:[:each | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4284 |
(each intersectsInterval:interval) ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4285 |
(node isNil or:[node == each parent]) ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4286 |
node := each |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4287 |
] ifFalse:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4288 |
(node parent notNil |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4289 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4290 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4291 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4292 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4293 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4294 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4295 |
|
2581 | 4296 |
goodSkipUntilSelector |
4297 |
|current| |
|
4298 |
||
4299 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
4300 |
selectedContext isNil ifTrue:[^ nil]. |
|
4301 |
current := selectedContext selector. |
|
4302 |
current isNil ifTrue:[^ nil]. |
|
4303 |
('change:*' match:current) ifTrue:[ |
|
4304 |
^ 'update:*' |
|
4305 |
]. |
|
4306 |
^ nil |
|
4307 |
! |
|
4308 |
||
3447 | 4309 |
hasContextSelected |
4310 |
^ contextView hasSelection |
|
4311 |
||
4312 |
"Created: / 17.11.2001 / 19:57:03 / cg" |
|
4313 |
! |
|
4314 |
||
4315 |
ignoreBreakpoints |
|
4316 |
^ ignoreBreakpoints |
|
4317 |
||
4318 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
4319 |
! |
|
4320 |
||
266 | 4321 |
inspectedProcess |
4322 |
^ inspectedProcess |
|
4323 |
! |
|
4324 |
||
4325 |
interruptProcessWith:aBlock |
|
4326 |
"let inspected process do something, then update the context list" |
|
4327 |
||
4328 |
inspectedProcess isDead ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4329 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4330 |
^ self |
266 | 4331 |
]. |
4332 |
inspectedProcess interruptWith:aBlock. |
|
4333 |
" |
|
4334 |
give the process a chance to run, then update |
|
4335 |
" |
|
4336 |
(Delay forSeconds:0.2) wait. |
|
4337 |
self setContext:(inspectedProcess suspendedContext). |
|
4338 |
! |
|
4339 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4340 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4341 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4342 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4343 |
|
266 | 4344 |
processPerform:aMessage |
4345 |
"do something, then update the context list" |
|
4346 |
||
4347 |
inspectedProcess isDead ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4348 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4349 |
^ self |
266 | 4350 |
]. |
4351 |
inspectedProcess perform:aMessage. |
|
4352 |
" |
|
4353 |
give the process a chance to run, then update |
|
4354 |
" |
|
4355 |
(Delay forSeconds:0.2) wait. |
|
4356 |
self setContext:(inspectedProcess suspendedContext). |
|
4357 |
! |
|
4358 |
||
939 | 4359 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4360 |
"force redisplay of the walkBack list; invoked when the |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4361 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4362 |
|
939 | 4363 |
|oldSelection oldContext con idx| |
4364 |
||
4365 |
contextArray notNil ifTrue:[ |
|
1661 | 4366 |
self withExecuteCursorDo:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4367 |
oldSelection := contextView selection. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4368 |
oldSelection notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4369 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4370 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4371 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4372 |
con := firstContext. |
950 | 4373 |
"/ con := contextArray at:1. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4374 |
"/ force redeisplay, even if same by changing the first entry |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4375 |
contextArray size > 0 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4376 |
contextArray at:1 put:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4377 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4378 |
self setContext:con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4379 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4380 |
oldContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4381 |
idx := oldSelection |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4382 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4383 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4384 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4385 |
contextView setSelection:idx. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4386 |
idx notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4387 |
self showSelection:idx |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4388 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4389 |
] |
939 | 4390 |
] |
4391 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4392 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 4393 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 4394 |
! |
4395 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4396 |
selectedInterval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4397 |
^ codeView selectionStartIndex to:(codeView selectionStopIndex - 1) |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4398 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4399 |
|
266 | 4400 |
setContext:aContext |
4401 |
"show calling chain from aContext in the walk-back listview" |
|
4402 |
||
641 | 4403 |
^ 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
|
4404 |
|
641 | 4405 |
"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
|
4406 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4407 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4408 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4409 |
"show calling chain from aContext in the walk-back listview. |
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4410 |
Most complications here arise from filtering less-interesting contexts |
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4411 |
if not in verbose-context mode." |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4412 |
|
3702 | 4413 |
|con text method caller caller2 called called2 m count c cc |
3447 | 4414 |
suspendContext calledBySuspendContext nm h calledContext| |
266 | 4415 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4416 |
(contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4417 |
"no change" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4418 |
^ false |
266 | 4419 |
]. |
4420 |
||
939 | 4421 |
firstContext := aContext. |
4422 |
||
266 | 4423 |
m := contextView middleButtonMenu. |
4424 |
m notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4425 |
m disable:#showMore. |
266 | 4426 |
]. |
3269 | 4427 |
canShowMore := false. |
266 | 4428 |
|
4429 |
aContext isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4430 |
text := Array with:'** no context **'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4431 |
contextArray := nil. |
266 | 4432 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4433 |
text := OrderedCollection new:nChainShown. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4434 |
contextArray := OrderedCollection new:nChainShown. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4435 |
con := aContext. |
3447 | 4436 |
calledContext := nil. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4437 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4438 |
verboseBacktrace ~~ true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4439 |
"/ with dense backtrace, hide the ProcessorScheduler |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4440 |
"/ contexts at the top; look for a Process>>suspend* |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4441 |
"/ context within the first 10 contexts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4442 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4443 |
suspendContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4444 |
c := con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4445 |
1 to:10 do:[:i | |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4446 |
|sel| |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4447 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4448 |
c notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4449 |
(sel := c selector) notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4450 |
((sel isSymbol and:[sel startsWith:'suspend']) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4451 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
3447 | 4452 |
suspendContext := c. |
4453 |
calledBySuspendContext := cc. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4454 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4455 |
]. |
3447 | 4456 |
cc := c. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4457 |
c := c sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4458 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4459 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4460 |
suspendContext notNil ifTrue:[ |
3447 | 4461 |
con := suspendContext. |
4462 |
calledContext := calledBySuspendContext. |
|
4463 |
suspendContext := nil |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4464 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4465 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4466 |
|
3427 | 4467 |
verboseBacktrace ~~ true ifTrue:[ |
4468 |
con notNil ifTrue:[ |
|
4469 |
"/ hide the halt implementation |
|
4470 |
(con selector == #halt |
|
4471 |
or:[con selector == #halt:]) ifTrue:[ |
|
4472 |
con method mclass == Object ifTrue:[ |
|
3447 | 4473 |
calledContext := con. |
3427 | 4474 |
con := con sender. |
4475 |
] |
|
4476 |
] |
|
4477 |
] |
|
4478 |
]. |
|
4479 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4480 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4481 |
get them all |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4482 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4483 |
count := 0. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4484 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4485 |
[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4486 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4487 |
'showingContext1: (' print. con print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4488 |
') --> ' print. (self showingContext1:con calling:calledContext) printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4489 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4490 |
|
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4491 |
self showingContext1:con calling:calledContext |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4492 |
] whileFalse:[ |
3447 | 4493 |
calledContext := con. |
4494 |
con := con sender. |
|
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4495 |
]. |
3447 | 4496 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4497 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4498 |
'showingContext2: (' print. con print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4499 |
') --> ' print. (self showingContext2:con nesting:count) printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4500 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4501 |
|
3447 | 4502 |
(self showingContext2:con nesting:count) ifTrue:[ |
1646 | 4503 |
"/ ignore it, if its in the same |
4504 |
"/ method as the previous context |
|
3447 | 4505 |
"/ (verboseBacktrace ~~ true |
4506 |
"/ and:[count > 0 |
|
4507 |
"/ and:[contextArray last method == con method |
|
4508 |
"/ and:[(contextArray last isBlockContext not |
|
4509 |
"/ & con isBlockContext not) not ]]]) ifTrue:[ |
|
4510 |
"/ "/ skip it, if its in the same method |
|
4511 |
"/ "/ as the called context. |
|
4512 |
"/ ] ifFalse:[ |
|
1646 | 4513 |
contextArray add:con. |
4514 |
||
4515 |
(MoreDebuggingDetail == true) ifTrue:[ |
|
4516 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
|
4517 |
] ifFalse:[ |
|
2914
f2607017f709
catch errors in context-printing
Claus Gittinger <cg@exept.de>
parents:
2812
diff
changeset
|
4518 |
Error handle:[:ex | nm := '???' ] do:[nm := con printString]. |
1646 | 4519 |
]. |
4520 |
text add:nm. |
|
4521 |
count := count + 1. |
|
3447 | 4522 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4523 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4524 |
|
3447 | 4525 |
"/ |
4526 |
"/ kludge: if its a wrapped method, then hide the wrap-call |
|
4527 |
"/ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4528 |
method := con method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4529 |
(method notNil and:[method isWrapped]) ifTrue:[ |
3447 | 4530 |
called := con. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4531 |
caller := con sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4532 |
(caller notNil and:[caller receiver == method originalMethod]) ifTrue:[ |
3447 | 4533 |
called2 := caller. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4534 |
caller2 := caller sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4535 |
(caller2 notNil and:[caller2 method == method]) ifTrue:[ |
3447 | 4536 |
calledContext := called2. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4537 |
con := caller2 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4538 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4539 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4540 |
caller := caller2 := nil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4541 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4542 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4543 |
"/ with dense backtrace, skip the doIt methods context |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4544 |
"/ (its dummy anyway) and fake that contexts name |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4545 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4546 |
verboseBacktrace ~~ true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4547 |
(con isBlockContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4548 |
and:[(h := con home) == con sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4549 |
and:[((h selector == #doIt) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4550 |
or:[h selector == #doIt:]) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4551 |
and:[h method who isNil]]]) ifTrue:[ |
3447 | 4552 |
calledContext := con. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4553 |
con := con sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4554 |
text removeLast. |
3427 | 4555 |
text add:(con methodHome printString). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4556 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4557 |
h := nil. "/ never keep refs to contexts unless you really need them ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4558 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4559 |
|
3427 | 4560 |
"/ with dense backtrace, dont show below the doIt |
4561 |
( verboseBacktrace ~~ true |
|
4562 |
and:[ con selector == #doIt]) ifTrue:[ |
|
4563 |
con := nil. |
|
4564 |
] ifFalse:[ |
|
3447 | 4565 |
calledContext := con. |
3427 | 4566 |
con := con sender |
4567 |
] |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4568 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4569 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4570 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4571 |
did we reach the end ? |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4572 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4573 |
(con isNil or:[con sender isNil]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4574 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4575 |
"/ the very last one is the startup context |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4576 |
"/ (in main) - it has nil as receiver and nil as selector |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4577 |
|
1906
58200b8df8f7
check for empty contextArray
Claus Gittinger <cg@exept.de>
parents:
1871
diff
changeset
|
4578 |
(contextArray notEmpty |
58200b8df8f7
check for empty contextArray
Claus Gittinger <cg@exept.de>
parents:
1871
diff
changeset
|
4579 |
and:[contextArray last selector isNil]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4580 |
contextArray removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4581 |
text removeLast |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4582 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4583 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4584 |
verboseBacktrace ~~ true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4585 |
"/ in dense mode, remove the process startup |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4586 |
"/ contexts (if any) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4587 |
|
2299 | 4588 |
(contextArray size > 0 |
4589 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4590 |
con selector == #start ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4591 |
contextArray removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4592 |
text removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4593 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4594 |
[contextArray size > 0 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4595 |
and:[contextArray last methodHome == con]] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4596 |
contextArray removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4597 |
text removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4598 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4599 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4600 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4601 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4602 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4603 |
m notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4604 |
m enable:#showMore. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4605 |
]. |
3269 | 4606 |
canShowMore := true. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4607 |
text add:(resources string:'*** more walkback follows - click here to see them ***') |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4608 |
]. |
266 | 4609 |
]. |
4610 |
||
4611 |
contextView setList:text. |
|
944 | 4612 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4613 |
releaseInspectors ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4614 |
receiverInspector release. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4615 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4616 |
]. |
266 | 4617 |
|
4618 |
m notNil ifTrue:[ |
|
6275 | 4619 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 4620 |
]. |
3511 | 4621 |
self updateMenuItems. |
266 | 4622 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4623 |
|
1364 | 4624 |
"Created: / 14.12.1995 / 19:10:31 / cg" |
3447 | 4625 |
"Modified: / 17.11.2001 / 22:29:19 / cg" |
266 | 4626 |
! |
4627 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4628 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4629 |
"show calling chain from aContext in the walk-back listview. |
1213 | 4630 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4631 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4632 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4633 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4634 |
verboseBacktrace ifFalse:[ |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4635 |
con := aContext. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4636 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4637 |
con := con sender. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4638 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4639 |
con := con sender. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4640 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4641 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4642 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4643 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4644 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4645 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4646 |
"Modified: / 17.1.1998 / 12:43:19 / cg" |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4647 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4648 |
|
266 | 4649 |
showError:message |
4650 |
codeView contents:(resources string:message). |
|
4651 |
shown ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4652 |
exclusive ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4653 |
"/ consider this a kludge: |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4654 |
"/ if exclusive, cannot use flash, since it suspends |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4655 |
"/ (but we cannot suspend here ...) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4656 |
codeView redrawInverted. device flush. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4657 |
OperatingSystem millisecondDelay:200. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4658 |
codeView redraw |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4659 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4660 |
codeView flash |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4661 |
] |
266 | 4662 |
] |
4663 |
||
3447 | 4664 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
266 | 4665 |
! |
4666 |
||
4667 |
showTerminated |
|
4668 |
self showError:'** the process has terminated **' |
|
4669 |
! |
|
4670 |
||
3518 | 4671 |
showValue:aValue |
3539 | 4672 |
"/ TODO: show value in info field |
4673 |
"/ Transcript showCR:aValue printString |
|
3518 | 4674 |
! |
4675 |
||
3447 | 4676 |
showingContext1:aContext calling:calledContext |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4677 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 4678 |
|
4679 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
4680 |
aContext isNil ifTrue:[ ^true ]. |
|
4681 |
||
4682 |
sel := aContext selector. |
|
4683 |
rec := aContext receiver. |
|
4684 |
mthd := aContext method. |
|
4685 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
4686 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4687 |
"/ to avoid firing/waiting the lazy or future |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4688 |
recIsException := (rec isLazyValue not) and:[rec isException]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4689 |
aContext sender notNil ifTrue:[ |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4690 |
senderRec := aContext sender receiver |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4691 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4692 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4693 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4694 |
'showingContext1: (' print. aContext print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4695 |
') calling: (' print. calledContext print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4696 |
')' printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4697 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4698 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4699 |
(#(doCallHandler: doRaise |
3447 | 4700 |
) includes:sel) |
4701 |
ifTrue:[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4702 |
recIsException ifTrue:[ ^ false]. |
3447 | 4703 |
]. |
4704 |
||
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4705 |
(#(raise raiseRequest |
3447 | 4706 |
) includes:sel) |
4707 |
ifTrue:[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4708 |
recIsException ifTrue:[ |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4709 |
(senderRec isLazyValue not |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4710 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
3447 | 4711 |
]. |
4712 |
]. |
|
4713 |
||
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4714 |
(#(doWhile: |
3447 | 4715 |
) includes:sel) |
4716 |
ifTrue:[ |
|
4717 |
rec isBlock ifTrue:[ |
|
4718 |
aContext sender isBlockContext ifTrue:[^ false]. |
|
4719 |
]. |
|
4720 |
]. |
|
4721 |
||
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4722 |
"/ calledContext notNil ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4723 |
"/ calledSel := calledContext selector. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4724 |
"/ calledRec := calledContext receiver. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4725 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4726 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4727 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4728 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4729 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4730 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4731 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4732 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4733 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4734 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4735 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4736 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4737 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4738 |
"/ ]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4739 |
"/ ]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4740 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4741 |
(#(handleDo:) includes:sel) |
3447 | 4742 |
ifTrue:[ |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4743 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
3447 | 4744 |
]. |
4745 |
(#( |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4746 |
withCursor:do: |
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4747 |
withWaitCursorDo: |
3447 | 4748 |
) includes:sel) |
4749 |
ifTrue:[ |
|
4750 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
4751 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
4752 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
4753 |
]. |
|
4754 |
||
4755 |
(#( |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4756 |
wait |
3447 | 4757 |
) includes:sel) |
4758 |
ifTrue:[ |
|
4759 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
4760 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
4761 |
]. |
|
4762 |
||
4763 |
^ true |
|
4764 |
||
4765 |
"Created: / 17.11.2001 / 22:24:06 / cg" |
|
4766 |
"Modified: / 17.11.2001 / 22:41:42 / cg" |
|
4767 |
! |
|
4768 |
||
4769 |
showingContext2:aContext nesting:nesting |
|
939 | 4770 |
"return false, if this context is to be skipped. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4771 |
Here, we hide some well known methods, which are usually |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4772 |
not too interesting; |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4773 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 4774 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4775 |
|sel rec mClass |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4776 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4777 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4778 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 4779 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4780 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4781 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4782 |
sel := aContext selector. |
939 | 4783 |
mClass := aContext methodClass. |
4784 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4785 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4786 |
sender notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4787 |
senderSelector := sender selector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4788 |
senderReceiver := sender receiver. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4789 |
senderReceiverClass := senderReceiver class. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4790 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4791 |
|
939 | 4792 |
sel == #withCursor:do: ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4793 |
(mClass == WindowGroup) ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4794 |
(mClass == TopView) ifTrue:[^ false]. |
939 | 4795 |
]. |
4796 |
(sel == #withExecuteCursorDo: |
|
4797 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4798 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 4799 |
]. |
4800 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
4801 |
(sel == #do: |
6600 | 4802 |
or:[sel == #from:to:do: |
4803 |
or:[sel == #keysAndValuesDo:]]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4804 |
mClass == Array ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4805 |
mClass == OrderedCollection ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4806 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4807 |
(sel == #perform: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4808 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4809 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4810 |
or:[sel == #perform:with:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4811 |
or:[sel == #perform:with:with:with:with:]]]]) |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4812 |
ifTrue:[ |
1499
6ed7024b9929
show a perform: context, if its the top-one.
Claus Gittinger <cg@exept.de>
parents:
1486
diff
changeset
|
4813 |
nesting == 0 ifTrue:[^ true]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4814 |
mClass == Array ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4815 |
mClass == OrderedCollection ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4816 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4817 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4818 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4819 |
|
939 | 4820 |
(mClass == Object) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4821 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 4822 |
]. |
4823 |
||
4824 |
(mClass == Method) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4825 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 4826 |
]. |
4827 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
4828 |
(mClass == SmallInteger) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4829 |
(sel == #to:do:) ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4830 |
(sel == #to:by:do:) ifTrue:[^ false]. |
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
4831 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
4832 |
|
939 | 4833 |
(mClass == Block) ifTrue:[ |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4834 |
sel == #ensure: ifTrue:[^ false]. |
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4835 |
sel == #ifCurtailed: ifTrue:[^ false]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4836 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4837 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4838 |
sel == #on:do: ifTrue:[^ false]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4839 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4840 |
sel == #value ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4841 |
sel == #value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4842 |
sel == #value:value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4843 |
sel == #value:value:value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4844 |
sel == #value:value:value:value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4845 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4846 |
sel == #value:value:value:value:value:value: ifTrue:[^ false]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4847 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4848 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4849 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4850 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4851 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4852 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4853 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4854 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4855 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4856 |
"/ sel == #value:value:value:value:value:value: ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4857 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4858 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4859 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4860 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4861 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4862 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4863 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4864 |
aContext home notNil ifTrue:[ |
5271
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4865 |
aContext home receiver isLazyValue ifFalse:[ |
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4866 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4867 |
(aContext home selector == #wait) ifTrue:[^ false] |
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4868 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4869 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4870 |
] |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4871 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4872 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4873 |
(rec isExceptionHandler) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4874 |
sel == #handle:do: ifTrue:[^ false]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4875 |
sel == #handleDo: ifTrue:[^ false]. |
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4876 |
(sel startsWith:#raise) ifTrue:[^ false]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4877 |
sel == #answer:do: ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4878 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4879 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4880 |
sel == #doRaise ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4881 |
sel == #doCallHandler: ifTrue:[^ false]. |
2312 | 4882 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4883 |
senderReceiverClass == Signal ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4884 |
] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4885 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4886 |
(mClass == Context) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4887 |
sel == #unwind ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4888 |
sel == #unwind: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4889 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4890 |
(mClass == ProcessorScheduler) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4891 |
sel == #interruptActive ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4892 |
sel == #threadSwitch: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4893 |
sel == #suspend: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4894 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4895 |
mClass == Process ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4896 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4897 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4898 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4899 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4900 |
"Modified: / 15.1.1998 / 19:47:36 / cg" |
3447 | 4901 |
"Created: / 17.11.2001 / 19:34:20 / cg" |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4902 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4903 |
|
266 | 4904 |
stepping |
4905 |
^ stepping |
|
4906 |
! |
|
4907 |
||
4908 |
unstep |
|
4909 |
stepping := false. |
|
4910 |
bigStep := false. |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4911 |
steppedContext := wrapperContext := nil. |
266 | 4912 |
exitAction := nil |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
4913 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4914 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
266 | 4915 |
! |
4916 |
||
4917 |
updateContext |
|
4918 |
|oldContext idx| |
|
4919 |
||
4920 |
inspectedProcess state == #dead ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4921 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4922 |
^ self |
266 | 4923 |
]. |
4924 |
||
4925 |
oldContext := selectedContext. |
|
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
4926 |
[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4927 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4928 |
oldContext notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4929 |
contextArray notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4930 |
idx := contextArray identityIndexOf:oldContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4931 |
idx ~~ 0 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4932 |
self showSelection:idx |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4933 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4934 |
codeView contents:('** context returned **') |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4935 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4936 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4937 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4938 |
]. |
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
4939 |
] valueUninterruptably. |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
4940 |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4941 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
266 | 4942 |
! ! |
4943 |
||
5455 | 4944 |
!DebugView methodsFor:'private queries'! |
4945 |
||
4946 |
isAborting |
|
4947 |
^ exitAction == #abort |
|
4948 |
! ! |
|
4949 |
||
4859 | 4950 |
!DebugView methodsFor:'private-cache handling'! |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4951 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4952 |
cacheMyself |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4953 |
"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
|
4954 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4955 |
"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
|
4956 |
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
|
4957 |
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
|
4958 |
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
|
4959 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4960 |
windowGroup notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4961 |
windowGroup setProcess:nil. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4962 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4963 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4964 |
self releaseDebuggee. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4965 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
4966 |
cachable ~~ true ifTrue:[^ self]. |
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
4967 |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4968 |
"/ |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4969 |
"/ 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
|
4970 |
"/ |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4971 |
device == Display ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4972 |
exclusive ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4973 |
CachedExclusive := self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4974 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4975 |
CachedDebugger := self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4976 |
]. |
4892 | 4977 |
]. |
4978 |
||
4979 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
4980 |
ObjectMemory stepInterruptHandler:nil |
|
4981 |
]. |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4982 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4983 |
"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
|
4984 |
"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
|
4985 |
! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4986 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4987 |
isCached |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4988 |
"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
|
4989 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4990 |
CachedExclusive == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4991 |
^ true. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4992 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4993 |
CachedDebugger == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4994 |
^ true. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4995 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4996 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4997 |
^ false. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4998 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
4999 |
"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
|
5000 |
! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5001 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5002 |
releaseDebuggee |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5003 |
"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
|
5004 |
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
|
5005 |
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
|
5006 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5007 |
busy := false. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5008 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5009 |
codeView acceptAction:nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5010 |
codeView doItAction:nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5011 |
codeView contents:nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5012 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5013 |
receiverInspector release. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5014 |
contextInspector release. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5015 |
inspectedProcess := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5016 |
contextArray := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5017 |
selectedContext := actualContext := firstContext := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5018 |
steppedContext := wrapperContext := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5019 |
catchBlock := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5020 |
grabber := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5021 |
self autoUpdateOff. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5022 |
|
3447 | 5023 |
"Created: / 10.7.1997 / 14:57:51 / stefan" |
5024 |
"Modified: / 10.7.1997 / 15:50:38 / stefan" |
|
5025 |
"Modified: / 17.11.2001 / 22:58:17 / cg" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5026 |
! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5027 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5028 |
uncacheMyself |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5029 |
"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
|
5030 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5031 |
cachable := false. |
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5032 |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5033 |
CachedExclusive == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5034 |
CachedExclusive := nil. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5035 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5036 |
CachedDebugger == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5037 |
CachedDebugger := nil. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5038 |
]. |
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5039 |
OpenDebuggers notNil ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
5040 |
OpenDebuggers remove:self ifAbsent:[]. |
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5041 |
]. |
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5042 |
|
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5043 |
"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
|
5044 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5045 |
|
4859 | 5046 |
!DebugView methodsFor:'private-control loop'! |
266 | 5047 |
|
5048 |
controlLoop |
|
5049 |
"this is a kludge: |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5050 |
start a dispatchloop which exits when |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5051 |
either continue, return or step is pressed |
266 | 5052 |
" |
5053 |
||
5054 |
haveControl := true. |
|
664 | 5055 |
[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5056 |
[haveControl] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5057 |
self controlLoopCatchingErrors |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5058 |
]. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
5059 |
] ensure:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5060 |
catchBlock := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5061 |
haveControl := false |
266 | 5062 |
]. |
664 | 5063 |
|
5064 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 5065 |
! |
5066 |
||
5067 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
5068 |
"this is the debuggers own private event handling loop; |
1187 | 5069 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
5070 |
|
266 | 5071 |
"setup a self removing catch-block" |
5072 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
5073 |
||
5074 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5075 |
"if we do not have multiple processes or its a system process |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5076 |
we start another dispatch loop, which exits when |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5077 |
either continue, return or step is pressed |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5078 |
or (via the catchBlock) if an error occurs. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5079 |
Since our display is an extra exclusive one, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5080 |
all processing for normal views stops here ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5081 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5082 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5083 |
WindowGroup setActiveGroup:windowGroup. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5084 |
SignalSet anySignal handle:[:ex | |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5085 |
|signal| |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5086 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5087 |
signal := ex signal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5088 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5089 |
self showError:'*** Error in modal debugger: |
266 | 5090 |
|
334 | 5091 |
>>>> Signal: ' , signal printString , ' |
266 | 5092 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 5093 |
>>>> From: ' , ex suspendedContext sender printString , ' |
5094 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
5095 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
5096 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5097 |
>>>> : ' , ex suspendedContext sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5098 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5099 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5100 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5101 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5102 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5103 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5104 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5105 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5106 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 5107 |
>>>> Message: ' , ex description , ' |
266 | 5108 |
|
1187 | 5109 |
caught & ignored.'. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5110 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5111 |
] do:[ |
4816 | 5112 |
UserNotification handle:[:ex | |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5113 |
(ex signal == ActivityNotificationSignal) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5114 |
ex proceed |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5115 |
]. |
6361
d1145c85e0fb
oops - must proceed after catching a UserNotification
Claus Gittinger <cg@exept.de>
parents:
6275
diff
changeset
|
5116 |
self showError:ex description. |
d1145c85e0fb
oops - must proceed after catching a UserNotification
Claus Gittinger <cg@exept.de>
parents:
6275
diff
changeset
|
5117 |
ex proceed. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5118 |
] do:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5119 |
device dispatchModalWhile:[Processor activeProcess state:#debug. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5120 |
haveControl]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5121 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5122 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5123 |
WindowGroup setActiveGroup:nil. |
266 | 5124 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5125 |
"we do have multiple processes - |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5126 |
simply enter the DebugViews-Windowgroup event loop. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5127 |
effectively suspending event processing for the currently |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5128 |
active group. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5129 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5130 |
SignalSet anySignal handle:[:ex | |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5131 |
|answer signal eMsg| |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5132 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5133 |
signal := ex signal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5134 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5135 |
DebuggingDebugger ~~ true ifTrue:[ |
6172 | 5136 |
(signal == ActivityNotification) ifTrue:[ |
5137 |
ex proceed |
|
5138 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5139 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5140 |
"/ ignore recursive breakpoints |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5141 |
"/ |
3431 | 5142 |
(signal isControlInterrupt) ifTrue:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5143 |
ignoreBreakpoints == true ifTrue:[ |
3447 | 5144 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5145 |
ex proceed |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5146 |
]. |
1762
cd2bec8238fa
ignare halts while handling my own events.
Claus Gittinger <cg@exept.de>
parents:
1753
diff
changeset
|
5147 |
]. |
3447 | 5148 |
(signal == TerminateProcessRequest) ifTrue:[ |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5149 |
"/ mhm - someone wants to shoot me down while debugging ... |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5150 |
answer := Dialog |
3447 | 5151 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
5152 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5153 |
values:#( #proceed #close ) |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5154 |
default:#close. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5155 |
answer == #close ifTrue:[ |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5156 |
self destroy. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5157 |
ex reject |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5158 |
]. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5159 |
ex return. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5160 |
]. |
3447 | 5161 |
signal == RecursiveExceptionError ifTrue:[ |
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
5162 |
(ex parameter signal == BreakPointInterrupt) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5163 |
ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5164 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5165 |
ex proceed. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5166 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5167 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5168 |
self showError:'*** Recursive error in debugger: |
266 | 5169 |
|
5170 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 5171 |
>>>> ' , ex parameter signal printString , ' |
266 | 5172 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 5173 |
>>>> From: ' , ex suspendedContext sender printString , ' |
5174 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
5175 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
5176 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 5177 |
>>>> Message: ' , ex description , ' |
266 | 5178 |
|
1187 | 5179 |
caught & ignored.'. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5180 |
ex return |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5181 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5182 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5183 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5184 |
self topView raiseDeiconified. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5185 |
|
4816 | 5186 |
eMsg := ex description. |
3431 | 5187 |
(ex signal isControlInterrupt) ifTrue:[ |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5188 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5189 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5190 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5191 |
answer := Dialog |
3447 | 5192 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
5193 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5194 |
values:#( #proceed #cancel #debug ) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5195 |
default:#cancel. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5196 |
answer == #debug ifTrue:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5197 |
'DebugView [info]: cought exception - debugging' infoPrintCR. |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5198 |
Debugger |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5199 |
enterUnconditional:(ex suspendedContext) |
3447 | 5200 |
withMessage:'Error in debugger: ' , eMsg |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5201 |
mayProceed:true. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5202 |
ex proceed. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5203 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5204 |
answer == #proceed ifTrue:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5205 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5206 |
ex proceed. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5207 |
]. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5208 |
'DebugView [info]: cought exception - returning' infoPrintCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5209 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5210 |
] do:[ |
2358 | 5211 |
"/ make certain that sub-debuggers, inspectors etc. |
5212 |
"/ come up on my device. |
|
5213 |
Screen currentScreenQuerySignal answer:device |
|
5214 |
do:[ |
|
3447 | 5215 |
windowGroup |
5216 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
5217 |
true] |
|
5218 |
onLeave:[] |
|
2358 | 5219 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5220 |
]. |
266 | 5221 |
]. |
5222 |
catchBlock := nil. |
|
5223 |
||
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5224 |
"Created: / 24.11.1995 / 20:33:45 / cg" |
3447 | 5225 |
"Modified: / 18.11.2001 / 01:04:17 / cg" |
266 | 5226 |
! ! |
5227 |
||
0 | 5228 |
!DebugView methodsFor:'user interaction'! |
5229 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5230 |
checkIfCodeIsReallyModified |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5231 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5232 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5233 |
currentMethod isNil ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5234 |
^ false |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5235 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5236 |
currentMethod source string = codeView contents string ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5237 |
^ false |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5238 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5239 |
(currentMethod source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5240 |
^ false |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5241 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5242 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5243 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5244 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5245 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5246 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5247 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5248 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5249 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5250 |
checkSelectionChangeAllowed:newSelection |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5251 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5252 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5253 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5254 |
and:[newSelection = contextView selection]) ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5255 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5256 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5257 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5258 |
(self confirm:('Code modified - change selection anyway ?')) ifFalse:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5259 |
^ false |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5260 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5261 |
codeView modified:false. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5262 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5263 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5264 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5265 |
|
266 | 5266 |
codeAccept:someCode |
5267 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
5268 |
and including selected method cannot be continued." |
|
5269 |
||
3447 | 5270 |
^ self codeAccept:someCode unwind:true category:nil onCancel:nil |
5271 |
||
5272 |
"Modified: / 17.11.2001 / 21:53:38 / cg" |
|
266 | 5273 |
! |
5274 |
||
3447 | 5275 |
codeAccept:someCode unwind:doUnwind category:givenCategoryOrNil onCancel:cancelAction |
3427 | 5276 |
"user wants some code to be recompiled - must unwind stack since everything above |
5277 |
and including selected method cannot be continued." |
|
5278 |
||
5279 |
" |
|
5280 |
actually, this is not true, since the active methods will still be |
|
5281 |
executed correctly - however, the code shown in the debugger is no |
|
5282 |
longer in sync (showing the new code) with the executed code. |
|
5283 |
Therefore, we hide those contexts to avoid confusion .... |
|
5284 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
5285 |
||
5286 |
"walk up context chain and find highest context which is either the selected context, |
|
5287 |
or - if its a block-context - whose home is the selected context" |
|
5288 |
||
5289 |
|con top sel implementorClass method newMethod category| |
|
5290 |
||
5291 |
codeView withWaitCursorDo:[ |
|
5292 |
" |
|
5293 |
find the method-home context for this one |
|
5294 |
" |
|
5295 |
con := selectedContext. |
|
5296 |
top := con. |
|
5297 |
[con notNil] whileTrue:[ |
|
5298 |
(con methodHome == selectedContext) ifTrue:[ |
|
5299 |
top := con |
|
5300 |
]. |
|
5301 |
con := con sender |
|
5302 |
]. |
|
3447 | 5303 |
|
3427 | 5304 |
" |
5305 |
use class&selector to find the method for the compilation |
|
5306 |
and compile. |
|
5307 |
" |
|
3447 | 5308 |
category := givenCategoryOrNil. |
3427 | 5309 |
sel := selectedContext selector. |
5310 |
implementorClass := selectedContext methodClass. |
|
5311 |
implementorClass notNil ifTrue:[ |
|
3447 | 5312 |
category isNil ifTrue:[ |
5313 |
method := implementorClass compiledMethodAt:sel. |
|
5314 |
category := method category |
|
5315 |
] |
|
3427 | 5316 |
] ifFalse:[ |
5317 |
implementorClass := selectedContext receiver class. |
|
5318 |
implementorClass ~~ Object ifTrue:[ |
|
5319 |
implementorClass := Dialog |
|
3447 | 5320 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
3427 | 5321 |
initialAnswer:implementorClass name |
5322 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
5323 |
implementorClass size == 0 ifTrue:[ |
|
5324 |
^ cancelAction value "/ cancelled |
|
5325 |
]. |
|
3928 | 5326 |
implementorClass := Smalltalk classNamed:implementorClass. |
3427 | 5327 |
implementorClass isNil ifTrue:[ |
3447 | 5328 |
Dialog warn:'No such class'. |
3427 | 5329 |
^ cancelAction value "/ cancelled |
5330 |
]. |
|
5331 |
]. |
|
5332 |
]. |
|
5333 |
||
5334 |
"/ |
|
5335 |
"/ provide the classes nameSpace on a query; |
|
5336 |
"/ in case we accept while in another nameSpace context, |
|
5337 |
"/ (but for a class which is somewhere else) |
|
5338 |
"/ |
|
6171
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5339 |
(Class updateChangeFileQuerySignal, Class updateChangeListQuerySignal) answer:true |
3427 | 5340 |
do:[ |
6171
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5341 |
Class nameSpaceQuerySignal |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5342 |
answer:(implementorClass nameSpace) |
3427 | 5343 |
do:[ |
6171
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5344 |
codeView contents:someCode. |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5345 |
newMethod := implementorClass compilerClass |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5346 |
compile:someCode |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5347 |
forClass:implementorClass |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5348 |
inCategory:category |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5349 |
notifying:codeView. |
3427 | 5350 |
]. |
5351 |
]. |
|
5352 |
||
5353 |
inspecting ifFalse:[ |
|
5354 |
" |
|
5355 |
if it worked, remove everything up to and including top |
|
5356 |
from context chain |
|
5357 |
" |
|
5358 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
5359 |
codeView modified:false. |
|
5360 |
||
5361 |
doUnwind ifTrue:[ |
|
3447 | 5362 |
selectedContext canReturn ifTrue:[ |
5363 |
self setContext:(top "sender"). |
|
5364 |
exitAction := #restart. |
|
5365 |
selectedContext setLineNumber:1. |
|
5366 |
self doRestart. |
|
5367 |
] ifFalse:[ |
|
5368 |
self setContext:(top sender). |
|
5369 |
exitAction := #return. |
|
5370 |
]. |
|
3427 | 5371 |
|
5372 |
" |
|
5373 |
continue/step is no longer possible |
|
5374 |
" |
|
4120 | 5375 |
"/ continueButton disable. |
5376 |
"/ canContinue := false. |
|
3427 | 5377 |
]. |
3447 | 5378 |
|
5379 |
contextView selection:1. |
|
5380 |
"/ self showSelection:1. |
|
5381 |
"/ contextView makeSelectionVisible. "/ scrollToLine:(selection - 1) |
|
3427 | 5382 |
] ifFalse:[ |
5383 |
^ cancelAction value |
|
5384 |
] |
|
5385 |
]. |
|
5386 |
]. |
|
5387 |
||
3447 | 5388 |
"Created: / 17.11.2001 / 21:50:55 / cg" |
5389 |
"Modified: / 18.11.2001 / 00:12:29 / cg" |
|
3427 | 5390 |
! |
5391 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5392 |
confirm:aString |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5393 |
"redefined here, to answer true, if exclusice Debugger, which |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5394 |
cannot handle popup boxes" |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5395 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5396 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5397 |
^ true |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5398 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5399 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5400 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5401 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
5402 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
5403 |
"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
|
5404 |
Also sent to autoselect an interesting context on entry." |
0 | 5405 |
|
3447 | 5406 |
BreakPointInterrupt handle:[:ex | |
6215 | 5407 |
ignoreBreakpoints ifFalse:[ex reject]. |
3447 | 5408 |
'DebugView [info]: breakpoint in debugger ignored [doShowSelection.]' infoPrintCR. |
5409 |
ex proceed |
|
5410 |
] do:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5411 |
self updateForContext:lineNr |
3269 | 5412 |
]. |
5413 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
5414 |
|
3447 | 5415 |
"Modified: / 17.11.2001 / 22:12:16 / cg" |
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5416 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5417 |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5418 |
hideStackInspector |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5419 |
stackInspector notNil ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5420 |
stackInspector destroy. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5421 |
stackInspector := nil. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5422 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5423 |
contextInspector origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5424 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5425 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5426 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5427 |
processEvent:anEvent |
6129 | 5428 |
"filter keyboard events for popUp variable value display. |
5429 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5430 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5431 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5432 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5433 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5434 |
evView notNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5435 |
focusView := evView windowGroup focusView. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5436 |
focusView isNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5437 |
focusView := evView. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5438 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5439 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5440 |
anEvent isKeyPressEvent ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5441 |
key := anEvent key. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5442 |
rawKey := anEvent rawKey. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5443 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5444 |
inCodeView := (focusView == codeView |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5445 |
or:[focusView isComponentOf:codeView]). |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5446 |
inCodeView ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5447 |
key == #CodeCompletion ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5448 |
"/ complete the word before/under the cursor. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5449 |
"/ self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5450 |
"/ enqueueMessage:#codeCompletion |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5451 |
"/ for:self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5452 |
"/ arguments:#(). |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5453 |
^ true |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5454 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5455 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5456 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5457 |
|
3602 | 5458 |
false ifTrue:[ |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5459 |
anEvent isButtonReleaseEvent ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5460 |
anEvent view == codeView ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5461 |
(RBParser notNil and:[RBParser isLoaded]) |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5462 |
ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5463 |
self sensor |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5464 |
pushEvent:anEvent. "/ must be first in queue |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5465 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5466 |
self sensor |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5467 |
pushUserEvent:#explainSelection |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5468 |
for:self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5469 |
withArguments:nil. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5470 |
^ true "/ eaten |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5471 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5472 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5473 |
]. |
3602 | 5474 |
]. |
5475 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5476 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5477 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5478 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5479 |
|
1327 | 5480 |
showSelection:lineNr |
5481 |
"user clicked on a header line - show selected code in textView. |
|
5482 |
Also sent to autoselect an interesting context on entry." |
|
5483 |
||
5842 | 5484 |
Notification |
5485 |
handle: |
|
5486 |
[:ex | |
|
5879 | 5487 |
"/ ex suspendedContext fullPrintAll. |
5488 |
Transcript showCR:ex description. |
|
5489 |
"/ Transcript showCR:ex parameter. |
|
5842 | 5490 |
ex proceed |
5491 |
] |
|
5492 |
do: |
|
5493 |
[ |
|
5494 |
Error |
|
5495 |
handle: |
|
5496 |
[:ex | |
|
5497 |
|s con| |
|
5498 |
||
5499 |
ex signal isControlInterrupt |
|
5500 |
ifTrue: |
|
5501 |
[ |
|
5502 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' infoPrintCR. |
|
5503 |
ex proceed |
|
5504 |
]. |
|
5505 |
||
5506 |
'DebugView [info]: error when showing selection in debugger ignored' infoPrintCR. |
|
5507 |
||
5508 |
s := '' writeStream. |
|
5509 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
5510 |
s nextPutLine:'****'. |
|
5511 |
s nextPutAll: '**** '; nextPutLine:(ex description withCRs). |
|
5512 |
s nextPutLine:'****'. |
|
5513 |
con := ex suspendedContext. |
|
5514 |
s nextPutAll: '**** '; nextPutLine:(con printString). |
|
5515 |
con := con sender. |
|
5516 |
||
5517 |
con fullPrintAllOn:s. |
|
5518 |
||
5519 |
"/ [con notNil] whileTrue:[ |
|
5520 |
"/ Error catch:[:ex | |
|
5521 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
5522 |
"/ ]. |
|
4947 | 5523 |
"/ |
5842 | 5524 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
5525 |
"/ con := nil |
|
5526 |
"/ ] ifFalse:[ |
|
5527 |
"/ con := con sender. |
|
5528 |
"/ ] |
|
5529 |
"/ ]. |
|
5530 |
codeView contents:(s contents). |
|
5531 |
ex return. |
|
5532 |
] |
|
5533 |
do: |
|
5534 |
[ |
|
5535 |
self doShowSelection:lineNr |
|
5536 |
] |
|
5537 |
] |
|
1327 | 5538 |
|
3447 | 5539 |
"Modified: / 18.11.2001 / 00:02:32 / cg" |
1327 | 5540 |
! |
5541 |
||
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5542 |
showStackInspectorFor:con |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5543 |
stackInspector isNil ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5544 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5545 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5546 |
stackInspector := InspectorView |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5547 |
origin:(0.6 @ 0.0) |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5548 |
corner:(1.0 @ 1.0) |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5549 |
in:contextInspector superView. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5550 |
stackInspector realize. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5551 |
stackInspector fieldListLabel:'Stack'. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5552 |
stackInspector hideReceiver:true |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5553 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5554 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5555 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5556 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5557 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5558 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5559 |
"show selected code for lineNr in contextList in textView. |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5560 |
Also used to autoselect an interesting context on entry." |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5561 |
|
56 | 5562 |
|con homeContext sel method code canAccept |
105 | 5563 |
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
|
5564 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 5565 |
codeSet highlighter evaluatorClass |
3187 | 5566 |
canDefine| |
5567 |
||
5568 |
canDefine := false. |
|
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
5569 |
currentMethod := nil. |
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
5570 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5571 |
contextArray notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5572 |
lineNr <= contextArray size ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5573 |
con := contextArray at:lineNr. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5574 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5575 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5576 |
clicking on the '** ...'-line shows more ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5577 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5578 |
con isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5579 |
line := contextView list at:lineNr. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5580 |
(line startsWith:'**') ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5581 |
self showMore. |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
5582 |
lineNr >= contextArray size ifTrue:[ |
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
5583 |
contextView setSelection:lineNr. |
2299 | 5584 |
con := contextArray at:lineNr ifAbsent:nil |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
5585 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5586 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5587 |
con isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5588 |
codeView contents:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5589 |
^ self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5590 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5591 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5592 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5593 |
selectedContext := con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5594 |
m := contextView middleButtonMenu. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5595 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
5596 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5597 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5598 |
|
1661 | 5599 |
self withExecuteCursorDo:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5600 |
codeSet := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5601 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5602 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5603 |
give it to the (lower right) inspector |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5604 |
" |
6247 | 5605 |
Error handle:[:ex | |
5606 |
'DebugView [warning]: error while accessing context' errorPrintCR. |
|
5607 |
contextInspector inspect:nil. |
|
5608 |
ex reject. |
|
5609 |
] do:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5610 |
contextInspector inspect:con. |
3427 | 5611 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
6247 | 5612 |
]. |
1386
55632b45ced2
more skipping in dense backtrace
Claus Gittinger <cg@exept.de>
parents:
1372
diff
changeset
|
5613 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5614 |
"/ show a stack inspector sometimes |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5615 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5616 |
con hasStackToShow ifTrue:[ |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5617 |
self showStackInspectorFor:con |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5618 |
] ifFalse:[ |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5619 |
self hideStackInspector |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5620 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5621 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5622 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5623 |
get the home context |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5624 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5625 |
con isBlockContext ifTrue:[ |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5626 |
homeContext := con methodHome. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5627 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5628 |
homeContext := con |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5629 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5630 |
con canReturn ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5631 |
returnButton enable. restartButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5632 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5633 |
returnButton disable. restartButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5634 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5635 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5636 |
lineNrInMethod := con lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5637 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5638 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5639 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5640 |
homeContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5641 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5642 |
mhmh - an optimized block |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5643 |
should get the block here, and get the method from |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5644 |
that one ... |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5645 |
But in the current version, there is no easy way to get to the block |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5646 |
since that one is not in the context. |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5647 |
A future new block calling scheme will fix this |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5648 |
(passing the block instead of the home as block argument). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5649 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5650 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5651 |
"temporary kludge - peek into the sender context. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5652 |
If its a do-like method and there is a single block variable |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5653 |
in the args or temporaries, that must be the one. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5654 |
This helps in some cases. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5655 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5656 |
(sender := con sender) notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5657 |
tryVars := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5658 |
(selSender := sender selector) notNil ifTrue:[ |
3121
4cb4b3a3c1e2
allow accepting after a doesnot understand
Claus Gittinger <cg@exept.de>
parents:
3097
diff
changeset
|
5659 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5660 |
tryVars := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5661 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5662 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5663 |
tryVars ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5664 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5665 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5666 |
possibleBlocks size == 1 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5667 |
method := possibleBlocks first method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5668 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5669 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5670 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5671 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5672 |
"fetch rec here - so we wont need context in doItAction" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5673 |
rec := homeContext receiver. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5674 |
sel := homeContext selector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5675 |
sel notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5676 |
canAccept := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5677 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5678 |
implementorClass := homeContext methodClass. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5679 |
implementorClass isNil ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
5680 |
Error handle:[:ex | |
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
5681 |
ex signal == BreakPointInterrupt ifTrue:[ |
2397 | 5682 |
ex proceed. |
5683 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5684 |
code := 'error while asking method for its source'. |
2258 | 5685 |
code := code , Character cr , ex signal printString. |
5686 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
5687 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5688 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5689 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5690 |
] do:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5691 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5692 |
special: look if this context was created by |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5693 |
valueWithReceiver kind of method invocation; |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5694 |
if so, grab the method from the sender and show it |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5695 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5696 |
((sender := homeContext sender) notNil |
4947 | 5697 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5698 |
and:[sender receiver isMethod]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5699 |
method := sender receiver. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5700 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5701 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5702 |
(method := con method) notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5703 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5704 |
] |
5664 | 5705 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5706 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5707 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5708 |
method := implementorClass compiledMethodAt:sel. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5709 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5710 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5711 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5712 |
code isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5713 |
errMsg := nil. |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5714 |
method isNil ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5715 |
"/ fall back heuristics |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5716 |
con isBlockContext ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5717 |
((sender := con sender) notNil |
4947 | 5718 |
and:[((sender selector ? '') startsWith:'value') |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5719 |
and:[sender receiver isBlock]]) ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5720 |
code := sender receiver source. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5721 |
] |
5170
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5722 |
] ifFalse:[ |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5723 |
((sender := con sender) notNil |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5724 |
and:[((sender selector ? '') startsWith:'valueWith') |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5725 |
and:[sender receiver isMethod]]) ifTrue:[ |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5726 |
method := sender receiver. |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5727 |
] |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5728 |
] |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5729 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5730 |
method notNil ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
5731 |
Error handle:[:ex | |
3431 | 5732 |
ex signal isControlInterrupt ifTrue:[ |
2397 | 5733 |
ex proceed. |
5734 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5735 |
code := 'error while asking method for its source'. |
2258 | 5736 |
code := code , Character cr , ex signal printString. |
5737 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
5738 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5739 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5740 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5741 |
] do:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5742 |
self sensor shiftDown ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5743 |
code := method decompiledSource |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5744 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5745 |
code := method source. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5746 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5747 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5748 |
code isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5749 |
method sourceFilename notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5750 |
codeView contents:(resources |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5751 |
string:'** no sourcefile: %1 **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5752 |
with:method sourceFilename). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5753 |
codeView flash. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5754 |
codeSet := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5755 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5756 |
errMsg := '** no source **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5757 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5758 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5759 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5760 |
homeContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5761 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5762 |
] ifFalse:[ |
3187 | 5763 |
errMsg := '** no method - no source **'. |
5764 |
canDefine := true. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5765 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5766 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5767 |
errMsg notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5768 |
self showError:errMsg. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5769 |
codeSet := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5770 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5771 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5772 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5773 |
code isNil ifTrue:[ |
3121
4cb4b3a3c1e2
allow accepting after a doesnot understand
Claus Gittinger <cg@exept.de>
parents:
3097
diff
changeset
|
5774 |
"/ canAccept := false. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5775 |
codeSet ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5776 |
codeView contents:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5777 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5778 |
] ifFalse:[ |
2177 | 5779 |
lineNrInMethod == 0 ifTrue:[ |
5780 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
5781 |
lineNrInMethod := method lineNumber |
|
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5782 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5783 |
"/ guess lineNumber from sent-messages selector |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5784 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5785 |
lineNrInMethod == 0 ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5786 |
|conIdx sentContext messages| |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5787 |
|
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5788 |
conIdx := contextArray identityIndexOf:con. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5789 |
conIdx > 1 ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5790 |
sentContext := contextArray at:conIdx-1. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5791 |
sentContext isBlockContext ifFalse:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5792 |
(method notNil and:[code notNil]) ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5793 |
messages := method messagesSent. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5794 |
messages size == 1 ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5795 |
sentContext selector == messages first ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5796 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5797 |
] |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5798 |
] |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5799 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5800 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5801 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5802 |
]. |
2177 | 5803 |
]. |
5804 |
||
1555 | 5805 |
UserPreferences current syntaxColoring ifTrue:[ |
2709
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5806 |
implementorClass isNil ifTrue:[ |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5807 |
(con isBlockContext |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5808 |
and:[con home isNil |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5809 |
and:[con guessedHome notNil]]) |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5810 |
ifTrue:[ |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5811 |
implementorClass := con guessedHome mclass |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5812 |
] |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5813 |
]. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5814 |
implementorClass notNil ifTrue:[ |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5815 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
5504 | 5816 |
code size < 100000 ifTrue:[ |
5817 |
code := highlighter formatMethod:code in:implementorClass. |
|
5818 |
] |
|
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5819 |
] |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5820 |
] |
1555 | 5821 |
]. |
5822 |
||
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
5823 |
"/ code ~= (codeView contents) ifTrue:[ |
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
5824 |
codeView setContents:code. |
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
5825 |
"/ ]. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5826 |
(lineNrInMethod notNil |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5827 |
and:[lineNrInMethod ~~ 0 |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5828 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5829 |
(lineNrInMethod == 255 |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5830 |
and:[method notNil |
1960 | 5831 |
and:[method hasCode not]]) ifTrue:[ |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5832 |
"/ means: do not really know in interpreted methods |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5833 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5834 |
] ifFalse:[ |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5835 |
codeView selectLine:lineNrInMethod. |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5836 |
]. |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5837 |
codeView makeSelectionVisible |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5838 |
] ifFalse:[ |
1694 | 5839 |
codeView unselect. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5840 |
codeView scrollToTop |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5841 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5842 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5843 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5844 |
codeView acceptEnabled:canAccept. |
1695 | 5845 |
canAccept ifTrue:[ |
5846 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
5847 |
] ifFalse:[ |
|
6046
81b2da24a0b6
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
6034
diff
changeset
|
5848 |
codeView acceptAction:[:code | self beep] |
1695 | 5849 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5850 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5851 |
receiverInspector inspect:rec. |
3427 | 5852 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5853 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5854 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5855 |
the one below is wrong: currently, the |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5856 |
evaluator cannot handle passed contexts. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5857 |
Once it does, pass con as in:-arg |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5858 |
" |
2790 | 5859 |
(rec isJavaObject |
5860 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
5861 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
5862 |
evaluatorClass := Parser |
|
5863 |
] ifFalse:[ |
|
5864 |
evaluatorClass := rec class evaluatorClass |
|
5865 |
]. |
|
5866 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5867 |
codeView doItAction:[:theCode | |
2790 | 5868 |
evaluatorClass |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5869 |
evaluate:theCode |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5870 |
in:actualContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5871 |
receiver:rec |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5872 |
notifying:codeView |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5873 |
logged:true |
4122 | 5874 |
ifFail:nil |
5875 |
]. |
|
5876 |
currentMethod := method. |
|
5877 |
||
5878 |
selectedContext := homeContext. |
|
5879 |
actualContext := con |
|
5880 |
]. |
|
5881 |
] ifFalse:[ |
|
5882 |
codeView contents:nil. |
|
5883 |
]. |
|
5884 |
codeView modified:false. |
|
5885 |
||
5886 |
con isContext ifFalse:[ |
|
5887 |
sendButton disable. |
|
5888 |
] ifTrue:[ |
|
5889 |
sendButton enable. |
|
5890 |
]. |
|
5891 |
||
5892 |
"clear out locals to prevent keeping around unneeded contexts |
|
5893 |
(due to the block held in codeView). |
|
5894 |
(not really needed, since stuff gets collected away sooner or later ... |
|
5895 |
... but this makes it a bit sooner) |
|
5896 |
" |
|
5897 |
con := nil. |
|
5898 |
homeContext := nil. |
|
5899 |
||
5900 |
canDefine ifTrue:[ |
|
5901 |
defineButton beVisible. |
|
5902 |
] ifFalse:[ |
|
5903 |
defineButton beInvisible. |
|
5904 |
]. |
|
5905 |
||
5906 |
" |
|
5907 |
enable/disable some menu items |
|
5908 |
" |
|
5909 |
self updateMenuItems |
|
5910 |
||
5911 |
"Created: / 14.8.1997 / 20:15:00 / cg" |
|
5912 |
"Modified: / 18.11.2001 / 00:15:32 / cg" |
|
5913 |
! |
|
5914 |
||
5915 |
updateMenuItems |
|
5916 |
|m mthd cls mCls rCls| |
|
5917 |
||
5918 |
" |
|
5919 |
enable/disable some menu items |
|
5920 |
" |
|
5921 |
m := contextView middleButtonMenu. |
|
5922 |
m notNil ifTrue:[ |
|
5923 |
m disable:#removeBreakpoint. |
|
5924 |
m disable:#addBreakpoint. |
|
5925 |
canShowMore ifFalse:[ |
|
5926 |
m disable:#showMore |
|
5927 |
]. |
|
5928 |
||
5929 |
selectedContext notNil ifTrue:[ |
|
5930 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
5931 |
||
5932 |
mthd := selectedContext method. |
|
5933 |
mthd notNil ifTrue:[ |
|
5934 |
cls := mCls := mthd containingClass. |
|
5935 |
mthd isBreakpointed ifTrue:[ |
|
5936 |
m enable:#removeBreakpoint. |
|
5937 |
] ifFalse:[ |
|
5938 |
m enable:#addBreakpoint. |
|
5939 |
] |
|
5940 |
]. |
|
5941 |
rCls := selectedContext receiver class. |
|
5942 |
cls isNil ifTrue:[ |
|
5943 |
cls := rCls |
|
5944 |
]. |
|
5945 |
cls notNil ifTrue:[ |
|
5946 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5947 |
rCls == mCls ifTrue:[ |
|
5948 |
m disable:#browseReceiversClass |
|
5949 |
]. |
|
5950 |
mCls isNil ifTrue:[ |
|
5951 |
m disable:#browseImplementingClass |
|
5952 |
] |
|
5953 |
||
5954 |
] ifFalse:[ |
|
5955 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5956 |
]. |
|
5957 |
] ifFalse:[ |
|
5958 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5959 |
] |
|
5960 |
] |
|
5961 |
! ! |
|
5962 |
||
5963 |
!DebugView class methodsFor:'documentation'! |
|
5964 |
||
5965 |
version |
|
6600 | 5966 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.391 2006-02-22 14:02:11 cg Exp $' |
4122 | 5967 |
! ! |
5968 |
||
5969 |
DebugView initialize! |