author | Claus Gittinger <cg@exept.de> |
Tue, 03 Sep 2013 14:35:04 +0200 | |
changeset 13482 | b903ec4bfbb3 |
parent 13464 | 931d28c589b7 |
child 13488 | 82ef098c106e |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
11210 | 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 |
12839 | 15 |
instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView |
16 |
receiverInspector contextInspector contextArray selectedContext |
|
17 |
catchBlock grabber mayProceed traceView tracing bigStep |
|
18 |
skipLineNr steppedContextAddress abortButton terminateButton |
|
19 |
continueButton stepButton nextButton nextOverButton nextOutButton |
|
20 |
sendButton returnButton restartButton exclusive inspecting |
|
21 |
nChainShown inspectedProcess updateProcess stopButton |
|
22 |
updateButton defineButton monitorToggle stepping |
|
23 |
steppedContextLineno stepForReturn actualContext inWrap |
|
24 |
stackInspector steppedContext wrapperContext verboseBacktrace |
|
25 |
firstContext stepHow cachable currentMethod ignoreBreakpoints |
|
26 |
stepUntilEntering lastStepUntilEntering |
|
27 |
lastSelectionInReceiverInspector lastSelectionInContextInspector |
|
28 |
canShowMore exitAbort reportButton setOfHiddenCallingSelectors |
|
29 |
isStoppedAtHaltOrBreakPoint exceptionInfoLabel methodCodeToggle |
|
30 |
methodCodeToggleSelectionHolder |
|
31 |
isStoppedAtBreakPointWithParameter breakPointParameter |
|
13362 | 32 |
hideSupportCode contextInfoLabel resendButton |
13363 | 33 |
gotoDialogOpenerButton isStoppedInModalDialog' |
12839 | 34 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
35 |
DebuggingDebugger DebuggingDebugger2 |
|
36 |
DefaultDebuggerBackgroundColor InitialNChainShown IgnoredHalts |
|
37 |
ShowThreadID LastIgnoreHaltNTimes LastIgnoreHaltDuration |
|
13111 | 38 |
LastExtent LastOrigin RememberedCallChain DebuggingDebugger3 |
39 |
NumberOfDebuggers' |
|
12839 | 40 |
poolDictionaries:'' |
41 |
category:'Interface-Debugger' |
|
0 | 42 |
! |
43 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
44 |
Object subclass:#IgnoredHaltOrBreakpoint |
12937 | 45 |
instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed |
46 |
ignoredReceiverClasses ignoredProcesses' |
|
12839 | 47 |
classVariableNames:'' |
48 |
poolDictionaries:'' |
|
49 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
50 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
51 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
52 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredHalt |
12839 | 53 |
instanceVariableNames:'weakMethodHolder lineNumber' |
54 |
classVariableNames:'' |
|
55 |
poolDictionaries:'' |
|
56 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
57 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
58 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
59 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredBreakpoint |
12839 | 60 |
instanceVariableNames:'parameter' |
61 |
classVariableNames:'' |
|
62 |
poolDictionaries:'' |
|
63 |
privateIn:DebugView |
|
8170 | 64 |
! |
65 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
66 |
!DebugView class methodsFor:'documentation'! |
29 | 67 |
|
68 |
copyright |
|
69 |
" |
|
70 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
11210 | 71 |
All Rights Reserved |
29 | 72 |
|
73 |
This software is furnished under a license and may be used |
|
74 |
only in accordance with the terms of that license and with the |
|
75 |
inclusion of the above copyright notice. This software may not |
|
76 |
be provided or otherwise made available to, or used by, any |
|
77 |
other person. No title to or ownership of the software is |
|
78 |
hereby transferred. |
|
79 |
" |
|
80 |
! |
|
0 | 81 |
|
29 | 82 |
documentation |
83 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
84 |
This class implements a graphical debugger interface. |
29 | 85 |
The debugger usually sits on top of the faulting process, |
10205 | 86 |
taking over its event processing. |
12840 | 87 |
|
2358 | 88 |
(this is different from other Smalltalk debuggers, which control |
89 |
the debuggee as a separate process. Consider this an historic |
|
90 |
leftover - the debugger was one of the first applications written for |
|
12840 | 91 |
ST/X. |
92 |
The whole setup might be changed, once the required process primitives |
|
93 |
are available, which allow control of another processes execution |
|
94 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
95 |
to have the debugger control the debuggee (i.e. two processes) |
|
96 |
however, why should we change it without a particular need...). |
|
2358 | 97 |
|
98 |
Only the 'stopped' debugged process is affected; |
|
29 | 99 |
other processes continue to respond to events. |
12840 | 100 |
The one exception to this is when an error occurs within the dispatcher process |
101 |
or in one of the eventhandler processes. In this case, the debugger |
|
29 | 102 |
will sit on an exclusive display connection. |
103 |
||
35 | 104 |
See additional information in 'doc/misc/debugger.doc'. |
53 | 105 |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
106 |
Notice & Warning: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
107 |
the DebugView class caches the last used debugger in a class variable. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
108 |
It may happen, that a malfunctioning debugger (for example, a halfway destroyed one) |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
109 |
is kept there. You will notice this, if a debugger comes up without showing any contents. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
110 |
In this case, close (or destroy) the broken debugView, and execute |
11210 | 111 |
Debugger newDebugger |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
112 |
which removes the cached debugger and forces creation of a new one the next time. |
12840 | 113 |
This is a temporary workaround - the debugger should be fixed to avoid this situation. |
114 |
||
115 |
You must also flush the cached debugger, if you change the debugger's |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
116 |
initialization code (buttons, menu, etc.) or the debugger's class layout, |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
117 |
and you want the new code to become effective. |
508 | 118 |
|
119 |
[author:] |
|
11210 | 120 |
Claus Gittinger |
508 | 121 |
|
122 |
[see also:] |
|
11210 | 123 |
Exception Signal |
124 |
Process |
|
29 | 125 |
" |
126 |
! ! |
|
0 | 127 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
128 |
!DebugView class methodsFor:'initialization'! |
243 | 129 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
130 |
initialize |
13362 | 131 |
DebuggingDebugger := DebuggingDebugger2 := MoreDebuggingDetail := false. |
132 |
||
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
133 |
InitialNChainShown := 50. |
8148 | 134 |
"/ DefaultDebuggerBackgroundColor := nil. |
3387 | 135 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
136 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
137 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
138 |
"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
|
139 |
"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
|
140 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
141 |
|
243 | 142 |
reinitialize |
7822 | 143 |
"reinitialize after an image-restart" |
144 |
||
243 | 145 |
self newDebugger |
146 |
! ! |
|
147 |
||
10203 | 148 |
!DebugView class methodsFor:'cleanup'! |
149 |
||
10205 | 150 |
lowSpaceCleanup |
10203 | 151 |
"in low memory situations, give up cached debuggers" |
152 |
||
153 |
CachedDebugger := nil. |
|
154 |
CachedExclusive := nil. |
|
155 |
OpenDebuggers := nil. |
|
11391 | 156 |
RememberedCallChain := nil. |
10203 | 157 |
|
158 |
" |
|
159 |
DebugView lowSpaceCleanup |
|
160 |
" |
|
161 |
||
11391 | 162 |
"Modified: / 08-03-2012 / 01:30:21 / cg" |
10203 | 163 |
! |
164 |
||
165 |
newDebugger |
|
166 |
"force creation of a new debugger (give up cached debuggers)" |
|
167 |
||
168 |
CachedDebugger := nil. |
|
169 |
CachedExclusive := nil. |
|
170 |
OpenDebuggers := nil. |
|
171 |
||
172 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
|
11210 | 173 |
Debugger := self |
10203 | 174 |
]. |
175 |
||
176 |
" |
|
177 |
DebugView newDebugger |
|
178 |
" |
|
179 |
! ! |
|
180 |
||
181 |
!DebugView class methodsFor:'defaults'! |
|
182 |
||
183 |
defaultIcon |
|
184 |
"return the browsers default window icon" |
|
185 |
||
186 |
<resource: #programImage> |
|
187 |
||
10205 | 188 |
^ ToolbarIconLibrary debug22x22Icon |
10203 | 189 |
"/ ^ ToolbarIconLibrary debugIt20x20Icon |
190 |
||
191 |
"Modified: / 11-02-2007 / 11:47:20 / cg" |
|
192 |
! |
|
193 |
||
194 |
defaultIconForAboutBox |
|
195 |
<resource: #programImage> |
|
196 |
||
10205 | 197 |
^ ToolbarIconLibrary debug22x22IconForBlackBackgound |
10203 | 198 |
! |
199 |
||
200 |
defaultVerboseBacktrace |
|
201 |
<resource: #obsolete> |
|
202 |
self obsoleteMethodWarning. |
|
203 |
^ UserPreferences current verboseBacktraceInDebugger |
|
204 |
||
205 |
"Created: 11.1.1997 / 12:14:35 / cg" |
|
206 |
! |
|
207 |
||
208 |
defaultVerboseBacktrace:aBoolean |
|
209 |
<resource: #obsolete> |
|
210 |
self obsoleteMethodWarning. |
|
211 |
UserPreferences current verboseBacktraceInDebugger:aBoolean |
|
212 |
! |
|
213 |
||
13111 | 214 |
maxNumberOfDebuggers |
215 |
"to prevent debuggers from flooding the screen, |
|
216 |
in case of an error in an ever-forked background process |
|
217 |
(such as tooltip process)" |
|
218 |
||
219 |
^ 10 |
|
220 |
! |
|
221 |
||
10203 | 222 |
updateStyleCache |
223 |
"extract values from the styleSheet and cache them in class variables" |
|
224 |
||
225 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
226 |
||
227 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
|
228 |
||
229 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
230 |
! ! |
|
231 |
||
232 |
!DebugView class methodsFor:'ignoring halts'! |
|
233 |
||
234 |
haltIgnoreInformationFor:haltingMethod atLineNr:lineNrInHaltingMethod |
|
235 |
"the information (if any) about the ignore-state of a halt" |
|
236 |
||
237 |
IgnoredHalts isNil ifTrue:[^ nil]. |
|
238 |
||
10205 | 239 |
IgnoredHalts do:[:ign | |
12941 | 240 |
(ign isForMethod:haltingMethod line:lineNrInHaltingMethod) |
241 |
"/ (ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) |
|
242 |
ifTrue:[ |
|
11210 | 243 |
^ ign |
244 |
]. |
|
10203 | 245 |
]. |
246 |
^ nil. |
|
247 |
! |
|
248 |
||
249 |
hasIgnoredHalts |
|
250 |
self removeInactiveIgnores. |
|
251 |
^ IgnoredHalts notEmptyOrNil |
|
252 |
! |
|
253 |
||
12937 | 254 |
ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey orReceiverClass:receiverClassOrNil orProcess:processOrNil |
255 |
"remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations |
|
256 |
or until some time has elapsed. |
|
257 |
With nil count and time arguments, such an ignored breakpoint is reactivated" |
|
258 |
||
259 |
self |
|
260 |
ignoreHaltOrBreakpoint:#halt |
|
261 |
method:nil line:nil |
|
262 |
parameter:parameterOrNil |
|
263 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
264 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
265 |
! |
|
266 |
||
267 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
268 |
"remember to ignore a halt in some method for some number of invocations |
|
269 |
or until some time has elapsed. |
|
270 |
With nil count and time arguments, such an ignored halt is reactivated" |
|
271 |
||
272 |
self |
|
273 |
ignoreHaltOrBreakpoint:#halt |
|
274 |
method:haltingMethod line:lineNrOfHalt |
|
275 |
parameter:nil |
|
276 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
277 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
278 |
! |
|
279 |
||
280 |
ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil |
|
281 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
282 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
283 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
284 |
"remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
285 |
or until some time has elapsed. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
286 |
With nil count and time arguments, such an ignored breakpoint is reactivated" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
287 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
288 |
|oldEntry ign| |
12947 | 289 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
290 |
IgnoredHalts notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
291 |
self removeInactiveIgnores. |
12937 | 292 |
type == #halt ifTrue:[ |
293 |
oldEntry := IgnoredHalts |
|
294 |
detect:[:ign | ign isForMethod:methodOrNil line:lineNrOfHaltOrNil] |
|
295 |
ifNone:nil. |
|
296 |
] ifFalse:[ |
|
297 |
oldEntry := IgnoredHalts |
|
298 |
detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil] |
|
299 |
ifNone:nil. |
|
300 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
301 |
oldEntry notNil ifTrue:[ |
12941 | 302 |
(processOrNil notNil or:[receiverClassOrNil notNil]) ifTrue:[ |
303 |
receiverClassOrNil notNil ifTrue:[ |
|
304 |
oldEntry ignoreForReceiverClass:receiverClassOrNil. |
|
305 |
]. |
|
306 |
processOrNil notNil ifTrue:[ |
|
307 |
oldEntry ignoreForProcess:processOrNil. |
|
308 |
]. |
|
309 |
^ self. |
|
310 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
311 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
312 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
313 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
314 |
|
12937 | 315 |
(countOrNil notNil |
316 |
or:[dTOrNil notNil |
|
317 |
or:[untilShiftKey == true |
|
318 |
or:[receiverClassOrNil notNil |
|
319 |
or:[processOrNil notNil]]]] |
|
320 |
) ifTrue:[ |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
321 |
IgnoredHalts isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
322 |
IgnoredHalts := OrderedCollection new. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
323 |
]. |
12937 | 324 |
type == #halt ifTrue:[ |
325 |
ign := IgnoredHalt new method:methodOrNil lineNumber:lineNrOfHaltOrNil. |
|
326 |
] ifFalse:[ |
|
327 |
ign := IgnoredHalt new breakpointWithParameter:parameterOrNil. |
|
328 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
329 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
330 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
331 |
ign ignoreCount:countOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
332 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
333 |
(dTOrNil notNil) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
334 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
335 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
336 |
untilShiftKey == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
337 |
ign ignoreUntilShiftKeyPressed:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
338 |
]. |
12937 | 339 |
receiverClassOrNil notNil ifTrue:[ |
340 |
ign ignoreForReceiverClass:receiverClassOrNil. |
|
341 |
]. |
|
342 |
processOrNil notNil ifTrue:[ |
|
343 |
ign ignoreForProcess:processOrNil. |
|
344 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
345 |
IgnoredHalts add:ign. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
346 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
347 |
Smalltalk changed:#ignoredHalts. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
348 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
349 |
"Created: / 06-03-2012 / 12:37:58 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
350 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
351 |
|
12937 | 352 |
isBreakpointToBeIgnoredForParameter:parameter context:aContext modifyEntryCount:modifyCount |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
353 |
"/ should a breakpoint be ignored ? |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
354 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
355 |
IgnoredHalts isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
356 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
357 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
358 |
IgnoredHalts do:[:ign | |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
359 |
(ign isForBreakpointWithParameter:parameter) ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
360 |
Transcript show:'Debugger [info]: break ignored for ', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
361 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
362 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
363 |
ign isHaltIgnored ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
364 |
Transcript showCR:'Debugger [info]: no longer ignore breakpoint for ', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
365 |
IgnoredHalts remove:ign ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
366 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
367 |
^ true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
368 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
369 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
370 |
|
13162 | 371 |
IgnoredHalts := (IgnoredHalts reject:[:ign | ign isActive not ]) asNilIfEmpty. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
372 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
373 |
^ false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
374 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
375 |
"Created: / 06-03-2012 / 12:50:30 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
376 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
377 |
|
12937 | 378 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod context:aContext modifyEntryCount:modifyCount |
12562 | 379 |
"should a halt be ignored ?" |
380 |
||
381 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
382 |
||
383 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
|
384 |
IgnoredHalts do:[:ign | |
|
12937 | 385 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod context:aContext) ifTrue:[ |
12562 | 386 |
Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString. |
387 |
Transcript show:' ('; show:ign; showCR:')'. |
|
388 |
||
389 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
|
390 |
ign isHaltIgnored ifFalse:[ |
|
391 |
Transcript showCR:'Debugger [info]: no longer ignore halt in ', haltingMethod whoString. |
|
392 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
393 |
]. |
|
394 |
^ true. |
|
395 |
]. |
|
396 |
]. |
|
397 |
||
13162 | 398 |
IgnoredHalts := (IgnoredHalts reject:[:ign | ign isActive not]) asNilIfEmpty. |
12562 | 399 |
|
400 |
^ false. |
|
401 |
||
402 |
"Modified (comment): / 06-03-2012 / 12:51:43 / cg" |
|
403 |
! |
|
404 |
||
10203 | 405 |
removeInactiveIgnores |
406 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 407 |
IgnoredHalts := IgnoredHalts select:[:i | i isActive]. |
10203 | 408 |
]. |
409 |
! |
|
410 |
||
411 |
stopIgnoringHalts |
|
412 |
"forget about all ignored halts" |
|
413 |
||
414 |
IgnoredHalts := nil. |
|
415 |
Smalltalk changed:#ignoredHalts. |
|
416 |
! ! |
|
417 |
||
418 |
!DebugView class methodsFor:'instance creation / entering'! |
|
0 | 419 |
|
2421 | 420 |
enter |
421 |
"enter a debugger" |
|
422 |
||
5455 | 423 |
<context: #return> |
424 |
||
10205 | 425 |
^ self |
11210 | 426 |
enter:thisContext sender |
427 |
withMessage:'debugger entered' |
|
428 |
mayProceed:true. |
|
10205 | 429 |
! |
430 |
||
431 |
enter:aContext withMessage:aString |
|
2355 | 432 |
"enter a debugger" |
433 |
||
5455 | 434 |
<context: #return> |
435 |
||
2355 | 436 |
^ self |
11210 | 437 |
enter:aContext |
438 |
withMessage:aString |
|
439 |
mayProceed:true |
|
2355 | 440 |
! |
441 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
442 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 443 |
"enter a debugger; if this is a recursive invocation, enter |
444 |
a MiniDebugger instead. |
|
445 |
This is the standard way of entering the debugger; |
|
446 |
sent from error- and halt messages." |
|
0 | 447 |
|
3447 | 448 |
<context: #return> |
449 |
||
3702 | 450 |
|active| |
93 | 451 |
|
13111 | 452 |
(NumberOfDebuggers ? 0) > self maxNumberOfDebuggers ifTrue:[ |
453 |
NumberOfDebuggers := self allInstances count:[:d | d isOpen]. |
|
454 |
NumberOfDebuggers > self maxNumberOfDebuggers ifTrue:[ |
|
455 |
MiniDebugger enter:aContext withMessage:'too many debuggers - looping?' mayProceed:true. |
|
456 |
]. |
|
457 |
]. |
|
458 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
459 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
460 |
'==> enter1: (' print. aContext print. ')' printCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
461 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
462 |
|
57 | 463 |
StepInterruptPending := nil. |
3998 | 464 |
ControlInterrupt handle:[:ex | |
11210 | 465 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
466 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
467 |
ex proceed |
|
3998 | 468 |
] do:[ |
11210 | 469 |
" |
470 |
well, it could be a stepping or sending debugger up there; |
|
471 |
in this case, return to it. This happens, when a stepping process |
|
472 |
runs into an error (for example, a halt). In this case, we want the |
|
473 |
stepping debugger to come up again instead of a new one. |
|
474 |
" |
|
475 |
OpenDebuggers notNil ifTrue:[ |
|
476 |
active := Processor activeProcess. |
|
477 |
OpenDebuggers do:[:aDebugger | |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
478 |
|debuggersProcess| |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
479 |
|
11210 | 480 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
481 |
debuggersProcess := aDebugger inspectedProcess. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
482 |
debuggersProcess == active ifTrue:[ |
11210 | 483 |
aDebugger device isOpen ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
484 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
485 |
'reusing cached debugger' errorPrintCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
486 |
]. |
11210 | 487 |
aDebugger unstep. |
488 |
aDebugger setLabelFor:aString in:active. |
|
489 |
aDebugger mayProceed:mayProceed. |
|
490 |
^ aDebugger enter:aContext select:nil. |
|
491 |
] |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
492 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
493 |
(debuggersProcess notNil and:[ debuggersProcess isDead ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
494 |
aDebugger destroy. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
495 |
]. |
11210 | 496 |
] |
497 |
] |
|
498 |
]. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
499 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
500 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 501 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
502 |
"Modified: / 17-07-2012 / 19:08:18 / cg" |
53 | 503 |
! |
504 |
||
8347 | 505 |
enterException:ex |
506 |
"enter a debugger; if this is a recursive invocation, enter |
|
507 |
a MiniDebugger instead. |
|
508 |
This is the standard way of entering the debugger; |
|
509 |
sent from error- and halt messages." |
|
510 |
||
511 |
^ self |
|
11210 | 512 |
enter:ex returnableSuspendedContext |
12529 | 513 |
withMessage:('[',ex originalSignal class name,']: ',ex descriptionForDebugger) |
11210 | 514 |
mayProceed:(ex mayProceed). |
8347 | 515 |
! |
516 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
517 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 518 |
"enter a debugger - do not check for recursive invocation" |
519 |
||
5455 | 520 |
<context: #return> |
521 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
522 |
|aDebugger| |
266 | 523 |
|
524 |
StepInterruptPending := nil. |
|
13111 | 525 |
NumberOfDebuggers := (NumberOfDebuggers ? 0) + 1. |
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
526 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
527 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
528 |
"/ to avoid recursive debugging ... |
3447 | 529 |
ControlInterrupt handle:[:ex | |
11210 | 530 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
531 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
532 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
533 |
] do:[ |
11210 | 534 |
aDebugger := self new. |
3447 | 535 |
]. |
536 |
||
537 |
aDebugger isNil ifTrue:[ |
|
11210 | 538 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
539 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
540 |
mayProceed ifTrue:[ |
|
12333 | 541 |
(Dialog confirm:'Error/Breakpoint caught.\\Press Continue or Abort.' withCRs |
11210 | 542 |
yesLabel:'Continue' noLabel:'Abort') |
543 |
ifTrue:[ |
|
544 |
^ nil |
|
545 |
]. |
|
546 |
] ifFalse:[ |
|
12333 | 547 |
self information:'Error caught.\\Press OK to abort the operation.' withCRs. |
11210 | 548 |
]. |
549 |
AbortOperationRequest raise. |
|
550 |
"not reached" |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
551 |
]. |
3447 | 552 |
|
553 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
554 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 555 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
556 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
557 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
558 |
" |
11210 | 559 |
nil halt |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
560 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
561 |
|
3447 | 562 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 563 |
! |
564 |
||
6430 | 565 |
enterWithMessage:message |
566 |
"enter a debugger" |
|
567 |
||
568 |
<context: #return> |
|
569 |
||
10205 | 570 |
^ self |
11210 | 571 |
enter:(thisContext sender) |
572 |
withMessage:message |
|
573 |
mayProceed:true. |
|
6430 | 574 |
! |
575 |
||
266 | 576 |
new |
10205 | 577 |
"return a new DebugView. |
2358 | 578 |
- return a cached debugger if it already exists. |
579 |
Also, care for remote displays on which no debugger is wanted |
|
580 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
581 |
||
582 |
|debugger currentScreen debuggerDevice| |
|
583 |
||
584 |
currentScreen := Screen current. |
|
14 | 585 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
586 |
currentScreen notNil ifTrue:[ |
11210 | 587 |
(currentScreen suppressDebugger) ifTrue:[ |
588 |
"/ no debuggers with that device - show an alertBox which aborts... |
|
589 |
^ nil. |
|
590 |
]. |
|
591 |
(currentScreen mayOpenDebugger) ifFalse:[ |
|
592 |
"/ no debugger on that device - but on the main screen |
|
593 |
currentScreen := Screen default. |
|
594 |
]. |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
595 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
596 |
|
266 | 597 |
" |
10205 | 598 |
need a blocking debugger if no processes or |
599 |
or if its a timing/interrupt process |
|
266 | 600 |
(because otherwise we would not get any events here ... |
601 |
" |
|
602 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
11210 | 603 |
((debugger := CachedExclusive) isNil |
604 |
or:[debugger device ~~ currentScreen |
|
605 |
or:[currentScreen isNil |
|
606 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
|
607 |
debugger := self newExclusive |
|
608 |
]. |
|
609 |
CachedExclusive := nil. |
|
266 | 610 |
] ifFalse:[ |
11210 | 611 |
CachedDebugger notNil ifTrue:[ |
612 |
(CachedDebugger device ~~ currentScreen |
|
613 |
or:[currentScreen isNil |
|
614 |
or:[currentScreen isOpen not |
|
615 |
or:[CachedDebugger class ~~ self]]]) ifTrue:[ |
|
616 |
CachedDebugger := nil |
|
617 |
] |
|
618 |
]. |
|
619 |
||
620 |
(debugger := CachedDebugger) notNil ifTrue:[ |
|
621 |
CachedDebugger := nil. |
|
622 |
] ifFalse:[ |
|
623 |
debuggerDevice := currentScreen. |
|
624 |
debuggerDevice isNil ifTrue:[ |
|
625 |
"/ use the default display |
|
626 |
debuggerDevice := Screen default. |
|
627 |
]. |
|
628 |
(debuggerDevice isNil |
|
629 |
or:[debuggerDevice isOpen not |
|
630 |
"/ or:[debuggerDevice mayOpenDebugger not] |
|
631 |
]) ifTrue:[ |
|
632 |
"/ no debugger |
|
633 |
^ nil. |
|
634 |
]. |
|
635 |
||
636 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
637 |
do:[ |
|
638 |
debugger := super new. |
|
639 |
]. |
|
640 |
debugger label:'Debugger'. |
|
641 |
debugger icon:self defaultIcon. |
|
642 |
] |
|
266 | 643 |
]. |
73 | 644 |
^ debugger |
875 | 645 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
646 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 647 |
! |
0 | 648 |
|
266 | 649 |
newExclusive |
650 |
"return a debugger for exclusive display access" |
|
651 |
||
652 |
|debugger| |
|
105 | 653 |
|
266 | 654 |
debugger := super new. |
655 |
debugger label:'Debugger'. |
|
875 | 656 |
debugger icon:self defaultIcon. |
266 | 657 |
debugger exclusive:true. |
658 |
^ debugger |
|
875 | 659 |
|
660 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 661 |
! |
662 |
||
29 | 663 |
openOn:aProcess |
664 |
"start a debugger on aProcess |
|
665 |
(actually not more than a good-looking inspector)" |
|
15 | 666 |
|
52 | 667 |
|aDebugger label nm| |
15 | 668 |
|
669 |
aDebugger := super new. |
|
875 | 670 |
aDebugger icon:self defaultIcon. |
29 | 671 |
aProcess notNil ifTrue:[ |
11210 | 672 |
nm := aProcess name. |
673 |
nm notNil ifTrue:[ |
|
674 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
675 |
] ifFalse:[ |
|
676 |
nm := aProcess id printString |
|
677 |
]. |
|
678 |
label := 'Debugger [' , nm , ']'. |
|
29 | 679 |
] ifFalse:[ |
11210 | 680 |
label := 'no process' |
29 | 681 |
]. |
1114 | 682 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 683 |
aDebugger openOn:aProcess. |
684 |
^ nil |
|
875 | 685 |
|
1114 | 686 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 687 |
! ! |
688 |
||
3269 | 689 |
!DebugView class methodsFor:'menu specs'! |
690 |
||
12437 | 691 |
breakPointMenuSpec |
692 |
"This resource specification was automatically generated |
|
693 |
by the MenuEditor of ST/X." |
|
694 |
||
695 |
"Do not manually edit this!! If it is corrupted, |
|
696 |
the MenuEditor may not be able to read the specification." |
|
697 |
||
698 |
||
699 |
" |
|
700 |
MenuEditor new openOnClass:DebugView andSelector:#breakPointMenuSpec |
|
701 |
(Menu new fromLiteralArrayEncoding:(DebugView breakPointMenuSpec)) startUp |
|
702 |
" |
|
703 |
||
704 |
<resource: #menu> |
|
705 |
||
706 |
^ |
|
707 |
#(Menu |
|
708 |
( |
|
709 |
(MenuItem |
|
13229 | 710 |
enabled: canRemoveBreakpoint |
711 |
label: 'Remove Breakpoint' |
|
712 |
itemValue: removeBreakpoint |
|
713 |
) |
|
714 |
(MenuItem |
|
715 |
label: 'Remove all Breakpoints' |
|
716 |
itemValue: removeAllBreakpoints |
|
717 |
) |
|
718 |
(MenuItem |
|
719 |
label: '-' |
|
720 |
) |
|
721 |
(MenuItem |
|
12437 | 722 |
label: 'Ignore this Halt/BreakPoint' |
723 |
submenu: |
|
724 |
(Menu |
|
725 |
( |
|
726 |
(MenuItem |
|
727 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
13394 | 728 |
label: 'Forever (Until Ignoring is Stopped)' |
729 |
itemValue: ignoreHaltForever |
|
730 |
) |
|
731 |
(MenuItem |
|
732 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
12437 | 733 |
label: 'For Some Time...' |
734 |
itemValue: openIgnoreHaltUntilTimeElapsedDialog |
|
735 |
) |
|
736 |
(MenuItem |
|
737 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
738 |
label: 'For the Next N Times...' |
|
739 |
itemValue: openIgnoreHaltNTimesDialog |
|
740 |
) |
|
741 |
(MenuItem |
|
742 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
13394 | 743 |
label: 'Until Shift-Key is Pressed' |
744 |
itemValue: ignoreHaltUntilShiftKeyIsPressed |
|
745 |
) |
|
746 |
(MenuItem |
|
747 |
label: '-' |
|
12937 | 748 |
) |
749 |
(MenuItem |
|
750 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
751 |
label: 'In Current Process' |
|
752 |
itemValue: ignoreHaltForCurrentProcess |
|
753 |
) |
|
754 |
(MenuItem |
|
755 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
13394 | 756 |
label: 'For this Receiver Class' |
757 |
itemValue: ignoreHaltForThisReceiverClass |
|
12437 | 758 |
) |
759 |
) |
|
760 |
nil |
|
761 |
nil |
|
762 |
) |
|
763 |
) |
|
764 |
(MenuItem |
|
765 |
enabled: isStoppedAtBreakPointWithParameter |
|
766 |
label: 'Ignore all BreakPoints with this Parameter' |
|
767 |
submenu: |
|
768 |
(Menu |
|
769 |
( |
|
770 |
(MenuItem |
|
771 |
enabled: isStoppedAtBreakPointWithParameter |
|
13394 | 772 |
label: 'Forever (Reenable in BreakPoint-Browser)' |
773 |
itemValue: ignoreBreakpointsWithThisParameterForever |
|
774 |
) |
|
775 |
(MenuItem |
|
776 |
enabled: isStoppedAtBreakPointWithParameter |
|
12437 | 777 |
label: 'For Some Time...' |
778 |
itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
|
779 |
) |
|
780 |
(MenuItem |
|
781 |
enabled: isStoppedAtBreakPointWithParameter |
|
782 |
label: 'For the Next N Times...' |
|
783 |
itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog |
|
784 |
) |
|
785 |
(MenuItem |
|
786 |
enabled: isStoppedAtBreakPointWithParameter |
|
787 |
label: 'Until Shift-Key is Pressed' |
|
788 |
itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
|
789 |
) |
|
790 |
) |
|
791 |
nil |
|
792 |
nil |
|
793 |
) |
|
794 |
) |
|
795 |
(MenuItem |
|
796 |
label: 'Ignore all Halts/BreakPoints' |
|
797 |
submenu: |
|
798 |
(Menu |
|
799 |
( |
|
800 |
(MenuItem |
|
13394 | 801 |
label: 'Forever (Until Ignoring is Stopped)' |
802 |
itemValue: ignoreAllHaltsForever |
|
803 |
) |
|
804 |
(MenuItem |
|
12437 | 805 |
label: 'For Some Time...' |
806 |
itemValue: openIgnoreAllHaltsUntilTimeElapsedDialog |
|
807 |
) |
|
808 |
(MenuItem |
|
809 |
label: 'Until Shift-Key is Pressed' |
|
810 |
itemValue: ignoreAllHaltsUntilShiftKeyIsPressed |
|
811 |
) |
|
812 |
) |
|
813 |
nil |
|
814 |
nil |
|
815 |
) |
|
816 |
) |
|
817 |
(MenuItem |
|
818 |
enabled: hasHaltsToIgnore |
|
819 |
label: 'Stop Ignoring' |
|
820 |
itemValue: stopIgnoringHalts |
|
821 |
) |
|
822 |
(MenuItem |
|
823 |
label: '-' |
|
824 |
) |
|
825 |
(MenuItem |
|
13228 | 826 |
enabled: canAddBreakpoint |
827 |
label: 'Add Breakpoint' |
|
828 |
itemValue: addBreakpoint |
|
829 |
) |
|
830 |
(MenuItem |
|
12437 | 831 |
label: 'Manage Breakpoints' |
832 |
itemValue: openBreakPointBrowser |
|
833 |
) |
|
834 |
(MenuItem |
|
13228 | 835 |
label: '-' |
836 |
) |
|
837 |
(MenuItem |
|
12437 | 838 |
label: 'Allow Halt in Debugger' |
839 |
itemValue: allowBreakPointsInDebugger: |
|
840 |
indication: allowBreakPointsInDebugger |
|
841 |
) |
|
842 |
) |
|
843 |
nil |
|
844 |
nil |
|
845 |
) |
|
846 |
! |
|
847 |
||
848 |
classMenuSpec |
|
849 |
"This resource specification was automatically generated |
|
850 |
by the MenuEditor of ST/X." |
|
851 |
||
852 |
"Do not manually edit this!! If it is corrupted, |
|
853 |
the MenuEditor may not be able to read the specification." |
|
854 |
||
855 |
||
856 |
" |
|
12840 | 857 |
MenuEditor new openOnClass:DebugView andSelector:#receiverMenuSpec |
858 |
(Menu new fromLiteralArrayEncoding:(DebugView receiverMenuSpec)) startUp |
|
12437 | 859 |
" |
860 |
||
861 |
<resource: #menu> |
|
862 |
||
863 |
^ |
|
864 |
#(Menu |
|
865 |
( |
|
866 |
(MenuItem |
|
867 |
enabled: canBrowseImplementingClass |
|
868 |
label: 'Browse Implementing Class' |
|
869 |
itemValue: browseImplementingClass |
|
870 |
) |
|
871 |
(MenuItem |
|
872 |
enabled: canBrowseReceiversClass |
|
12840 | 873 |
label: 'Browse Receiver''s Class' |
12437 | 874 |
itemValue: browseReceiversClass |
875 |
) |
|
876 |
(MenuItem |
|
12840 | 877 |
enabled: canBrowseProcessesApplication |
878 |
label: 'Browse Application Class' |
|
879 |
itemValue: browseProcessesApplication |
|
880 |
) |
|
881 |
(MenuItem |
|
12437 | 882 |
label: '-' |
883 |
) |
|
884 |
(MenuItem |
|
885 |
enabled: canBrowseClassHierarchy |
|
12840 | 886 |
label: 'Browse Receiver''s Class Hierarchy' |
12437 | 887 |
itemValue: browseClassHierarchy |
888 |
isVisible: false |
|
889 |
) |
|
890 |
(MenuItem |
|
891 |
enabled: canBrowseFullClassProtocol |
|
12840 | 892 |
label: 'Browse Receiver''s Full Protocol' |
12437 | 893 |
itemValue: browseFullClassProtocol |
894 |
isVisible: false |
|
895 |
) |
|
896 |
(MenuItem |
|
897 |
label: '-' |
|
898 |
isVisible: false |
|
899 |
) |
|
900 |
(MenuItem |
|
12840 | 901 |
enabled: canInspectWidgetHierarchy |
902 |
label: 'Inspect Widget Hierarchy' |
|
903 |
itemValue: inspectWidgetHierarchy |
|
12437 | 904 |
) |
905 |
) |
|
906 |
nil |
|
907 |
nil |
|
908 |
) |
|
909 |
! |
|
910 |
||
911 |
contextMenuSpec |
|
912 |
"This resource specification was automatically generated |
|
913 |
by the MenuEditor of ST/X." |
|
914 |
||
915 |
"Do not manually edit this!! If it is corrupted, |
|
916 |
the MenuEditor may not be able to read the specification." |
|
917 |
||
918 |
||
919 |
" |
|
920 |
MenuEditor new openOnClass:DebugView andSelector:#contextMenuSpec |
|
921 |
(Menu new fromLiteralArrayEncoding:(DebugView contextMenuSpec)) startUp |
|
922 |
" |
|
923 |
||
924 |
<resource: #menu> |
|
925 |
||
926 |
^ |
|
927 |
#(Menu |
|
928 |
( |
|
929 |
(MenuItem |
|
930 |
enabled: canReturn |
|
931 |
label: 'Return' |
|
932 |
itemValue: doReturn |
|
933 |
) |
|
934 |
(MenuItem |
|
935 |
enabled: canRestart |
|
936 |
label: 'Restart' |
|
937 |
itemValue: doRestart |
|
938 |
) |
|
939 |
(MenuItem |
|
940 |
label: '-' |
|
941 |
) |
|
942 |
(MenuItem |
|
943 |
enabled: hasContextSelected |
|
944 |
label: 'Inspect' |
|
945 |
itemValue: inspectContext |
|
946 |
) |
|
947 |
(MenuItem |
|
948 |
label: 'Copy WalkBack Text' |
|
949 |
itemValue: copyWalkbackText |
|
950 |
) |
|
951 |
(MenuItem |
|
952 |
label: 'Bookmark Method in SystemBrowser' |
|
953 |
itemValue: addBrowserBookmark |
|
954 |
) |
|
955 |
(MenuItem |
|
956 |
label: '-' |
|
13388 | 957 |
) |
958 |
(MenuItem |
|
959 |
enabled: hasContextSelected |
|
960 |
label: 'Find Context with String in Source...' |
|
961 |
itemValue: findContextWithStringInSource |
|
962 |
) |
|
963 |
(MenuItem |
|
964 |
enabled: hasContextSelected |
|
965 |
label: 'Find Context with Value in Variable...' |
|
966 |
itemValue: findContextWithValueInVariable |
|
12437 | 967 |
) |
968 |
(MenuItem |
|
13388 | 969 |
enabled: hasContextSelected |
970 |
label: 'Find Next Exception Handler' |
|
971 |
itemValue: findNextExceptionHandlerContext |
|
972 |
) |
|
973 |
(MenuItem |
|
974 |
enabled: hasContextSelected |
|
12437 | 975 |
label: 'Find Handler For...' |
976 |
itemValue: findHandlerFor |
|
13388 | 977 |
) |
978 |
(MenuItem |
|
979 |
label: 'Find Dialog Opener...' |
|
980 |
itemValue: doGotoDialogOpener |
|
12437 | 981 |
) |
982 |
(MenuItem |
|
983 |
label: '-' |
|
984 |
) |
|
985 |
(MenuItem |
|
986 |
label: 'Remember Callchain && Highlight on Next Entry' |
|
987 |
itemValue: rememberCallchain |
|
988 |
) |
|
989 |
(MenuItem |
|
990 |
label: 'Clear Remembered Callchain' |
|
991 |
itemValue: clearRememberedCallchain |
|
992 |
) |
|
993 |
) |
|
994 |
nil |
|
995 |
nil |
|
996 |
) |
|
997 |
! |
|
998 |
||
999 |
fileMenuSpec |
|
1000 |
"This resource specification was automatically generated |
|
1001 |
by the MenuEditor of ST/X." |
|
1002 |
||
1003 |
"Do not manually edit this!! If it is corrupted, |
|
1004 |
the MenuEditor may not be able to read the specification." |
|
1005 |
||
1006 |
||
1007 |
" |
|
1008 |
MenuEditor new openOnClass:DebugView andSelector:#fileMenuSpec |
|
1009 |
(Menu new fromLiteralArrayEncoding:(DebugView fileMenuSpec)) startUp |
|
1010 |
" |
|
1011 |
||
1012 |
<resource: #menu> |
|
1013 |
||
1014 |
^ |
|
1015 |
#(Menu |
|
1016 |
( |
|
1017 |
(MenuItem |
|
1018 |
enabled: canSendEmail |
|
1019 |
label: 'Report a Bug via eMail...' |
|
1020 |
itemValue: doOpenReportMailApp |
|
1021 |
) |
|
1022 |
(MenuItem |
|
1023 |
label: '-' |
|
1024 |
) |
|
1025 |
(MenuItem |
|
1026 |
enabled: canCloseAllDebuggers |
|
1027 |
label: 'Close all Debuggers...' |
|
1028 |
itemValue: closeAllDebuggers |
|
1029 |
isVisible: isNotInspecting |
|
1030 |
) |
|
1031 |
(MenuItem |
|
1032 |
label: '-' |
|
1033 |
) |
|
1034 |
(MenuItem |
|
1035 |
label: 'Exit' |
|
1036 |
itemValue: closeRequest |
|
1037 |
isVisible: isInspecting |
|
1038 |
) |
|
1039 |
(MenuItem |
|
1040 |
label: 'Close Debugger and Abort' |
|
1041 |
itemValue: closeRequest |
|
1042 |
isVisible: isNotInspecting |
|
1043 |
) |
|
1044 |
) |
|
1045 |
nil |
|
1046 |
nil |
|
1047 |
) |
|
1048 |
! |
|
1049 |
||
1050 |
helpMenuSpec |
|
1051 |
"This resource specification was automatically generated |
|
1052 |
by the MenuEditor of ST/X." |
|
1053 |
||
1054 |
"Do not manually edit this!! If it is corrupted, |
|
1055 |
the MenuEditor may not be able to read the specification." |
|
1056 |
||
1057 |
||
1058 |
" |
|
1059 |
MenuEditor new openOnClass:DebugView andSelector:#helpMenuSpec |
|
1060 |
(Menu new fromLiteralArrayEncoding:(DebugView helpMenuSpec)) startUp |
|
1061 |
" |
|
1062 |
||
1063 |
<resource: #menu> |
|
1064 |
||
1065 |
^ |
|
1066 |
#(Menu |
|
1067 |
( |
|
1068 |
(MenuItem |
|
1069 |
label: 'Debugger''s Documentation' |
|
1070 |
itemValue: openHTMLDocument: |
|
1071 |
argument: 'tools/debugger/TOP.html' |
|
1072 |
) |
|
1073 |
(MenuItem |
|
1074 |
label: '-' |
|
1075 |
) |
|
1076 |
(MenuItem |
|
1077 |
label: 'About DebugView...' |
|
1078 |
itemValue: openAboutThisApplication |
|
1079 |
) |
|
1080 |
) |
|
1081 |
nil |
|
1082 |
nil |
|
1083 |
) |
|
1084 |
! |
|
1085 |
||
3269 | 1086 |
menuSpec |
1087 |
"This resource specification was automatically generated |
|
1088 |
by the MenuEditor of ST/X." |
|
1089 |
||
1090 |
"Do not manually edit this!! If it is corrupted, |
|
1091 |
the MenuEditor may not be able to read the specification." |
|
1092 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1093 |
|
3269 | 1094 |
" |
1095 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
1096 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
1097 |
" |
|
1098 |
||
1099 |
<resource: #menu> |
|
1100 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1101 |
^ |
5875 | 1102 |
#(Menu |
11210 | 1103 |
( |
1104 |
(MenuItem |
|
1105 |
label: 'File' |
|
12437 | 1106 |
submenuChannel: fileMenuSpec |
11210 | 1107 |
) |
1108 |
(MenuItem |
|
1109 |
label: 'View' |
|
12437 | 1110 |
submenuChannel: viewMenuSpec |
11210 | 1111 |
) |
1112 |
(MenuItem |
|
12534 | 1113 |
label: 'Process' |
1114 |
submenuChannel: processMenuSpec |
|
11210 | 1115 |
) |
1116 |
(MenuItem |
|
1117 |
label: 'Context' |
|
12437 | 1118 |
submenuChannel: contextMenuSpec |
11210 | 1119 |
) |
1120 |
(MenuItem |
|
12840 | 1121 |
label: 'Receiver' |
12437 | 1122 |
submenuChannel: classMenuSpec |
11210 | 1123 |
) |
1124 |
(MenuItem |
|
1125 |
label: 'Selector' |
|
12437 | 1126 |
submenuChannel: selectorMenuSpec |
11210 | 1127 |
) |
1128 |
(MenuItem |
|
1129 |
label: 'Breakpoint' |
|
12437 | 1130 |
submenuChannel: breakPointMenuSpec |
11210 | 1131 |
) |
1132 |
(MenuItem |
|
1133 |
label: 'Help' |
|
12437 | 1134 |
startGroup: conditionalRight |
1135 |
submenuChannel: helpMenuSpec |
|
1136 |
) |
|
1137 |
) |
|
1138 |
nil |
|
1139 |
nil |
|
1140 |
) |
|
1141 |
! |
|
1142 |
||
1143 |
processMenuSpec |
|
1144 |
"This resource specification was automatically generated |
|
1145 |
by the MenuEditor of ST/X." |
|
1146 |
||
1147 |
"Do not manually edit this!! If it is corrupted, |
|
1148 |
the MenuEditor may not be able to read the specification." |
|
1149 |
||
1150 |
||
1151 |
" |
|
1152 |
MenuEditor new openOnClass:DebugView andSelector:#processMenuSpec |
|
1153 |
(Menu new fromLiteralArrayEncoding:(DebugView processMenuSpec)) startUp |
|
1154 |
" |
|
1155 |
||
1156 |
<resource: #menu> |
|
1157 |
||
1158 |
^ |
|
1159 |
#(Menu |
|
1160 |
( |
|
1161 |
(MenuItem |
|
1162 |
label: 'Continue' |
|
1163 |
itemValue: doContinue |
|
1164 |
) |
|
1165 |
(MenuItem |
|
1166 |
label: 'Next (Line-Step)' |
|
1167 |
itemValue: doNext |
|
1168 |
) |
|
1169 |
(MenuItem |
|
1170 |
label: 'Step' |
|
1171 |
itemValue: doStep |
|
1172 |
) |
|
1173 |
(MenuItem |
|
1174 |
label: '-' |
|
1175 |
) |
|
1176 |
(MenuItem |
|
13351 | 1177 |
label: 'After 5 Seconds' |
1178 |
submenu: |
|
1179 |
(Menu |
|
1180 |
( |
|
1181 |
(MenuItem |
|
1182 |
label: 'Continue' |
|
1183 |
itemValue: doContinueAfterDelay |
|
1184 |
) |
|
1185 |
(MenuItem |
|
1186 |
label: 'Next (Line-Step)' |
|
1187 |
itemValue: doNextAfterDelay |
|
1188 |
) |
|
1189 |
(MenuItem |
|
1190 |
label: 'Step' |
|
1191 |
itemValue: doStepAfterDelay |
|
1192 |
) |
|
1193 |
) |
|
1194 |
nil |
|
1195 |
nil |
|
1196 |
) |
|
1197 |
) |
|
1198 |
(MenuItem |
|
1199 |
label: '-' |
|
1200 |
) |
|
1201 |
(MenuItem |
|
12840 | 1202 |
label: 'Skip to Cursor Line' |
1203 |
itemValue: skip |
|
12437 | 1204 |
) |
1205 |
(MenuItem |
|
12840 | 1206 |
label: 'Step Out (Skip until Return)' |
1207 |
itemValue: skipForReturn |
|
1208 |
) |
|
1209 |
(MenuItem |
|
1210 |
label: 'Skip until Entering...' |
|
1211 |
itemValue: skipUntilEntering |
|
12671 | 1212 |
) |
1213 |
(MenuItem |
|
12437 | 1214 |
label: '-' |
1215 |
) |
|
1216 |
(MenuItem |
|
1217 |
label: 'Abort' |
|
1218 |
itemValue: doAbort |
|
1219 |
) |
|
1220 |
(MenuItem |
|
1221 |
enabled: abortAllIsHandled |
|
1222 |
label: 'Abort All' |
|
1223 |
itemValue: doAbortAll |
|
1224 |
) |
|
1225 |
(MenuItem |
|
1226 |
label: '-' |
|
1227 |
) |
|
1228 |
(MenuItem |
|
12840 | 1229 |
label: 'Inspect' |
1230 |
itemValue: doInspectProcess |
|
1231 |
) |
|
1232 |
(MenuItem |
|
1233 |
label: 'Change Priority...' |
|
1234 |
itemValue: doChangeProcessPriority |
|
1235 |
) |
|
1236 |
(MenuItem |
|
1237 |
label: '-' |
|
1238 |
) |
|
1239 |
(MenuItem |
|
12437 | 1240 |
label: 'Terminate' |
1241 |
itemValue: doTerminate |
|
1242 |
) |
|
12840 | 1243 |
(MenuItem |
1244 |
label: 'Hard Terminate (Danger)' |
|
1245 |
itemValue: quickTerminate |
|
1246 |
isVisible: false |
|
1247 |
) |
|
12437 | 1248 |
) |
1249 |
nil |
|
1250 |
nil |
|
1251 |
) |
|
1252 |
! |
|
1253 |
||
1254 |
selectorMenuSpec |
|
1255 |
"This resource specification was automatically generated |
|
1256 |
by the MenuEditor of ST/X." |
|
1257 |
||
1258 |
"Do not manually edit this!! If it is corrupted, |
|
1259 |
the MenuEditor may not be able to read the specification." |
|
1260 |
||
1261 |
||
1262 |
" |
|
1263 |
MenuEditor new openOnClass:DebugView andSelector:#selectorMenuSpec |
|
1264 |
(Menu new fromLiteralArrayEncoding:(DebugView selectorMenuSpec)) startUp |
|
1265 |
" |
|
1266 |
||
1267 |
<resource: #menu> |
|
1268 |
||
1269 |
^ |
|
1270 |
#(Menu |
|
1271 |
( |
|
1272 |
(MenuItem |
|
1273 |
label: 'Browse Implementors...' |
|
1274 |
itemValue: browseImplementorsOf |
|
1275 |
) |
|
1276 |
(MenuItem |
|
1277 |
label: 'Browse Senders...' |
|
1278 |
itemValue: browseSendersOf |
|
1279 |
) |
|
1280 |
(MenuItem |
|
1281 |
label: '-' |
|
1282 |
) |
|
1283 |
(MenuItem |
|
1284 |
enabled: canDefineMethod |
|
1285 |
label: 'Define Missing Method' |
|
1286 |
itemValue: doDefineMethod |
|
1287 |
) |
|
1288 |
) |
|
1289 |
nil |
|
1290 |
nil |
|
1291 |
) |
|
1292 |
! |
|
1293 |
||
1294 |
viewMenuSpec |
|
1295 |
"This resource specification was automatically generated |
|
1296 |
by the MenuEditor of ST/X." |
|
1297 |
||
1298 |
"Do not manually edit this!! If it is corrupted, |
|
1299 |
the MenuEditor may not be able to read the specification." |
|
1300 |
||
1301 |
||
1302 |
" |
|
1303 |
MenuEditor new openOnClass:DebugView andSelector:#viewMenuSpec |
|
1304 |
(Menu new fromLiteralArrayEncoding:(DebugView viewMenuSpec)) startUp |
|
1305 |
" |
|
1306 |
||
1307 |
<resource: #menu> |
|
1308 |
||
1309 |
^ |
|
1310 |
#(Menu |
|
1311 |
( |
|
1312 |
(MenuItem |
|
1313 |
enabled: canShowMore |
|
1314 |
label: 'Show More WalkBack' |
|
1315 |
itemValue: showMoreWalkback |
|
1316 |
) |
|
1317 |
(MenuItem |
|
1318 |
enabled: canShowMore |
|
1319 |
label: 'Show Full WalkBack' |
|
1320 |
itemValue: showFullWalkback |
|
1321 |
) |
|
1322 |
(MenuItem |
|
1323 |
label: '-' |
|
1324 |
) |
|
1325 |
(MenuItem |
|
1326 |
label: 'Show Dense WalkBack' |
|
1327 |
itemValue: showingDenseWalkback: |
|
1328 |
hideMenuOnActivated: false |
|
1329 |
indication: showingDenseWalkback |
|
1330 |
) |
|
1331 |
(MenuItem |
|
1332 |
label: 'Show Support Code (Implementation of Enumerations, Exceptions etc.)' |
|
1333 |
itemValue: showingSupportCode: |
|
1334 |
hideMenuOnActivated: false |
|
1335 |
indication: showingSupportCode |
|
1336 |
) |
|
1337 |
(MenuItem |
|
1338 |
label: '-' |
|
1339 |
) |
|
1340 |
(MenuItem |
|
1341 |
label: 'Raise Debugger when Entering' |
|
1342 |
itemValue: autoRaiseView: |
|
1343 |
hideMenuOnActivated: false |
|
1344 |
indication: autoRaiseView |
|
1345 |
) |
|
1346 |
(MenuItem |
|
1347 |
label: '-' |
|
1348 |
) |
|
1349 |
(MenuItem |
|
1350 |
label: 'Settings...' |
|
1351 |
itemValue: openSettingsDialog |
|
11210 | 1352 |
) |
1353 |
) |
|
1354 |
nil |
|
1355 |
nil |
|
3269 | 1356 |
) |
1357 |
! ! |
|
1358 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1359 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1360 |
|
4121 | 1361 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1362 |
"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
|
1363 |
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
|
1364 |
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
|
1365 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1366 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1367 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1368 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1369 |
|
12839 | 1370 |
"/ fetch some contexts... |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1371 |
someContexts := Array new:25. |
2042 | 1372 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1373 |
idx := 1. |
10205 | 1374 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
11210 | 1375 |
someContexts at:idx put:con. |
1376 |
con := con sender. |
|
1377 |
idx := idx + 1. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1378 |
]. |
12839 | 1379 |
"/ search... |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1380 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1381 |
^ someContexts at:idx. |
13398 | 1382 |
|
1383 |
"Modified: / 28-08-2013 / 20:12:47 / cg" |
|
3447 | 1384 |
! |
1385 |
||
10205 | 1386 |
interestingContextIndexIn:aContextArray |
12039 | 1387 |
"return an interesting context's index, or nil. |
1388 |
This is the context initially shown (selected) in the walkback. |
|
3447 | 1389 |
We move up the calling chain, skipping all intermediate Signal |
12039 | 1390 |
and Exception contexts, to present the context in which the error actually occured. |
13398 | 1391 |
Just for your (my) convenience :-)" |
3447 | 1392 |
|
13309 | 1393 |
|con found offset sel prev rcvr nMax idx methodHome method| |
3447 | 1394 |
|
13398 | 1395 |
"/ Transcript showCR:'x'. |
7713 | 1396 |
"/ Transcript showCR:aContextArray. |
7648 | 1397 |
|
3447 | 1398 |
nMax := aContextArray size. |
1399 |
nMax <= 1 ifTrue:[^ 1]. |
|
1400 |
con := aContextArray at:1. |
|
1401 |
con isBlockContext ifTrue:[^ 1]. |
|
12039 | 1402 |
(con method notNil and:[ con method isWrapped ]) ifTrue:[^ 1]. "/ we are already there |
3447 | 1403 |
|
1404 |
"/ somewhere, at the bottom, there must be a raise ... |
|
1405 |
"/ find the exception |
|
1406 |
1 to:5 do:[:i | |
|
12839 | 1407 |
found isNil ifTrue:[ |
1408 |
con := aContextArray at:i ifAbsent:nil. |
|
1409 |
con notNil ifTrue:[ |
|
1410 |
sel := con selector ? ''. |
|
1411 |
((sel startsWith:'raise') |
|
1412 |
and:[ ((rcvr := con receiver) isLazyValue not) |
|
1413 |
and:[ rcvr isExceptionCreator]]) ifTrue:[ |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1414 |
offset := i. |
12839 | 1415 |
found := con. |
1416 |
||
1417 |
"/ if this is a noHandler exception, |
|
1418 |
"/ skip forward to the erronous context |
|
1419 |
(rcvr isException) ifTrue:[ |
|
1420 |
rcvr creator == Signal noHandlerSignal ifTrue:[ |
|
1421 |
found := rcvr suspendedContext. |
|
1422 |
offset := aContextArray identityIndexOf:found. |
|
1423 |
] |
|
1424 |
]. |
|
1425 |
]. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1426 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1427 |
]. |
3447 | 1428 |
]. |
12039 | 1429 |
"/ Transcript showCR:con. |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1430 |
"/ Transcript show:'1 '; showCR:found. |
12839 | 1431 |
|
3447 | 1432 |
found isNil ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1433 |
"/ this is a kludge, but convenient. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1434 |
"/ show the place where the error (divisionByZero...) happend, |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1435 |
"/ not where the signal was raised. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1436 |
con := (aContextArray at:1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1437 |
sel := con methodHome selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1438 |
|
13398 | 1439 |
"/ Transcript show:'2 '; showCR:con. |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1440 |
"/ typically a DivisionByZero - show caller of division |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1441 |
(sel == #// |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1442 |
or:[sel == #/ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1443 |
or:[sel == #\\]]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1444 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1445 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1446 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1447 |
"/ show the place of the bad message; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1448 |
(sel == #doesNotUnderstand:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1449 |
idx := 3. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1450 |
nMax > 2 ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1451 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1452 |
sel == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1453 |
idx := 4 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1454 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1455 |
nMax > idx ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1456 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1457 |
"/ show the place of the perfor-send; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1458 |
((sel == #perform:) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1459 |
or:[sel startsWith:'perform:with']) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1460 |
idx := idx + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1461 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1462 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1463 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1464 |
^ idx min:nMax |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1465 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1466 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1467 |
"/ show the bad method; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1468 |
(sel == #noByteCode) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1469 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1470 |
]. |
3447 | 1471 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1472 |
"/ "/ show the place of the halt; not where the HaltSignal was raised... |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1473 |
"/ ((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1474 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1475 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1476 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1477 |
"/ "/ show the place of the shouldImplement; not where the Signal was raised... |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1478 |
"/ (sel == #shouldImplement) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1479 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1480 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1481 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1482 |
"/ "/ show the place of error-call; not where the ErrorSignal was raised... |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1483 |
"/ ((sel == #error:mayProceed:) |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1484 |
"/ or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1485 |
"/ nMax > 2 ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1486 |
"/ sel := (aContextArray at:2) selector. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1487 |
"/ sel == #mustBeBoolean ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1488 |
"/ ^ 3 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1489 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1490 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1491 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1492 |
"/ ]. |
7862 | 1493 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1494 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1495 |
(sel == #signalInterrupt:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1496 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1497 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1498 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1499 |
"/ "/ show the place of error-call; not where the ErrorSignal was raised... |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1500 |
"/ ((sel == #error) or:[sel == #error:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1501 |
"/ con method mclass == Object ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1502 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1503 |
"/ ] |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1504 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1505 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1506 |
"/ "/ show the place of the send; not where the Signal was raised... |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1507 |
"/ (sel == #subclassResponsibility) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1508 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1509 |
"/ ]. |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
1510 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1511 |
"/ show the place of the bad index; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1512 |
( #(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1513 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1514 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1515 |
#elementBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1516 |
"/ #subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1517 |
) includes:sel) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1518 |
idx := 2. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1519 |
[ idx <= 3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1520 |
and:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1521 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1522 |
#(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1523 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1524 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1525 |
#elementBoundsError: ) includes:sel |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1526 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1527 |
] whileTrue:[ idx := idx + 1 ]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1528 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1529 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1530 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1531 |
sel := (aContextArray at:idx+1) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1532 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1533 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1534 |
sel := (aContextArray at:idx+2) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1535 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1536 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1537 |
^ idx+3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1538 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1539 |
^ idx+2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1540 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1541 |
^ idx+1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1542 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1543 |
^ idx |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1544 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1545 |
offset := 1. |
8152 | 1546 |
]. |
1547 |
||
1548 |
"/ the above is all too hard-coded; |
|
1549 |
"/ ask the method, if it thinks it should be skipped in the walkback. |
|
1550 |
"/ as more methods get flagged, remove code from above. |
|
1551 |
con := aContextArray at:offset ifAbsent:nil. |
|
13398 | 1552 |
"/ Transcript show:'2 '; showCR:con. |
10205 | 1553 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1554 |
con notNil |
13309 | 1555 |
and:[ (methodHome := con methodHome) notNil |
1556 |
and:[ (method := methodHome method) notNil |
|
1557 |
and:[ method shouldBeSkippedInDebuggersWalkBack ]]] |
|
8152 | 1558 |
] whileTrue:[ |
1559 |
"/ Transcript showCR:con methodHome method. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1560 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1561 |
con := aContextArray at:offset ifAbsent:nil. |
8152 | 1562 |
]. |
13309 | 1563 |
methodHome := nil. "/ help GC |
3447 | 1564 |
|
1565 |
" |
|
1566 |
got it; move up, skipping all intermediate Signal and |
|
1567 |
Exception contexts |
|
1568 |
" |
|
1569 |
prev := nil. |
|
1570 |
rcvr := con receiver. |
|
10205 | 1571 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1572 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 1573 |
] whileTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1574 |
prev := con. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1575 |
nMax > offset ifFalse:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1576 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1577 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1578 |
con := aContextArray at:offset. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1579 |
rcvr := con receiver. |
3447 | 1580 |
]. |
1581 |
||
1582 |
" |
|
1583 |
now, we are one above the raising context |
|
1584 |
" |
|
13398 | 1585 |
"/ Transcript show:'3 '; showCR:con. |
1586 |
||
1587 |
(con selector == #retry:coercing:) ifTrue:[ |
|
1588 |
"/ show the operation which failed to coerce, not the coerce |
|
1589 |
^ offset + 1 |
|
1590 |
]. |
|
3447 | 1591 |
|
1592 |
" |
|
13398 | 1593 |
if the sender-method of the raise is one of object's error methods ... |
3447 | 1594 |
" |
10205 | 1595 |
( #( halt halt: |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1596 |
error error: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1597 |
doesNotUnderstand: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1598 |
subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1599 |
primitiveFailed) includes:con selector) |
3447 | 1600 |
ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1601 |
con selector == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1602 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1603 |
one more up, to get to the originating context |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1604 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1605 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1606 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1607 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1608 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1609 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1610 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1611 |
offset := offset + 1. |
3447 | 1612 |
] ifFalse:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1613 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1614 |
ok, got the raise - if its a BreakPoint, look for the sender |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1615 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1616 |
(prev notNil and:[prev receiver == BreakPointInterrupt]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1617 |
offset := offset + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1618 |
]. |
3447 | 1619 |
]. |
1620 |
||
1621 |
^ offset |
|
1622 |
||
7713 | 1623 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
13398 | 1624 |
"Modified: / 28-08-2013 / 20:23:35 / cg" |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1625 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1626 |
|
73 | 1627 |
!DebugView methodsFor:'basic'! |
1628 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1629 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1630 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1631 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1632 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1633 |
m notNil ifTrue:[ |
11210 | 1634 |
self updateMenuItems. |
1635 |
||
1636 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
|
1637 |
abortButton enable. |
|
1638 |
m enable:#doAbort. |
|
1639 |
] ifFalse:[ |
|
1640 |
abortButton disable. |
|
1641 |
m disable:#doAbort. |
|
1642 |
]. |
|
1643 |
exclusive ifTrue:[ |
|
1644 |
terminateButton disable. |
|
1645 |
m disable:#doTerminate. |
|
1646 |
] ifFalse:[ |
|
1647 |
terminateButton enable. |
|
1648 |
m enable:#doTerminate. |
|
1649 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1650 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1651 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1652 |
mayProceed == false ifTrue:[ |
11210 | 1653 |
continueButton disable. |
1654 |
m notNil ifTrue:[m disable:#doContinue]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1655 |
] ifFalse:[ |
11210 | 1656 |
continueButton enable. |
1657 |
m notNil ifTrue:[m enable:#doContinue] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1658 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1659 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1660 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1661 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1662 |
|
1364 | 1663 |
enter:aContext select:initialSelectionOrNil |
73 | 1664 |
"enter the debugger - get and display the context, then start an |
1665 |
exclusive event loop on top of eveything else" |
|
1666 |
||
3447 | 1667 |
<context: #return> |
1668 |
||
9076 | 1669 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
3447 | 1670 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1671 |
DebuggingDebugger == true ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1672 |
'==> enter2: (' print. aContext print. |
11210 | 1673 |
') select: ' print. initialSelectionOrNil printCR. |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1674 |
]. |
3447 | 1675 |
thisContext isRecursive ifTrue:[ |
11210 | 1676 |
"/ care for the special case, were the Debugger was autoloaded. |
1677 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1678 |
"/ condition. |
|
1679 |
foundNoByteCodeContext := false. |
|
1680 |
foundExitContext := false. |
|
1681 |
||
1682 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1683 |
[ |
|
1684 |
foundNoByteCodeContext not |
|
1685 |
and:[ foundExitContext not |
|
1686 |
and:[c notNil |
|
1687 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
|
1688 |
]]]] |
|
1689 |
whileTrue:[ |
|
1690 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1691 |
foundExitContext := true |
|
1692 |
]. |
|
1693 |
c selector == #noByteCode ifTrue:[ |
|
1694 |
foundNoByteCodeContext := true |
|
1695 |
]. |
|
1696 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1697 |
]. |
|
1698 |
||
1699 |
(foundNoByteCodeContext not |
|
1700 |
and:[ foundExitContext not]) ifFalse:[ |
|
1701 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1702 |
||
1703 |
^ MiniDebugger |
|
1704 |
enter:aContext |
|
1705 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1706 |
mayProceed:mayProceed. |
|
1707 |
]. |
|
1708 |
foundExitContext ifTrue:[ |
|
1709 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1710 |
^ self. |
|
1711 |
]. |
|
3447 | 1712 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1713 |
|
10203 | 1714 |
"/'entering: ' print. aContext printCR. |
1715 |
"/'initial: ' print. initialSelectionOrNil printCR. |
|
8170 | 1716 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1717 |
||
11890 | 1718 |
(self isHaltToBeIgnored) ifTrue:[ |
11210 | 1719 |
^ self. |
8170 | 1720 |
]. |
11892 | 1721 |
"/ "/ does not work yet - but we should ignore any breakpoints while stepping |
1722 |
"/ (stepping and:[steppedContext notNil]) ifTrue:[ |
|
1723 |
"/ self isEnteredDueToBreakpointOrHalt ifTrue:[ |
|
1724 |
"/ 'DebugView [info]: ignored other interrupt while stepping' infoPrintCR. |
|
1725 |
"/ ^ self |
|
1726 |
"/ ]. |
|
1727 |
"/ ]. |
|
8170 | 1728 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1729 |
iAmNew := drawableId isNil. |
73 | 1730 |
|
8148 | 1731 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 1732 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1733 |
busy := cachable := true. |
73 | 1734 |
inspecting := false. |
1735 |
inspectedProcess := Processor activeProcess. |
|
1736 |
stepping := false. |
|
1737 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1738 |
stepHow := nil. |
8148 | 1739 |
nChainShown := InitialNChainShown. |
73 | 1740 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1741 |
"/ if debugger is entered while a box has grabbed the |
9076 | 1742 |
"/ pointer, we must ungrab - otherwise X won't talk to us here. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1743 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1744 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1745 |
"/ 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
|
1746 |
"/ 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
|
1747 |
"/ 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
|
1748 |
Screen allScreens do:[:aScreen | |
11210 | 1749 |
aScreen ungrabPointer. |
1750 |
aScreen ungrabKeyboard. |
|
10205 | 1751 |
]. |
1752 |
||
1753 |
("inspectedProcess suspendedContext isNil |
|
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1754 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
11210 | 1755 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1756 |
] ifFalse:[ |
11210 | 1757 |
terminateButton enable. |
1758 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1759 |
]. |
73 | 1760 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1761 |
iAmNew ifFalse:[ |
11210 | 1762 |
"/ not the first time - disable buttons & menus |
1763 |
"/ from the previous life |
|
1764 |
self turnOffAllButtons. |
|
1765 |
||
1766 |
m := contextView middleButtonMenu. |
|
1767 |
m notNil ifTrue:[ |
|
1768 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
|
1769 |
]. |
|
11697 | 1770 |
self showingDenseWalkback:(verboseBacktrace not). |
132 | 1771 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1772 |
self iconLabel:'Debugger'. |
132 | 1773 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1774 |
windowGroup isNil ifTrue:[ |
11210 | 1775 |
self windowGroup: WindowGroup new. |
1776 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1777 |
]. |
132 | 1778 |
exclusive ifFalse:[ |
11210 | 1779 |
"/ create a (modal) windowGroup for myself |
1780 |
||
1781 |
windowGroup setModal:true. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1782 |
] ifTrue:[ |
11210 | 1783 |
"/ create a windowGroup with a synchronous sensor for me |
1784 |
||
1785 |
windowGroup beSynchronous. |
|
73 | 1786 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1787 |
windowGroup setProcess:Processor activeProcess. |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1788 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1789 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1790 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1791 |
" |
12039 | 1792 |
"/Transcript show:'0 '; showCR:aContext. |
1793 |
"/Transcript show:'0 '; showCR:thisContext sender. |
|
1794 |
"/Transcript show:'0 '; showCR:thisContext sender sender. |
|
1795 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender. |
|
1796 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender. |
|
1797 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender. |
|
1798 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender. |
|
1799 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender. |
|
1800 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender . |
|
1801 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender. |
|
1802 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender. |
|
1803 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender sender. |
|
1804 |
"/Transcript showCR:initialSelectionOrNil. |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1805 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1806 |
"/'after setContext; first is ' print. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1807 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1808 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1809 |
|
12039 | 1810 |
IsDebuggingQuery answer:true do:[ |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1811 |
self updateButtonsAndMenuItemsForContext:aContext. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1812 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1813 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1814 |
If this is a new debugger, do a realize. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1815 |
Otherwise, its probably better to do a map, which shows the |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1816 |
view at the previous position, without a need for the user to set the |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1817 |
position again |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1818 |
" |
12809 | 1819 |
iAmNew ifTrue:[ |
1820 |
self realize. |
|
1821 |
] ifFalse:[ |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1822 |
self remap. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1823 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1824 |
self setForegroundWindow. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1825 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1826 |
exclusive ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1827 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1828 |
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
|
1829 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1830 |
This is a modal debugger - all event processing is stopped.. |
10205 | 1831 |
Therefore, you cannot interact with other views or |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1832 |
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
|
1833 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1834 |
Also, there is no event processing (redraw) for other views.' |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1835 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1836 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1837 |
self autoRaiseView ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1838 |
"/ self raise. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1839 |
self raiseDeiconified. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1840 |
self topView activate; setForegroundWindow; activate. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1841 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1842 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1843 |
canContinue := true. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1844 |
exitAction := nil. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1845 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1846 |
"/ enter private event handling loop. This is left (and we come back here again) |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1847 |
"/ when any button was pressed which requires continuation of the debuggee or |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1848 |
"/ closedown of the debugger. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1849 |
[self controlLoop] ifCurtailed:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1850 |
windowGroup notNil ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1851 |
windowGroup setProcess:nil. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1852 |
]. |
13111 | 1853 |
NumberOfDebuggers := NumberOfDebuggers - 1. |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1854 |
self destroy |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1855 |
]. |
13111 | 1856 |
NumberOfDebuggers := NumberOfDebuggers - 1. |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1857 |
]. |
10203 | 1858 |
"/ here after my own control loop is finished. |
1859 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1860 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1861 |
"/ 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
|
1862 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1863 |
contextView contents:nil. |
1864 |
||
73 | 1865 |
codeView acceptAction:nil. |
942 | 1866 |
codeView doItAction:nil. |
73 | 1867 |
|
4892 | 1868 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
11210 | 1869 |
ObjectMemory stepInterruptHandler:nil. |
4892 | 1870 |
]. |
1871 |
||
11911 | 1872 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
1873 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
|
1874 |
||
73 | 1875 |
(exitAction ~~ #step) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1876 |
"/ not stepping or continue - close window |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1877 |
self cacheMyself. |
11210 | 1878 |
receiverInspector release. |
1879 |
contextInspector release. |
|
1880 |
||
1881 |
self unmap. |
|
1882 |
device flush. |
|
1883 |
||
1884 |
(exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
|
1885 |
(exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
|
1886 |
(exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
|
1887 |
(exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
|
13360 | 1888 |
(exitAction == #resend) ifTrue:[ self exit_resend. "does not return" ]. |
11210 | 1889 |
(exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
1890 |
(exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
|
1891 |
exitAction isBlock ifTrue:[ |
|
1892 |
self exit_unwindThenDo:exitAction. |
|
1893 |
"does not return" |
|
1894 |
]. |
|
1895 |
"not reached" |
|
1896 |
^ self |
|
73 | 1897 |
]. |
1898 |
||
3447 | 1899 |
"/ stepping - window stays open |
940 | 1900 |
selectedContext := actualContext := firstContext := nil. |
73 | 1901 |
|
2472 | 1902 |
"/ restore the previous pointer grab |
73 | 1903 |
grabber notNil ifTrue:[ |
11210 | 1904 |
device grabPointerInView:grabber. |
1905 |
grabber := nil. |
|
61 | 1906 |
]. |
73 | 1907 |
|
1908 |
(exitAction == #step) ifTrue:[ |
|
11210 | 1909 |
" |
1910 |
schedule another stepInterrupt |
|
1911 |
- must enter myself into the collection of open debuggers, |
|
1912 |
in case the stepping process comes back again via a halt or signal |
|
1913 |
before the step is finished. In this case, the stepping debugger should |
|
1914 |
come up (instead of a new one) |
|
1915 |
- must flush caches since optimized methods not always |
|
1916 |
look for pending interrupts |
|
1917 |
" |
|
1918 |
||
1919 |
"/ |
|
1920 |
"/ also must care for stepping into a return |
|
1921 |
"/ |
|
1922 |
steppedContext notNil ifTrue:[ |
|
1923 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
|
1924 |
]. |
|
1925 |
||
1926 |
OpenDebuggers isNil ifTrue:[ |
|
1927 |
OpenDebuggers := WeakIdentitySet new. |
|
1928 |
]. |
|
1929 |
OpenDebuggers add:self. |
|
1930 |
||
1931 |
self label:'single stepping - please wait ...'. |
|
1932 |
stepping := true. |
|
1933 |
||
1934 |
ObjectMemory stepInterruptHandler:self. |
|
1935 |
Processor activeProcess stepInterruptHandler:self. |
|
1936 |
ObjectMemory flushCaches. |
|
1937 |
||
1938 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
|
1939 |
Context singleStepInterruptRequest |
|
1940 |
raiseWith: |
|
1941 |
(("bigStep" steppedContextLineno notNil) |
|
1942 |
ifTrue:[#next] |
|
1943 |
ifFalse:[#step]) |
|
1944 |
] ifFalse:[ |
|
1945 |
"/ see if we came here through an interrupt-action |
|
1946 |
"/ (i.e. aProcess interruptWith:...) |
|
1947 |
||
1948 |
enteredByInterrupt := false. |
|
1949 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1950 |
[enteredByInterrupt not |
|
1951 |
and:[con notNil |
|
1952 |
and:[con ~~ aContext]]] whileTrue:[ |
|
1953 |
((sel := con selector) == #timerInterrupt |
|
1954 |
or:[sel == #ioInterrupt]) ifTrue:[ |
|
1955 |
enteredByInterrupt := true. |
|
1956 |
] ifFalse:[ |
|
1957 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1958 |
]. |
|
1959 |
]. |
|
1960 |
||
1961 |
ObjectMemory flushInlineCaches. |
|
1962 |
||
1963 |
DebuggingDebugger == true ifTrue:[ |
|
1964 |
enteredByInterrupt printCR. |
|
1965 |
]. |
|
1966 |
enteredByInterrupt ifTrue:[ |
|
11890 | 1967 |
"/ don't want to step through all intermediate |
11210 | 1968 |
"/ (scheduler-) contexts; place a return-trap on the |
1969 |
"/ one right below the interesting one |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1970 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1971 |
"/ 'special unwind return' printCR. |
11210 | 1972 |
con unwindThenDo:[ |
1973 |
Processor activeProcess stepInterruptHandler:self. |
|
1974 |
ObjectMemory stepInterruptHandler:self. |
|
1975 |
InStepInterrupt := nil. |
|
1976 |
StepInterruptPending := 1. |
|
1977 |
InterruptPending := 1]. |
|
1978 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1979 |
"/ 'normal step return' printCR. |
11210 | 1980 |
skipLineNr ~~ #return ifTrue:[ |
1981 |
StepInterruptPending := 1. |
|
1982 |
InterruptPending := 1. |
|
1983 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1984 |
"/ 'step for return' printCR. |
11210 | 1985 |
] |
1986 |
]. |
|
1987 |
InStepInterrupt := nil |
|
1988 |
] |
|
73 | 1989 |
] ifFalse:[ |
11210 | 1990 |
OpenDebuggers notNil ifTrue:[ |
1991 |
OpenDebuggers remove:self ifAbsent:[]. |
|
1992 |
]. |
|
1993 |
self cacheMyself. |
|
73 | 1994 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1995 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1996 |
"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
|
1997 |
"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
|
1998 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
11697 | 1999 |
"Modified: / 27-07-2012 / 17:35:56 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2000 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2001 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2002 |
exit_abort |
5455 | 2003 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
2004 |
"/ that one would run on top of this context. |
|
2005 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
2006 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
2007 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 2008 |
"/ done in the #enter:select method. |
5455 | 2009 |
"/ You are not expected to understand this. |
2010 |
||
6487 | 2011 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
2012 |
! |
|
2013 |
||
2014 |
exit_abortAll |
|
2015 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
2016 |
"/ that one would run on top of this context. |
|
2017 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
2018 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
2019 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 2020 |
"/ done in the #enter:select method. |
6487 | 2021 |
"/ You are not expected to understand this. |
2022 |
||
2023 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2024 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2025 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2026 |
exit_quickTerminate |
3447 | 2027 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2028 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2029 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2030 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 2031 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2032 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2033 |
|
13360 | 2034 |
exit_resend |
2035 |
|con| |
|
2036 |
||
2037 |
selectedContext notNil ifTrue:[ |
|
2038 |
con := selectedContext. |
|
2039 |
self cacheMyself. |
|
2040 |
" |
|
2041 |
have to catch errors occuring in unwind-blocks |
|
2042 |
" |
|
2043 |
Error handle:[:ex | |
|
2044 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
2045 |
ex description infoPrintCR. |
|
2046 |
ex proceed |
|
2047 |
] do:[ |
|
13411 | 2048 |
^ con unwindThenResend. |
13360 | 2049 |
]. |
2050 |
'DebugView [warning]: cannot resend selected context''s message' errorPrintCR |
|
2051 |
] |
|
2052 |
! |
|
2053 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2054 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2055 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2056 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2057 |
selectedContext notNil ifTrue:[ |
11210 | 2058 |
con := selectedContext. |
2059 |
self cacheMyself. |
|
2060 |
" |
|
2061 |
have to catch errors occuring in unwind-blocks |
|
2062 |
" |
|
2063 |
Error handle:[:ex | |
|
2064 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
2065 |
ex description infoPrintCR. |
|
2066 |
ex proceed |
|
2067 |
] do:[ |
|
2068 |
con unwindAndRestart. |
|
2069 |
]. |
|
2070 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2071 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2072 |
|
11818 | 2073 |
"Created: / 16-11-2001 / 17:23:17 / cg" |
11819 | 2074 |
"Modified: / 26-09-2012 / 15:09:52 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2075 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2076 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2077 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2078 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2079 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2080 |
selectedContext notNil ifTrue:[ |
11210 | 2081 |
" |
2082 |
if there is a selection in the codeView, |
|
2083 |
evaluate it and use the result as return value |
|
2084 |
" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2085 |
"/ 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
|
2086 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2087 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2088 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2089 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2090 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2091 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2092 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2093 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2094 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2095 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2096 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2097 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2098 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2099 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2100 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2101 |
|
11210 | 2102 |
con := selectedContext. |
2103 |
self cacheMyself. |
|
2104 |
" |
|
2105 |
have to catch errors occuring in unwind-blocks |
|
2106 |
" |
|
2107 |
Error handle:[:ex | |
|
2108 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
2109 |
ex description infoPrintCR. |
|
2110 |
ex proceed |
|
2111 |
] do:[ |
|
2112 |
con unwind:retVal. |
|
2113 |
]. |
|
2114 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2115 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2116 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2117 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 2118 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2119 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2120 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2121 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2122 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2123 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2124 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2125 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2126 |
Error handle:[:ex | |
11210 | 2127 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
2128 |
ex description infoPrintCR. |
|
2129 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2130 |
] do:[ |
11210 | 2131 |
self cacheMyself. |
2132 |
Processor activeProcess terminate. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2133 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2134 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2135 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2136 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 2137 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
2138 |
! |
|
2139 |
||
6487 | 2140 |
exit_unwindThenDo:aBlock |
2141 |
|con| |
|
2142 |
||
2143 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
2144 |
"/ that one would run on top of this context. |
|
2145 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
2146 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
2147 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 2148 |
"/ done in the #enter:select method. |
6487 | 2149 |
"/ You are not expected to understand this. |
2150 |
||
2151 |
" |
|
2152 |
have to catch errors occuring in unwind-blocks |
|
2153 |
" |
|
2154 |
self cacheMyself. |
|
12743 | 2155 |
con := thisContext sender. |
6487 | 2156 |
|
2157 |
Error handle:[:ex | |
|
11210 | 2158 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
2159 |
ex description infoPrintCR. |
|
2160 |
ex proceed |
|
6487 | 2161 |
] do:[ |
11210 | 2162 |
"/ find the enter:select context. |
12743 | 2163 |
[(con selector ~~ #enter:select:) or:[con receiver ~~ self]] whileTrue:[ |
2164 |
con := con sender |
|
2165 |
]. |
|
11210 | 2166 |
|
2167 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
2168 |
con sender receiver == self class ifTrue:[ |
|
2169 |
con := con sender. |
|
2170 |
con sender receiver == self class ifTrue:[ |
|
12743 | 2171 |
con := con sender methodHome. |
11210 | 2172 |
]. |
2173 |
]. |
|
2174 |
||
2175 |
con unwindThenDo:aBlock. |
|
6487 | 2176 |
]. |
2177 |
'DebugView [warning]: abort failed' errorPrintCR |
|
2178 |
||
2179 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
2180 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
2181 |
! |
|
2182 |
||
3447 | 2183 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
2184 |
|selection con1 con2 h| |
|
2185 |
||
2186 |
initialSelectionOrNil notNil ifTrue:[ |
|
11210 | 2187 |
^ initialSelectionOrNil |
3447 | 2188 |
]. |
2189 |
||
2190 |
" |
|
2191 |
and find the one context to show initially |
|
2192 |
- if we came here by a send (single step), its the top context; |
|
2193 |
- if we came here by a step (i.e. bigStep), its the top context |
|
2194 |
(for ifs and whiles) or the sender (for regular sends). |
|
2195 |
- otherwise, we came here by some signal raise, and we are interested |
|
2196 |
in the context where the raise actually occured. |
|
2197 |
" |
|
2198 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
2199 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
12039 | 2200 |
"/ Transcript show:'x '; showCR:exitAction. |
2201 |
||
2202 |
"/ came here via a step? |
|
3447 | 2203 |
exitAction == #step ifTrue:[ |
11210 | 2204 |
selection := 1. |
2205 |
steppedContext notNil ifTrue:[ |
|
2206 |
||
2207 |
" |
|
2208 |
if we came here by a big-step, show the method where we are |
|
2209 |
" |
|
2210 |
con1 == steppedContext ifTrue:[ |
|
2211 |
selection := 1 |
|
2212 |
] ifFalse:[ |
|
2213 |
con2 == steppedContext ifTrue:[ |
|
2214 |
selection := 2 |
|
2215 |
] |
|
2216 |
]. |
|
2217 |
" |
|
2218 |
for bigStep, we could also be in a block below the actual method ... |
|
2219 |
" |
|
2220 |
((h := con1 home) notNil |
|
2221 |
and:[h == steppedContext]) ifTrue:[ |
|
2222 |
selection := 1 |
|
2223 |
] ifFalse:[ |
|
2224 |
(con2 notNil |
|
2225 |
and:[(h := con2 home) notNil |
|
2226 |
and:[h == steppedContext]]) ifTrue:[ |
|
2227 |
selection := 2 |
|
2228 |
] |
|
2229 |
]. |
|
2230 |
h := nil. |
|
2231 |
] |
|
3447 | 2232 |
] ifFalse:[ |
11210 | 2233 |
steppedContext isNil ifTrue:[ |
2234 |
" |
|
2235 |
preselect a more interesting context, (where halt/raise was ...) |
|
2236 |
" |
|
2237 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
2238 |
selection := self class interestingContextIndexIn:contextArray. |
|
12039 | 2239 |
"/ Transcript show:'x '; showCR:selection. |
11210 | 2240 |
selection := selection min:(contextArray size). |
2241 |
] ifFalse:[ |
|
2242 |
" |
|
2243 |
if we came here by a big-step, show the method where we are |
|
2244 |
" |
|
2245 |
con1 == steppedContext ifTrue:[ |
|
2246 |
selection := 1 |
|
2247 |
] ifFalse:[ |
|
2248 |
con2 == steppedContext ifTrue:[ |
|
2249 |
selection := 2. |
|
2250 |
] |
|
2251 |
] |
|
2252 |
] |
|
3447 | 2253 |
]. |
2254 |
^ selection |
|
2255 |
||
2256 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
2257 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 2258 |
! |
2259 |
||
5110 | 2260 |
isInspecting |
2261 |
^ inspecting |
|
2262 |
! |
|
2263 |
||
2264 |
isNotInspecting |
|
2265 |
^ inspecting not |
|
2266 |
! |
|
2267 |
||
73 | 2268 |
openOn:aProcess |
10205 | 2269 |
"enter the debugger on a process - |
73 | 2270 |
in this case, we are just inspecting the context chain of the process, |
2271 |
not running on top of the debugged process, but as a separate |
|
2272 |
one. (think of it as an inspector showing more detail, and offering |
|
2273 |
some more control operations)" |
|
2274 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2275 |
|bpanel dummy w| |
73 | 2276 |
|
8148 | 2277 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 2278 |
|
73 | 2279 |
busy := true. |
2280 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2281 |
stepHow := nil. |
73 | 2282 |
inspecting := true. |
2283 |
inspectedProcess := aProcess. |
|
8148 | 2284 |
nChainShown := InitialNChainShown. |
73 | 2285 |
|
2286 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2287 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2288 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2289 |
"/ get the max size & freeze button |
6647 | 2290 |
continueButton label:(resources string:'Continue'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2291 |
w := continueButton preferredWidth. |
6647 | 2292 |
continueButton label:(resources string:'Stop'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2293 |
w := w max:(continueButton preferredWidth). |
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2294 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2295 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2296 |
aProcess state == #run ifTrue:[ |
11210 | 2297 |
device hasColors ifTrue:[ |
2298 |
continueButton foregroundColor:Color red darkened. |
|
2299 |
]. |
|
2300 |
continueButton label:(resources string:'Stop'). |
|
2301 |
continueButton action:[self doStop]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2302 |
] ifFalse:[ |
11210 | 2303 |
device hasColors ifTrue:[ |
2304 |
continueButton foregroundColor:Color green darkened darkened. |
|
2305 |
]. |
|
2306 |
continueButton label:(resources string:'Continue'). |
|
2307 |
continueButton action:[self doContinue]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2308 |
]. |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2309 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
73 | 2310 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2311 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2312 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2313 |
|
92 | 2314 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 2315 |
dummy borderWidth:0; level:0. |
61 | 2316 |
|
73 | 2317 |
"/ stepButton destroy. |
2318 |
"/ sendButton destroy. |
|
2319 |
||
2320 |
updateButton := Button |
|
11210 | 2321 |
label:(resources string:'Update') |
2322 |
action:[self updateContext] |
|
2323 |
in:bpanel. |
|
73 | 2324 |
monitorToggle := Toggle in:bpanel. |
6647 | 2325 |
monitorToggle label:(resources string:'Monitor'). |
73 | 2326 |
monitorToggle pressAction:[self autoUpdateOn]. |
2327 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
2328 |
||
2329 |
"can only look into process - context chain is not active" |
|
2330 |
canContinue := true. |
|
2331 |
||
2332 |
terminateButton enable. |
|
2333 |
abortButton enable. |
|
2334 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2335 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2336 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2337 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2338 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2339 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 2340 |
|
2341 |
aProcess isNil ifTrue:[ |
|
11210 | 2342 |
terminateButton disable. |
2343 |
abortButton disable. |
|
2344 |
continueButton disable. |
|
2345 |
returnButton disable. |
|
2346 |
restartButton disable. |
|
73 | 2347 |
] ifFalse:[ |
11210 | 2348 |
(aProcess suspendedContext isNil |
2349 |
or:[aProcess isSystemProcess]) ifTrue:[ |
|
2350 |
terminateButton disable. |
|
2351 |
]. |
|
2352 |
||
2353 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
|
2354 |
||
2355 |
catchBlock := [ |
|
2356 |
catchBlock := nil. |
|
2357 |
contextArray := nil. |
|
2358 |
selectedContext := actualContext := firstContext := nil. |
|
2359 |
steppedContext := wrapperContext := nil. |
|
2360 |
||
2361 |
(exitAction == #terminate) ifTrue:[ |
|
2362 |
aProcess terminate. |
|
2363 |
]. |
|
2364 |
(exitAction == #quickTerminate) ifTrue:[ |
|
2365 |
aProcess terminateNoSignal. |
|
2366 |
]. |
|
2367 |
super destroy |
|
2368 |
]. |
|
73 | 2369 |
]. |
2370 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
2371 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2372 |
"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
|
2373 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2374 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2375 |
|
13388 | 2376 |
selectContextWithIndex:index |
13362 | 2377 |
self showSelection:index. |
2378 |
contextView setSelection:index. |
|
2379 |
index > 1 ifTrue:[ |
|
2380 |
contextView scrollToLine:(index - 1) |
|
2381 |
]. |
|
2382 |
! |
|
2383 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2384 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 2385 |
|selection| |
2386 |
||
2387 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2388 |
selection notNil ifTrue:[ |
13388 | 2389 |
self selectContextWithIndex:selection |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2390 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2391 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2392 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 2393 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2394 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2395 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2396 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2397 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2398 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2399 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2400 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2401 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2402 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2403 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2404 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2405 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2406 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 2407 |
! ! |
2408 |
||
2409 |
!DebugView methodsFor:'help'! |
|
2410 |
||
8212 | 2411 |
flyByHelpDependsOnPositionIn:aView |
2412 |
"subclasses where the help-text depends upon the pointer position might |
|
2413 |
want to redefine this" |
|
2414 |
||
2415 |
^ aView == codeView |
|
2416 |
! |
|
2417 |
||
3510 | 2418 |
flyByHelpTextFor:aComponent |
2419 |
|s| |
|
2420 |
||
2421 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2422 |
s := 'Abort (unwind to eventLoop)' |
3510 | 2423 |
]. |
2424 |
aComponent == terminateButton ifTrue:[ |
|
13339 | 2425 |
Processor activeProcess isGUIProcess ifTrue:[ |
2426 |
s := 'Terminate the process (closes view and shuts down application)' |
|
2427 |
] ifFalse:[ |
|
2428 |
s := 'Terminate the process' |
|
2429 |
] |
|
3510 | 2430 |
]. |
2431 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2432 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2433 |
s := 'Stop' |
|
2434 |
] ifFalse:[ |
|
2435 |
s := 'Continue execution' |
|
2436 |
] |
|
3510 | 2437 |
]. |
2438 |
aComponent == stepButton ifTrue:[ |
|
12840 | 2439 |
s := 'Step to next send in selected context (don''t enter into called methods)' |
3510 | 2440 |
]. |
2441 |
aComponent == nextButton ifTrue:[ |
|
12840 | 2442 |
s := 'Step to next line in selected context (don''t enter into called methods)' |
3510 | 2443 |
]. |
2444 |
aComponent == nextOverButton ifTrue:[ |
|
11210 | 2445 |
s := 'Step over to cursor-line' |
3510 | 2446 |
]. |
2447 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2448 |
s := 'Step out to caller' |
3510 | 2449 |
]. |
2450 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2451 |
s := 'Send next message (enter into called methods)' |
3510 | 2452 |
]. |
2453 |
aComponent == returnButton ifTrue:[ |
|
12977 | 2454 |
restartButton enabled ifTrue:[ |
2455 |
s := 'Return from the selected method' |
|
2456 |
] ifFalse:[ |
|
2457 |
s := 'Return from the selected method.\Disabled, because this method was compiled with context optimization, and cannot be returned from.' withCRs |
|
2458 |
] |
|
3510 | 2459 |
]. |
2460 |
aComponent == restartButton ifTrue:[ |
|
12977 | 2461 |
restartButton enabled ifTrue:[ |
13376 | 2462 |
s := 'Restart the selected method.\If the code was changed in the meanwhile, the original method will be executed again' |
12977 | 2463 |
] ifFalse:[ |
2464 |
s := 'Restart the selected method.\Disabled, because this method was compiled with context optimization, and cannot be returned from.' withCRs |
|
2465 |
] |
|
3510 | 2466 |
]. |
13361 | 2467 |
aComponent == resendButton ifTrue:[ |
2468 |
resendButton enabled ifTrue:[ |
|
13376 | 2469 |
s := 'Resend the selected method''s message.\If the code was changed in the meanwhile, the new method will be called with the original arguments.' |
13361 | 2470 |
] ifFalse:[ |
2471 |
s := 'Resend the selected method''s message.\Disabled, because this method was compiled with context optimization, and cannot be returned from.' withCRs |
|
2472 |
] |
|
2473 |
]. |
|
3510 | 2474 |
aComponent == monitorToggle ifTrue:[ |
11210 | 2475 |
s := 'Toggle monitoring' |
3510 | 2476 |
]. |
2477 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2478 |
s := 'Update' |
3510 | 2479 |
]. |
13464 | 2480 |
aComponent == defineButton ifTrue:[ |
2481 |
s := 'Define the missing method (as halting) and proceed into it.\A debugger will reopen there, so you can add the code then' |
|
2482 |
]. |
|
8656 | 2483 |
aComponent == reportButton ifTrue:[ |
11210 | 2484 |
s := 'Send a defect report via eMail' |
8656 | 2485 |
]. |
3510 | 2486 |
s notNil ifTrue:[ |
13376 | 2487 |
^ resources stringWithCRs:s |
3510 | 2488 |
]. |
2489 |
^ nil |
|
2490 |
||
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2491 |
"Modified: / 29-08-1995 / 23:38:54 / claus" |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2492 |
"Modified: / 18-06-2010 / 11:34:51 / cg" |
3510 | 2493 |
! |
2494 |
||
8212 | 2495 |
flyByHelpTextFor:aComponent at:aPointOrNil |
8396 | 2496 |
|s vline line col pos interval| |
8212 | 2497 |
|
2498 |
aComponent == codeView ifFalse:[^ nil]. |
|
2499 |
aPointOrNil isNil ifTrue:[^ nil]. |
|
9446 | 2500 |
self sensor motionEventPending ifTrue:[^ nil]. |
8212 | 2501 |
|
8396 | 2502 |
vline := codeView visibleLineOfY:aPointOrNil y. |
2503 |
col := codeView colOfX:aPointOrNil x inVisibleLine:vline. |
|
2504 |
line := codeView visibleLineToAbsoluteLine:vline. |
|
8212 | 2505 |
|
2506 |
pos := codeView characterPositionOfLine:line col:col. |
|
2507 |
interval := pos to:pos. |
|
2508 |
||
10205 | 2509 |
self |
11210 | 2510 |
withNodeValueAtInterval:interval |
2511 |
do:[:value :description | |
|
2512 |
|valueClassOrSizeString valueString| |
|
2513 |
||
2514 |
valueClassOrSizeString := valueString := ''. |
|
2515 |
||
2516 |
"/ some heuristics as when to show the class name (a purely subjective preference) |
|
2517 |
value isString ifTrue:[ |
|
2518 |
value isText ifTrue:[ |
|
2519 |
valueString := '"',(value contractTo:80),'"'. |
|
2520 |
] ifFalse:[ |
|
2521 |
valueString := value storeString contractTo:80. |
|
2522 |
]. |
|
2523 |
] ifFalse:[ |
|
2524 |
(value isBoolean |
|
2525 |
or:[ value isInteger |
|
2526 |
or:[ value isSymbol ]]) ifTrue:[ |
|
2527 |
valueString := value printString. |
|
2528 |
] ifFalse:[ |
|
2529 |
valueClassOrSizeString := ' (',value class name,')'. |
|
2530 |
||
2531 |
(value isArray |
|
2532 |
or:[ value isOrderedCollection ]) ifTrue:[ |
|
2533 |
valueClassOrSizeString := ' (size=',value size printString,')'. |
|
2534 |
]. |
|
2535 |
||
2536 |
Error handle:[:ex | |
|
2537 |
valueString := '??? (',ex description,')' |
|
2538 |
] do:[ |
|
2539 |
[ |
|
2540 |
valueString := value printString contractTo:80. |
|
2541 |
] valueWithWatchDog:[ valueString := value classNameWithArticle ] afterMilliseconds:30. |
|
2542 |
] |
|
2543 |
] |
|
2544 |
]. |
|
2545 |
description isEmptyOrNil ifTrue:[ |
|
2546 |
s := valueString , valueClassOrSizeString |
|
2547 |
] ifFalse:[ |
|
2548 |
s := description , ': ', valueString, valueClassOrSizeString |
|
2549 |
]. |
|
2550 |
]. |
|
8592 | 2551 |
"/ Transcript showCR:s. |
2552 |
^ s |
|
9446 | 2553 |
|
2554 |
"Modified: / 27-04-2010 / 17:51:53 / cg" |
|
8212 | 2555 |
! |
2556 |
||
266 | 2557 |
helpTextFor:aComponent |
2558 |
|s| |
|
2559 |
||
2560 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2561 |
s := 'HELP_ABORT' |
266 | 2562 |
]. |
2563 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2564 |
s := 'HELP_TERMINATE' |
266 | 2565 |
]. |
2566 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2567 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2568 |
s := 'HELP_STOP' |
|
2569 |
] ifFalse:[ |
|
2570 |
s := 'HELP_CONTINUE' |
|
2571 |
] |
|
266 | 2572 |
]. |
2573 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2574 |
s := 'HELP_STEP' |
266 | 2575 |
]. |
2576 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2577 |
s := 'HELP_NEXT' |
266 | 2578 |
]. |
1065 | 2579 |
aComponent == nextOverButton ifTrue:[ |
11210 | 2580 |
s := 'HELP_NEXTOVER' |
1065 | 2581 |
]. |
2582 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2583 |
s := 'HELP_NEXTOUT' |
1065 | 2584 |
]. |
266 | 2585 |
aComponent == stepButton ifTrue:[ |
11210 | 2586 |
s := 'HELP_STEP' |
266 | 2587 |
]. |
2588 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2589 |
s := 'HELP_SEND' |
266 | 2590 |
]. |
2591 |
aComponent == returnButton ifTrue:[ |
|
12977 | 2592 |
returnButton enabled ifTrue:[ |
2593 |
s := 'HELP_RETURN' |
|
2594 |
] ifFalse:[ |
|
2595 |
s := 'HELP_RETURN_DISABLED' |
|
2596 |
]. |
|
266 | 2597 |
]. |
2598 |
aComponent == restartButton ifTrue:[ |
|
12977 | 2599 |
restartButton enabled ifTrue:[ |
2600 |
s := 'HELP_RESTART' |
|
2601 |
] ifFalse:[ |
|
2602 |
s := 'HELP_RESTART_DISABLED' |
|
2603 |
]. |
|
266 | 2604 |
]. |
13361 | 2605 |
aComponent == resendButton ifTrue:[ |
2606 |
resendButton enabled ifTrue:[ |
|
2607 |
s := 'HELP_RESEND' |
|
2608 |
] ifFalse:[ |
|
2609 |
s := 'HELP_RESEND_DISABLED' |
|
2610 |
]. |
|
2611 |
]. |
|
266 | 2612 |
aComponent == contextView ifTrue:[ |
11210 | 2613 |
s := 'HELP_WALKBACK' |
266 | 2614 |
]. |
2615 |
aComponent == codeView ifTrue:[ |
|
11210 | 2616 |
s := 'HELP_CODEVIEW' |
266 | 2617 |
]. |
2618 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2619 |
s := 'HELP_MONITOR' |
266 | 2620 |
]. |
2621 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2622 |
s := 'HELP_UPDATE' |
266 | 2623 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2624 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2625 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2626 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2627 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
11210 | 2628 |
s := 'HELP_REC_INSP' |
266 | 2629 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2630 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
11210 | 2631 |
s := 'HELP_CON_INSP' |
266 | 2632 |
]. |
2633 |
||
2634 |
s notNil ifTrue:[ |
|
13376 | 2635 |
^ resources stringWithCRs:s |
266 | 2636 |
]. |
2637 |
^ nil |
|
2638 |
||
2639 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 2640 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 2641 |
! ! |
2642 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2643 |
!DebugView methodsFor:'initialization & release'! |
266 | 2644 |
|
2645 |
addToCurrentProject |
|
2646 |
"ignored here" |
|
2647 |
||
2648 |
^ self |
|
2649 |
! |
|
2650 |
||
2115 | 2651 |
destroy |
2652 |
"closing the debugger implies an abort or continue" |
|
2653 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2654 |
self destroyWithConfirmation:true |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2655 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2656 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2657 |
"Modified: / 23-03-2012 / 12:50:01 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2658 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2659 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2660 |
destroyWithConfirmation:withConfirmation |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2661 |
"closing the debugger implies an abort or continue" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2662 |
|
2404 | 2663 |
|m| |
2664 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2665 |
withConfirmation ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2666 |
self checkIfCodeIsReallyModified ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2667 |
(self confirm:('Code modified - exit anyway ?')) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2668 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2669 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2670 |
] |
11210 | 2671 |
] |
2115 | 2672 |
]. |
2673 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2674 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2675 |
|
2404 | 2676 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 2677 |
inspecting ifFalse:[ |
11210 | 2678 |
"I am running on top of a process, abort or continue it" |
2679 |
||
2680 |
windowGroup notNil ifTrue:[ |
|
2681 |
windowGroup setProcess:nil. |
|
2682 |
]. |
|
2683 |
self uncacheMyself. |
|
2684 |
||
2685 |
"/ |
|
2686 |
"/ catch invalid return; |
|
2687 |
"/ this happens, when my process has somehow died (quickterminate) |
|
2688 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
2689 |
"/ #destroy-window function. |
|
2690 |
"/ |
|
2691 |
Context cannotReturnSignal handle:[:ex | |
|
2692 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
|
2693 |
self uncacheMyself. |
|
2694 |
Debugger newDebugger. |
|
2695 |
ex return. |
|
2696 |
] do:[ |
|
2697 |
AbortOperationRequest isHandled ifTrue:[ |
|
2698 |
self doAbort. |
|
2699 |
] ifFalse:[ |
|
2700 |
self doContinue |
|
2701 |
] |
|
2702 |
]. |
|
2703 |
"/ We don't reach this point normally |
|
2704 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
2115 | 2705 |
]. |
2706 |
||
2299 | 2707 |
Debugger newDebugger. |
2115 | 2708 |
"/ since I am going to be destroyed, remove me from the cache |
2709 |
self uncacheMyself. |
|
2710 |
super destroy. |
|
2711 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2712 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2713 |
"Created: / 23-03-2012 / 12:49:50 / cg" |
2115 | 2714 |
! |
2715 |
||
266 | 2716 |
initialize |
10205 | 2717 |
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel |
12529 | 2718 |
newLayout v exceptionAndTogglePanel codeToggleLabels userPrefs| |
266 | 2719 |
|
2720 |
super initialize. |
|
2721 |
||
2340 | 2722 |
font := font onDevice:device. |
12529 | 2723 |
userPrefs := UserPreferences current. |
2724 |
||
2725 |
verboseBacktrace := userPrefs verboseBacktraceInDebugger ? false. |
|
2726 |
hideSupportCode := userPrefs hideSupportCodeInDebugger ? false. |
|
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
2727 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
11210 | 2728 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2729 |
|
266 | 2730 |
busy := false. |
2731 |
exclusive := false. |
|
2732 |
inspecting := false. |
|
2733 |
exitAction := nil. |
|
2734 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2735 |
stepHow := nil. |
266 | 2736 |
canContinue := false. |
2737 |
||
3269 | 2738 |
mH := 0. |
2739 |
||
3447 | 2740 |
menuPanel := MenuPanel in:self. |
8131 | 2741 |
menuPanel receiver:self. |
3447 | 2742 |
menuPanel verticalLayout:false. |
8131 | 2743 |
menu := self class menuSpec decodeAsLiteralArray. |
2744 |
menu findGuiResourcesIn:self. |
|
2745 |
menuPanel menu:menu. |
|
3447 | 2746 |
|
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2747 |
mH := menuPanel preferredHeight. |
3447 | 2748 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
2749 |
||
12529 | 2750 |
newLayout := userPrefs useNewLayoutInDebugger. |
8148 | 2751 |
newLayout ifFalse:[ |
11210 | 2752 |
bpanel := HorizontalPanelView in:self. |
2753 |
||
2754 |
self initializeButtonsIn:bpanel. |
|
2755 |
||
2756 |
bH := bpanel preferredHeight + 5. |
|
2757 |
bpanel origin:(0.0 @ mH) |
|
2758 |
extent:(1.0 @ bH). |
|
2759 |
panel := VariableVerticalPanel |
|
2760 |
origin:(0.0 @ (mH + bH)) |
|
2761 |
corner:(1.0 @ 1.0) |
|
2762 |
in:self. |
|
2763 |
||
2764 |
v := self initializeContextListViewIn:panel. |
|
2765 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2766 |
||
2767 |
codePanel := View in:panel. |
|
2768 |
v := self initializeCodeViewIn:codePanel. |
|
2769 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
2770 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2771 |
||
2772 |
v := self initializeInspectorViewsIn:panel. |
|
2773 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2774 |
|
8148 | 2775 |
] ifTrue:[ |
11210 | 2776 |
bpanel1 := HorizontalPanelView in:self. |
2777 |
self initializeButtons1In:bpanel1. |
|
2778 |
||
12529 | 2779 |
contextInfoLabel := Label label:''. |
2780 |
contextInfoLabel adjust:#left. |
|
2781 |
bpanel1 add:contextInfoLabel. |
|
2782 |
||
11210 | 2783 |
bH1 := bpanel1 preferredHeight + 5. |
2784 |
bpanel1 origin:(0.0 @ mH) |
|
2785 |
extent:(1.0 @ bH1). |
|
2786 |
panel := VariableVerticalPanel |
|
2787 |
origin:(0.0 @ (mH + bH1)) |
|
2788 |
corner:(1.0 @ 1.0) |
|
2789 |
in:self. |
|
2790 |
"/ panel showHandle:true. |
|
2791 |
"/ panel handlePosition:#left. |
|
2792 |
||
2793 |
v := self initializeContextListViewIn:panel. |
|
2794 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2795 |
||
2796 |
codePanel := View in:panel. |
|
2797 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
2798 |
self initializeButtons2In:bpanel2. |
|
2799 |
||
2800 |
bH2 := bpanel2 preferredHeight + 5. |
|
2801 |
bpanel2 origin:(0.0 @ 0.0) |
|
2802 |
extent:(1.0 @ bH2). |
|
2803 |
||
2804 |
exceptionInfoLabel := Label label:''. |
|
2805 |
exceptionInfoLabel adjust:#left. |
|
2806 |
||
2807 |
exceptionAndTogglePanel := HorizontalPanelView in:codePanel. |
|
2808 |
exceptionAndTogglePanel horizontalLayout:#left. |
|
2809 |
exceptionAndTogglePanel |
|
2810 |
geometryLayout: |
|
2811 |
((LayoutFrame |
|
2812 |
origin:(0.0 @ 0.0) |
|
2813 |
corner:(1.0 @ 0.0)) |
|
2814 |
topOffset:bH2; |
|
2815 |
bottomOffset:(bH2 + exceptionInfoLabel preferredHeight + 6); |
|
2816 |
rightOffset:-2). |
|
2817 |
||
2818 |
methodCodeToggleSelectionHolder := 1 asValue. |
|
2819 |
methodCodeToggleSelectionHolder onChangeSend:#methodCodeToggleChanged to:self. |
|
11305 | 2820 |
codeToggleLabels := resources array:{ |
2821 |
'Showing Original Code (being executed, but obsolete)' asText backgroundColorizeAllWith:Color red lightened . |
|
2822 |
'Showing Current Code' asText backgroundColorizeAllWith:Color green lightened . |
|
2823 |
}. |
|
2824 |
methodCodeToggle := PopUpList label:codeToggleLabels first in:exceptionAndTogglePanel. |
|
2825 |
methodCodeToggle list:codeToggleLabels. |
|
11210 | 2826 |
methodCodeToggle useIndex:true. |
2827 |
methodCodeToggle model:methodCodeToggleSelectionHolder. |
|
2828 |
methodCodeToggle beInvisible. |
|
2829 |
||
2830 |
exceptionAndTogglePanel add:exceptionInfoLabel. |
|
2831 |
||
2832 |
v := self initializeCodeViewIn:codePanel. |
|
2833 |
v origin:(0.0 @ (bH2+exceptionInfoLabel preferredHeight+6)) corner:(1.0 @ 1.0). |
|
2834 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2835 |
||
2836 |
v := self initializeInspectorViewsIn:panel. |
|
2837 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2838 |
]. |
2839 |
||
3387 | 2840 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
11210 | 2841 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2842 |
]. |
9626 | 2843 |
LastExtent notNil ifTrue:[ |
11210 | 2844 |
self extent:LastExtent. |
9626 | 2845 |
]. |
2846 |
LastOrigin notNil ifTrue:[ |
|
11210 | 2847 |
self origin:LastOrigin. |
9626 | 2848 |
]. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2849 |
|
3269 | 2850 |
" |
2851 |
Debugger newDebugger |
|
2852 |
" |
|
3447 | 2853 |
|
11693 | 2854 |
"Modified: / 27-07-2012 / 14:46:07 / cg" |
3269 | 2855 |
! |
2856 |
||
10205 | 2857 |
initializeAbortButtonIn:bpanel |
2858 |
abortButton := Button |
|
11210 | 2859 |
label:(resources string:'Abort') |
2860 |
action:[ |
|
2861 |
abortButton turnOffWithoutRedraw. |
|
2862 |
self doAbort |
|
2863 |
] |
|
2864 |
in:bpanel. |
|
3447 | 2865 |
|
2866 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2867 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2868 |
! |
|
2869 |
||
10205 | 2870 |
initializeButtons1In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2871 |
"creates the top button row, consisting of 'continue', 'abort', 'terminate'..." |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2872 |
|
3447 | 2873 |
|separator| |
2874 |
||
10205 | 2875 |
bpanel horizontalLayout:#left. |
3447 | 2876 |
bpanel verticalLayout:#centerMax. |
2877 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2878 |
||
8194 | 2879 |
self initializeContinueButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2880 |
continueButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2881 |
|
9131 | 2882 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
2883 |
"/ separator borderWidth:0; level:0. |
|
3447 | 2884 |
self initializeAbortButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2885 |
abortButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2886 |
|
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2887 |
separator := View extent:(100 @ 5) in:bpanel. |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2888 |
separator borderWidth:0; level:0. |
3269 | 2889 |
|
3447 | 2890 |
self initializeTerminateButtonIn:bpanel. |
2891 |
||
9131 | 2892 |
separator := View extent:(50 @ 5) in:bpanel. |
3447 | 2893 |
separator borderWidth:0; level:0. |
2894 |
||
13362 | 2895 |
self initializeGotoDialogOpenerButtonIn:bpanel. |
3447 | 2896 |
self initializeDefineButtonIn:bpanel. |
4356 | 2897 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2898 |
separator := View extent:(10 @ 5) in:bpanel. |
2899 |
separator borderWidth:0; level:0. |
|
2900 |
self initializeReportButtonIn:bpanel. |
|
4356 | 2901 |
]. |
3447 | 2902 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2903 |
! |
2904 |
||
10205 | 2905 |
initializeButtons2In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2906 |
"creates the second button row, consisting of 'next', 'step', 'return'..." |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2907 |
|
3269 | 2908 |
|separator| |
2909 |
||
9131 | 2910 |
bpanel horizontalLayout:#left. |
3269 | 2911 |
bpanel verticalLayout:#centerMax. |
2912 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2913 |
||
3447 | 2914 |
self initializeNextButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2915 |
nextButton width:100. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2916 |
|
3447 | 2917 |
self initializeStepButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2918 |
stepButton width:100. |
3447 | 2919 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2920 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2921 |
"/ I disabled the stepIn / stepOut buttons - for now. |
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2922 |
"/ they do not work reliable with inlined blocks yet. |
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2923 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2924 |
|
3269 | 2925 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2926 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2927 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2928 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2929 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2930 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2931 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2932 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2933 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2934 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2935 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2936 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2937 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2938 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2939 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2940 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2941 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2942 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2943 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2944 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2945 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2946 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2947 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2948 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2949 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2950 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2951 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2952 |
|
3447 | 2953 |
self initializeSendButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2954 |
sendButton width:100. |
3447 | 2955 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2956 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2957 |
separator borderWidth:0; level:0. |
3269 | 2958 |
|
3447 | 2959 |
self initializeReturnButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2960 |
returnButton width:100. |
3447 | 2961 |
self initializeRestartButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2962 |
restartButton width:100. |
13360 | 2963 |
self initializeResendButtonIn:bpanel. |
2964 |
resendButton width:100. |
|
3447 | 2965 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2966 |
"Modified: / 18-06-2010 / 08:32:05 / cg" |
3269 | 2967 |
! |
2968 |
||
10205 | 2969 |
initializeButtonsIn:bpanel |
3269 | 2970 |
|separator| |
2971 |
||
2972 |
bpanel horizontalLayout:#left. |
|
2973 |
bpanel verticalLayout:#centerMax. |
|
2974 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2975 |
||
3447 | 2976 |
self initializeAbortButtonIn:bpanel. |
2977 |
||
3269 | 2978 |
separator := View extent:(10 @ 5) in:bpanel. |
2979 |
separator borderWidth:0; level:0. |
|
2980 |
||
3447 | 2981 |
self initializeContinueButtonIn:bpanel. |
3269 | 2982 |
|
2983 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2984 |
separator borderWidth:0; level:0. |
|
2985 |
||
10205 | 2986 |
self initializeReturnButtonIn:bpanel. |
2987 |
self initializeRestartButtonIn:bpanel. |
|
13360 | 2988 |
self initializeResendButtonIn:bpanel. |
3269 | 2989 |
|
2990 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2991 |
separator borderWidth:0; level:0. |
|
2992 |
||
3447 | 2993 |
self initializeNextButtonIn:bpanel. |
2994 |
self initializeStepButtonIn:bpanel. |
|
2995 |
||
3269 | 2996 |
"/ cg: |
2997 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2998 |
"/ they do not work relyable with inlined blocks yet. |
|
2999 |
"/ |
|
3000 |
||
3001 |
||
3002 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
3003 |
"/ img isNil ifTrue:[ |
|
3004 |
"/ img := (resources at:'next') |
|
3005 |
"/ ]. |
|
3006 |
"/ nextButton := Button |
|
3007 |
"/ label:img |
|
3008 |
"/ action:[stepButton turnOff. self doNext] |
|
3009 |
"/ in:bpanel. |
|
3010 |
"/ |
|
3011 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
3012 |
"/ img isNil ifTrue:[ |
|
3013 |
"/ img := (resources at:'over') |
|
3014 |
"/ ]. |
|
3015 |
"/ nextOverButton := Button |
|
3016 |
"/ label:img |
|
3017 |
"/ action:[stepButton turnOff. self doNextOver] |
|
3018 |
"/ in:bpanel. |
|
3019 |
"/ |
|
3020 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
3021 |
"/ img isNil ifTrue:[ |
|
3022 |
"/ img := (resources at:'out') |
|
3023 |
"/ ]. |
|
3024 |
"/ nextOutButton := Button |
|
3025 |
"/ label:img |
|
3026 |
"/ action:[stepButton turnOff. self doNextOut] |
|
3027 |
"/ in:bpanel. |
|
3028 |
||
3447 | 3029 |
self initializeSendButtonIn:bpanel. |
3030 |
||
3187 | 3031 |
separator := View extent:(30 @ 5) in:bpanel. |
3032 |
separator borderWidth:0; level:0. |
|
3269 | 3033 |
|
3447 | 3034 |
self initializeTerminateButtonIn:bpanel. |
3035 |
||
3269 | 3036 |
separator := View extent:(30 @ 5) in:bpanel. |
3037 |
separator borderWidth:0; level:0. |
|
3038 |
||
3447 | 3039 |
self initializeDefineButtonIn:bpanel. |
4356 | 3040 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 3041 |
self initializeReportButtonIn:bpanel. |
4356 | 3042 |
]. |
3043 |
||
3447 | 3044 |
|
3045 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
3046 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 3047 |
! |
3048 |
||
3049 |
initializeCodeViewIn:panel |
|
3050 |
|v| |
|
3051 |
||
10628 | 3052 |
(UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
3053 |
v := codeView := Tools::CodeView2 in: panel. |
|
3054 |
codeView model: ValueHolder new. |
|
3055 |
codeView methodHolder: ValueHolder new. |
|
3056 |
codeView classHolder: ValueHolder new. |
|
3057 |
] ifFalse:[ |
|
3058 |
v := HVScrollableView |
|
3059 |
for:CodeView |
|
3060 |
miniScrollerH:true |
|
3061 |
miniScrollerV:false |
|
3062 |
in:panel. |
|
3063 |
||
3064 |
"/ v autoHideScrollBars:true. |
|
3065 |
codeView := v scrolledView. |
|
3066 |
codeView enableMotionEvents. "/ for active help |
|
3067 |
]. |
|
3269 | 3068 |
|
3069 |
^ v |
|
10628 | 3070 |
|
3071 |
"Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3269 | 3072 |
! |
3073 |
||
3074 |
initializeContextListViewIn:panel |
|
3075 |
|v| |
|
266 | 3076 |
|
10205 | 3077 |
v := HVScrollableView |
11210 | 3078 |
for:SelectionInListView |
3079 |
miniScrollerH:true |
|
3080 |
miniScrollerV:false |
|
3081 |
in:panel. |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
3082 |
v autoHideHorizontalScrollBar:true. |
266 | 3083 |
|
3084 |
contextView := v scrolledView. |
|
3085 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 3086 |
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
|
3087 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 3088 |
|
10205 | 3089 |
contextView middleButtonMenu:(self middleButtonMenu). |
5453 | 3090 |
|
3269 | 3091 |
^ v |
3092 |
! |
|
3093 |
||
5453 | 3094 |
initializeContextViewsMiddleButtonMenu |
3095 |
<resource: #programMenu > |
|
3096 |
||
10205 | 3097 |
contextView middleButtonMenu:(self middleButtonMenu). |
3098 |
! |
|
3099 |
||
3100 |
initializeContinueButtonIn:bpanel |
|
3101 |
continueButton := Button |
|
11210 | 3102 |
label:(resources string:'Continue') |
3103 |
action:[ |
|
3104 |
continueButton turnOffWithoutRedraw. |
|
3105 |
self doContinue |
|
3106 |
] |
|
3107 |
in:bpanel. |
|
3447 | 3108 |
|
3109 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
3110 |
! |
|
3111 |
||
10205 | 3112 |
initializeDefineButtonIn:bpanel |
3113 |
defineButton := Button |
|
11210 | 3114 |
label:(resources string:'Define') |
3115 |
action:[ |
|
3116 |
defineButton turnOffWithoutRedraw. |
|
3117 |
self doDefine |
|
3118 |
] |
|
3119 |
in:bpanel. |
|
3447 | 3120 |
defineButton beInvisible |
3121 |
||
3122 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
3123 |
! |
|
3124 |
||
13362 | 3125 |
initializeGotoDialogOpenerButtonIn:bpanel |
3126 |
gotoDialogOpenerButton := Button |
|
3127 |
label:(resources string:'Goto Dialog Opener') |
|
3128 |
action:[ |
|
3129 |
gotoDialogOpenerButton turnOffWithoutRedraw. |
|
3130 |
self doGotoDialogOpener |
|
3131 |
] |
|
3132 |
in:bpanel. |
|
3133 |
||
3134 |
gotoDialogOpenerButton beInvisible |
|
3135 |
! |
|
3136 |
||
3269 | 3137 |
initializeInspectorViewsIn:panel |
3138 |
|hpanel| |
|
266 | 3139 |
|
3140 |
hpanel := VariableHorizontalPanel in:panel. |
|
3141 |
||
3142 |
receiverInspector := InspectorView |
|
11210 | 3143 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
3144 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
3145 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 3146 |
|
3147 |
contextInspector := ContextInspectorView |
|
11210 | 3148 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
3149 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
3150 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
3151 |
|
3269 | 3152 |
^ hpanel |
266 | 3153 |
! |
3154 |
||
10205 | 3155 |
initializeNextButtonIn:bpanel |
3156 |
nextButton := Button |
|
11210 | 3157 |
label:(resources string:'Debug_Next') |
3158 |
action:[ |
|
3159 |
stepButton turnOff. |
|
3160 |
self doNext |
|
3161 |
] |
|
3162 |
in:bpanel. |
|
3447 | 3163 |
|
3164 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
3165 |
! |
|
3166 |
||
10205 | 3167 |
initializeReportButtonIn:bpanel |
3168 |
reportButton := Button |
|
11210 | 3169 |
label:(resources string:'Report by Mail...') |
3170 |
action:[ |
|
3171 |
reportButton turnOffWithoutRedraw. |
|
3172 |
self doOpenReportMailApp. |
|
3173 |
] |
|
3174 |
in:bpanel. |
|
4356 | 3175 |
|
3176 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
3177 |
! |
|
3178 |
||
13360 | 3179 |
initializeResendButtonIn:bpanel |
3180 |
resendButton := Button |
|
3181 |
label:(resources string:'Resend') |
|
3182 |
action:[ |
|
3183 |
resendButton turnOff. |
|
3184 |
self doResend |
|
3185 |
] |
|
3186 |
in:bpanel. |
|
3187 |
! |
|
3188 |
||
10205 | 3189 |
initializeRestartButtonIn:bpanel |
3190 |
restartButton := Button |
|
11210 | 3191 |
label:(resources string:'Restart') |
3192 |
action:[ |
|
3193 |
restartButton turnOff. |
|
3194 |
self doRestart |
|
3195 |
] |
|
3196 |
in:bpanel. |
|
3447 | 3197 |
|
3198 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
3199 |
! |
|
3200 |
||
10205 | 3201 |
initializeReturnButtonIn:bpanel |
3202 |
returnButton := Button |
|
11210 | 3203 |
label:(resources string:'Return') |
3204 |
action:[ |
|
3205 |
returnButton turnOff. |
|
3206 |
self doReturn |
|
3207 |
] |
|
3208 |
in:bpanel. |
|
3447 | 3209 |
|
3210 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
3211 |
! |
|
3212 |
||
10205 | 3213 |
initializeSendButtonIn:bpanel |
3214 |
sendButton := Button |
|
11210 | 3215 |
label:(resources string:'Send') |
3216 |
action:[ |
|
3217 |
sendButton turnOff. |
|
3218 |
self doSend |
|
3219 |
] |
|
3220 |
in:bpanel. |
|
3447 | 3221 |
|
3222 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
3223 |
! |
|
3224 |
||
10205 | 3225 |
initializeStepButtonIn:bpanel |
3226 |
stepButton := Button |
|
11210 | 3227 |
label:(resources string:'Debug_Step') |
3228 |
action:[ |
|
3229 |
stepButton turnOff. |
|
3230 |
self doStep |
|
3231 |
] |
|
3232 |
in:bpanel. |
|
3447 | 3233 |
|
3234 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
3235 |
! |
|
3236 |
||
10205 | 3237 |
initializeTerminateButtonIn:bpanel |
3238 |
terminateButton := Button |
|
11210 | 3239 |
label:(resources string:'Debug_Terminate') |
3240 |
action:[ |
|
3241 |
terminateButton turnOffWithoutRedraw. |
|
3242 |
self doTerminate |
|
3243 |
] |
|
3244 |
in:bpanel. |
|
3447 | 3245 |
|
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3246 |
terminateButton backgroundColor:Color red lightened. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3247 |
"/ terminateButton foregroundColor:Color red. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3248 |
|
3447 | 3249 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
266 | 3250 |
! |
3251 |
||
1249 | 3252 |
postRealize |
3253 |
super postRealize. |
|
266 | 3254 |
|
3255 |
inspecting ifTrue:[ |
|
11210 | 3256 |
inspectedProcess notNil ifTrue:[ |
3257 |
" |
|
3258 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
3259 |
to run between mine and the debugged processes prio) |
|
3260 |
" |
|
3261 |
Processor activeProcess |
|
3262 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
|
3263 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3264 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3265 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3266 |
self sensor addEventListener:self. |
1249 | 3267 |
|
3268 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 3269 |
! |
3270 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3271 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3272 |
"/ 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
|
3273 |
"/ 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
|
3274 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3275 |
drawableId notNil ifTrue:[ |
11210 | 3276 |
^ self |
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3277 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3278 |
"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
|
3279 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3280 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3281 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3282 |
|
11818 | 3283 |
releaseDebuggee |
3284 |
"We have to be careful to release all refs to the debuggee, |
|
3285 |
because we may be in the cache. |
|
3286 |
Otherwise, the GC will not be able to release it" |
|
3287 |
||
3288 |
busy := false. |
|
3289 |
||
3290 |
codeView acceptAction:nil. |
|
3291 |
codeView doItAction:nil. |
|
3292 |
codeView contents:nil. |
|
3293 |
||
3294 |
receiverInspector release. |
|
3295 |
contextInspector release. |
|
3296 |
inspectedProcess := nil. |
|
3297 |
contextArray := nil. |
|
13361 | 3298 |
((exitAction == #restart) or:[exitAction == #return or:[exitAction == #resend]]) ifFalse:[ |
11818 | 3299 |
selectedContext := nil. |
3300 |
]. |
|
3301 |
actualContext := firstContext := nil. |
|
3302 |
steppedContext := wrapperContext := nil. |
|
3303 |
catchBlock := nil. |
|
3304 |
grabber := nil. |
|
3305 |
self autoUpdateOff. |
|
3306 |
||
3307 |
"Created: / 10-07-1997 / 14:57:51 / stefan" |
|
3308 |
"Modified: / 26-09-2012 / 15:08:21 / cg" |
|
3309 |
! |
|
3310 |
||
266 | 3311 |
setLabelFor:aMessage in:aProcess |
9403 | 3312 |
|l lines processNameOrNil pidOrNil osPidString| |
6821 | 3313 |
|
3314 |
lines := aMessage asStringCollection. |
|
3315 |
lines size > 1 ifTrue:[ |
|
11210 | 3316 |
l := lines first |
6821 | 3317 |
] ifFalse:[ |
11210 | 3318 |
l := aMessage. |
6821 | 3319 |
]. |
3320 |
||
3321 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
3322 |
Error handle:[:ex | |
11210 | 3323 |
l := l , '???' |
1030 | 3324 |
] do:[ |
11210 | 3325 |
processNameOrNil := aProcess name. |
3326 |
processNameOrNil notNil ifTrue:[ |
|
3327 |
l := l , (processNameOrNil contractTo:20) , ''. |
|
3328 |
]. |
|
3329 |
pidOrNil := aProcess id printString. |
|
3330 |
l := l , '[' , pidOrNil , ']'. |
|
73 | 3331 |
]. |
1030 | 3332 |
l := l , ')'. |
266 | 3333 |
self label:l. |
6821 | 3334 |
|
10205 | 3335 |
((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
11210 | 3336 |
osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
9403 | 3337 |
]. |
3338 |
||
8305 | 3339 |
exceptionInfoLabel notNil ifTrue:[ |
11210 | 3340 |
exceptionInfoLabel |
3341 |
label:(resources |
|
12529 | 3342 |
string:'%1 in process %2 [%3]%4' |
11210 | 3343 |
with:(lines first colorizeAllWith:Color red) |
3344 |
with:(processNameOrNil ? '') |
|
3345 |
with:(pidOrNil ? '') |
|
3346 |
with:(osPidString ? '')) |
|
8305 | 3347 |
]. |
3348 |
||
6821 | 3349 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
0 | 3350 |
! ! |
3351 |
||
3352 |
!DebugView methodsFor:'interrupt handling'! |
|
3353 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3354 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3355 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3356 |
'contextIRQ' printCR. |
12743 | 3357 |
thisContext methodHome sender fullPrint. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3358 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3359 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3360 |
|
1364 | 3361 |
"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
|
3362 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3363 |
|
0 | 3364 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3365 |
DebuggingDebugger == true ifTrue:[ |
11636 | 3366 |
'stepIRQ' print. |
3367 |
"/ ' in ' print. thisContext sender fullPrint. |
|
3368 |
'' printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3369 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3370 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3371 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3372 |
|
11636 | 3373 |
"Modified: / 20-07-2012 / 14:06:54 / cg" |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3374 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3375 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3376 |
stepOrNext |
11636 | 3377 |
|where here con s isWrap method wrappedMethod |
3378 |
originalMethodOfWrappedMethod originalMethodsContext |
|
3379 |
inBlock subBlockLeft ignore contextBelow wrapContext |
|
10205 | 3380 |
leftWrap enteredWrap anyStepBlocks |
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3381 |
oneMore initiallyShown inBlockBelow receiver processName| |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3382 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3383 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3384 |
"/ DebuggingDebugger := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3385 |
"/ DebuggingDebugger2 := true |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3386 |
"/ DebuggingDebugger2 := false |
11636 | 3387 |
"/ DebuggingDebugger3 := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3388 |
"/ '' printCR |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3389 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3390 |
processName := (Processor activeProcess nameOrId),' [',Processor activeProcess id printString,']'. |
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3391 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3392 |
skipLineNr == #return ifTrue:[ |
11210 | 3393 |
self label:('stepping context returned ' , ' (process: ' , processName , ')'). |
3394 |
here := thisContext sender sender. |
|
3395 |
here setLineNumber:nil. |
|
3396 |
here := nil. |
|
3397 |
con := thisContext sender sender sender. |
|
3398 |
||
3399 |
HaltInterrupt handle:[:ex | |
|
3400 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [stepOrNext]' bindWith:ex suspendedContext) infoPrintCR. |
|
3401 |
ex proceed |
|
3402 |
] do:[ |
|
3403 |
self enter:con select:nil. |
|
3404 |
]. |
|
3405 |
con := nil. |
|
3406 |
^ self |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3407 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3408 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3409 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3410 |
"/ "/ 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
|
3411 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3412 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3413 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3414 |
"/ 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
|
3415 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3416 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3417 |
|
52 | 3418 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
11210 | 3419 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
3420 |
^ self |
|
52 | 3421 |
]. |
3422 |
||
29 | 3423 |
here := thisContext. "stepInterrupt" |
10205 | 3424 |
here := here sender. "the caller; step- or contextIRQ" |
3425 |
here := here sender. "the interrupted context" |
|
29 | 3426 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3427 |
DebuggingDebugger2 == true ifTrue:[ |
11636 | 3428 |
'***************************' printCR. |
11210 | 3429 |
'here in ' print. |
3430 |
inWrap ifTrue:['(wrap) ' print.]. |
|
3431 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
|
3432 |
here selector printCR. |
|
11636 | 3433 |
'stepping in ' print. |
3434 |
steppedContext notNil ifTrue:[ |
|
3435 |
((ObjectMemory addressOf:steppedContext) printStringRadix:16) print. ' ' print. |
|
3436 |
]. |
|
3437 |
steppedContext printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3438 |
]. |
10 | 3439 |
|
13197 | 3440 |
"/ when single stepping, ignore breakpoints |
3441 |
here selector == #break ifTrue:[ |
|
3442 |
(here receiver isKindOf:Breakpoint) ifTrue:[ |
|
3443 |
false "here receiver isEnabled" ifFalse:[ |
|
3444 |
con := nil. |
|
3445 |
where := nil. here := nil. |
|
3446 |
StepInterruptPending := 1. |
|
3447 |
InterruptPending := 1. |
|
3448 |
InStepInterrupt := nil. |
|
3449 |
^ self |
|
3450 |
] |
|
3451 |
]. |
|
3452 |
]. |
|
3453 |
||
3454 |
"/ kludge: a bug-workaround; |
|
3455 |
"/ I should not see those... |
|
2581 | 3456 |
|
3457 |
here selector == #ioInterrupt ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3458 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3459 |
'oops - should not get that one' printCR. |
3460 |
]. |
|
3461 |
Processor ioInterrupt. |
|
3462 |
StepInterruptPending := 1. |
|
3463 |
InterruptPending := 1. |
|
3464 |
where := nil. here := nil. |
|
3465 |
InStepInterrupt := nil. |
|
3466 |
^ self |
|
2581 | 3467 |
]. |
3468 |
||
3469 |
stepUntilEntering notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3470 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3471 |
'check if entering ' print. stepUntilEntering printCR. |
3472 |
]. |
|
3473 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3474 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3475 |
'entering...' printCR. |
3476 |
]. |
|
3477 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , processName , ')'). |
|
3478 |
||
3479 |
lastStepUntilEntering := stepUntilEntering. |
|
3480 |
stepUntilEntering := nil. |
|
3481 |
self enter:here select:nil. |
|
3482 |
con := nil. |
|
3483 |
^ self |
|
3484 |
]. |
|
3485 |
"/ see if stepping context is still active ... |
|
3486 |
||
3487 |
con := here. |
|
3488 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3489 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3490 |
'start searching at: ' print. |
3491 |
con fullPrint. |
|
3492 |
]. |
|
3493 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
3494 |
con := con sender |
|
3495 |
]. |
|
3496 |
con notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3497 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3498 |
'steppingContext still active - continue stepping' printCR. |
3499 |
]. |
|
3500 |
con := nil. |
|
3501 |
where := nil. here := nil. |
|
3502 |
StepInterruptPending := 1. |
|
3503 |
InterruptPending := 1. |
|
3504 |
InStepInterrupt := nil. |
|
3505 |
^ self |
|
3506 |
]. |
|
3507 |
stepUntilEntering := nil. |
|
2581 | 3508 |
]. |
3509 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3510 |
" |
11636 | 3511 |
kludge to hide breakpoint wrappers in the context list and when single stepping: |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3512 |
check if we are in a wrapper method's hidden setup-sequence |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3513 |
if so, ignore the interrupt and continue single sending. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3514 |
Assume we are in a wrappers setup code, if there is another context above, |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3515 |
which is for the wrapper method (i.e. if there is context with an originalmethod |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3516 |
of some other context higher in the caller chain |
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3517 |
" |
29 | 3518 |
isWrap := false. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3519 |
subBlockLeft := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3520 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3521 |
|
57 | 3522 |
inWrap ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3523 |
"/ situation1: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3524 |
"/ valueWithReceiver or other |
11636 | 3525 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3526 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3527 |
"/ situation2: |
11636 | 3528 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3529 |
"/ valueWithReceiver |
11636 | 3530 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3531 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3532 |
"/ situation3: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3533 |
"/ other |
11636 | 3534 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3535 |
"/ valueWithReceiver |
11636 | 3536 |
"/ foo (wrapped) <- wrapContext |
3537 |
"/ |
|
3538 |
"/ situation4: |
|
3539 |
"/ ... many-contexts ... (more than 8) |
|
3540 |
"/ possibly foo (original) |
|
3541 |
"/ valueWithReceiver or other |
|
3542 |
"/ foo (wrapped) |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3543 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3544 |
|
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3545 |
"/ search for the wrapped method's context and extract the original method |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3546 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3547 |
8 timesRepeat:[ |
11636 | 3548 |
wrapContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3549 |
where notNil ifTrue:[ |
13362 | 3550 |
DebuggingDebugger2 == true ifTrue:[ |
11636 | 3551 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
3552 |
where printCR |
|
3553 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3554 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3555 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3556 |
(method notNil and:[method isWrapped]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3557 |
originalMethodOfWrappedMethod := method originalMethod. |
11636 | 3558 |
wrappedMethod := method. |
3559 |
wrapContext := where. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3560 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3561 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3562 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3563 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3564 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3565 |
]. |
13362 | 3566 |
DebuggingDebugger2 == true ifTrue:[ |
11636 | 3567 |
'wrap-context is: ' print. |
3568 |
wrapContext notNil ifTrue:[ |
|
3569 |
((ObjectMemory addressOf:wrapContext) printStringRadix:16) print. ' ' print. |
|
3570 |
]. |
|
3571 |
wrapContext printCR |
|
3572 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3573 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3574 |
'oops no wrap?' errorPrintCR. |
11636 | 3575 |
]. |
3576 |
]. |
|
3577 |
||
3578 |
(inWrap and:[ originalMethodOfWrappedMethod notNil ]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3579 |
isWrap := false. |
11636 | 3580 |
"/ DebuggingDebugger2 ifTrue:[ '----------->' print. originalMethodOfWrappedMethod printCR ]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3581 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3582 |
8 timesRepeat:[ |
11636 | 3583 |
originalMethodsContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3584 |
where notNil ifTrue:[ |
11636 | 3585 |
DebuggingDebugger2 ifTrue:[ |
3586 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3587 |
where printCR |
|
3588 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3589 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3590 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3591 |
method == originalMethodOfWrappedMethod ifTrue:[ |
11636 | 3592 |
originalMethodsContext := here. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3593 |
where == here ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3594 |
"/ situation2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3595 |
DebuggingDebugger2 ifTrue:[ 's2' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3596 |
isWrap := true. |
11636 | 3597 |
"/ here setSender:(wrapContext sender). --- leads to a crash |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3598 |
] ifFalse: [ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3599 |
"/ situation3 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3600 |
DebuggingDebugger2 ifTrue:[ 's3' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3601 |
inWrap := false. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3602 |
isWrap := false. |
11210 | 3603 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3604 |
steppedContext := where |
11636 | 3605 |
"/ ] ifFalse:[ |
3606 |
"/ where selector == wrapContext selector ifTrue:[ |
|
3607 |
"/ where receiver == wrapContext receiver ifTrue:[ |
|
3608 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3609 |
"/ method printCR. |
|
3610 |
"/ method originalMethod printCR. |
|
3611 |
"/ originalMethodOfWrappedMethod printCR. |
|
3612 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3613 |
"/ ]. |
|
3614 |
"/ ]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3615 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3616 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3617 |
]. |
11210 | 3618 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3619 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3620 |
]. |
11636 | 3621 |
DebuggingDebugger2 ifTrue:[ |
3622 |
'original method-context is: ' print. |
|
3623 |
originalMethodsContext notNil ifTrue:[ |
|
3624 |
((ObjectMemory addressOf:originalMethodsContext) printStringRadix:16) print. ' ' print. |
|
3625 |
]. |
|
3626 |
originalMethodsContext printCR |
|
3627 |
]. |
|
3628 |
originalMethodsContext isNil ifTrue:[ |
|
3629 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
|
3630 |
"/ situation4 |
|
3631 |
DebuggingDebugger2 ifTrue:[ 's4' printCR ]. |
|
3632 |
DebuggingDebugger2 ifTrue:[ steppedContext printCR ]. |
|
3633 |
isWrap := false. |
|
3634 |
] ifFalse:[ |
|
3635 |
"/ situation1 |
|
3636 |
DebuggingDebugger2 ifTrue:[ 's1' printCR ]. |
|
3637 |
isWrap := true. |
|
3638 |
"/ steppedContext := wrapContext |
|
3639 |
]. |
|
11210 | 3640 |
]. |
29 | 3641 |
]. |
3642 |
||
3643 |
isWrap ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3644 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3645 |
'ignore wrap' printCR. |
3646 |
]. |
|
3647 |
||
3648 |
"/ |
|
3649 |
"/ ignore, while in wrappers hidden setup |
|
3650 |
"/ |
|
3651 |
where := nil. here := nil. |
|
3652 |
ObjectMemory flushInlineCaches. |
|
3653 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3654 |
DebuggingDebugger2 == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3655 |
skipLineNr == #return ifTrue:[ |
11210 | 3656 |
'skipRet in wrap' printCR. |
3657 |
] |
|
3658 |
]. |
|
3659 |
||
3660 |
StepInterruptPending := 1. |
|
3661 |
InterruptPending := 1. |
|
3662 |
InStepInterrupt := nil. |
|
3663 |
^ self |
|
29 | 3664 |
]. |
3665 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3666 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 3667 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3668 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3669 |
'bigStep is: ' print. bigStep printCR. |
3670 |
'steppedContext is: ' print. steppedContext printCR. |
|
2581 | 3671 |
]. |
3672 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3673 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3674 |
"/ 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
|
3675 |
"/ |
10205 | 3676 |
(bigStep |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
3677 |
and:[steppedContext notNil]) ifTrue:[ |
11210 | 3678 |
" |
3679 |
a step or next - ignore all contexts below the interesting one |
|
3680 |
" |
|
3681 |
where := here. "the interrupted context" |
|
3682 |
contextBelow := nil. |
|
3683 |
||
3684 |
where home notNil ifTrue:[ |
|
3685 |
"/ |
|
3686 |
"/ in a block called by 'our' context ? |
|
3687 |
"/ |
|
3688 |
where home == steppedContext ifTrue:[ |
|
13197 | 3689 |
"/ '*block*' printCR. |
11210 | 3690 |
inBlock := true |
3691 |
] |
|
3692 |
]. |
|
3693 |
||
3694 |
where == steppedContext ifFalse:[ |
|
3695 |
where := where sender. |
|
3696 |
||
3697 |
where notNil ifTrue:[ |
|
3698 |
where home == steppedContext ifTrue:[ |
|
13197 | 3699 |
"/ '*block*' printCR. |
11210 | 3700 |
inBlock := true. |
3701 |
] |
|
3702 |
]. |
|
57 | 3703 |
|
3704 |
"/ 'looking for ' print. |
|
3055 | 3705 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 3706 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3707 |
"/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
|
3708 |
"/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
|
3709 |
|
11210 | 3710 |
where == steppedContext ifFalse:[ |
3711 |
||
3712 |
"/ check if we are in a context below steppedContext |
|
3713 |
"/ (i.e. if steppedContext can be reached from |
|
3714 |
"/ interrupted context. Not using context-ref but its |
|
3715 |
"/ address to avoid creation of many useless contexts.) |
|
3716 |
||
3717 |
inBlock ifFalse:[ |
|
3718 |
[where notNil] whileTrue:[ |
|
3719 |
||
3720 |
"/ if either the receiver or any arg of this context |
|
3721 |
"/ is a block of the steppedContext, we must really |
|
3722 |
"/ do a single step. Otherwise, stepping through a |
|
3723 |
"/ do:-loop would be very difficult. |
|
3724 |
receiver := where receiver. |
|
13197 | 3725 |
where selector == #critical: ifTrue:[ |
3726 |
anyStepBlocks := true. |
|
3727 |
] ifFalse:[ |
|
11210 | 3728 |
(receiver isBlock |
3729 |
and:[(receiver isKindOf:Block) |
|
13197 | 3730 |
and:[receiver homeMethod == steppedContext method |
3731 |
"receiver home == steppedContext"]]) |
|
11210 | 3732 |
ifTrue:[ |
3733 |
anyStepBlocks := true. |
|
3734 |
] ifFalse:[ |
|
3735 |
where args do:[:arg | |
|
3736 |
(arg isBlock |
|
3737 |
and:[(arg isKindOf:Block) |
|
13197 | 3738 |
and:[arg homeMethod == steppedContext method |
3739 |
"arg home == steppedContext"]]) |
|
11210 | 3740 |
ifTrue:[ |
3741 |
anyStepBlocks := true. |
|
13197 | 3742 |
] ifFalse:[ |
13218 | 3743 |
(where methodHome notNil |
3744 |
and:[where methodHome receiver isBlock |
|
13197 | 3745 |
and:[(where methodHome receiver isKindOf:Block) |
3746 |
and:[where methodHome receiver homeMethod == steppedContext method |
|
13218 | 3747 |
"where methodHome receiver home == steppedContext"]]]) |
13197 | 3748 |
ifTrue:[ |
3749 |
anyStepBlocks := true. |
|
3750 |
] |
|
3751 |
]. |
|
11210 | 3752 |
] |
3753 |
]. |
|
13197 | 3754 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3755 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3756 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
3757 |
where selector printCR. |
|
3758 |
]. |
|
3759 |
||
3760 |
where == steppedContext ifTrue:[ |
|
3055 | 3761 |
"/ 'found it - below; ignore' printCR. |
11210 | 3762 |
" |
3763 |
found the interesting context somwehere up in the |
|
3764 |
chain. We seem to be still below the interesting one ... |
|
3765 |
" |
|
3766 |
tracing == true ifTrue:[ |
|
3767 |
here printString printCR |
|
3768 |
]. |
|
3769 |
" |
|
3770 |
yes, a context below |
|
3771 |
- continue and schedule another stepInterrupt. |
|
3772 |
Must flush caches since optimized methods not always |
|
3773 |
look for pending interrupts |
|
3774 |
" |
|
3775 |
||
3776 |
contextBelow notNil ifTrue:[ |
|
3055 | 3777 |
"/ '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
|
3778 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3779 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3780 |
"/ 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
|
3781 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3782 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3783 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3784 |
'below stepCon; continue until unwind of: ' print. |
3785 |
contextBelow printCR. |
|
3786 |
]. |
|
3787 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
|
3788 |
StepInterruptPending := nil. |
|
3789 |
] ifFalse:[ |
|
3790 |
ObjectMemory flushInlineCaches. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3791 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3792 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3793 |
"/ 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
|
3794 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3795 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3796 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3797 |
'in stepCon; continue single stepping' printCR. |
3798 |
]. |
|
3799 |
StepInterruptPending := 1. |
|
3800 |
InterruptPending := 1. |
|
3801 |
]. |
|
3802 |
where := nil. here := nil. |
|
3803 |
InStepInterrupt := nil. |
|
3804 |
||
3805 |
^ self |
|
3806 |
]. |
|
3807 |
||
3808 |
(steppedContext notNil and:[ |
|
3809 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
3810 |
inBlockBelow := true. |
|
3811 |
]. |
|
3812 |
||
3813 |
anyStepBlocks ifFalse:[ |
|
3814 |
inBlock ifFalse:[ |
|
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3815 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3816 |
"/ 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
|
3817 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3818 |
where isBlockContext ifFalse:[ |
11210 | 3819 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3820 |
]. |
11210 | 3821 |
] |
3822 |
]. |
|
3823 |
where := where sender |
|
3824 |
]. |
|
3825 |
s := 'context returned'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3826 |
subBlockLeft := true. |
11210 | 3827 |
]. |
3828 |
] ifTrue:[ |
|
3055 | 3829 |
"/ 'found it right in sender' printCR. |
11210 | 3830 |
s := 'after step' |
3831 |
]. |
|
3832 |
] ifTrue:[ |
|
3055 | 3833 |
"/ 'found it right away' printCR. |
11210 | 3834 |
s := 'after step' |
3835 |
]. |
|
0 | 3836 |
] ifFalse:[ |
3055 | 3837 |
"/ ' send' printCR. |
11210 | 3838 |
" |
3839 |
a send |
|
3840 |
" |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3841 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3842 |
'clear steppedContext' printCR. |
3843 |
]. |
|
3844 |
steppedContext := nil. |
|
3845 |
s := 'after send' |
|
0 | 3846 |
]. |
7 | 3847 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3848 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3849 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
11210 | 3850 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3851 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3852 |
|
790 | 3853 |
"/ handle the case, when a subBlock leaves; |
3854 |
"/ continue stepping in the home context. |
|
3855 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3856 |
subBlockLeft ifTrue:[ |
11210 | 3857 |
steppedContext home notNil ifTrue:[ |
3858 |
steppedContext := steppedContext home. |
|
3859 |
s := 'after step'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3860 |
subBlockLeft := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3861 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3862 |
|
11210 | 3863 |
] |
790 | 3864 |
]. |
3865 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3866 |
" |
10205 | 3867 |
kludge to hide breakpoint wrappers in the context list: |
11210 | 3868 |
check if we are in a wrapper methods hidden exit-sequence |
3869 |
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
|
3870 |
" |
10205 | 3871 |
(where isNil |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3872 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3873 |
ifTrue:[ |
11210 | 3874 |
"/ did not find our steppedContext along the chain; |
3875 |
"/ could be in a wrappedMethods exitBlock ... |
|
3876 |
||
3877 |
leftWrap ifFalse:[ |
|
3878 |
where := here. |
|
3879 |
wrappedMethod := nil. |
|
3880 |
5 timesRepeat:[ |
|
3881 |
where notNil ifTrue:[ |
|
3882 |
where isBlockContext ifFalse:[ |
|
3883 |
method := where method. |
|
3884 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3885 |
where == wrapperContext ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3886 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3887 |
'change stepCon fromWrapped: ' print. |
3888 |
steppedContext print. |
|
3889 |
' to: ' print. |
|
3890 |
wrapperContext printCR. |
|
3891 |
]. |
|
3892 |
||
3893 |
inWrap := true. |
|
3894 |
enteredWrap := true. |
|
3895 |
steppedContext := wrapperContext. |
|
3896 |
wrapperContext := nil. |
|
3897 |
] |
|
3898 |
]. |
|
3899 |
]. |
|
3900 |
where := where sender |
|
3901 |
] |
|
3902 |
]. |
|
3903 |
]. |
|
3904 |
enteredWrap ifTrue:[ |
|
3905 |
ignore := true |
|
3906 |
] |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3907 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3908 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3909 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3910 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3911 |
subBlockLeft ifTrue:[ |
11210 | 3912 |
"/ special care for stepInterrupt in send, |
3913 |
"/ when created a dummy context (lineNr == 1) |
|
3914 |
||
3915 |
steppedContext lineNumber isNil ifTrue:[ |
|
3916 |
steppedContext selector == here sender selector ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3917 |
subBlockLeft := false. |
11210 | 3918 |
s := 'after step'. |
3919 |
steppedContext := here sender. |
|
3920 |
]. |
|
3921 |
]. |
|
3922 |
oneMore := true |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3923 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3924 |
|
57 | 3925 |
inBlock ifTrue:[ |
13197 | 3926 |
DebuggingDebugger2 == true ifTrue:[ |
3927 |
'inBlock' printCR. |
|
3928 |
]. |
|
11210 | 3929 |
s := 'in block'. |
57 | 3930 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3931 |
inBlockBelow ifTrue:[ |
13197 | 3932 |
DebuggingDebugger2 == true ifTrue:[ |
3933 |
'inBlockBelow' printCR. |
|
3934 |
]. |
|
11210 | 3935 |
ignore := true |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3936 |
]. |
57 | 3937 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3938 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3939 |
where notNil ifTrue:[ |
3940 |
'(' print. steppedContextLineno print. ') ' print. |
|
3941 |
where printCR. |
|
3942 |
]. |
|
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
3943 |
]. |
57 | 3944 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3945 |
ignore ifFalse:[ |
11210 | 3946 |
(bigStep |
3947 |
and:[steppedContextLineno notNil |
|
3948 |
and:[where notNil |
|
3949 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
|
3950 |
(here isBlockContext |
|
3951 |
and:[(here methodHome == steppedContext) |
|
3952 |
or:[here home == steppedContext]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3953 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3954 |
'same line but in block' printCR. |
3955 |
]. |
|
3956 |
||
3957 |
steppedContext := actualContext := here. |
|
3958 |
steppedContextLineno := here lineNumber. |
|
3959 |
] ifFalse:[ |
|
3960 |
"/ kludge - I only have the info for up to 255 lines |
|
3961 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3962 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3963 |
'same line - ignored' printCR. |
3964 |
]. |
|
3965 |
ignore := true |
|
3966 |
]. |
|
3967 |
]. |
|
3968 |
]. |
|
3969 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3970 |
(subBlockLeft not |
11210 | 3971 |
and:[skipLineNr notNil |
3972 |
and:[where notNil |
|
3973 |
and:[where lineNumber notNil |
|
3974 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3975 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3976 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
3977 |
]. |
|
3978 |
ignore := true |
|
3979 |
]. |
|
3980 |
||
3981 |
(steppedContextLineno isNil |
|
3982 |
and:[skipLineNr isNil |
|
3983 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3984 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3985 |
'same line2 (after conIRQ) - ignored' printCR. |
3986 |
]. |
|
3987 |
ignore := true |
|
3988 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3989 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3990 |
|
57 | 3991 |
ignore ifTrue:[ |
3055 | 3992 |
"/' ' printCR. |
11210 | 3993 |
where := nil. here := nil. |
3994 |
" |
|
3995 |
yes, a context below |
|
3996 |
- continue and schedule another stepInterrupt. |
|
3997 |
Must flush caches since optimized methods not always |
|
3998 |
look for pending interrupts |
|
3999 |
" |
|
4000 |
ObjectMemory flushInlineCaches. |
|
4001 |
StepInterruptPending := 1. |
|
4002 |
InterruptPending := 1. |
|
4003 |
InStepInterrupt := nil. |
|
4004 |
^ self |
|
57 | 4005 |
]. |
4006 |
||
3055 | 4007 |
"/ ' ' printCR. |
57 | 4008 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
4009 |
self label:(s , ' (process: ' , processName , ')'). |
7 | 4010 |
|
57 | 4011 |
tracing := false. |
4012 |
bigStep := false. |
|
4013 |
||
0 | 4014 |
"release refs to context" |
4015 |
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
|
4016 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4017 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4018 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 4019 |
'==> 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
|
4020 |
]. |
1364 | 4021 |
|
4022 |
initiallyShown := nil. |
|
4023 |
(oneMore == true) ifTrue:[ |
|
11210 | 4024 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
4025 |
initiallyShown := 2 |
|
4026 |
] ifFalse:[ |
|
4027 |
initiallyShown := 1 |
|
4028 |
] |
|
1364 | 4029 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4030 |
con := thisContext sender sender. |
3435 | 4031 |
|
9235 | 4032 |
HaltInterrupt handle:[:ex | |
11210 | 4033 |
'DebugView [info]: halt/breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
4034 |
ex proceed |
|
3435 | 4035 |
] do:[ |
11210 | 4036 |
self enter:con select:initiallyShown |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4037 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4038 |
con := nil |
1364 | 4039 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4040 |
"Created: / 14-10-1996 / 12:53:39 / cg" |
11636 | 4041 |
"Modified: / 20-07-2012 / 15:26:26 / cg" |
0 | 4042 |
! ! |
4043 |
||
4867 | 4044 |
!DebugView methodsFor:'menu & button actions'! |
266 | 4045 |
|
5875 | 4046 |
addBrowserBookmark |
4047 |
"add a browser-bookmark for the selected contexts method" |
|
4048 |
||
4049 |
|cls sel| |
|
4050 |
||
4051 |
selectedContext isNil ifTrue:[^ self]. |
|
4052 |
||
4053 |
cls := selectedContext receiver class. |
|
4054 |
sel := selectedContext selector. |
|
4055 |
(cls includesSelector:sel) ifFalse:[ |
|
11210 | 4056 |
sel := nil |
5875 | 4057 |
]. |
4058 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
4059 |
! |
|
4060 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4061 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4062 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4063 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4064 |
"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
|
4065 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4066 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4067 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4068 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4069 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4070 |
"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
|
4071 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4072 |
|
266 | 4073 |
autoUpdateOff |
4074 |
"stop the update process" |
|
4075 |
||
4076 |
updateProcess notNil ifTrue:[ |
|
11210 | 4077 |
monitorToggle lampColor:(Color yellow). |
4078 |
updateProcess terminate. |
|
4079 |
updateProcess := nil |
|
266 | 4080 |
] |
4081 |
! |
|
4082 |
||
4083 |
autoUpdateOn |
|
4084 |
"fork a subprocess which updates the contextList in regular intervals" |
|
4085 |
||
4086 |
updateProcess isNil ifTrue:[ |
|
11210 | 4087 |
updateProcess := |
4088 |
[ |
|
4089 |
[true] whileTrue:[ |
|
4090 |
monitorToggle showLamp ifTrue:[ |
|
4091 |
monitorToggle lampColor:(Color yellow). |
|
4092 |
] ifFalse:[ |
|
4093 |
monitorToggle activeForegroundColor:Color black. |
|
4094 |
]. |
|
4095 |
(Delay forSeconds:0.25) wait. |
|
4096 |
self updateContext. |
|
4097 |
monitorToggle showLamp ifTrue:[ |
|
4098 |
monitorToggle lampColor:(Color red). |
|
4099 |
] ifFalse:[ |
|
4100 |
monitorToggle activeForegroundColor:Color red. |
|
4101 |
]. |
|
4102 |
(Delay forSeconds:0.25) wait. |
|
4103 |
self updateContext. |
|
4104 |
] |
|
4105 |
] forkAt:(Processor activePriority - 1) |
|
266 | 4106 |
] |
4107 |
||
4108 |
! |
|
4109 |
||
13408 | 4110 |
browseBlocksHome |
4111 |
"browse the receiver block's home method (if a value-like send is selected)" |
|
4112 |
||
13414 | 4113 |
|cls sel block mthd| |
13408 | 4114 |
|
4115 |
selectedContext isNil ifTrue:[^ self]. |
|
4116 |
(block := selectedContext receiver) isBlock ifFalse:[ ^ self ]. |
|
4117 |
||
13414 | 4118 |
mthd := block method. |
4119 |
cls := mthd mclass. |
|
4120 |
sel := mthd selector. |
|
4121 |
||
4122 |
(cls notNil and:[(cls includesSelector:sel)]) ifTrue:[ |
|
4123 |
cls browserClass openInClass:cls selector:sel. |
|
4124 |
^ self |
|
4125 |
]. |
|
4126 |
||
4127 |
mthd source notEmptyOrNil ifTrue:[ |
|
13415 | 4128 |
(Dialog confirm:'Block''s home method is (no longer) present in any class.\Do you want to see the method anyway?' withCRs) |
13414 | 4129 |
ifTrue:[ |
4130 |
UserPreferences current systemBrowserClass |
|
4131 |
browseMethods:{ mthd } title:'Unbound Method' sort:false |
|
4132 |
"/ TextView openWith:mthd source title:'Unbound Method''s Source'. |
|
4133 |
]. |
|
4134 |
^ self |
|
4135 |
]. |
|
4136 |
cls notNil ifTrue:[ |
|
4137 |
(Dialog confirm:'Block''s home method is (no longer) present in any class and no source can be shown.\Do you want to browse the method''s last class instead?' withCRs) |
|
4138 |
ifTrue:[ |
|
4139 |
cls browserClass openInClass:cls selector:nil. |
|
4140 |
]. |
|
4141 |
^ self |
|
4142 |
]. |
|
4143 |
Dialog information:'Block''s home method is (no longer) present in any class.'. |
|
13408 | 4144 |
! |
4145 |
||
3269 | 4146 |
browseClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4147 |
"browse the receiver's class (of the selected context's message)" |
3269 | 4148 |
|
4149 |
|cls sel| |
|
4150 |
||
4151 |
selectedContext isNil ifTrue:[^ self]. |
|
4152 |
||
4153 |
cls := selectedContext receiver class. |
|
4154 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
4155 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 4156 |
sel := nil |
3269 | 4157 |
]. |
4158 |
cls browserClass openInClass:cls selector:sel. |
|
4159 |
||
4160 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
4161 |
! |
|
4162 |
||
4163 |
browseClassHierarchy |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4164 |
"browse the receiver's classHierarchy (of the selected context's message)" |
3269 | 4165 |
|
4166 |
|cls mthd| |
|
4167 |
||
4168 |
selectedContext isNil ifTrue:[^ self]. |
|
4169 |
||
4170 |
mthd := selectedContext method. |
|
3447 | 4171 |
mthd notNil ifTrue:[ |
11210 | 4172 |
cls := mthd containingClass. |
4173 |
"/ still nil if unbound - then use receivers class |
|
3447 | 4174 |
]. |
4175 |
cls isNil ifTrue:[ |
|
11210 | 4176 |
cls := selectedContext receiver class |
3269 | 4177 |
]. |
4178 |
cls browserClass browseClassHierarchy:cls. |
|
4179 |
||
3447 | 4180 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 4181 |
! |
4182 |
||
4183 |
browseFullClassProtocol |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4184 |
"browse the receiver's full protocol (of the selected context's message)" |
3269 | 4185 |
|
4186 |
|cls mthd| |
|
4187 |
||
4188 |
selectedContext isNil ifTrue:[^ self]. |
|
4189 |
||
4190 |
mthd := selectedContext method. |
|
3447 | 4191 |
mthd notNil ifTrue:[ |
11210 | 4192 |
cls := mthd containingClass. |
4193 |
"/ still nil if unbound - then use receivers class |
|
3447 | 4194 |
]. |
4195 |
cls isNil ifTrue:[ |
|
11210 | 4196 |
cls := selectedContext receiver class |
3269 | 4197 |
]. |
4198 |
cls browserClass browseFullClassProtocol:cls. |
|
4199 |
||
3447 | 4200 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 4201 |
! |
4202 |
||
4203 |
browseImplementingClass |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4204 |
"browse the implementing class (of the selected context's message)" |
3269 | 4205 |
|
11610 | 4206 |
|con mthd who sel cls home| |
4207 |
||
4208 |
con := selectedContext ? actualContext. |
|
4209 |
con isNil ifTrue:[^ self]. |
|
4210 |
||
4211 |
mthd := con method. |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4212 |
mthd notNil ifTrue:[ |
11610 | 4213 |
who := mthd who. |
11210 | 4214 |
who notNil ifTrue:[ |
4215 |
cls := who methodClass. |
|
4216 |
sel := who methodSelector. |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4217 |
] ifFalse:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4218 |
"might have been re-accepted" |
11610 | 4219 |
(home := con methodHome) notNil ifTrue:[ |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4220 |
(sel := home selector) notNil ifTrue:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4221 |
cls := home receiver class |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
4222 |
whichClassImplements:selectedContext selector. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
4223 |
cls notNil ifTrue:[ |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
4224 |
Dialog information:'Method has been changed/moved in the meanwhile.\Browser will show the most recent (current) version.' withCRs. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
4225 |
]. |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4226 |
] |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4227 |
]. |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4228 |
]. |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4229 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4230 |
cls isNil ifTrue:[ |
11210 | 4231 |
"/ class not found - try receiver |
11610 | 4232 |
cls := con receiver class |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4233 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4234 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4235 |
cls browserClass openInClass:cls selector:sel. |
266 | 4236 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4237 |
"Created: / 22-11-1995 / 21:27:01 / cg" |
11610 | 4238 |
"Modified: / 19-07-2012 / 11:27:32 / cg" |
266 | 4239 |
! |
4240 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4241 |
browseImplementors |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4242 |
"open a browser on the implementors of the selected method's selector" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4243 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4244 |
selectedContext isNil ifTrue:[ |
11210 | 4245 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4246 |
]. |
4153 | 4247 |
"/ selectedContext receiver class browserClass |
11610 | 4248 |
self withWaitCursorDo:[ |
4249 |
UserPreferences systemBrowserClass |
|
4250 |
browseImplementorsOf:selectedContext selector. |
|
4251 |
] |
|
4252 |
||
4253 |
"Modified: / 19-07-2012 / 11:44:03 / cg" |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4254 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4255 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4256 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4257 |
"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
|
4258 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4259 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4260 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4261 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 4262 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4263 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4264 |
initial isNil ifTrue:[ |
11210 | 4265 |
initial := selectedContext isNil |
4266 |
ifTrue:[nil] |
|
4267 |
ifFalse:[selectedContext selector]. |
|
10205 | 4268 |
]. |
4269 |
selector := Dialog |
|
11210 | 4270 |
requestSelector:'Selector to browse implementors of:' |
4271 |
initialAnswer:initial. |
|
11610 | 4272 |
|
4273 |
selector notEmptyOrNil ifTrue:[ |
|
4274 |
self withWaitCursorDo:[ |
|
4275 |
UserPreferences systemBrowserClass |
|
4276 |
browseImplementorsMatching:selector. |
|
4277 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4278 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4279 |
|
11610 | 4280 |
"Modified: / 19-07-2012 / 11:43:52 / cg" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4281 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4282 |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4283 |
browseProcessesApplication |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4284 |
"browse the application class (of the process, if it is a GUI process)" |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4285 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4286 |
|p appClass| |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4287 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4288 |
p := inspectedProcess ? Processor activeProcess. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4289 |
(p notNil and:[p isGUIProcess]) ifTrue:[ |
11210 | 4290 |
WindowGroup scheduledWindowGroups do:[:wg | |
4291 |
wg process == p ifTrue:[ |
|
4292 |
appClass := wg application class. |
|
4293 |
appClass browserClass openInClass:appClass selector:nil. |
|
4294 |
^ self |
|
4295 |
] |
|
4296 |
] |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4297 |
]. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4298 |
! |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4299 |
|
3269 | 4300 |
browseReceiversClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4301 |
"browse the receiver's class (of the selected context's message)" |
3269 | 4302 |
|
4303 |
|cls sel| |
|
4304 |
||
4305 |
selectedContext isNil ifTrue:[^ self]. |
|
4306 |
||
11610 | 4307 |
selectedContext isCheapBlockContext ifTrue:[ |
4308 |
cls := selectedContext method mclass. |
|
4309 |
sel := selectedContext method selector. |
|
4310 |
] ifFalse:[ |
|
4311 |
cls := selectedContext receiver class. |
|
4312 |
sel := selectedContext selector. |
|
4313 |
]. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
4314 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 4315 |
sel := nil |
3269 | 4316 |
]. |
4317 |
cls browserClass openInClass:cls selector:sel. |
|
4318 |
||
11610 | 4319 |
"Modified: / 19-07-2012 / 11:29:48 / cg" |
3269 | 4320 |
! |
4321 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4322 |
browseSenders |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4323 |
"open a browser on the senders of the selected method's selector" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4324 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4325 |
selectedContext isNil ifTrue:[ |
11210 | 4326 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4327 |
]. |
11610 | 4328 |
self withWaitCursorDo:[ |
4329 |
UserPreferences systemBrowserClass |
|
4330 |
browseAllCallsOn:selectedContext selector. |
|
4331 |
] |
|
4332 |
||
4333 |
"Modified: / 19-07-2012 / 11:43:02 / cg" |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4334 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4335 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4336 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4337 |
"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
|
4338 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4339 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4340 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4341 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 4342 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4343 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4344 |
initial isNil ifTrue:[ |
11210 | 4345 |
initial := selectedContext isNil |
4346 |
ifTrue:[nil] |
|
4347 |
ifFalse:[selectedContext selector]. |
|
10205 | 4348 |
]. |
4349 |
selector := Dialog |
|
11210 | 4350 |
requestSelector:'Selector to browse senders of:' |
4351 |
initialAnswer:initial. |
|
11610 | 4352 |
|
4353 |
selector notEmptyOrNil ifTrue:[ |
|
4354 |
self withWaitCursorDo:[ |
|
4355 |
UserPreferences systemBrowserClass |
|
4356 |
browseAllCallsOn:selector asSymbol. |
|
4357 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4358 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4359 |
|
11610 | 4360 |
"Modified: / 19-07-2012 / 11:43:29 / cg" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4361 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4362 |
|
11391 | 4363 |
clearRememberedCallchain |
4364 |
"clear the remembered callchain." |
|
4365 |
||
4366 |
RememberedCallChain := nil |
|
4367 |
||
4368 |
"Created: / 08-03-2012 / 01:29:46 / cg" |
|
4369 |
! |
|
4370 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4371 |
closeAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4372 |
(Dialog confirm:'Close all Debuggers (without confirmation if code was changed)?') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4373 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4374 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4375 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4376 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4377 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4378 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4379 |
debugger busy ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4380 |
debugger destroyWithConfirmation:true. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4381 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4382 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4383 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4384 |
self closeRequest. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4385 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4386 |
"Created: / 23-03-2012 / 12:40:22 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4387 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4388 |
|
9626 | 4389 |
configureX:x y:y width:newWidth height:newHeight |
10205 | 4390 |
super configureX:x y:y width:newWidth height:newHeight. |
9626 | 4391 |
LastExtent := self extent. |
4392 |
LastOrigin := self origin. |
|
4393 |
||
4394 |
"Created: / 10-11-2010 / 10:09:11 / cg" |
|
4395 |
! |
|
4396 |
||
266 | 4397 |
copyWalkbackText |
4398 |
"place the contents of the walkback view into the copy-paste buffer. |
|
12884 | 4399 |
This allows pasting it into some other view for printing. |
4400 |
||
4401 |
Show the full verbose context without filtering." |
|
266 | 4402 |
|
10760 | 4403 |
|infoText| |
4404 |
||
12884 | 4405 |
firstContext isNil ifTrue:[ |
10760 | 4406 |
infoText := 'No context, no walkback'. |
4407 |
] ifFalse:[ |
|
12884 | 4408 |
infoText := firstContext fullPrintAllString asStringCollection. |
10760 | 4409 |
]. |
4410 |
||
4411 |
self setClipboardText:infoText |
|
266 | 4412 |
|
4413 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
4414 |
! |
|
4415 |
||
4416 |
doAbort |
|
1187 | 4417 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 4418 |
at save places (for example: in the event loop) and returns back |
4419 |
from whatever the process is doing, but does not terminate it." |
|
4420 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4421 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4422 |
(self confirm:('Code modified - abort anyway ?')) |
4423 |
ifFalse:[ |
|
4424 |
^ self |
|
4425 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4426 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4427 |
|
266 | 4428 |
inspecting ifTrue:[ |
11210 | 4429 |
inspectedProcess isDead ifTrue:[ |
4430 |
self showTerminated. |
|
4431 |
^ self |
|
4432 |
]. |
|
4433 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4434 |
self showError:'** the process does not handle the abort signal **' |
|
4435 |
] ifTrue:[ |
|
4436 |
self interruptProcessWith:[AbortOperationRequest raise]. |
|
4437 |
]. |
|
4438 |
^ self |
|
266 | 4439 |
]. |
4440 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4441 |
steppedContext := wrapperContext := nil. |
266 | 4442 |
haveControl := false. |
4443 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4444 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4445 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4446 |
catchBlock notNil ifTrue:[ |
11210 | 4447 |
abortButton turnOff. |
4448 |
catchBlock value. |
|
4449 |
||
4450 |
"/ not reached |
|
4451 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
266 | 4452 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4453 |
|
266 | 4454 |
^ self. |
4455 |
||
3447 | 4456 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 4457 |
! |
4458 |
||
6487 | 4459 |
doAbortAll |
4460 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
4461 |
at save places (for example: in the event loop) and returns back |
|
4462 |
from whatever the process is doing, but does not terminate it." |
|
4463 |
||
4464 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
11210 | 4465 |
(self confirm:('Code modified - abort anyway ?')) |
4466 |
ifFalse:[ |
|
4467 |
^ self |
|
4468 |
] |
|
6487 | 4469 |
]. |
4470 |
||
4471 |
inspecting ifTrue:[ |
|
11210 | 4472 |
inspectedProcess isDead ifTrue:[ |
4473 |
self showTerminated. |
|
4474 |
^ self |
|
4475 |
]. |
|
4476 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4477 |
self showError:'** the process does not handle the abort signal **' |
|
4478 |
] ifTrue:[ |
|
4479 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
4480 |
]. |
|
4481 |
^ self |
|
6487 | 4482 |
]. |
4483 |
||
4484 |
steppedContext := wrapperContext := nil. |
|
4485 |
haveControl := false. |
|
4486 |
exitAction := #abortAll. |
|
4487 |
||
4488 |
"exit private event-loop" |
|
4489 |
catchBlock notNil ifTrue:[ |
|
11210 | 4490 |
abortButton turnOff. |
4491 |
catchBlock value. |
|
4492 |
||
4493 |
"/ not reached |
|
4494 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
6487 | 4495 |
]. |
4496 |
||
4497 |
^ self. |
|
4498 |
||
4499 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
4500 |
! |
|
4501 |
||
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4502 |
doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4503 |
"ask for and change the process's priority" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4504 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4505 |
|oldPrio newPrio s| |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4506 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4507 |
oldPrio := (inspectedProcess ? Processor activeProcess) priority. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4508 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4509 |
[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4510 |
s := Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4511 |
request:(resources stringWithCRs:'Change the processes priority to (proceed with prio):\\ 2 - system background\ 4 - user background\ 8 - normal\ 9 - high\ 16 - I/O (danger alert)\') |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4512 |
initialAnswer:oldPrio printString. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4513 |
s isEmptyOrNil ifTrue:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4514 |
newPrio := Integer readFrom:s onError:nil. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4515 |
newPrio isNil |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4516 |
] whileTrue. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4517 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4518 |
newPrio := newPrio max:(Processor lowestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4519 |
newPrio := newPrio min:(Processor highestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4520 |
newPrio >= Processor highIOPriority ifTrue:[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4521 |
(Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4522 |
confirm:(resources |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4523 |
stringWithCRs:'Attention: event handling takes place at prio 16.\An ever running high priority process\could block the system and make the UI unusable.\\Proceed?')) |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4524 |
ifFalse:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4525 |
]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4526 |
(inspectedProcess ? Processor activeProcess) priority:newPrio. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4527 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4528 |
"Created: / 07-03-2012 / 14:15:09 / cg" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4529 |
! |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4530 |
|
266 | 4531 |
doContinue |
4532 |
"continue from menu" |
|
4533 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4534 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4535 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4536 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4537 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
4538 |
^ self |
|
4539 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4540 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4541 |
|
266 | 4542 |
inspecting ifTrue:[ |
11210 | 4543 |
device hasColors ifTrue:[ |
4544 |
continueButton foregroundColor:Color red darkened. |
|
4545 |
]. |
|
4546 |
continueButton label:(resources string:'Stop'). |
|
4547 |
continueButton action:[self doStop]. |
|
4548 |
||
4549 |
self processPerform:#resume. |
|
4550 |
||
4551 |
^ self |
|
266 | 4552 |
]. |
4553 |
canContinue ifTrue:[ |
|
11210 | 4554 |
exContext := thisContext findSpecialHandle:false raise:true. |
4555 |
||
4556 |
(exContext notNil |
|
4557 |
and:[ (ex := exContext receiver) isLazyValue not |
|
4558 |
and:[ ex isException |
|
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
4559 |
and:[ ex creator == NoHandlerError |
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
4560 |
and:[ ex exception creator == RecursionError]]]]) |
11210 | 4561 |
ifTrue:[ |
4562 |
"/ debug due to unhandled recursionInterrupt. |
|
4563 |
"/ ask if we should proceed with more stack. |
|
4564 |
||
4565 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
|
4566 |
answer == true ifTrue:[ |
|
4567 |
proc := Processor activeProcess. |
|
4568 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
|
4569 |
]. |
|
4570 |
]. |
|
4571 |
||
4572 |
steppedContext := wrapperContext := nil. |
|
4573 |
tracing := false. |
|
4574 |
haveControl := false. |
|
4575 |
exitAction := #continue. |
|
4576 |
||
4577 |
"exit private event-loop" |
|
4578 |
catchBlock value. |
|
4579 |
||
4580 |
"/ not reached. |
|
4581 |
'DebugView [warning]: continue failed' errorPrintCR. |
|
4582 |
continueButton turnOff. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4583 |
|
266 | 4584 |
] ifFalse:[ |
11210 | 4585 |
inspecting ifFalse:[ |
4586 |
'DebugView [info]: resuming top context' infoPrintCR. |
|
4587 |
self showSelection:1. |
|
4588 |
self doReturn |
|
4589 |
] |
|
266 | 4590 |
] |
477 | 4591 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
4592 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 4593 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 4594 |
! |
4595 |
||
13351 | 4596 |
doContinueAfterDelay |
4597 |
Delay waitForSeconds:5. |
|
4598 |
self doContinue. |
|
4599 |
! |
|
4600 |
||
3187 | 4601 |
doDefine |
5955 | 4602 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4603 |
bagOfClassNames bagOfUsedClassNames implClass idx callee restart varName argName| |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4604 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4605 |
selectionIndex := contextView selection. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4606 |
restart := true. |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4607 |
|
3283 | 4608 |
selector := actualContext selector. |
8963 | 4609 |
implClass := actualContext receiver class whichClassIncludesSelector:selector. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4610 |
implClass notNil ifTrue:[ |
11210 | 4611 |
"/ must be a subclassResponsibility |
4612 |
||
4613 |
idx := contextArray identityIndexOf:actualContext. |
|
4614 |
idx > 1 ifTrue:[ |
|
4615 |
callee := contextArray at:idx-1. |
|
4616 |
||
4617 |
callee selector == #subclassResponsibility ifTrue:[ |
|
4618 |
restart := false. |
|
4619 |
] |
|
4620 |
]. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4621 |
]. |
5955 | 4622 |
|
4623 |
"generate nice argument names" |
|
4624 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
4625 |
bagOfUsedClassNames := Bag new. |
|
10205 | 4626 |
argNames := actualContext args |
11210 | 4627 |
collect: |
4628 |
[:eachArg | |
|
4629 |
|nm| |
|
4630 |
||
12080 | 4631 |
nm := eachArg class nameWithoutPrefix. |
11210 | 4632 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
4633 |
nm article , nm |
|
4634 |
] ifFalse:[ |
|
4635 |
bagOfUsedClassNames add:nm. |
|
4636 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
4637 |
]. |
|
4638 |
]. |
|
5955 | 4639 |
|
4640 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 4641 |
|
3447 | 4642 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
4643 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
4644 |
||
4645 |
actualContext receiver isNil ifTrue:[ |
|
11210 | 4646 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
4647 |
ifFalse:[ |
|
4648 |
^ self |
|
4649 |
] |
|
3447 | 4650 |
]. |
4651 |
||
4652 |
receiversClass := actualContext receiver class. |
|
4653 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4654 |
"/ code for a getter |
3447 | 4655 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
11210 | 4656 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
4657 |
cat := 'accessing'. |
|
3447 | 4658 |
]. |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4659 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4660 |
"/ code for a setter |
3447 | 4661 |
(selector numArgs == 1 |
4662 |
and:[(selector endsWith:':') |
|
12716
062e27d32904
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12687
diff
changeset
|
4663 |
and:[receiversClass instVarNames includes:(selector copyButLast:1)]]) |
3447 | 4664 |
ifTrue:[ |
12716
062e27d32904
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12687
diff
changeset
|
4665 |
varName := selector copyButLast:1. |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4666 |
argName := argNames first. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4667 |
code := '%1\' , haltStmtFix , '\ %3 := %4.'. |
11210 | 4668 |
cat := 'accessing'. |
3447 | 4669 |
]. |
4670 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4671 |
"/ code for a tester |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4672 |
(selector numArgs == 0 |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4673 |
and:[(selector startsWith:'is') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4674 |
and:[(Smalltalk classNamed:(selector copyFrom:3)) notNil ]]) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4675 |
ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4676 |
(receiversClass nameWithoutPrefix = (selector copyFrom:3)) ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4677 |
code := '%1\' , haltStmtFix , '\ ^ true.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4678 |
] ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4679 |
code := '%1\' , haltStmtFix , '\ ^ false.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4680 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4681 |
cat := 'testing'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4682 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4683 |
|
3447 | 4684 |
"/ actualContext receiver isClass ifTrue:[ |
4685 |
"/ selector == #new ifTrue:[ |
|
4686 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
4687 |
"/ ]. |
|
4688 |
"/ selector == #'new:' ifTrue:[ |
|
4689 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
4690 |
"/ ]. |
|
4691 |
"/ ]. |
|
4692 |
code isNil ifTrue:[ |
|
11210 | 4693 |
code := '%1\' , haltStmtDef |
10205 | 4694 |
]. |
4695 |
||
4696 |
self |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4697 |
codeAccept:(code bindWith:proto with:selector with:varName with:argName) withCRs |
11210 | 4698 |
inClass:receiversClass |
4699 |
unwind:false |
|
4700 |
category:cat |
|
4701 |
onCancel:[^ self]. |
|
3269 | 4702 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4703 |
self doShowSelection:selectionIndex. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4704 |
restart ifTrue:[ |
11210 | 4705 |
self doRestart |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4706 |
] |
3427 | 4707 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4708 |
"Modified: / 23-03-2012 / 09:49:31 / cg" |
3187 | 4709 |
! |
4710 |
||
13362 | 4711 |
doGotoDialogOpener |
4712 |
"select the context where the dialog was opened" |
|
4713 |
||
4714 |
contextArray keysAndValuesDo:[:i :c | |
|
13388 | 4715 |
|nextCon nextRcvr dialog| |
4716 |
||
4717 |
"/ find the openModal, then walk upward |
|
13367 | 4718 |
((c selector == #openModal) or:[c selector == #openModal:]) ifTrue:[ |
13362 | 4719 |
dialog := c receiver. |
13388 | 4720 |
nextCon := contextArray at:i+1. |
4721 |
"/ while still in dialog code |
|
13368 | 4722 |
[ |
4723 |
nextRcvr := nextCon receiver. |
|
4724 |
(nextRcvr == dialog) |
|
4725 |
or:[ nextRcvr == dialog class |
|
4726 |
or:[ nextRcvr == DialogBox ]] |
|
13363 | 4727 |
] whileTrue:[ |
13388 | 4728 |
(nextCon isBlockContext and:[ nextCon methodHome notNil]) ifTrue:[ |
4729 |
nextCon := nextCon methodHome |
|
4730 |
]. |
|
4731 |
nextCon := nextCon sender. |
|
13363 | 4732 |
]. |
13388 | 4733 |
"/ while still in a Notification |
13368 | 4734 |
[ |
4735 |
nextRcvr := nextCon receiver. |
|
4736 |
(nextRcvr isKindOf:UserInformation) |
|
4737 |
or:[ nextRcvr isBehavior |
|
4738 |
and:[nextRcvr includesBehavior:UserInformation]] |
|
13362 | 4739 |
] whileTrue:[ |
13388 | 4740 |
nextCon := nextCon sender |
13362 | 4741 |
]. |
13388 | 4742 |
self selectContext:nextCon. |
13362 | 4743 |
^ self. |
4744 |
] |
|
4745 |
]. |
|
13388 | 4746 |
"/ not found |
13362 | 4747 |
gotoDialogOpenerButton disable. |
4748 |
! |
|
4749 |
||
12671 | 4750 |
doInspectProcess |
4751 |
(inspectedProcess ? Processor activeProcess) inspect. |
|
4752 |
! |
|
4753 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4754 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4755 |
"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
|
4756 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4757 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4758 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4759 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4760 |
(self confirm:('Code modified - step anyway ?')) |
4761 |
ifFalse:[ |
|
4762 |
^ self |
|
4763 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4764 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4765 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4766 |
canContinue ifTrue:[ |
11210 | 4767 |
steppedContext := wrapperContext := nil. |
4768 |
haveControl := false. |
|
4769 |
exitAction := #step. |
|
4770 |
||
4771 |
"exit private event-loop" |
|
4772 |
catchBlock value. |
|
4773 |
||
4774 |
"/ not reached |
|
4775 |
'DebugView [warning]: send failed' errorPrintCR. |
|
4776 |
sendButton turnOff. |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4777 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4778 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4779 |
"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
|
4780 |
"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
|
4781 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4782 |
|
266 | 4783 |
doNext |
1072 | 4784 |
"skip for next source-code line; entering blocks" |
266 | 4785 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4786 |
stepHow := #nextIn. |
266 | 4787 |
self doStep:nil |
790 | 4788 |
|
1072 | 4789 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4790 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4791 |
|
13351 | 4792 |
doNextAfterDelay |
4793 |
Delay waitForSeconds:5. |
|
4794 |
self doNext. |
|
4795 |
! |
|
4796 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4797 |
doNextOut |
1072 | 4798 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4799 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4800 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4801 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4802 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4803 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 4804 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4805 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4806 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4807 |
doNextOver |
1072 | 4808 |
"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
|
4809 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4810 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4811 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4812 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4813 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 4814 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 4815 |
! |
4816 |
||
4817 |
doNoTrace |
|
4818 |
traceView notNil ifTrue:[ |
|
11210 | 4819 |
traceView topView destroy. |
4820 |
traceView := nil. |
|
266 | 4821 |
]. |
4822 |
tracing := false |
|
4823 |
! |
|
4824 |
||
4356 | 4825 |
doOpenReportMailApp |
4826 |
"open a mail report tool" |
|
4827 |
||
4828 |
| str | |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4829 |
|
4356 | 4830 |
str := '' writeStream. |
4831 |
||
4832 |
str nextPutLine:('Error notification from ' |
|
11210 | 4833 |
, OperatingSystem getLoginName |
4834 |
, '@' |
|
4835 |
, OperatingSystem getHostName). |
|
4356 | 4836 |
str cr. |
4837 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
4838 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 4839 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
4840 |
str nextPutLine:('Description: ' , self label). |
|
4841 |
"/ str nextPutLine:('Error: ', printedException description). |
|
4842 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
4843 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
4844 |
str nextPutLine:'Backtrace:'. |
|
4845 |
str cr. |
|
4846 |
||
4847 |
firstContext notNil ifTrue:[ |
|
11210 | 4848 |
firstContext fullPrintAllOn:str. |
4356 | 4849 |
]. |
4850 |
str cr;cr. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4851 |
|
10205 | 4852 |
SendMailTool |
11210 | 4853 |
openForMessage:(str contents) |
4854 |
withSubject:('STX Error:[', self label, ']') |
|
4855 |
preOpenBlock:[:inst| |
|
4856 |
inst recipientEntryField value:'error@exept.de' |
|
4857 |
]. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4858 |
|
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4859 |
"Modified: / 20-09-2007 / 12:40:40 / cg" |
4356 | 4860 |
! |
4861 |
||
13360 | 4862 |
doResend |
4863 |
"resend - the selected context is unwound and its message resent. |
|
4864 |
To be done after a cde change, to get nto the new method" |
|
4865 |
||
4866 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
4867 |
(self confirm:('Code modified - resend anyway ?')) ifFalse:[ |
|
4868 |
^ self |
|
4869 |
] |
|
4870 |
]. |
|
4871 |
inspecting ifTrue:[ |
|
4872 |
^ self showError:'** not avail in inspecting debugger **' |
|
4873 |
]. |
|
4874 |
steppedContext := wrapperContext := nil. |
|
4875 |
haveControl := false. |
|
4876 |
exitAction := #resend. "exit private event-loop" |
|
4877 |
||
4878 |
catchBlock value. |
|
4879 |
||
4880 |
"/ normally not reached |
|
4881 |
||
4882 |
'DebugView [warning]: resend failed' errorPrintCR. |
|
4883 |
resendButton turnOff. |
|
4884 |
! |
|
4885 |
||
266 | 4886 |
doRestart |
4887 |
"restart - the selected context will be restarted" |
|
10205 | 4888 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4889 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4890 |
(self confirm:('Code modified - restart anyway ?')) ifFalse:[ |
4891 |
^ self |
|
4892 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4893 |
]. |
266 | 4894 |
inspecting ifTrue:[ |
11210 | 4895 |
selectedContext isNil ifTrue:[ |
4896 |
^ self showError:'** select a context first **' |
|
4897 |
]. |
|
4898 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
|
4899 |
^ self |
|
266 | 4900 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4901 |
steppedContext := wrapperContext := nil. |
266 | 4902 |
haveControl := false. |
6365 | 4903 |
exitAction := #restart. "exit private event-loop" |
4904 |
||
4905 |
catchBlock value. |
|
4906 |
||
4907 |
"/ normally not reached |
|
10205 | 4908 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4909 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4910 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4911 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4912 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 4913 |
! |
4914 |
||
4915 |
doReturn |
|
4916 |
"return - the selected context will do a ^nil" |
|
4917 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4918 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4919 |
(self confirm:('Code modified - return anyway ?')) |
4920 |
ifFalse:[ |
|
4921 |
^ self |
|
4922 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4923 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4924 |
|
266 | 4925 |
inspecting ifTrue:[ |
11210 | 4926 |
selectedContext isNil ifTrue:[ |
4927 |
^ self showError:'** select a context first **' |
|
4928 |
]. |
|
4929 |
self interruptProcessWith:[selectedContext unwind:nil]. |
|
4930 |
^ self |
|
266 | 4931 |
]. |
4932 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4933 |
steppedContext := wrapperContext := nil. |
266 | 4934 |
haveControl := false. |
4935 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4936 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4937 |
"exit private event-loop" |
6365 | 4938 |
catchBlock value. |
477 | 4939 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4940 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4941 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4942 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4943 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4944 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 4945 |
! |
4946 |
||
4947 |
doSend |
|
4948 |
"single send; reenter with next message send" |
|
4949 |
||
1072 | 4950 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4951 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4952 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4953 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4954 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4955 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4956 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4957 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4958 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4959 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4960 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4961 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4962 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4963 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4964 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4965 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4966 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4967 |
|
1072 | 4968 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 4969 |
! |
4970 |
||
4971 |
doStep |
|
4972 |
"skip for next send in selected method" |
|
4973 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4974 |
stepHow := #step. |
790 | 4975 |
self doStep:-1 |
4976 |
||
1072 | 4977 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 4978 |
! |
4979 |
||
13197 | 4980 |
doStep:lineNrOrNilOrMinus1 |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4981 |
"common helper for step, skip & next. |
10205 | 4982 |
Arrange for single-steppping until we pass lineNr (if nonNil) |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4983 |
or to next line (if nil) or to next send (if -1)" |
266 | 4984 |
|
4985 |
|con method| |
|
4986 |
||
4987 |
inspecting ifTrue:[^ self]. |
|
4988 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4989 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4990 |
(self confirm:('Code modified - step anyway ?')) |
4991 |
ifFalse:[ |
|
4992 |
^ self |
|
4993 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4994 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4995 |
|
266 | 4996 |
canContinue ifTrue:[ |
11210 | 4997 |
selectedContext notNil ifTrue:[ |
4998 |
con := actualContext. "/ selectedContext. |
|
4999 |
steppedContextLineno := actualContext lineNumber. |
|
5000 |
] ifFalse:[ |
|
5001 |
con := contextArray at:2. |
|
5002 |
steppedContextLineno := con lineNumber. |
|
5003 |
]. |
|
5004 |
||
13197 | 5005 |
skipLineNr := lineNrOrNilOrMinus1. |
5006 |
||
5007 |
lineNrOrNilOrMinus1 == -1 ifTrue:[ |
|
11210 | 5008 |
steppedContextLineno := skipLineNr := nil. |
5009 |
]. |
|
5010 |
||
5011 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
|
5012 |
steppedContext := contextArray at:1. |
|
5013 |
stepHow := #nextIn. |
|
5014 |
] ifFalse:[ |
|
5015 |
stepHow == #nextOut ifTrue:[ |
|
5016 |
steppedContext := con home. |
|
5017 |
] ifFalse:[ |
|
5018 |
steppedContext := con. |
|
5019 |
]. |
|
5020 |
]. |
|
13197 | 5021 |
|
11210 | 5022 |
wrapperContext := nil. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5023 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
5024 |
"/ ' 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
|
5025 |
|
11210 | 5026 |
" |
5027 |
if we step in a wrapped method, |
|
5028 |
prepare to skip the prolog ... |
|
5029 |
" |
|
5030 |
||
5031 |
inWrap := false. |
|
5032 |
method := con method. |
|
5033 |
(method notNil |
|
5034 |
and:[method isWrapped |
|
5035 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
|
5036 |
inWrap := true |
|
5037 |
]. |
|
5038 |
||
13197 | 5039 |
lineNrOrNilOrMinus1 == #return ifTrue:[ |
11210 | 5040 |
Processor activeProcess forceInterruptOnReturnOf:con. |
5041 |
]. |
|
5042 |
||
5043 |
con := nil. |
|
5044 |
bigStep := true. |
|
5045 |
haveControl := false. |
|
5046 |
exitAction := #step. |
|
5047 |
||
5048 |
"exit private event-loop" |
|
5049 |
catchBlock value. |
|
5050 |
||
5051 |
"/ not reached |
|
5052 |
'DebugView [warning]: step failed' errorPrintCR. |
|
5053 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
|
266 | 5054 |
] |
477 | 5055 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5056 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 5057 |
! |
5058 |
||
13351 | 5059 |
doStepAfterDelay |
5060 |
Delay waitForSeconds:5. |
|
5061 |
self doStep. |
|
5062 |
! |
|
5063 |
||
266 | 5064 |
doStop |
5065 |
"stop the process (if its running, otherwise this is a no-op)" |
|
5066 |
||
5067 |
inspecting ifTrue:[ |
|
11210 | 5068 |
device hasColors ifTrue:[ |
5069 |
continueButton foregroundColor:Color green darkened darkened. |
|
5070 |
]. |
|
5071 |
continueButton label:(resources string:'Continue'). |
|
5072 |
continueButton action:[self doContinue]. |
|
5073 |
||
5074 |
self processPerform:#stop. |
|
5075 |
||
5076 |
^ self |
|
266 | 5077 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
5078 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
5079 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 5080 |
! |
5081 |
||
5082 |
doTerminate |
|
5083 |
"terminate - the process has a chance for cleanup" |
|
5084 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5085 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 5086 |
(self confirm:('Code modified - terminate anyway ?')) |
5087 |
ifFalse:[ |
|
5088 |
^ self |
|
5089 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5090 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5091 |
|
266 | 5092 |
inspecting ifTrue:[ |
11210 | 5093 |
self processPerform:#terminate. |
5094 |
^ self |
|
266 | 5095 |
]. |
5096 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
5097 |
steppedContext := wrapperContext := nil. |
266 | 5098 |
haveControl := false. |
10205 | 5099 |
exitAction := #terminate. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5100 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5101 |
"exit private event-loop" |
6365 | 5102 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5103 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5104 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5105 |
inspecting ifFalse:[ |
11210 | 5106 |
'DebugView [warning]: terminate failed' errorPrintCR. |
5107 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
|
5108 |
Debugger newDebugger. |
|
5109 |
Processor activeProcess terminate. |
|
5110 |
] |
|
266 | 5111 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5112 |
terminateButton turnOff. |
477 | 5113 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5114 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 5115 |
! |
5116 |
||
5117 |
doTrace |
|
5118 |
"tracing - not really implemented ..." |
|
5119 |
||
5120 |
self warn:'this function is not yet implemented'. |
|
5121 |
||
5122 |
"/ |v b| |
|
5123 |
"/ |
|
5124 |
"/ traceView isNil ifTrue:[ |
|
5125 |
"/ v := StandardSystemView on:Display. |
|
5126 |
"/ v label:'Debugger-Trace'. |
|
5127 |
"/ v icon:icon. |
|
5128 |
"/ |
|
5129 |
"/ b := Button label:'untrace' in:v. |
|
5130 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
5131 |
"/ b action:[ |
|
5132 |
"/ StepInterruptPending := nil. |
|
5133 |
"/ tracing := false. |
|
5134 |
"/ v unrealize. |
|
5135 |
"/ traceView := nil |
|
5136 |
"/ ]. |
|
5137 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
5138 |
"/ traceView origin:(0 @ (b height)) |
|
5139 |
"/ extent:[v width @ (v height - b height)] |
|
5140 |
"/ ]. |
|
5141 |
"/ v realize. |
|
5142 |
"/ |
|
5143 |
"/ tracing := true. |
|
5144 |
! |
|
5145 |
||
5146 |
doTraceStep |
|
5147 |
"tracestep - not implemented yet" |
|
5148 |
||
5149 |
canContinue ifTrue:[ |
|
11210 | 5150 |
tracing := true. |
5151 |
self doStep |
|
266 | 5152 |
] |
5153 |
! |
|
5154 |
||
5155 |
exit |
|
5156 |
"exit from menu: immediate exit from smalltalk" |
|
5157 |
||
5158 |
OperatingSystem exit |
|
5159 |
! |
|
5160 |
||
13388 | 5161 |
findContextForWhich:aBlock thenDo:additionalAction |
5162 |
|con| |
|
5163 |
||
5164 |
con := self selectedContext. |
|
5165 |
con isNil ifTrue:[^ self]. |
|
5166 |
||
5167 |
con := con sender. |
|
5168 |
[con notNil] whileTrue:[ |
|
5169 |
(aBlock value:con) ifTrue:[ |
|
5170 |
(self selectContext:con) ifTrue:[ |
|
5171 |
additionalAction value:con. |
|
5172 |
^ self. |
|
5173 |
] |
|
5174 |
]. |
|
5175 |
con := con sender. |
|
5176 |
]. |
|
5177 |
||
5178 |
Dialog information:'None found'. |
|
5179 |
! |
|
5180 |
||
5181 |
findContextWithStringInSource |
|
5182 |
|stringToSearch source| |
|
5183 |
||
5184 |
stringToSearch := Dialog request:'Search what:'. |
|
5185 |
stringToSearch isEmptyOrNil ifTrue:[^ self]. |
|
5186 |
||
5187 |
self |
|
5188 |
findContextForWhich:[:con | |
|
5189 |
con method notNil |
|
5190 |
and:[ (source := con method source) notNil |
|
5191 |
and:[ (source includesString:stringToSearch) ]] |
|
5192 |
] |
|
5193 |
thenDo:[:con | |
|
5194 |
codeView searchFwd:stringToSearch. |
|
5195 |
] |
|
5196 |
! |
|
5197 |
||
5198 |
findContextWithValueInVariable |
|
5199 |
|valueStringToSearch| |
|
5200 |
||
5201 |
valueStringToSearch := Dialog request:'Search for a local value whith printString containing:'. |
|
5202 |
valueStringToSearch isEmptyOrNil ifTrue:[^ self]. |
|
5203 |
||
5204 |
self |
|
5205 |
findContextForWhich:[:con | |
|
5206 |
con argsAndVars contains:[:val | val printString asLowercase includesString: valueStringToSearch asLowercase] |
|
5207 |
] |
|
5208 |
thenDo:[:con | ] |
|
5209 |
! |
|
5210 |
||
11595 | 5211 |
findHandlerFor |
13388 | 5212 |
|exClass con| |
11595 | 5213 |
|
5214 |
(con := self selectedContext) isNil ifTrue:[ |
|
5215 |
con := contextArray at:1 |
|
5216 |
]. |
|
5217 |
con sender isNil ifTrue:[ |
|
5218 |
self information:'Context has already returned'. |
|
5219 |
^ self |
|
5220 |
]. |
|
5221 |
||
5222 |
exClass := Dialog |
|
13388 | 5223 |
choose:'Exception class:' |
5224 |
fromList:(GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name]) |
|
5225 |
lines:25 |
|
5226 |
title:'Choose Exception class'. |
|
5227 |
||
5228 |
self |
|
5229 |
findContextForWhich:[:con | |
|
13412 | 5230 |
con isHandleContext |
5231 |
and:[ (con receiver handlerForSignal:exClass context:con originator:nil) notNil ] |
|
13388 | 5232 |
] |
5233 |
thenDo:[:con | |
|
5234 |
self selectContext:con sender. |
|
5235 |
] |
|
5236 |
! |
|
5237 |
||
5238 |
findNextExceptionHandlerContext |
|
5239 |
self |
|
5240 |
findContextForWhich:[:con | |
|
5241 |
con isHandleContext |
|
5242 |
] |
|
5243 |
thenDo:[:con | |
|
5244 |
self selectContext:con sender. |
|
5245 |
] |
|
11595 | 5246 |
! |
5247 |
||
266 | 5248 |
inspectContext |
5249 |
"launch an inspector on the currently selected context" |
|
5250 |
||
11595 | 5251 |
|con| |
5252 |
||
5253 |
(con := self selectedContext) notNil ifTrue:[ |
|
5254 |
con inspect. |
|
266 | 5255 |
] |
11595 | 5256 |
|
5257 |
"Modified: / 17-07-2012 / 12:52:34 / cg" |
|
266 | 5258 |
! |
5259 |
||
12840 | 5260 |
inspectWidgetHierarchy |
5261 |
|rcvr view| |
|
5262 |
||
5263 |
selectedContext isNil ifTrue:[ ^ self ]. |
|
5264 |
Tools::ViewTreeInspectorApplication isNil ifTrue:[ |
|
5265 |
Dialog warn:'Missing class: Tools::ViewTreeInspectorApplication'. |
|
5266 |
^ self. |
|
5267 |
]. |
|
5268 |
||
5269 |
rcvr := selectedContext receiver. |
|
5270 |
rcvr isView ifTrue:[ |
|
5271 |
view := rcvr |
|
5272 |
] ifFalse:[ |
|
5273 |
view := rcvr window |
|
5274 |
]. |
|
5275 |
Tools::ViewTreeInspectorApplication openOn:view |
|
5276 |
! |
|
5277 |
||
8142 | 5278 |
middleButtonMenu |
5279 |
<resource: #programMenu > |
|
5280 |
||
9488 | 5281 |
|items m nameOfExecutable| |
8142 | 5282 |
|
5283 |
exclusive ifTrue:[ |
|
11210 | 5284 |
items := #( |
5285 |
('Show More WalkBack' showMore ) |
|
5286 |
('-' ) |
|
5287 |
('Add Breakpoint' addBreakpoint ) |
|
5288 |
('Remove Breakpoint' removeBreakpoint ) |
|
11661 | 5289 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
11210 | 5290 |
('-' ) |
5291 |
). |
|
8142 | 5292 |
] ifFalse:[ |
11210 | 5293 |
items := #( |
5294 |
('Show More WalkBack' showMore ) |
|
5295 |
('-' ) |
|
12633 | 5296 |
('Skip to Cursor' skip ) |
11210 | 5297 |
('Step Out' skipForReturn ) |
5298 |
('Skip until Entering...' skipUntilEntering ) |
|
5299 |
('-' ) |
|
8142 | 5300 |
" |
11210 | 5301 |
('Continue' doContinue ) |
5302 |
('Terminate' doTerminate ) |
|
5303 |
('Abort' doAbort ) |
|
5304 |
('-' ) |
|
5305 |
('Step' doStep ) |
|
5306 |
('Send' doSend ) |
|
5307 |
('-' ) |
|
5308 |
('Return' doReturn ) |
|
5309 |
('Restart' doRestart ) |
|
5310 |
('-' ) |
|
8142 | 5311 |
" |
11210 | 5312 |
('Add Breakpoint' addBreakpoint ) |
5313 |
('Remove Breakpoint' removeBreakpoint ) |
|
12840 | 5314 |
('Remove all Break- & Tracepoints' removeAllBreakpoints ) |
11210 | 5315 |
). |
5316 |
||
12840 | 5317 |
"/ self allowBreakPointsInDebugger ifFalse:[ |
5318 |
"/ items := items , #( |
|
5319 |
"/ ('Allow Breakpoints & halt in Debugger' doNotIgnoreBreakpoints ) |
|
5320 |
"/ ). |
|
5321 |
"/ ] ifTrue:[ |
|
5322 |
"/ items := items , #( |
|
5323 |
"/ ('Ignore Breakpoints & halt in Debugger' doIgnoreBreakpoints ) |
|
5324 |
"/ ). |
|
5325 |
"/ ]. |
|
11210 | 5326 |
|
5327 |
items := items , #( |
|
5328 |
('-' ) |
|
5329 |
('Browse Implementing Class' browseImplementingClass ) |
|
13210 | 5330 |
('Browse Receiver''s Class' browseReceiversClass ) |
13408 | 5331 |
('Browse Blocks''s Home' browseBlocksHome ) |
11610 | 5332 |
"/ ('Browse Receivers Class Hierarchy' browseClassHierarchy ) |
5333 |
"/ ('Browse Receivers Full Protocol' browseFullClassProtocol ) |
|
11210 | 5334 |
('Implementors' browseImplementors ) |
5335 |
('Implementors Of...' browseImplementorsOf ) |
|
5336 |
('Senders' browseSenders ) |
|
5337 |
('Senders Of...' browseSendersOf ) |
|
5338 |
('-' ) |
|
5339 |
('Inspect Context' inspectContext ) |
|
5340 |
). |
|
8142 | 5341 |
]. |
5342 |
||
9488 | 5343 |
items := items , #( |
11210 | 5344 |
('Copy WalkBack Text' copyWalkbackText ) |
5345 |
('-' ) |
|
12840 | 5346 |
('Hard Terminate (Danger)' quickTerminate ) |
11210 | 5347 |
('=' )). |
9488 | 5348 |
|
5349 |
nameOfExecutable := OperatingSystem nameOfSTXExecutable asFilename withoutSuffix baseName. |
|
5350 |
nameOfExecutable = 'stx' ifTrue:[ nameOfExecutable := 'Smalltalk' ]. |
|
5351 |
||
5352 |
items := items , { |
|
11210 | 5353 |
{ 'Exit %1 (No Confirmation)' bindWith:nameOfExecutable. #exit }}. |
10205 | 5354 |
|
5355 |
m := PopUpMenu |
|
11210 | 5356 |
itemList:items |
5357 |
resources:resources |
|
5358 |
receiver:self |
|
5359 |
for:contextView. |
|
8142 | 5360 |
|
5361 |
inspecting ifTrue:[ |
|
11210 | 5362 |
m notNil ifTrue:[ |
5363 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
|
5364 |
browseClassHierarchy browseFullClassProtocol |
|
13408 | 5365 |
browseImplementors browseSenders browseBlocksHome inspectContext skip doStepOut). |
11210 | 5366 |
]. |
8142 | 5367 |
]. |
5368 |
self updateMenuItems. |
|
5369 |
||
5370 |
^ m. |
|
9488 | 5371 |
|
13210 | 5372 |
"Modified: / 22-07-2013 / 15:30:05 / cg" |
8142 | 5373 |
! |
5374 |
||
11573 | 5375 |
notShowingSupportCode |
5376 |
^ hideSupportCode == true. |
|
5377 |
||
5378 |
"Created: / 10-06-2012 / 21:27:24 / cg" |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5379 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5380 |
|
3447 | 5381 |
openAboutThisApplication |
5382 |
"opens an about box for this application." |
|
5383 |
||
7112 | 5384 |
Dialog aboutClass:self class. |
5385 |
||
5386 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 5387 |
! |
5388 |
||
8620 | 5389 |
openSettingsDialog |
5390 |
|settingsList settingsApp| |
|
5391 |
||
10205 | 5392 |
settingsList := |
11210 | 5393 |
#( |
5394 |
#('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
5395 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
5396 |
#('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
5397 |
#('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
5398 |
). |
|
8620 | 5399 |
|
5400 |
settingsApp := SettingsDialog new. |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
5401 |
"/ settingsApp requestor:self. |
8620 | 5402 |
settingsApp installSettingsEntries:settingsList. |
5403 |
settingsApp allButOpen. |
|
5404 |
settingsApp window label:('Debugger Settings'). |
|
5405 |
settingsApp openWindow. |
|
5406 |
! |
|
5407 |
||
266 | 5408 |
quickTerminate |
5409 |
"quick terminate - the process will get no chance for cleanup actions" |
|
5410 |
||
5411 |
inspecting ifTrue:[ |
|
11210 | 5412 |
self processPerform:#terminateNoSignal. |
5413 |
^ self |
|
266 | 5414 |
]. |
5415 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
5416 |
steppedContext := wrapperContext := nil. |
266 | 5417 |
haveControl := false. |
5418 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5419 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5420 |
"exit private event-loop" |
6365 | 5421 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5422 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5423 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5424 |
inspecting ifFalse:[ |
11210 | 5425 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
5426 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
5427 |
Debugger newDebugger. |
|
5428 |
Processor activeProcess terminateNoSignal. |
|
5429 |
] |
|
266 | 5430 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5431 |
terminateButton turnOff. |
477 | 5432 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
5433 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 5434 |
! |
5435 |
||
11391 | 5436 |
rememberCallchain |
5437 |
"remember the callchain in a classvar. |
|
5438 |
When entered the next time, highlight already entered contexts. |
|
5439 |
This makes it possible to identitfy the caller as the first common context |
|
5440 |
along the chain (i.e. the context which is responsible for the debugger to be entered)" |
|
5441 |
||
5442 |
RememberedCallChain := contextArray copy |
|
5443 |
||
5444 |
"Created: / 07-03-2012 / 23:07:07 / cg" |
|
5445 |
! |
|
5446 |
||
13388 | 5447 |
selectContext:aContext |
5448 |
|idx| |
|
5449 |
||
5450 |
idx := contextArray identityIndexOf:aContext. |
|
5451 |
idx == 0 ifTrue:[ |
|
5452 |
"/ some contexts hidden? |
|
5453 |
(self showingDenseWalkback or:[self showingSupportCode not]) ifTrue:[ |
|
5454 |
Dialog information:'Context is hidden - disabling the "hideSupportCode" option (see view menu)'. |
|
5455 |
self showFullWalkback. |
|
5456 |
self showingDenseWalkback:false. |
|
5457 |
self showingSupportCode:true. |
|
5458 |
]. |
|
5459 |
idx := contextArray identityIndexOf:aContext. |
|
5460 |
]. |
|
5461 |
idx ~~ 0 ifTrue:[ |
|
5462 |
self selectContextWithIndex:idx. |
|
5463 |
^ true. |
|
5464 |
]. |
|
5465 |
^ false |
|
5466 |
! |
|
5467 |
||
11595 | 5468 |
selectedContext |
5469 |
contextView selection notNil ifTrue:[ |
|
5470 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
|
5471 |
^ (contextArray at:(contextView selection)). |
|
5472 |
] |
|
5473 |
]. |
|
5474 |
^ nil |
|
5475 |
||
5476 |
"Created: / 17-07-2012 / 12:52:10 / cg" |
|
5477 |
! |
|
5478 |
||
11647 | 5479 |
showFullWalkback |
5480 |
"double the number of contexts shown" |
|
5481 |
||
5482 |
contextArray notNil ifTrue:[ |
|
5483 |
nChainShown := 9999. |
|
5484 |
self redisplayBacktrace. |
|
5485 |
] |
|
5486 |
||
5487 |
"Created: / 23-07-2012 / 12:24:02 / cg" |
|
5488 |
! |
|
5489 |
||
266 | 5490 |
showMore |
3447 | 5491 |
"double the number of contexts shown" |
266 | 5492 |
|
5493 |
contextArray notNil ifTrue:[ |
|
11210 | 5494 |
nChainShown := nChainShown * 2. |
5495 |
self redisplayBacktrace. |
|
266 | 5496 |
] |
563 | 5497 |
|
3447 | 5498 |
"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
|
5499 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
5500 |
|
11573 | 5501 |
showSupportCode |
5502 |
hideSupportCode := false. |
|
5503 |
self redisplayBacktrace. |
|
5504 |
||
5505 |
"Created: / 10-06-2012 / 21:27:53 / cg" |
|
5506 |
! |
|
5507 |
||
3447 | 5508 |
showingDenseWalkback |
5509 |
^ verboseBacktrace == false. |
|
5510 |
||
5511 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
5512 |
! |
|
5513 |
||
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5514 |
showingDenseWalkback:aBoolean |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5515 |
verboseBacktrace := aBoolean not. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5516 |
self redisplayBacktrace. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5517 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5518 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5519 |
! |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5520 |
|
11573 | 5521 |
showingSupportCode |
5522 |
^ hideSupportCode == false. |
|
5523 |
||
5524 |
"Created: / 10-06-2012 / 21:28:05 / cg" |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5525 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5526 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5527 |
showingSupportCode:aBoolean |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5528 |
hideSupportCode := aBoolean not. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5529 |
self redisplayBacktrace. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5530 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5531 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5532 |
! |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5533 |
|
3447 | 5534 |
showingVerboseWalkback |
5535 |
^ verboseBacktrace == true. |
|
5536 |
||
5537 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
5538 |
! |
|
5539 |
||
9626 | 5540 |
sizeChanged:how |
10205 | 5541 |
super sizeChanged:how. |
9626 | 5542 |
LastExtent := self extent. |
5543 |
||
5544 |
"Created: / 10-11-2010 / 09:08:41 / cg" |
|
5545 |
! |
|
5546 |
||
266 | 5547 |
skip |
5548 |
"skip for cursor line in selected method" |
|
5549 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5550 |
stepHow := #skip. |
266 | 5551 |
self doStep:codeView cursorLine. |
790 | 5552 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5553 |
"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
|
5554 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5555 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5556 |
skipForReturn |
2581 | 5557 |
"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
|
5558 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5559 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5560 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5561 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5562 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 5563 |
! |
5564 |
||
5565 |
skipUntilEntering |
|
5566 |
"skip until some particular method is invoked." |
|
5567 |
||
5568 |
|selector| |
|
5569 |
||
10205 | 5570 |
selector := Dialog |
11210 | 5571 |
request:'Skip until entering what (matchpattern):' |
5572 |
initialAnswer:self goodSkipUntilSelector. |
|
2581 | 5573 |
selector size == 0 ifTrue:[^ self]. |
5574 |
||
5575 |
stepUntilEntering := selector asSymbol. |
|
5576 |
stepHow := #send. |
|
5577 |
self doStep:-1. |
|
5578 |
||
5579 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 5580 |
! |
5581 |
||
11573 | 5582 |
toggleShowSupportCode |
5583 |
hideSupportCode ifTrue:[ |
|
5584 |
self showSupportCode |
|
11645
4f39a925956d
changed: #toggleShowSupportCode
Stefan Vogel <sv@exept.de>
parents:
11636
diff
changeset
|
5585 |
] ifFalse:[ |
11573 | 5586 |
self hideSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5587 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5588 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5589 |
"Modified: / 17-11-2001 / 20:07:45 / cg" |
11573 | 5590 |
"Created: / 10-06-2012 / 21:28:17 / cg" |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5591 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5592 |
|
3447 | 5593 |
toggleVerboseWalkback |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5594 |
self showingDenseWalkback:(self showingDenseWalkback not) |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5595 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5596 |
"Modified: / 27-07-2012 / 15:00:15 / cg" |
11610 | 5597 |
! |
5598 |
||
5599 |
updateMenuItems |
|
13408 | 5600 |
"enable/disable some menu items, depending on the current selected context" |
5601 |
||
11610 | 5602 |
|m mthd cls mCls rCls| |
5603 |
||
5604 |
m := contextView middleButtonMenu. |
|
5605 |
m notNil ifTrue:[ |
|
5606 |
m disable:#removeBreakpoint. |
|
5607 |
m disable:#addBreakpoint. |
|
5608 |
canShowMore ifFalse:[ |
|
5609 |
m disable:#showMore |
|
5610 |
]. |
|
5611 |
||
5612 |
selectedContext notNil ifTrue:[ |
|
5613 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
5614 |
||
5615 |
mthd := selectedContext method. |
|
5616 |
mthd notNil ifTrue:[ |
|
5617 |
cls := mCls := mthd containingClass. |
|
5618 |
mthd isBreakpointed ifTrue:[ |
|
5619 |
m enable:#removeBreakpoint. |
|
5620 |
] ifFalse:[ |
|
5621 |
m enable:#addBreakpoint. |
|
5622 |
] |
|
5623 |
]. |
|
5624 |
(selectedContext isBlockContext and:[selectedContext home isNil]) ifTrue:[ |
|
5625 |
"/ a cheap block's context |
|
5626 |
] ifFalse:[ |
|
5627 |
rCls := selectedContext receiver class. |
|
5628 |
cls isNil ifTrue:[ |
|
5629 |
cls := rCls |
|
5630 |
]. |
|
5631 |
]. |
|
5632 |
cls notNil ifTrue:[ |
|
5633 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5634 |
rCls == mCls ifTrue:[ |
|
5635 |
m disable:#browseReceiversClass |
|
5636 |
]. |
|
5637 |
mCls isNil ifTrue:[ |
|
5638 |
m disable:#browseImplementingClass |
|
5639 |
] |
|
5640 |
||
5641 |
] ifFalse:[ |
|
5642 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5643 |
]. |
|
5644 |
mthd notNil ifTrue:[ |
|
5645 |
m enableAll:#(browseImplementingClass). |
|
5646 |
]. |
|
5647 |
selectedContext isCheapBlockContext ifTrue:[ |
|
5648 |
m disableAll:#(browseReceiversClass). |
|
5649 |
]. |
|
13408 | 5650 |
selectedContext receiver isBlock ifTrue:[ |
5651 |
m enableAll:#(browseBlocksHome). |
|
5652 |
] ifFalse:[ |
|
5653 |
m disableAll:#(browseBlocksHome). |
|
5654 |
]. |
|
11610 | 5655 |
] ifFalse:[ |
13408 | 5656 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy |
5657 |
browseBlocksHome browseFullClassProtocol). |
|
11610 | 5658 |
] |
5659 |
] |
|
5660 |
||
5661 |
"Modified: / 19-07-2012 / 11:53:30 / cg" |
|
266 | 5662 |
! ! |
5663 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5664 |
!DebugView methodsFor:'menu & button actions-breakpoints'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5665 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5666 |
addBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5667 |
"add a breakpoint on the selected contexts method - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5668 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5669 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5670 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5671 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5672 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5673 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5674 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5675 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5676 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5677 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5678 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5679 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5680 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5681 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5682 |
method setBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5683 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5684 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5685 |
contextView middleButtonMenu disable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5686 |
contextView middleButtonMenu enable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5687 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5688 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5689 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5690 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5691 |
allowBreakPointsInDebugger |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5692 |
^ ignoreBreakpoints not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5693 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5694 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5695 |
allowBreakPointsInDebugger:aBoolean |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5696 |
ignoreBreakpoints := aBoolean not. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5697 |
self initializeMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5698 |
self initializeContextViewsMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5699 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5700 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5701 |
doIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5702 |
self allowBreakPointsInDebugger:false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5703 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5704 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5705 |
doNotIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5706 |
self allowBreakPointsInDebugger:true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5707 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5708 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5709 |
ignoreAllHaltsForever |
12937 | 5710 |
self |
5711 |
addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false |
|
5712 |
orThisReceiverClass:false orCurrentProcess:false |
|
5713 |
forAll:true. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5714 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5715 |
"Created: / 08-05-2011 / 10:19:56 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5716 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5717 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5718 |
ignoreAllHaltsUntilShiftKeyIsPressed |
12937 | 5719 |
self |
5720 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true |
|
5721 |
orThisReceiverClass:false orCurrentProcess:false |
|
5722 |
forAll:true. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5723 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5724 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5725 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5726 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5727 |
ignoreBreakpointsWithThisParameterForever |
11370 | 5728 |
Object disableBreakPoint:breakPointParameter. |
5729 |
"/ self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
|
5730 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5731 |
"Created: / 06-03-2012 / 12:35:48 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5732 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5733 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5734 |
ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
12937 | 5735 |
self |
5736 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true |
|
5737 |
orThisReceiverClass:false orCurrentProcess:false |
|
5738 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5739 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5740 |
"Created: / 06-03-2012 / 12:35:22 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5741 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5742 |
|
12937 | 5743 |
ignoreHaltForCurrentProcess |
5744 |
self |
|
5745 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
5746 |
orThisReceiverClass:false orCurrentProcess:true |
|
12941 | 5747 |
forAll:false. |
12937 | 5748 |
|
5749 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
|
5750 |
! |
|
5751 |
||
5752 |
ignoreHaltForThisReceiverClass |
|
5753 |
self |
|
5754 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
5755 |
orThisReceiverClass:true orCurrentProcess:false |
|
12941 | 5756 |
forAll:false. |
12937 | 5757 |
|
5758 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
|
5759 |
! |
|
5760 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5761 |
ignoreHaltForever |
12937 | 5762 |
self |
5763 |
addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false |
|
5764 |
orThisReceiverClass:false orCurrentProcess:false |
|
5765 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5766 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5767 |
"Modified: / 27-01-2012 / 11:31:37 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5768 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5769 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5770 |
ignoreHaltUntilShiftKeyIsPressed |
12937 | 5771 |
self |
5772 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true |
|
5773 |
orThisReceiverClass:false orCurrentProcess:false |
|
5774 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5775 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5776 |
"Created: / 27-01-2012 / 11:36:54 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5777 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5778 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5779 |
openBreakPointBrowser |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5780 |
Tools::BreakpointBrowser open |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5781 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5782 |
"Created: / 27-10-2010 / 12:52:49 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5783 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5784 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5785 |
openIgnoreAllHaltsUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5786 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5787 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5788 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5789 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5790 |
request:(resources string:'How long should all halts/breakpoints be ignored [smh] ?') |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5791 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5792 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5793 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5794 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5795 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5796 |
LastIgnoreHaltDuration := dT. |
12937 | 5797 |
self |
5798 |
addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false |
|
5799 |
orThisReceiverClass:false orCurrentProcess:false |
|
5800 |
forAll:true. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5801 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5802 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5803 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5804 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5805 |
"Created: / 08-05-2011 / 10:19:20 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5806 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5807 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5808 |
openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5809 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5810 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5811 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5812 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5813 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5814 |
string:'How often should breakpoints with parameter "%1" be ignored ?' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5815 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5816 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5817 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5818 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5819 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5820 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5821 |
LastIgnoreHaltNTimes := n. |
12937 | 5822 |
self |
5823 |
addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false |
|
5824 |
orThisReceiverClass:false orCurrentProcess:false |
|
5825 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5826 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5827 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5828 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5829 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5830 |
"Modified: / 27-01-2012 / 11:31:44 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5831 |
"Created: / 06-03-2012 / 12:28:51 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5832 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5833 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5834 |
openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5835 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5836 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5837 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5838 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5839 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5840 |
string:'How long should breakpoints with parameter "%1" be ignored (s/m/h) ?' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5841 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5842 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5843 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5844 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5845 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5846 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5847 |
LastIgnoreHaltDuration := dT. |
12937 | 5848 |
self |
5849 |
addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false |
|
5850 |
orThisReceiverClass:false orCurrentProcess:false |
|
5851 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5852 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5853 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5854 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5855 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5856 |
"Created: / 06-03-2012 / 12:03:36 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5857 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5858 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5859 |
openIgnoreHaltNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5860 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5861 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5862 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5863 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5864 |
request:(resources string:'How often should this halt be ignored ?') |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5865 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5866 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5867 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5868 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5869 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5870 |
LastIgnoreHaltNTimes := n. |
12937 | 5871 |
self |
5872 |
addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false |
|
5873 |
orThisReceiverClass:false orCurrentProcess:false |
|
5874 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5875 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5876 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5877 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5878 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5879 |
"Modified: / 27-01-2012 / 11:31:44 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5880 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5881 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5882 |
openIgnoreHaltUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5883 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5884 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5885 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5886 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5887 |
request:(resources string:'How long should this halt/breakpoint be ignored (s/m/h) ?') |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5888 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5889 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5890 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5891 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5892 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5893 |
LastIgnoreHaltDuration := dT. |
12937 | 5894 |
self |
5895 |
addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false |
|
5896 |
orThisReceiverClass:false orCurrentProcess:false |
|
5897 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5898 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5899 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5900 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5901 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5902 |
"Modified: / 27-01-2012 / 11:31:47 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5903 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5904 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5905 |
removeAllBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5906 |
"remove all trace & breakpoints - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5907 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5908 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5909 |
self withExecuteCursorDo:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5910 |
MessageTracer unwrapAllMethods |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5911 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5912 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5913 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5914 |
"Modified: / 21.5.1998 / 01:44:43 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5915 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5916 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5917 |
removeBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5918 |
"remove breakpoint on the selected contexts method - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5919 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5920 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5921 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5922 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5923 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5924 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5925 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5926 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5927 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5928 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5929 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5930 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5931 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5932 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5933 |
method clearBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5934 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5935 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5936 |
contextView middleButtonMenu disable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5937 |
contextView middleButtonMenu enable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5938 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5939 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5940 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5941 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5942 |
stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5943 |
self class stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5944 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5945 |
|
266 | 5946 |
!DebugView methodsFor:'private'! |
5947 |
||
6487 | 5948 |
abortAllIsHandled |
9750 | 5949 |
^ AbortAllOperationWantedQuery query |
5950 |
||
5951 |
"Modified: / 09-02-2011 / 13:53:13 / cg" |
|
6487 | 5952 |
! |
5953 |
||
266 | 5954 |
busy |
5955 |
^ busy |
|
5956 |
! |
|
5957 |
||
5958 |
exclusive:aBoolean |
|
5959 |
exclusive := aBoolean |
|
5960 |
! |
|
5961 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5962 |
explainSelection |
8212 | 5963 |
|interval crsrPos| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5964 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5965 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5966 |
interval isEmpty ifTrue:[ |
11210 | 5967 |
crsrPos := codeView characterPositionOfCursor. |
5968 |
codeView characterUnderCursor isSeparator ifTrue:[ |
|
5969 |
crsrPos := (crsrPos - 1) max:1 |
|
5970 |
]. |
|
5971 |
interval := crsrPos to:crsrPos. |
|
10205 | 5972 |
]. |
5973 |
self |
|
11210 | 5974 |
withNodeValueAtInterval:interval |
5975 |
do:[:value :description | |
|
5976 |
self showValue:value |
|
5977 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5978 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5979 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5980 |
findNodeForInterval:interval |
8212 | 5981 |
|source| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5982 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5983 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5984 |
|
8487
ddf59247960c
slow runArray (text) operations
Claus Gittinger <cg@exept.de>
parents:
8432
diff
changeset
|
5985 |
source := codeView contentsAsString string. |
10205 | 5986 |
"/ source := currentMethod notNil |
5987 |
"/ ifTrue:[ currentMethod source ] |
|
8396 | 5988 |
"/ ifFalse:[ codeView contents asString ]. |
8257
106d3fecbca0
findNodeForInterval: care for nonexisting source
Claus Gittinger <cg@exept.de>
parents:
8225
diff
changeset
|
5989 |
source isNil ifTrue:[^ nil]. |
8214 | 5990 |
|
8212 | 5991 |
^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string) allowErrors:true. |
5992 |
"/ ^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string). |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5993 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5994 |
|
7912 | 5995 |
findNodeIn:tree forInterval:interval |
5996 |
<resource: #obsolete> |
|
10205 | 5997 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5998 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5999 |
|
7912 | 6000 |
self obsoleteMethodWarning. |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6001 |
node := nil. |
10205 | 6002 |
tree nodesDo:[:each | |
11210 | 6003 |
(each intersectsInterval:interval) ifTrue:[ |
6004 |
(node isNil or:[node == each parent]) ifTrue:[ |
|
6005 |
node := each |
|
6006 |
] ifFalse:[ |
|
6007 |
(node parent notNil |
|
6008 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
|
6009 |
] |
|
6010 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6011 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6012 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6013 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6014 |
|
2581 | 6015 |
goodSkipUntilSelector |
6016 |
|current| |
|
6017 |
||
6018 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
6019 |
selectedContext isNil ifTrue:[^ nil]. |
|
6020 |
current := selectedContext selector. |
|
6021 |
current isNil ifTrue:[^ nil]. |
|
6022 |
('change:*' match:current) ifTrue:[ |
|
11210 | 6023 |
^ 'update:*' |
2581 | 6024 |
]. |
6025 |
^ nil |
|
6026 |
! |
|
6027 |
||
8179 | 6028 |
haltSelectors |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6029 |
^ #( #'halt' #'halt:' #'breakPoint:' #'breakPoint:info:' #'break'). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6030 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6031 |
"Modified (format): / 27-01-2012 / 11:10:00 / cg" |
8179 | 6032 |
! |
6033 |
||
10205 | 6034 |
inspectedProcess |
6035 |
^ inspectedProcess |
|
266 | 6036 |
! |
6037 |
||
6038 |
interruptProcessWith:aBlock |
|
6039 |
"let inspected process do something, then update the context list" |
|
6040 |
||
6041 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 6042 |
self showTerminated. |
6043 |
^ self |
|
266 | 6044 |
]. |
6045 |
inspectedProcess interruptWith:aBlock. |
|
6046 |
" |
|
6047 |
give the process a chance to run, then update |
|
6048 |
" |
|
6049 |
(Delay forSeconds:0.2) wait. |
|
6050 |
self setContext:(inspectedProcess suspendedContext). |
|
6051 |
! |
|
6052 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6053 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6054 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6055 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6056 |
|
8194 | 6057 |
openHTMLDocument: anHTMLFilename |
6058 |
"open a HTMLDocumentView on anHTMLFilename" |
|
6059 |
||
6060 |
HTMLDocumentView openFullOnDocumentationFile: anHTMLFilename |
|
6061 |
! |
|
6062 |
||
266 | 6063 |
processPerform:aMessage |
6064 |
"do something, then update the context list" |
|
6065 |
||
6066 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 6067 |
self showTerminated. |
6068 |
^ self |
|
266 | 6069 |
]. |
6070 |
inspectedProcess perform:aMessage. |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
6071 |
|
266 | 6072 |
" |
6073 |
give the process a chance to run, then update |
|
6074 |
" |
|
6075 |
(Delay forSeconds:0.2) wait. |
|
6076 |
self setContext:(inspectedProcess suspendedContext). |
|
6077 |
! |
|
6078 |
||
939 | 6079 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6080 |
"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
|
6081 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6082 |
|
939 | 6083 |
|oldSelection oldContext con idx| |
6084 |
||
6085 |
contextArray notNil ifTrue:[ |
|
11210 | 6086 |
self withExecuteCursorDo:[ |
6087 |
oldSelection := contextView selection. |
|
6088 |
oldSelection notNil ifTrue:[ |
|
6089 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
6090 |
]. |
|
6091 |
||
6092 |
con := firstContext. |
|
950 | 6093 |
"/ con := contextArray at:1. |
11210 | 6094 |
"/ force redeisplay, even if same by changing the first entry |
6095 |
contextArray size > 0 ifTrue:[ |
|
6096 |
contextArray at:1 put:nil. |
|
6097 |
]. |
|
6098 |
self setContext:con. |
|
6099 |
||
6100 |
oldContext isNil ifTrue:[ |
|
6101 |
idx := oldSelection |
|
6102 |
] ifFalse:[ |
|
6103 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
6104 |
]. |
|
6105 |
contextView setSelection:idx. |
|
6106 |
idx notNil ifTrue:[ |
|
6107 |
self showSelection:idx |
|
6108 |
] |
|
6109 |
] |
|
939 | 6110 |
] |
6111 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6112 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 6113 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 6114 |
! |
6115 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6116 |
selectedInterval |
7912 | 6117 |
^ codeView selectedInterval |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6118 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6119 |
|
7823 | 6120 |
showError:message |
6121 |
codeView contents:(resources string:message). |
|
6122 |
shown ifTrue:[ |
|
11210 | 6123 |
exclusive ifTrue:[ |
6124 |
"/ consider this a kludge: |
|
6125 |
"/ if exclusive, cannot use flash, since it suspends |
|
6126 |
"/ (but we cannot suspend here ...) |
|
6127 |
codeView redrawInverted. device flush. |
|
6128 |
OperatingSystem millisecondDelay:200. |
|
6129 |
codeView redraw |
|
6130 |
] ifFalse:[ |
|
6131 |
codeView flash |
|
6132 |
] |
|
7823 | 6133 |
] |
6134 |
||
6135 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
|
6136 |
! |
|
6137 |
||
6138 |
showTerminated |
|
6139 |
self showError:'** the process has terminated **' |
|
6140 |
! |
|
6141 |
||
6142 |
showValue:aValue |
|
6143 |
"/ TODO: show value in info field |
|
6144 |
"/ Transcript showCR:aValue printString |
|
6145 |
! |
|
6146 |
||
10205 | 6147 |
stepping |
6148 |
^ stepping |
|
6149 |
! |
|
6150 |
||
6151 |
unstep |
|
7823 | 6152 |
stepping := false. |
6153 |
bigStep := false. |
|
6154 |
steppedContext := wrapperContext := nil. |
|
6155 |
exitAction := nil |
|
6156 |
||
6157 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
|
6158 |
! |
|
6159 |
||
10203 | 6160 |
updateButtonsAndMenuItemsForContext:aContext |
6161 |
|m| |
|
6162 |
||
6163 |
m := contextView middleButtonMenu. |
|
6164 |
m notNil ifTrue:[ |
|
11210 | 6165 |
self updateMenuItems. |
6166 |
||
6167 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
|
6168 |
abortButton enable. |
|
6169 |
m enable:#doAbort. |
|
6170 |
] ifFalse:[ |
|
6171 |
abortButton disable. |
|
6172 |
m disable:#doAbort. |
|
6173 |
]. |
|
6174 |
exclusive ifTrue:[ |
|
6175 |
terminateButton disable. |
|
6176 |
m disable:#doTerminate. |
|
6177 |
] ifFalse:[ |
|
6178 |
terminateButton enable. |
|
6179 |
m enable:#doTerminate. |
|
6180 |
]. |
|
10203 | 6181 |
]. |
6182 |
||
6183 |
mayProceed == false ifTrue:[ |
|
11210 | 6184 |
continueButton disable. |
6185 |
m notNil ifTrue:[m disable:#doContinue]. |
|
10203 | 6186 |
] ifFalse:[ |
11210 | 6187 |
continueButton enable. |
6188 |
m notNil ifTrue:[m enable:#doContinue] |
|
10203 | 6189 |
]. |
6190 |
||
13363 | 6191 |
isStoppedInModalDialog ifTrue:[ |
13362 | 6192 |
gotoDialogOpenerButton enable. |
6193 |
gotoDialogOpenerButton beVisible. |
|
6194 |
] ifFalse:[ |
|
6195 |
gotoDialogOpenerButton beInvisible. |
|
6196 |
]. |
|
6197 |
||
10203 | 6198 |
"Created: / 06-07-2011 / 12:24:53 / cg" |
6199 |
! |
|
6200 |
||
7823 | 6201 |
updateContext |
6202 |
|oldContext idx| |
|
6203 |
||
6204 |
inspectedProcess state == #dead ifTrue:[ |
|
11210 | 6205 |
self showTerminated. |
6206 |
^ self |
|
7823 | 6207 |
]. |
6208 |
||
6209 |
oldContext := selectedContext. |
|
6210 |
[ |
|
11210 | 6211 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
6212 |
oldContext notNil ifTrue:[ |
|
6213 |
contextArray notNil ifTrue:[ |
|
6214 |
idx := contextArray identityIndexOf:oldContext. |
|
6215 |
idx ~~ 0 ifTrue:[ |
|
6216 |
self showSelection:idx |
|
6217 |
] ifFalse:[ |
|
6218 |
codeView contents:('** context returned **') |
|
6219 |
] |
|
6220 |
] |
|
6221 |
] |
|
6222 |
]. |
|
7823 | 6223 |
] valueUninterruptably. |
6224 |
||
6225 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
|
8212 | 6226 |
! |
6227 |
||
6228 |
withNodeValueAtInterval:interval do:aBlock |
|
9294
e19553d7e864
changed: #withNodeValueAtInterval:do:
Stefan Vogel <sv@exept.de>
parents:
9292
diff
changeset
|
6229 |
|node definingNode nm nmBold varIdx parentNode receiver con receiversNonMetaClass| |
8212 | 6230 |
|
6231 |
"/interval printCR. |
|
10205 | 6232 |
Error |
11210 | 6233 |
handle:[:ex | ] |
6234 |
do:[ |
|
6235 |
[ |
|
6236 |
node := self findNodeForInterval:interval |
|
6237 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:50. |
|
6238 |
]. |
|
9314
e58b9abd145a
comment/format in: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9308
diff
changeset
|
6239 |
|
8212 | 6240 |
node isNil ifTrue:[ ^ self ]. |
10205 | 6241 |
node isVariable ifFalse:[ |
11210 | 6242 |
"/ Transcript showCR:node. |
6243 |
^ self |
|
8592 | 6244 |
]. |
8212 | 6245 |
|
6246 |
nm := node name. |
|
8214 | 6247 |
nmBold := nm allBold. |
8600 | 6248 |
actualContext isNil ifTrue:[^ self ]. |
8636 | 6249 |
actualContext methodHome isNil ifTrue:[^ self ]. |
8214 | 6250 |
receiver := actualContext methodHome receiver. |
8212 | 6251 |
|
6252 |
(nm = 'self') ifTrue:[ |
|
11210 | 6253 |
aBlock value:receiver value:'receiver' allBold. |
6254 |
^ self |
|
8212 | 6255 |
]. |
6256 |
(nm = 'super') ifTrue:[ |
|
11210 | 6257 |
aBlock value:receiver value:'receiver' allBold. |
6258 |
^ self |
|
8212 | 6259 |
]. |
6260 |
(nm = 'thisContext') ifTrue:[ |
|
11210 | 6261 |
aBlock value:actualContext value:'context' allBold. |
6262 |
^ self |
|
8212 | 6263 |
]. |
6264 |
||
6265 |
definingNode := node whoDefines:nm. |
|
6266 |
definingNode isNil ifTrue:[ |
|
11210 | 6267 |
(receiver class allInstVarNames includes:nm) ifTrue:[ |
8214 | 6268 |
"/aBlock value:'xIII' value:'instVar'. |
11210 | 6269 |
receiver class isMetaclass ifTrue:[ |
6270 |
aBlock value:(receiver instVarNamed:nm) value:'classInstVar ',nmBold. |
|
6271 |
] ifFalse:[ |
|
6272 |
aBlock value:(receiver instVarNamed:nm) value:'instVar ',nmBold. |
|
6273 |
]. |
|
6274 |
^ self |
|
6275 |
]. |
|
6276 |
||
6277 |
receiversNonMetaClass := receiver class theNonMetaclass. |
|
6278 |
(receiversNonMetaClass privateClasses contains:[:cls | cls nameWithoutPrefix = nm]) ifTrue:[ |
|
6279 |
aBlock value:'' value:'private class ',nmBold. |
|
6280 |
^ self |
|
6281 |
]. |
|
6282 |
(receiversNonMetaClass classVarNames includes:nm) ifTrue:[ |
|
6283 |
aBlock value:((currentMethod mclass ? receiversNonMetaClass) theNonMetaclass classVarAt:nm) value:'classVar ',nmBold. |
|
6284 |
^ self |
|
6285 |
]. |
|
6286 |
receiversNonMetaClass sharedPoolNames do:[:eachPoolName | |
|
6287 |
|pool| |
|
6288 |
||
6289 |
pool := Smalltalk at:eachPoolName. |
|
6290 |
pool isNil ifTrue:[ pool := receiversNonMetaClass topNameSpace at:eachPoolName]. |
|
6291 |
(pool classVarNames includes:nm) ifTrue:[ |
|
6292 |
aBlock value:(pool classVarAt:nm) value:'poolVar ',nm allBold,' in ',eachPoolName allBold,' '. |
|
6293 |
^ self |
|
6294 |
]. |
|
6295 |
]. |
|
6296 |
(Smalltalk includesKey:nm asSymbol) ifTrue:[ |
|
6297 |
(Smalltalk at:nm asSymbol) isClass ifTrue:[ |
|
6298 |
aBlock value:'class: ',nmBold value:nil. |
|
6299 |
] ifFalse:[ |
|
6300 |
aBlock value:(Smalltalk at:nm asSymbol) value:'global ',nmBold. |
|
6301 |
]. |
|
6302 |
^ self |
|
6303 |
]. |
|
6304 |
aBlock value:'' value:'unknown'. |
|
6305 |
^ self |
|
8212 | 6306 |
]. |
6307 |
"/definingNode printCR. |
|
6308 |
||
6309 |
definingNode isMethod ifTrue:[ |
|
11210 | 6310 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
6311 |
varIdx ~~ 0 ifTrue:[ |
|
6312 |
Error |
|
6313 |
handle:[:ex | ] |
|
6314 |
do:[ aBlock value:(actualContext methodHome argAt:varIdx) value:'methodArg ',nmBold ]. |
|
6315 |
^ self |
|
6316 |
]. |
|
6317 |
varIdx := definingNode temporaries findFirst:[:var | var name = nm]. |
|
6318 |
varIdx ~~ 0 ifTrue:[ |
|
6319 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
6320 |
Error |
|
6321 |
handle:[:ex | ] |
|
6322 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
6323 |
^ self |
|
6324 |
] |
|
6325 |
]. |
|
8212 | 6326 |
]. |
6327 |
||
6328 |
definingNode isBlock ifTrue:[ |
|
11210 | 6329 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
6330 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
6331 |
varIdx ~~ 0 ifTrue:[ |
|
6332 |
"/ am I in this block ? |
|
6333 |
(actualContext lineNumber notNil |
|
6334 |
and:[ definingNode lastLineNumber notNil |
|
6335 |
and:[ (actualContext lineNumber |
|
6336 |
between:definingNode firstLineNumber |
|
6337 |
and:definingNode lastLineNumber) |
|
6338 |
and:[ varIdx <= actualContext numArgs ] ]]) |
|
6339 |
ifTrue:[ |
|
6340 |
aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold . |
|
6341 |
^ self |
|
6342 |
]. |
|
8214 | 6343 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
11210 | 6344 |
^ self |
6345 |
] |
|
6346 |
]. |
|
8212 | 6347 |
]. |
6348 |
||
6349 |
parentNode := definingNode parent. |
|
6350 |
||
6351 |
[parentNode notNil] whileTrue:[ |
|
6352 |
"/'isMethod ' print. parentNode isMethod printCR. |
|
11210 | 6353 |
parentNode isMethod ifTrue:[ |
6354 |
varIdx := parentNode temporaries findFirst:[:var | var name = nm]. |
|
6355 |
varIdx ~~ 0 ifTrue:[ |
|
6356 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
6357 |
Error |
|
6358 |
handle:[:ex | ] |
|
6359 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
6360 |
^ self |
|
6361 |
] |
|
6362 |
]. |
|
6363 |
]. |
|
8212 | 6364 |
"/'isBlock ' print. parentNode isBlock printCR. |
11210 | 6365 |
parentNode isBlock ifTrue:[ |
6366 |
"/ we dont have any information on the inlineability |
|
6367 |
"/ of this block here (RBParser does not know what |
|
6368 |
"/ the compiler does. |
|
6369 |
"/ therefore, it is questionable if we can use the |
|
6370 |
"/ contexts home context here. |
|
6371 |
"/ am I in this block ? |
|
6372 |
con := actualContext. |
|
6373 |
[con notNil |
|
6374 |
and:[ parentNode lastLineNumber notNil |
|
6375 |
and:[ con lineNumber notNil |
|
6376 |
and:[ con lineNumber |
|
6377 |
between:parentNode firstLineNumber |
|
6378 |
and:parentNode lastLineNumber ]]]] whileTrue:[ |
|
6379 |
con := con sender. |
|
6380 |
]. |
|
6381 |
con notNil ifTrue:[ |
|
6382 |
varIdx := parentNode arguments findFirst:[:arg | arg name = nm]. |
|
6383 |
varIdx ~~ 0 ifTrue:[ |
|
6384 |
Error |
|
6385 |
handle:[:ex | ] |
|
6386 |
do:[ aBlock value:(con argAt:varIdx) value:'blockArg ',nmBold ]. |
|
6387 |
^ self |
|
6388 |
]. |
|
6389 |
varIdx := parentNode body temporaries findFirst:[:var | var name = nm]. |
|
6390 |
varIdx ~~ 0 ifTrue:[ |
|
6391 |
Error |
|
6392 |
handle:[:ex | ] |
|
6393 |
do:[ aBlock value:(con varAt:varIdx) value:'blockVar ',nmBold ]. |
|
6394 |
^ self |
|
6395 |
]. |
|
6396 |
]. |
|
6397 |
]. |
|
6398 |
parentNode := parentNode parent. |
|
8212 | 6399 |
]. |
8214 | 6400 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
9446 | 6401 |
|
9688
805ea34ba3ef
changed: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9662
diff
changeset
|
6402 |
"Modified: / 18-01-2011 / 17:57:34 / cg" |
7823 | 6403 |
! ! |
6404 |
||
6405 |
!DebugView methodsFor:'private queries'! |
|
6406 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6407 |
canBrowseClassHierarchy |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6408 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6409 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6410 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6411 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6412 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6413 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6414 |
canBrowseFullClassProtocol |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6415 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6416 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6417 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6418 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6419 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6420 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6421 |
canBrowseImplementingClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6422 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6423 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6424 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6425 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6426 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6427 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6428 |
canBrowseProcessesApplication |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6429 |
|p| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6430 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6431 |
p := inspectedProcess ? Processor activeProcess. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6432 |
p isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6433 |
^ p isGUIProcess |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6434 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6435 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6436 |
canBrowseReceiversClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6437 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6438 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6439 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6440 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6441 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6442 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6443 |
canCloseAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6444 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6445 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6446 |
debugger busy ifTrue:[^ true]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6447 |
] |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6448 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6449 |
^ false |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6450 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6451 |
"Created: / 23-03-2012 / 12:40:18 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6452 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6453 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6454 |
canDefineMethod |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6455 |
^ defineButton isVisible |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6456 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6457 |
|
12840 | 6458 |
canInspectWidgetHierarchy |
6459 |
|rcvr| |
|
6460 |
||
6461 |
^ selectedContext notNil |
|
6462 |
and:[ (rcvr := selectedContext receiver) isView |
|
6463 |
or:[ rcvr isKindOf: ApplicationModel ]] |
|
6464 |
! |
|
6465 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6466 |
canRestart |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6467 |
^ restartButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6468 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6469 |
"Modified: / 17.11.2001 / 19:59:49 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6470 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6471 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6472 |
canReturn |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6473 |
^ returnButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6474 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6475 |
"Modified: / 17.11.2001 / 19:59:18 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6476 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6477 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6478 |
canSendEmail |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6479 |
^ SendMailTool notNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6480 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6481 |
"Created: / 15-10-2010 / 11:51:23 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6482 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6483 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6484 |
canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6485 |
^ canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6486 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6487 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6488 |
hasContextSelected |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6489 |
^ contextView hasSelection |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6490 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6491 |
"Created: / 17.11.2001 / 19:57:03 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6492 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6493 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6494 |
hasHaltsToIgnore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6495 |
^ IgnoredHalts notEmptyOrNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6496 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6497 |
|
7823 | 6498 |
isAborting |
6499 |
^ exitAction == #abort |
|
6500 |
! |
|
6501 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6502 |
isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6503 |
^ isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6504 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6505 |
"Created: / 06-03-2012 / 12:16:56 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6506 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6507 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6508 |
isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6509 |
^ isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6510 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6511 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6512 |
isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6513 |
^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6514 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6515 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6516 |
selectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6517 |
|con mthd| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6518 |
|
11595 | 6519 |
(con := self selectedContext) notNil ifTrue:[ |
11610 | 6520 |
mthd := con method. |
11595 | 6521 |
^ mthd notNil and:[mthd isWrapped] |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6522 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6523 |
^ false. |
11595 | 6524 |
|
11610 | 6525 |
"Modified: / 19-07-2012 / 11:36:28 / cg" |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6526 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6527 |
|
7823 | 6528 |
setOfHiddenCallingSelectors |
6529 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
|
6530 |
! |
|
6531 |
||
6532 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
|
6533 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
|
6534 |
! ! |
|
6535 |
||
9922 | 6536 |
!DebugView methodsFor:'private-breakpoints'! |
6537 |
||
12937 | 6538 |
addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
6539 |
orThisReceiverClass:forThisReceiverClass orCurrentProcess:forCurrentProcess |
|
6540 |
forAll:aBoolean |
|
6541 |
|haltingContext haltingMethod lineNrOfHalt receiverClassOrNil processOrNil| |
|
9922 | 6542 |
|
6543 |
aBoolean ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6544 |
haltingMethod := #all |
9922 | 6545 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6546 |
haltingContext := self findHaltingContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6547 |
haltingContext isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6548 |
Transcript showCR:'no halting context found'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6549 |
^ self |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6550 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6551 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6552 |
haltingMethod := haltingContext method. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6553 |
lineNrOfHalt := haltingContext lineNumber. |
12562 | 6554 |
(lineNrOfHalt isNil or:[lineNrOfHalt <= 0]) ifTrue:[ |
6555 |
Transcript showCR:'no halt lineNr found'. |
|
6556 |
^ self |
|
6557 |
]. |
|
12937 | 6558 |
forThisReceiverClass ifTrue:[ |
6559 |
receiverClassOrNil := haltingContext receiver class |
|
6560 |
]. |
|
6561 |
forCurrentProcess ifTrue:[ |
|
6562 |
processOrNil := Processor activeProcess |
|
6563 |
]. |
|
9922 | 6564 |
]. |
6565 |
||
6566 |
self class |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6567 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
11210 | 6568 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
12937 | 6569 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
11210 | 6570 |
|
6571 |
"Created: / 27-01-2012 / 11:31:12 / cg" |
|
9922 | 6572 |
! |
6573 |
||
6574 |
canAddBreakpoint |
|
6575 |
|m| |
|
6576 |
||
6577 |
m := contextView middleButtonMenu. |
|
6578 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
6579 |
! |
|
6580 |
||
6581 |
canRemoveBreakpoint |
|
6582 |
|m| |
|
6583 |
||
6584 |
m := contextView middleButtonMenu. |
|
6585 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
6586 |
! |
|
6587 |
||
6588 |
findHaltingContext |
|
6589 |
|haltSelectors| |
|
6590 |
||
6591 |
haltSelectors := self haltSelectors. |
|
6592 |
||
10205 | 6593 |
contextArray keysAndValuesDo:[:idx :con | |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6594 |
|sel con2 sel2 method| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6595 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6596 |
sel := con selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6597 |
(haltSelectors includes:sel) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6598 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6599 |
method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6600 |
con2 := contextArray at:idx+1. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6601 |
sel2 := con2 selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6602 |
(haltSelectors includes:sel2) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6603 |
con2 method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6604 |
^ contextArray at:idx+2. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6605 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6606 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6607 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6608 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6609 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6610 |
(contextArray at:idx+1) infoPrintCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6611 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6612 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6613 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6614 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6615 |
con method isWrapped ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6616 |
^ con |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6617 |
]. |
9922 | 6618 |
]. |
6619 |
^ nil |
|
6620 |
||
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6621 |
"Modified: / 27-01-2012 / 11:06:02 / cg" |
9922 | 6622 |
! |
6623 |
||
6624 |
ignoreBreakpoints |
|
6625 |
^ ignoreBreakpoints |
|
6626 |
||
6627 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
6628 |
! ! |
|
6629 |
||
7823 | 6630 |
!DebugView methodsFor:'private-cache handling'! |
6631 |
||
6632 |
cacheMyself |
|
6633 |
"remember myself for next debug session" |
|
6634 |
||
6635 |
"caching the last debugger will make the next debugger appear |
|
6636 |
faster, since no resources have to be allocated in the display. |
|
6637 |
We have to be careful to release all refs to the debuggee, though. |
|
6638 |
Otherwise, the GC will not be able to release it." |
|
6639 |
||
6640 |
windowGroup notNil ifTrue:[ |
|
11210 | 6641 |
windowGroup setProcess:nil. |
7823 | 6642 |
]. |
6643 |
||
6644 |
self releaseDebuggee. |
|
6645 |
||
6646 |
cachable ~~ true ifTrue:[^ self]. |
|
6647 |
||
6648 |
"/ |
|
6649 |
"/ only cache if I am on the Display |
|
6650 |
"/ |
|
6651 |
device == Display ifTrue:[ |
|
11210 | 6652 |
exclusive ifTrue:[ |
6653 |
CachedExclusive := self |
|
6654 |
] ifFalse:[ |
|
6655 |
CachedDebugger := self |
|
6656 |
]. |
|
7823 | 6657 |
]. |
6658 |
||
6659 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
11210 | 6660 |
ObjectMemory stepInterruptHandler:nil |
7823 | 6661 |
]. |
6662 |
||
6663 |
"Modified: 10.7.1997 / 15:50:46 / stefan" |
|
6664 |
"Modified: 31.7.1997 / 21:20:14 / cg" |
|
6665 |
! |
|
6666 |
||
6667 |
isCached |
|
13226 | 6668 |
"tell whether we are a cached debugger" |
7823 | 6669 |
|
6670 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6671 |
^ true. |
7823 | 6672 |
]. |
6673 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6674 |
^ true. |
7823 | 6675 |
]. |
6676 |
||
6677 |
^ false. |
|
6678 |
||
13226 | 6679 |
"Created: / 10-07-1997 / 15:22:43 / stefan" |
6680 |
"Modified (comment): / 27-07-2013 / 15:38:47 / cg" |
|
7823 | 6681 |
! |
6682 |
||
6683 |
uncacheMyself |
|
6684 |
"do not remember myself any longer for next debug session" |
|
6685 |
||
6686 |
cachable := false. |
|
6687 |
||
6688 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6689 |
CachedExclusive := nil. |
7823 | 6690 |
]. |
6691 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6692 |
CachedDebugger := nil. |
7823 | 6693 |
]. |
6694 |
OpenDebuggers notNil ifTrue:[ |
|
11210 | 6695 |
OpenDebuggers remove:self ifAbsent:[]. |
7823 | 6696 |
]. |
6697 |
||
6698 |
"Modified: 31.7.1997 / 21:20:11 / cg" |
|
6699 |
! ! |
|
6700 |
||
10628 | 6701 |
!DebugView methodsFor:'private-code view'! |
6702 |
||
6703 |
codeAspect |
|
11704 | 6704 |
^ SyntaxHighlighter codeAspectMethod |
10628 | 6705 |
|
6706 |
"Created: / 27-07-2011 / 13:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11704 | 6707 |
"Modified: / 27-07-2012 / 22:20:27 / cg" |
10628 | 6708 |
! ! |
6709 |
||
7823 | 6710 |
!DebugView methodsFor:'private-context handling'! |
6711 |
||
11391 | 6712 |
contextListEntryFor:aContext |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6713 |
^ Error |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6714 |
handle:[:ex | '???' ] |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6715 |
do:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6716 |
|s| |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6717 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6718 |
aContext selector == #doIt ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6719 |
aContext receiver isNil ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6720 |
s := 'doIt' allBold |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6721 |
] |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6722 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6723 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6724 |
s := Text streamContents:[:s | aContext printOn:s ]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6725 |
RememberedCallChain notNil ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6726 |
(RememberedCallChain includesIdentical:aContext) ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6727 |
s := s colorizeAllWith:(Color red). |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6728 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6729 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6730 |
s |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6731 |
]. |
11391 | 6732 |
|
6733 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
6734 |
! |
|
6735 |
||
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6736 |
is:aHomeContext inCallingChainOf:aContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6737 |
|con| |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6738 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6739 |
con := aContext. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6740 |
[con notNil and:[con ~~ aHomeContext]] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6741 |
con := con sender |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6742 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6743 |
^ con notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6744 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6745 |
"Created: / 10-06-2012 / 18:46:29 / cg" |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6746 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6747 |
|
11890 | 6748 |
isEnteredDueToBreakpointOrHalt |
6749 |
"see if we came here due to a step interrupt" |
|
6750 |
||
6751 |
|c cReceiver| |
|
6752 |
||
6753 |
"/ look for a breakpoint-wrapper's context |
|
6754 |
c := thisContext findNextContextWithSelector:#'raiseRequestWith:errorString:in:' or:nil or:nil. |
|
6755 |
c isNil ifTrue:[ |
|
6756 |
^ true. |
|
6757 |
]. |
|
6758 |
cReceiver := c receiver. |
|
6759 |
^ cReceiver == BreakPointInterrupt |
|
13293 | 6760 |
|
6761 |
"Modified: / 01-08-2013 / 23:34:01 / cg" |
|
11890 | 6762 |
! |
6763 |
||
6764 |
isHaltToBeIgnored |
|
6765 |
"see if the current halt (if any) is in the ignore-list" |
|
6766 |
||
13059 | 6767 |
|c cReceiver sender haltingMethod lineNrInHaltingMethod breakpointParameter |
6768 |
sReceiver| |
|
11890 | 6769 |
|
6770 |
"/ should a halt be ignored ? |
|
6771 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
6772 |
||
13059 | 6773 |
"/ look for a method breakpoint-wrapper's context |
11890 | 6774 |
c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil. |
6775 |
c notNil ifTrue:[ |
|
6776 |
((cReceiver := c receiver) isKindOf:NoHandlerError) ifTrue:[ |
|
6777 |
c := c sender findNextContextWithSelector:#doRaise or:nil or:nil. |
|
6778 |
cReceiver := c receiver. |
|
6779 |
]. |
|
6780 |
(cReceiver isKindOf:BreakPointInterrupt) ifFalse:[ |
|
6781 |
c := nil |
|
6782 |
] ifTrue:[ |
|
6783 |
[ |
|
6784 |
sender := c sender. |
|
13059 | 6785 |
((sReceiver := sender receiver) isKindOf:BreakPointInterrupt) |
6786 |
or:[ sReceiver == BreakPointInterrupt ] |
|
11890 | 6787 |
] whileTrue:[ |
6788 |
c := sender |
|
6789 |
]. |
|
6790 |
[ (sender := c sender) isBlockContext ] whileTrue:[ |
|
6791 |
c := sender |
|
6792 |
]. |
|
6793 |
sender := nil. "/ avoid keeping a reference to this context |
|
6794 |
]. |
|
6795 |
]. |
|
6796 |
||
6797 |
c isNil ifTrue:[ |
|
6798 |
"/ look for halts or explicit breakpoints |
|
6799 |
c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil. |
|
6800 |
c isNil ifTrue:[ |
|
6801 |
c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil. |
|
6802 |
c isNil ifTrue:[ |
|
6803 |
^ false |
|
6804 |
]. |
|
6805 |
breakpointParameter := c argAt:1. |
|
12937 | 6806 |
(self class |
6807 |
isBreakpointToBeIgnoredForParameter:breakpointParameter |
|
6808 |
context:(c sender) |
|
6809 |
modifyEntryCount:true |
|
6810 |
) ifTrue:[ |
|
11890 | 6811 |
^ true. |
6812 |
]. |
|
6813 |
]. |
|
6814 |
]. |
|
6815 |
||
6816 |
c := c sender. |
|
6817 |
"/ a code-breakpoint ? |
|
6818 |
(c receiver isKindOf:Breakpoint) ifTrue:[ |
|
6819 |
c := c sender. |
|
6820 |
]. |
|
6821 |
haltingMethod := c method. |
|
6822 |
||
6823 |
haltingMethod isWrapped ifTrue:[ |
|
6824 |
lineNrInHaltingMethod := 1. |
|
6825 |
] ifFalse:[ |
|
6826 |
lineNrInHaltingMethod := c lineNumber. |
|
6827 |
"/ Transcript showCR:c. |
|
6828 |
]. |
|
6829 |
||
12562 | 6830 |
^ self class |
11890 | 6831 |
isHaltToBeIgnoredIn:haltingMethod |
6832 |
atLineNr:lineNrInHaltingMethod |
|
12937 | 6833 |
context:c |
11890 | 6834 |
modifyEntryCount:true. |
6835 |
||
6836 |
"Created: / 22-10-2010 / 12:09:53 / cg" |
|
6837 |
"Modified: / 06-03-2012 / 12:54:09 / cg" |
|
6838 |
! |
|
6839 |
||
266 | 6840 |
setContext:aContext |
6841 |
"show calling chain from aContext in the walk-back listview" |
|
6842 |
||
641 | 6843 |
^ 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
|
6844 |
|
641 | 6845 |
"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
|
6846 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6847 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6848 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
6849 |
"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
|
6850 |
Most complications here arise from filtering less-interesting contexts |
11573 | 6851 |
if not in verbose-context mode or when hiding implementation contexts." |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6852 |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6853 |
|con text method caller caller2 called called2 m count c cc sndr |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6854 |
suspendContext calledBySuspendContext nm h calledContext show2| |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6855 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6856 |
"/ (contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6857 |
"/ "no change" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6858 |
"/ ^ false |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6859 |
"/ ]. |
266 | 6860 |
|
13363 | 6861 |
isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := isStoppedInModalDialog := false. |
939 | 6862 |
firstContext := aContext. |
6863 |
||
266 | 6864 |
m := contextView middleButtonMenu. |
6865 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6866 |
m disable:#showMore. |
266 | 6867 |
]. |
3269 | 6868 |
canShowMore := false. |
266 | 6869 |
|
6870 |
aContext isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6871 |
text := Array with:'** no context **'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6872 |
contextArray := nil. |
266 | 6873 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6874 |
text := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6875 |
contextArray := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6876 |
con := aContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6877 |
calledContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6878 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6879 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6880 |
"/ with dense backtrace, hide the ProcessorScheduler |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6881 |
"/ contexts at the top; look for a Process>>suspend* |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6882 |
"/ context within the first 10 contexts |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6883 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6884 |
suspendContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6885 |
c := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6886 |
1 to:10 do:[:i | |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6887 |
|sel| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6888 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6889 |
c notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6890 |
(sel := c selector) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6891 |
((sel isSymbol and:[sel startsWith:'suspend']) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6892 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6893 |
suspendContext := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6894 |
calledBySuspendContext := cc. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6895 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6896 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6897 |
cc := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6898 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6899 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6900 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6901 |
suspendContext notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6902 |
con := suspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6903 |
calledContext := calledBySuspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6904 |
suspendContext := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6905 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6906 |
]. |
12039 | 6907 |
"/ Transcript show:'1 '; showCR:con. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6908 |
con notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6909 |
"/ hide the halt implementation |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6910 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6911 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6912 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6913 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6914 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6915 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6916 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6917 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6918 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6919 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6920 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6921 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6922 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6923 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6924 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6925 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6926 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6927 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6928 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6929 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6930 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6931 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6932 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6933 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6934 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6935 |
get them all |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6936 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6937 |
count := 0. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6938 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
13455 | 6939 |
"/ remember any halt/breakpoint or openModal on the fly |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6940 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6941 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6942 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6943 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6944 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6945 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6946 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6947 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6948 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6949 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6950 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6951 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6952 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6953 |
] |
13363 | 6954 |
] ifFalse:[ |
13367 | 6955 |
((con selector == #openModal) or:[con selector == #openModal:]) ifTrue:[ |
13363 | 6956 |
isStoppedInModalDialog := true. |
6957 |
]. |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6958 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6959 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6960 |
[ |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6961 |
|show1| |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6962 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6963 |
show1 := self showingContext1:con calling:calledContext. |
11636 | 6964 |
DebuggingDebugger3 == true ifTrue:[ |
13455 | 6965 |
'showingContext1: (' print. con print. ') --> ' print. show1 printCR. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6966 |
]. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6967 |
show1 |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6968 |
] whileFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6969 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6970 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6971 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6972 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6973 |
show2 := self showingContext2:con nesting:count. |
11636 | 6974 |
DebuggingDebugger3 == true ifTrue:[ |
13455 | 6975 |
'showingContext2: (' print. con print. ') --> ' print. show2 printCR. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6976 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6977 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6978 |
show2 ifTrue:[ |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6979 |
(self showingContext3:con nesting:count) ifTrue:[ |
13462 | 6980 |
contextArray add:con. |
6981 |
||
6982 |
(MoreDebuggingDetail == true) ifTrue:[ |
|
6983 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
|
6984 |
] ifFalse:[ |
|
6985 |
nm := self contextListEntryFor:con. |
|
6986 |
]. |
|
6987 |
text add:nm. |
|
6988 |
count := count + 1. |
|
6989 |
] ifFalse:[ |
|
6990 |
DebuggingDebugger3 == true ifTrue:[ |
|
6991 |
'showingContext3: (' print. con print. ') --> false' printCR. |
|
6992 |
]. |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6993 |
] |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6994 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6995 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6996 |
"/ with hidden support code, skip over internals of exceptions |
11573 | 6997 |
hideSupportCode == true ifTrue:[ |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6998 |
(con isBlockContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6999 |
and:[ (h := con home) notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7000 |
and:[ (self is:h inCallingChainOf:con) ]]) ifTrue:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
7001 |
|blocksReceiver| |
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
7002 |
blocksReceiver := con receiver. |
11573 | 7003 |
c := con sender. |
7004 |
[ |
|
7005 |
c notNil |
|
7006 |
and:[ |
|
7007 |
sndr := c sender. |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7008 |
(sndr ~= h) |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7009 |
and:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
7010 |
blocksReceiver isCollection "/ skip collection implementations |
11573 | 7011 |
or:[ ( #( #'handle:do:' "/ skip exception implementations |
7012 |
#'handleDo:' |
|
7013 |
#'answer:do:' |
|
7014 |
#'ensure:' ) includes: c selector ) |
|
7015 |
or:[ #'perform:*' "/ skip perform implementations |
|
7016 |
match: c selector ]] |
|
7017 |
] |
|
7018 |
] |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7019 |
] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7020 |
c := sndr |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7021 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7022 |
c notNil ifTrue:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
7023 |
con := c "sender". |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7024 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7025 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7026 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7027 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7028 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7029 |
"/ kludge: if its a wrapped method, then hide the wrap-call |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7030 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7031 |
method := con method. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7032 |
method notNil ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7033 |
called := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7034 |
caller := con sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7035 |
(caller notNil and:[caller receiver == method]) ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7036 |
called2 := caller. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7037 |
caller2 := caller sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7038 |
caller2 notNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7039 |
(caller2 method isWrapped |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7040 |
and:[ caller2 method originalMethod == method ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7041 |
calledContext := called2. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7042 |
con := caller2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7043 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7044 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7045 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7046 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7047 |
caller := caller2 := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7048 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7049 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7050 |
"/ with dense backtrace, skip the doIt methods context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7051 |
"/ (its dummy anyway) and fake that contexts name |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7052 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7053 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7054 |
(con isBlockContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7055 |
and:[(h := con home) == con sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7056 |
and:[h notNil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7057 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7058 |
and:[h method who isNil]]]]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7059 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7060 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7061 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7062 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7063 |
text add:(self contextListEntryFor:con methodHome). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7064 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7065 |
h := nil. "/ never keep refs to contexts unless you really need them ... |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7066 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7067 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7068 |
"/ with dense backtrace, dont show below the doIt |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7069 |
( verboseBacktrace ~~ true |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7070 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7071 |
con := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7072 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7073 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7074 |
con := con sender |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7075 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7076 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7077 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7078 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7079 |
did we reach the end ? |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7080 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7081 |
(con isNil or:[con sender isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7082 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7083 |
"/ the very last one is the startup context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7084 |
"/ (in main) - it has nil as receiver and nil as selector |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7085 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7086 |
(contextArray notEmpty |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7087 |
and:[contextArray last selector isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7088 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7089 |
text removeLast |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7090 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7091 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7092 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7093 |
"/ in dense mode, remove the process startup |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7094 |
"/ contexts (if any) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7095 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7096 |
(contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7097 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7098 |
con selector == #start ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7099 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7100 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7101 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7102 |
[contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7103 |
and:[contextArray last methodHome == con]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7104 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7105 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7106 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7107 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7108 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7109 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7110 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7111 |
m notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7112 |
m enable:#showMore. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7113 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7114 |
canShowMore := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7115 |
text add:(resources string:'*** more walkback follows - click here to see them ***') |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7116 |
]. |
266 | 7117 |
]. |
7118 |
||
7119 |
contextView setList:text. |
|
944 | 7120 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7121 |
releaseInspectors ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7122 |
receiverInspector release. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7123 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7124 |
]. |
266 | 7125 |
|
7126 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7127 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 7128 |
]. |
3511 | 7129 |
self updateMenuItems. |
266 | 7130 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7131 |
|
7797 | 7132 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
7133 |
"Modified: / 27-07-2012 / 15:10:53 / cg" |
266 | 7134 |
! |
7135 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7136 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7137 |
"show calling chain from aContext in the walk-back listview. |
1213 | 7138 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7139 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7140 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7141 |
|
8152 | 7142 |
con := aContext. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
7143 |
verboseBacktrace ifFalse:[ |
11210 | 7144 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
7145 |
con := con sender. |
|
7146 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
|
7147 |
con := con sender. |
|
7148 |
]. |
|
7149 |
]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7150 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7151 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7152 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
7153 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
7154 |
"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
|
7155 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7156 |
|
3447 | 7157 |
showingContext1:aContext calling:calledContext |
7823 | 7158 |
"return false, if this (top) context is to be skipped. |
10205 | 7159 |
Here, we hide some well known methods, which are usually not too interesting; |
7823 | 7160 |
the set of methods which are suppressed is my (claus's) own choice." |
7161 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7162 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 7163 |
|
7164 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
7165 |
aContext isNil ifTrue:[ ^true ]. |
|
7166 |
||
7167 |
sel := aContext selector. |
|
7168 |
rec := aContext receiver. |
|
7169 |
mthd := aContext method. |
|
7170 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
7171 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7172 |
"/ to avoid firing/waiting the lazy or future |
10205 | 7173 |
recIsException := (rec isLazyValue not) and:[rec isException]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7174 |
aContext sender notNil ifTrue:[ |
11210 | 7175 |
senderRec := aContext sender receiver |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7176 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7177 |
|
11636 | 7178 |
DebuggingDebugger3 == true ifTrue:[ |
11210 | 7179 |
'showingContext1: (' print. aContext print. |
7180 |
') calling: (' print. calledContext print. |
|
7181 |
')' printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7182 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7183 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7184 |
(#(doCallHandler: doRaise |
3447 | 7185 |
) includes:sel) |
11210 | 7186 |
ifTrue:[ |
7187 |
recIsException ifTrue:[ ^ false]. |
|
7188 |
]. |
|
3447 | 7189 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7190 |
(#(raise raiseRequest |
3447 | 7191 |
) includes:sel) |
11210 | 7192 |
ifTrue:[ |
7193 |
recIsException ifTrue:[ |
|
7194 |
(senderRec isLazyValue not |
|
7195 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
|
7196 |
]. |
|
7197 |
]. |
|
3447 | 7198 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7199 |
(#(doWhile: |
3447 | 7200 |
) includes:sel) |
11210 | 7201 |
ifTrue:[ |
7202 |
rec isBlock ifTrue:[ |
|
7203 |
true "aContext sender isBlockContext" ifTrue:[^ false]. |
|
7204 |
]. |
|
7205 |
]. |
|
3447 | 7206 |
|
8620 | 7207 |
calledContext notNil ifTrue:[ |
11210 | 7208 |
calledSel := calledContext selector. |
7209 |
calledRec := calledContext receiver. |
|
7210 |
||
7211 |
calledRec isBlock ifTrue:[ |
|
7212 |
(calledSel == #ensure:) ifTrue:[^ false]. |
|
7213 |
(calledSel == #ifCurtailed:) ifTrue:[^ false]. |
|
7214 |
]. |
|
7215 |
(calledSel == #handle:do:) ifTrue:[^ false]. |
|
7216 |
(calledSel == #answer:do:) ifTrue:[^ false]. |
|
8620 | 7217 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7218 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7219 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7220 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7221 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7222 |
"/ |
10205 | 7223 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7224 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7225 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7226 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7227 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7228 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7229 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7230 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7231 |
"/ ]. |
8620 | 7232 |
]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7233 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7234 |
(#(handleDo:) includes:sel) |
11210 | 7235 |
ifTrue:[ |
7236 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
|
7237 |
]. |
|
10205 | 7238 |
(#( |
11210 | 7239 |
withCursor:do: |
7240 |
withWaitCursorDo: |
|
11696 | 7241 |
withReadCursorDo: |
7242 |
withWriteCursorDo: |
|
7243 |
withSearchCursorDo: |
|
3447 | 7244 |
) includes:sel) |
11210 | 7245 |
ifTrue:[ |
7246 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
7247 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
7248 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
7249 |
]. |
|
10205 | 7250 |
|
7251 |
(#( |
|
11210 | 7252 |
wait |
7253 |
waitWithTimeout: |
|
7254 |
waitWithTimeoutMs: |
|
3447 | 7255 |
) includes:sel) |
11210 | 7256 |
ifTrue:[ |
7257 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
7258 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
7259 |
]. |
|
3447 | 7260 |
|
7261 |
^ true |
|
7262 |
||
9662 | 7263 |
"Created: / 17-11-2001 / 22:24:06 / cg" |
11696 | 7264 |
"Modified: / 27-07-2012 / 17:30:18 / cg" |
3447 | 7265 |
! |
7266 |
||
7267 |
showingContext2:aContext nesting:nesting |
|
7823 | 7268 |
"return false, if this (intermediate) context is to be skipped. |
13455 | 7269 |
Here, we hide some well known methods, which are usually not too interesting; |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7270 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 7271 |
|
10205 | 7272 |
|sel rec mClass |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7273 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7274 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7275 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 7276 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7277 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7278 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7279 |
sel := aContext selector. |
939 | 7280 |
mClass := aContext methodClass. |
7281 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7282 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7283 |
sender notNil ifTrue:[ |
11210 | 7284 |
senderSelector := sender selector. |
7285 |
senderReceiver := sender receiver. |
|
7286 |
senderReceiverClass := senderReceiver class. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7287 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7288 |
|
939 | 7289 |
sel == #withCursor:do: ifTrue:[ |
11210 | 7290 |
(mClass == WindowGroup) ifTrue:[^ false]. |
7291 |
(mClass == TopView) ifTrue:[^ false]. |
|
939 | 7292 |
]. |
7293 |
(sel == #withExecuteCursorDo: |
|
7294 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
11210 | 7295 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 7296 |
]. |
7297 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
7298 |
(sel == #do: |
6600 | 7299 |
or:[sel == #from:to:do: |
6601 | 7300 |
or:[sel == #keysAndValuesDo: |
7301 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
11210 | 7302 |
mClass == Array ifTrue:[^ false]. |
7303 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
7304 |
mClass == Set ifTrue:[^ false]. |
|
7305 |
mClass == Dictionary ifTrue:[^ false]. |
|
7306 |
mClass == Interval ifTrue:[^ false]. |
|
10205 | 7307 |
]. |
7308 |
(sel == #perform: |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7309 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7310 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7311 |
or:[sel == #perform:with:with:with: |
11696 | 7312 |
or:[sel == #perform:with:with:with:with: |
7313 |
or:[sel == #perform:withArguments: |
|
7314 |
or:[sel == #perform:with:ifNotUnderstood: |
|
7315 |
or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]) |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7316 |
ifTrue:[ |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7317 |
hideSupportCode == true ifTrue:[ |
13455 | 7318 |
"/ 'x' printCR. |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7319 |
mClass == Object ifTrue:[^ false] |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7320 |
]. |
11210 | 7321 |
nesting == 0 ifTrue:[^ true]. |
7322 |
mClass == Array ifTrue:[^ false]. |
|
7323 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7324 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7325 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7326 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7327 |
|
939 | 7328 |
(mClass == Object) ifTrue:[ |
11210 | 7329 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 7330 |
]. |
7331 |
||
7332 |
(mClass == Method) ifTrue:[ |
|
11210 | 7333 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 7334 |
]. |
7335 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
7336 |
(mClass == SmallInteger) ifTrue:[ |
11210 | 7337 |
(sel == #to:do:) ifTrue:[^ false]. |
7338 |
(sel == #to:by:do:) ifTrue:[^ false]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
7339 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
7340 |
|
939 | 7341 |
(mClass == Block) ifTrue:[ |
11210 | 7342 |
sel == #ensure: ifTrue:[^ false]. |
7343 |
sel == #ifCurtailed: ifTrue:[^ false]. |
|
7344 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
|
7345 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
|
7346 |
sel == #on:do: ifTrue:[^ false]. |
|
7347 |
||
7348 |
sel == #value ifTrue:[^ false]. |
|
7349 |
sel == #value: ifTrue:[^ false]. |
|
7350 |
sel == #value:value: ifTrue:[^ false]. |
|
7351 |
sel == #value:value:value: ifTrue:[^ false]. |
|
7352 |
sel == #value:value:value:value: ifTrue:[^ false]. |
|
7353 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
|
7354 |
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
|
7355 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7356 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7357 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7358 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7359 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7360 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7361 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7362 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7363 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7364 |
"/ 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
|
7365 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7366 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7367 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7368 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7369 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7370 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7371 |
|
11210 | 7372 |
aContext home notNil ifTrue:[ |
7373 |
aContext home receiver isLazyValue ifFalse:[ |
|
7374 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
|
7375 |
(aContext home selector == #wait) ifTrue:[^ false]. |
|
7376 |
(aContext home selector == #waitWithTimeoutMs:) ifTrue:[^ false]. |
|
7377 |
] |
|
7378 |
] |
|
7379 |
] |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7380 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7381 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7382 |
(rec isExceptionHandler) ifTrue:[ |
11210 | 7383 |
sel == #handle:do: ifTrue:[^ false]. |
7384 |
sel == #handleDo: ifTrue:[^ false]. |
|
7385 |
(sel startsWith:#raise) ifTrue:[^ false]. |
|
7386 |
sel == #answer:do: ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7387 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7388 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
11210 | 7389 |
sel == #doRaise ifTrue:[^ false]. |
7390 |
sel == #doCallHandler: ifTrue:[^ false]. |
|
7391 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
|
7392 |
senderReceiverClass == Signal ifTrue:[^ false]. |
|
7393 |
] |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7394 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7395 |
(mClass == Context) ifTrue:[ |
11210 | 7396 |
sel == #unwind ifTrue:[^ false]. |
7397 |
sel == #unwind: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7398 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7399 |
(mClass == ProcessorScheduler) ifTrue:[ |
11210 | 7400 |
sel == #interruptActive ifTrue:[^ false]. |
7401 |
sel == #threadSwitch: ifTrue:[^ false]. |
|
7402 |
sel == #suspend: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7403 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7404 |
mClass == Process ifTrue:[ |
11210 | 7405 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7406 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7407 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7408 |
|
9662 | 7409 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
11696 | 7410 |
"Modified: / 27-07-2012 / 17:26:54 / cg" |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7411 |
! |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7412 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7413 |
showingContext3:aContext nesting:nesting |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7414 |
"return false, if this (intermediate) context is to be skipped. |
13455 | 7415 |
Here, we hide some well known methods, which are usually not too interesting; |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7416 |
the set of methods which are suppressed is my (claus's) own choice." |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7417 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7418 |
|sel rec mClass |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7419 |
sender senderReceiver senderSelector senderReceiverClass| |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7420 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7421 |
hideSupportCode ifFalse:[^ true]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7422 |
aContext isNil ifTrue:[^ true]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7423 |
|
13462 | 7424 |
^ true. |
7425 |
"/ mhmh - what was this useful for? |
|
7426 |
"/ rec := aContext receiver. |
|
7427 |
"/ sel := aContext selector. |
|
7428 |
"/ mClass := aContext methodClass. |
|
7429 |
"/ |
|
7430 |
"/ sender := aContext sender. |
|
7431 |
"/ sender notNil ifTrue:[ |
|
7432 |
"/ senderSelector := sender selector. |
|
7433 |
"/ senderReceiver := sender receiver. |
|
7434 |
"/ senderReceiverClass := senderReceiver class. |
|
7435 |
"/ ]. |
|
7436 |
"/ |
|
7437 |
"/ (sel == #perform: |
|
7438 |
"/ or:[sel == #perform:with: |
|
7439 |
"/ or:[sel == #perform:with:with: |
|
7440 |
"/ or:[sel == #perform:with:with:with: |
|
7441 |
"/ or:[sel == #perform:with:with:with:with: |
|
13464 | 7442 |
"/ or:[sel == #perform:with:with:with:with:with: |
13462 | 7443 |
"/ or:[sel == #perform:withArguments: |
7444 |
"/ or:[sel == #perform:with:ifNotUnderstood: |
|
13464 | 7445 |
"/ or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]]) |
13462 | 7446 |
"/ ifTrue:[ |
7447 |
"/ mClass == Object ifTrue:[^ false] |
|
7448 |
"/ ]. |
|
7449 |
"/ |
|
7450 |
"/ ^ true. |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7451 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7452 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
7453 |
"Modified: / 27-07-2012 / 17:26:54 / cg" |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
7454 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
7455 |
|
4859 | 7456 |
!DebugView methodsFor:'private-control loop'! |
266 | 7457 |
|
7458 |
controlLoop |
|
7459 |
"this is a kludge: |
|
11210 | 7460 |
start a dispatchloop which exits when |
7461 |
either continue, return or step is pressed |
|
266 | 7462 |
" |
7463 |
||
7464 |
haveControl := true. |
|
664 | 7465 |
[ |
11210 | 7466 |
[haveControl] whileTrue:[ |
13388 | 7467 |
AbortOperationRequest handle:[:ex | |
7468 |
] do:[ |
|
11210 | 7469 |
self controlLoopCatchingErrors |
13388 | 7470 |
] |
11210 | 7471 |
]. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
7472 |
] ensure:[ |
11210 | 7473 |
catchBlock := nil. |
7474 |
haveControl := false |
|
266 | 7475 |
]. |
664 | 7476 |
|
7477 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 7478 |
! |
7479 |
||
7480 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
7481 |
"this is the debuggers own private event handling loop; |
1187 | 7482 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
7483 |
|
266 | 7484 |
"setup a self removing catch-block" |
7485 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
7486 |
||
7487 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
11210 | 7488 |
"if we do not have multiple processes or its a system process |
7489 |
we start another dispatch loop, which exits when |
|
7490 |
either continue, return or step is pressed |
|
7491 |
or (via the catchBlock) if an error occurs. |
|
7492 |
Since our display is an extra exclusive one, |
|
7493 |
all processing for normal views stops here ... |
|
7494 |
" |
|
7495 |
||
7496 |
WindowGroup setActiveGroup:windowGroup. |
|
7497 |
SignalSet anySignal handle:[:ex | |
|
7498 |
|signal| |
|
7499 |
||
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
7500 |
signal := ex creator. |
11890 | 7501 |
(UserNotification accepts:signal) ifTrue:[ |
7502 |
Transcript showCR:'UserNotification'. |
|
7503 |
(signal ~~ ActivityNotificationSignal) ifTrue:[ |
|
7504 |
self showError:ex description. |
|
7505 |
]. |
|
7506 |
ex proceed. |
|
7507 |
]. |
|
7508 |
(HaltInterrupt accepts:signal) ifTrue:[ |
|
7509 |
Transcript showCR:'HaltInterrupt'. |
|
7510 |
Transcript showCR:'Halt/Break in debugger ignored'. |
|
7511 |
ex proceed. |
|
7512 |
]. |
|
11210 | 7513 |
|
7514 |
self showError:'*** Error in modal debugger: |
|
266 | 7515 |
|
334 | 7516 |
>>>> Signal: ' , signal printString , ' |
266 | 7517 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 7518 |
>>>> From: ' , ex suspendedContext sender printString , ' |
7519 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
7520 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
7521 |
>>>> : ' , 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
|
7522 |
>>>> : ' , 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
|
7523 |
>>>> : ' , 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
|
7524 |
>>>> : ' , 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
|
7525 |
>>>> : ' , 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
|
7526 |
>>>> : ' , 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
|
7527 |
>>>> : ' , 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
|
7528 |
>>>> : ' , 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
|
7529 |
>>>> : ' , 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
|
7530 |
>>>> : ' , 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
|
7531 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 7532 |
>>>> Message: ' , ex description , ' |
266 | 7533 |
|
1187 | 7534 |
caught & ignored.'. |
11210 | 7535 |
ex return. |
7536 |
] do:[ |
|
11890 | 7537 |
"/ UserNotification handle:[:ex | |
7538 |
"/ (ex signal == ActivityNotificationSignal) ifTrue:[ |
|
7539 |
"/ ex proceed |
|
7540 |
"/ ]. |
|
7541 |
"/ self showError:ex description. |
|
7542 |
"/ ex proceed. |
|
7543 |
"/ ] do:[ |
|
7544 |
device |
|
7545 |
dispatchModalWhile:[ |
|
7546 |
Processor activeProcess state:#debug. |
|
7547 |
haveControl]. |
|
7548 |
"/ ] |
|
11210 | 7549 |
]. |
7550 |
WindowGroup setActiveGroup:nil. |
|
266 | 7551 |
] ifFalse:[ |
11210 | 7552 |
"we do have multiple processes - |
7553 |
simply enter the DebugViews-Windowgroup event loop. |
|
7554 |
effectively suspending event processing for the currently |
|
7555 |
active group. |
|
7556 |
" |
|
7557 |
SignalSet anySignal handle:[:ex | |
|
7558 |
|answer signal eMsg| |
|
7559 |
||
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
7560 |
signal := ex creator. |
11210 | 7561 |
|
7562 |
DebuggingDebugger ~~ true ifTrue:[ |
|
7563 |
(signal == ActivityNotification) ifTrue:[ |
|
7564 |
ex proceed |
|
7565 |
]. |
|
7566 |
"/ |
|
7567 |
"/ ignore exceptions which say they explicitly have to be ignored |
|
7568 |
"/ |
|
7569 |
ex catchInDebugger ifTrue:[ |
|
12333 | 7570 |
'DebugView [info]: ',signal printString,'-signal in debugger caught for close' infoPrintCR. |
11210 | 7571 |
self destroy. |
7572 |
ex reject |
|
7573 |
]. |
|
7574 |
||
7575 |
"/ |
|
7576 |
"/ ignore recursive breakpoints |
|
7577 |
"/ |
|
7578 |
(signal isControlInterrupt) ifTrue:[ |
|
7579 |
ignoreBreakpoints == true ifTrue:[ |
|
7580 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
|
7581 |
('DebugView [info]: ',ex suspendedContext printString) infoPrintCR. |
|
7582 |
ex proceed |
|
7583 |
]. |
|
7584 |
]. |
|
7585 |
(signal == TerminateProcessRequest) ifTrue:[ |
|
7586 |
"/ mhm - someone wants to shoot me down while debugging ... |
|
7587 |
answer := Dialog |
|
7588 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
|
7589 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
7590 |
values:#( #proceed #close ) |
|
7591 |
default:#close. |
|
7592 |
answer == #close ifTrue:[ |
|
7593 |
self destroy. |
|
7594 |
ex reject |
|
7595 |
]. |
|
7596 |
ex return. |
|
7597 |
]. |
|
7598 |
signal == RecursiveExceptionError ifTrue:[ |
|
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
7599 |
(ex exception creator == BreakPointInterrupt) |
11210 | 7600 |
ifTrue:[ |
7601 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
|
7602 |
ex proceed. |
|
7603 |
]. |
|
7604 |
||
7605 |
self showError:'*** Recursive error in debugger: |
|
266 | 7606 |
|
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
7607 |
>>>> Signal: ' , ex creator printString , ' |
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
7608 |
>>>> ' , ex parameter creator printString , ' |
266 | 7609 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 7610 |
>>>> From: ' , ex suspendedContext sender printString , ' |
7611 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
7612 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
7613 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 7614 |
>>>> Message: ' , ex description , ' |
266 | 7615 |
|
1187 | 7616 |
caught & ignored.'. |
11210 | 7617 |
ex return |
7618 |
]. |
|
7619 |
]. |
|
7620 |
||
7621 |
self topView raiseDeiconified. |
|
7622 |
||
7623 |
eMsg := ex description. |
|
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
7624 |
(signal isControlInterrupt) ifTrue:[ |
11210 | 7625 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
7626 |
]. |
|
7627 |
Dialog aboutToOpenBoxNotificationSignal |
|
7628 |
handle:[:ex | ex proceed ] |
|
7629 |
do:[ |
|
7630 |
answer := Dialog |
|
7631 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
|
7632 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
7633 |
values:#( #proceed #cancel #debug ) |
|
7634 |
default:#cancel. |
|
7635 |
]. |
|
7636 |
answer == #debug ifTrue:[ |
|
12333 | 7637 |
'DebugView [info]: caught exception - debugging' infoPrintCR. |
11210 | 7638 |
Debugger |
7639 |
enterUnconditional:(ex suspendedContext) |
|
7640 |
withMessage:'Error in debugger: ' , eMsg |
|
7641 |
mayProceed:true. |
|
7642 |
ex proceed. |
|
7643 |
]. |
|
7644 |
answer == #proceed ifTrue:[ |
|
7645 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
|
7646 |
ex proceed. |
|
7647 |
]. |
|
12333 | 7648 |
'DebugView [info]: caught exception - returning' infoPrintCR. |
11210 | 7649 |
ex return. |
7650 |
] do:[ |
|
7651 |
"/ make certain that sub-debuggers, inspectors etc. |
|
7652 |
"/ come up on my device. |
|
7653 |
Screen currentScreenQuerySignal answer:device |
|
7654 |
do:[ |
|
13363 | 7655 |
Dialog aboutToOpenBoxNotificationSignal |
7656 |
handle:[:ex | ex proceed ] |
|
7657 |
do:[ |
|
7658 |
windowGroup |
|
7659 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
7660 |
true] |
|
7661 |
onLeave:[] |
|
7662 |
] |
|
11210 | 7663 |
] |
7664 |
]. |
|
266 | 7665 |
]. |
7666 |
catchBlock := nil. |
|
7667 |
||
11818 | 7668 |
"Created: / 24-11-1995 / 20:33:45 / cg" |
7669 |
"Modified: / 26-09-2012 / 15:03:39 / cg" |
|
266 | 7670 |
! ! |
7671 |
||
13416 | 7672 |
!DebugView methodsFor:'queries'! |
7673 |
||
7674 |
showingAlreadyModifiedCode |
|
7675 |
^ methodCodeToggle isVisible |
|
7676 |
and:[ methodCodeToggleSelectionHolder value = 2 ] |
|
7677 |
! ! |
|
7678 |
||
0 | 7679 |
!DebugView methodsFor:'user interaction'! |
7680 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7681 |
checkIfCodeIsReallyModified |
6616 | 7682 |
|source| |
7683 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7684 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7685 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7686 |
currentMethod isNil ifTrue:[ |
11210 | 7687 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7688 |
]. |
6616 | 7689 |
source := currentMethod source. |
7690 |
source notNil ifTrue:[ |
|
11210 | 7691 |
source string = codeView contents string ifTrue:[ |
7692 |
^ false |
|
7693 |
]. |
|
7694 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
7695 |
^ false |
|
7696 |
]. |
|
6616 | 7697 |
]. |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7698 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7699 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7700 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7701 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7702 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7703 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7704 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7705 |
checkSelectionChangeAllowed:newSelection |
13388 | 7706 |
|answer v| |
7707 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7708 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7709 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7710 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7711 |
and:[newSelection = contextView selection]) ifTrue:[ |
11210 | 7712 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7713 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7714 |
|
13388 | 7715 |
answer := Dialog |
7716 |
confirmWithCancel:('Code modified - change selection anyway ?') |
|
7717 |
labels:#('No' 'No, Show Diffs' 'Yes'). |
|
7718 |
answer isNil ifTrue:[^ false]. |
|
7719 |
answer == false ifTrue:[ |
|
7720 |
v := DiffCodeView |
|
7721 |
openOn:codeView contents |
|
7722 |
label:(resources string:'Changed code (to be accepted ?)') |
|
7723 |
and:currentMethod source |
|
7724 |
label:(resources string:'Method''s actual (maybe original) code'). |
|
7725 |
v label:(resources string:'Comparing method''s code'). |
|
7726 |
v waitUntilVisible. |
|
7727 |
^ false |
|
7728 |
]. |
|
7729 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7730 |
codeView modified:false. |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7731 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7732 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7733 |
|
266 | 7734 |
codeAccept:someCode |
13394 | 7735 |
"user wants some code to be recompiled" |
7736 |
||
7737 |
^ self codeAccept:someCode unwind:false category:nil onCancel:nil |
|
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7738 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7739 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 7740 |
! |
7741 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7742 |
codeAccept:someCode inClass:aClass unwind:doUnwind category:category onCancel:cancelAction |
13394 | 7743 |
"user wants some code to be recompiled. |
7744 |
Optionally unwind stack to right above the changed method. |
|
13455 | 7745 |
This undwind option is a leftover from times, when the debugger had no chance to |
7746 |
show the original code. |
|
7747 |
Now, it can, and got a choice-field to select between original and changed code. |
|
7748 |
So the undwind option is not longer used and probably completely obsolete now |
|
7749 |
(aka: this method is always called with doUnwind==false, these days)" |
|
3427 | 7750 |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7751 |
|con top newMethod| |
3427 | 7752 |
|
7753 |
codeView withWaitCursorDo:[ |
|
11210 | 7754 |
" |
7755 |
find the method-home context for this one |
|
7756 |
" |
|
7757 |
doUnwind ifTrue:[ |
|
7758 |
con := selectedContext. |
|
7759 |
top := con. |
|
7760 |
[con notNil] whileTrue:[ |
|
7761 |
(con methodHome == selectedContext) ifTrue:[ |
|
7762 |
top := con |
|
7763 |
]. |
|
7764 |
con := con sender |
|
7765 |
]. |
|
7766 |
]. |
|
7767 |
||
7768 |
"/ |
|
13394 | 7769 |
"/ provide the classes nameSpace and changefile-update answers; |
7770 |
"/ in case we accept while in another context, to not capture these settings again |
|
11210 | 7771 |
"/ |
7772 |
(Class updateChangeFileQuerySignal, |
|
7773 |
Class updateChangeListQuerySignal, |
|
7774 |
Class updateHistoryLineQuerySignal) answer:true |
|
7775 |
do:[ |
|
13455 | 7776 |
Class nameSpaceQuerySignal answer:(aClass nameSpace) |
11210 | 7777 |
do:[ |
13394 | 7778 |
"/ the compiler nowadays already cares for the package... |
13455 | 7779 |
"/ no, actually, it does not in case we are in the middle of a fileIn, |
7780 |
"/ and packageQuery is already answered by someone else. |
|
7781 |
"/ Better make it unpackaged, in case the user makes changes to other |
|
7782 |
"/ classes here (actually, I often change compiler, debugger, inspector here) |
|
7783 |
Class packageQuerySignal |
|
7784 |
answer:nil |
|
7785 |
do:[ |
|
11210 | 7786 |
codeView contents:someCode. |
12555 | 7787 |
Class methodRedefinitionNotification |
7788 |
answer:#keep |
|
7789 |
do:[ |
|
7790 |
newMethod := aClass compilerClass |
|
7791 |
compile:someCode |
|
7792 |
forClass:aClass |
|
7793 |
inCategory:category |
|
7794 |
notifying:codeView. |
|
7795 |
]. |
|
13455 | 7796 |
]. |
11210 | 7797 |
]. |
7798 |
]. |
|
7799 |
||
12540 | 7800 |
methodCodeToggleSelectionHolder value:2. "/ showing current code |
7801 |
methodCodeToggle beVisible. |
|
7802 |
||
11210 | 7803 |
inspecting ifFalse:[ |
7804 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
7805 |
codeView modified:false. |
|
7806 |
||
7807 |
doUnwind ifTrue:[ |
|
13394 | 7808 |
"/ if it worked, and doUnwind is true, |
7809 |
"/ remove everything up to and including top |
|
7810 |
"/ from the context chain |
|
7811 |
||
11210 | 7812 |
selectedContext canReturn ifTrue:[ |
7813 |
self setContext:(top "sender"). |
|
7814 |
exitAction := #restart. |
|
7815 |
selectedContext setLineNumber:1. |
|
7816 |
self doRestart. |
|
7817 |
] ifFalse:[ |
|
7818 |
self setContext:(top sender). |
|
7819 |
exitAction := #return. |
|
7820 |
]. |
|
7821 |
]. |
|
7822 |
] ifFalse:[ |
|
7823 |
^ cancelAction value |
|
7824 |
] |
|
7825 |
]. |
|
3427 | 7826 |
]. |
7827 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
7828 |
"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
|
7829 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
3427 | 7830 |
! |
7831 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7832 |
codeAccept:someCode unwind:doUnwind category:givenCategoryOrNil onCancel:cancelAction |
13394 | 7833 |
"user wants some code to be recompiled" |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7834 |
|
12812 | 7835 |
|sel implementorClass receiverClass method category| |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7836 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7837 |
codeView withWaitCursorDo:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7838 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7839 |
"/ find the method-home context for this one |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7840 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7841 |
"/ con := selectedContext. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7842 |
"/ top := con. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7843 |
"/ [con notNil] whileTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7844 |
"/ (con methodHome == selectedContext) ifTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7845 |
"/ top := con |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7846 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7847 |
"/ con := con sender |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7848 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7849 |
|
10628 | 7850 |
" |
7851 |
use class&selector to find the method for the compilation |
|
7852 |
and compile. |
|
7853 |
" |
|
7854 |
category := givenCategoryOrNil. |
|
7855 |
sel := selectedContext selector. |
|
7856 |
implementorClass := selectedContext methodClass. |
|
11898 | 7857 |
implementorClass isNil ifTrue:[ |
7858 |
method := selectedContext method. |
|
11943
10e162265c0e
changed: #codeAccept:unwind:category:onCancel:
Claus Gittinger <cg@exept.de>
parents:
11912
diff
changeset
|
7859 |
(method notNil and:[method mclass isNil]) ifTrue:[ |
11898 | 7860 |
method := method wrapper. |
7861 |
]. |
|
7862 |
method notNil ifTrue:[ |
|
7863 |
implementorClass := method mclass |
|
7864 |
]. |
|
7865 |
] ifFalse:[ |
|
7866 |
method := selectedContext method. |
|
7867 |
]. |
|
10628 | 7868 |
implementorClass notNil ifTrue:[ |
7869 |
category isNil ifTrue:[ |
|
7870 |
method isNil ifTrue:[ |
|
7871 |
method := implementorClass compiledMethodAt:sel. |
|
7872 |
]. |
|
7873 |
category := method category |
|
7874 |
] |
|
7875 |
] ifFalse:[ |
|
12812 | 7876 |
receiverClass := selectedContext receiver class. |
7877 |
implementorClass := receiverClass whichClassImplements:sel. |
|
7878 |
implementorClass := implementorClass ? receiverClass. |
|
10628 | 7879 |
implementorClass ~~ Object ifTrue:[ |
7880 |
implementorClass := Dialog |
|
7881 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
|
7882 |
initialAnswer:implementorClass name |
|
7883 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
7884 |
implementorClass size == 0 ifTrue:[ |
|
7885 |
^ cancelAction value "/ cancelled |
|
7886 |
]. |
|
7887 |
implementorClass := Smalltalk classNamed:implementorClass. |
|
7888 |
implementorClass isNil ifTrue:[ |
|
7889 |
Dialog warn:'No such class'. |
|
7890 |
^ cancelAction value "/ cancelled |
|
7891 |
]. |
|
7892 |
]. |
|
7893 |
]. |
|
7894 |
||
7895 |
self |
|
7896 |
codeAccept:someCode |
|
7897 |
inClass:implementorClass |
|
7898 |
unwind:doUnwind |
|
7899 |
category:category |
|
7900 |
onCancel:cancelAction. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7901 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7902 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7903 |
"Created: / 17-11-2001 / 21:50:55 / cg" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7904 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7905 |
! |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7906 |
|
7912 | 7907 |
codeCompletion |
7908 |
|cls| |
|
7909 |
||
8212 | 7910 |
currentMethod isNil ifTrue:[ ^ self ]. |
8338 | 7911 |
|
7912 | 7912 |
cls := currentMethod mclass. |
8212 | 7913 |
cls isNil ifTrue:[ ^ self ]. |
7914 |
||
7912 | 7915 |
UserInformation handle:[:ex | |
11210 | 7916 |
ex proceed. |
7912 | 7917 |
] do:[ |
11210 | 7918 |
DoWhatIMeanSupport codeCompletionForClass:cls context:selectedContext codeView:codeView. |
7912 | 7919 |
]. |
7920 |
! |
|
7921 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7922 |
confirm:aString |
6971 | 7923 |
"open a modal yes-no dialog. |
7924 |
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
|
7925 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7926 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
11210 | 7927 |
^ true |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7928 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7929 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7930 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7931 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
7932 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
7933 |
"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
|
7934 |
Also sent to autoselect an interesting context on entry." |
0 | 7935 |
|
9235 | 7936 |
HaltInterrupt handle:[:ex | |
11210 | 7937 |
ignoreBreakpoints ifFalse:[ex reject]. |
7938 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [doShowSelection.]' bindWith:ex suspendedContext) infoPrintCR. |
|
7939 |
ex proceed |
|
3447 | 7940 |
] do:[ |
11210 | 7941 |
self updateForContext:lineNr |
3269 | 7942 |
]. |
7943 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
7944 |
|
3447 | 7945 |
"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
|
7946 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7947 |
|
10205 | 7948 |
hideStackInspector |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7949 |
stackInspector notNil ifTrue:[ |
11210 | 7950 |
stackInspector destroy. |
7951 |
stackInspector := nil. |
|
7952 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
|
7953 |
contextInspector origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7954 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7955 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7956 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7957 |
methodCodeToggleChanged |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7958 |
|sel| |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7959 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7960 |
sel := contextView selection. |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7961 |
sel notNil ifTrue:[ |
11210 | 7962 |
self showSelection:sel |
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7963 |
] |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7964 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7965 |
"Created: / 18-06-2010 / 12:29:21 / cg" |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7966 |
! |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7967 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7968 |
processEvent:anEvent |
6129 | 7969 |
"filter keyboard events for popUp variable value display. |
7970 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7971 |
|
12106 | 7972 |
<resource: #keyboard (#CodeCompletion )> |
7973 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7974 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7975 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7976 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7977 |
evView notNil ifTrue:[ |
11210 | 7978 |
focusView := evView windowGroup focusView. |
7979 |
focusView isNil ifTrue:[ |
|
7980 |
focusView := evView. |
|
7981 |
]. |
|
7982 |
||
7983 |
anEvent isKeyPressEvent ifTrue:[ |
|
7984 |
key := anEvent key. |
|
7985 |
rawKey := anEvent rawKey. |
|
7986 |
||
7987 |
inCodeView := (focusView == codeView |
|
7988 |
or:[focusView isComponentOf:codeView]). |
|
7989 |
inCodeView ifTrue:[ |
|
7990 |
key == #CodeCompletion ifTrue:[ |
|
7991 |
"/ complete the word before/under the cursor. |
|
7992 |
self sensor |
|
7993 |
pushUserEvent:#codeCompletion |
|
7994 |
for:self |
|
7995 |
withArguments:#(). |
|
7996 |
^ true |
|
7997 |
]. |
|
7998 |
]. |
|
7999 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8000 |
|
3602 | 8001 |
false ifTrue:[ |
11210 | 8002 |
anEvent isButtonReleaseEvent ifTrue:[ |
8003 |
anEvent view == codeView ifTrue:[ |
|
8004 |
(RBParser notNil and:[RBParser isLoaded]) |
|
8005 |
ifTrue:[ |
|
8006 |
self sensor |
|
8007 |
pushEvent:anEvent. "/ must be first in queue |
|
8008 |
||
8009 |
self sensor |
|
8010 |
pushUserEvent:#explainSelection |
|
8011 |
for:self |
|
8012 |
withArguments:nil. |
|
8013 |
^ true "/ eaten |
|
8014 |
] |
|
8015 |
] |
|
8016 |
]. |
|
3602 | 8017 |
]. |
8018 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8019 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8020 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8021 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8022 |
|
8212 | 8023 |
setCurrentMethod:aMethodOrNil |
8024 |
currentMethod := aMethodOrNil. |
|
8025 |
! |
|
8026 |
||
11610 | 8027 |
showSelection:lineNr |
1327 | 8028 |
"user clicked on a header line - show selected code in textView. |
8029 |
Also sent to autoselect an interesting context on entry." |
|
11610 | 8030 |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
8031 |
UserNotification |
11610 | 8032 |
handle:[:ex | |
8033 |
"/ ex suspendedContext fullPrintAll. |
|
8034 |
Transcript showCR:ex description. |
|
8035 |
"/ Transcript showCR:ex parameter. |
|
8036 |
ex proceed |
|
8037 |
] |
|
8038 |
do:[ |
|
8039 |
Error |
|
8040 |
handle:[:ex | |
|
8041 |
|s con| |
|
8042 |
||
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
8043 |
ex creator isControlInterrupt ifTrue:[ |
11610 | 8044 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' |
8045 |
infoPrintCR. |
|
8046 |
ex proceed |
|
8047 |
]. |
|
8048 |
('DebugView [info]: error at %1 when showing selection in debugger ignored' |
|
8049 |
bindWith:ex suspendedContext) infoPrintCR. |
|
8050 |
s := '' writeStream. |
|
8051 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
8052 |
s nextPutLine:'****'. |
|
8053 |
s nextPutLine:'**** ',(ex description). |
|
8054 |
s nextPutLine:'****'. |
|
8055 |
con := ex suspendedContext. |
|
8056 |
s nextPutLine:'**** ',(con printString). |
|
8057 |
con := con sender. |
|
8058 |
HaltInterrupt ignoreIn:[ con fullPrintAllOn:s. ]. |
|
8059 |
||
5842 | 8060 |
"/ [con notNil] whileTrue:[ |
8061 |
"/ Error catch:[:ex | |
|
8062 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
8063 |
"/ ]. |
|
4947 | 8064 |
"/ |
5842 | 8065 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
8066 |
"/ con := nil |
|
8067 |
"/ ] ifFalse:[ |
|
8068 |
"/ con := con sender. |
|
8069 |
"/ ] |
|
8070 |
"/ ]. |
|
11610 | 8071 |
|
8072 |
codeView contents:(s contents). |
|
8073 |
ex return. |
|
8074 |
] |
|
8075 |
do:[ self doShowSelection:lineNr ] |
|
8076 |
] |
|
8077 |
||
8078 |
"Modified: / 19-07-2012 / 10:56:58 / cg" |
|
1327 | 8079 |
! |
8080 |
||
10205 | 8081 |
showStackInspectorFor:con |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8082 |
stackInspector isNil ifTrue:[ |
11210 | 8083 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
8084 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
|
8085 |
stackInspector := InspectorView |
|
8086 |
origin:(0.6 @ 0.0) |
|
8087 |
corner:(1.0 @ 1.0) |
|
8088 |
in:contextInspector superView. |
|
8089 |
stackInspector realize. |
|
8090 |
stackInspector fieldListLabel:'Stack'. |
|
8091 |
stackInspector hideReceiver:true |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8092 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8093 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8094 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8095 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8096 |
|
12529 | 8097 |
updateContextInfoFor:aContext |
8098 |
"additional info as-per selected context; |
|
8099 |
for now: |
|
8100 |
update:with:from: - show who was responsible |
|
8101 |
" |
|
8102 |
||
12552 | 8103 |
|whatChanged changedObject receiver| |
12529 | 8104 |
|
8105 |
aContext selector == #'update:with:from:' ifTrue:[ |
|
8106 |
receiver := aContext receiver. |
|
12552 | 8107 |
whatChanged := aContext argAt:1. |
12529 | 8108 |
changedObject := aContext argAt:3. |
12552 | 8109 |
|
8110 |
changedObject isBehavior ifTrue:[ |
|
8111 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject name allBold). |
|
8112 |
^ self |
|
8113 |
]. |
|
8114 |
||
12529 | 8115 |
receiver class allInstanceVariableNames keysAndValuesDo:[:i :nm | |
8116 |
(receiver instVarAt:i) == changedObject ifTrue:[ |
|
12552 | 8117 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',nm allBold). |
12529 | 8118 |
^ self |
8119 |
] |
|
8120 |
]. |
|
8121 |
||
8122 |
(receiver isKindOf:ApplicationModel) ifTrue:[ |
|
8123 |
receiver builder notNil ifTrue:[ |
|
8124 |
(receiver builder bindings ? #()) keysAndValuesDo:[:eachAspect :eachValue | |
|
8125 |
eachValue == changedObject ifTrue:[ |
|
12552 | 8126 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by aspect ',eachAspect allBold). |
12529 | 8127 |
^ self |
8128 |
] |
|
8129 |
] |
|
8130 |
] |
|
8131 |
]. |
|
12552 | 8132 |
|
8133 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject classNameWithArticle allBold). |
|
8134 |
^self. |
|
12529 | 8135 |
]. |
8136 |
contextInfoLabel label:nil. |
|
8137 |
! |
|
8138 |
||
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8139 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8140 |
"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
|
8141 |
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
|
8142 |
|
56 | 8143 |
|con homeContext sel method code canAccept |
105 | 8144 |
implementorClass lineNrInMethod rec m line |
10205 | 8145 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 8146 |
codeSet highlighter evaluatorClass |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8147 |
canDefine callee searchClass originalMethod cannotAcceptDueToOutdatedClass| |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8148 |
|
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8149 |
canDefine := cannotAcceptDueToOutdatedClass := false. |
8212 | 8150 |
self setCurrentMethod:nil. |
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
8151 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8152 |
contextArray notNil ifTrue:[ |
10628 | 8153 |
lineNr <= contextArray size ifTrue:[ |
8154 |
con := contextArray at:lineNr. |
|
8155 |
callee := contextArray at:lineNr-1 ifAbsent:nil. |
|
8156 |
]. |
|
8157 |
" |
|
8158 |
clicking on the '** ...'-line shows more ... |
|
8159 |
" |
|
8160 |
con isNil ifTrue:[ |
|
8161 |
line := contextView list at:lineNr. |
|
8162 |
(line startsWith:'**') ifTrue:[ |
|
8163 |
self showMore. |
|
8164 |
lineNr >= contextArray size ifTrue:[ |
|
8165 |
contextView setSelection:lineNr. |
|
8166 |
con := contextArray at:lineNr ifAbsent:nil |
|
8167 |
] |
|
8168 |
]. |
|
8169 |
con isNil ifTrue:[ |
|
8170 |
codeView contents:nil. |
|
8171 |
^ self |
|
8172 |
]. |
|
8173 |
]. |
|
8174 |
||
8175 |
selectedContext := con. |
|
8176 |
m := contextView middleButtonMenu. |
|
8177 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
|
8178 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
|
8179 |
]. |
|
8180 |
||
8181 |
self withExecuteCursorDo:[ |
|
8182 |
codeSet := false. |
|
8183 |
||
8184 |
" |
|
8185 |
give it to the (lower right) inspector |
|
8186 |
" |
|
8187 |
Error handle:[:ex | |
|
11595 | 8188 |
'DebugView [warning]: error while accessing context: ' errorPrint. |
8189 |
ex description errorPrintCR. |
|
10628 | 8190 |
contextInspector inspect:nil. |
12809 | 8191 |
contextInspector fieldListLabel:('Context'). |
11595 | 8192 |
ex suspendedContext fullPrintAllOn: Transcript. |
9479 | 8193 |
"/ ex reject. |
10628 | 8194 |
] do:[ |
8195 |
contextInspector inspect:con. |
|
12809 | 8196 |
"/ contextInspector fieldListLabel:('Context: ',con method whoString). |
10628 | 8197 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
8198 |
]. |
|
8199 |
||
8200 |
"/ show a stack inspector sometimes |
|
8201 |
||
8202 |
con hasStackToShow ifTrue:[ |
|
8203 |
self showStackInspectorFor:con |
|
8204 |
] ifFalse:[ |
|
8205 |
self hideStackInspector |
|
8206 |
]. |
|
8207 |
||
8208 |
homeContext := con methodHome. |
|
8209 |
con canReturn ifTrue:[ |
|
8210 |
returnButton enable. restartButton enable. |
|
8211 |
] ifFalse:[ |
|
8212 |
returnButton disable. restartButton disable. |
|
8213 |
]. |
|
8214 |
||
8215 |
lineNrInMethod := con lineNumber. |
|
8216 |
||
8217 |
canAccept := false. |
|
8218 |
||
8219 |
homeContext isNil ifTrue:[ |
|
8220 |
" |
|
8221 |
mhmh - an optimized block |
|
8222 |
should get the block here, and get the method from |
|
8223 |
that one ... |
|
8224 |
But in the current version, there is no easy way to get to the block |
|
8225 |
since that one is not in the context. |
|
8226 |
A future new block calling scheme will fix this |
|
8227 |
(passing the block instead of the home as block argument). |
|
8228 |
" |
|
11610 | 8229 |
(method := con method) isNil ifTrue:[ |
8230 |
"temporary kludge - peek into the sender context. |
|
8231 |
If its a do-like method and there is a single block variable |
|
8232 |
in the args or temporaries, that must be the one. |
|
8233 |
This helps in some cases. |
|
8234 |
" |
|
8235 |
(sender := con sender) notNil ifTrue:[ |
|
8236 |
tryVars := false. |
|
8237 |
(selSender := sender selector) notNil ifTrue:[ |
|
8238 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
|
8239 |
tryVars := true. |
|
8240 |
] |
|
8241 |
]. |
|
8242 |
tryVars ifTrue:[ |
|
8243 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
|
8244 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
|
8245 |
possibleBlocks size == 1 ifTrue:[ |
|
8246 |
method := possibleBlocks first method. |
|
8247 |
]. |
|
10628 | 8248 |
] |
8249 |
]. |
|
11610 | 8250 |
] |
10628 | 8251 |
] ifFalse:[ |
8252 |
"fetch rec here - so we won't need context in doItAction" |
|
8253 |
rec := homeContext receiver. |
|
8254 |
sel := homeContext selector. |
|
8255 |
sel notNil ifTrue:[ |
|
8256 |
canAccept := true. |
|
8257 |
||
8258 |
implementorClass := homeContext methodClass. |
|
8259 |
implementorClass isNil ifTrue:[ |
|
11898 | 8260 |
homeContext method notNil ifTrue:[ |
8261 |
WrappedMethod allInstancesDo:[:wrapped | |
|
8262 |
wrapped originalMethod == homeContext method ifTrue:[ |
|
8263 |
implementorClass := wrapped mclass |
|
8264 |
] |
|
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8265 |
]. |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8266 |
implementorClass isNil ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8267 |
(homeContext searchClass notNil |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8268 |
and:[homeContext searchClass isObsolete]) ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8269 |
cannotAcceptDueToOutdatedClass := true. |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8270 |
] |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8271 |
]. |
11898 | 8272 |
]. |
8273 |
]. |
|
8274 |
implementorClass isNil ifTrue:[ |
|
10628 | 8275 |
Error handle:[:ex | |
11890 | 8276 |
"/ not covered by Error, anyway |
8277 |
"/ ex signal == BreakPointInterrupt ifTrue:[ |
|
8278 |
"/ ex proceed. |
|
8279 |
"/ ]. |
|
10628 | 8280 |
code := 'error while asking method for its source'. |
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
8281 |
code := code , Character cr , ex creator printString. |
10628 | 8282 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
8283 |
||
8284 |
canAccept := false. |
|
8285 |
ex return. |
|
8286 |
] do:[ |
|
8287 |
" |
|
8288 |
special: look if this context was created by |
|
8289 |
valueWithReceiver kind of method invocation; |
|
8290 |
if so, grab the method from the sender and show it |
|
8291 |
" |
|
8292 |
((sender := homeContext sender) notNil |
|
8293 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
|
8294 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
8295 |
method := sender receiver. |
|
8296 |
canAccept := false. |
|
8297 |
] ifFalse:[ |
|
8298 |
(method := con method) notNil ifTrue:[ |
|
8299 |
canAccept := false. |
|
8300 |
] |
|
8301 |
]. |
|
8302 |
] |
|
8303 |
] ifFalse:[ |
|
8304 |
method := implementorClass compiledMethodAt:sel. |
|
8305 |
]. |
|
8306 |
] |
|
8307 |
]. |
|
8308 |
||
8309 |
homeContext notNil ifTrue:[ |
|
8310 |
searchClass := homeContext searchClass ? rec class. |
|
8311 |
currentMethod := searchClass lookupMethodFor:sel. |
|
8312 |
]. |
|
8313 |
originalMethod := currentMethod. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
8314 |
(currentMethod notNil |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
8315 |
and:[currentMethod ~~ method |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
8316 |
and:[ (currentMethod isWrapped and:[ method == currentMethod originalMethod]) not ]]) ifTrue:[ |
10628 | 8317 |
originalMethod := method. |
8318 |
methodCodeToggleSelectionHolder value = 1 ifTrue:[ |
|
13416 | 8319 |
method := originalMethod. "/ the one which is suspended / was executing |
10628 | 8320 |
] ifFalse:[ |
13416 | 8321 |
method := currentMethod. "/ the one which has already been accepted/modified. |
10628 | 8322 |
lineNrInMethod := nil. |
8323 |
canAccept := true. |
|
8324 |
]. |
|
8325 |
methodCodeToggle beVisible. |
|
8326 |
] ifFalse:[ |
|
8327 |
methodCodeToggle beInvisible. |
|
8328 |
]. |
|
8329 |
||
8330 |
code isNil ifTrue:[ |
|
8331 |
errMsg := nil. |
|
8332 |
method isNil ifTrue:[ |
|
13394 | 8333 |
"/ fall back heuristics (see how this was called, fetch block from caller) |
8334 |
sender := con sender. |
|
10628 | 8335 |
con isBlockContext ifTrue:[ |
13394 | 8336 |
(sender notNil |
10628 | 8337 |
and:[((sender selector ? '') startsWith:'value') |
8338 |
and:[sender receiver isBlock]]) ifTrue:[ |
|
8339 |
code := sender receiver source. |
|
8340 |
] |
|
8341 |
] ifFalse:[ |
|
13394 | 8342 |
(sender notNil |
10628 | 8343 |
and:[((sender selector ? '') startsWith:'valueWith') |
8344 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
8345 |
method := sender receiver. |
|
8346 |
] |
|
8347 |
] |
|
8348 |
]. |
|
8349 |
method notNil ifTrue:[ |
|
13350 | 8350 |
contextInspector fieldListLabel:(method selector "whoString"). |
10628 | 8351 |
Error handle:[:ex | |
11890 | 8352 |
"/ not covered by Error, anyway |
8353 |
"/ ex signal isControlInterrupt ifTrue:[ |
|
8354 |
"/ ex proceed. |
|
8355 |
"/ ]. |
|
10628 | 8356 |
code := 'error while asking method for its source'. |
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
8357 |
code := code , Character cr , ex creator printString. |
10628 | 8358 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
8359 |
||
8360 |
canAccept := false. |
|
8361 |
ex return. |
|
8362 |
] do:[ |
|
8363 |
self sensor shiftDown ifTrue:[ |
|
8364 |
code := method decompiledSource |
|
8365 |
] ifFalse:[ |
|
8366 |
code := method source. |
|
8367 |
]. |
|
8368 |
]. |
|
8369 |
code isNil ifTrue:[ |
|
8370 |
method sourceFilename notNil ifTrue:[ |
|
8371 |
codeView contents:(resources |
|
8372 |
string:'** no sourcefile: %1 **' |
|
8373 |
with:method sourceFilename). |
|
8374 |
codeView flash. |
|
8375 |
codeSet := true. |
|
8376 |
] ifFalse:[ |
|
8377 |
[ |
|
8378 |
|src| |
|
8379 |
||
8380 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
|
8381 |
codeView contents:src. |
|
8382 |
codeSet := true. |
|
8383 |
] on: Error do:[ |
|
8384 |
errMsg := '** no source **' |
|
8385 |
]. |
|
8386 |
] |
|
8387 |
]. |
|
8388 |
] ifFalse:[ |
|
12862 | 8389 |
contextInspector fieldListLabel:'Context'. |
10628 | 8390 |
homeContext isNil ifTrue:[ |
8391 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
|
8392 |
] ifFalse:[ |
|
8393 |
errMsg := '** no method - no source **'. |
|
8394 |
canDefine := true. |
|
8395 |
] |
|
8396 |
]. |
|
8397 |
errMsg notNil ifTrue:[ |
|
8398 |
self showError:errMsg. |
|
8399 |
codeSet := true. |
|
8400 |
] |
|
8401 |
]. |
|
8402 |
||
8403 |
code isNil ifTrue:[ |
|
8404 |
"/ canAccept := false. |
|
8405 |
codeSet ifFalse:[ |
|
8406 |
codeView contents:nil. |
|
8407 |
] |
|
8408 |
] ifFalse:[ |
|
8409 |
lineNrInMethod notNil ifTrue:[ |
|
8410 |
lineNrInMethod == 0 ifTrue:[ |
|
8411 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
8412 |
lineNrInMethod := method lineNumber |
|
8413 |
]. |
|
8414 |
"/ guess lineNumber from sent-messages selector |
|
8415 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
|
8416 |
lineNrInMethod == 0 ifTrue:[ |
|
8417 |
|conIdx sentContext messages| |
|
8418 |
||
8419 |
conIdx := contextArray identityIndexOf:con. |
|
8420 |
conIdx > 1 ifTrue:[ |
|
8421 |
sentContext := contextArray at:conIdx-1. |
|
8422 |
sentContext isBlockContext ifFalse:[ |
|
8423 |
(method notNil and:[code notNil]) ifTrue:[ |
|
8424 |
messages := method messagesSent. |
|
8425 |
messages size == 1 ifTrue:[ |
|
8426 |
sentContext selector == messages first ifTrue:[ |
|
8427 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
|
8428 |
] |
|
8429 |
] |
|
8430 |
]. |
|
8431 |
]. |
|
8432 |
]. |
|
8433 |
]. |
|
8434 |
]. |
|
8435 |
]. |
|
8436 |
codeView isCodeView2 ifTrue:[ |
|
10649
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
8437 |
codeView model setValue: code. |
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
8438 |
codeView model changed. |
10628 | 8439 |
codeView methodHolder value: method. |
10752 | 8440 |
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class]) |
10628 | 8441 |
] ifFalse:[ |
8442 |
||
8443 |
UserPreferences current syntaxColoring ifTrue:[ |
|
8444 |
implementorClass isNil ifTrue:[ |
|
8445 |
(con isBlockContext |
|
8446 |
and:[con home isNil |
|
8447 |
and:[con guessedHome notNil]]) |
|
8448 |
ifTrue:[ |
|
8449 |
implementorClass := con guessedHome mclass |
|
8450 |
] |
|
8451 |
]. |
|
8452 |
implementorClass notNil ifTrue:[ |
|
8453 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
|
8454 |
code size < 100000 ifTrue:[ |
|
8455 |
Error handle:[:ex | |
|
8456 |
] do:[ |
|
12929 | 8457 |
code := highlighter formatMethodSource:code in:implementorClass. |
10628 | 8458 |
] |
8459 |
] |
|
8460 |
] |
|
8461 |
] |
|
8462 |
]. |
|
1555 | 8463 |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
8464 |
"/ code ~= (codeView contents) ifTrue:[ |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8465 |
cannotAcceptDueToOutdatedClass ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8466 |
codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString). |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8467 |
] ifFalse:[ |
10628 | 8468 |
codeView setContents:code. |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8469 |
]. |
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
8470 |
"/ ]. |
10628 | 8471 |
]. |
8472 |
(lineNrInMethod notNil |
|
8473 |
and:[lineNrInMethod ~~ 0 |
|
8474 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
|
7000 | 8475 |
lineNrInMethod == 255 ifFalse:[ |
10628 | 8476 |
(lineNrInMethod == 255 |
8477 |
and:[method notNil |
|
8478 |
and:[method hasCode not]]) ifTrue:[ |
|
8479 |
"/ means: do not really know in interpreted methods |
|
8480 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
|
8481 |
] ifFalse:[ |
|
8482 |
codeView selectLine:lineNrInMethod. |
|
8483 |
]. |
|
8484 |
codeView makeSelectionVisible |
|
7000 | 8485 |
]. |
10628 | 8486 |
] ifFalse:[ |
8487 |
codeView unselect. |
|
8488 |
codeView scrollToTop |
|
8489 |
] |
|
8490 |
]. |
|
8491 |
||
8492 |
codeView acceptEnabled:canAccept. |
|
8493 |
canAccept ifTrue:[ |
|
8494 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
8495 |
] ifFalse:[ |
|
8496 |
codeView acceptAction:[:code | self beep] |
|
8497 |
]. |
|
8498 |
||
8499 |
receiverInspector inspect:rec. |
|
13350 | 8500 |
receiverInspector fieldListLabel:("'Receiver: ',"rec classNameWithArticle). |
10628 | 8501 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
8502 |
||
8503 |
" |
|
8504 |
the one below is wrong: currently, the |
|
8505 |
evaluator cannot handle passed contexts. |
|
8506 |
Once it does, pass con as in:-arg |
|
8507 |
" |
|
8508 |
(rec isJavaObject |
|
8509 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
8510 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
8511 |
evaluatorClass := Parser |
|
8512 |
] ifFalse:[ |
|
8513 |
(method notNil and:[method mclass notNil]) ifTrue:[ |
|
8514 |
evaluatorClass := method mclass evaluatorClass. |
|
8515 |
] ifFalse:[ |
|
8516 |
evaluatorClass := rec class evaluatorClass. |
|
8517 |
]. |
|
8518 |
]. |
|
8519 |
||
12915 | 8520 |
codeView |
8521 |
doItAction: |
|
8522 |
[:theCode | |
|
8523 |
evaluatorClass |
|
8524 |
evaluate:theCode |
|
13394 | 8525 |
in:actualContext "/ (selectedContext ? actualContext) |
12915 | 8526 |
receiver:rec |
8527 |
notifying:codeView |
|
8528 |
logged:true |
|
8529 |
ifFail:nil |
|
8530 |
]; |
|
8531 |
editedMethodOrClass:(method ? rec class). |
|
8532 |
||
10628 | 8533 |
self setCurrentMethod:method. |
8534 |
||
11610 | 8535 |
selectedContext := homeContext ? con. |
10628 | 8536 |
actualContext := con |
8537 |
]. |
|
4122 | 8538 |
] ifFalse:[ |
10628 | 8539 |
codeView contents:nil. |
4122 | 8540 |
]. |
8541 |
codeView modified:false. |
|
8542 |
||
8543 |
con isContext ifFalse:[ |
|
10628 | 8544 |
sendButton disable. |
4122 | 8545 |
] ifTrue:[ |
10628 | 8546 |
sendButton enable. |
10205 | 8547 |
]. |
12529 | 8548 |
self updateContextInfoFor:con. |
10205 | 8549 |
|
8550 |
"clear out locals to prevent keeping around unneeded contexts |
|
4122 | 8551 |
(due to the block held in codeView). |
8552 |
(not really needed, since stuff gets collected away sooner or later ... |
|
8553 |
... but this makes it a bit sooner) |
|
8554 |
" |
|
8555 |
con := nil. |
|
8556 |
homeContext := nil. |
|
8557 |
||
10205 | 8558 |
(callee notNil |
8559 |
and:[callee method notNil |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8560 |
and:[callee method selector == #subclassResponsibility]] |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8561 |
) ifTrue:[ |
10628 | 8562 |
canDefine := true. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8563 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8564 |
|
4122 | 8565 |
canDefine ifTrue:[ |
10628 | 8566 |
defineButton beVisible. |
4122 | 8567 |
] ifFalse:[ |
10628 | 8568 |
defineButton beInvisible. |
4122 | 8569 |
]. |
8570 |
||
12529 | 8571 |
"/ enable/disable some menu items |
4122 | 8572 |
self updateMenuItems |
8573 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
8574 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
10752 | 8575 |
"Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13394 | 8576 |
"Modified: / 28-08-2013 / 15:13:02 / cg" |
4122 | 8577 |
! ! |
8578 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8579 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'! |
8170 | 8580 |
|
8581 |
ignoreCount:something |
|
8582 |
ignoreCount := something. |
|
8583 |
! |
|
8584 |
||
8585 |
ignoreEndTime:something |
|
8586 |
ignoreEndTime := something. |
|
8587 |
! |
|
8588 |
||
12937 | 8589 |
ignoreForProcess:aProcess |
8590 |
ignoredProcesses isNil ifTrue:[ |
|
8591 |
ignoredProcesses := WeakIdentitySet new. |
|
8592 |
]. |
|
8593 |
ignoredProcesses add:aProcess |
|
8594 |
! |
|
8595 |
||
8596 |
ignoreForReceiverClass:aClass |
|
8597 |
ignoredReceiverClasses isNil ifTrue:[ |
|
8598 |
ignoredReceiverClasses := WeakIdentitySet new. |
|
8599 |
]. |
|
8600 |
ignoredReceiverClasses add:aClass |
|
8601 |
! |
|
8602 |
||
11210 | 8603 |
ignoreUntilShiftKeyPressed:aBoolean |
8604 |
ignoreUntilShiftKeyPressed := aBoolean. |
|
8605 |
||
8606 |
"Created: / 27-01-2012 / 11:35:23 / cg" |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8607 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8608 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8609 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8610 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8611 |
decrementIgnoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8612 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8613 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8614 |
ignoreCount := ignoreCount - 1 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8615 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8616 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8617 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8618 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8619 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8620 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8621 |
printConditionOn:aStream |
12937 | 8622 |
ignoredProcesses notEmptyOrNil ifTrue:[ |
12941 | 8623 |
aStream nextPutAll:(' in %1 processes (%2)' |
8624 |
bindWith:ignoredProcesses size |
|
8625 |
with:((ignoredProcesses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')). |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8626 |
] ifFalse:[ |
12937 | 8627 |
ignoredReceiverClasses notNil ifTrue:[ |
12941 | 8628 |
aStream nextPutAll:(' for %1 classes (%2)' |
8629 |
bindWith:ignoredReceiverClasses size |
|
8630 |
with:((ignoredReceiverClasses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')) |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8631 |
] ifFalse:[ |
12937 | 8632 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
8633 |
aStream nextPutAll:' until shiftKey pressed'. |
|
8634 |
] ifFalse:[ |
|
8635 |
ignoreEndTime notNil ifTrue:[ |
|
8636 |
aStream nextPutAll:' until '. |
|
8637 |
ignoreEndTime printOn:aStream. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8638 |
] ifFalse:[ |
12937 | 8639 |
(ignoreCount notNil) ifTrue:[ |
8640 |
(ignoreCount > 0) ifTrue:[ |
|
8641 |
aStream nextPutAll:' for '. |
|
8642 |
ignoreCount printOn:aStream. |
|
8643 |
] ifFalse:[ |
|
8644 |
(ignoreCount < 0) ifTrue:[ |
|
8645 |
aStream nextPutAll:' forEver'. |
|
8646 |
] ifFalse:[ |
|
8647 |
aStream nextPutAll:' no longer'. |
|
8648 |
]. |
|
8649 |
]. |
|
8650 |
] |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8651 |
]. |
12937 | 8652 |
]. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8653 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8654 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8655 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8656 |
"Modified: / 27-01-2012 / 11:43:10 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8657 |
"Created: / 06-03-2012 / 12:41:10 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8658 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8659 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8660 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8661 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8662 |
haltIgnoredInfoString |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8663 |
"some string describing why and how this halt is ignored; |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8664 |
nil if not ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8665 |
|
12941 | 8666 |
^ String streamContents:[:s | |
8667 |
s nextPutAll:'ignored '. |
|
8668 |
self printConditionOn:s |
|
8669 |
]. |
|
8670 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8671 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8672 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8673 |
^ '%1 more calls ignored' bindWith:ignoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8674 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8675 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8676 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8677 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8678 |
(ignoreEndTime > Timestamp now) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8679 |
^ 'ignored until %1' bindWith:ignoreEndTime |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8680 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8681 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8682 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8683 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8684 |
Display shiftDown ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8685 |
^ 'ignored until shiftKey is pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8686 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8687 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8688 |
]. |
12941 | 8689 |
ignoredProcesses notNil ifTrue:[ |
8690 |
^ 'ignored in some processes' |
|
8691 |
]. |
|
8692 |
ignoredReceiverClasses notNil ifTrue:[ |
|
8693 |
^ 'ignored for some receiver classes' |
|
8694 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8695 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8696 |
^ 'ignored until reenabled' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8697 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8698 |
"Modified: / 27-01-2012 / 11:35:48 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8699 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8700 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8701 |
isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8702 |
"true if this ignore-entry is still active" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8703 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8704 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8705 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8706 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8707 |
ignoreCount notNil ifTrue:[ |
12562 | 8708 |
^ ignoreCount == -1 or:[ ignoreCount > 0 ] |
8709 |
]. |
|
12941 | 8710 |
ignoredProcesses notNil ifTrue:[ |
8711 |
ignoredProcesses := ignoredProcesses reject:[:p | p notNil and:[p isDead]]. |
|
8712 |
ignoredProcesses isEmpty ifTrue:[ |
|
8713 |
ignoredProcesses := nil. |
|
8714 |
^ false |
|
8715 |
]. |
|
8716 |
]. |
|
12562 | 8717 |
^ true |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8718 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8719 |
"Created: / 06-03-2012 / 12:39:46 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8720 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8721 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8722 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8723 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8724 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8725 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8726 |
"Created: / 06-03-2012 / 12:47:02 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8727 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8728 |
|
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8729 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8730 |
^ false |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8731 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8732 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8733 |
"Created: / 06-03-2012 / 14:36:28 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8734 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8735 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8736 |
isHaltIgnored |
12941 | 8737 |
"true if this halt should be ignored (sometimes)" |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8738 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8739 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8740 |
^ Display shiftDown not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8741 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8742 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8743 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8744 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8745 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8746 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8747 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8748 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8749 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8750 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8751 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8752 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8753 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8754 |
!DebugView::IgnoredHalt methodsFor:'accessing'! |
11210 | 8755 |
|
8170 | 8756 |
method |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8757 |
|m| |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8758 |
|
9922 | 8759 |
weakMethodHolder == #all ifTrue:[^ weakMethodHolder ]. |
8760 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8761 |
m := weakMethodHolder at:1. |
9796 | 8762 |
"/ wait until really gone (it could still be on the call stack |
8763 |
"/ |
|
8764 |
"/ m notNil ifTrue:[ |
|
8765 |
"/ m mclass isNil ifTrue:[ |
|
8766 |
"/ "/ no longer valid |
|
8767 |
"/ weakMethodHolder at:1 put:nil. |
|
8768 |
"/ ^ nil |
|
8769 |
"/ ]. |
|
8770 |
"/ ]. |
|
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8771 |
^ m |
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8772 |
|
9922 | 8773 |
"Modified: / 08-05-2011 / 10:28:10 / cg" |
8170 | 8774 |
! |
8775 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8776 |
method:methodArg lineNumber:lineNumberArg |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8777 |
"/ self assert:(methodArg mclass notNil). |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8778 |
|
9922 | 8779 |
methodArg == #all ifTrue:[ |
11210 | 8780 |
weakMethodHolder := methodArg |
9922 | 8781 |
] ifFalse:[ |
11210 | 8782 |
weakMethodHolder := WeakArray with:methodArg. |
9922 | 8783 |
]. |
8170 | 8784 |
lineNumber := lineNumberArg. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8785 |
|
9922 | 8786 |
"Modified: / 08-05-2011 / 10:28:41 / cg" |
8170 | 8787 |
! ! |
8788 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8789 |
!DebugView::IgnoredHalt methodsFor:'printing'! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8790 |
|
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8791 |
printOn:aStream |
9922 | 8792 |
|method| |
8793 |
||
8794 |
(method := self method) isNil ifTrue:[ |
|
11210 | 8795 |
aStream nextPutAll:'an obsolete IgnoredHalt'. |
8796 |
^ self |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8797 |
]. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8798 |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8799 |
aStream nextPutAll:'Ignore '. |
11704 | 8800 |
method isSymbol ifTrue:[ |
8801 |
method printOn:aStream. |
|
8802 |
] ifFalse:[ |
|
8803 |
method whoString printOn:aStream. |
|
8804 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8805 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8806 |
|
11704 | 8807 |
"Modified: / 27-07-2012 / 23:04:42 / cg" |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8808 |
! ! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8809 |
|
8170 | 8810 |
!DebugView::IgnoredHalt methodsFor:'queries'! |
8811 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8812 |
isActive |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8813 |
"true if this ignore-entry is still active" |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8814 |
|
12941 | 8815 |
self method isNil ifTrue:[self breakPoint:#cg. ^ false ]. "/ method no longer valid |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8816 |
^ super isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8817 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8818 |
"Modified: / 06-03-2012 / 12:40:20 / cg" |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8819 |
! |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8820 |
|
8170 | 8821 |
isForMethod:aMethod line:line |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8822 |
"/ check in this order - method has a flushing side-effect, which is useful here... |
9922 | 8823 |
weakMethodHolder == #all ifTrue:[^ true]. |
8824 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8825 |
^ (aMethod = self method) and:[ line = lineNumber ]. |
9922 | 8826 |
|
8827 |
"Modified: / 08-05-2011 / 10:27:31 / cg" |
|
8170 | 8828 |
! |
8829 |
||
8830 |
isHaltIgnoredInMethod:aMethod line:line |
|
12937 | 8831 |
^ self isHaltIgnoredInMethod:aMethod line:line context:nil |
8832 |
! |
|
8833 |
||
8834 |
isHaltIgnoredInMethod:aMethod line:line context:context |
|
9095 | 8835 |
"/ Transcript show:'?same as ign '; show:(weakMethodHolder at:1); show:' at '; showCR:lineNumber. |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8836 |
|
13059 | 8837 |
"/ Transcript showCR:'-----------------------------'. |
8838 |
"/ Transcript showCR:aMethod. |
|
8839 |
"/ Transcript showCR:line. |
|
8840 |
"/ Transcript showCR:context. |
|
8841 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8842 |
(self isForMethod:aMethod line:line) ifFalse:[^ false]. |
9095 | 8843 |
"/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored. |
8170 | 8844 |
|
12937 | 8845 |
context notNil ifTrue:[ |
8846 |
ignoredReceiverClasses notNil ifTrue:[ |
|
8847 |
^ ignoredReceiverClasses includes:(context receiver class) |
|
8848 |
]. |
|
12941 | 8849 |
]. |
13059 | 8850 |
|
8851 |
"/ Transcript showCR:ignoredProcesses. |
|
8852 |
"/ Transcript showCR:Processor activeProcess. |
|
12941 | 8853 |
ignoredProcesses notNil ifTrue:[ |
8854 |
^ ignoredProcesses includes:(Processor activeProcess) |
|
12937 | 8855 |
]. |
8856 |
||
8170 | 8857 |
^ self isHaltIgnored |
8858 |
! ! |
|
8859 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8860 |
!DebugView::IgnoredBreakpoint methodsFor:'accessing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8861 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8862 |
parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8863 |
^ parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8864 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8865 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8866 |
parameter:something |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8867 |
parameter := something. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8868 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8869 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8870 |
!DebugView::IgnoredBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8871 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8872 |
printOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8873 |
aStream nextPutAll:'Ignore breakpoint:#', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8874 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8875 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8876 |
"Created: / 06-03-2012 / 12:42:10 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8877 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8878 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8879 |
!DebugView::IgnoredBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8880 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8881 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8882 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8883 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8884 |
"Created: / 06-03-2012 / 12:54:35 / cg" |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8885 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8886 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8887 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8888 |
^ paramArg = parameter |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8889 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8890 |
"Created: / 06-03-2012 / 14:36:21 / cg" |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8891 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8892 |
|
4122 | 8893 |
!DebugView class methodsFor:'documentation'! |
8894 |
||
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8895 |
version |
13464 | 8896 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.630 2013-09-02 17:56:33 cg Exp $' |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8897 |
! |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8898 |
|
8952
7742c63ff6f5
catch halts in: #showSelection:
Claus Gittinger <cg@exept.de>
parents:
8745
diff
changeset
|
8899 |
version_CVS |
13464 | 8900 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.630 2013-09-02 17:56:33 cg Exp $' |
10628 | 8901 |
! |
8902 |
||
8903 |
version_SVN |
|
13464 | 8904 |
^ '$Id: DebugView.st,v 1.630 2013-09-02 17:56:33 cg Exp $' |
4122 | 8905 |
! ! |
8906 |
||
12106 | 8907 |
|
4122 | 8908 |
DebugView initialize! |