author | Claus Gittinger <cg@exept.de> |
Mon, 21 May 2007 14:21:20 +0200 | |
changeset 7797 | b0bbe7932d47 |
parent 7796 | fe6f3d31c52a |
child 7822 | 3438bb87dda0 |
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 |
" |
|
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
13 |
|
0 | 14 |
StandardSystemView subclass:#DebugView |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
15 |
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
|
16 |
receiverInspector contextInspector contextArray selectedContext |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
17 |
catchBlock grabber mayProceed traceView tracing bigStep |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
18 |
skipLineNr steppedContextAddress abortButton terminateButton |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
19 |
continueButton stepButton nextButton nextOverButton nextOutButton |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
20 |
sendButton returnButton restartButton exclusive inspecting |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
21 |
nChainShown inspectedProcess updateProcess stopButton |
3187 | 22 |
updateButton defineButton monitorToggle stepping |
23 |
steppedContextLineno stepForReturn actualContext inWrap |
|
24 |
stackInspector steppedContext wrapperContext verboseBacktrace |
|
25 |
firstContext stepHow cachable currentMethod ignoreBreakpoints |
|
26 |
stepUntilEntering lastStepUntilEntering |
|
3269 | 27 |
lastSelectionInReceiverInspector lastSelectionInContextInspector |
6622
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
28 |
canShowMore exitAbort reportButton setOfHiddenCallingSelectors' |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
29 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
7632
dec23bc52ab8
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7628
diff
changeset
|
30 |
DebuggingDebugger VerboseBacktraceDefault |
3387 | 31 |
DefaultDebuggerBackgroundColor InitialNCHAINShown' |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
32 |
poolDictionaries:'' |
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
33 |
category:'Interface-Debugger' |
0 | 34 |
! |
35 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
36 |
!DebugView class methodsFor:'documentation'! |
29 | 37 |
|
38 |
copyright |
|
39 |
" |
|
40 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
41 |
All Rights Reserved |
29 | 42 |
|
43 |
This software is furnished under a license and may be used |
|
44 |
only in accordance with the terms of that license and with the |
|
45 |
inclusion of the above copyright notice. This software may not |
|
46 |
be provided or otherwise made available to, or used by, any |
|
47 |
other person. No title to or ownership of the software is |
|
48 |
hereby transferred. |
|
49 |
" |
|
50 |
! |
|
0 | 51 |
|
29 | 52 |
documentation |
53 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
54 |
This class implements a graphical debugger interface. |
29 | 55 |
The debugger usually sits on top of the faulting process, |
2358 | 56 |
taking over its event processing. |
57 |
(this is different from other Smalltalk debuggers, which control |
|
58 |
the debuggee as a separate process. Consider this an historic |
|
59 |
leftover - the debugger was one of the first applications written for |
|
60 |
ST/X; however, why should we change it without a particular need ...). |
|
61 |
||
62 |
Only the 'stopped' debugged process is affected; |
|
29 | 63 |
other processes continue to respond to events. |
64 |
||
65 |
The one exception is when an error occurs within the dispatcher process |
|
66 |
or in one of the eventhandler processes - in this case, the debugger |
|
67 |
will sit on an exclusive display connection. |
|
68 |
||
69 |
The whole debugging will be changed, once the required process primitives |
|
70 |
are available, which allow control of another processes execution |
|
71 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
72 |
to have the debugger control the debuggee (i.e. two processes) |
|
35 | 73 |
|
74 |
See additional information in 'doc/misc/debugger.doc'. |
|
53 | 75 |
|
76 |
Notice: the DebugView class caches the last used debugger in a class |
|
77 |
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
|
78 |
a halfway destroyed one) is kept there. You will notice this, if a |
53 | 79 |
debugger comes up without showing any contents. In this case, close |
80 |
(or destroy) the broken debugView, and execute |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
81 |
Debugger newDebugger |
53 | 82 |
which removes the cached debugger and forces creation of a new one the |
83 |
next time. This is a temporary workaround - the debugger will be fixed to |
|
84 |
avoid this problem. |
|
508 | 85 |
|
86 |
[author:] |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
87 |
Claus Gittinger |
508 | 88 |
|
89 |
[see also:] |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
90 |
Exception Signal |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
91 |
Process |
29 | 92 |
" |
93 |
! ! |
|
0 | 94 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
95 |
!DebugView class methodsFor:'initialization'! |
243 | 96 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
97 |
initialize |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
98 |
InitialNCHAINShown := 20. |
3387 | 99 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
100 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
101 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
102 |
"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
|
103 |
"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
|
104 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
105 |
|
243 | 106 |
reinitialize |
107 |
self newDebugger |
|
108 |
! ! |
|
109 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
110 |
!DebugView class methodsFor:'instance creation'! |
0 | 111 |
|
2421 | 112 |
enter |
113 |
"enter a debugger" |
|
114 |
||
5455 | 115 |
<context: #return> |
116 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
117 |
self enter:thisContext sender withMessage:'debugger entered' mayProceed:true. |
2421 | 118 |
! |
119 |
||
2355 | 120 |
enter:aContext withMessage:aString |
121 |
"enter a debugger" |
|
122 |
||
5455 | 123 |
<context: #return> |
124 |
||
2355 | 125 |
^ self |
126 |
enter:aContext |
|
127 |
withMessage:aString |
|
128 |
mayProceed:true |
|
129 |
! |
|
130 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
131 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 132 |
"enter a debugger; if this is a recursive invocation, enter |
133 |
a MiniDebugger instead. |
|
134 |
This is the standard way of entering the debugger; |
|
135 |
sent from error- and halt messages." |
|
0 | 136 |
|
3447 | 137 |
<context: #return> |
138 |
||
3702 | 139 |
|active| |
93 | 140 |
|
57 | 141 |
StepInterruptPending := nil. |
3998 | 142 |
ControlInterrupt handle:[:ex | |
4676
c809ebc38db9
more info on an ignored breakpoint
Claus Gittinger <cg@exept.de>
parents:
4644
diff
changeset
|
143 |
'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
|
144 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
3998 | 145 |
ex proceed |
146 |
] do:[ |
|
147 |
" |
|
148 |
well, it could be a stepping or sending debugger up there; |
|
149 |
in this case, return to it. This happens, when a stepping process |
|
150 |
runs into an error (for example, a halt). In this case, we want the |
|
151 |
stepping debugger to come up again instead of a new one. |
|
152 |
" |
|
153 |
OpenDebuggers notNil ifTrue:[ |
|
154 |
active := Processor activeProcess. |
|
155 |
OpenDebuggers do:[:aDebugger | |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
156 |
(aDebugger inspectedProcess == active) ifTrue:[ |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
157 |
aDebugger device isOpen ifTrue:[ |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
158 |
"/ 'entering stepping debugger again' printNL. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
159 |
aDebugger unstep. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
160 |
aDebugger setLabelFor:aString in:active. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
161 |
aDebugger mayProceed:mayProceed. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
162 |
^ aDebugger enter:aContext select:nil. |
2426 | 163 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
164 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
165 |
] |
3998 | 166 |
]. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
167 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
168 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 169 |
|
3447 | 170 |
"Modified: / 18.11.2001 / 00:48:03 / cg" |
53 | 171 |
! |
172 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
173 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 174 |
"enter a debugger - do not check for recursive invocation" |
175 |
||
5455 | 176 |
<context: #return> |
177 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
178 |
|aDebugger| |
266 | 179 |
|
180 |
StepInterruptPending := nil. |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
181 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
182 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
183 |
"/ to avoid recursive debugging ... |
3447 | 184 |
ControlInterrupt handle:[:ex | |
185 |
'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
|
186 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
187 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
188 |
] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
189 |
aDebugger := self new. |
3447 | 190 |
]. |
191 |
||
192 |
aDebugger isNil ifTrue:[ |
|
193 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
|
194 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
195 |
mayProceed ifTrue:[ |
|
196 |
(Dialog confirm:'Error/Breakpoint cought.\\Press Continue or Abort.' withCRs |
|
197 |
yesLabel:'Continue' noLabel:'Abort') |
|
198 |
ifTrue:[ |
|
199 |
^ nil |
|
200 |
]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
201 |
] ifFalse:[ |
3447 | 202 |
self information:'Error cought.\\Press OK to abort the operation.' withCRs. |
203 |
]. |
|
204 |
AbortOperationRequest raise. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
205 |
"not reached" |
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
206 |
]. |
3447 | 207 |
|
208 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
209 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 210 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
211 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
212 |
|
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 |
nil halt |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
215 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
216 |
|
3447 | 217 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 218 |
! |
219 |
||
6430 | 220 |
enterWithMessage:message |
221 |
"enter a debugger" |
|
222 |
||
223 |
<context: #return> |
|
224 |
||
225 |
self enter:(thisContext sender) withMessage:message mayProceed:true. |
|
226 |
! |
|
227 |
||
266 | 228 |
new |
2358 | 229 |
"return a new DebugView. |
230 |
- return a cached debugger if it already exists. |
|
231 |
Also, care for remote displays on which no debugger is wanted |
|
232 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
233 |
||
234 |
|debugger currentScreen debuggerDevice| |
|
235 |
||
236 |
currentScreen := Screen current. |
|
14 | 237 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
238 |
currentScreen notNil ifTrue:[ |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
239 |
(currentScreen suppressDebugger) ifTrue:[ |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
240 |
"/ 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
|
241 |
^ nil. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
242 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
243 |
(currentScreen mayOpenDebugger) ifFalse:[ |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
244 |
"/ 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
|
245 |
currentScreen := Screen default. |
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
246 |
]. |
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 |
|
266 | 249 |
" |
250 |
need a blocking debugger if no processes or |
|
251 |
or if its a timing/interrupt process |
|
252 |
(because otherwise we would not get any events here ... |
|
253 |
" |
|
254 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
255 |
((debugger := CachedExclusive) isNil |
2426 | 256 |
or:[debugger device ~~ currentScreen |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
257 |
or:[currentScreen isNil |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
258 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
259 |
debugger := self newExclusive |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
260 |
]. |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
261 |
CachedExclusive := nil. |
266 | 262 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
263 |
CachedDebugger notNil ifTrue:[ |
2358 | 264 |
(CachedDebugger device ~~ currentScreen |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
265 |
or:[currentScreen isNil |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
266 |
or:[currentScreen isOpen not]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
267 |
CachedDebugger := nil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
268 |
] |
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 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
271 |
(debugger := CachedDebugger) notNil ifTrue:[ |
2358 | 272 |
CachedDebugger := nil. |
273 |
] ifFalse:[ |
|
274 |
debuggerDevice := currentScreen. |
|
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
275 |
debuggerDevice isNil ifTrue:[ |
2352 | 276 |
"/ use the default display |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
277 |
debuggerDevice := Screen default. |
2358 | 278 |
]. |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
279 |
(debuggerDevice isNil |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
280 |
or:[debuggerDevice isOpen not |
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
281 |
"/ or:[debuggerDevice mayOpenDebugger not] |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
282 |
]) ifTrue:[ |
2554
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
283 |
"/ no debugger |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
284 |
^ nil. |
0e37316a8787
Do not try to use an unconnected display
Stefan Vogel <sv@exept.de>
parents:
2476
diff
changeset
|
285 |
]. |
2358 | 286 |
|
287 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
288 |
do:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
289 |
debugger := super new. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
290 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
291 |
debugger label:'Debugger'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
292 |
debugger icon:self defaultIcon. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
293 |
] |
266 | 294 |
]. |
73 | 295 |
^ debugger |
875 | 296 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
297 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 298 |
! |
0 | 299 |
|
266 | 300 |
newExclusive |
301 |
"return a debugger for exclusive display access" |
|
302 |
||
303 |
|debugger| |
|
105 | 304 |
|
266 | 305 |
debugger := super new. |
306 |
debugger label:'Debugger'. |
|
875 | 307 |
debugger icon:self defaultIcon. |
266 | 308 |
debugger exclusive:true. |
309 |
^ debugger |
|
875 | 310 |
|
311 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 312 |
! |
313 |
||
29 | 314 |
openOn:aProcess |
315 |
"start a debugger on aProcess |
|
316 |
(actually not more than a good-looking inspector)" |
|
15 | 317 |
|
52 | 318 |
|aDebugger label nm| |
15 | 319 |
|
320 |
aDebugger := super new. |
|
875 | 321 |
aDebugger icon:self defaultIcon. |
29 | 322 |
aProcess notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
323 |
nm := aProcess name. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
324 |
nm notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
325 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
326 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
327 |
nm := aProcess id printString |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
328 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
329 |
label := 'Debugger [' , nm , ']'. |
29 | 330 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
331 |
label := 'no process' |
29 | 332 |
]. |
1114 | 333 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 334 |
aDebugger openOn:aProcess. |
335 |
^ nil |
|
875 | 336 |
|
1114 | 337 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 338 |
! ! |
339 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
340 |
!DebugView class methodsFor:'cleanup'! |
485 | 341 |
|
342 |
lowSpaceCleanup |
|
343 |
"in low memory situations, give up cached debuggers" |
|
344 |
||
345 |
CachedDebugger := nil. |
|
346 |
CachedExclusive := nil. |
|
347 |
OpenDebuggers := nil. |
|
348 |
||
349 |
" |
|
350 |
DebugView lowSpaceCleanup |
|
351 |
" |
|
352 |
||
353 |
"Modified: 18.4.1996 / 16:48:03 / cg" |
|
354 |
! |
|
355 |
||
356 |
newDebugger |
|
2358 | 357 |
"force creation of a new debugger (give up cached debuggers)" |
485 | 358 |
|
359 |
CachedDebugger := nil. |
|
360 |
CachedExclusive := nil. |
|
361 |
OpenDebuggers := nil. |
|
362 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
363 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
4356 | 364 |
Debugger := self |
365 |
]. |
|
366 |
||
485 | 367 |
" |
368 |
DebugView newDebugger |
|
369 |
" |
|
370 |
! ! |
|
371 |
||
875 | 372 |
!DebugView class methodsFor:'defaults'! |
373 |
||
374 |
defaultIcon |
|
7632
dec23bc52ab8
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7628
diff
changeset
|
375 |
"return the browsers default window icon" |
dec23bc52ab8
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7628
diff
changeset
|
376 |
|
dec23bc52ab8
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7628
diff
changeset
|
377 |
<resource: #programImage> |
dec23bc52ab8
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7628
diff
changeset
|
378 |
|
7647 | 379 |
^ ToolbarIconLibrary debug22x22Icon |
380 |
"/ ^ ToolbarIconLibrary debugIt20x20Icon |
|
381 |
||
382 |
"Modified: / 11-02-2007 / 11:47:20 / cg" |
|
937
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
383 |
! |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
384 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
385 |
defaultVerboseBacktrace |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
386 |
^ VerboseBacktraceDefault |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
387 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
388 |
"Created: 11.1.1997 / 12:14:35 / cg" |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
389 |
! |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
390 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
391 |
defaultVerboseBacktrace:aBoolean |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
392 |
VerboseBacktraceDefault := aBoolean |
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
393 |
|
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
394 |
"Created: 11.1.1997 / 12:14:44 / cg" |
3441 | 395 |
! |
396 |
||
397 |
updateStyleCache |
|
6136 | 398 |
"extract values from the styleSheet and cache them in class variables" |
399 |
||
400 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
401 |
||
3441 | 402 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
403 |
||
404 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
875 | 405 |
! ! |
406 |
||
3269 | 407 |
!DebugView class methodsFor:'menu specs'! |
408 |
||
409 |
menuSpec |
|
410 |
"This resource specification was automatically generated |
|
411 |
by the MenuEditor of ST/X." |
|
412 |
||
413 |
"Do not manually edit this!! If it is corrupted, |
|
414 |
the MenuEditor may not be able to read the specification." |
|
415 |
||
416 |
" |
|
417 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
418 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
419 |
" |
|
420 |
||
421 |
<resource: #menu> |
|
422 |
||
423 |
^ |
|
5875 | 424 |
#(Menu |
425 |
( |
|
426 |
(MenuItem |
|
427 |
label: 'View' |
|
428 |
translateLabel: true |
|
429 |
submenu: |
|
430 |
(Menu |
|
431 |
( |
|
432 |
(MenuItem |
|
433 |
enabled: canShowMore |
|
434 |
label: 'Show more WalkBack' |
|
435 |
itemValue: showMore |
|
436 |
translateLabel: true |
|
5110 | 437 |
) |
5875 | 438 |
(MenuItem |
439 |
label: 'Show verbose WalkBack' |
|
440 |
itemValue: toggleVerboseWalkback |
|
441 |
translateLabel: true |
|
442 |
isVisible: showingDenseWalkback |
|
5110 | 443 |
) |
5875 | 444 |
(MenuItem |
445 |
label: 'Show dense WalkBack' |
|
446 |
itemValue: toggleVerboseWalkback |
|
447 |
translateLabel: true |
|
448 |
isVisible: showingVerboseWalkback |
|
5110 | 449 |
) |
5875 | 450 |
(MenuItem |
451 |
label: '-' |
|
5110 | 452 |
) |
5875 | 453 |
(MenuItem |
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
454 |
label: 'Raise Debugger when Entering' |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
455 |
itemValue: autoRaiseView: |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
456 |
translateLabel: true |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
457 |
indication: autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
458 |
) |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
459 |
(MenuItem |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
460 |
label: '-' |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
461 |
) |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
462 |
(MenuItem |
5875 | 463 |
label: 'Exit' |
464 |
itemValue: closeRequest |
|
465 |
translateLabel: true |
|
466 |
isVisible: isInspecting |
|
5110 | 467 |
) |
5875 | 468 |
(MenuItem |
469 |
label: 'Close Debugger and Abort' |
|
470 |
itemValue: closeRequest |
|
471 |
translateLabel: true |
|
472 |
isVisible: isNotInspecting |
|
5110 | 473 |
) |
474 |
) |
|
475 |
nil |
|
476 |
nil |
|
477 |
) |
|
478 |
) |
|
5875 | 479 |
(MenuItem |
480 |
label: 'Process' |
|
481 |
translateLabel: true |
|
482 |
submenu: |
|
483 |
(Menu |
|
484 |
( |
|
485 |
(MenuItem |
|
486 |
label: 'Continue' |
|
487 |
itemValue: doContinue |
|
488 |
translateLabel: true |
|
3269 | 489 |
) |
5875 | 490 |
(MenuItem |
491 |
label: '-' |
|
3269 | 492 |
) |
5875 | 493 |
(MenuItem |
494 |
label: 'Abort' |
|
495 |
itemValue: doAbort |
|
496 |
translateLabel: true |
|
3269 | 497 |
) |
5875 | 498 |
(MenuItem |
6487 | 499 |
enabled: abortAllIsHandled |
500 |
label: 'Abort All' |
|
501 |
itemValue: doAbortAll |
|
502 |
translateLabel: true |
|
503 |
) |
|
504 |
(MenuItem |
|
5875 | 505 |
label: '-' |
3269 | 506 |
) |
5875 | 507 |
(MenuItem |
508 |
label: 'Terminate' |
|
509 |
itemValue: doTerminate |
|
510 |
translateLabel: true |
|
3269 | 511 |
) |
512 |
) |
|
513 |
nil |
|
514 |
nil |
|
515 |
) |
|
516 |
) |
|
5875 | 517 |
(MenuItem |
518 |
label: 'Context' |
|
519 |
translateLabel: true |
|
520 |
submenu: |
|
521 |
(Menu |
|
522 |
( |
|
523 |
(MenuItem |
|
524 |
enabled: canReturn |
|
525 |
label: 'Return' |
|
526 |
itemValue: doReturn |
|
527 |
translateLabel: true |
|
528 |
) |
|
529 |
(MenuItem |
|
530 |
enabled: canRestart |
|
531 |
label: 'Restart' |
|
532 |
itemValue: doRestart |
|
533 |
translateLabel: true |
|
3447 | 534 |
) |
5875 | 535 |
(MenuItem |
536 |
label: '-' |
|
3447 | 537 |
) |
5875 | 538 |
(MenuItem |
539 |
enabled: hasContextSelected |
|
540 |
label: 'Inspect' |
|
541 |
itemValue: inspectContext |
|
542 |
translateLabel: true |
|
3447 | 543 |
) |
5875 | 544 |
(MenuItem |
545 |
label: 'Copy WalkBack Text' |
|
546 |
itemValue: copyWalkbackText |
|
547 |
translateLabel: true |
|
3447 | 548 |
) |
5875 | 549 |
(MenuItem |
550 |
label: 'Bookmark Method in SystemBrowser' |
|
551 |
itemValue: addBrowserBookmark |
|
552 |
translateLabel: true |
|
3447 | 553 |
) |
554 |
) |
|
555 |
nil |
|
556 |
nil |
|
557 |
) |
|
558 |
) |
|
5875 | 559 |
(MenuItem |
560 |
label: 'Class' |
|
561 |
translateLabel: true |
|
562 |
submenu: |
|
563 |
(Menu |
|
564 |
( |
|
565 |
(MenuItem |
|
566 |
enabled: canBrowseImplementingClass |
|
567 |
label: 'Browse Implementing Class' |
|
568 |
itemValue: browseImplementingClass |
|
569 |
translateLabel: true |
|
3269 | 570 |
) |
5875 | 571 |
(MenuItem |
572 |
enabled: canBrowseReceiversClass |
|
573 |
label: 'Browse Receivers Class' |
|
574 |
itemValue: browseReceiversClass |
|
575 |
translateLabel: true |
|
3269 | 576 |
) |
5875 | 577 |
(MenuItem |
578 |
label: '-' |
|
3269 | 579 |
) |
5875 | 580 |
(MenuItem |
581 |
enabled: canBrowseClassHierarchy |
|
582 |
label: 'Browse Receivers Class Hierarchy' |
|
583 |
itemValue: browseClassHierarchy |
|
584 |
translateLabel: true |
|
3269 | 585 |
) |
5875 | 586 |
(MenuItem |
587 |
enabled: canBrowseFullClassProtocol |
|
588 |
label: 'Browse Receivers Full Protocol' |
|
589 |
itemValue: browseFullClassProtocol |
|
590 |
translateLabel: true |
|
3269 | 591 |
) |
592 |
) |
|
593 |
nil |
|
594 |
nil |
|
595 |
) |
|
596 |
) |
|
5875 | 597 |
(MenuItem |
598 |
label: 'Selector' |
|
599 |
translateLabel: true |
|
600 |
submenu: |
|
601 |
(Menu |
|
602 |
( |
|
603 |
(MenuItem |
|
604 |
label: 'Browse Implementors...' |
|
605 |
itemValue: browseImplementorsOf |
|
606 |
translateLabel: true |
|
3269 | 607 |
) |
5875 | 608 |
(MenuItem |
609 |
label: 'Browse Senders...' |
|
610 |
itemValue: browseSendersOf |
|
611 |
translateLabel: true |
|
3269 | 612 |
) |
5875 | 613 |
(MenuItem |
614 |
label: '-' |
|
3269 | 615 |
) |
5875 | 616 |
(MenuItem |
617 |
enabled: canDefineMethod |
|
618 |
label: 'Define' |
|
619 |
itemValue: doDefineMethod |
|
620 |
translateLabel: true |
|
3269 | 621 |
) |
622 |
) |
|
623 |
nil |
|
624 |
nil |
|
625 |
) |
|
626 |
) |
|
5875 | 627 |
(MenuItem |
628 |
label: 'Breakpoint' |
|
629 |
translateLabel: true |
|
630 |
submenu: |
|
631 |
(Menu |
|
632 |
( |
|
633 |
(MenuItem |
|
634 |
enabled: canRemoveBreakpoint |
|
635 |
label: 'Remove' |
|
636 |
itemValue: removeBreakpoint |
|
637 |
translateLabel: true |
|
3269 | 638 |
) |
5875 | 639 |
(MenuItem |
640 |
label: 'Remove all Breakpoints' |
|
641 |
itemValue: removeAllBreakpoints |
|
642 |
translateLabel: true |
|
3511 | 643 |
) |
5875 | 644 |
(MenuItem |
645 |
label: '-' |
|
3511 | 646 |
) |
5875 | 647 |
(MenuItem |
648 |
enabled: canAddBreakpoint |
|
649 |
label: 'Add' |
|
650 |
itemValue: addBreakpoint |
|
651 |
translateLabel: true |
|
3269 | 652 |
) |
5875 | 653 |
(MenuItem |
654 |
label: '-' |
|
3269 | 655 |
) |
5875 | 656 |
(MenuItem |
657 |
label: 'Allow Breakpoints in Debugger' |
|
658 |
itemValue: allowBreakPointsInDebugger: |
|
659 |
translateLabel: true |
|
660 |
indication: allowBreakPointsInDebugger |
|
3269 | 661 |
) |
662 |
) |
|
663 |
nil |
|
664 |
nil |
|
665 |
) |
|
666 |
) |
|
5875 | 667 |
(MenuItem |
668 |
label: 'Help' |
|
669 |
translateLabel: true |
|
670 |
startGroup: right |
|
671 |
submenu: |
|
672 |
(Menu |
|
673 |
( |
|
674 |
(MenuItem |
|
675 |
label: 'Debuggers Documentation' |
|
676 |
itemValue: openHTMLDocument: |
|
677 |
translateLabel: true |
|
678 |
argument: 'tools/debugView/TOP.html' |
|
3269 | 679 |
) |
5875 | 680 |
(MenuItem |
681 |
label: '-' |
|
3269 | 682 |
) |
5875 | 683 |
(MenuItem |
684 |
label: 'About DebugView...' |
|
685 |
itemValue: openAboutThisApplication |
|
686 |
translateLabel: true |
|
3269 | 687 |
) |
688 |
) |
|
689 |
nil |
|
690 |
nil |
|
691 |
) |
|
692 |
) |
|
693 |
) |
|
694 |
nil |
|
695 |
nil |
|
696 |
) |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
697 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
698 |
"Modified: / 15-05-2007 / 13:31:52 / cg" |
3269 | 699 |
! ! |
700 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
701 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
702 |
|
4121 | 703 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
704 |
"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
|
705 |
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
|
706 |
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
|
707 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
708 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
709 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
710 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
711 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
712 |
someContexts := Array new:25. |
2042 | 713 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
714 |
idx := 1. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
715 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
716 |
someContexts at:idx put:con. |
2042 | 717 |
con := con sender. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
718 |
idx := idx + 1. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
719 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
720 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
721 |
^ someContexts at:idx. |
3447 | 722 |
! |
723 |
||
724 |
interestingContextIndexIn:aContextArray |
|
725 |
"return an interesting contexts offset, or nil. |
|
726 |
This is the context initially shown in the walkback. |
|
727 |
We move up the calling chain, skipping all intermediate Signal |
|
728 |
and Exception contexts, to present the context in which the error |
|
729 |
actually occured. |
|
730 |
Just for your convenience :-)" |
|
731 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
732 |
|con found offset sel prev ex rcvr nMax idx| |
3447 | 733 |
|
7713 | 734 |
"/ Transcript showCR:aContextArray. |
7648 | 735 |
|
3447 | 736 |
nMax := aContextArray size. |
737 |
nMax <= 1 ifTrue:[^ 1]. |
|
738 |
con := aContextArray at:1. |
|
739 |
con isBlockContext ifTrue:[^ 1]. |
|
740 |
||
741 |
"/ somewhere, at the bottom, there must be a raise ... |
|
742 |
"/ find the exception |
|
743 |
||
744 |
1 to:5 do:[:i | |
|
745 |
con := aContextArray at:i ifAbsent:nil. |
|
746 |
con notNil ifTrue:[ |
|
747 |
||
748 |
sel := con selector. |
|
749 |
((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
|
750 |
^ i + 1 |
|
751 |
]. |
|
752 |
((sel == #raise) or:[sel == #raiseRequest]) ifTrue:[ |
|
753 |
rcvr := con receiver. |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
754 |
(rcvr isLazyValue not and:[rcvr isException]) ifTrue:[ |
3447 | 755 |
ex := rcvr. |
756 |
offset := i. |
|
757 |
found := con |
|
758 |
] ifFalse:[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
759 |
(rcvr isLazyValue not and:[rcvr isExceptionCreator]) ifTrue:[ |
3447 | 760 |
offset := i. |
761 |
found := con |
|
762 |
] |
|
763 |
] |
|
764 |
]. |
|
765 |
]. |
|
766 |
]. |
|
767 |
||
768 |
" |
|
769 |
if this is a noHandler exception, skip forward |
|
770 |
to the erronous context |
|
771 |
" |
|
772 |
ex notNil ifTrue:[ |
|
773 |
ex signal == Signal noHandlerSignal ifTrue:[ |
|
774 |
found := ex suspendedContext |
|
775 |
] |
|
776 |
]. |
|
777 |
||
778 |
found isNil ifTrue:[ |
|
779 |
"/ this is a kludge, but convenient. |
|
6579 | 780 |
"/ show the place where the error (divisionByZero...) happend, |
3447 | 781 |
"/ not where the signal was raised. |
782 |
sel := (aContextArray at:1) methodHome selector. |
|
783 |
||
784 |
"/ typically a DivisionByZero - show caller of division |
|
785 |
(sel == #// |
|
786 |
or:[sel == #/ |
|
787 |
or:[sel == #\\]]) ifTrue:[ |
|
788 |
^ 2 |
|
789 |
]. |
|
790 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
791 |
"/ show the place of the bad message; not where the Signal was raised... |
3447 | 792 |
(sel == #doesNotUnderstand:) ifTrue:[ |
793 |
^ 3 min:nMax |
|
794 |
]. |
|
795 |
||
796 |
"/ show the bad method; not where the Signal was raised... |
|
797 |
(sel == #noByteCode) ifTrue:[ |
|
798 |
^ 2 |
|
799 |
]. |
|
800 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
801 |
"/ show the place of the halt; not where the HaltSignal was raised... |
3447 | 802 |
((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
803 |
^ 2 |
|
804 |
]. |
|
805 |
||
7713 | 806 |
"/ show the place of the halt; not where the HaltSignal was raised... |
807 |
(sel == #shouldImplement) ifTrue:[ |
|
808 |
^ 2 |
|
809 |
]. |
|
810 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
811 |
"/ show the place of error-call; not where the ErrorSignal was raised... |
7648 | 812 |
((sel == #error:mayProceed:) |
813 |
or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
|
3447 | 814 |
nMax > 2 ifTrue:[ |
815 |
sel := (aContextArray at:2) selector. |
|
816 |
sel == #mustBeBoolean ifTrue:[ |
|
817 |
^ 3 |
|
818 |
]. |
|
5896
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
819 |
sel == #assert:message: ifTrue:[ |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
820 |
nMax > 3 ifTrue:[ |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
821 |
sel := (aContextArray at:3) selector. |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
822 |
sel == #assert: ifTrue:[ |
6579 | 823 |
nMax > 4 ifTrue:[ |
824 |
sel := (aContextArray at:4) selector. |
|
825 |
sel == #deny: ifTrue:[ |
|
826 |
^ 5 |
|
827 |
] |
|
828 |
]. |
|
5896
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
829 |
^ 4 |
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 |
^ 3 |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
832 |
]. |
682f34cf0bd2
assert-signalization shows assert-sender initially
Claus Gittinger <cg@exept.de>
parents:
5884
diff
changeset
|
833 |
]. |
3447 | 834 |
]. |
835 |
^ 2 |
|
836 |
]. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
837 |
"/ 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
|
838 |
(sel == #signalInterrupt:) ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
839 |
^ 2 |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
840 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
841 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
842 |
"/ show the place of error-call; not where the ErrorSignal was raised... |
3447 | 843 |
(sel == #error:) ifTrue:[ |
844 |
^ 2 |
|
845 |
]. |
|
846 |
||
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
847 |
"/ show the place of the assert; not where the Signal was raised... |
5114 | 848 |
(sel == #assert:) ifTrue:[ |
6579 | 849 |
nMax > 2 ifTrue:[ |
850 |
sel := (aContextArray at:2) selector. |
|
851 |
sel == #deny: ifTrue:[ |
|
852 |
^ 3 |
|
853 |
]. |
|
854 |
]. |
|
5114 | 855 |
^ 2 |
856 |
]. |
|
857 |
||
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
858 |
"/ 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
|
859 |
(sel == #subclassResponsibility) ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
860 |
^ 2 |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
861 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
862 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
863 |
"/ 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
|
864 |
( #(#notIndexed |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
865 |
#indexNotIntegerOrOutOfBounds: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
866 |
#subscriptBoundsError: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
867 |
#elementBoundsError: |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
868 |
"/ #subclassResponsibility |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
869 |
) includes:sel) ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
870 |
idx := 2. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
871 |
[ idx <= 3 |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
872 |
and:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
873 |
sel := (aContextArray at:idx) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
874 |
#(#notIndexed |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
875 |
#indexNotIntegerOrOutOfBounds: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
876 |
#subscriptBoundsError: |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
877 |
#elementBoundsError: ) includes:sel |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
878 |
] |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
879 |
] whileTrue:[ idx := idx + 1 ]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
880 |
sel := (aContextArray at:idx) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
881 |
(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
|
882 |
ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
883 |
sel := (aContextArray at:idx+1) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
884 |
(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
|
885 |
ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
886 |
sel := (aContextArray at:idx+2) selector. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
887 |
(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
|
888 |
ifTrue:[ |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
889 |
^ idx+3 |
3447 | 890 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
891 |
^ idx+2 |
3447 | 892 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
893 |
^ idx+1 |
3447 | 894 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
895 |
^ idx |
3447 | 896 |
]. |
897 |
||
898 |
^ 1 |
|
899 |
]. |
|
900 |
||
901 |
con := found. |
|
902 |
||
903 |
" |
|
904 |
got it; move up, skipping all intermediate Signal and |
|
905 |
Exception contexts |
|
906 |
" |
|
907 |
prev := nil. |
|
908 |
rcvr := con receiver. |
|
909 |
[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
910 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 911 |
] whileTrue:[ |
912 |
prev := con. |
|
913 |
nMax > offset ifFalse:[^ offset]. |
|
914 |
||
915 |
offset := offset + 1. |
|
916 |
con := aContextArray at:offset. |
|
917 |
rcvr := con receiver. |
|
918 |
]. |
|
919 |
||
920 |
" |
|
921 |
now, we are one above the raising context |
|
922 |
" |
|
923 |
||
924 |
" |
|
925 |
if the sender-method of the raise is one of objects error methods ... |
|
926 |
" |
|
927 |
( #( halt halt: |
|
928 |
error error: |
|
929 |
doesNotUnderstand: |
|
930 |
subclassResponsibility |
|
931 |
primitiveFailed) includes:con selector) |
|
932 |
ifTrue:[ |
|
933 |
con selector == #doesNotUnderstand: ifTrue:[ |
|
934 |
" |
|
935 |
one more up, to get to the originating context |
|
936 |
" |
|
937 |
con := aContextArray at:(offset + 1). |
|
938 |
con isNil ifTrue:[^ offset]. |
|
939 |
offset := offset + 1. |
|
940 |
]. |
|
941 |
con := aContextArray at:(offset + 1). |
|
942 |
con isNil ifTrue:[^ offset]. |
|
943 |
offset := offset + 1. |
|
944 |
] ifFalse:[ |
|
945 |
" |
|
946 |
ok, got the raise - if its a BreakPoint, look for the sender |
|
947 |
" |
|
948 |
(prev receiver == BreakPointInterrupt) ifTrue:[ |
|
949 |
offset := offset + 1 |
|
950 |
]. |
|
951 |
]. |
|
952 |
||
953 |
^ offset |
|
954 |
||
7713 | 955 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
956 |
"Modified: / 06-03-2007 / 14:28:21 / cg" |
|
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
957 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
958 |
|
73 | 959 |
!DebugView methodsFor:'basic'! |
960 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
961 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
962 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
963 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
964 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
965 |
m notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
966 |
self updateMenuItems. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
967 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
968 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
969 |
abortButton enable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
970 |
m enable:#doAbort. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
971 |
] ifFalse:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
972 |
abortButton disable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
973 |
m disable:#doAbort. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
974 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
975 |
exclusive ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
976 |
terminateButton disable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
977 |
m disable:#doTerminate. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
978 |
] ifFalse:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
979 |
terminateButton enable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
980 |
m enable:#doTerminate. |
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 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
983 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
984 |
mayProceed == false ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
985 |
continueButton disable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
986 |
m notNil ifTrue:[m disable:#doContinue]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
987 |
] ifFalse:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
988 |
continueButton enable. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
989 |
m notNil ifTrue:[m enable:#doContinue] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
990 |
]. |
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 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
993 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
994 |
|
1364 | 995 |
enter:aContext select:initialSelectionOrNil |
73 | 996 |
"enter the debugger - get and display the context, then start an |
997 |
exclusive event loop on top of eveything else" |
|
998 |
||
3447 | 999 |
<context: #return> |
1000 |
||
6730 | 1001 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
3447 | 1002 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1003 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1004 |
'==> enter: (' print. aContext print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1005 |
') select: ' print. initialSelectionOrNil printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1006 |
]. |
3447 | 1007 |
thisContext isRecursive ifTrue:[ |
1008 |
"/ care for the special case, were the Debugger was autoloaded. |
|
1009 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1010 |
"/ condition. |
|
1011 |
foundNoByteCodeContext := false. |
|
6730 | 1012 |
foundExitContext := false. |
1013 |
||
1014 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1015 |
[ |
|
1016 |
foundNoByteCodeContext not |
|
1017 |
and:[ foundExitContext not |
|
3447 | 1018 |
and:[c notNil |
6730 | 1019 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
1020 |
]]]] |
|
1021 |
whileTrue:[ |
|
1022 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1023 |
foundExitContext := true |
|
1024 |
]. |
|
3447 | 1025 |
c selector == #noByteCode ifTrue:[ |
1026 |
foundNoByteCodeContext := true |
|
1027 |
]. |
|
6730 | 1028 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
3447 | 1029 |
]. |
1030 |
||
6730 | 1031 |
(foundNoByteCodeContext not |
1032 |
and:[ foundExitContext not]) ifFalse:[ |
|
3447 | 1033 |
('DebugView [warning]: reentered') errorPrintCR. |
1034 |
||
1035 |
^ MiniDebugger |
|
1036 |
enter:aContext |
|
1037 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1038 |
mayProceed:mayProceed. |
|
6730 | 1039 |
]. |
1040 |
foundExitContext ifTrue:[ |
|
1041 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1042 |
^ self. |
|
1043 |
]. |
|
3447 | 1044 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1045 |
|
2591
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1046 |
"/'entering: ' print. aContext printCR. |
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1047 |
"/'initial: ' print. initialSelectionOrNil printCR. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1048 |
iAmNew := drawableId isNil. |
73 | 1049 |
|
939 | 1050 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
1051 |
||
3580 | 1052 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1053 |
busy := cachable := true. |
73 | 1054 |
inspecting := false. |
1055 |
inspectedProcess := Processor activeProcess. |
|
1056 |
stepping := false. |
|
1057 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1058 |
stepHow := nil. |
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1059 |
nChainShown := InitialNCHAINShown. |
73 | 1060 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1061 |
"/ if debugger is entered while a box has grabbed the |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1062 |
"/ 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
|
1063 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1064 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1065 |
"/ 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
|
1066 |
"/ 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
|
1067 |
"/ 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
|
1068 |
Screen allScreens do:[:aScreen | |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1069 |
aScreen ungrabPointer. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1070 |
aScreen ungrabKeyboard. |
73 | 1071 |
]. |
1072 |
||
1004
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
1073 |
("inspectedProcess suspendedContext isNil |
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1074 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
1004
cb182425a977
oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents:
998
diff
changeset
|
1075 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1076 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1077 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1078 |
terminateButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1079 |
abortButton enable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1080 |
]. |
73 | 1081 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1082 |
iAmNew ifFalse:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1083 |
"/ not the first time - disable buttons & menus |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1084 |
"/ from the previous life |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1085 |
self turnOffAllButtons. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1086 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1087 |
m := contextView middleButtonMenu. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1088 |
m notNil ifTrue:[ |
5195
5a2d612e1adb
oops - skip was always disabled
Claus Gittinger <cg@exept.de>
parents:
5170
diff
changeset
|
1089 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1090 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1091 |
verboseBacktrace |
3447 | 1092 |
ifTrue:[self showVerboseWalkback] |
1093 |
ifFalse:[self showDenseWalkback]. |
|
132 | 1094 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1095 |
self iconLabel:'Debugger'. |
132 | 1096 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1097 |
windowGroup isNil ifTrue:[ |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1098 |
self windowGroup: WindowGroup new. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1099 |
windowGroup addTopView:self. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1100 |
]. |
132 | 1101 |
exclusive ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1102 |
"/ create a (modal) windowGroup for myself |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1103 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1104 |
windowGroup setModal:true. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1105 |
] ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1106 |
"/ create a windowGroup with a synchronous sensor for me |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1107 |
|
3769 | 1108 |
windowGroup beSynchronous. |
73 | 1109 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1110 |
windowGroup setProcess:Processor activeProcess. |
73 | 1111 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1112 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
73 | 1113 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1114 |
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
|
1115 |
"/'after setContext; first is ' print. |
613b7c72371c
fixed initial context selection, when entering via halt.
Claus Gittinger <cg@exept.de>
parents:
2589
diff
changeset
|
1116 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1117 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
73 | 1118 |
|
1119 |
m := contextView middleButtonMenu. |
|
1120 |
m notNil ifTrue:[ |
|
3269 | 1121 |
self updateMenuItems. |
1122 |
||
5821
a5ef70570c6c
Check for AbortOperationRequest in suspendedContext.
Stefan Vogel <sv@exept.de>
parents:
5798
diff
changeset
|
1123 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1124 |
abortButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1125 |
m enable:#doAbort. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1126 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1127 |
abortButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1128 |
m disable:#doAbort. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1129 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1130 |
exclusive ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1131 |
terminateButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1132 |
m disable:#doTerminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1133 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1134 |
terminateButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1135 |
m enable:#doTerminate. |
3447 | 1136 |
]. |
1137 |
iAmNew ifFalse:[ |
|
5195
5a2d612e1adb
oops - skip was always disabled
Claus Gittinger <cg@exept.de>
parents:
5170
diff
changeset
|
1138 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
3447 | 1139 |
]. |
73 | 1140 |
]. |
1141 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1142 |
mayProceed == false ifTrue:[ |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1143 |
continueButton disable. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1144 |
m notNil ifTrue:[m disable:#doContinue]. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1145 |
] ifFalse:[ |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1146 |
continueButton enable. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1147 |
m notNil ifTrue:[m enable:#doContinue] |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1148 |
]. |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1149 |
|
73 | 1150 |
" |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1151 |
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
|
1152 |
Otherwise, its probably better to do a map, which shows the |
73 | 1153 |
view at the previous position, without a need for the user to set the |
1154 |
position again |
|
1155 |
" |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1156 |
iAmNew ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1157 |
self remap. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1158 |
] ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1159 |
self realize. |
73 | 1160 |
]. |
1161 |
||
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1162 |
exclusive ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1163 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1164 |
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
|
1165 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1166 |
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
|
1167 |
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
|
1168 |
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
|
1169 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1170 |
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
|
1171 |
]. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1172 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1173 |
self autoRaiseView ifTrue:[ |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1174 |
"/ self raise. |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1175 |
self raiseDeiconified. |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1176 |
self topView activate. |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1177 |
self topView setForegroundWindow. |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1178 |
]. |
1486
6ae442626f20
wait until visible before starting to draw
Claus Gittinger <cg@exept.de>
parents:
1484
diff
changeset
|
1179 |
|
73 | 1180 |
canContinue := true. |
1181 |
exitAction := nil. |
|
1182 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1183 |
"/ 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
|
1184 |
"/ 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
|
1185 |
"/ closedown of the debugger. |
3701
ef73aac8e8d5
Use #ifCurtailed: instead of #valueOnUnwindDo:
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
1186 |
[self controlLoop] ifCurtailed:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1187 |
windowGroup notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1188 |
windowGroup setProcess:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1189 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1190 |
self destroy |
132 | 1191 |
]. |
73 | 1192 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1193 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1194 |
"/ 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
|
1195 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1196 |
contextView contents:nil. |
1197 |
||
73 | 1198 |
codeView acceptAction:nil. |
942 | 1199 |
codeView doItAction:nil. |
73 | 1200 |
|
4892 | 1201 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
1202 |
ObjectMemory stepInterruptHandler:nil. |
|
1203 |
]. |
|
1204 |
||
3447 | 1205 |
"/ not stepping - close window |
73 | 1206 |
(exitAction ~~ #step) ifTrue:[ |
3165
03d3c485e67d
remember selected entry in inspectors;
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1207 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
03d3c485e67d
remember selected entry in inspectors;
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1208 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1209 |
receiverInspector release. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1210 |
contextInspector release. |
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 |
self unmap. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1213 |
device flush. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1214 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1215 |
(exitAction == #abort) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1216 |
self exit_abort. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1217 |
]. |
6487 | 1218 |
(exitAction == #abortAll) ifTrue:[ |
1219 |
self exit_abortAll. |
|
1220 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1221 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1222 |
(exitAction == #return) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1223 |
self exit_return. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1224 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1225 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1226 |
(exitAction == #restart) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1227 |
self exit_restart. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1228 |
]. |
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 |
(exitAction == #quickTerminate) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1231 |
self exit_quickTerminate. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1232 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1233 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1234 |
(exitAction == #terminate) ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1235 |
self exit_terminate. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1236 |
] |
73 | 1237 |
]. |
1238 |
||
3447 | 1239 |
"/ stepping - window stays open |
1240 |
||
940 | 1241 |
selectedContext := actualContext := firstContext := nil. |
73 | 1242 |
|
2472 | 1243 |
"/ restore the previous pointer grab |
73 | 1244 |
grabber notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1245 |
device grabPointerInView:grabber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1246 |
grabber := nil. |
61 | 1247 |
]. |
73 | 1248 |
|
1249 |
(exitAction == #step) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1250 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1251 |
schedule another stepInterrupt |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1252 |
- must enter myself into the collection of open debuggers, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1253 |
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
|
1254 |
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
|
1255 |
come up (instead of a new one) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1256 |
- must flush caches since optimized methods not always |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1257 |
look for pending interrupts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1258 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1259 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1260 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1261 |
"/ also must care for stepping into a return |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1262 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1263 |
steppedContext notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1264 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1265 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1266 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1267 |
OpenDebuggers isNil ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1268 |
OpenDebuggers := WeakIdentitySet new. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1269 |
]. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1270 |
OpenDebuggers add:self. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1271 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1272 |
self label:'single stepping - please wait ...'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1273 |
stepping := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1274 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1275 |
ObjectMemory stepInterruptHandler:self. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1276 |
Processor activeProcess stepInterruptHandler:self. |
2963 | 1277 |
ObjectMemory flushCaches. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1278 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1279 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1280 |
"bigStep" steppedContextLineno notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1281 |
Context singleStepInterruptRequest raiseWith:#next |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1282 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1283 |
Context singleStepInterruptRequest raiseWith:#step |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1284 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1285 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1286 |
"/ see if we came here through an interrupt-action |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1287 |
"/ (i.e. aProcess interruptWith:...) |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1288 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1289 |
enteredByInterrupt := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1290 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1291 |
[enteredByInterrupt not |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1292 |
and:[con notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1293 |
and:[con ~~ aContext]]] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1294 |
((sel := con selector) == #timerInterrupt |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1295 |
or:[sel == #ioInterrupt]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1296 |
enteredByInterrupt := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1297 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1298 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1299 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1300 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1301 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1302 |
ObjectMemory flushInlineCaches. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1303 |
|
1456 | 1304 |
DebuggingDebugger == true ifTrue:[ |
1305 |
enteredByInterrupt printCR. |
|
1306 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1307 |
enteredByInterrupt ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1308 |
"/ dont want to step through all intermediate |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1309 |
"/ (scheduler-) contexts; place a return-trap on the |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1310 |
"/ one right below the interesting one |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1311 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1312 |
"/ 'special unwind return' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1313 |
con unwindThenDo:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1314 |
Processor activeProcess stepInterruptHandler:self. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1315 |
ObjectMemory stepInterruptHandler:self. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1316 |
InStepInterrupt := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1317 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1318 |
InterruptPending := 1]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1319 |
] ifFalse:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1320 |
"/ 'normal step return' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1321 |
skipLineNr ~~ #return ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1322 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1323 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1324 |
] ifFalse:[ |
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1325 |
"/ 'step for return' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1326 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1327 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1328 |
InStepInterrupt := nil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1329 |
] |
73 | 1330 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1331 |
OpenDebuggers notNil ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
1332 |
OpenDebuggers remove:self ifAbsent:[]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1333 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1334 |
self cacheMyself. |
73 | 1335 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1336 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1337 |
"Modified: / 17-04-1997 / 13:01:32 / stefan" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1338 |
"Created: / 30-10-1997 / 21:08:18 / cg" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1339 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1340 |
"Modified: / 15-05-2007 / 13:41:46 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1341 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1342 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1343 |
exit_abort |
5455 | 1344 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
1345 |
"/ that one would run on top of this context. |
|
1346 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1347 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1348 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
1349 |
"/ done in the #enter:select method. |
|
1350 |
"/ You are not expected to understand this. |
|
1351 |
||
6487 | 1352 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
1353 |
! |
|
1354 |
||
1355 |
exit_abortAll |
|
1356 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1357 |
"/ that one would run on top of this context. |
|
1358 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1359 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1360 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
1361 |
"/ done in the #enter:select method. |
|
1362 |
"/ You are not expected to understand this. |
|
1363 |
||
1364 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1365 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1366 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1367 |
exit_quickTerminate |
3447 | 1368 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1369 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1370 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1371 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 1372 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1373 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1374 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1375 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1376 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1377 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1378 |
selectedContext notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1379 |
con := selectedContext. |
3447 | 1380 |
self cacheMyself. |
3434
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 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1383 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1384 |
Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1385 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
4816 | 1386 |
ex description infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1387 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1388 |
] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1389 |
con unwindAndRestart. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1390 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1391 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1392 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1393 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1394 |
"Created: / 16.11.2001 / 17:23:17 / cg" |
3447 | 1395 |
"Modified: / 17.11.2001 / 23:37:09 / cg" |
3434
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 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1398 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1399 |
|con retVal| |
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 |
selectedContext notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1402 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1403 |
if there is a selection in the codeView, |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1404 |
evaluate it and use the result as return value |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1405 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1406 |
"/ 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
|
1407 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1408 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1409 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1410 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1411 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1412 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1413 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1414 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1415 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1416 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1417 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1418 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1419 |
"/ retVal := codeView doItAction value:s. |
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 |
"/ ]. |
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 |
con := selectedContext. |
3447 | 1424 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1425 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1426 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1427 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1428 |
Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1429 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
4816 | 1430 |
ex description infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1431 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1432 |
] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1433 |
con unwind:retVal. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1434 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1435 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1436 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1437 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1438 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 1439 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1440 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1441 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1442 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1443 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1444 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1445 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1446 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1447 |
Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1448 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
4816 | 1449 |
ex description infoPrintCR. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1450 |
ex proceed |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1451 |
] do:[ |
3447 | 1452 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1453 |
Processor activeProcess terminate. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1454 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1455 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1456 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1457 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 1458 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
1459 |
! |
|
1460 |
||
6487 | 1461 |
exit_unwindThenDo:aBlock |
1462 |
|con| |
|
1463 |
||
1464 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1465 |
"/ that one would run on top of this context. |
|
1466 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1467 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1468 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
1469 |
"/ done in the #enter:select method. |
|
1470 |
"/ You are not expected to understand this. |
|
1471 |
||
1472 |
" |
|
1473 |
have to catch errors occuring in unwind-blocks |
|
1474 |
" |
|
1475 |
self cacheMyself. |
|
1476 |
||
1477 |
Error handle:[:ex | |
|
1478 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1479 |
ex description infoPrintCR. |
|
1480 |
||
1481 |
ex proceed |
|
1482 |
] do:[ |
|
1483 |
"/ find the enter:select context. |
|
1484 |
con := thisContext sender. |
|
1485 |
[ |
|
1486 |
(con selector == #enter:select:) |
|
1487 |
and:[con receiver == self] |
|
1488 |
] |
|
1489 |
whileFalse:[ con := con sender ]. |
|
1490 |
||
1491 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
1492 |
con sender receiver == self class ifTrue:[ |
|
1493 |
con := con sender. |
|
1494 |
con sender receiver == self class ifTrue:[ |
|
1495 |
con := con sender. |
|
1496 |
con isBlockContext ifTrue:[ |
|
1497 |
con := con methodHome. |
|
1498 |
] |
|
1499 |
]. |
|
1500 |
]. |
|
1501 |
||
1502 |
con unwindThenDo:aBlock. |
|
1503 |
]. |
|
1504 |
'DebugView [warning]: abort failed' errorPrintCR |
|
1505 |
||
1506 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
1507 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
1508 |
! |
|
1509 |
||
3447 | 1510 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
1511 |
|selection con1 con2 h| |
|
1512 |
||
1513 |
initialSelectionOrNil notNil ifTrue:[ |
|
1514 |
^ initialSelectionOrNil |
|
1515 |
]. |
|
1516 |
||
1517 |
" |
|
1518 |
and find the one context to show initially |
|
1519 |
- if we came here by a send (single step), its the top context; |
|
1520 |
- if we came here by a step (i.e. bigStep), its the top context |
|
1521 |
(for ifs and whiles) or the sender (for regular sends). |
|
1522 |
- otherwise, we came here by some signal raise, and we are interested |
|
1523 |
in the context where the raise actually occured. |
|
1524 |
" |
|
1525 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
1526 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
1527 |
||
1528 |
exitAction == #step ifTrue:[ |
|
1529 |
selection := 1. |
|
1530 |
steppedContext notNil ifTrue:[ |
|
1531 |
||
1532 |
" |
|
1533 |
if we came here by a big-step, show the method where we are |
|
1534 |
" |
|
1535 |
con1 == steppedContext ifTrue:[ |
|
1536 |
selection := 1 |
|
1537 |
] ifFalse:[ |
|
1538 |
con2 == steppedContext ifTrue:[ |
|
1539 |
selection := 2 |
|
1540 |
] |
|
1541 |
]. |
|
1542 |
" |
|
1543 |
for bigStep, we could also be in a block below the actual method ... |
|
1544 |
" |
|
1545 |
((h := con1 home) notNil |
|
1546 |
and:[h == steppedContext]) ifTrue:[ |
|
1547 |
selection := 1 |
|
1548 |
] ifFalse:[ |
|
1549 |
(con2 notNil |
|
1550 |
and:[(h := con2 home) notNil |
|
1551 |
and:[h == steppedContext]]) ifTrue:[ |
|
1552 |
selection := 2 |
|
1553 |
] |
|
1554 |
]. |
|
1555 |
h := nil. |
|
1556 |
] |
|
1557 |
] ifFalse:[ |
|
1558 |
steppedContext isNil ifTrue:[ |
|
1559 |
" |
|
1560 |
preselect a more interesting context, (where halt/raise was ...) |
|
1561 |
" |
|
1562 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
1563 |
selection := self class interestingContextIndexIn:contextArray. |
|
1564 |
selection := selection min:(contextArray size). |
|
1565 |
] ifFalse:[ |
|
1566 |
" |
|
1567 |
if we came here by a big-step, show the method where we are |
|
1568 |
" |
|
1569 |
con1 == steppedContext ifTrue:[ |
|
1570 |
selection := 1 |
|
1571 |
] ifFalse:[ |
|
1572 |
con2 == steppedContext ifTrue:[ |
|
1573 |
selection := 2. |
|
1574 |
] |
|
1575 |
] |
|
1576 |
] |
|
1577 |
]. |
|
1578 |
^ selection |
|
1579 |
||
1580 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
1581 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 1582 |
! |
1583 |
||
5110 | 1584 |
isInspecting |
1585 |
^ inspecting |
|
1586 |
! |
|
1587 |
||
1588 |
isNotInspecting |
|
1589 |
^ inspecting not |
|
1590 |
! |
|
1591 |
||
73 | 1592 |
openOn:aProcess |
1593 |
"enter the debugger on a process - |
|
1594 |
in this case, we are just inspecting the context chain of the process, |
|
1595 |
not running on top of the debugged process, but as a separate |
|
1596 |
one. (think of it as an inspector showing more detail, and offering |
|
1597 |
some more control operations)" |
|
1598 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1599 |
|bpanel dummy w| |
73 | 1600 |
|
939 | 1601 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
1602 |
||
73 | 1603 |
busy := true. |
1604 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1605 |
stepHow := nil. |
73 | 1606 |
inspecting := true. |
1607 |
inspectedProcess := aProcess. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1608 |
nChainShown := InitialNCHAINShown. |
73 | 1609 |
|
1610 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1611 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1612 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1613 |
"/ get the max size & freeze button |
6647 | 1614 |
continueButton label:(resources string:'Continue'). |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1615 |
w := continueButton preferredExtent x. |
6647 | 1616 |
continueButton label:(resources string:'Stop'). |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1617 |
w := w max:(continueButton preferredExtent x). |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1618 |
continueButton preferredExtent:(w @ continueButton preferredExtent y). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1619 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1620 |
aProcess state == #run ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1621 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1622 |
continueButton foregroundColor:Color red darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1623 |
]. |
6647 | 1624 |
continueButton label:(resources string:'Stop'). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1625 |
continueButton action:[self doStop]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1626 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1627 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1628 |
continueButton foregroundColor:Color green darkened darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1629 |
]. |
6647 | 1630 |
continueButton label:(resources string:'Continue'). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1631 |
continueButton action:[self doContinue]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1632 |
]. |
5451 | 1633 |
continueButton preferredExtent:(w @ continueButton preferredExtent y). |
73 | 1634 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1635 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1636 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
1637 |
|
92 | 1638 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 1639 |
dummy borderWidth:0; level:0. |
61 | 1640 |
|
73 | 1641 |
"/ stepButton destroy. |
1642 |
"/ sendButton destroy. |
|
1643 |
||
1644 |
updateButton := Button |
|
6647 | 1645 |
label:(resources string:'Update') |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1646 |
action:[self updateContext] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1647 |
in:bpanel. |
73 | 1648 |
monitorToggle := Toggle in:bpanel. |
6647 | 1649 |
monitorToggle label:(resources string:'Monitor'). |
73 | 1650 |
monitorToggle pressAction:[self autoUpdateOn]. |
1651 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
1652 |
||
1653 |
"can only look into process - context chain is not active" |
|
1654 |
canContinue := true. |
|
1655 |
||
1656 |
terminateButton enable. |
|
1657 |
abortButton enable. |
|
1658 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1659 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1660 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1661 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1662 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
1663 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 1664 |
|
1665 |
aProcess isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1666 |
terminateButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1667 |
abortButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1668 |
continueButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1669 |
returnButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1670 |
restartButton disable. |
73 | 1671 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1672 |
(aProcess suspendedContext isNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1673 |
or:[aProcess isSystemProcess]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1674 |
terminateButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1675 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1676 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1677 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1678 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1679 |
catchBlock := [ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1680 |
catchBlock := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1681 |
contextArray := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1682 |
selectedContext := actualContext := firstContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1683 |
steppedContext := wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1684 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1685 |
(exitAction == #terminate) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1686 |
aProcess terminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1687 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1688 |
(exitAction == #quickTerminate) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1689 |
aProcess terminateNoSignal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1690 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1691 |
super destroy |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1692 |
]. |
73 | 1693 |
]. |
1694 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1695 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1696 |
"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
|
1697 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1698 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1699 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1700 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 1701 |
|selection| |
1702 |
||
1703 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1704 |
selection notNil ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1705 |
self showSelection:selection. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1706 |
contextView setSelection:selection. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1707 |
selection > 1 ifTrue:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1708 |
contextView scrollToLine:(selection - 1) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1709 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1710 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1711 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1712 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 1713 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1714 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1715 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1716 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1717 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1718 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1719 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1720 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1721 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1722 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1723 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1724 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1725 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1726 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 1727 |
! ! |
1728 |
||
1729 |
!DebugView methodsFor:'help'! |
|
1730 |
||
3510 | 1731 |
flyByHelpTextFor:aComponent |
1732 |
|s| |
|
1733 |
||
1734 |
aComponent == abortButton ifTrue:[ |
|
1735 |
s := 'Abort (Unwind to EventLoop)' |
|
1736 |
]. |
|
1737 |
aComponent == terminateButton ifTrue:[ |
|
1738 |
s := 'Terminate Process (Close View)' |
|
1739 |
]. |
|
1740 |
aComponent == continueButton ifTrue:[ |
|
6647 | 1741 |
continueButton label = (resources string:'Stop') ifTrue:[ |
3510 | 1742 |
s := 'Stop' |
1743 |
] ifFalse:[ |
|
1744 |
s := 'Continue Execution' |
|
1745 |
] |
|
1746 |
]. |
|
1747 |
aComponent == stepButton ifTrue:[ |
|
1748 |
s := 'Step to Next Send' |
|
1749 |
]. |
|
1750 |
aComponent == nextButton ifTrue:[ |
|
1751 |
s := 'Step to Next Line' |
|
1752 |
]. |
|
1753 |
aComponent == nextOverButton ifTrue:[ |
|
1754 |
s := 'Step Over' |
|
1755 |
]. |
|
1756 |
aComponent == nextOutButton ifTrue:[ |
|
1757 |
s := 'Step Out' |
|
1758 |
]. |
|
1759 |
aComponent == sendButton ifTrue:[ |
|
1760 |
s := 'Send Next Message' |
|
1761 |
]. |
|
1762 |
aComponent == returnButton ifTrue:[ |
|
1763 |
s := 'Return from selected Method' |
|
1764 |
]. |
|
1765 |
aComponent == restartButton ifTrue:[ |
|
1766 |
s := 'Restart selected Method' |
|
1767 |
]. |
|
1768 |
aComponent == monitorToggle ifTrue:[ |
|
1769 |
s := 'Toggle Monitoring' |
|
1770 |
]. |
|
1771 |
aComponent == updateButton ifTrue:[ |
|
1772 |
s := 'Update' |
|
1773 |
]. |
|
1774 |
s notNil ifTrue:[ |
|
1775 |
^ resources string:s |
|
1776 |
]. |
|
1777 |
^ nil |
|
1778 |
||
1779 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1780 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
|
1781 |
! |
|
1782 |
||
266 | 1783 |
helpTextFor:aComponent |
1784 |
|s| |
|
1785 |
||
1786 |
aComponent == abortButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1787 |
s := 'HELP_ABORT' |
266 | 1788 |
]. |
1789 |
aComponent == terminateButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1790 |
s := 'HELP_TERMINATE' |
266 | 1791 |
]. |
1792 |
aComponent == continueButton ifTrue:[ |
|
6647 | 1793 |
continueButton label = (resources string:'Stop') ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1794 |
s := 'HELP_STOP' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1795 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1796 |
s := 'HELP_CONTINUE' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1797 |
] |
266 | 1798 |
]. |
1799 |
aComponent == stepButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1800 |
s := 'HELP_STEP' |
266 | 1801 |
]. |
1802 |
aComponent == nextButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1803 |
s := 'HELP_NEXT' |
266 | 1804 |
]. |
1065 | 1805 |
aComponent == nextOverButton ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1806 |
s := 'HELP_NEXTOVER' |
1065 | 1807 |
]. |
1808 |
aComponent == nextOutButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1809 |
s := 'HELP_NEXTOUT' |
1065 | 1810 |
]. |
266 | 1811 |
aComponent == stepButton ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1812 |
s := 'HELP_STEP' |
266 | 1813 |
]. |
1814 |
aComponent == sendButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1815 |
s := 'HELP_SEND' |
266 | 1816 |
]. |
1817 |
aComponent == returnButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1818 |
s := 'HELP_RETURN' |
266 | 1819 |
]. |
1820 |
aComponent == restartButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1821 |
s := 'HELP_RESTART' |
266 | 1822 |
]. |
1823 |
aComponent == contextView ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1824 |
s := 'HELP_WALKBACK' |
266 | 1825 |
]. |
1826 |
aComponent == codeView ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1827 |
s := 'HELP_CODEVIEW' |
266 | 1828 |
]. |
1829 |
aComponent == monitorToggle ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1830 |
s := 'HELP_MONITOR' |
266 | 1831 |
]. |
1832 |
aComponent == updateButton ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1833 |
s := 'HELP_UPDATE' |
266 | 1834 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1835 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1836 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
1837 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1838 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1839 |
s := 'HELP_REC_INSP' |
266 | 1840 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
1841 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1842 |
s := 'HELP_CON_INSP' |
266 | 1843 |
]. |
1844 |
||
1845 |
s notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1846 |
^ resources string:s |
266 | 1847 |
]. |
1848 |
^ nil |
|
1849 |
||
1850 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 1851 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 1852 |
! ! |
1853 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
1854 |
!DebugView methodsFor:'initialization & release'! |
266 | 1855 |
|
1856 |
addToCurrentProject |
|
1857 |
"ignored here" |
|
1858 |
||
1859 |
^ self |
|
1860 |
! |
|
1861 |
||
2115 | 1862 |
destroy |
1863 |
"closing the debugger implies an abort or continue" |
|
1864 |
||
2404 | 1865 |
|m| |
1866 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
1867 |
self checkIfCodeIsReallyModified ifTrue:[ |
2115 | 1868 |
(self confirm:('Code modified - exit anyway ?')) |
1869 |
ifFalse:[ |
|
1870 |
^ self |
|
1871 |
] |
|
1872 |
]. |
|
1873 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
1874 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
1875 |
|
2404 | 1876 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 1877 |
inspecting ifFalse:[ |
1878 |
"I am running on top of a process, abort or continue it" |
|
1879 |
||
1880 |
windowGroup notNil ifTrue:[ |
|
1881 |
windowGroup setProcess:nil. |
|
1882 |
]. |
|
1883 |
self uncacheMyself. |
|
1884 |
||
1885 |
"/ |
|
1886 |
"/ catch invalid return; |
|
1887 |
"/ this happens, when my process has somehow died (quickterminate) |
|
1888 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
1889 |
"/ #destroy-window function. |
|
1890 |
"/ |
|
3124
540feceebffa
invalidReturnSignal -> cannotReturnSignal
Claus Gittinger <cg@exept.de>
parents:
3121
diff
changeset
|
1891 |
Context cannotReturnSignal handle:[:ex | |
2115 | 1892 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
1893 |
self uncacheMyself. |
|
1894 |
Debugger newDebugger. |
|
1895 |
ex return. |
|
1896 |
] do:[ |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1897 |
AbortOperationRequest isHandled ifTrue:[ |
2115 | 1898 |
self doAbort. |
1899 |
] ifFalse:[ |
|
1900 |
self doContinue |
|
1901 |
] |
|
1902 |
]. |
|
1903 |
"/ We don't reach this point normally |
|
1904 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
1905 |
Debugger newDebugger. |
|
1906 |
self uncacheMyself. |
|
1907 |
]. |
|
1908 |
||
2299 | 1909 |
Debugger newDebugger. |
2115 | 1910 |
"/ since I am going to be destroyed, remove me from the cache |
1911 |
self uncacheMyself. |
|
1912 |
super destroy. |
|
1913 |
||
1914 |
"Modified: / 10.7.1997 / 17:15:41 / stefan" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1915 |
"Modified: / 16.11.2001 / 17:38:15 / cg" |
2115 | 1916 |
! |
1917 |
||
266 | 1918 |
initialize |
3269 | 1919 |
|menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel oldLayout v| |
266 | 1920 |
|
1921 |
super initialize. |
|
1922 |
||
2340 | 1923 |
font := font onDevice:device. |
266 | 1924 |
|
937
e1520a0db57e
added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1925 |
verboseBacktrace := VerboseBacktraceDefault ? false. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
1926 |
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
|
1927 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
1928 |
|
266 | 1929 |
busy := false. |
1930 |
exclusive := false. |
|
1931 |
inspecting := false. |
|
1932 |
exitAction := nil. |
|
1933 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1934 |
stepHow := nil. |
266 | 1935 |
canContinue := false. |
1936 |
||
3269 | 1937 |
mH := 0. |
1938 |
||
3447 | 1939 |
menuPanel := MenuPanel in:self. |
1940 |
menuPanel verticalLayout:false. |
|
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
1941 |
menuPanel menu:(self class menuSpec). |
3447 | 1942 |
menuPanel receiver:self. |
1943 |
||
1944 |
mH := menuPanel preferredExtent y. |
|
1945 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
|
1946 |
||
3269 | 1947 |
oldLayout := true. |
3462 | 1948 |
"/ oldLayout := false. |
3269 | 1949 |
oldLayout ifTrue:[ |
1950 |
bpanel := HorizontalPanelView in:self. |
|
3447 | 1951 |
|
3269 | 1952 |
self initializeButtonsIn:bpanel. |
1953 |
||
1954 |
bH := bpanel preferredExtent y. |
|
1955 |
bpanel origin:(0.0 @ mH) |
|
1956 |
extent:(1.0 @ bH). |
|
1957 |
panel := VariableVerticalPanel |
|
1958 |
origin:(0.0 @ (mH + bH)) |
|
1959 |
corner:(1.0 @ 1.0) |
|
1960 |
in:self. |
|
1961 |
||
1962 |
v := self initializeContextListViewIn:panel. |
|
1963 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
1964 |
||
1965 |
codePanel := View in:panel. |
|
1966 |
v := self initializeCodeViewIn:codePanel. |
|
1967 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
1968 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
1969 |
||
1970 |
v := self initializeInspectorViewsIn:panel. |
|
1971 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
1972 |
||
1973 |
] ifFalse:[ |
|
1974 |
bpanel1 := HorizontalPanelView in:self. |
|
1975 |
self initializeButtons1In:bpanel1. |
|
1976 |
||
1977 |
bH1 := bpanel1 preferredExtent y. |
|
1978 |
bpanel1 origin:(0.0 @ mH) |
|
1979 |
extent:(1.0 @ bH1). |
|
1980 |
panel := VariableVerticalPanel |
|
1981 |
origin:(0.0 @ (mH + bH1)) |
|
1982 |
corner:(1.0 @ 1.0) |
|
1983 |
in:self. |
|
1984 |
||
1985 |
v := self initializeContextListViewIn:panel. |
|
1986 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
1987 |
||
1988 |
codePanel := View in:panel. |
|
1989 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
1990 |
self initializeButtons2In:bpanel2. |
|
1991 |
||
1992 |
bH2 := bpanel2 preferredExtent y. |
|
1993 |
bpanel2 origin:(0.0 @ 0.0) |
|
1994 |
extent:(1.0 @ bH2). |
|
1995 |
||
1996 |
v := self initializeCodeViewIn:codePanel. |
|
1997 |
v origin:(0.0 @ bH2) corner:(1.0 @ 1.0). |
|
1998 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
1999 |
||
2000 |
v := self initializeInspectorViewsIn:panel. |
|
2001 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
2002 |
]. |
|
2003 |
||
3387 | 2004 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
2005 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
|
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2006 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2007 |
|
3387 | 2008 |
|
3269 | 2009 |
" |
2010 |
Debugger newDebugger |
|
2011 |
" |
|
3447 | 2012 |
|
2013 |
"Modified: / 17.11.2001 / 20:50:24 / cg" |
|
3269 | 2014 |
! |
2015 |
||
3447 | 2016 |
initializeAbortButtonIn:bpanel |
3269 | 2017 |
abortButton := Button |
6647 | 2018 |
label:(resources string:'Abort') |
3269 | 2019 |
action:[ |
2020 |
abortButton turnOffWithoutRedraw. |
|
2021 |
self doAbort |
|
2022 |
] |
|
2023 |
in:bpanel. |
|
3447 | 2024 |
|
2025 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2026 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2027 |
! |
|
2028 |
||
2029 |
initializeButtons1In:bpanel |
|
2030 |
|separator| |
|
2031 |
||
2032 |
bpanel horizontalLayout:#leftMax. "was: #left. " |
|
2033 |
bpanel verticalLayout:#centerMax. |
|
2034 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2035 |
||
2036 |
self initializeAbortButtonIn:bpanel. |
|
2037 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
|
2038 |
"/ separator borderWidth:0; level:0. |
|
2039 |
||
2040 |
self initializeContinueButtonIn:bpanel. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2041 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2042 |
separator := View extent:(10 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2043 |
separator borderWidth:0; level:0. |
3269 | 2044 |
|
3447 | 2045 |
self initializeTerminateButtonIn:bpanel. |
2046 |
||
2047 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2048 |
separator borderWidth:0; level:0. |
|
2049 |
||
2050 |
self initializeDefineButtonIn:bpanel. |
|
4356 | 2051 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
2052 |
self initializeReportButtonIn:bpanel. |
|
2053 |
]. |
|
3447 | 2054 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2055 |
! |
2056 |
||
2057 |
initializeButtons2In:bpanel |
|
2058 |
|separator| |
|
2059 |
||
3447 | 2060 |
bpanel horizontalLayout:#leftMax. "was: #left. " |
3269 | 2061 |
bpanel verticalLayout:#centerMax. |
2062 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2063 |
||
3447 | 2064 |
self initializeNextButtonIn:bpanel. |
2065 |
self initializeStepButtonIn:bpanel. |
|
2066 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2067 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2068 |
"/ 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
|
2069 |
"/ 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
|
2070 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2071 |
|
3269 | 2072 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2073 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2074 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2075 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2076 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2077 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2078 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2079 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2080 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2081 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2082 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2083 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2084 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2085 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2086 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2087 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2088 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2089 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2090 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2091 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2092 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2093 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2094 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2095 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2096 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2097 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2098 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2099 |
|
3447 | 2100 |
self initializeSendButtonIn:bpanel. |
2101 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2102 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2103 |
separator borderWidth:0; level:0. |
3269 | 2104 |
|
3447 | 2105 |
self initializeReturnButtonIn:bpanel. |
2106 |
self initializeRestartButtonIn:bpanel. |
|
2107 |
||
2108 |
"Modified: / 17.11.2001 / 21:01:38 / cg" |
|
3269 | 2109 |
! |
2110 |
||
2111 |
initializeButtonsIn:bpanel |
|
2112 |
|separator| |
|
2113 |
||
2114 |
bpanel horizontalLayout:#left. |
|
2115 |
bpanel verticalLayout:#centerMax. |
|
2116 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2117 |
||
3447 | 2118 |
self initializeAbortButtonIn:bpanel. |
2119 |
||
3269 | 2120 |
separator := View extent:(10 @ 5) in:bpanel. |
2121 |
separator borderWidth:0; level:0. |
|
2122 |
||
3447 | 2123 |
self initializeContinueButtonIn:bpanel. |
3269 | 2124 |
|
2125 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2126 |
separator borderWidth:0; level:0. |
|
2127 |
||
3447 | 2128 |
self initializeReturnButtonIn:bpanel. |
2129 |
self initializeRestartButtonIn:bpanel. |
|
3269 | 2130 |
|
2131 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2132 |
separator borderWidth:0; level:0. |
|
2133 |
||
3447 | 2134 |
self initializeNextButtonIn:bpanel. |
2135 |
self initializeStepButtonIn:bpanel. |
|
2136 |
||
3269 | 2137 |
"/ cg: |
2138 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2139 |
"/ they do not work relyable with inlined blocks yet. |
|
2140 |
"/ |
|
2141 |
||
2142 |
||
2143 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
2144 |
"/ img isNil ifTrue:[ |
|
2145 |
"/ img := (resources at:'next') |
|
2146 |
"/ ]. |
|
2147 |
"/ nextButton := Button |
|
2148 |
"/ label:img |
|
2149 |
"/ action:[stepButton turnOff. self doNext] |
|
2150 |
"/ in:bpanel. |
|
2151 |
"/ |
|
2152 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
2153 |
"/ img isNil ifTrue:[ |
|
2154 |
"/ img := (resources at:'over') |
|
2155 |
"/ ]. |
|
2156 |
"/ nextOverButton := Button |
|
2157 |
"/ label:img |
|
2158 |
"/ action:[stepButton turnOff. self doNextOver] |
|
2159 |
"/ in:bpanel. |
|
2160 |
"/ |
|
2161 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
2162 |
"/ img isNil ifTrue:[ |
|
2163 |
"/ img := (resources at:'out') |
|
2164 |
"/ ]. |
|
2165 |
"/ nextOutButton := Button |
|
2166 |
"/ label:img |
|
2167 |
"/ action:[stepButton turnOff. self doNextOut] |
|
2168 |
"/ in:bpanel. |
|
2169 |
||
3447 | 2170 |
self initializeSendButtonIn:bpanel. |
2171 |
||
3187 | 2172 |
separator := View extent:(30 @ 5) in:bpanel. |
2173 |
separator borderWidth:0; level:0. |
|
3269 | 2174 |
|
3447 | 2175 |
self initializeTerminateButtonIn:bpanel. |
2176 |
||
3269 | 2177 |
separator := View extent:(30 @ 5) in:bpanel. |
2178 |
separator borderWidth:0; level:0. |
|
2179 |
||
3447 | 2180 |
self initializeDefineButtonIn:bpanel. |
4356 | 2181 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
2182 |
self initializeReportButtonIn:bpanel. |
|
2183 |
]. |
|
2184 |
||
3447 | 2185 |
|
2186 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
2187 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 2188 |
! |
2189 |
||
2190 |
initializeCodeViewIn:panel |
|
2191 |
|v| |
|
2192 |
||
2193 |
v := HVScrollableView |
|
2194 |
for:CodeView |
|
2195 |
miniScrollerH:true |
|
2196 |
miniScrollerV:false |
|
2197 |
in:panel. |
|
2198 |
||
2199 |
"/ v autoHideScrollBars:true. |
|
2200 |
codeView := v scrolledView. |
|
2201 |
||
2202 |
^ v |
|
2203 |
! |
|
2204 |
||
2205 |
initializeContextListViewIn:panel |
|
2206 |
|v| |
|
266 | 2207 |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2208 |
v := HVScrollableView |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2209 |
for:SelectionInListView |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2210 |
miniScrollerH:true |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2211 |
miniScrollerV:false |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2212 |
in:panel. |
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2213 |
v autoHideHorizontalScrollBar:true. |
266 | 2214 |
|
2215 |
contextView := v scrolledView. |
|
2216 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 2217 |
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
|
2218 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 2219 |
|
5453 | 2220 |
contextView middleButtonMenu:(self middleButtonMenu). |
2221 |
||
3269 | 2222 |
^ v |
2223 |
! |
|
2224 |
||
5453 | 2225 |
initializeContextViewsMiddleButtonMenu |
2226 |
<resource: #programMenu > |
|
2227 |
||
2228 |
contextView middleButtonMenu:(self middleButtonMenu). |
|
2229 |
! |
|
2230 |
||
3447 | 2231 |
initializeContinueButtonIn:bpanel |
2232 |
continueButton := Button |
|
6647 | 2233 |
label:(resources string:'Continue') |
3447 | 2234 |
action:[ |
2235 |
continueButton turnOffWithoutRedraw. |
|
2236 |
self doContinue |
|
2237 |
] |
|
2238 |
in:bpanel. |
|
2239 |
||
2240 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
2241 |
! |
|
2242 |
||
2243 |
initializeDefineButtonIn:bpanel |
|
2244 |
defineButton := Button |
|
6647 | 2245 |
label:(resources string:'Define') |
3447 | 2246 |
action:[ |
2247 |
defineButton turnOffWithoutRedraw. |
|
2248 |
self doDefine |
|
2249 |
] |
|
2250 |
in:bpanel. |
|
2251 |
defineButton beInvisible |
|
2252 |
||
2253 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
2254 |
! |
|
2255 |
||
3269 | 2256 |
initializeInspectorViewsIn:panel |
2257 |
|hpanel| |
|
266 | 2258 |
|
2259 |
hpanel := VariableHorizontalPanel in:panel. |
|
2260 |
||
2261 |
receiverInspector := InspectorView |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2262 |
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
|
2263 |
in:hpanel. |
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2264 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 2265 |
|
2266 |
contextInspector := ContextInspectorView |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2267 |
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
|
2268 |
in:hpanel. |
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2269 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2270 |
|
3269 | 2271 |
^ hpanel |
266 | 2272 |
! |
2273 |
||
3447 | 2274 |
initializeNextButtonIn:bpanel |
2275 |
nextButton := Button |
|
6647 | 2276 |
label:(resources string:'Next') |
3447 | 2277 |
action:[ |
2278 |
stepButton turnOff. |
|
2279 |
self doNext |
|
2280 |
] |
|
2281 |
in:bpanel. |
|
2282 |
||
2283 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
2284 |
! |
|
2285 |
||
4356 | 2286 |
initializeReportButtonIn:bpanel |
2287 |
reportButton := Button |
|
6647 | 2288 |
label:(resources string:'Report by Mail') |
4356 | 2289 |
action:[ |
2290 |
reportButton turnOffWithoutRedraw. |
|
2291 |
self doOpenReportMailApp. |
|
2292 |
] |
|
2293 |
in:bpanel. |
|
2294 |
||
2295 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
2296 |
! |
|
2297 |
||
3447 | 2298 |
initializeRestartButtonIn:bpanel |
2299 |
restartButton := Button |
|
6647 | 2300 |
label:(resources string:'Restart') |
3447 | 2301 |
action:[ |
2302 |
restartButton turnOff. |
|
2303 |
self doRestart |
|
2304 |
] |
|
2305 |
in:bpanel. |
|
2306 |
||
2307 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
2308 |
! |
|
2309 |
||
2310 |
initializeReturnButtonIn:bpanel |
|
2311 |
returnButton := Button |
|
6647 | 2312 |
label:(resources string:'Return') |
3447 | 2313 |
action:[ |
2314 |
returnButton turnOff. |
|
2315 |
self doReturn |
|
2316 |
] |
|
2317 |
in:bpanel. |
|
2318 |
||
2319 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
2320 |
! |
|
2321 |
||
2322 |
initializeSendButtonIn:bpanel |
|
2323 |
sendButton := Button |
|
6647 | 2324 |
label:(resources string:'Send') |
3447 | 2325 |
action:[ |
2326 |
sendButton turnOff. |
|
2327 |
self doSend |
|
2328 |
] |
|
2329 |
in:bpanel. |
|
2330 |
||
2331 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
2332 |
! |
|
2333 |
||
2334 |
initializeStepButtonIn:bpanel |
|
2335 |
stepButton := Button |
|
6647 | 2336 |
label:(resources string:'Step') |
3447 | 2337 |
action:[ |
2338 |
stepButton turnOff. |
|
2339 |
self doStep |
|
2340 |
] |
|
2341 |
in:bpanel. |
|
2342 |
||
2343 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
2344 |
! |
|
2345 |
||
2346 |
initializeTerminateButtonIn:bpanel |
|
2347 |
terminateButton := Button |
|
6647 | 2348 |
label:(resources string:'Terminate') |
3447 | 2349 |
action:[ |
2350 |
terminateButton turnOffWithoutRedraw. |
|
2351 |
self doTerminate |
|
2352 |
] |
|
2353 |
in:bpanel. |
|
2354 |
||
2355 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
266 | 2356 |
! |
2357 |
||
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2358 |
middleButtonMenu |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2359 |
<resource: #programMenu > |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2360 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2361 |
|items m| |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2362 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2363 |
exclusive ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2364 |
items := #( |
3694 | 2365 |
('Show Longer WalkBack' showMore ) |
2366 |
('Show Verbose WalkBack' showVerboseWalkback ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2367 |
('-' ) |
3511 | 2368 |
('Add Breakpoint' addBreakpoint ) |
2369 |
('Remove Breakpoint' removeBreakpoint ) |
|
2370 |
('Remove all Trace & Breakpoints' removeAllBreakpoints ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2371 |
('-' ) |
3694 | 2372 |
('Copy WalkBack Text' copyWalkbackText ) |
3482
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 |
('QuickTerminate' quickTerminate ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2375 |
('=' ) |
3694 | 2376 |
('Exit Smalltalk (no Confirmation)' exit ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2377 |
). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2378 |
] ifFalse:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2379 |
items := #( |
3694 | 2380 |
('Show Longer Walkback' showMore ) |
2381 |
('Show Verbose Walkback' showVerboseWalkback ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2382 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2383 |
('Skip' skip ) |
3694 | 2384 |
('Step Out' skipForReturn ) |
2385 |
('Skip until Entering...' skipUntilEntering ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2386 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2387 |
" |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2388 |
('Continue' doContinue ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2389 |
('Terminate' doTerminate ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2390 |
('Abort' doAbort ) |
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 |
('Step' doStep ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2393 |
('Send' doSend ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2394 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2395 |
('Return' doReturn ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2396 |
('Restart' doRestart ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2397 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2398 |
" |
3511 | 2399 |
('Add Breakpoint' addBreakpoint ) |
2400 |
('Remove Breakpoint' removeBreakpoint ) |
|
2401 |
('Remove all Trace & Breakpoints' removeAllBreakpoints ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2402 |
). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2403 |
|
5798 | 2404 |
self allowBreakPointsInDebugger ifFalse:[ |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2405 |
items := items , #( |
5664 | 2406 |
('Allow Halt & Breakpoint in Debugger' doNotIgnoreBreakpoints ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2407 |
). |
5798 | 2408 |
] ifTrue:[ |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2409 |
items := items , #( |
5798 | 2410 |
('Ignore Halt & Breakpoints in Debugger' doIgnoreBreakpoints ) |
3482
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 |
items := items , #( |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2415 |
('-' ) |
3694 | 2416 |
('Browse (Implementing Class)' browseImplementingClass ) |
2417 |
('Browse (Receivers Class)' browseReceiversClass ) |
|
2418 |
('Browse Class Hierarchy' browseClassHierarchy ) |
|
2419 |
('Browse Full Class Protocol' browseFullClassProtocol ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2420 |
('Implementors' browseImplementors ) |
3694 | 2421 |
('Implementors Of...' browseImplementorsOf ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2422 |
('Senders' browseSenders ) |
3694 | 2423 |
('Senders Of...' browseSendersOf ) |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2424 |
('-' ) |
3694 | 2425 |
('Inspect Context' inspectContext ) |
2426 |
('Copy WalkBack Text' copyWalkbackText ) |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2427 |
('-' ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2428 |
('QuickTerminate' quickTerminate ) |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2429 |
('=' ) |
3694 | 2430 |
('Exit Smalltalk (no Confirmation)' exit ) |
3482
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 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2433 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2434 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2435 |
m := PopUpMenu |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2436 |
itemList:items |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2437 |
resources:resources |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2438 |
receiver:self |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2439 |
for:contextView. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2440 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2441 |
verboseBacktrace ifTrue:[ |
3694 | 2442 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2443 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2444 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2445 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2446 |
inspecting ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2447 |
m notNil ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2448 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2449 |
browseClassHierarchy browseFullClassProtocol |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2450 |
browseImplementors browseSenders inspectContext skip doStepOut). |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2451 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2452 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2453 |
self updateMenuItems. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2454 |
|
3510 | 2455 |
^ m. |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2456 |
! |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
2457 |
|
1249 | 2458 |
postRealize |
2459 |
super postRealize. |
|
266 | 2460 |
|
2461 |
inspecting ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2462 |
inspectedProcess notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2463 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2464 |
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
|
2465 |
to run between mine and the debugged processes prio) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2466 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2467 |
Processor activeProcess |
6464 | 2468 |
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
|
2469 |
] |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2470 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2471 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2472 |
self sensor addEventListener:self. |
1249 | 2473 |
|
2474 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 2475 |
! |
2476 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2477 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2478 |
"/ 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
|
2479 |
"/ 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
|
2480 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2481 |
drawableId notNil ifTrue:[ |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2482 |
^ self |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2483 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2484 |
"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
|
2485 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2486 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2487 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2488 |
|
266 | 2489 |
setLabelFor:aMessage in:aProcess |
6821 | 2490 |
|l lines nm| |
2491 |
||
2492 |
lines := aMessage asStringCollection. |
|
2493 |
lines size > 1 ifTrue:[ |
|
2494 |
l := lines first |
|
2495 |
] ifFalse:[ |
|
2496 |
l := aMessage. |
|
2497 |
]. |
|
2498 |
||
2499 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2500 |
Error handle:[:ex | |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2501 |
l := l , '???' |
1030 | 2502 |
] do:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2503 |
nm := aProcess name. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2504 |
nm notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2505 |
l := l , (nm contractTo:17) , ''. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2506 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2507 |
l := l , '[' , aProcess id printString , ']'. |
73 | 2508 |
]. |
1030 | 2509 |
l := l , ')'. |
266 | 2510 |
self label:l. |
6821 | 2511 |
|
2512 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
|
0 | 2513 |
! ! |
2514 |
||
2515 |
!DebugView methodsFor:'interrupt handling'! |
|
2516 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2517 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2518 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2519 |
'contextIRQ' printCR. |
2581 | 2520 |
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
|
2521 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2522 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2523 |
|
1364 | 2524 |
"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
|
2525 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2526 |
|
0 | 2527 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2528 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2529 |
'stepIRQ' printCR. |
2581 | 2530 |
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
|
2531 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
2532 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2533 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2534 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
2535 |
"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
|
2536 |
! |
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 |
stepOrNext |
3055 | 2539 |
|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
|
2540 |
inBlock left ignore contextBelow lastWrappedContext |
3055 | 2541 |
leftWrap enteredWrap anyStepBlocks |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2542 |
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
|
2543 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2544 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
2545 |
"/ DebuggingDebugger := false |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
2546 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2547 |
skipLineNr == #return ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2548 |
name := Processor activeProcess nameOrId. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2549 |
self label:('stepping context returned ' , ' (process: ' , name , ')'). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2550 |
here := thisContext sender sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2551 |
here setLineNumber:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2552 |
here := nil. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2553 |
con := thisContext sender sender sender. |
3435 | 2554 |
|
2555 |
BreakPointInterrupt handle:[:ex | |
|
2556 |
'DebugView [info]: breakpoint in debugger ignored [stepOrNext]' infoPrintCR. |
|
2557 |
ex proceed |
|
2558 |
] do:[ |
|
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2559 |
self enter:con select:nil. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2560 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
2561 |
con := nil. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2562 |
^ self |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2563 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
2564 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2565 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2566 |
"/ "/ 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
|
2567 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2568 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2569 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2570 |
"/ 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
|
2571 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2572 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2573 |
|
52 | 2574 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2575 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2576 |
^ self |
52 | 2577 |
]. |
2578 |
||
29 | 2579 |
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
|
2580 |
here := here sender. "the caller; step- or contextIRQ" |
29 | 2581 |
here := here sender. "the interrupted context" |
2582 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2583 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2584 |
'*******' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2585 |
'here in ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2586 |
inWrap ifTrue:['(wrap) ' print.]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2587 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
3055 | 2588 |
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
|
2589 |
]. |
10 | 2590 |
|
2581 | 2591 |
"/ kludge an bug-workaround; |
2592 |
"/ I should not see those ... |
|
2593 |
||
2594 |
here selector == #ioInterrupt ifTrue:[ |
|
2595 |
DebuggingDebugger == true ifTrue:[ |
|
2596 |
'oops - should not get that one' printCR. |
|
2597 |
]. |
|
2598 |
Processor ioInterrupt. |
|
2599 |
StepInterruptPending := 1. |
|
2600 |
InterruptPending := 1. |
|
2601 |
where := nil. here := nil. |
|
2602 |
InStepInterrupt := nil. |
|
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2603 |
^ self |
2581 | 2604 |
]. |
2605 |
||
2606 |
stepUntilEntering notNil ifTrue:[ |
|
2607 |
DebuggingDebugger == true ifTrue:[ |
|
2608 |
'check if entering ' print. stepUntilEntering printCR. |
|
2609 |
]. |
|
2610 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
2611 |
DebuggingDebugger == true ifTrue:[ |
|
2612 |
'entering...' printCR. |
|
2613 |
]. |
|
2614 |
name := Processor activeProcess nameOrId. |
|
2615 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , name , ')'). |
|
2616 |
||
2617 |
lastStepUntilEntering := stepUntilEntering. |
|
2618 |
stepUntilEntering := nil. |
|
2619 |
self enter:here select:nil. |
|
2620 |
con := nil. |
|
2621 |
^ self |
|
2622 |
]. |
|
2623 |
"/ see if stepping context is still active ... |
|
2624 |
||
2625 |
con := here. |
|
2626 |
||
2627 |
DebuggingDebugger == true ifTrue:[ |
|
2628 |
'start searching at: ' print. |
|
2629 |
con fullPrint. |
|
2630 |
]. |
|
2631 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
2632 |
con := con sender |
|
2633 |
]. |
|
2634 |
con notNil ifTrue:[ |
|
2635 |
DebuggingDebugger == true ifTrue:[ |
|
2636 |
'steppingContext still active - continue stepping' printCR. |
|
2637 |
]. |
|
2638 |
con := nil. |
|
2639 |
where := nil. here := nil. |
|
2640 |
StepInterruptPending := 1. |
|
2641 |
InterruptPending := 1. |
|
2642 |
InStepInterrupt := nil. |
|
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2643 |
^ self |
2581 | 2644 |
]. |
2645 |
stepUntilEntering := nil. |
|
2646 |
]. |
|
2647 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2648 |
" |
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
2649 |
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
|
2650 |
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
|
2651 |
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
|
2652 |
" |
29 | 2653 |
isWrap := false. |
57 | 2654 |
left := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2655 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2656 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2657 |
where := here. |
57 | 2658 |
inWrap ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2659 |
wrappedMethod := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2660 |
5 timesRepeat:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2661 |
(where notNil and:[where isBlockContext not]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2662 |
method := where method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2663 |
(method notNil and:[method isWrapped]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2664 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2665 |
in a wrapper method |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2666 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2667 |
wrappedMethod ~~ method ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2668 |
wrappedMethod := method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2669 |
lastWrappedContext := where. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2670 |
where sender receiver == method originalMethod ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2671 |
isWrap := true. |
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 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2674 |
where == steppedContext ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2675 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2676 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2677 |
'change stepCon from: ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2678 |
steppedContext print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2679 |
' to lastWrapped: ' print. |
3055 | 2680 |
lastWrappedContext printCR. |
1399
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 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2683 |
inWrap := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2684 |
leftWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2685 |
wrapperContext := steppedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2686 |
steppedContext := lastWrappedContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2687 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2688 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2689 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2690 |
where := where sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2691 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2692 |
]. |
29 | 2693 |
]. |
2694 |
||
2695 |
isWrap ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2696 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2697 |
'ignore wrap' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2698 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2699 |
|
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 |
"/ ignore, while in wrappers hidden setup |
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 := nil. here := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2704 |
ObjectMemory flushInlineCaches. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2705 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2706 |
skipLineNr == #return ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2707 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2708 |
'skipRet in wrap' printCR. |
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 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2711 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2712 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2713 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2714 |
InStepInterrupt := nil. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2715 |
^ self |
29 | 2716 |
]. |
2717 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2718 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 2719 |
|
2581 | 2720 |
DebuggingDebugger == true ifTrue:[ |
2721 |
'bigStep is: ' print. bigStep printCR. |
|
2722 |
'steppedContext is: ' print. steppedContext printCR. |
|
2723 |
]. |
|
2724 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2725 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2726 |
"/ 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
|
2727 |
"/ |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
2728 |
(bigStep |
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
2729 |
and:[steppedContext notNil]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2730 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2731 |
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
|
2732 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2733 |
where := here. "the interrupted context" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2734 |
contextBelow := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2735 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2736 |
where home notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2737 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2738 |
"/ in a block called by 'our' context ? |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2739 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2740 |
where home == steppedContext ifTrue:[ |
3055 | 2741 |
"/ '*block*' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2742 |
inBlock := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2743 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2744 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2745 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2746 |
where == steppedContext ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2747 |
where := where sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2748 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2749 |
where notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2750 |
where home == steppedContext ifTrue:[ |
3055 | 2751 |
"/ '*block*' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2752 |
inBlock := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2753 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2754 |
]. |
57 | 2755 |
|
2756 |
"/ 'looking for ' print. |
|
3055 | 2757 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 2758 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2759 |
"/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
|
2760 |
"/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
|
2761 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2762 |
where == steppedContext ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2763 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2764 |
"/ check if we are in a context below steppedContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2765 |
"/ (i.e. if steppedContext can be reached from |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2766 |
"/ interrupted context. Not using context-ref but its |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2767 |
"/ address to avoid creation of many useless contexts.) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2768 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2769 |
inBlock ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2770 |
[where notNil] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2771 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2772 |
"/ 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
|
2773 |
"/ is a block of the steppedContext, we must really |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2774 |
"/ do a single step. Otherwise, stepping through a |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2775 |
"/ 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
|
2776 |
receiver := where receiver. |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2777 |
(receiver isBlock |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2778 |
and:[(receiver isKindOf:Block) |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2779 |
and:[receiver home == steppedContext]]) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2780 |
ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2781 |
anyStepBlocks := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2782 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2783 |
where args do:[:arg | |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2784 |
(arg isBlock |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2785 |
and:[(arg isKindOf:Block) |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2786 |
and:[arg home == steppedContext]]) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2787 |
ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2788 |
anyStepBlocks := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2789 |
] |
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 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2792 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2793 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2794 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
3055 | 2795 |
where selector printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2796 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2797 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2798 |
where == steppedContext ifTrue:[ |
3055 | 2799 |
"/ 'found it - below; ignore' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2800 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2801 |
found the interesting context somwehere up in the |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2802 |
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
|
2803 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2804 |
tracing == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2805 |
here printString 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 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2808 |
yes, a context below |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2809 |
- continue and schedule another stepInterrupt. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2810 |
Must flush caches since optimized methods not always |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2811 |
look for pending interrupts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2812 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2813 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2814 |
contextBelow notNil ifTrue:[ |
3055 | 2815 |
"/ '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
|
2816 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2817 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2818 |
"/ 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
|
2819 |
"/ ]. |
1399
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 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2822 |
'below stepCon; continue until unwind of: ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2823 |
contextBelow printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2824 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2825 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2826 |
StepInterruptPending := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2827 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2828 |
ObjectMemory flushInlineCaches. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2829 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2830 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
2831 |
"/ 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
|
2832 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2833 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2834 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2835 |
'in stepCon; continue single stepping' printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2836 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2837 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2838 |
InterruptPending := 1. |
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 |
where := nil. here := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2841 |
InStepInterrupt := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2842 |
|
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
2843 |
^ self |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2844 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2845 |
|
1537 | 2846 |
(steppedContext notNil and:[ |
2847 |
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
|
2848 |
inBlockBelow := true. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2849 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2850 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2851 |
anyStepBlocks ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2852 |
inBlock ifFalse:[ |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2853 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2854 |
"/ 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
|
2855 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2856 |
where isBlockContext ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2857 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
2858 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2859 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2860 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2861 |
where := where sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2862 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2863 |
s := 'context returned'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2864 |
left := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2865 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2866 |
] ifTrue:[ |
3055 | 2867 |
"/ 'found it right in sender' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2868 |
s := 'after step' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2869 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2870 |
] ifTrue:[ |
3055 | 2871 |
"/ 'found it right away' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2872 |
s := 'after step' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2873 |
]. |
0 | 2874 |
] ifFalse:[ |
3055 | 2875 |
"/ ' send' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2876 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2877 |
a send |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2878 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2879 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2880 |
'clear steppedContext' printCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2881 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2882 |
steppedContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2883 |
s := 'after send' |
0 | 2884 |
]. |
7 | 2885 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2886 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2887 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2888 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2889 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2890 |
|
790 | 2891 |
"/ handle the case, when a subBlock leaves; |
2892 |
"/ continue stepping in the home context. |
|
2893 |
||
2894 |
left ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2895 |
steppedContext home notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2896 |
steppedContext := steppedContext home. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2897 |
s := 'after step'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2898 |
left := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
2899 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
2900 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2901 |
] |
790 | 2902 |
]. |
2903 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2904 |
" |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2905 |
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
|
2906 |
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
|
2907 |
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
|
2908 |
" |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2909 |
(where isNil |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2910 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2911 |
ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2912 |
"/ did not find our steppedContext along the chain; |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2913 |
"/ could be in a wrappedMethods exitBlock ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2914 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2915 |
leftWrap ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2916 |
where := here. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2917 |
wrappedMethod := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2918 |
5 timesRepeat:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2919 |
where notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2920 |
where isBlockContext ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2921 |
method := where method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2922 |
(method notNil and:[method isWrapped]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2923 |
where == wrapperContext ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2924 |
DebuggingDebugger == true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2925 |
'change stepCon fromWrapped: ' print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2926 |
steppedContext print. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2927 |
' to: ' print. |
3055 | 2928 |
wrapperContext printCR. |
1399
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 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2931 |
inWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2932 |
enteredWrap := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2933 |
steppedContext := wrapperContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2934 |
wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2935 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2936 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2937 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2938 |
where := where sender |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2939 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2940 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2941 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2942 |
enteredWrap ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2943 |
ignore := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2944 |
] |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2945 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2946 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2947 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2948 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2949 |
left ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2950 |
"/ special care for stepInterrupt in send, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2951 |
"/ when created a dummy context (lineNr == 1) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2952 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2953 |
steppedContext lineNumber isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2954 |
steppedContext selector == here sender selector ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2955 |
left := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2956 |
s := 'after step'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2957 |
steppedContext := here sender. |
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 |
oneMore := true |
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2961 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
2962 |
|
57 | 2963 |
inBlock ifTrue:[ |
3055 | 2964 |
"/ 'inBlock' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2965 |
s := 'in block'. |
57 | 2966 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2967 |
inBlockBelow ifTrue:[ |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2968 |
ignore := true |
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
2969 |
]. |
57 | 2970 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
2971 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2972 |
where notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2973 |
'(' print. steppedContextLineno print. ') ' print. |
3055 | 2974 |
where printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2975 |
]. |
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
2976 |
]. |
57 | 2977 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
2978 |
ignore ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2979 |
(bigStep |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2980 |
and:[steppedContextLineno notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2981 |
and:[where notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2982 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2983 |
(here isBlockContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2984 |
and:[(here methodHome == steppedContext) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2985 |
or:[here home == steppedContext]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2986 |
DebuggingDebugger == true ifTrue:[ |
3055 | 2987 |
'same line but in block' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2988 |
]. |
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 |
steppedContext := actualContext := here. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2991 |
steppedContextLineno := here lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2992 |
] ifFalse:[ |
3063 | 2993 |
"/ kludge - I only have the info for up to 255 lines |
2994 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
2995 |
DebuggingDebugger == true ifTrue:[ |
|
2996 |
'same line - ignored' printCR. |
|
2997 |
]. |
|
2998 |
ignore := true |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
2999 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3000 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3001 |
]. |
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 |
(left not |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3004 |
and:[skipLineNr notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3005 |
and:[where notNil |
1764
e7aa6f50e766
care for nil-linenumber in stepOrNext.
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3006 |
and:[where lineNumber notNil |
e7aa6f50e766
care for nil-linenumber in stepOrNext.
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3007 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3008 |
DebuggingDebugger == true ifTrue:[ |
3055 | 3009 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3010 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3011 |
ignore := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3012 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3013 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3014 |
(steppedContextLineno isNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3015 |
and:[skipLineNr isNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3016 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3017 |
DebuggingDebugger == true ifTrue:[ |
3055 | 3018 |
'same line2 (after conIRQ) - ignored' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3019 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3020 |
ignore := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3021 |
]. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3022 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3023 |
|
57 | 3024 |
ignore ifTrue:[ |
3055 | 3025 |
"/' ' printCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3026 |
where := nil. here := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3027 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3028 |
yes, a context below |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3029 |
- continue and schedule another stepInterrupt. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3030 |
Must flush caches since optimized methods not always |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3031 |
look for pending interrupts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3032 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3033 |
ObjectMemory flushInlineCaches. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3034 |
StepInterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3035 |
InterruptPending := 1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3036 |
InStepInterrupt := nil. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3037 |
^ self |
57 | 3038 |
]. |
3039 |
||
3055 | 3040 |
"/ ' ' printCR. |
57 | 3041 |
|
29 | 3042 |
name := Processor activeProcess nameOrId. |
7 | 3043 |
self label:(s , ' (process: ' , name , ')'). |
3044 |
||
57 | 3045 |
tracing := false. |
3046 |
bigStep := false. |
|
3047 |
||
0 | 3048 |
"release refs to context" |
3049 |
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
|
3050 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3051 |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3052 |
DebuggingDebugger == true ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3053 |
'==> 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
|
3054 |
]. |
1364 | 3055 |
|
3056 |
initiallyShown := nil. |
|
3057 |
(oneMore == true) ifTrue:[ |
|
1871
971fe3afd573
care for nil lineNumber in context (how can this happen ?)
Claus Gittinger <cg@exept.de>
parents:
1824
diff
changeset
|
3058 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3059 |
initiallyShown := 2 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3060 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3061 |
initiallyShown := 1 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3062 |
] |
1364 | 3063 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3064 |
con := thisContext sender sender. |
3435 | 3065 |
|
3066 |
BreakPointInterrupt handle:[:ex | |
|
3447 | 3067 |
'DebugView [info]: breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
3435 | 3068 |
ex proceed |
3069 |
] do:[ |
|
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3070 |
self enter:con select:initiallyShown |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3071 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3072 |
con := nil |
1364 | 3073 |
|
3074 |
"Created: / 14.10.1996 / 12:53:39 / cg" |
|
3447 | 3075 |
"Modified: / 18.11.2001 / 01:00:55 / cg" |
0 | 3076 |
! ! |
3077 |
||
4867 | 3078 |
!DebugView methodsFor:'menu & button actions'! |
266 | 3079 |
|
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3080 |
addBreakpoint |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3081 |
"add a breakpoint on the selected contexts method - if any" |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3082 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3083 |
|implementorClass method| |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3084 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3085 |
selectedContext isNil ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3086 |
^ self showError:'** select a context first **' |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3087 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3088 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3089 |
^ self |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3090 |
]. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3091 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3092 |
implementorClass := selectedContext methodClass. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3093 |
implementorClass notNil ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3094 |
method := implementorClass compiledMethodAt:selectedContext selector. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3095 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3096 |
method setBreakPoint |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3097 |
] |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3098 |
]. |
3511 | 3099 |
contextView middleButtonMenu disable:#addBreakpoint. |
3482
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3100 |
contextView middleButtonMenu enable:#removeBreakpoint. |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3101 |
|
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3102 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3103 |
! |
6ba75681ea47
add breakpoint menu function
Claus Gittinger <cg@exept.de>
parents:
3463
diff
changeset
|
3104 |
|
5875 | 3105 |
addBrowserBookmark |
3106 |
"add a browser-bookmark for the selected contexts method" |
|
3107 |
||
3108 |
|cls sel| |
|
3109 |
||
3110 |
selectedContext isNil ifTrue:[^ self]. |
|
3111 |
||
3112 |
cls := selectedContext receiver class. |
|
3113 |
sel := selectedContext selector. |
|
3114 |
(cls includesSelector:sel) ifFalse:[ |
|
3115 |
sel := nil |
|
3116 |
]. |
|
3117 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
3118 |
! |
|
3119 |
||
3511 | 3120 |
allowBreakPointsInDebugger |
3121 |
^ ignoreBreakpoints not |
|
3122 |
! |
|
3123 |
||
3124 |
allowBreakPointsInDebugger:aBoolean |
|
3125 |
ignoreBreakpoints := aBoolean not. |
|
5798 | 3126 |
self initializeMiddleButtonMenu. |
3127 |
self initializeContextViewsMiddleButtonMenu. |
|
3511 | 3128 |
! |
3129 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3130 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3131 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3132 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3133 |
"Created: / 15-05-2007 / 13:29:55 / cg" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3134 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3135 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3136 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3137 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3138 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3139 |
"Created: / 15-05-2007 / 13:30:04 / cg" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3140 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3141 |
|
266 | 3142 |
autoUpdateOff |
3143 |
"stop the update process" |
|
3144 |
||
3145 |
updateProcess notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3146 |
monitorToggle lampColor:(Color yellow). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3147 |
updateProcess terminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3148 |
updateProcess := nil |
266 | 3149 |
] |
3150 |
! |
|
3151 |
||
3152 |
autoUpdateOn |
|
3153 |
"fork a subprocess which updates the contextList in regular intervals" |
|
3154 |
||
3155 |
updateProcess isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3156 |
updateProcess := |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3157 |
[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3158 |
[true] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3159 |
monitorToggle showLamp ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3160 |
monitorToggle lampColor:(Color yellow). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3161 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3162 |
monitorToggle activeForegroundColor:Color black. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3163 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3164 |
(Delay forSeconds:0.25) wait. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3165 |
self updateContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3166 |
monitorToggle showLamp ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3167 |
monitorToggle lampColor:(Color red). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3168 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3169 |
monitorToggle activeForegroundColor:Color red. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3170 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3171 |
(Delay forSeconds:0.25) wait. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3172 |
self updateContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3173 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3174 |
] forkAt:(Processor activePriority - 1) |
266 | 3175 |
] |
3176 |
||
3177 |
! |
|
3178 |
||
3269 | 3179 |
browseClass |
3180 |
"browse the reveivers class (of the selected contexts message)" |
|
3181 |
||
3182 |
|cls sel| |
|
3183 |
||
3184 |
selectedContext isNil ifTrue:[^ self]. |
|
3185 |
||
3186 |
cls := selectedContext receiver class. |
|
3187 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3188 |
(cls includesSelector:sel) ifFalse:[ |
3269 | 3189 |
sel := nil |
3190 |
]. |
|
3191 |
cls browserClass openInClass:cls selector:sel. |
|
3192 |
||
3193 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3194 |
! |
|
3195 |
||
3196 |
browseClassHierarchy |
|
3197 |
"browse the reveivers classHierarchy (of the selected contexts message)" |
|
3198 |
||
3199 |
|cls mthd| |
|
3200 |
||
3201 |
selectedContext isNil ifTrue:[^ self]. |
|
3202 |
||
3203 |
mthd := selectedContext method. |
|
3447 | 3204 |
mthd notNil ifTrue:[ |
3205 |
cls := mthd containingClass. |
|
3206 |
"/ still nil if unbound - then use receivers class |
|
3207 |
]. |
|
3208 |
cls isNil ifTrue:[ |
|
3269 | 3209 |
cls := selectedContext receiver class |
3210 |
]. |
|
3211 |
cls browserClass browseClassHierarchy:cls. |
|
3212 |
||
3447 | 3213 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 3214 |
! |
3215 |
||
3216 |
browseFullClassProtocol |
|
3217 |
"browse the reveivers full protocol (of the selected contexts message)" |
|
3218 |
||
3219 |
|cls mthd| |
|
3220 |
||
3221 |
selectedContext isNil ifTrue:[^ self]. |
|
3222 |
||
3223 |
mthd := selectedContext method. |
|
3447 | 3224 |
mthd notNil ifTrue:[ |
3225 |
cls := mthd containingClass. |
|
3226 |
"/ still nil if unbound - then use receivers class |
|
3227 |
]. |
|
3228 |
cls isNil ifTrue:[ |
|
3269 | 3229 |
cls := selectedContext receiver class |
3230 |
]. |
|
3231 |
cls browserClass browseFullClassProtocol:cls. |
|
3232 |
||
3447 | 3233 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 3234 |
! |
3235 |
||
3236 |
browseImplementingClass |
|
3237 |
"browse the implementing class (of the selected contexts message)" |
|
3238 |
||
824
099fa90db8aa
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
804
diff
changeset
|
3239 |
|mthd who sel cls| |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3240 |
|
1452 | 3241 |
selectedContext isNil ifTrue:[^ self]. |
3242 |
||
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3243 |
mthd := selectedContext method. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3244 |
mthd notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3245 |
who := selectedContext method who. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3246 |
who notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3247 |
cls := who methodClass. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3248 |
sel := who methodSelector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3249 |
] |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3250 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3251 |
cls isNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3252 |
"/ class not found - try receiver |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3253 |
cls := selectedContext receiver class |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3254 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3255 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3256 |
cls browserClass openInClass:cls selector:sel. |
266 | 3257 |
|
1452 | 3258 |
"Created: / 22.11.1995 / 21:27:01 / cg" |
3259 |
"Modified: / 3.2.1998 / 19:46:40 / cg" |
|
266 | 3260 |
! |
3261 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3262 |
browseImplementors |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3263 |
"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
|
3264 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3265 |
selectedContext isNil ifTrue:[ |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3266 |
^ self showError:'** select a context first **' |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3267 |
]. |
4153 | 3268 |
"/ selectedContext receiver class browserClass |
3269 |
UserPreferences systemBrowserClass |
|
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2678
diff
changeset
|
3270 |
browseImplementorsOf:selectedContext selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3271 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3272 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3273 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3274 |
"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
|
3275 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3276 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3277 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3278 |
(sel := codeView selection) notNil ifTrue:[ |
2812 | 3279 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3280 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3281 |
initial isNil ifTrue:[ |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3282 |
initial := selectedContext isNil |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3283 |
ifTrue:[nil] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3284 |
ifFalse:[selectedContext selector]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3285 |
]. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3286 |
selector := Dialog |
3320 | 3287 |
requestSelector:'Selector to browse implementors of:' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3288 |
initialAnswer:initial. |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3289 |
selector size == 0 ifFalse:[ |
3140 | 3290 |
UserPreferences systemBrowserClass |
4153 | 3291 |
browseImplementorsMatching:selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3292 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3293 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3294 |
"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
|
3295 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3296 |
|
3269 | 3297 |
browseReceiversClass |
3298 |
"browse the reveivers class (of the selected contexts message)" |
|
3299 |
||
3300 |
|cls sel| |
|
3301 |
||
3302 |
selectedContext isNil ifTrue:[^ self]. |
|
3303 |
||
3304 |
cls := selectedContext receiver class. |
|
3305 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3306 |
(cls includesSelector:sel) ifFalse:[ |
3269 | 3307 |
sel := nil |
3308 |
]. |
|
3309 |
cls browserClass openInClass:cls selector:sel. |
|
3310 |
||
3311 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3312 |
! |
|
3313 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3314 |
browseSenders |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3315 |
"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
|
3316 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3317 |
selectedContext isNil ifTrue:[ |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3318 |
^ self showError:'** select a context first **' |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3319 |
]. |
3140 | 3320 |
UserPreferences systemBrowserClass |
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2678
diff
changeset
|
3321 |
browseAllCallsOn:selectedContext selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3322 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3323 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3324 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3325 |
"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
|
3326 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3327 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3328 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3329 |
(sel := codeView selection) notNil ifTrue:[ |
2812 | 3330 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3331 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3332 |
initial isNil ifTrue:[ |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3333 |
initial := selectedContext isNil |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3334 |
ifTrue:[nil] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3335 |
ifFalse:[selectedContext selector]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3336 |
]. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3337 |
selector := Dialog |
3333 | 3338 |
requestSelector:'Selector to browse senders of:' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3339 |
initialAnswer:initial. |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3340 |
selector size == 0 ifFalse:[ |
3140 | 3341 |
UserPreferences systemBrowserClass |
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2678
diff
changeset
|
3342 |
browseAllCallsOn:selector asSymbol. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3343 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3344 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3345 |
"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
|
3346 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3347 |
|
266 | 3348 |
copyWalkbackText |
3349 |
"place the contents of the walkback view into the copy-paste buffer. |
|
3350 |
This allows pasting it into some other view for printing ..." |
|
3351 |
||
6034 | 3352 |
self setClipboardText:(contextArray collect:[:con | con fullPrintString]) asStringCollection |
266 | 3353 |
|
3354 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
3355 |
! |
|
3356 |
||
3357 |
doAbort |
|
1187 | 3358 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 3359 |
at save places (for example: in the event loop) and returns back |
3360 |
from whatever the process is doing, but does not terminate it." |
|
3361 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3362 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3363 |
(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
|
3364 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3365 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3366 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3367 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3368 |
|
266 | 3369 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3370 |
inspectedProcess isDead ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3371 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3372 |
^ self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3373 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
3374 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3375 |
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
|
3376 |
] ifTrue:[ |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
3377 |
self interruptProcessWith:[AbortOperationRequest raise]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3378 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3379 |
^ self |
266 | 3380 |
]. |
3381 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3382 |
steppedContext := wrapperContext := nil. |
266 | 3383 |
haveControl := false. |
3384 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3385 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3386 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3387 |
catchBlock notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3388 |
abortButton turnOff. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3389 |
catchBlock value. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3390 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3391 |
"/ not reached |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3392 |
'DebugView [warning]: abort failed' errorPrintCR. |
266 | 3393 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3394 |
|
266 | 3395 |
^ self. |
3396 |
||
3447 | 3397 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 3398 |
! |
3399 |
||
6487 | 3400 |
doAbortAll |
3401 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
3402 |
at save places (for example: in the event loop) and returns back |
|
3403 |
from whatever the process is doing, but does not terminate it." |
|
3404 |
||
3405 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
3406 |
(self confirm:('Code modified - abort anyway ?')) |
|
3407 |
ifFalse:[ |
|
3408 |
^ self |
|
3409 |
] |
|
3410 |
]. |
|
3411 |
||
3412 |
inspecting ifTrue:[ |
|
3413 |
inspectedProcess isDead ifTrue:[ |
|
3414 |
self showTerminated. |
|
3415 |
^ self |
|
3416 |
]. |
|
3417 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
3418 |
self showError:'** the process does not handle the abort signal **' |
|
3419 |
] ifTrue:[ |
|
3420 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
3421 |
]. |
|
3422 |
^ self |
|
3423 |
]. |
|
3424 |
||
3425 |
steppedContext := wrapperContext := nil. |
|
3426 |
haveControl := false. |
|
3427 |
exitAction := #abortAll. |
|
3428 |
||
3429 |
"exit private event-loop" |
|
3430 |
catchBlock notNil ifTrue:[ |
|
3431 |
abortButton turnOff. |
|
3432 |
catchBlock value. |
|
3433 |
||
3434 |
"/ not reached |
|
3435 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
3436 |
]. |
|
3437 |
||
3438 |
^ self. |
|
3439 |
||
3440 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
3441 |
! |
|
3442 |
||
266 | 3443 |
doContinue |
3444 |
"continue from menu" |
|
3445 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3446 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3447 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3448 |
self checkIfCodeIsReallyModified ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3449 |
(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
|
3450 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3451 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3452 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3453 |
|
266 | 3454 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3455 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3456 |
continueButton foregroundColor:Color red darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3457 |
]. |
6647 | 3458 |
continueButton label:(resources string:'Stop'). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3459 |
continueButton action:[self doStop]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3460 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3461 |
self processPerform:#resume. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3462 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3463 |
^ self |
266 | 3464 |
]. |
3465 |
canContinue ifTrue:[ |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3466 |
exContext := thisContext findSpecialHandle:false raise:true. |
1725 | 3467 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
3468 |
(exContext notNil |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
3469 |
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
|
3470 |
and:[ ex isException |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3471 |
and:[ ex signal == NoHandlerError |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
3472 |
and:[ ex parameter signal == RecursionError]]]]) |
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3473 |
ifTrue:[ |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3474 |
"/ debug due to unhandled recursionInterrupt. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3475 |
"/ ask if we should proceed with more stack. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3476 |
|
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3477 |
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
|
3478 |
answer == true ifTrue:[ |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3479 |
proc := Processor activeProcess. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3480 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3481 |
]. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3482 |
]. |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3483 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3484 |
steppedContext := wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3485 |
tracing := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3486 |
haveControl := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3487 |
exitAction := #continue. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3488 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3489 |
"exit private event-loop" |
6365 | 3490 |
catchBlock value. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3491 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3492 |
"/ not reached. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3493 |
'DebugView [warning]: continue failed' errorPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3494 |
continueButton turnOff. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3495 |
|
266 | 3496 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3497 |
inspecting ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3498 |
'DebugView [info]: resuming top context' infoPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3499 |
self showSelection:1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3500 |
self doReturn |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3501 |
] |
266 | 3502 |
] |
477 | 3503 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
3504 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 3505 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 3506 |
! |
3507 |
||
3187 | 3508 |
doDefine |
5955 | 3509 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
3510 |
bagOfClassNames bagOfUsedClassNames| |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3511 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3512 |
selectionIndex := contextView selection. |
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3513 |
|
3283 | 3514 |
selector := actualContext selector. |
5955 | 3515 |
|
3516 |
"generate nice argument names" |
|
3517 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
3518 |
bagOfUsedClassNames := Bag new. |
|
3519 |
argNames := actualContext args |
|
3520 |
collect: |
|
3521 |
[:eachArg | |
|
3522 |
|nm| |
|
3523 |
||
3524 |
nm := eachArg class name. |
|
3525 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
|
3526 |
nm article , nm |
|
3527 |
] ifFalse:[ |
|
3528 |
bagOfUsedClassNames add:nm. |
|
3529 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
3530 |
]. |
|
3531 |
]. |
|
3532 |
||
3533 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 3534 |
|
3447 | 3535 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
3536 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
3537 |
||
3538 |
actualContext receiver isNil ifTrue:[ |
|
3539 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
|
3540 |
ifFalse:[ |
|
3541 |
^ self |
|
3542 |
] |
|
3543 |
]. |
|
3544 |
||
3545 |
receiversClass := actualContext receiver class. |
|
3546 |
||
3547 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
|
3548 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
|
3549 |
cat := 'accessing'. |
|
3550 |
]. |
|
3551 |
(selector numArgs == 1 |
|
3552 |
and:[(selector endsWith:':') |
|
3553 |
and:[receiversClass instVarNames includes:(selector copyWithoutLast:1)]]) |
|
3554 |
ifTrue:[ |
|
3555 |
code := '%1\' , haltStmtFix , '\ %2 := arg.'. |
|
3556 |
cat := 'accessing'. |
|
3557 |
]. |
|
3558 |
||
3559 |
"/ actualContext receiver isClass ifTrue:[ |
|
3560 |
"/ selector == #new ifTrue:[ |
|
3561 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
3562 |
"/ ]. |
|
3563 |
"/ selector == #'new:' ifTrue:[ |
|
3564 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
3565 |
"/ ]. |
|
3566 |
"/ ]. |
|
3567 |
code isNil ifTrue:[ |
|
3568 |
code := '%1\' , haltStmtDef |
|
3569 |
]. |
|
3570 |
||
3187 | 3571 |
self |
3447 | 3572 |
codeAccept:(code bindWith:proto with:selector) withCRs |
3427 | 3573 |
unwind:false |
3447 | 3574 |
category:cat |
3427 | 3575 |
onCancel:[^ self]. |
3269 | 3576 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
3577 |
self doShowSelection:selectionIndex. |
3269 | 3578 |
self doRestart |
3427 | 3579 |
|
3447 | 3580 |
"Modified: / 17.11.2001 / 23:43:54 / cg" |
3187 | 3581 |
! |
3582 |
||
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3583 |
doIgnoreBreakpoints |
3511 | 3584 |
self allowBreakPointsInDebugger:false |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3585 |
! |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3586 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3587 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3588 |
"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
|
3589 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3590 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3591 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3592 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3593 |
(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
|
3594 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3595 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3596 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3597 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3598 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3599 |
canContinue ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3600 |
steppedContext := wrapperContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3601 |
haveControl := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3602 |
exitAction := #step. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3603 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3604 |
"exit private event-loop" |
6365 | 3605 |
catchBlock value. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3606 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3607 |
"/ not reached |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3608 |
'DebugView [warning]: send failed' errorPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3609 |
sendButton turnOff. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3610 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3611 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3612 |
"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
|
3613 |
"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
|
3614 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3615 |
|
266 | 3616 |
doNext |
1072 | 3617 |
"skip for next source-code line; entering blocks" |
266 | 3618 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3619 |
stepHow := #nextIn. |
266 | 3620 |
self doStep:nil |
790 | 3621 |
|
1072 | 3622 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3623 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3624 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3625 |
doNextOut |
1072 | 3626 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3627 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3628 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3629 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3630 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3631 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 3632 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3633 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3634 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3635 |
doNextOver |
1072 | 3636 |
"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
|
3637 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3638 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3639 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3640 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3641 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 3642 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 3643 |
! |
3644 |
||
3645 |
doNoTrace |
|
3646 |
traceView notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3647 |
traceView topView destroy. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3648 |
traceView := nil. |
266 | 3649 |
]. |
3650 |
tracing := false |
|
3651 |
! |
|
3652 |
||
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3653 |
doNotIgnoreBreakpoints |
3511 | 3654 |
self allowBreakPointsInDebugger:true |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3655 |
! |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
3656 |
|
4356 | 3657 |
doOpenReportMailApp |
3658 |
"open a mail report tool" |
|
3659 |
||
3660 |
| str | |
|
3661 |
str := '' writeStream. |
|
3662 |
||
3663 |
str nextPutLine:('Error notification from ' |
|
3664 |
, OperatingSystem getLoginName |
|
3665 |
, '@' |
|
3666 |
, OperatingSystem getHostName). |
|
3667 |
str cr. |
|
3668 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
3669 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 3670 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
3671 |
str nextPutLine:('Description: ' , self label). |
|
3672 |
"/ str nextPutLine:('Error: ', printedException description). |
|
3673 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
3674 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
3675 |
str nextPutLine:'Backtrace:'. |
|
3676 |
str cr. |
|
3677 |
||
3678 |
firstContext notNil ifTrue:[ |
|
3679 |
firstContext fullPrintAllOn:str. |
|
3680 |
]. |
|
3681 |
str cr;cr. |
|
3682 |
SendMailTool openForMessage:(str contents) withSubject:('STX Error:[', self label, ']') preOpenBlock:[:inst| |
|
3683 |
inst recipientEntryField value:'error@exept.de' |
|
3684 |
]. |
|
3685 |
str close. |
|
3686 |
! |
|
3687 |
||
266 | 3688 |
doRestart |
3689 |
"restart - the selected context will be restarted" |
|
6365 | 3690 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3691 |
self checkIfCodeIsReallyModified ifTrue:[ |
6365 | 3692 |
(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
|
3693 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3694 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3695 |
]. |
266 | 3696 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3697 |
selectedContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3698 |
^ self showError:'** select a context first **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3699 |
]. |
6365 | 3700 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3701 |
^ self |
266 | 3702 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3703 |
steppedContext := wrapperContext := nil. |
266 | 3704 |
haveControl := false. |
6365 | 3705 |
exitAction := #restart. "exit private event-loop" |
3706 |
||
3707 |
catchBlock value. |
|
3708 |
||
3709 |
"/ normally not reached |
|
3710 |
||
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3711 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3712 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3713 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3714 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 3715 |
! |
3716 |
||
3717 |
doReturn |
|
3718 |
"return - the selected context will do a ^nil" |
|
3719 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3720 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3721 |
(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
|
3722 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3723 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3724 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3725 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3726 |
|
266 | 3727 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3728 |
selectedContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3729 |
^ self showError:'** select a context first **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3730 |
]. |
2313 | 3731 |
self interruptProcessWith:[selectedContext unwind:nil]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3732 |
^ self |
266 | 3733 |
]. |
3734 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3735 |
steppedContext := wrapperContext := nil. |
266 | 3736 |
haveControl := false. |
3737 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3738 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3739 |
"exit private event-loop" |
6365 | 3740 |
catchBlock value. |
477 | 3741 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3742 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3743 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3744 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3745 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3746 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 3747 |
! |
3748 |
||
3749 |
doSend |
|
3750 |
"single send; reenter with next message send" |
|
3751 |
||
1072 | 3752 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3753 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3754 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3755 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3756 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3757 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3758 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3759 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3760 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3761 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3762 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3763 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3764 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3765 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3766 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3767 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3768 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
3769 |
|
1072 | 3770 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 3771 |
! |
3772 |
||
3773 |
doStep |
|
3774 |
"skip for next send in selected method" |
|
3775 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3776 |
stepHow := #step. |
790 | 3777 |
self doStep:-1 |
3778 |
||
1072 | 3779 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 3780 |
! |
3781 |
||
3782 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3783 |
"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
|
3784 |
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
|
3785 |
or to next line (if nil) or to next send (if -1)" |
266 | 3786 |
|
3787 |
|con method| |
|
3788 |
||
3789 |
inspecting ifTrue:[^ self]. |
|
3790 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3791 |
self checkIfCodeIsReallyModified ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3792 |
(self confirm:('Code modified - step anyway ?')) |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3793 |
ifFalse:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3794 |
^ self |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3795 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3796 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3797 |
|
266 | 3798 |
canContinue ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3799 |
selectedContext notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3800 |
con := actualContext. "/ selectedContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3801 |
steppedContextLineno := actualContext lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3802 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3803 |
con := contextArray at:2. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3804 |
steppedContextLineno := con lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3805 |
]. |
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 |
skipLineNr := lineNr. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3808 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3809 |
lineNr == -1 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3810 |
steppedContextLineno := skipLineNr := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3811 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3812 |
|
2581 | 3813 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3814 |
steppedContext := contextArray at:1. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3815 |
stepHow := #nextIn. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3816 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3817 |
stepHow == #nextOut ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3818 |
steppedContext := con home. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3819 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3820 |
steppedContext := con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3821 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3822 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3823 |
wrapperContext := nil. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3824 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3825 |
"/ ' 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
|
3826 |
|
1399
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 |
if we step in a wrapped method, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3829 |
prepare to skip the prolog ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3830 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3831 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3832 |
inWrap := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3833 |
method := con method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3834 |
(method notNil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3835 |
and:[method isWrapped |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3836 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3837 |
inWrap := true |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3838 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3839 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3840 |
lineNr == #return ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3841 |
Processor activeProcess forceInterruptOnReturnOf:con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3842 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3843 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3844 |
con := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3845 |
bigStep := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3846 |
haveControl := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3847 |
exitAction := #step. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3848 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3849 |
"exit private event-loop" |
6365 | 3850 |
catchBlock value. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3851 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3852 |
"/ not reached |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3853 |
'DebugView [warning]: step failed' errorPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3854 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
266 | 3855 |
] |
477 | 3856 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3857 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 3858 |
! |
3859 |
||
3860 |
doStop |
|
3861 |
"stop the process (if its running, otherwise this is a no-op)" |
|
3862 |
||
3863 |
inspecting ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3864 |
device hasColors ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3865 |
continueButton foregroundColor:Color green darkened darkened. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3866 |
]. |
6647 | 3867 |
continueButton label:(resources string:'Continue'). |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3868 |
continueButton action:[self doContinue]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3869 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3870 |
self processPerform:#stop. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3871 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3872 |
^ self |
266 | 3873 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
3874 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
3875 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 3876 |
! |
3877 |
||
3878 |
doTerminate |
|
3879 |
"terminate - the process has a chance for cleanup" |
|
3880 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3881 |
self checkIfCodeIsReallyModified ifTrue:[ |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3882 |
(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
|
3883 |
ifFalse:[ |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3884 |
^ self |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3885 |
] |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3886 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3887 |
|
266 | 3888 |
inspecting ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3889 |
self processPerform:#terminate. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3890 |
^ self |
266 | 3891 |
]. |
3892 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3893 |
steppedContext := wrapperContext := nil. |
266 | 3894 |
haveControl := false. |
3895 |
exitAction := #terminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3896 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3897 |
"exit private event-loop" |
6365 | 3898 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3899 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3900 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3901 |
inspecting ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3902 |
'DebugView [warning]: terminate failed' errorPrintCR. |
5884 | 3903 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
3904 |
Debugger newDebugger. |
|
3905 |
Processor activeProcess terminate. |
|
3906 |
] |
|
266 | 3907 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3908 |
terminateButton turnOff. |
477 | 3909 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3910 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 3911 |
! |
3912 |
||
3913 |
doTrace |
|
3914 |
"tracing - not really implemented ..." |
|
3915 |
||
3916 |
self warn:'this function is not yet implemented'. |
|
3917 |
||
3918 |
"/ |v b| |
|
3919 |
"/ |
|
3920 |
"/ traceView isNil ifTrue:[ |
|
3921 |
"/ v := StandardSystemView on:Display. |
|
3922 |
"/ v label:'Debugger-Trace'. |
|
3923 |
"/ v icon:icon. |
|
3924 |
"/ |
|
3925 |
"/ b := Button label:'untrace' in:v. |
|
3926 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
3927 |
"/ b action:[ |
|
3928 |
"/ StepInterruptPending := nil. |
|
3929 |
"/ tracing := false. |
|
3930 |
"/ v unrealize. |
|
3931 |
"/ traceView := nil |
|
3932 |
"/ ]. |
|
3933 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
3934 |
"/ traceView origin:(0 @ (b height)) |
|
3935 |
"/ extent:[v width @ (v height - b height)] |
|
3936 |
"/ ]. |
|
3937 |
"/ v realize. |
|
3938 |
"/ |
|
3939 |
"/ tracing := true. |
|
3940 |
! |
|
3941 |
||
3942 |
doTraceStep |
|
3943 |
"tracestep - not implemented yet" |
|
3944 |
||
3945 |
canContinue ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3946 |
tracing := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3947 |
self doStep |
266 | 3948 |
] |
3949 |
! |
|
3950 |
||
3951 |
exit |
|
3952 |
"exit from menu: immediate exit from smalltalk" |
|
3953 |
||
3954 |
OperatingSystem exit |
|
3955 |
! |
|
3956 |
||
3957 |
inspectContext |
|
3958 |
"launch an inspector on the currently selected context" |
|
3959 |
||
3960 |
contextView selection notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3961 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3962 |
(contextArray at:(contextView selection)) inspect. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3963 |
] |
266 | 3964 |
] |
3965 |
! |
|
3966 |
||
3447 | 3967 |
openAboutThisApplication |
3968 |
"opens an about box for this application." |
|
3969 |
||
7112 | 3970 |
Dialog aboutClass:self class. |
3971 |
||
3972 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 3973 |
! |
3974 |
||
266 | 3975 |
quickTerminate |
3976 |
"quick terminate - the process will get no chance for cleanup actions" |
|
3977 |
||
3978 |
inspecting ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3979 |
self processPerform:#terminateNoSignal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3980 |
^ self |
266 | 3981 |
]. |
3982 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3983 |
steppedContext := wrapperContext := nil. |
266 | 3984 |
haveControl := false. |
3985 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3986 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3987 |
"exit private event-loop" |
6365 | 3988 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3989 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3990 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3991 |
inspecting ifFalse:[ |
5884 | 3992 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
3993 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
3994 |
Debugger newDebugger. |
|
3995 |
Processor activeProcess terminateNoSignal. |
|
3996 |
] |
|
266 | 3997 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3998 |
terminateButton turnOff. |
477 | 3999 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4000 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 4001 |
! |
4002 |
||
4003 |
removeAllBreakpoints |
|
4004 |
"remove all trace & breakpoints - if any" |
|
4005 |
||
1327 | 4006 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
1661 | 4007 |
self withExecuteCursorDo:[ |
4008 |
MessageTracer unwrapAllMethods |
|
4009 |
] |
|
1319 | 4010 |
] |
1327 | 4011 |
|
1661 | 4012 |
"Modified: / 21.5.1998 / 01:44:43 / cg" |
266 | 4013 |
! |
4014 |
||
4015 |
removeBreakpoint |
|
4016 |
"remove breakpoint on the selected contexts method - if any" |
|
4017 |
||
4018 |
|implementorClass method| |
|
4019 |
||
4020 |
selectedContext isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4021 |
^ self showError:'** select a context first **' |
266 | 4022 |
]. |
1327 | 4023 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4024 |
^ self |
1319 | 4025 |
]. |
266 | 4026 |
|
4027 |
implementorClass := selectedContext methodClass. |
|
4028 |
implementorClass notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4029 |
method := implementorClass compiledMethodAt:selectedContext selector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4030 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4031 |
method clearBreakPoint |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4032 |
] |
266 | 4033 |
]. |
4034 |
contextView middleButtonMenu disable:#removeBreakpoint. |
|
3511 | 4035 |
contextView middleButtonMenu enable:#addBreakpoint. |
1327 | 4036 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4037 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
266 | 4038 |
! |
4039 |
||
3447 | 4040 |
showDenseWalkback |
3427 | 4041 |
|m| |
4042 |
||
4043 |
m := contextView middleButtonMenu. |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4044 |
verboseBacktrace := false. |
3694 | 4045 |
m labelAt:#showDenseWalkback put:(resources string:'Show Verbose WalkBack'). |
3447 | 4046 |
m selectorAt:#showDenseWalkback put:#showVerboseWalkback. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4047 |
self redisplayBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4048 |
|
3447 | 4049 |
"Created: / 17.11.2001 / 20:08:08 / cg" |
4050 |
"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
|
4051 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4052 |
|
266 | 4053 |
showMore |
3447 | 4054 |
"double the number of contexts shown" |
266 | 4055 |
|
4056 |
contextArray notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4057 |
nChainShown := nChainShown * 2. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4058 |
self redisplayBacktrace. |
266 | 4059 |
] |
563 | 4060 |
|
3447 | 4061 |
"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
|
4062 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4063 |
|
3447 | 4064 |
showVerboseWalkback |
4065 |
|m| |
|
4066 |
||
4067 |
verboseBacktrace := true. |
|
4068 |
m := contextView middleButtonMenu. |
|
3694 | 4069 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
3447 | 4070 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback. |
4071 |
||
4072 |
self redisplayBacktrace. |
|
4073 |
||
4074 |
"Created: / 17.11.2001 / 20:07:57 / cg" |
|
4075 |
"Modified: / 17.11.2001 / 22:39:41 / cg" |
|
4076 |
! |
|
4077 |
||
4078 |
showingDenseWalkback |
|
4079 |
^ verboseBacktrace == false. |
|
4080 |
||
4081 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
4082 |
! |
|
4083 |
||
4084 |
showingVerboseWalkback |
|
4085 |
^ verboseBacktrace == true. |
|
4086 |
||
4087 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
4088 |
! |
|
4089 |
||
266 | 4090 |
skip |
4091 |
"skip for cursor line in selected method" |
|
4092 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4093 |
stepHow := #skip. |
266 | 4094 |
self doStep:codeView cursorLine. |
790 | 4095 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4096 |
"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
|
4097 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4098 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4099 |
skipForReturn |
2581 | 4100 |
"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
|
4101 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4102 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4103 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4104 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4105 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 4106 |
! |
4107 |
||
4108 |
skipUntilEntering |
|
4109 |
"skip until some particular method is invoked." |
|
4110 |
||
4111 |
|selector| |
|
4112 |
||
4113 |
selector := Dialog |
|
4114 |
request:'Skip until entering what (matchpattern):' |
|
4115 |
initialAnswer:self goodSkipUntilSelector. |
|
4116 |
selector size == 0 ifTrue:[^ self]. |
|
4117 |
||
4118 |
stepUntilEntering := selector asSymbol. |
|
4119 |
stepHow := #send. |
|
4120 |
self doStep:-1. |
|
4121 |
||
4122 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 4123 |
! |
4124 |
||
4125 |
toggleVerboseWalkback |
|
4126 |
verboseBacktrace ifFalse:[ |
|
4127 |
self showVerboseWalkback |
|
4128 |
] ifTrue:[ |
|
4129 |
self showDenseWalkback |
|
4130 |
]. |
|
4131 |
||
4132 |
"Modified: / 17.11.2001 / 20:07:45 / cg" |
|
266 | 4133 |
! ! |
4134 |
||
4135 |
!DebugView methodsFor:'private'! |
|
4136 |
||
6487 | 4137 |
abortAllIsHandled |
4138 |
^ AbortAllOperationRequest isHandled |
|
4139 |
! |
|
4140 |
||
266 | 4141 |
busy |
4142 |
^ busy |
|
4143 |
! |
|
4144 |
||
3511 | 4145 |
canAddBreakpoint |
4146 |
|m| |
|
4147 |
||
4148 |
m := contextView middleButtonMenu. |
|
4149 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
4150 |
! |
|
4151 |
||
3269 | 4152 |
canBrowseClassHierarchy |
4153 |
|m| |
|
4154 |
||
4155 |
m := contextView middleButtonMenu. |
|
4156 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
|
4157 |
! |
|
4158 |
||
4159 |
canBrowseFullClassProtocol |
|
4160 |
|m| |
|
4161 |
||
4162 |
m := contextView middleButtonMenu. |
|
4163 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
|
4164 |
! |
|
4165 |
||
4166 |
canBrowseImplementingClass |
|
4167 |
|m| |
|
4168 |
||
4169 |
m := contextView middleButtonMenu. |
|
4170 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
|
4171 |
! |
|
4172 |
||
4173 |
canBrowseReceiversClass |
|
4174 |
|m| |
|
4175 |
||
4176 |
m := contextView middleButtonMenu. |
|
4177 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
|
4178 |
! |
|
4179 |
||
4180 |
canDefineMethod |
|
4181 |
^ defineButton isVisible |
|
4182 |
! |
|
4183 |
||
4184 |
canRemoveBreakpoint |
|
4185 |
|m| |
|
4186 |
||
4187 |
m := contextView middleButtonMenu. |
|
4188 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
4189 |
! |
|
4190 |
||
3447 | 4191 |
canRestart |
4192 |
^ restartButton isEnabled |
|
4193 |
||
4194 |
"Modified: / 17.11.2001 / 19:59:49 / cg" |
|
4195 |
! |
|
4196 |
||
4197 |
canReturn |
|
4198 |
^ returnButton isEnabled |
|
4199 |
||
4200 |
"Modified: / 17.11.2001 / 19:59:18 / cg" |
|
4201 |
! |
|
4202 |
||
3269 | 4203 |
canShowMore |
4204 |
^ canShowMore |
|
4205 |
! |
|
4206 |
||
7797 | 4207 |
contextListEntryFor:aContext |
4208 |
|s| |
|
4209 |
||
4210 |
aContext selector == #doIt ifTrue:[ |
|
4211 |
aContext receiver isNil ifTrue:[ |
|
4212 |
^ 'doIt' asText allBold |
|
4213 |
] |
|
4214 |
]. |
|
4215 |
||
4216 |
s := Text new writeStream. |
|
4217 |
aContext printOn:s. |
|
4218 |
^ s contents |
|
4219 |
||
4220 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
4221 |
! |
|
4222 |
||
266 | 4223 |
exclusive:aBoolean |
4224 |
exclusive := aBoolean |
|
4225 |
! |
|
4226 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4227 |
explainSelection |
3518 | 4228 |
|interval node definingNode crsrPos nm varIdx| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4229 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4230 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4231 |
interval isEmpty ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4232 |
crsrPos := codeView characterPositionOfCursor. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4233 |
codeView characterUnderCursor isSeparator ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4234 |
crsrPos := (crsrPos - 1) max:1 |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4235 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4236 |
interval := crsrPos to:crsrPos. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4237 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4238 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4239 |
node := self findNodeForInterval:interval. |
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 |
node notNil ifTrue: [ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4242 |
node isVariable ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4243 |
nm := node name. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4244 |
|
3540 | 4245 |
(nm = 'self') ifTrue:[ |
4246 |
self showValue:(actualContext methodHome receiver). |
|
4247 |
^ self |
|
4248 |
]. |
|
4249 |
(#( 'super' 'thisContext') includes:nm) ifTrue:[ |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4250 |
^ self |
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 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4253 |
definingNode := node whoDefines:nm. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4254 |
definingNode notNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4255 |
definingNode isMethod ifTrue:[ |
3518 | 4256 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
4257 |
varIdx ~~ 0 ifTrue:[ |
|
4258 |
self showValue:(actualContext methodHome argAt:varIdx) |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4259 |
] |
3518 | 4260 |
]. |
4261 |
definingNode isBlock ifTrue:[ |
|
4262 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
|
4263 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
4264 |
varIdx ~~ 0 ifTrue:[ |
|
4265 |
] |
|
4266 |
]. |
|
4267 |
]. |
|
4268 |
definingNode parent notNil ifTrue:[ |
|
4269 |
definingNode parent isMethod ifTrue:[ |
|
4270 |
varIdx := definingNode temporaries findFirst:[:arg | arg name = nm]. |
|
4271 |
varIdx ~~ 0 ifTrue:[ |
|
3542 | 4272 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
4273 |
self showValue:(actualContext methodHome varAt:varIdx) |
|
4274 |
] |
|
3518 | 4275 |
]. |
4276 |
]. |
|
4277 |
definingNode parent isBlock ifTrue:[ |
|
4278 |
varIdx := definingNode temporaries findFirst:[:arg | arg name = nm]. |
|
4279 |
varIdx ~~ 0 ifTrue:[ |
|
4280 |
]. |
|
4281 |
] |
|
4282 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4283 |
]. |
3518 | 4284 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4285 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4286 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4287 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4288 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4289 |
findNodeForInterval:interval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4290 |
|tree node source| |
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 |
interval isEmpty ifTrue: [^ nil]. |
6622
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
4293 |
RBParser isNil ifTrue:[^ nil]. |
3517
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 |
source := codeView contents asString string. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4296 |
source := currentMethod source. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4297 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4298 |
Error handle:[:ex | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4299 |
Transcript showCR:ex description. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4300 |
] do:[ |
6647 | 4301 |
Compiler parseErrorSignal catch:[ |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4302 |
tree := RBParser |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4303 |
parseMethod:source |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4304 |
onError: [:str :err ":nodesSoFar" | ]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4305 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4306 |
tree isNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4307 |
Compiler parseErrorSignal handle:[:ex | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4308 |
] do:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4309 |
tree := RBParser |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4310 |
parseDoItMethodBody:source |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4311 |
onError: [:str :err ":nodesSoFar" | ]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4312 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4313 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4314 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4315 |
tree isNil ifTrue:[^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4316 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4317 |
node := tree whichNodeIsContainedBy:interval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4318 |
node isNil ifTrue: [ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4319 |
node := self findNodeIn:tree forInterval:interval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4320 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4321 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4322 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4323 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4324 |
findNodeIn:tree forInterval:interval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4325 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4326 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4327 |
node := nil. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4328 |
tree nodesDo:[:each | |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4329 |
(each intersectsInterval:interval) ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4330 |
(node isNil or:[node == each parent]) ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4331 |
node := each |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4332 |
] ifFalse:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4333 |
(node parent notNil |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4334 |
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
|
4335 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4336 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4337 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4338 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4339 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4340 |
|
2581 | 4341 |
goodSkipUntilSelector |
4342 |
|current| |
|
4343 |
||
4344 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
4345 |
selectedContext isNil ifTrue:[^ nil]. |
|
4346 |
current := selectedContext selector. |
|
4347 |
current isNil ifTrue:[^ nil]. |
|
4348 |
('change:*' match:current) ifTrue:[ |
|
4349 |
^ 'update:*' |
|
4350 |
]. |
|
4351 |
^ nil |
|
4352 |
! |
|
4353 |
||
3447 | 4354 |
hasContextSelected |
4355 |
^ contextView hasSelection |
|
4356 |
||
4357 |
"Created: / 17.11.2001 / 19:57:03 / cg" |
|
4358 |
! |
|
4359 |
||
4360 |
ignoreBreakpoints |
|
4361 |
^ ignoreBreakpoints |
|
4362 |
||
4363 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
4364 |
! |
|
4365 |
||
266 | 4366 |
inspectedProcess |
4367 |
^ inspectedProcess |
|
4368 |
! |
|
4369 |
||
4370 |
interruptProcessWith:aBlock |
|
4371 |
"let inspected process do something, then update the context list" |
|
4372 |
||
4373 |
inspectedProcess isDead ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4374 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4375 |
^ self |
266 | 4376 |
]. |
4377 |
inspectedProcess interruptWith:aBlock. |
|
4378 |
" |
|
4379 |
give the process a chance to run, then update |
|
4380 |
" |
|
4381 |
(Delay forSeconds:0.2) wait. |
|
4382 |
self setContext:(inspectedProcess suspendedContext). |
|
4383 |
! |
|
4384 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4385 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4386 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4387 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
4388 |
|
266 | 4389 |
processPerform:aMessage |
4390 |
"do something, then update the context list" |
|
4391 |
||
4392 |
inspectedProcess isDead ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4393 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4394 |
^ self |
266 | 4395 |
]. |
4396 |
inspectedProcess perform:aMessage. |
|
4397 |
" |
|
4398 |
give the process a chance to run, then update |
|
4399 |
" |
|
4400 |
(Delay forSeconds:0.2) wait. |
|
4401 |
self setContext:(inspectedProcess suspendedContext). |
|
4402 |
! |
|
4403 |
||
939 | 4404 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4405 |
"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
|
4406 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4407 |
|
939 | 4408 |
|oldSelection oldContext con idx| |
4409 |
||
4410 |
contextArray notNil ifTrue:[ |
|
1661 | 4411 |
self withExecuteCursorDo:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4412 |
oldSelection := contextView selection. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4413 |
oldSelection notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4414 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4415 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4416 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4417 |
con := firstContext. |
950 | 4418 |
"/ con := contextArray at:1. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4419 |
"/ 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
|
4420 |
contextArray size > 0 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4421 |
contextArray at:1 put:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4422 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4423 |
self setContext:con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4424 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4425 |
oldContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4426 |
idx := oldSelection |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4427 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4428 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4429 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4430 |
contextView setSelection:idx. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4431 |
idx notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4432 |
self showSelection:idx |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4433 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4434 |
] |
939 | 4435 |
] |
4436 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4437 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 4438 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 4439 |
! |
4440 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4441 |
selectedInterval |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4442 |
^ codeView selectionStartIndex to:(codeView selectionStopIndex - 1) |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4443 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
4444 |
|
266 | 4445 |
setContext:aContext |
4446 |
"show calling chain from aContext in the walk-back listview" |
|
4447 |
||
641 | 4448 |
^ 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
|
4449 |
|
641 | 4450 |
"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
|
4451 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4452 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4453 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4454 |
"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
|
4455 |
Most complications here arise from filtering less-interesting contexts |
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4456 |
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
|
4457 |
|
3702 | 4458 |
|con text method caller caller2 called called2 m count c cc |
3447 | 4459 |
suspendContext calledBySuspendContext nm h calledContext| |
266 | 4460 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4461 |
(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
|
4462 |
"no change" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4463 |
^ false |
266 | 4464 |
]. |
4465 |
||
939 | 4466 |
firstContext := aContext. |
4467 |
||
266 | 4468 |
m := contextView middleButtonMenu. |
4469 |
m notNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4470 |
m disable:#showMore. |
266 | 4471 |
]. |
3269 | 4472 |
canShowMore := false. |
266 | 4473 |
|
4474 |
aContext isNil ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4475 |
text := Array with:'** no context **'. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4476 |
contextArray := nil. |
266 | 4477 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4478 |
text := OrderedCollection new:nChainShown. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4479 |
contextArray := OrderedCollection new:nChainShown. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4480 |
con := aContext. |
3447 | 4481 |
calledContext := nil. |
1399
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 |
verboseBacktrace ~~ true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4484 |
"/ with dense backtrace, hide the ProcessorScheduler |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4485 |
"/ contexts at the top; look for a Process>>suspend* |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4486 |
"/ context within the first 10 contexts |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4487 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4488 |
suspendContext := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4489 |
c := con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4490 |
1 to:10 do:[:i | |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4491 |
|sel| |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4492 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4493 |
c notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4494 |
(sel := c selector) notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4495 |
((sel isSymbol and:[sel startsWith:'suspend']) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4496 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
3447 | 4497 |
suspendContext := c. |
4498 |
calledBySuspendContext := cc. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4499 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4500 |
]. |
3447 | 4501 |
cc := c. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4502 |
c := c sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4503 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4504 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4505 |
suspendContext notNil ifTrue:[ |
3447 | 4506 |
con := suspendContext. |
4507 |
calledContext := calledBySuspendContext. |
|
4508 |
suspendContext := nil |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4509 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4510 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4511 |
|
3427 | 4512 |
verboseBacktrace ~~ true ifTrue:[ |
4513 |
con notNil ifTrue:[ |
|
4514 |
"/ hide the halt implementation |
|
4515 |
(con selector == #halt |
|
4516 |
or:[con selector == #halt:]) ifTrue:[ |
|
4517 |
con method mclass == Object ifTrue:[ |
|
3447 | 4518 |
calledContext := con. |
3427 | 4519 |
con := con sender. |
4520 |
] |
|
4521 |
] |
|
4522 |
] |
|
4523 |
]. |
|
4524 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4525 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4526 |
get them all |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4527 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4528 |
count := 0. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4529 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4530 |
[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4531 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4532 |
'showingContext1: (' print. con print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4533 |
') --> ' print. (self showingContext1:con calling:calledContext) printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4534 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4535 |
|
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4536 |
self showingContext1:con calling:calledContext |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4537 |
] whileFalse:[ |
3447 | 4538 |
calledContext := con. |
4539 |
con := con sender. |
|
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
4540 |
]. |
3447 | 4541 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4542 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4543 |
'showingContext2: (' print. con print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4544 |
') --> ' print. (self showingContext2:con nesting:count) printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4545 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4546 |
|
3447 | 4547 |
(self showingContext2:con nesting:count) ifTrue:[ |
1646 | 4548 |
"/ ignore it, if its in the same |
4549 |
"/ method as the previous context |
|
3447 | 4550 |
"/ (verboseBacktrace ~~ true |
4551 |
"/ and:[count > 0 |
|
4552 |
"/ and:[contextArray last method == con method |
|
4553 |
"/ and:[(contextArray last isBlockContext not |
|
4554 |
"/ & con isBlockContext not) not ]]]) ifTrue:[ |
|
4555 |
"/ "/ skip it, if its in the same method |
|
4556 |
"/ "/ as the called context. |
|
4557 |
"/ ] ifFalse:[ |
|
1646 | 4558 |
contextArray add:con. |
4559 |
||
4560 |
(MoreDebuggingDetail == true) ifTrue:[ |
|
4561 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
|
4562 |
] ifFalse:[ |
|
7797 | 4563 |
Error |
4564 |
handle:[:ex | nm := '???' ] |
|
4565 |
do:[ |
|
4566 |
nm := self contextListEntryFor:con. |
|
4567 |
]. |
|
1646 | 4568 |
]. |
4569 |
text add:nm. |
|
4570 |
count := count + 1. |
|
3447 | 4571 |
"/ ]. |
1399
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 |
|
3447 | 4574 |
"/ |
4575 |
"/ kludge: if its a wrapped method, then hide the wrap-call |
|
4576 |
"/ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4577 |
method := con method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4578 |
(method notNil and:[method isWrapped]) ifTrue:[ |
3447 | 4579 |
called := con. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4580 |
caller := con sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4581 |
(caller notNil and:[caller receiver == method originalMethod]) ifTrue:[ |
3447 | 4582 |
called2 := caller. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4583 |
caller2 := caller sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4584 |
(caller2 notNil and:[caller2 method == method]) ifTrue:[ |
3447 | 4585 |
calledContext := called2. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4586 |
con := caller2 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4587 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4588 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4589 |
caller := caller2 := nil |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4590 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4591 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4592 |
"/ with dense backtrace, skip the doIt methods context |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4593 |
"/ (its dummy anyway) and fake that contexts name |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4594 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4595 |
verboseBacktrace ~~ true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4596 |
(con isBlockContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4597 |
and:[(h := con home) == con sender |
6622
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
4598 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4599 |
and:[h method who isNil]]]) ifTrue:[ |
3447 | 4600 |
calledContext := con. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4601 |
con := con sender. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4602 |
text removeLast. |
7797 | 4603 |
|
4604 |
text add:(self contextListEntryFor:con methodHome). |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4605 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4606 |
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
|
4607 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4608 |
|
3427 | 4609 |
"/ with dense backtrace, dont show below the doIt |
4610 |
( verboseBacktrace ~~ true |
|
6622
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
4611 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
3427 | 4612 |
con := nil. |
4613 |
] ifFalse:[ |
|
3447 | 4614 |
calledContext := con. |
3427 | 4615 |
con := con sender |
4616 |
] |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4617 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4618 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4619 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4620 |
did we reach the end ? |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4621 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4622 |
(con isNil or:[con sender isNil]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4623 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4624 |
"/ the very last one is the startup context |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4625 |
"/ (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
|
4626 |
|
1906
58200b8df8f7
check for empty contextArray
Claus Gittinger <cg@exept.de>
parents:
1871
diff
changeset
|
4627 |
(contextArray notEmpty |
58200b8df8f7
check for empty contextArray
Claus Gittinger <cg@exept.de>
parents:
1871
diff
changeset
|
4628 |
and:[contextArray last selector isNil]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4629 |
contextArray removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4630 |
text removeLast |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4631 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4632 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4633 |
verboseBacktrace ~~ true ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4634 |
"/ in dense mode, remove the process startup |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4635 |
"/ contexts (if any) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4636 |
|
2299 | 4637 |
(contextArray size > 0 |
4638 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4639 |
con selector == #start ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4640 |
contextArray removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4641 |
text removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4642 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4643 |
[contextArray size > 0 |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4644 |
and:[contextArray last methodHome == con]] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4645 |
contextArray removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4646 |
text removeLast. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4647 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4648 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4649 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4650 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4651 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4652 |
m notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4653 |
m enable:#showMore. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4654 |
]. |
3269 | 4655 |
canShowMore := true. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4656 |
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
|
4657 |
]. |
266 | 4658 |
]. |
4659 |
||
4660 |
contextView setList:text. |
|
944 | 4661 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4662 |
releaseInspectors ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4663 |
receiverInspector release. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4664 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4665 |
]. |
266 | 4666 |
|
4667 |
m notNil ifTrue:[ |
|
6275 | 4668 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 4669 |
]. |
3511 | 4670 |
self updateMenuItems. |
266 | 4671 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
4672 |
|
7797 | 4673 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
4674 |
"Modified: / 21-05-2007 / 13:31:02 / cg" |
|
266 | 4675 |
! |
4676 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4677 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4678 |
"show calling chain from aContext in the walk-back listview. |
1213 | 4679 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4680 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4681 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4682 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4683 |
verboseBacktrace ifFalse:[ |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4684 |
con := aContext. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4685 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4686 |
con := con sender. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4687 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4688 |
con := con sender. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4689 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4690 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4691 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4692 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4693 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4694 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
4695 |
"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
|
4696 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4697 |
|
266 | 4698 |
showError:message |
4699 |
codeView contents:(resources string:message). |
|
4700 |
shown ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4701 |
exclusive ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4702 |
"/ consider this a kludge: |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4703 |
"/ if exclusive, cannot use flash, since it suspends |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4704 |
"/ (but we cannot suspend here ...) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4705 |
codeView redrawInverted. device flush. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4706 |
OperatingSystem millisecondDelay:200. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4707 |
codeView redraw |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4708 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4709 |
codeView flash |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4710 |
] |
266 | 4711 |
] |
4712 |
||
3447 | 4713 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
266 | 4714 |
! |
4715 |
||
4716 |
showTerminated |
|
4717 |
self showError:'** the process has terminated **' |
|
4718 |
! |
|
4719 |
||
3518 | 4720 |
showValue:aValue |
3539 | 4721 |
"/ TODO: show value in info field |
4722 |
"/ Transcript showCR:aValue printString |
|
3518 | 4723 |
! |
4724 |
||
3447 | 4725 |
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
|
4726 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 4727 |
|
4728 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
4729 |
aContext isNil ifTrue:[ ^true ]. |
|
4730 |
||
4731 |
sel := aContext selector. |
|
4732 |
rec := aContext receiver. |
|
4733 |
mthd := aContext method. |
|
4734 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
4735 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4736 |
"/ 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
|
4737 |
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
|
4738 |
aContext sender notNil ifTrue:[ |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4739 |
senderRec := aContext sender receiver |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4740 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4741 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4742 |
DebuggingDebugger == true ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4743 |
'showingContext1: (' print. aContext print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4744 |
') calling: (' print. calledContext print. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4745 |
')' printCR. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4746 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4747 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4748 |
(#(doCallHandler: doRaise |
3447 | 4749 |
) includes:sel) |
4750 |
ifTrue:[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4751 |
recIsException ifTrue:[ ^ false]. |
3447 | 4752 |
]. |
4753 |
||
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4754 |
(#(raise raiseRequest |
3447 | 4755 |
) includes:sel) |
4756 |
ifTrue:[ |
|
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4757 |
recIsException ifTrue:[ |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4758 |
(senderRec isLazyValue not |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4759 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
3447 | 4760 |
]. |
4761 |
]. |
|
4762 |
||
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4763 |
(#(doWhile: |
3447 | 4764 |
) includes:sel) |
4765 |
ifTrue:[ |
|
4766 |
rec isBlock ifTrue:[ |
|
4767 |
aContext sender isBlockContext ifTrue:[^ false]. |
|
4768 |
]. |
|
4769 |
]. |
|
4770 |
||
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4771 |
"/ calledContext notNil ifTrue:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4772 |
"/ calledSel := calledContext selector. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4773 |
"/ calledRec := calledContext receiver. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4774 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4775 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4776 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4777 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4778 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4779 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4780 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4781 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4782 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4783 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4784 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4785 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4786 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4787 |
"/ ]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
4788 |
"/ ]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4789 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4790 |
(#(handleDo:) includes:sel) |
3447 | 4791 |
ifTrue:[ |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4792 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
3447 | 4793 |
]. |
4794 |
(#( |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4795 |
withCursor:do: |
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4796 |
withWaitCursorDo: |
3447 | 4797 |
) includes:sel) |
4798 |
ifTrue:[ |
|
4799 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
4800 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
4801 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
4802 |
]. |
|
4803 |
||
4804 |
(#( |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4805 |
wait |
3447 | 4806 |
) includes:sel) |
4807 |
ifTrue:[ |
|
4808 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
4809 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
4810 |
]. |
|
4811 |
||
4812 |
^ true |
|
4813 |
||
4814 |
"Created: / 17.11.2001 / 22:24:06 / cg" |
|
4815 |
"Modified: / 17.11.2001 / 22:41:42 / cg" |
|
4816 |
! |
|
4817 |
||
4818 |
showingContext2:aContext nesting:nesting |
|
939 | 4819 |
"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
|
4820 |
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
|
4821 |
not too interesting; |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4822 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 4823 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4824 |
|sel rec mClass |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4825 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4826 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4827 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 4828 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4829 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4830 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4831 |
sel := aContext selector. |
939 | 4832 |
mClass := aContext methodClass. |
4833 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4834 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4835 |
sender notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4836 |
senderSelector := sender selector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4837 |
senderReceiver := sender receiver. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4838 |
senderReceiverClass := senderReceiver class. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4839 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4840 |
|
939 | 4841 |
sel == #withCursor:do: ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4842 |
(mClass == WindowGroup) ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4843 |
(mClass == TopView) ifTrue:[^ false]. |
939 | 4844 |
]. |
4845 |
(sel == #withExecuteCursorDo: |
|
4846 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4847 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 4848 |
]. |
4849 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
4850 |
(sel == #do: |
6600 | 4851 |
or:[sel == #from:to:do: |
6601 | 4852 |
or:[sel == #keysAndValuesDo: |
4853 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4854 |
mClass == Array ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4855 |
mClass == OrderedCollection ifTrue:[^ false]. |
6601 | 4856 |
mClass == Set ifTrue:[^ false]. |
4857 |
mClass == Dictionary ifTrue:[^ false]. |
|
4858 |
mClass == Interval ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4859 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4860 |
(sel == #perform: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4861 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4862 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4863 |
or:[sel == #perform:with:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4864 |
or:[sel == #perform:with:with:with:with:]]]]) |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4865 |
ifTrue:[ |
1499
6ed7024b9929
show a perform: context, if its the top-one.
Claus Gittinger <cg@exept.de>
parents:
1486
diff
changeset
|
4866 |
nesting == 0 ifTrue:[^ true]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4867 |
mClass == Array ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4868 |
mClass == OrderedCollection ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4869 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4870 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4871 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4872 |
|
939 | 4873 |
(mClass == Object) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4874 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 4875 |
]. |
4876 |
||
4877 |
(mClass == Method) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4878 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 4879 |
]. |
4880 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
4881 |
(mClass == SmallInteger) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4882 |
(sel == #to:do:) ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4883 |
(sel == #to:by:do:) ifTrue:[^ false]. |
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
4884 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
4885 |
|
939 | 4886 |
(mClass == Block) ifTrue:[ |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4887 |
sel == #ensure: ifTrue:[^ false]. |
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4888 |
sel == #ifCurtailed: ifTrue:[^ false]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4889 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4890 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4891 |
sel == #on:do: ifTrue:[^ false]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4892 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4893 |
sel == #value ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4894 |
sel == #value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4895 |
sel == #value:value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4896 |
sel == #value:value:value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4897 |
sel == #value:value:value:value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4898 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4899 |
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
|
4900 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4901 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4902 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4903 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4904 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4905 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4906 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4907 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4908 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4909 |
"/ 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
|
4910 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4911 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4912 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4913 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4914 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4915 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4916 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4917 |
aContext home notNil ifTrue:[ |
5271
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4918 |
aContext home receiver isLazyValue ifFalse:[ |
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4919 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4920 |
(aContext home selector == #wait) ifTrue:[^ false] |
d7800a8994b7
avoid triggering lazy values
Claus Gittinger <cg@exept.de>
parents:
5269
diff
changeset
|
4921 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4922 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4923 |
] |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4924 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4925 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4926 |
(rec isExceptionHandler) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4927 |
sel == #handle:do: ifTrue:[^ false]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4928 |
sel == #handleDo: ifTrue:[^ false]. |
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
4929 |
(sel startsWith:#raise) ifTrue:[^ false]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4930 |
sel == #answer:do: ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
4931 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
4932 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4933 |
sel == #doRaise ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4934 |
sel == #doCallHandler: ifTrue:[^ false]. |
2312 | 4935 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4936 |
senderReceiverClass == Signal ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4937 |
] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4938 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4939 |
(mClass == Context) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4940 |
sel == #unwind ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4941 |
sel == #unwind: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4942 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4943 |
(mClass == ProcessorScheduler) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4944 |
sel == #interruptActive ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4945 |
sel == #threadSwitch: ifTrue:[^ false]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4946 |
sel == #suspend: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4947 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4948 |
mClass == Process ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4949 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4950 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4951 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4952 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
4953 |
"Modified: / 15.1.1998 / 19:47:36 / cg" |
3447 | 4954 |
"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
|
4955 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4956 |
|
266 | 4957 |
stepping |
4958 |
^ stepping |
|
4959 |
! |
|
4960 |
||
4961 |
unstep |
|
4962 |
stepping := false. |
|
4963 |
bigStep := false. |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4964 |
steppedContext := wrapperContext := nil. |
266 | 4965 |
exitAction := nil |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
4966 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4967 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
266 | 4968 |
! |
4969 |
||
4970 |
updateContext |
|
4971 |
|oldContext idx| |
|
4972 |
||
4973 |
inspectedProcess state == #dead ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4974 |
self showTerminated. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4975 |
^ self |
266 | 4976 |
]. |
4977 |
||
4978 |
oldContext := selectedContext. |
|
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
4979 |
[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4980 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4981 |
oldContext notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4982 |
contextArray notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4983 |
idx := contextArray identityIndexOf:oldContext. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4984 |
idx ~~ 0 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4985 |
self showSelection:idx |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4986 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4987 |
codeView contents:('** context returned **') |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4988 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4989 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4990 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4991 |
]. |
642
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
4992 |
] valueUninterruptably. |
77e7e39f503a
update context uninterruptably
Claus Gittinger <cg@exept.de>
parents:
641
diff
changeset
|
4993 |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4994 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
266 | 4995 |
! ! |
4996 |
||
5455 | 4997 |
!DebugView methodsFor:'private queries'! |
4998 |
||
4999 |
isAborting |
|
5000 |
^ exitAction == #abort |
|
6622
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5001 |
! |
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5002 |
|
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5003 |
setOfHiddenCallingSelectors |
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5004 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5005 |
! |
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5006 |
|
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5007 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
cf89940b5d30
configurable set of hidden selectors
Claus Gittinger <cg@exept.de>
parents:
6616
diff
changeset
|
5008 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
5455 | 5009 |
! ! |
5010 |
||
4859 | 5011 |
!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
|
5012 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5013 |
cacheMyself |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5014 |
"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
|
5015 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5016 |
"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
|
5017 |
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
|
5018 |
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
|
5019 |
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
|
5020 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5021 |
windowGroup notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5022 |
windowGroup setProcess:nil. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5023 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5024 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5025 |
self releaseDebuggee. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5026 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5027 |
cachable ~~ true ifTrue:[^ self]. |
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5028 |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5029 |
"/ |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5030 |
"/ 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
|
5031 |
"/ |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5032 |
device == Display ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5033 |
exclusive ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5034 |
CachedExclusive := self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5035 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5036 |
CachedDebugger := self |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5037 |
]. |
4892 | 5038 |
]. |
5039 |
||
5040 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
5041 |
ObjectMemory stepInterruptHandler:nil |
|
5042 |
]. |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5043 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5044 |
"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
|
5045 |
"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
|
5046 |
! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5047 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5048 |
isCached |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5049 |
"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
|
5050 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5051 |
CachedExclusive == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5052 |
^ true. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5053 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5054 |
CachedDebugger == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5055 |
^ true. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5056 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5057 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5058 |
^ false. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5059 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5060 |
"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
|
5061 |
! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5062 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5063 |
releaseDebuggee |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5064 |
"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
|
5065 |
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
|
5066 |
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
|
5067 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5068 |
busy := false. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5069 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5070 |
codeView acceptAction:nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5071 |
codeView doItAction:nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5072 |
codeView contents:nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5073 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5074 |
receiverInspector release. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5075 |
contextInspector release. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5076 |
inspectedProcess := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5077 |
contextArray := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5078 |
selectedContext := actualContext := firstContext := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5079 |
steppedContext := wrapperContext := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5080 |
catchBlock := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5081 |
grabber := nil. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5082 |
self autoUpdateOff. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5083 |
|
3447 | 5084 |
"Created: / 10.7.1997 / 14:57:51 / stefan" |
5085 |
"Modified: / 10.7.1997 / 15:50:38 / stefan" |
|
5086 |
"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
|
5087 |
! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5088 |
|
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5089 |
uncacheMyself |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5090 |
"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
|
5091 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5092 |
cachable := false. |
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5093 |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5094 |
CachedExclusive == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5095 |
CachedExclusive := nil. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5096 |
]. |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5097 |
CachedDebugger == self ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5098 |
CachedDebugger := nil. |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5099 |
]. |
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5100 |
OpenDebuggers notNil ifTrue:[ |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
5101 |
OpenDebuggers remove:self ifAbsent:[]. |
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5102 |
]. |
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5103 |
|
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
5104 |
"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
|
5105 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
5106 |
|
4859 | 5107 |
!DebugView methodsFor:'private-control loop'! |
266 | 5108 |
|
5109 |
controlLoop |
|
5110 |
"this is a kludge: |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5111 |
start a dispatchloop which exits when |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5112 |
either continue, return or step is pressed |
266 | 5113 |
" |
5114 |
||
5115 |
haveControl := true. |
|
664 | 5116 |
[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5117 |
[haveControl] whileTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5118 |
self controlLoopCatchingErrors |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5119 |
]. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
5120 |
] ensure:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5121 |
catchBlock := nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5122 |
haveControl := false |
266 | 5123 |
]. |
664 | 5124 |
|
5125 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 5126 |
! |
5127 |
||
5128 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
5129 |
"this is the debuggers own private event handling loop; |
1187 | 5130 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
5131 |
|
266 | 5132 |
"setup a self removing catch-block" |
5133 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
5134 |
||
5135 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5136 |
"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
|
5137 |
we start another dispatch loop, which exits when |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5138 |
either continue, return or step is pressed |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5139 |
or (via the catchBlock) if an error occurs. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5140 |
Since our display is an extra exclusive one, |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5141 |
all processing for normal views stops here ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5142 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5143 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5144 |
WindowGroup setActiveGroup:windowGroup. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5145 |
SignalSet anySignal handle:[:ex | |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5146 |
|signal| |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5147 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5148 |
signal := ex signal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5149 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5150 |
self showError:'*** Error in modal debugger: |
266 | 5151 |
|
334 | 5152 |
>>>> Signal: ' , signal printString , ' |
266 | 5153 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 5154 |
>>>> From: ' , ex suspendedContext sender printString , ' |
5155 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
5156 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
5157 |
>>>> : ' , 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
|
5158 |
>>>> : ' , 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
|
5159 |
>>>> : ' , 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
|
5160 |
>>>> : ' , 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
|
5161 |
>>>> : ' , 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
|
5162 |
>>>> : ' , 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
|
5163 |
>>>> : ' , 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
|
5164 |
>>>> : ' , 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
|
5165 |
>>>> : ' , 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
|
5166 |
>>>> : ' , 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
|
5167 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 5168 |
>>>> Message: ' , ex description , ' |
266 | 5169 |
|
1187 | 5170 |
caught & ignored.'. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5171 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5172 |
] do:[ |
4816 | 5173 |
UserNotification handle:[:ex | |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5174 |
(ex signal == ActivityNotificationSignal) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5175 |
ex proceed |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5176 |
]. |
6361
d1145c85e0fb
oops - must proceed after catching a UserNotification
Claus Gittinger <cg@exept.de>
parents:
6275
diff
changeset
|
5177 |
self showError:ex description. |
d1145c85e0fb
oops - must proceed after catching a UserNotification
Claus Gittinger <cg@exept.de>
parents:
6275
diff
changeset
|
5178 |
ex proceed. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5179 |
] do:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5180 |
device dispatchModalWhile:[Processor activeProcess state:#debug. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5181 |
haveControl]. |
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 |
WindowGroup setActiveGroup:nil. |
266 | 5185 |
] ifFalse:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5186 |
"we do have multiple processes - |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5187 |
simply enter the DebugViews-Windowgroup event loop. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5188 |
effectively suspending event processing for the currently |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5189 |
active group. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5190 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5191 |
SignalSet anySignal handle:[:ex | |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5192 |
|answer signal eMsg| |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5193 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5194 |
signal := ex signal. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5195 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5196 |
DebuggingDebugger ~~ true ifTrue:[ |
6172 | 5197 |
(signal == ActivityNotification) ifTrue:[ |
5198 |
ex proceed |
|
5199 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5200 |
"/ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5201 |
"/ ignore recursive breakpoints |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5202 |
"/ |
3431 | 5203 |
(signal isControlInterrupt) ifTrue:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5204 |
ignoreBreakpoints == true ifTrue:[ |
3447 | 5205 |
'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
|
5206 |
ex proceed |
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5207 |
]. |
1762
cd2bec8238fa
ignare halts while handling my own events.
Claus Gittinger <cg@exept.de>
parents:
1753
diff
changeset
|
5208 |
]. |
3447 | 5209 |
(signal == TerminateProcessRequest) ifTrue:[ |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5210 |
"/ mhm - someone wants to shoot me down while debugging ... |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5211 |
answer := Dialog |
3447 | 5212 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
5213 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5214 |
values:#( #proceed #close ) |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5215 |
default:#close. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5216 |
answer == #close ifTrue:[ |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5217 |
self destroy. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5218 |
ex reject |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5219 |
]. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5220 |
ex return. |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5221 |
]. |
3447 | 5222 |
signal == RecursiveExceptionError ifTrue:[ |
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
5223 |
(ex parameter signal == BreakPointInterrupt) |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5224 |
ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5225 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5226 |
ex proceed. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5227 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5228 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5229 |
self showError:'*** Recursive error in debugger: |
266 | 5230 |
|
5231 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 5232 |
>>>> ' , ex parameter signal printString , ' |
266 | 5233 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 5234 |
>>>> From: ' , ex suspendedContext sender printString , ' |
5235 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
5236 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
5237 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 5238 |
>>>> Message: ' , ex description , ' |
266 | 5239 |
|
1187 | 5240 |
caught & ignored.'. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5241 |
ex return |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5242 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5243 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5244 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5245 |
self topView raiseDeiconified. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5246 |
|
4816 | 5247 |
eMsg := ex description. |
3431 | 5248 |
(ex signal isControlInterrupt) ifTrue:[ |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5249 |
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
|
5250 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
5251 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5252 |
answer := Dialog |
3447 | 5253 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
5254 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5255 |
values:#( #proceed #cancel #debug ) |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5256 |
default:#cancel. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5257 |
answer == #debug ifTrue:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5258 |
'DebugView [info]: cought exception - debugging' infoPrintCR. |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5259 |
Debugger |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5260 |
enterUnconditional:(ex suspendedContext) |
3447 | 5261 |
withMessage:'Error in debugger: ' , eMsg |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5262 |
mayProceed:true. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5263 |
ex proceed. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5264 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5265 |
answer == #proceed ifTrue:[ |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5266 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5267 |
ex proceed. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5268 |
]. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
5269 |
'DebugView [info]: cought exception - returning' infoPrintCR. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5270 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5271 |
] do:[ |
2358 | 5272 |
"/ make certain that sub-debuggers, inspectors etc. |
5273 |
"/ come up on my device. |
|
5274 |
Screen currentScreenQuerySignal answer:device |
|
5275 |
do:[ |
|
3447 | 5276 |
windowGroup |
5277 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
5278 |
true] |
|
5279 |
onLeave:[] |
|
2358 | 5280 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5281 |
]. |
266 | 5282 |
]. |
5283 |
catchBlock := nil. |
|
5284 |
||
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
5285 |
"Created: / 24.11.1995 / 20:33:45 / cg" |
3447 | 5286 |
"Modified: / 18.11.2001 / 01:04:17 / cg" |
266 | 5287 |
! ! |
5288 |
||
0 | 5289 |
!DebugView methodsFor:'user interaction'! |
5290 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5291 |
checkIfCodeIsReallyModified |
6616 | 5292 |
|source| |
5293 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5294 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5295 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5296 |
currentMethod isNil ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5297 |
^ false |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5298 |
]. |
6616 | 5299 |
source := currentMethod source. |
5300 |
source notNil ifTrue:[ |
|
5301 |
source string = codeView contents string ifTrue:[ |
|
5302 |
^ false |
|
5303 |
]. |
|
5304 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
5305 |
^ false |
|
5306 |
]. |
|
5307 |
]. |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5308 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5309 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5310 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5311 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5312 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5313 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5314 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
5315 |
checkSelectionChangeAllowed:newSelection |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5316 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5317 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5318 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5319 |
and:[newSelection = contextView selection]) ifTrue:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5320 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5321 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5322 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5323 |
(self confirm:('Code modified - change selection anyway ?')) ifFalse:[ |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5324 |
^ false |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5325 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5326 |
codeView modified:false. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5327 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5328 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5329 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5330 |
|
266 | 5331 |
codeAccept:someCode |
5332 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
5333 |
and including selected method cannot be continued." |
|
5334 |
||
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
5335 |
^ self codeAccept:someCode unwind:false "true" category:nil onCancel:nil |
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
5336 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
5337 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 5338 |
! |
5339 |
||
3447 | 5340 |
codeAccept:someCode unwind:doUnwind category:givenCategoryOrNil onCancel:cancelAction |
3427 | 5341 |
"user wants some code to be recompiled - must unwind stack since everything above |
5342 |
and including selected method cannot be continued." |
|
5343 |
||
5344 |
" |
|
5345 |
actually, this is not true, since the active methods will still be |
|
5346 |
executed correctly - however, the code shown in the debugger is no |
|
5347 |
longer in sync (showing the new code) with the executed code. |
|
5348 |
Therefore, we hide those contexts to avoid confusion .... |
|
5349 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
5350 |
||
5351 |
"walk up context chain and find highest context which is either the selected context, |
|
5352 |
or - if its a block-context - whose home is the selected context" |
|
5353 |
||
5354 |
|con top sel implementorClass method newMethod category| |
|
5355 |
||
5356 |
codeView withWaitCursorDo:[ |
|
5357 |
" |
|
5358 |
find the method-home context for this one |
|
5359 |
" |
|
5360 |
con := selectedContext. |
|
5361 |
top := con. |
|
5362 |
[con notNil] whileTrue:[ |
|
5363 |
(con methodHome == selectedContext) ifTrue:[ |
|
5364 |
top := con |
|
5365 |
]. |
|
5366 |
con := con sender |
|
5367 |
]. |
|
3447 | 5368 |
|
3427 | 5369 |
" |
5370 |
use class&selector to find the method for the compilation |
|
5371 |
and compile. |
|
5372 |
" |
|
3447 | 5373 |
category := givenCategoryOrNil. |
3427 | 5374 |
sel := selectedContext selector. |
5375 |
implementorClass := selectedContext methodClass. |
|
5376 |
implementorClass notNil ifTrue:[ |
|
3447 | 5377 |
category isNil ifTrue:[ |
5378 |
method := implementorClass compiledMethodAt:sel. |
|
5379 |
category := method category |
|
5380 |
] |
|
3427 | 5381 |
] ifFalse:[ |
5382 |
implementorClass := selectedContext receiver class. |
|
5383 |
implementorClass ~~ Object ifTrue:[ |
|
5384 |
implementorClass := Dialog |
|
3447 | 5385 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
3427 | 5386 |
initialAnswer:implementorClass name |
5387 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
5388 |
implementorClass size == 0 ifTrue:[ |
|
5389 |
^ cancelAction value "/ cancelled |
|
5390 |
]. |
|
3928 | 5391 |
implementorClass := Smalltalk classNamed:implementorClass. |
3427 | 5392 |
implementorClass isNil ifTrue:[ |
3447 | 5393 |
Dialog warn:'No such class'. |
3427 | 5394 |
^ cancelAction value "/ cancelled |
5395 |
]. |
|
5396 |
]. |
|
5397 |
]. |
|
5398 |
||
5399 |
"/ |
|
5400 |
"/ provide the classes nameSpace on a query; |
|
5401 |
"/ in case we accept while in another nameSpace context, |
|
5402 |
"/ (but for a class which is somewhere else) |
|
5403 |
"/ |
|
6818
8f6c68046792
no history update unless done by user
Claus Gittinger <cg@exept.de>
parents:
6815
diff
changeset
|
5404 |
(Class updateChangeFileQuerySignal, |
8f6c68046792
no history update unless done by user
Claus Gittinger <cg@exept.de>
parents:
6815
diff
changeset
|
5405 |
Class updateChangeListQuerySignal, |
8f6c68046792
no history update unless done by user
Claus Gittinger <cg@exept.de>
parents:
6815
diff
changeset
|
5406 |
Class updateHistoryLineQuerySignal) answer:true |
3427 | 5407 |
do:[ |
6171
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5408 |
Class nameSpaceQuerySignal |
5ea312ba7d88
Use SignalSets instead of nested handlers.
Stefan Vogel <sv@exept.de>
parents:
6136
diff
changeset
|
5409 |
answer:(implementorClass nameSpace) |
3427 | 5410 |
do:[ |
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5411 |
Class packageQuerySignal |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5412 |
answer:(implementorClass package ? Project noProjectID) |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5413 |
do:[ |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5414 |
codeView contents:someCode. |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5415 |
newMethod := implementorClass compilerClass |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5416 |
compile:someCode |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5417 |
forClass:implementorClass |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5418 |
inCategory:category |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5419 |
notifying:codeView. |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5420 |
]. |
3427 | 5421 |
]. |
5422 |
]. |
|
5423 |
||
5424 |
inspecting ifFalse:[ |
|
5425 |
" |
|
5426 |
if it worked, remove everything up to and including top |
|
5427 |
from context chain |
|
5428 |
" |
|
5429 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
5430 |
codeView modified:false. |
|
5431 |
||
5432 |
doUnwind ifTrue:[ |
|
3447 | 5433 |
selectedContext canReturn ifTrue:[ |
5434 |
self setContext:(top "sender"). |
|
5435 |
exitAction := #restart. |
|
5436 |
selectedContext setLineNumber:1. |
|
5437 |
self doRestart. |
|
5438 |
] ifFalse:[ |
|
5439 |
self setContext:(top sender). |
|
5440 |
exitAction := #return. |
|
5441 |
]. |
|
3427 | 5442 |
|
5443 |
" |
|
5444 |
continue/step is no longer possible |
|
5445 |
" |
|
4120 | 5446 |
"/ continueButton disable. |
5447 |
"/ canContinue := false. |
|
3427 | 5448 |
]. |
3447 | 5449 |
|
5450 |
contextView selection:1. |
|
5451 |
"/ self showSelection:1. |
|
5452 |
"/ contextView makeSelectionVisible. "/ scrollToLine:(selection - 1) |
|
3427 | 5453 |
] ifFalse:[ |
5454 |
^ cancelAction value |
|
5455 |
] |
|
5456 |
]. |
|
5457 |
]. |
|
5458 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5459 |
"Created: / 17-11-2001 / 21:50:55 / cg" |
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
5460 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
3427 | 5461 |
! |
5462 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5463 |
confirm:aString |
6971 | 5464 |
"open a modal yes-no dialog. |
5465 |
Redefined here, to answer true, if exclusice Debugger, which cannot handle popup boxes" |
|
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5466 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5467 |
(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
|
5468 |
^ true |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5469 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5470 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5471 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
5472 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
5473 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
5474 |
"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
|
5475 |
Also sent to autoselect an interesting context on entry." |
0 | 5476 |
|
3447 | 5477 |
BreakPointInterrupt handle:[:ex | |
6215 | 5478 |
ignoreBreakpoints ifFalse:[ex reject]. |
3447 | 5479 |
'DebugView [info]: breakpoint in debugger ignored [doShowSelection.]' infoPrintCR. |
5480 |
ex proceed |
|
5481 |
] do:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5482 |
self updateForContext:lineNr |
3269 | 5483 |
]. |
5484 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
5485 |
|
3447 | 5486 |
"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
|
5487 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5488 |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5489 |
hideStackInspector |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5490 |
stackInspector notNil ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5491 |
stackInspector destroy. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5492 |
stackInspector := nil. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5493 |
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
|
5494 |
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
|
5495 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5496 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5497 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5498 |
processEvent:anEvent |
6129 | 5499 |
"filter keyboard events for popUp variable value display. |
5500 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5501 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5502 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5503 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5504 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5505 |
evView notNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5506 |
focusView := evView windowGroup focusView. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5507 |
focusView isNil ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5508 |
focusView := evView. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5509 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5510 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5511 |
anEvent isKeyPressEvent ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5512 |
key := anEvent key. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5513 |
rawKey := anEvent rawKey. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5514 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5515 |
inCodeView := (focusView == codeView |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5516 |
or:[focusView isComponentOf:codeView]). |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5517 |
inCodeView ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5518 |
key == #CodeCompletion ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5519 |
"/ complete the word before/under the cursor. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5520 |
"/ self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5521 |
"/ enqueueMessage:#codeCompletion |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5522 |
"/ for:self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5523 |
"/ arguments:#(). |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5524 |
^ true |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5525 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5526 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5527 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5528 |
|
3602 | 5529 |
false ifTrue:[ |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5530 |
anEvent isButtonReleaseEvent ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5531 |
anEvent view == codeView ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5532 |
(RBParser notNil and:[RBParser isLoaded]) |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5533 |
ifTrue:[ |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5534 |
self sensor |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5535 |
pushEvent:anEvent. "/ must be first in queue |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5536 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5537 |
self sensor |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5538 |
pushUserEvent:#explainSelection |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5539 |
for:self |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5540 |
withArguments:nil. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5541 |
^ true "/ eaten |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5542 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5543 |
] |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5544 |
]. |
3602 | 5545 |
]. |
5546 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5547 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5548 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5549 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5550 |
|
1327 | 5551 |
showSelection:lineNr |
5552 |
"user clicked on a header line - show selected code in textView. |
|
5553 |
Also sent to autoselect an interesting context on entry." |
|
5554 |
||
5842 | 5555 |
Notification |
5556 |
handle: |
|
5557 |
[:ex | |
|
5879 | 5558 |
"/ ex suspendedContext fullPrintAll. |
5559 |
Transcript showCR:ex description. |
|
5560 |
"/ Transcript showCR:ex parameter. |
|
5842 | 5561 |
ex proceed |
5562 |
] |
|
5563 |
do: |
|
5564 |
[ |
|
5565 |
Error |
|
5566 |
handle: |
|
5567 |
[:ex | |
|
5568 |
|s con| |
|
5569 |
||
5570 |
ex signal isControlInterrupt |
|
5571 |
ifTrue: |
|
5572 |
[ |
|
5573 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' infoPrintCR. |
|
5574 |
ex proceed |
|
5575 |
]. |
|
5576 |
||
5577 |
'DebugView [info]: error when showing selection in debugger ignored' infoPrintCR. |
|
5578 |
||
5579 |
s := '' writeStream. |
|
5580 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
5581 |
s nextPutLine:'****'. |
|
6815 | 5582 |
s nextPutAll: '**** '; nextPutLine:(ex description "withCRs"). |
5842 | 5583 |
s nextPutLine:'****'. |
5584 |
con := ex suspendedContext. |
|
5585 |
s nextPutAll: '**** '; nextPutLine:(con printString). |
|
5586 |
con := con sender. |
|
5587 |
||
5588 |
con fullPrintAllOn:s. |
|
5589 |
||
5590 |
"/ [con notNil] whileTrue:[ |
|
5591 |
"/ Error catch:[:ex | |
|
5592 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
5593 |
"/ ]. |
|
4947 | 5594 |
"/ |
5842 | 5595 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
5596 |
"/ con := nil |
|
5597 |
"/ ] ifFalse:[ |
|
5598 |
"/ con := con sender. |
|
5599 |
"/ ] |
|
5600 |
"/ ]. |
|
5601 |
codeView contents:(s contents). |
|
5602 |
ex return. |
|
5603 |
] |
|
5604 |
do: |
|
5605 |
[ |
|
5606 |
self doShowSelection:lineNr |
|
5607 |
] |
|
5608 |
] |
|
1327 | 5609 |
|
6815 | 5610 |
"Modified: / 04-07-2006 / 14:50:06 / cg" |
1327 | 5611 |
! |
5612 |
||
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5613 |
showStackInspectorFor:con |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5614 |
stackInspector isNil ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5615 |
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
|
5616 |
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
|
5617 |
stackInspector := InspectorView |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5618 |
origin:(0.6 @ 0.0) |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5619 |
corner:(1.0 @ 1.0) |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5620 |
in:contextInspector superView. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5621 |
stackInspector realize. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5622 |
stackInspector fieldListLabel:'Stack'. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5623 |
stackInspector hideReceiver:true |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5624 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5625 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5626 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5627 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5628 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5629 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5630 |
"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
|
5631 |
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
|
5632 |
|
56 | 5633 |
|con homeContext sel method code canAccept |
105 | 5634 |
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
|
5635 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 5636 |
codeSet highlighter evaluatorClass |
3187 | 5637 |
canDefine| |
5638 |
||
5639 |
canDefine := false. |
|
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
5640 |
currentMethod := nil. |
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
5641 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
5642 |
contextArray notNil ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5643 |
lineNr <= contextArray size ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5644 |
con := contextArray at:lineNr. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5645 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5646 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5647 |
clicking on the '** ...'-line shows more ... |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5648 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5649 |
con isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5650 |
line := contextView list at:lineNr. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5651 |
(line startsWith:'**') ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5652 |
self showMore. |
1408
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
5653 |
lineNr >= contextArray size ifTrue:[ |
e96cd72d100a
oops - care for non-existing line after showMore
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
5654 |
contextView setSelection:lineNr. |
2299 | 5655 |
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
|
5656 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5657 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5658 |
con isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5659 |
codeView contents:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5660 |
^ self |
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 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5664 |
selectedContext := con. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5665 |
m := contextView middleButtonMenu. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5666 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
5667 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
1399
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 |
|
1661 | 5670 |
self withExecuteCursorDo:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5671 |
codeSet := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5672 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5673 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5674 |
give it to the (lower right) inspector |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5675 |
" |
6247 | 5676 |
Error handle:[:ex | |
5677 |
'DebugView [warning]: error while accessing context' errorPrintCR. |
|
5678 |
contextInspector inspect:nil. |
|
5679 |
ex reject. |
|
5680 |
] do:[ |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5681 |
contextInspector inspect:con. |
3427 | 5682 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
6247 | 5683 |
]. |
1386
55632b45ced2
more skipping in dense backtrace
Claus Gittinger <cg@exept.de>
parents:
1372
diff
changeset
|
5684 |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5685 |
"/ show a stack inspector sometimes |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5686 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5687 |
con hasStackToShow ifTrue:[ |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5688 |
self showStackInspectorFor:con |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5689 |
] ifFalse:[ |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5690 |
self hideStackInspector |
1399
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 |
|
7328 | 5693 |
homeContext := con methodHome. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5694 |
con canReturn ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5695 |
returnButton enable. restartButton enable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5696 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5697 |
returnButton disable. restartButton disable. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5698 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5699 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5700 |
lineNrInMethod := con lineNumber. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5701 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5702 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5703 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5704 |
homeContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5705 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5706 |
mhmh - an optimized block |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5707 |
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
|
5708 |
that one ... |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5709 |
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
|
5710 |
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
|
5711 |
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
|
5712 |
(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
|
5713 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5714 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5715 |
"temporary kludge - peek into the sender context. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5716 |
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
|
5717 |
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
|
5718 |
This helps in some cases. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5719 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5720 |
(sender := con sender) notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5721 |
tryVars := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5722 |
(selSender := sender selector) notNil ifTrue:[ |
3121
4cb4b3a3c1e2
allow accepting after a doesnot understand
Claus Gittinger <cg@exept.de>
parents:
3097
diff
changeset
|
5723 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5724 |
tryVars := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5725 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5726 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5727 |
tryVars ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5728 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5729 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5730 |
possibleBlocks size == 1 ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5731 |
method := possibleBlocks first method. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5732 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5733 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5734 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5735 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5736 |
"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
|
5737 |
rec := homeContext receiver. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5738 |
sel := homeContext selector. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5739 |
sel notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5740 |
canAccept := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5741 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5742 |
implementorClass := homeContext methodClass. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5743 |
implementorClass isNil ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
5744 |
Error handle:[:ex | |
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
5745 |
ex signal == BreakPointInterrupt ifTrue:[ |
2397 | 5746 |
ex proceed. |
5747 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5748 |
code := 'error while asking method for its source'. |
2258 | 5749 |
code := code , Character cr , ex signal printString. |
5750 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
5751 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5752 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5753 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5754 |
] do:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5755 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5756 |
special: look if this context was created by |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5757 |
valueWithReceiver kind of method invocation; |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5758 |
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
|
5759 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5760 |
((sender := homeContext sender) notNil |
4947 | 5761 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5762 |
and:[sender receiver isMethod]]) ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5763 |
method := sender receiver. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5764 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5765 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5766 |
(method := con method) notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5767 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5768 |
] |
5664 | 5769 |
]. |
1399
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 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5772 |
method := implementorClass compiledMethodAt:sel. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5773 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5774 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5775 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5776 |
code isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5777 |
errMsg := nil. |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5778 |
method isNil ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5779 |
"/ fall back heuristics |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5780 |
con isBlockContext ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5781 |
((sender := con sender) notNil |
4947 | 5782 |
and:[((sender selector ? '') startsWith:'value') |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5783 |
and:[sender receiver isBlock]]) ifTrue:[ |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5784 |
code := sender receiver source. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5785 |
] |
5170
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5786 |
] ifFalse:[ |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5787 |
((sender := con sender) notNil |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5788 |
and:[((sender selector ? '') startsWith:'valueWith') |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5789 |
and:[sender receiver isMethod]]) ifTrue:[ |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5790 |
method := sender receiver. |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5791 |
] |
ff0a0819503d
showing the source of a called method
Claus Gittinger <cg@exept.de>
parents:
5117
diff
changeset
|
5792 |
] |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
5793 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5794 |
method notNil ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
5795 |
Error handle:[:ex | |
3431 | 5796 |
ex signal isControlInterrupt ifTrue:[ |
2397 | 5797 |
ex proceed. |
5798 |
]. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5799 |
code := 'error while asking method for its source'. |
2258 | 5800 |
code := code , Character cr , ex signal printString. |
5801 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
5802 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5803 |
canAccept := false. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5804 |
ex return. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5805 |
] do:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5806 |
self sensor shiftDown ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5807 |
code := method decompiledSource |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5808 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5809 |
code := method source. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5810 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5811 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5812 |
code isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5813 |
method sourceFilename notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5814 |
codeView contents:(resources |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5815 |
string:'** no sourcefile: %1 **' |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5816 |
with:method sourceFilename). |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5817 |
codeView flash. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5818 |
codeSet := true. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5819 |
] ifFalse:[ |
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5820 |
[ |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5821 |
|src| |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5822 |
|
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5823 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5824 |
codeView contents:src. |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5825 |
codeSet := true. |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5826 |
] on: Error do:[ |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5827 |
errMsg := '** no source **' |
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5828 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5829 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5830 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5831 |
] ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5832 |
homeContext isNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5833 |
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
|
5834 |
] ifFalse:[ |
3187 | 5835 |
errMsg := '** no method - no source **'. |
5836 |
canDefine := true. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5837 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5838 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5839 |
errMsg notNil ifTrue:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5840 |
self showError:errMsg. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5841 |
codeSet := true. |
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 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5845 |
code isNil ifTrue:[ |
3121
4cb4b3a3c1e2
allow accepting after a doesnot understand
Claus Gittinger <cg@exept.de>
parents:
3097
diff
changeset
|
5846 |
"/ canAccept := false. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5847 |
codeSet ifFalse:[ |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5848 |
codeView contents:nil. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5849 |
] |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5850 |
] ifFalse:[ |
2177 | 5851 |
lineNrInMethod == 0 ifTrue:[ |
5852 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
5853 |
lineNrInMethod := method lineNumber |
|
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5854 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5855 |
"/ guess lineNumber from sent-messages selector |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5856 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5857 |
lineNrInMethod == 0 ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5858 |
|conIdx sentContext messages| |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5859 |
|
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5860 |
conIdx := contextArray identityIndexOf:con. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5861 |
conIdx > 1 ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5862 |
sentContext := contextArray at:conIdx-1. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5863 |
sentContext isBlockContext ifFalse:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5864 |
(method notNil and:[code notNil]) ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5865 |
messages := method messagesSent. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5866 |
messages size == 1 ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5867 |
sentContext selector == messages first ifTrue:[ |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5868 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5869 |
] |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5870 |
] |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5871 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5872 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5873 |
]. |
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
5874 |
]. |
2177 | 5875 |
]. |
5876 |
||
1555 | 5877 |
UserPreferences current syntaxColoring ifTrue:[ |
2709
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5878 |
implementorClass isNil ifTrue:[ |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5879 |
(con isBlockContext |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5880 |
and:[con home isNil |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5881 |
and:[con guessedHome notNil]]) |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5882 |
ifTrue:[ |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5883 |
implementorClass := con guessedHome mclass |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5884 |
] |
0c8564f828c2
syntax coloring of optimized block contexts
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
5885 |
]. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5886 |
implementorClass notNil ifTrue:[ |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5887 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
5504 | 5888 |
code size < 100000 ifTrue:[ |
7481
11c16a700dcf
ignore syntaxHighlighter errors
Claus Gittinger <cg@exept.de>
parents:
7328
diff
changeset
|
5889 |
Error handle:[:ex | |
11c16a700dcf
ignore syntaxHighlighter errors
Claus Gittinger <cg@exept.de>
parents:
7328
diff
changeset
|
5890 |
] do:[ |
11c16a700dcf
ignore syntaxHighlighter errors
Claus Gittinger <cg@exept.de>
parents:
7328
diff
changeset
|
5891 |
code := highlighter formatMethod:code in:implementorClass. |
11c16a700dcf
ignore syntaxHighlighter errors
Claus Gittinger <cg@exept.de>
parents:
7328
diff
changeset
|
5892 |
] |
5504 | 5893 |
] |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5894 |
] |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5895 |
] |
1555 | 5896 |
]. |
5897 |
||
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
5898 |
"/ code ~= (codeView contents) ifTrue:[ |
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
5899 |
codeView setContents:code. |
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
5900 |
"/ ]. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5901 |
(lineNrInMethod notNil |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5902 |
and:[lineNrInMethod ~~ 0 |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5903 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
7000 | 5904 |
lineNrInMethod == 255 ifFalse:[ |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5905 |
(lineNrInMethod == 255 |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5906 |
and:[method notNil |
1960 | 5907 |
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
|
5908 |
"/ 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
|
5909 |
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
|
5910 |
] ifFalse:[ |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5911 |
codeView selectLine:lineNrInMethod. |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5912 |
]. |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5913 |
codeView makeSelectionVisible |
7000 | 5914 |
]. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5915 |
] ifFalse:[ |
1694 | 5916 |
codeView unselect. |
1624
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5917 |
codeView scrollToTop |
5bec63471d4d
ask class for syntaxHighligter (do not format java code ...)
Claus Gittinger <cg@exept.de>
parents:
1613
diff
changeset
|
5918 |
] |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5919 |
]. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5920 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5921 |
codeView acceptEnabled:canAccept. |
1695 | 5922 |
canAccept ifTrue:[ |
5923 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
5924 |
] ifFalse:[ |
|
6046
81b2da24a0b6
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
6034
diff
changeset
|
5925 |
codeView acceptAction:[:code | self beep] |
1695 | 5926 |
]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5927 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5928 |
receiverInspector inspect:rec. |
3427 | 5929 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5930 |
|
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5931 |
" |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5932 |
the one below is wrong: currently, the |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5933 |
evaluator cannot handle passed contexts. |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5934 |
Once it does, pass con as in:-arg |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5935 |
" |
2790 | 5936 |
(rec isJavaObject |
5937 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
5938 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
5939 |
evaluatorClass := Parser |
|
5940 |
] ifFalse:[ |
|
5941 |
evaluatorClass := rec class evaluatorClass |
|
5942 |
]. |
|
5943 |
||
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5944 |
codeView doItAction:[:theCode | |
2790 | 5945 |
evaluatorClass |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5946 |
evaluate:theCode |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5947 |
in:actualContext |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5948 |
receiver:rec |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5949 |
notifying:codeView |
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
5950 |
logged:true |
4122 | 5951 |
ifFail:nil |
5952 |
]. |
|
5953 |
currentMethod := method. |
|
5954 |
||
5955 |
selectedContext := homeContext. |
|
5956 |
actualContext := con |
|
5957 |
]. |
|
5958 |
] ifFalse:[ |
|
5959 |
codeView contents:nil. |
|
5960 |
]. |
|
5961 |
codeView modified:false. |
|
5962 |
||
5963 |
con isContext ifFalse:[ |
|
5964 |
sendButton disable. |
|
5965 |
] ifTrue:[ |
|
5966 |
sendButton enable. |
|
5967 |
]. |
|
5968 |
||
5969 |
"clear out locals to prevent keeping around unneeded contexts |
|
5970 |
(due to the block held in codeView). |
|
5971 |
(not really needed, since stuff gets collected away sooner or later ... |
|
5972 |
... but this makes it a bit sooner) |
|
5973 |
" |
|
5974 |
con := nil. |
|
5975 |
homeContext := nil. |
|
5976 |
||
5977 |
canDefine ifTrue:[ |
|
5978 |
defineButton beVisible. |
|
5979 |
] ifFalse:[ |
|
5980 |
defineButton beInvisible. |
|
5981 |
]. |
|
5982 |
||
5983 |
" |
|
5984 |
enable/disable some menu items |
|
5985 |
" |
|
5986 |
self updateMenuItems |
|
5987 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
5988 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
7481
11c16a700dcf
ignore syntaxHighlighter errors
Claus Gittinger <cg@exept.de>
parents:
7328
diff
changeset
|
5989 |
"Modified: / 27-10-2006 / 14:19:32 / cg" |
4122 | 5990 |
! |
5991 |
||
5992 |
updateMenuItems |
|
5993 |
|m mthd cls mCls rCls| |
|
5994 |
||
5995 |
" |
|
5996 |
enable/disable some menu items |
|
5997 |
" |
|
5998 |
m := contextView middleButtonMenu. |
|
5999 |
m notNil ifTrue:[ |
|
6000 |
m disable:#removeBreakpoint. |
|
6001 |
m disable:#addBreakpoint. |
|
6002 |
canShowMore ifFalse:[ |
|
6003 |
m disable:#showMore |
|
6004 |
]. |
|
6005 |
||
6006 |
selectedContext notNil ifTrue:[ |
|
6007 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
6008 |
||
6009 |
mthd := selectedContext method. |
|
6010 |
mthd notNil ifTrue:[ |
|
6011 |
cls := mCls := mthd containingClass. |
|
6012 |
mthd isBreakpointed ifTrue:[ |
|
6013 |
m enable:#removeBreakpoint. |
|
6014 |
] ifFalse:[ |
|
6015 |
m enable:#addBreakpoint. |
|
6016 |
] |
|
6017 |
]. |
|
6018 |
rCls := selectedContext receiver class. |
|
6019 |
cls isNil ifTrue:[ |
|
6020 |
cls := rCls |
|
6021 |
]. |
|
6022 |
cls notNil ifTrue:[ |
|
6023 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
6024 |
rCls == mCls ifTrue:[ |
|
6025 |
m disable:#browseReceiversClass |
|
6026 |
]. |
|
6027 |
mCls isNil ifTrue:[ |
|
6028 |
m disable:#browseImplementingClass |
|
6029 |
] |
|
6030 |
||
6031 |
] ifFalse:[ |
|
6032 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
6033 |
]. |
|
6034 |
] ifFalse:[ |
|
6035 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
6036 |
] |
|
6037 |
] |
|
6038 |
! ! |
|
6039 |
||
6040 |
!DebugView class methodsFor:'documentation'! |
|
6041 |
||
6042 |
version |
|
7797 | 6043 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.416 2007-05-21 12:21:20 cg Exp $' |
4122 | 6044 |
! ! |
6045 |
||
6046 |
DebugView initialize! |