author | Claus Gittinger <cg@exept.de> |
Wed, 25 Jul 2012 19:20:06 +0200 | |
changeset 11661 | 2bda6075f0fa |
parent 11647 | 2fc55dce6e0d |
child 11693 | 367eaa0e1ead |
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 |
11661 | 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 |
|
32 |
hideSupportCode' |
|
33 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
|
34 |
DebuggingDebugger DebuggingDebugger2 |
|
35 |
DefaultDebuggerBackgroundColor InitialNChainShown IgnoredHalts |
|
36 |
ShowThreadID LastIgnoreHaltNTimes LastIgnoreHaltDuration |
|
37 |
LastExtent LastOrigin RememberedCallChain DebuggingDebugger3' |
|
38 |
poolDictionaries:'' |
|
39 |
category:'Interface-Debugger' |
|
0 | 40 |
! |
41 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
42 |
Object subclass:#IgnoredHaltOrBreakpoint |
11661 | 43 |
instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed' |
44 |
classVariableNames:'' |
|
45 |
poolDictionaries:'' |
|
46 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
47 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
48 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
49 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredHalt |
11661 | 50 |
instanceVariableNames:'weakMethodHolder lineNumber' |
51 |
classVariableNames:'' |
|
52 |
poolDictionaries:'' |
|
53 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
54 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
55 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
56 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredBreakpoint |
11661 | 57 |
instanceVariableNames:'parameter' |
58 |
classVariableNames:'' |
|
59 |
poolDictionaries:'' |
|
60 |
privateIn:DebugView |
|
8170 | 61 |
! |
62 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
63 |
!DebugView class methodsFor:'documentation'! |
29 | 64 |
|
65 |
copyright |
|
66 |
" |
|
67 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
11210 | 68 |
All Rights Reserved |
29 | 69 |
|
70 |
This software is furnished under a license and may be used |
|
71 |
only in accordance with the terms of that license and with the |
|
72 |
inclusion of the above copyright notice. This software may not |
|
73 |
be provided or otherwise made available to, or used by, any |
|
74 |
other person. No title to or ownership of the software is |
|
75 |
hereby transferred. |
|
76 |
" |
|
77 |
! |
|
0 | 78 |
|
29 | 79 |
documentation |
80 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
81 |
This class implements a graphical debugger interface. |
29 | 82 |
The debugger usually sits on top of the faulting process, |
10205 | 83 |
taking over its event processing. |
2358 | 84 |
(this is different from other Smalltalk debuggers, which control |
85 |
the debuggee as a separate process. Consider this an historic |
|
86 |
leftover - the debugger was one of the first applications written for |
|
87 |
ST/X; however, why should we change it without a particular need ...). |
|
88 |
||
89 |
Only the 'stopped' debugged process is affected; |
|
29 | 90 |
other processes continue to respond to events. |
91 |
||
92 |
The one exception is when an error occurs within the dispatcher process |
|
93 |
or in one of the eventhandler processes - in this case, the debugger |
|
94 |
will sit on an exclusive display connection. |
|
95 |
||
96 |
The whole debugging will be changed, once the required process primitives |
|
97 |
are available, which allow control of another processes execution |
|
98 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
99 |
to have the debugger control the debuggee (i.e. two processes) |
|
35 | 100 |
|
101 |
See additional information in 'doc/misc/debugger.doc'. |
|
53 | 102 |
|
10205 | 103 |
Notice: |
11210 | 104 |
the DebugView class caches the last used debugger in a class |
105 |
variable. It may happen, that a malfunctioning debugger (for example, |
|
106 |
a halfway destroyed one) is kept there. You will notice this, if a |
|
107 |
debugger comes up without showing any contents. In this case, close |
|
108 |
(or destroy) the broken debugView, and execute |
|
109 |
Debugger newDebugger |
|
110 |
which removes the cached debugger and forces creation of a new one the |
|
111 |
next time. This is a temporary workaround - the debugger will be fixed to |
|
112 |
avoid this problem. |
|
113 |
You also have to remove the cached debugger, if you change the debugger's |
|
114 |
initialization code (buttons, menu, etc.) and you want the new code to become |
|
115 |
effective. |
|
508 | 116 |
|
117 |
[author:] |
|
11210 | 118 |
Claus Gittinger |
508 | 119 |
|
120 |
[see also:] |
|
11210 | 121 |
Exception Signal |
122 |
Process |
|
29 | 123 |
" |
124 |
! ! |
|
0 | 125 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
126 |
!DebugView class methodsFor:'initialization'! |
243 | 127 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
128 |
initialize |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
129 |
InitialNChainShown := 50. |
8148 | 130 |
"/ DefaultDebuggerBackgroundColor := nil. |
3387 | 131 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
132 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
133 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
134 |
"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
|
135 |
"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
|
136 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
137 |
|
243 | 138 |
reinitialize |
7822 | 139 |
"reinitialize after an image-restart" |
140 |
||
243 | 141 |
self newDebugger |
142 |
! ! |
|
143 |
||
10203 | 144 |
!DebugView class methodsFor:'cleanup'! |
145 |
||
10205 | 146 |
lowSpaceCleanup |
10203 | 147 |
"in low memory situations, give up cached debuggers" |
148 |
||
149 |
CachedDebugger := nil. |
|
150 |
CachedExclusive := nil. |
|
151 |
OpenDebuggers := nil. |
|
11391 | 152 |
RememberedCallChain := nil. |
10203 | 153 |
|
154 |
" |
|
155 |
DebugView lowSpaceCleanup |
|
156 |
" |
|
157 |
||
11391 | 158 |
"Modified: / 08-03-2012 / 01:30:21 / cg" |
10203 | 159 |
! |
160 |
||
161 |
newDebugger |
|
162 |
"force creation of a new debugger (give up cached debuggers)" |
|
163 |
||
164 |
CachedDebugger := nil. |
|
165 |
CachedExclusive := nil. |
|
166 |
OpenDebuggers := nil. |
|
167 |
||
168 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
|
11210 | 169 |
Debugger := self |
10203 | 170 |
]. |
171 |
||
172 |
" |
|
173 |
DebugView newDebugger |
|
174 |
" |
|
175 |
! ! |
|
176 |
||
177 |
!DebugView class methodsFor:'defaults'! |
|
178 |
||
179 |
defaultIcon |
|
180 |
"return the browsers default window icon" |
|
181 |
||
182 |
<resource: #programImage> |
|
183 |
||
10205 | 184 |
^ ToolbarIconLibrary debug22x22Icon |
10203 | 185 |
"/ ^ ToolbarIconLibrary debugIt20x20Icon |
186 |
||
187 |
"Modified: / 11-02-2007 / 11:47:20 / cg" |
|
188 |
! |
|
189 |
||
190 |
defaultIconForAboutBox |
|
191 |
<resource: #programImage> |
|
192 |
||
10205 | 193 |
^ ToolbarIconLibrary debug22x22IconForBlackBackgound |
10203 | 194 |
! |
195 |
||
196 |
defaultVerboseBacktrace |
|
197 |
<resource: #obsolete> |
|
198 |
self obsoleteMethodWarning. |
|
199 |
^ UserPreferences current verboseBacktraceInDebugger |
|
200 |
||
201 |
"Created: 11.1.1997 / 12:14:35 / cg" |
|
202 |
! |
|
203 |
||
204 |
defaultVerboseBacktrace:aBoolean |
|
205 |
<resource: #obsolete> |
|
206 |
self obsoleteMethodWarning. |
|
207 |
UserPreferences current verboseBacktraceInDebugger:aBoolean |
|
208 |
! |
|
209 |
||
210 |
updateStyleCache |
|
211 |
"extract values from the styleSheet and cache them in class variables" |
|
212 |
||
213 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
214 |
||
215 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
|
216 |
||
217 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
218 |
! ! |
|
219 |
||
220 |
!DebugView class methodsFor:'ignoring halts'! |
|
221 |
||
222 |
haltIgnoreInformationFor:haltingMethod atLineNr:lineNrInHaltingMethod |
|
223 |
"the information (if any) about the ignore-state of a halt" |
|
224 |
||
225 |
IgnoredHalts isNil ifTrue:[^ nil]. |
|
226 |
||
10205 | 227 |
IgnoredHalts do:[:ign | |
11210 | 228 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
229 |
^ ign |
|
230 |
]. |
|
10203 | 231 |
]. |
232 |
^ nil. |
|
233 |
! |
|
234 |
||
235 |
hasIgnoredHalts |
|
236 |
self removeInactiveIgnores. |
|
237 |
^ IgnoredHalts notEmptyOrNil |
|
238 |
! |
|
239 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
240 |
ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
241 |
"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
|
242 |
or until some time has elapsed. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
243 |
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
|
244 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
245 |
|oldEntry ign| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
246 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
247 |
IgnoredHalts notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
248 |
self removeInactiveIgnores. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
249 |
oldEntry := IgnoredHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
250 |
detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
251 |
ifNone:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
252 |
oldEntry notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
253 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
254 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
255 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
256 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
257 |
(countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
258 |
IgnoredHalts isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
259 |
IgnoredHalts := OrderedCollection new. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
260 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
261 |
ign := IgnoredHalt new breakpointWithParameter:parameterOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
262 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
263 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
264 |
ign ignoreCount:countOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
265 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
266 |
(dTOrNil notNil) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
267 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
268 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
269 |
untilShiftKey == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
270 |
ign ignoreUntilShiftKeyPressed:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
271 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
272 |
IgnoredHalts add:ign. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
273 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
274 |
Smalltalk changed:#ignoredHalts. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
275 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
276 |
"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
|
277 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
278 |
|
11210 | 279 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
10203 | 280 |
"remember to ignore a halt in some method for some number of invocations |
281 |
or until some time has elapsed. |
|
282 |
With nil count and time arguments, such an ignored halt is reactivated" |
|
283 |
||
284 |
|oldEntry ign| |
|
285 |
||
286 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 287 |
self removeInactiveIgnores. |
288 |
oldEntry := IgnoredHalts |
|
289 |
detect:[:ign | ign isForMethod:haltingMethod line:lineNrOfHalt] |
|
290 |
ifNone:nil. |
|
291 |
oldEntry notNil ifTrue:[ |
|
292 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
|
293 |
] |
|
294 |
]. |
|
295 |
||
296 |
(countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[ |
|
297 |
IgnoredHalts isNil ifTrue:[ |
|
298 |
IgnoredHalts := OrderedCollection new. |
|
299 |
]. |
|
300 |
ign := IgnoredHalt new method:haltingMethod lineNumber:lineNrOfHalt. |
|
301 |
||
302 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
|
303 |
ign ignoreCount:countOrNil. |
|
304 |
]. |
|
305 |
(dTOrNil notNil) ifTrue:[ |
|
306 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
|
307 |
]. |
|
308 |
untilShiftKey == true ifTrue:[ |
|
309 |
ign ignoreUntilShiftKeyPressed:true. |
|
310 |
]. |
|
311 |
IgnoredHalts add:ign. |
|
10203 | 312 |
]. |
313 |
Smalltalk changed:#ignoredHalts. |
|
314 |
||
11210 | 315 |
"Created: / 27-01-2012 / 11:33:38 / cg" |
10203 | 316 |
! |
317 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
318 |
isBreakpointToBeIgnoredForParameter:parameter modifyEntryCount:modifyCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
319 |
"/ should a breakpoint be ignored ? |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
320 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
321 |
IgnoredHalts isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
322 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
323 |
"/ 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
|
324 |
IgnoredHalts do:[:ign | |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
325 |
(ign isForBreakpointWithParameter:parameter) ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
326 |
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
|
327 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
328 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
329 |
ign isHaltIgnored ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
330 |
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
|
331 |
IgnoredHalts remove:ign ifAbsent:[]. |
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 |
^ true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
334 |
]. |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
337 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
338 |
IgnoredHalts isEmpty ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
339 |
IgnoredHalts := nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
340 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
341 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
342 |
^ false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
343 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
344 |
"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
|
345 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
346 |
|
10203 | 347 |
isHaltToBeIgnored |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
348 |
|c sender haltingMethod lineNrInHaltingMethod breakpointParameter| |
10203 | 349 |
|
350 |
"/ should a halt be ignored ? |
|
351 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
352 |
||
353 |
"/ look for a breakpoint-wrapper's context |
|
354 |
c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil. |
|
355 |
c notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
356 |
(c receiver isKindOf:NoHandlerError) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
357 |
c := c sender findNextContextWithSelector:#doRaise or:nil or:nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
358 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
359 |
(c receiver isKindOf:BreakPointInterrupt) ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
360 |
c := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
361 |
] ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
362 |
[ ((sender := c sender) receiver isKindOf:BreakPointInterrupt) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
363 |
or:[ sender receiver == BreakPointInterrupt ]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
364 |
c := sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
365 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
366 |
[ (sender := c sender) isBlockContext ] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
367 |
c := sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
368 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
369 |
sender := nil. "/ avoid keeping a reference to this context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
370 |
]. |
10203 | 371 |
]. |
372 |
||
373 |
c isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
374 |
"/ look for halts or explicit breakpoints |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
375 |
c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
376 |
c isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
377 |
c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
378 |
c isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
379 |
^ false |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
380 |
]. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
381 |
breakpointParameter := c argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
382 |
(self isBreakpointToBeIgnoredForParameter:breakpointParameter modifyEntryCount:true) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
383 |
^ true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
384 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
385 |
]. |
10203 | 386 |
]. |
387 |
||
388 |
c := c sender. |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
389 |
"/ a code-breakpoint ? |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
390 |
(c receiver isKindOf:Breakpoint) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
391 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
392 |
]. |
10203 | 393 |
haltingMethod := c method. |
394 |
||
395 |
haltingMethod isWrapped ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
396 |
lineNrInHaltingMethod := 1. |
10203 | 397 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
398 |
lineNrInHaltingMethod := c lineNumber. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
399 |
"/ Transcript showCR:c. |
10205 | 400 |
]. |
401 |
||
402 |
^ self |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
403 |
isHaltToBeIgnoredIn:haltingMethod |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
404 |
atLineNr:lineNrInHaltingMethod |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
405 |
modifyEntryCount:true. |
10203 | 406 |
|
407 |
"Created: / 22-10-2010 / 12:09:53 / cg" |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
408 |
"Modified: / 06-03-2012 / 12:54:09 / cg" |
10203 | 409 |
! |
410 |
||
411 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod |
|
412 |
^ self |
|
11210 | 413 |
isHaltToBeIgnoredIn:haltingMethod |
414 |
atLineNr:lineNrInHaltingMethod |
|
415 |
modifyEntryCount:false |
|
10203 | 416 |
! |
417 |
||
418 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod modifyEntryCount:modifyCount |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
419 |
"should a halt be ignored ?" |
10203 | 420 |
|
421 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
422 |
||
423 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
|
10205 | 424 |
IgnoredHalts do:[:ign | |
11210 | 425 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
11364
af95026ebbda
changed: #isHaltToBeIgnoredIn:atLineNr:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11305
diff
changeset
|
426 |
Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString. |
11210 | 427 |
Transcript show:' ('; show:ign; showCR:')'. |
11364
af95026ebbda
changed: #isHaltToBeIgnoredIn:atLineNr:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11305
diff
changeset
|
428 |
|
11210 | 429 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
430 |
ign isHaltIgnored ifFalse:[ |
|
431 |
Transcript showCR:'Debugger [info]: no longer ignore halt in ', haltingMethod whoString. |
|
432 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
433 |
]. |
|
434 |
^ true. |
|
435 |
]. |
|
10205 | 436 |
]. |
437 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
438 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not]. |
10203 | 439 |
IgnoredHalts isEmpty ifTrue:[ |
11210 | 440 |
IgnoredHalts := nil. |
10203 | 441 |
]. |
442 |
||
443 |
^ false. |
|
444 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
445 |
"Modified (comment): / 06-03-2012 / 12:51:43 / cg" |
10203 | 446 |
! |
447 |
||
448 |
removeInactiveIgnores |
|
449 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 450 |
IgnoredHalts := IgnoredHalts select:[:i | i isActive]. |
10203 | 451 |
]. |
452 |
! |
|
453 |
||
454 |
stopIgnoringHalts |
|
455 |
"forget about all ignored halts" |
|
456 |
||
457 |
IgnoredHalts := nil. |
|
458 |
Smalltalk changed:#ignoredHalts. |
|
459 |
! ! |
|
460 |
||
461 |
!DebugView class methodsFor:'instance creation / entering'! |
|
0 | 462 |
|
2421 | 463 |
enter |
464 |
"enter a debugger" |
|
465 |
||
5455 | 466 |
<context: #return> |
467 |
||
10205 | 468 |
^ self |
11210 | 469 |
enter:thisContext sender |
470 |
withMessage:'debugger entered' |
|
471 |
mayProceed:true. |
|
10205 | 472 |
! |
473 |
||
474 |
enter:aContext withMessage:aString |
|
2355 | 475 |
"enter a debugger" |
476 |
||
5455 | 477 |
<context: #return> |
478 |
||
2355 | 479 |
^ self |
11210 | 480 |
enter:aContext |
481 |
withMessage:aString |
|
482 |
mayProceed:true |
|
2355 | 483 |
! |
484 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
485 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 486 |
"enter a debugger; if this is a recursive invocation, enter |
487 |
a MiniDebugger instead. |
|
488 |
This is the standard way of entering the debugger; |
|
489 |
sent from error- and halt messages." |
|
0 | 490 |
|
3447 | 491 |
<context: #return> |
492 |
||
3702 | 493 |
|active| |
93 | 494 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
495 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
496 |
'==> enter1: (' print. aContext print. ')' printCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
497 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
498 |
|
57 | 499 |
StepInterruptPending := nil. |
3998 | 500 |
ControlInterrupt handle:[:ex | |
11210 | 501 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
502 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
503 |
ex proceed |
|
3998 | 504 |
] do:[ |
11210 | 505 |
" |
506 |
well, it could be a stepping or sending debugger up there; |
|
507 |
in this case, return to it. This happens, when a stepping process |
|
508 |
runs into an error (for example, a halt). In this case, we want the |
|
509 |
stepping debugger to come up again instead of a new one. |
|
510 |
" |
|
511 |
OpenDebuggers notNil ifTrue:[ |
|
512 |
active := Processor activeProcess. |
|
513 |
OpenDebuggers do:[:aDebugger | |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
514 |
|debuggersProcess| |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
515 |
|
11210 | 516 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
517 |
debuggersProcess := aDebugger inspectedProcess. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
518 |
debuggersProcess == active ifTrue:[ |
11210 | 519 |
aDebugger device isOpen ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
520 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
521 |
'reusing cached debugger' errorPrintCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
522 |
]. |
11210 | 523 |
aDebugger unstep. |
524 |
aDebugger setLabelFor:aString in:active. |
|
525 |
aDebugger mayProceed:mayProceed. |
|
526 |
^ aDebugger enter:aContext select:nil. |
|
527 |
] |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
528 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
529 |
(debuggersProcess notNil and:[ debuggersProcess isDead ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
530 |
aDebugger destroy. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
531 |
]. |
11210 | 532 |
] |
533 |
] |
|
534 |
]. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
535 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
536 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 537 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
538 |
"Modified: / 17-07-2012 / 19:08:18 / cg" |
53 | 539 |
! |
540 |
||
8347 | 541 |
enterException:ex |
542 |
"enter a debugger; if this is a recursive invocation, enter |
|
543 |
a MiniDebugger instead. |
|
544 |
This is the standard way of entering the debugger; |
|
545 |
sent from error- and halt messages." |
|
546 |
||
547 |
^ self |
|
11210 | 548 |
enter:ex returnableSuspendedContext |
549 |
withMessage:ex descriptionForDebugger |
|
550 |
mayProceed:(ex mayProceed). |
|
8347 | 551 |
! |
552 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
553 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 554 |
"enter a debugger - do not check for recursive invocation" |
555 |
||
5455 | 556 |
<context: #return> |
557 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
558 |
|aDebugger| |
266 | 559 |
|
560 |
StepInterruptPending := nil. |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
561 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
562 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
563 |
"/ to avoid recursive debugging ... |
3447 | 564 |
ControlInterrupt handle:[:ex | |
11210 | 565 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
566 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
567 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
568 |
] do:[ |
11210 | 569 |
aDebugger := self new. |
3447 | 570 |
]. |
571 |
||
572 |
aDebugger isNil ifTrue:[ |
|
11210 | 573 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
574 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
575 |
mayProceed ifTrue:[ |
|
576 |
(Dialog confirm:'Error/Breakpoint cought.\\Press Continue or Abort.' withCRs |
|
577 |
yesLabel:'Continue' noLabel:'Abort') |
|
578 |
ifTrue:[ |
|
579 |
^ nil |
|
580 |
]. |
|
581 |
] ifFalse:[ |
|
582 |
self information:'Error cought.\\Press OK to abort the operation.' withCRs. |
|
583 |
]. |
|
584 |
AbortOperationRequest raise. |
|
585 |
"not reached" |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
586 |
]. |
3447 | 587 |
|
588 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
589 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 590 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
591 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
592 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
593 |
" |
11210 | 594 |
nil halt |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
595 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
596 |
|
3447 | 597 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 598 |
! |
599 |
||
6430 | 600 |
enterWithMessage:message |
601 |
"enter a debugger" |
|
602 |
||
603 |
<context: #return> |
|
604 |
||
10205 | 605 |
^ self |
11210 | 606 |
enter:(thisContext sender) |
607 |
withMessage:message |
|
608 |
mayProceed:true. |
|
6430 | 609 |
! |
610 |
||
266 | 611 |
new |
10205 | 612 |
"return a new DebugView. |
2358 | 613 |
- return a cached debugger if it already exists. |
614 |
Also, care for remote displays on which no debugger is wanted |
|
615 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
616 |
||
617 |
|debugger currentScreen debuggerDevice| |
|
618 |
||
619 |
currentScreen := Screen current. |
|
14 | 620 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
621 |
currentScreen notNil ifTrue:[ |
11210 | 622 |
(currentScreen suppressDebugger) ifTrue:[ |
623 |
"/ no debuggers with that device - show an alertBox which aborts... |
|
624 |
^ nil. |
|
625 |
]. |
|
626 |
(currentScreen mayOpenDebugger) ifFalse:[ |
|
627 |
"/ no debugger on that device - but on the main screen |
|
628 |
currentScreen := Screen default. |
|
629 |
]. |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
630 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
631 |
|
266 | 632 |
" |
10205 | 633 |
need a blocking debugger if no processes or |
634 |
or if its a timing/interrupt process |
|
266 | 635 |
(because otherwise we would not get any events here ... |
636 |
" |
|
637 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
11210 | 638 |
((debugger := CachedExclusive) isNil |
639 |
or:[debugger device ~~ currentScreen |
|
640 |
or:[currentScreen isNil |
|
641 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
|
642 |
debugger := self newExclusive |
|
643 |
]. |
|
644 |
CachedExclusive := nil. |
|
266 | 645 |
] ifFalse:[ |
11210 | 646 |
CachedDebugger notNil ifTrue:[ |
647 |
(CachedDebugger device ~~ currentScreen |
|
648 |
or:[currentScreen isNil |
|
649 |
or:[currentScreen isOpen not |
|
650 |
or:[CachedDebugger class ~~ self]]]) ifTrue:[ |
|
651 |
CachedDebugger := nil |
|
652 |
] |
|
653 |
]. |
|
654 |
||
655 |
(debugger := CachedDebugger) notNil ifTrue:[ |
|
656 |
CachedDebugger := nil. |
|
657 |
] ifFalse:[ |
|
658 |
debuggerDevice := currentScreen. |
|
659 |
debuggerDevice isNil ifTrue:[ |
|
660 |
"/ use the default display |
|
661 |
debuggerDevice := Screen default. |
|
662 |
]. |
|
663 |
(debuggerDevice isNil |
|
664 |
or:[debuggerDevice isOpen not |
|
665 |
"/ or:[debuggerDevice mayOpenDebugger not] |
|
666 |
]) ifTrue:[ |
|
667 |
"/ no debugger |
|
668 |
^ nil. |
|
669 |
]. |
|
670 |
||
671 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
672 |
do:[ |
|
673 |
debugger := super new. |
|
674 |
]. |
|
675 |
debugger label:'Debugger'. |
|
676 |
debugger icon:self defaultIcon. |
|
677 |
] |
|
266 | 678 |
]. |
73 | 679 |
^ debugger |
875 | 680 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
681 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 682 |
! |
0 | 683 |
|
266 | 684 |
newExclusive |
685 |
"return a debugger for exclusive display access" |
|
686 |
||
687 |
|debugger| |
|
105 | 688 |
|
266 | 689 |
debugger := super new. |
690 |
debugger label:'Debugger'. |
|
875 | 691 |
debugger icon:self defaultIcon. |
266 | 692 |
debugger exclusive:true. |
693 |
^ debugger |
|
875 | 694 |
|
695 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 696 |
! |
697 |
||
29 | 698 |
openOn:aProcess |
699 |
"start a debugger on aProcess |
|
700 |
(actually not more than a good-looking inspector)" |
|
15 | 701 |
|
52 | 702 |
|aDebugger label nm| |
15 | 703 |
|
704 |
aDebugger := super new. |
|
875 | 705 |
aDebugger icon:self defaultIcon. |
29 | 706 |
aProcess notNil ifTrue:[ |
11210 | 707 |
nm := aProcess name. |
708 |
nm notNil ifTrue:[ |
|
709 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
710 |
] ifFalse:[ |
|
711 |
nm := aProcess id printString |
|
712 |
]. |
|
713 |
label := 'Debugger [' , nm , ']'. |
|
29 | 714 |
] ifFalse:[ |
11210 | 715 |
label := 'no process' |
29 | 716 |
]. |
1114 | 717 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 718 |
aDebugger openOn:aProcess. |
719 |
^ nil |
|
875 | 720 |
|
1114 | 721 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 722 |
! ! |
723 |
||
3269 | 724 |
!DebugView class methodsFor:'menu specs'! |
725 |
||
726 |
menuSpec |
|
727 |
"This resource specification was automatically generated |
|
728 |
by the MenuEditor of ST/X." |
|
729 |
||
730 |
"Do not manually edit this!! If it is corrupted, |
|
731 |
the MenuEditor may not be able to read the specification." |
|
732 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
733 |
|
3269 | 734 |
" |
735 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
736 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
737 |
" |
|
738 |
||
739 |
<resource: #menu> |
|
740 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
741 |
^ |
5875 | 742 |
#(Menu |
11210 | 743 |
( |
744 |
(MenuItem |
|
745 |
label: 'File' |
|
746 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
747 |
submenu: |
11210 | 748 |
(Menu |
749 |
( |
|
750 |
(MenuItem |
|
751 |
enabled: canSendEmail |
|
752 |
label: 'Report a Bug via eMail...' |
|
753 |
itemValue: doOpenReportMailApp |
|
754 |
translateLabel: true |
|
755 |
) |
|
756 |
(MenuItem |
|
757 |
label: '-' |
|
758 |
) |
|
759 |
(MenuItem |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
760 |
enabled: canCloseAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
761 |
label: 'Close all Debuggers...' |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
762 |
itemValue: closeAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
763 |
translateLabel: true |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
764 |
isVisible: isNotInspecting |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
765 |
) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
766 |
(MenuItem |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
767 |
label: '-' |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
768 |
) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
769 |
(MenuItem |
11210 | 770 |
label: 'Exit' |
771 |
itemValue: closeRequest |
|
772 |
translateLabel: true |
|
773 |
isVisible: isInspecting |
|
774 |
) |
|
775 |
(MenuItem |
|
776 |
label: 'Close Debugger and Abort' |
|
777 |
itemValue: closeRequest |
|
778 |
translateLabel: true |
|
779 |
isVisible: isNotInspecting |
|
780 |
) |
|
781 |
) |
|
782 |
nil |
|
783 |
nil |
|
784 |
) |
|
785 |
) |
|
786 |
(MenuItem |
|
787 |
label: 'View' |
|
788 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
789 |
submenu: |
11210 | 790 |
(Menu |
791 |
( |
|
792 |
(MenuItem |
|
793 |
enabled: canShowMore |
|
794 |
label: 'Show More WalkBack' |
|
11647 | 795 |
itemValue: showMoreWalkback |
11210 | 796 |
translateLabel: true |
797 |
) |
|
798 |
(MenuItem |
|
11647 | 799 |
enabled: canShowMore |
800 |
label: 'Show Full WalkBack' |
|
801 |
itemValue: showFullWalkback |
|
802 |
translateLabel: true |
|
803 |
) |
|
804 |
(MenuItem |
|
805 |
label: '-' |
|
806 |
) |
|
807 |
(MenuItem |
|
11210 | 808 |
label: 'Show Verbose WalkBack' |
809 |
itemValue: toggleVerboseWalkback |
|
810 |
translateLabel: true |
|
811 |
isVisible: showingDenseWalkback |
|
812 |
) |
|
813 |
(MenuItem |
|
814 |
label: 'Show Dense WalkBack' |
|
815 |
itemValue: toggleVerboseWalkback |
|
816 |
translateLabel: true |
|
817 |
isVisible: showingVerboseWalkback |
|
818 |
) |
|
819 |
(MenuItem |
|
11573 | 820 |
label: 'Show Support Code (Implementation of Enumerations, Exceptions etc.)' |
821 |
itemValue: showSupportCode |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
822 |
translateLabel: true |
11573 | 823 |
isVisible: notShowingSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
824 |
) |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
825 |
(MenuItem |
11573 | 826 |
label: 'Hide Support Code (Implementation of Enumerations, Exceptions etc.)' |
827 |
itemValue: hideSupportCode |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
828 |
translateLabel: true |
11573 | 829 |
isVisible: showingSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
830 |
) |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
831 |
(MenuItem |
11210 | 832 |
label: '-' |
833 |
) |
|
834 |
(MenuItem |
|
835 |
label: 'Raise Debugger when Entering' |
|
836 |
itemValue: autoRaiseView: |
|
837 |
translateLabel: true |
|
838 |
indication: autoRaiseView |
|
839 |
) |
|
840 |
(MenuItem |
|
841 |
label: '-' |
|
842 |
) |
|
843 |
(MenuItem |
|
844 |
label: 'Settings...' |
|
845 |
itemValue: openSettingsDialog |
|
846 |
translateLabel: true |
|
847 |
) |
|
848 |
) |
|
849 |
nil |
|
850 |
nil |
|
851 |
) |
|
852 |
) |
|
853 |
(MenuItem |
|
854 |
label: 'Process' |
|
855 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
856 |
submenu: |
11210 | 857 |
(Menu |
858 |
( |
|
859 |
(MenuItem |
|
860 |
label: 'Continue' |
|
861 |
itemValue: doContinue |
|
862 |
translateLabel: true |
|
863 |
) |
|
864 |
(MenuItem |
|
865 |
label: 'Next (Line-Step)' |
|
866 |
itemValue: doNext |
|
867 |
translateLabel: true |
|
868 |
) |
|
869 |
(MenuItem |
|
870 |
label: 'Step' |
|
871 |
itemValue: doStep |
|
872 |
translateLabel: true |
|
873 |
) |
|
874 |
(MenuItem |
|
875 |
label: '-' |
|
876 |
) |
|
877 |
(MenuItem |
|
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
878 |
label: 'Change Priority...' |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
879 |
itemValue: doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
880 |
translateLabel: true |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
881 |
) |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
882 |
(MenuItem |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
883 |
label: '-' |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
884 |
) |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
885 |
(MenuItem |
11210 | 886 |
label: 'Abort' |
887 |
itemValue: doAbort |
|
888 |
translateLabel: true |
|
889 |
) |
|
890 |
(MenuItem |
|
891 |
enabled: abortAllIsHandled |
|
892 |
label: 'Abort All' |
|
893 |
itemValue: doAbortAll |
|
894 |
translateLabel: true |
|
895 |
) |
|
896 |
(MenuItem |
|
897 |
label: '-' |
|
898 |
) |
|
899 |
(MenuItem |
|
900 |
label: 'Terminate' |
|
901 |
itemValue: doTerminate |
|
902 |
translateLabel: true |
|
903 |
) |
|
904 |
) |
|
905 |
nil |
|
906 |
nil |
|
907 |
) |
|
908 |
) |
|
909 |
(MenuItem |
|
910 |
label: 'Context' |
|
911 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
912 |
submenu: |
11210 | 913 |
(Menu |
914 |
( |
|
915 |
(MenuItem |
|
916 |
enabled: canReturn |
|
917 |
label: 'Return' |
|
918 |
itemValue: doReturn |
|
919 |
translateLabel: true |
|
920 |
) |
|
921 |
(MenuItem |
|
922 |
enabled: canRestart |
|
923 |
label: 'Restart' |
|
924 |
itemValue: doRestart |
|
925 |
translateLabel: true |
|
926 |
) |
|
927 |
(MenuItem |
|
928 |
label: '-' |
|
929 |
) |
|
930 |
(MenuItem |
|
931 |
enabled: hasContextSelected |
|
932 |
label: 'Inspect' |
|
933 |
itemValue: inspectContext |
|
934 |
translateLabel: true |
|
935 |
) |
|
936 |
(MenuItem |
|
937 |
label: 'Copy WalkBack Text' |
|
938 |
itemValue: copyWalkbackText |
|
939 |
translateLabel: true |
|
940 |
) |
|
941 |
(MenuItem |
|
942 |
label: 'Bookmark Method in SystemBrowser' |
|
943 |
itemValue: addBrowserBookmark |
|
944 |
translateLabel: true |
|
945 |
) |
|
11391 | 946 |
(MenuItem |
947 |
label: '-' |
|
11595 | 948 |
isVisible: false |
949 |
) |
|
950 |
(MenuItem |
|
951 |
label: 'Find Handler For...' |
|
952 |
itemValue: findHandlerFor |
|
953 |
translateLabel: true |
|
954 |
isVisible: false |
|
955 |
) |
|
956 |
(MenuItem |
|
957 |
label: '-' |
|
11391 | 958 |
) |
959 |
(MenuItem |
|
11604 | 960 |
label: 'Remember Callchain && Highlight on Next Entry' |
11391 | 961 |
itemValue: rememberCallchain |
962 |
translateLabel: true |
|
963 |
) |
|
964 |
(MenuItem |
|
965 |
label: 'Clear Remembered Callchain' |
|
966 |
itemValue: clearRememberedCallchain |
|
967 |
translateLabel: true |
|
968 |
) |
|
11210 | 969 |
) |
970 |
nil |
|
971 |
nil |
|
972 |
) |
|
973 |
) |
|
974 |
(MenuItem |
|
975 |
label: 'Class' |
|
976 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
977 |
submenu: |
11210 | 978 |
(Menu |
979 |
( |
|
980 |
(MenuItem |
|
981 |
enabled: canBrowseImplementingClass |
|
982 |
label: 'Browse Implementing Class' |
|
983 |
itemValue: browseImplementingClass |
|
984 |
translateLabel: true |
|
985 |
) |
|
986 |
(MenuItem |
|
987 |
enabled: canBrowseReceiversClass |
|
988 |
label: 'Browse Receivers Class' |
|
989 |
itemValue: browseReceiversClass |
|
990 |
translateLabel: true |
|
991 |
) |
|
992 |
(MenuItem |
|
993 |
label: '-' |
|
994 |
) |
|
995 |
(MenuItem |
|
996 |
enabled: canBrowseClassHierarchy |
|
997 |
label: 'Browse Receivers Class Hierarchy' |
|
998 |
itemValue: browseClassHierarchy |
|
999 |
translateLabel: true |
|
11610 | 1000 |
isVisible: false |
11210 | 1001 |
) |
1002 |
(MenuItem |
|
1003 |
enabled: canBrowseFullClassProtocol |
|
1004 |
label: 'Browse Receivers Full Protocol' |
|
1005 |
itemValue: browseFullClassProtocol |
|
1006 |
translateLabel: true |
|
11610 | 1007 |
isVisible: false |
11210 | 1008 |
) |
1009 |
(MenuItem |
|
1010 |
label: '-' |
|
11610 | 1011 |
isVisible: false |
11210 | 1012 |
) |
1013 |
(MenuItem |
|
1014 |
enabled: canBrowseProcessesApplication |
|
1015 |
label: 'Browse Application Class' |
|
1016 |
itemValue: browseProcessesApplication |
|
1017 |
translateLabel: true |
|
1018 |
) |
|
1019 |
) |
|
1020 |
nil |
|
1021 |
nil |
|
1022 |
) |
|
1023 |
) |
|
1024 |
(MenuItem |
|
1025 |
label: 'Selector' |
|
1026 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1027 |
submenu: |
11210 | 1028 |
(Menu |
1029 |
( |
|
1030 |
(MenuItem |
|
1031 |
label: 'Browse Implementors...' |
|
1032 |
itemValue: browseImplementorsOf |
|
1033 |
translateLabel: true |
|
1034 |
) |
|
1035 |
(MenuItem |
|
1036 |
label: 'Browse Senders...' |
|
1037 |
itemValue: browseSendersOf |
|
1038 |
translateLabel: true |
|
1039 |
) |
|
1040 |
(MenuItem |
|
1041 |
label: '-' |
|
1042 |
) |
|
1043 |
(MenuItem |
|
1044 |
enabled: canDefineMethod |
|
1045 |
label: 'Define Missing Method' |
|
1046 |
itemValue: doDefineMethod |
|
1047 |
translateLabel: true |
|
1048 |
) |
|
1049 |
) |
|
1050 |
nil |
|
1051 |
nil |
|
1052 |
) |
|
1053 |
) |
|
1054 |
(MenuItem |
|
1055 |
label: 'Breakpoint' |
|
1056 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1057 |
submenu: |
11210 | 1058 |
(Menu |
1059 |
( |
|
1060 |
(MenuItem |
|
1061 |
enabled: canRemoveBreakpoint |
|
1062 |
label: 'Remove Breakpoint' |
|
1063 |
itemValue: removeBreakpoint |
|
1064 |
translateLabel: true |
|
1065 |
) |
|
1066 |
(MenuItem |
|
1067 |
label: 'Remove all Breakpoints' |
|
1068 |
itemValue: removeAllBreakpoints |
|
1069 |
translateLabel: true |
|
1070 |
) |
|
1071 |
(MenuItem |
|
1072 |
label: '-' |
|
1073 |
) |
|
1074 |
(MenuItem |
|
1075 |
enabled: canAddBreakpoint |
|
1076 |
label: 'Add Breakpoint' |
|
1077 |
itemValue: addBreakpoint |
|
1078 |
translateLabel: true |
|
1079 |
) |
|
1080 |
(MenuItem |
|
1081 |
label: '-' |
|
1082 |
) |
|
1083 |
(MenuItem |
|
1084 |
label: 'Ignore this Halt/BreakPoint' |
|
1085 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1086 |
submenu: |
11210 | 1087 |
(Menu |
1088 |
( |
|
1089 |
(MenuItem |
|
1090 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
1091 |
label: 'For Some Time...' |
|
1092 |
itemValue: openIgnoreHaltUntilTimeElapsedDialog |
|
1093 |
translateLabel: true |
|
1094 |
) |
|
1095 |
(MenuItem |
|
1096 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
1097 |
label: 'For the Next N Times...' |
|
1098 |
itemValue: openIgnoreHaltNTimesDialog |
|
1099 |
translateLabel: true |
|
1100 |
) |
|
1101 |
(MenuItem |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1102 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
11210 | 1103 |
label: 'Until Shift-Key is Pressed' |
1104 |
itemValue: ignoreHaltUntilShiftKeyIsPressed |
|
1105 |
translateLabel: true |
|
1106 |
) |
|
1107 |
(MenuItem |
|
1108 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
1109 |
label: 'Forever (Until Ignoring is Stopped)' |
|
1110 |
itemValue: ignoreHaltForever |
|
1111 |
translateLabel: true |
|
1112 |
) |
|
1113 |
) |
|
1114 |
nil |
|
1115 |
nil |
|
1116 |
) |
|
1117 |
) |
|
1118 |
(MenuItem |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1119 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1120 |
label: 'Ignore all BreakPoints with this Parameter' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1121 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1122 |
submenu: |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1123 |
(Menu |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1124 |
( |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1125 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1126 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1127 |
label: 'For Some Time...' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1128 |
itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1129 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1130 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1131 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1132 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1133 |
label: 'For the Next N Times...' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1134 |
itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1135 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1136 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1137 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1138 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1139 |
label: 'Until Shift-Key is Pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1140 |
itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1141 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1142 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1143 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1144 |
enabled: isStoppedAtBreakPointWithParameter |
11370 | 1145 |
label: 'Forever (Reenable in BreakPoint-Browser)' |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1146 |
itemValue: ignoreBreakpointsWithThisParameterForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1147 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1148 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1149 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1150 |
nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1151 |
nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1152 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1153 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1154 |
(MenuItem |
11210 | 1155 |
label: 'Ignore all Halts/BreakPoints' |
1156 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1157 |
submenu: |
11210 | 1158 |
(Menu |
1159 |
( |
|
1160 |
(MenuItem |
|
1161 |
label: 'For Some Time...' |
|
1162 |
itemValue: openIgnoreAllHaltsUntilTimeElapsedDialog |
|
1163 |
translateLabel: true |
|
1164 |
) |
|
1165 |
(MenuItem |
|
1166 |
label: 'Until Shift-Key is Pressed' |
|
1167 |
itemValue: ignoreAllHaltsUntilShiftKeyIsPressed |
|
1168 |
translateLabel: true |
|
1169 |
) |
|
1170 |
(MenuItem |
|
1171 |
label: 'Forever (Until Ignoring is Stopped)' |
|
1172 |
itemValue: ignoreAllHaltsForever |
|
1173 |
translateLabel: true |
|
1174 |
) |
|
1175 |
) |
|
1176 |
nil |
|
1177 |
nil |
|
1178 |
) |
|
1179 |
) |
|
1180 |
(MenuItem |
|
1181 |
enabled: hasHaltsToIgnore |
|
1182 |
label: 'Stop Ignoring' |
|
1183 |
itemValue: stopIgnoringHalts |
|
1184 |
translateLabel: true |
|
1185 |
) |
|
1186 |
(MenuItem |
|
1187 |
label: '-' |
|
1188 |
) |
|
1189 |
(MenuItem |
|
1190 |
label: 'Manage Breakpoints' |
|
1191 |
itemValue: openBreakPointBrowser |
|
1192 |
translateLabel: true |
|
1193 |
) |
|
1194 |
(MenuItem |
|
11443 | 1195 |
label: 'Allow Halt in Debugger' |
11210 | 1196 |
itemValue: allowBreakPointsInDebugger: |
1197 |
translateLabel: true |
|
1198 |
indication: allowBreakPointsInDebugger |
|
1199 |
) |
|
1200 |
) |
|
1201 |
nil |
|
1202 |
nil |
|
1203 |
) |
|
1204 |
) |
|
1205 |
(MenuItem |
|
1206 |
label: 'Help' |
|
1207 |
translateLabel: true |
|
1208 |
startGroup: right |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1209 |
submenu: |
11210 | 1210 |
(Menu |
1211 |
( |
|
1212 |
(MenuItem |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1213 |
label: 'Debugger''s Documentation' |
11210 | 1214 |
itemValue: openHTMLDocument: |
1215 |
translateLabel: true |
|
1216 |
argument: 'tools/debugger/TOP.html' |
|
1217 |
) |
|
1218 |
(MenuItem |
|
1219 |
label: '-' |
|
1220 |
) |
|
1221 |
(MenuItem |
|
1222 |
label: 'About DebugView...' |
|
1223 |
itemValue: openAboutThisApplication |
|
1224 |
translateLabel: true |
|
1225 |
) |
|
1226 |
) |
|
1227 |
nil |
|
1228 |
nil |
|
1229 |
) |
|
1230 |
) |
|
1231 |
) |
|
1232 |
nil |
|
1233 |
nil |
|
3269 | 1234 |
) |
11647 | 1235 |
|
1236 |
"Modified: / 23-07-2012 / 12:41:03 / cg" |
|
3269 | 1237 |
! ! |
1238 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1239 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1240 |
|
4121 | 1241 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1242 |
"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
|
1243 |
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
|
1244 |
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
|
1245 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1246 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1247 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1248 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1249 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1250 |
someContexts := Array new:25. |
2042 | 1251 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1252 |
idx := 1. |
10205 | 1253 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
11210 | 1254 |
someContexts at:idx put:con. |
1255 |
con := con sender. |
|
1256 |
idx := idx + 1. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1257 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1258 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1259 |
^ someContexts at:idx. |
3447 | 1260 |
! |
1261 |
||
10205 | 1262 |
interestingContextIndexIn:aContextArray |
3447 | 1263 |
"return an interesting contexts offset, or nil. |
1264 |
This is the context initially shown in the walkback. |
|
1265 |
We move up the calling chain, skipping all intermediate Signal |
|
1266 |
and Exception contexts, to present the context in which the error |
|
1267 |
actually occured. |
|
1268 |
Just for your convenience :-)" |
|
1269 |
||
8152 | 1270 |
|con found offset sel prev ex rcvr nMax idx| |
3447 | 1271 |
|
7713 | 1272 |
"/ Transcript showCR:aContextArray. |
7648 | 1273 |
|
3447 | 1274 |
nMax := aContextArray size. |
1275 |
nMax <= 1 ifTrue:[^ 1]. |
|
1276 |
con := aContextArray at:1. |
|
1277 |
con isBlockContext ifTrue:[^ 1]. |
|
1278 |
||
1279 |
"/ somewhere, at the bottom, there must be a raise ... |
|
1280 |
"/ find the exception |
|
1281 |
||
1282 |
1 to:5 do:[:i | |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1283 |
con := aContextArray at:i ifAbsent:nil. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1284 |
con notNil ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1285 |
sel := con selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1286 |
(sel startsWith:'raise') ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1287 |
rcvr := con receiver. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1288 |
(rcvr isLazyValue not and:[rcvr isException]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1289 |
ex := rcvr. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1290 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1291 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1292 |
] ifFalse:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1293 |
(rcvr isLazyValue not and:[rcvr isExceptionCreator]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1294 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1295 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1296 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1297 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1298 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1299 |
]. |
3447 | 1300 |
]. |
1301 |
||
1302 |
" |
|
1303 |
if this is a noHandler exception, skip forward |
|
1304 |
to the erronous context |
|
1305 |
" |
|
1306 |
ex notNil ifTrue:[ |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1307 |
ex signal == Signal noHandlerSignal ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1308 |
found := ex suspendedContext |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1309 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1310 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1311 |
"/ Transcript show:'1 '; showCR:found. |
3447 | 1312 |
found isNil ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1313 |
"/ this is a kludge, but convenient. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1314 |
"/ show the place where the error (divisionByZero...) happend, |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1315 |
"/ not where the signal was raised. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1316 |
con := (aContextArray at:1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1317 |
sel := con methodHome selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1318 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1319 |
"/ typically a DivisionByZero - show caller of division |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1320 |
(sel == #// |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1321 |
or:[sel == #/ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1322 |
or:[sel == #\\]]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1323 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1324 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1325 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1326 |
"/ 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
|
1327 |
(sel == #doesNotUnderstand:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1328 |
idx := 3. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1329 |
nMax > 2 ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1330 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1331 |
sel == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1332 |
idx := 4 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1333 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1334 |
nMax > idx ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1335 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1336 |
"/ 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
|
1337 |
((sel == #perform:) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1338 |
or:[sel startsWith:'perform:with']) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1339 |
idx := idx + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1340 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1341 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1342 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1343 |
^ idx min:nMax |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1344 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1345 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1346 |
"/ show the bad method; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1347 |
(sel == #noByteCode) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1348 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1349 |
]. |
3447 | 1350 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1351 |
"/ "/ 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
|
1352 |
"/ ((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1353 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1354 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1355 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1356 |
"/ "/ 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
|
1357 |
"/ (sel == #shouldImplement) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1358 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1359 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1360 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1361 |
"/ "/ 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
|
1362 |
"/ ((sel == #error:mayProceed:) |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1363 |
"/ or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1364 |
"/ nMax > 2 ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1365 |
"/ sel := (aContextArray at:2) selector. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1366 |
"/ sel == #mustBeBoolean ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1367 |
"/ ^ 3 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1368 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1369 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1370 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1371 |
"/ ]. |
7862 | 1372 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1373 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1374 |
(sel == #signalInterrupt:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1375 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1376 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1377 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1378 |
"/ "/ 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
|
1379 |
"/ ((sel == #error) or:[sel == #error:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1380 |
"/ con method mclass == Object ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1381 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1382 |
"/ ] |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1383 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1384 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1385 |
"/ "/ 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
|
1386 |
"/ (sel == #subclassResponsibility) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1387 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1388 |
"/ ]. |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
1389 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1390 |
"/ 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
|
1391 |
( #(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1392 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1393 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1394 |
#elementBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1395 |
"/ #subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1396 |
) includes:sel) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1397 |
idx := 2. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1398 |
[ idx <= 3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1399 |
and:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1400 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1401 |
#(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1402 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1403 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1404 |
#elementBoundsError: ) includes:sel |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1405 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1406 |
] whileTrue:[ idx := idx + 1 ]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1407 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1408 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1409 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1410 |
sel := (aContextArray at:idx+1) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1411 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1412 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1413 |
sel := (aContextArray at:idx+2) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1414 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1415 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1416 |
^ idx+3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1417 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1418 |
^ idx+2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1419 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1420 |
^ idx+1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1421 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1422 |
^ idx |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1423 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1424 |
offset := 1. |
8152 | 1425 |
]. |
1426 |
||
1427 |
"/ the above is all too hard-coded; |
|
1428 |
"/ ask the method, if it thinks it should be skipped in the walkback. |
|
1429 |
"/ as more methods get flagged, remove code from above. |
|
1430 |
con := aContextArray at:offset ifAbsent:nil. |
|
1431 |
||
10205 | 1432 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1433 |
con notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1434 |
and:[ con methodHome notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1435 |
and:[ con methodHome method notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1436 |
and:[ con methodHome method shouldBeSkippedInDebuggersWalkBack ]]] |
8152 | 1437 |
] whileTrue:[ |
1438 |
"/ Transcript showCR:con methodHome method. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1439 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1440 |
con := aContextArray at:offset ifAbsent:nil. |
8152 | 1441 |
]. |
3447 | 1442 |
|
1443 |
" |
|
1444 |
got it; move up, skipping all intermediate Signal and |
|
1445 |
Exception contexts |
|
1446 |
" |
|
1447 |
prev := nil. |
|
1448 |
rcvr := con receiver. |
|
10205 | 1449 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1450 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 1451 |
] whileTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1452 |
prev := con. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1453 |
nMax > offset ifFalse:[^ offset]. |
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 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1456 |
con := aContextArray at:offset. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1457 |
rcvr := con receiver. |
3447 | 1458 |
]. |
1459 |
||
1460 |
" |
|
1461 |
now, we are one above the raising context |
|
1462 |
" |
|
1463 |
||
1464 |
" |
|
1465 |
if the sender-method of the raise is one of objects error methods ... |
|
1466 |
" |
|
10205 | 1467 |
( #( halt halt: |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1468 |
error error: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1469 |
doesNotUnderstand: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1470 |
subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1471 |
primitiveFailed) includes:con selector) |
3447 | 1472 |
ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1473 |
con selector == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1474 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1475 |
one more up, to get to the originating context |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1476 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1477 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1478 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1479 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1480 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1481 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1482 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1483 |
offset := offset + 1. |
3447 | 1484 |
] ifFalse:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1485 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1486 |
ok, got the raise - if its a BreakPoint, look for the sender |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1487 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1488 |
(prev notNil and:[prev receiver == BreakPointInterrupt]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1489 |
offset := offset + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1490 |
]. |
3447 | 1491 |
]. |
1492 |
||
1493 |
^ offset |
|
1494 |
||
7713 | 1495 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1496 |
"Modified: / 08-07-2011 / 13:15:49 / cg" |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1497 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1498 |
|
73 | 1499 |
!DebugView methodsFor:'basic'! |
1500 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1501 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1502 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1503 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1504 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1505 |
m notNil ifTrue:[ |
11210 | 1506 |
self updateMenuItems. |
1507 |
||
1508 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
|
1509 |
abortButton enable. |
|
1510 |
m enable:#doAbort. |
|
1511 |
] ifFalse:[ |
|
1512 |
abortButton disable. |
|
1513 |
m disable:#doAbort. |
|
1514 |
]. |
|
1515 |
exclusive ifTrue:[ |
|
1516 |
terminateButton disable. |
|
1517 |
m disable:#doTerminate. |
|
1518 |
] ifFalse:[ |
|
1519 |
terminateButton enable. |
|
1520 |
m enable:#doTerminate. |
|
1521 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1522 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1523 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1524 |
mayProceed == false ifTrue:[ |
11210 | 1525 |
continueButton disable. |
1526 |
m notNil ifTrue:[m disable:#doContinue]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1527 |
] ifFalse:[ |
11210 | 1528 |
continueButton enable. |
1529 |
m notNil ifTrue:[m enable:#doContinue] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1530 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1531 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1532 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1533 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1534 |
|
1364 | 1535 |
enter:aContext select:initialSelectionOrNil |
73 | 1536 |
"enter the debugger - get and display the context, then start an |
1537 |
exclusive event loop on top of eveything else" |
|
1538 |
||
3447 | 1539 |
<context: #return> |
1540 |
||
9076 | 1541 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
3447 | 1542 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1543 |
DebuggingDebugger == true ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1544 |
'==> enter2: (' print. aContext print. |
11210 | 1545 |
') select: ' print. initialSelectionOrNil printCR. |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1546 |
]. |
3447 | 1547 |
thisContext isRecursive ifTrue:[ |
11210 | 1548 |
"/ care for the special case, were the Debugger was autoloaded. |
1549 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1550 |
"/ condition. |
|
1551 |
foundNoByteCodeContext := false. |
|
1552 |
foundExitContext := false. |
|
1553 |
||
1554 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1555 |
[ |
|
1556 |
foundNoByteCodeContext not |
|
1557 |
and:[ foundExitContext not |
|
1558 |
and:[c notNil |
|
1559 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
|
1560 |
]]]] |
|
1561 |
whileTrue:[ |
|
1562 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1563 |
foundExitContext := true |
|
1564 |
]. |
|
1565 |
c selector == #noByteCode ifTrue:[ |
|
1566 |
foundNoByteCodeContext := true |
|
1567 |
]. |
|
1568 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1569 |
]. |
|
1570 |
||
1571 |
(foundNoByteCodeContext not |
|
1572 |
and:[ foundExitContext not]) ifFalse:[ |
|
1573 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1574 |
||
1575 |
^ MiniDebugger |
|
1576 |
enter:aContext |
|
1577 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1578 |
mayProceed:mayProceed. |
|
1579 |
]. |
|
1580 |
foundExitContext ifTrue:[ |
|
1581 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1582 |
^ self. |
|
1583 |
]. |
|
3447 | 1584 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1585 |
|
10203 | 1586 |
"/'entering: ' print. aContext printCR. |
1587 |
"/'initial: ' print. initialSelectionOrNil printCR. |
|
8170 | 1588 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1589 |
||
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
1590 |
self class isHaltToBeIgnored ifTrue:[ |
11210 | 1591 |
^ self. |
8170 | 1592 |
]. |
1593 |
||
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1594 |
iAmNew := drawableId isNil. |
73 | 1595 |
|
8148 | 1596 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 1597 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1598 |
busy := cachable := true. |
73 | 1599 |
inspecting := false. |
1600 |
inspectedProcess := Processor activeProcess. |
|
1601 |
stepping := false. |
|
1602 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1603 |
stepHow := nil. |
8148 | 1604 |
nChainShown := InitialNChainShown. |
73 | 1605 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1606 |
"/ if debugger is entered while a box has grabbed the |
9076 | 1607 |
"/ 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
|
1608 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1609 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1610 |
"/ 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
|
1611 |
"/ 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
|
1612 |
"/ 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
|
1613 |
Screen allScreens do:[:aScreen | |
11210 | 1614 |
aScreen ungrabPointer. |
1615 |
aScreen ungrabKeyboard. |
|
10205 | 1616 |
]. |
1617 |
||
1618 |
("inspectedProcess suspendedContext isNil |
|
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1619 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
11210 | 1620 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1621 |
] ifFalse:[ |
11210 | 1622 |
terminateButton enable. |
1623 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1624 |
]. |
73 | 1625 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1626 |
iAmNew ifFalse:[ |
11210 | 1627 |
"/ not the first time - disable buttons & menus |
1628 |
"/ from the previous life |
|
1629 |
self turnOffAllButtons. |
|
1630 |
||
1631 |
m := contextView middleButtonMenu. |
|
1632 |
m notNil ifTrue:[ |
|
1633 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
|
1634 |
]. |
|
1635 |
verboseBacktrace |
|
1636 |
ifTrue:[self showVerboseWalkback] |
|
1637 |
ifFalse:[self showDenseWalkback]. |
|
132 | 1638 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1639 |
self iconLabel:'Debugger'. |
132 | 1640 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1641 |
windowGroup isNil ifTrue:[ |
11210 | 1642 |
self windowGroup: WindowGroup new. |
1643 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1644 |
]. |
132 | 1645 |
exclusive ifFalse:[ |
11210 | 1646 |
"/ create a (modal) windowGroup for myself |
1647 |
||
1648 |
windowGroup setModal:true. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1649 |
] ifTrue:[ |
11210 | 1650 |
"/ create a windowGroup with a synchronous sensor for me |
1651 |
||
1652 |
windowGroup beSynchronous. |
|
73 | 1653 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1654 |
windowGroup setProcess:Processor activeProcess. |
73 | 1655 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1656 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
73 | 1657 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1658 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
10203 | 1659 |
"/'after setContext; first is ' print. |
1660 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1661 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
73 | 1662 |
|
10203 | 1663 |
self updateButtonsAndMenuItemsForContext:aContext. |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1664 |
|
73 | 1665 |
" |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1666 |
If this is a new debugger, do a realize. |
528
a5ba1a3d0b45
Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents:
527
diff
changeset
|
1667 |
Otherwise, its probably better to do a map, which shows the |
73 | 1668 |
view at the previous position, without a need for the user to set the |
1669 |
position again |
|
1670 |
" |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1671 |
iAmNew ifFalse:[ |
11210 | 1672 |
self remap. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1673 |
] ifTrue:[ |
11210 | 1674 |
self realize. |
73 | 1675 |
]. |
8193
9a4febdd8202
Raise debugger to the very top when entering
Stefan Vogel <sv@exept.de>
parents:
8181
diff
changeset
|
1676 |
self setForegroundWindow. |
73 | 1677 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1678 |
exclusive ifTrue:[ |
11210 | 1679 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1680 |
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
|
1681 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1682 |
This is a modal debugger - all event processing is stopped.. |
10205 | 1683 |
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
|
1684 |
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
|
1685 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1686 |
Also, there is no event processing (redraw) for other views.' |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1687 |
]. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1688 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1689 |
self autoRaiseView ifTrue:[ |
11210 | 1690 |
"/ self raise. |
1691 |
self raiseDeiconified. |
|
1692 |
self topView activate; setForegroundWindow; activate. |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1693 |
]. |
1486
6ae442626f20
wait until visible before starting to draw
Claus Gittinger <cg@exept.de>
parents:
1484
diff
changeset
|
1694 |
|
73 | 1695 |
canContinue := true. |
1696 |
exitAction := nil. |
|
1697 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1698 |
"/ enter private event handling loop. This is left (and we come back here again) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1699 |
"/ when any button was pressed which requires continuation of the debuggee or |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1700 |
"/ closedown of the debugger. |
3701
ef73aac8e8d5
Use #ifCurtailed: instead of #valueOnUnwindDo:
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
1701 |
[self controlLoop] ifCurtailed:[ |
11210 | 1702 |
windowGroup notNil ifTrue:[ |
1703 |
windowGroup setProcess:nil. |
|
1704 |
]. |
|
1705 |
self destroy |
|
132 | 1706 |
]. |
73 | 1707 |
|
10203 | 1708 |
"/ here after my own control loop is finished. |
1709 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1710 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1711 |
"/ 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
|
1712 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1713 |
contextView contents:nil. |
1714 |
||
73 | 1715 |
codeView acceptAction:nil. |
942 | 1716 |
codeView doItAction:nil. |
73 | 1717 |
|
4892 | 1718 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
11210 | 1719 |
ObjectMemory stepInterruptHandler:nil. |
4892 | 1720 |
]. |
1721 |
||
73 | 1722 |
(exitAction ~~ #step) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1723 |
"/ not stepping or continue - close window |
11210 | 1724 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
1725 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1726 |
self cacheMyself. |
11210 | 1727 |
receiverInspector release. |
1728 |
contextInspector release. |
|
1729 |
||
1730 |
self unmap. |
|
1731 |
device flush. |
|
1732 |
||
1733 |
(exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
|
1734 |
(exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
|
1735 |
(exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
|
1736 |
(exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
|
1737 |
(exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
|
1738 |
(exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
|
1739 |
exitAction isBlock ifTrue:[ |
|
1740 |
self exit_unwindThenDo:exitAction. |
|
1741 |
"does not return" |
|
1742 |
]. |
|
1743 |
"not reached" |
|
1744 |
^ self |
|
73 | 1745 |
]. |
1746 |
||
3447 | 1747 |
"/ stepping - window stays open |
940 | 1748 |
selectedContext := actualContext := firstContext := nil. |
73 | 1749 |
|
2472 | 1750 |
"/ restore the previous pointer grab |
73 | 1751 |
grabber notNil ifTrue:[ |
11210 | 1752 |
device grabPointerInView:grabber. |
1753 |
grabber := nil. |
|
61 | 1754 |
]. |
73 | 1755 |
|
1756 |
(exitAction == #step) ifTrue:[ |
|
11210 | 1757 |
" |
1758 |
schedule another stepInterrupt |
|
1759 |
- must enter myself into the collection of open debuggers, |
|
1760 |
in case the stepping process comes back again via a halt or signal |
|
1761 |
before the step is finished. In this case, the stepping debugger should |
|
1762 |
come up (instead of a new one) |
|
1763 |
- must flush caches since optimized methods not always |
|
1764 |
look for pending interrupts |
|
1765 |
" |
|
1766 |
||
1767 |
"/ |
|
1768 |
"/ also must care for stepping into a return |
|
1769 |
"/ |
|
1770 |
steppedContext notNil ifTrue:[ |
|
1771 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
|
1772 |
]. |
|
1773 |
||
1774 |
OpenDebuggers isNil ifTrue:[ |
|
1775 |
OpenDebuggers := WeakIdentitySet new. |
|
1776 |
]. |
|
1777 |
OpenDebuggers add:self. |
|
1778 |
||
1779 |
self label:'single stepping - please wait ...'. |
|
1780 |
stepping := true. |
|
1781 |
||
1782 |
ObjectMemory stepInterruptHandler:self. |
|
1783 |
Processor activeProcess stepInterruptHandler:self. |
|
1784 |
ObjectMemory flushCaches. |
|
1785 |
||
1786 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
|
1787 |
Context singleStepInterruptRequest |
|
1788 |
raiseWith: |
|
1789 |
(("bigStep" steppedContextLineno notNil) |
|
1790 |
ifTrue:[#next] |
|
1791 |
ifFalse:[#step]) |
|
1792 |
] ifFalse:[ |
|
1793 |
"/ see if we came here through an interrupt-action |
|
1794 |
"/ (i.e. aProcess interruptWith:...) |
|
1795 |
||
1796 |
enteredByInterrupt := false. |
|
1797 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1798 |
[enteredByInterrupt not |
|
1799 |
and:[con notNil |
|
1800 |
and:[con ~~ aContext]]] whileTrue:[ |
|
1801 |
((sel := con selector) == #timerInterrupt |
|
1802 |
or:[sel == #ioInterrupt]) ifTrue:[ |
|
1803 |
enteredByInterrupt := true. |
|
1804 |
] ifFalse:[ |
|
1805 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1806 |
]. |
|
1807 |
]. |
|
1808 |
||
1809 |
ObjectMemory flushInlineCaches. |
|
1810 |
||
1811 |
DebuggingDebugger == true ifTrue:[ |
|
1812 |
enteredByInterrupt printCR. |
|
1813 |
]. |
|
1814 |
enteredByInterrupt ifTrue:[ |
|
1815 |
"/ dont want to step through all intermediate |
|
1816 |
"/ (scheduler-) contexts; place a return-trap on the |
|
1817 |
"/ one right below the interesting one |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1818 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1819 |
"/ 'special unwind return' printCR. |
11210 | 1820 |
con unwindThenDo:[ |
1821 |
Processor activeProcess stepInterruptHandler:self. |
|
1822 |
ObjectMemory stepInterruptHandler:self. |
|
1823 |
InStepInterrupt := nil. |
|
1824 |
StepInterruptPending := 1. |
|
1825 |
InterruptPending := 1]. |
|
1826 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1827 |
"/ 'normal step return' printCR. |
11210 | 1828 |
skipLineNr ~~ #return ifTrue:[ |
1829 |
StepInterruptPending := 1. |
|
1830 |
InterruptPending := 1. |
|
1831 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1832 |
"/ 'step for return' printCR. |
11210 | 1833 |
] |
1834 |
]. |
|
1835 |
InStepInterrupt := nil |
|
1836 |
] |
|
73 | 1837 |
] ifFalse:[ |
11210 | 1838 |
OpenDebuggers notNil ifTrue:[ |
1839 |
OpenDebuggers remove:self ifAbsent:[]. |
|
1840 |
]. |
|
1841 |
self cacheMyself. |
|
73 | 1842 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1843 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1844 |
"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
|
1845 |
"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
|
1846 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
11661 | 1847 |
"Modified: / 25-07-2012 / 19:15:09 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1848 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1849 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1850 |
exit_abort |
5455 | 1851 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
1852 |
"/ that one would run on top of this context. |
|
1853 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1854 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1855 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1856 |
"/ done in the #enter:select method. |
5455 | 1857 |
"/ You are not expected to understand this. |
1858 |
||
6487 | 1859 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
1860 |
! |
|
1861 |
||
1862 |
exit_abortAll |
|
1863 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1864 |
"/ that one would run on top of this context. |
|
1865 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1866 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1867 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1868 |
"/ done in the #enter:select method. |
6487 | 1869 |
"/ You are not expected to understand this. |
1870 |
||
1871 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1872 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1873 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1874 |
exit_quickTerminate |
3447 | 1875 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1876 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1877 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1878 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 1879 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1880 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1881 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1882 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1883 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1884 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1885 |
selectedContext notNil ifTrue:[ |
11210 | 1886 |
con := selectedContext. |
1887 |
self cacheMyself. |
|
1888 |
" |
|
1889 |
have to catch errors occuring in unwind-blocks |
|
1890 |
" |
|
1891 |
Error handle:[:ex | |
|
1892 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1893 |
ex description infoPrintCR. |
|
1894 |
ex proceed |
|
1895 |
] do:[ |
|
1896 |
con unwindAndRestart. |
|
1897 |
]. |
|
1898 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1899 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1900 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1901 |
"Created: / 16.11.2001 / 17:23:17 / cg" |
3447 | 1902 |
"Modified: / 17.11.2001 / 23:37:09 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1903 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1904 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1905 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1906 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1907 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1908 |
selectedContext notNil ifTrue:[ |
11210 | 1909 |
" |
1910 |
if there is a selection in the codeView, |
|
1911 |
evaluate it and use the result as return value |
|
1912 |
" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1913 |
"/ 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
|
1914 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1915 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1916 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1917 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1918 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1919 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1920 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1921 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1922 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1923 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1924 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1925 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1926 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1927 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1928 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1929 |
|
11210 | 1930 |
con := selectedContext. |
1931 |
self cacheMyself. |
|
1932 |
" |
|
1933 |
have to catch errors occuring in unwind-blocks |
|
1934 |
" |
|
1935 |
Error handle:[:ex | |
|
1936 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1937 |
ex description infoPrintCR. |
|
1938 |
ex proceed |
|
1939 |
] do:[ |
|
1940 |
con unwind:retVal. |
|
1941 |
]. |
|
1942 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1943 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1944 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1945 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 1946 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1947 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1948 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1949 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1950 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1951 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1952 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1953 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1954 |
Error handle:[:ex | |
11210 | 1955 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1956 |
ex description infoPrintCR. |
|
1957 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1958 |
] do:[ |
11210 | 1959 |
self cacheMyself. |
1960 |
Processor activeProcess terminate. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1961 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1962 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1963 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1964 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 1965 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
1966 |
! |
|
1967 |
||
6487 | 1968 |
exit_unwindThenDo:aBlock |
1969 |
|con| |
|
1970 |
||
1971 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1972 |
"/ that one would run on top of this context. |
|
1973 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1974 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1975 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1976 |
"/ done in the #enter:select method. |
6487 | 1977 |
"/ You are not expected to understand this. |
1978 |
||
1979 |
" |
|
1980 |
have to catch errors occuring in unwind-blocks |
|
1981 |
" |
|
1982 |
self cacheMyself. |
|
1983 |
||
1984 |
Error handle:[:ex | |
|
11210 | 1985 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1986 |
ex description infoPrintCR. |
|
1987 |
||
1988 |
ex proceed |
|
6487 | 1989 |
] do:[ |
11210 | 1990 |
"/ find the enter:select context. |
1991 |
con := thisContext sender. |
|
1992 |
[ |
|
1993 |
(con selector == #enter:select:) |
|
1994 |
and:[con receiver == self] |
|
1995 |
] |
|
1996 |
whileFalse:[ con := con sender ]. |
|
1997 |
||
1998 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
1999 |
con sender receiver == self class ifTrue:[ |
|
2000 |
con := con sender. |
|
2001 |
con sender receiver == self class ifTrue:[ |
|
2002 |
con := con sender. |
|
2003 |
con isBlockContext ifTrue:[ |
|
2004 |
con := con methodHome. |
|
2005 |
] |
|
2006 |
]. |
|
2007 |
]. |
|
2008 |
||
2009 |
con unwindThenDo:aBlock. |
|
6487 | 2010 |
]. |
2011 |
'DebugView [warning]: abort failed' errorPrintCR |
|
2012 |
||
2013 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
2014 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
2015 |
! |
|
2016 |
||
3447 | 2017 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
2018 |
|selection con1 con2 h| |
|
2019 |
||
2020 |
initialSelectionOrNil notNil ifTrue:[ |
|
11210 | 2021 |
^ initialSelectionOrNil |
3447 | 2022 |
]. |
2023 |
||
2024 |
" |
|
2025 |
and find the one context to show initially |
|
2026 |
- if we came here by a send (single step), its the top context; |
|
2027 |
- if we came here by a step (i.e. bigStep), its the top context |
|
2028 |
(for ifs and whiles) or the sender (for regular sends). |
|
2029 |
- otherwise, we came here by some signal raise, and we are interested |
|
2030 |
in the context where the raise actually occured. |
|
2031 |
" |
|
2032 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
2033 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
2034 |
||
2035 |
exitAction == #step ifTrue:[ |
|
11210 | 2036 |
selection := 1. |
2037 |
steppedContext notNil ifTrue:[ |
|
2038 |
||
2039 |
" |
|
2040 |
if we came here by a big-step, show the method where we are |
|
2041 |
" |
|
2042 |
con1 == steppedContext ifTrue:[ |
|
2043 |
selection := 1 |
|
2044 |
] ifFalse:[ |
|
2045 |
con2 == steppedContext ifTrue:[ |
|
2046 |
selection := 2 |
|
2047 |
] |
|
2048 |
]. |
|
2049 |
" |
|
2050 |
for bigStep, we could also be in a block below the actual method ... |
|
2051 |
" |
|
2052 |
((h := con1 home) notNil |
|
2053 |
and:[h == steppedContext]) ifTrue:[ |
|
2054 |
selection := 1 |
|
2055 |
] ifFalse:[ |
|
2056 |
(con2 notNil |
|
2057 |
and:[(h := con2 home) notNil |
|
2058 |
and:[h == steppedContext]]) ifTrue:[ |
|
2059 |
selection := 2 |
|
2060 |
] |
|
2061 |
]. |
|
2062 |
h := nil. |
|
2063 |
] |
|
3447 | 2064 |
] ifFalse:[ |
11210 | 2065 |
steppedContext isNil ifTrue:[ |
2066 |
" |
|
2067 |
preselect a more interesting context, (where halt/raise was ...) |
|
2068 |
" |
|
2069 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
2070 |
selection := self class interestingContextIndexIn:contextArray. |
|
2071 |
selection := selection min:(contextArray size). |
|
2072 |
] ifFalse:[ |
|
2073 |
" |
|
2074 |
if we came here by a big-step, show the method where we are |
|
2075 |
" |
|
2076 |
con1 == steppedContext ifTrue:[ |
|
2077 |
selection := 1 |
|
2078 |
] ifFalse:[ |
|
2079 |
con2 == steppedContext ifTrue:[ |
|
2080 |
selection := 2. |
|
2081 |
] |
|
2082 |
] |
|
2083 |
] |
|
3447 | 2084 |
]. |
2085 |
^ selection |
|
2086 |
||
2087 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
2088 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 2089 |
! |
2090 |
||
5110 | 2091 |
isInspecting |
2092 |
^ inspecting |
|
2093 |
! |
|
2094 |
||
2095 |
isNotInspecting |
|
2096 |
^ inspecting not |
|
2097 |
! |
|
2098 |
||
73 | 2099 |
openOn:aProcess |
10205 | 2100 |
"enter the debugger on a process - |
73 | 2101 |
in this case, we are just inspecting the context chain of the process, |
2102 |
not running on top of the debugged process, but as a separate |
|
2103 |
one. (think of it as an inspector showing more detail, and offering |
|
2104 |
some more control operations)" |
|
2105 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2106 |
|bpanel dummy w| |
73 | 2107 |
|
8148 | 2108 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 2109 |
|
73 | 2110 |
busy := true. |
2111 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2112 |
stepHow := nil. |
73 | 2113 |
inspecting := true. |
2114 |
inspectedProcess := aProcess. |
|
8148 | 2115 |
nChainShown := InitialNChainShown. |
73 | 2116 |
|
2117 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2118 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2119 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2120 |
"/ get the max size & freeze button |
6647 | 2121 |
continueButton label:(resources string:'Continue'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2122 |
w := continueButton preferredWidth. |
6647 | 2123 |
continueButton label:(resources string:'Stop'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2124 |
w := w max:(continueButton preferredWidth). |
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2125 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2126 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2127 |
aProcess state == #run ifTrue:[ |
11210 | 2128 |
device hasColors ifTrue:[ |
2129 |
continueButton foregroundColor:Color red darkened. |
|
2130 |
]. |
|
2131 |
continueButton label:(resources string:'Stop'). |
|
2132 |
continueButton action:[self doStop]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2133 |
] ifFalse:[ |
11210 | 2134 |
device hasColors ifTrue:[ |
2135 |
continueButton foregroundColor:Color green darkened darkened. |
|
2136 |
]. |
|
2137 |
continueButton label:(resources string:'Continue'). |
|
2138 |
continueButton action:[self doContinue]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2139 |
]. |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2140 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
73 | 2141 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2142 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2143 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2144 |
|
92 | 2145 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 2146 |
dummy borderWidth:0; level:0. |
61 | 2147 |
|
73 | 2148 |
"/ stepButton destroy. |
2149 |
"/ sendButton destroy. |
|
2150 |
||
2151 |
updateButton := Button |
|
11210 | 2152 |
label:(resources string:'Update') |
2153 |
action:[self updateContext] |
|
2154 |
in:bpanel. |
|
73 | 2155 |
monitorToggle := Toggle in:bpanel. |
6647 | 2156 |
monitorToggle label:(resources string:'Monitor'). |
73 | 2157 |
monitorToggle pressAction:[self autoUpdateOn]. |
2158 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
2159 |
||
2160 |
"can only look into process - context chain is not active" |
|
2161 |
canContinue := true. |
|
2162 |
||
2163 |
terminateButton enable. |
|
2164 |
abortButton enable. |
|
2165 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2166 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2167 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2168 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2169 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2170 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 2171 |
|
2172 |
aProcess isNil ifTrue:[ |
|
11210 | 2173 |
terminateButton disable. |
2174 |
abortButton disable. |
|
2175 |
continueButton disable. |
|
2176 |
returnButton disable. |
|
2177 |
restartButton disable. |
|
73 | 2178 |
] ifFalse:[ |
11210 | 2179 |
(aProcess suspendedContext isNil |
2180 |
or:[aProcess isSystemProcess]) ifTrue:[ |
|
2181 |
terminateButton disable. |
|
2182 |
]. |
|
2183 |
||
2184 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
|
2185 |
||
2186 |
catchBlock := [ |
|
2187 |
catchBlock := nil. |
|
2188 |
contextArray := nil. |
|
2189 |
selectedContext := actualContext := firstContext := nil. |
|
2190 |
steppedContext := wrapperContext := nil. |
|
2191 |
||
2192 |
(exitAction == #terminate) ifTrue:[ |
|
2193 |
aProcess terminate. |
|
2194 |
]. |
|
2195 |
(exitAction == #quickTerminate) ifTrue:[ |
|
2196 |
aProcess terminateNoSignal. |
|
2197 |
]. |
|
2198 |
super destroy |
|
2199 |
]. |
|
73 | 2200 |
]. |
2201 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
2202 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2203 |
"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
|
2204 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2205 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2206 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2207 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 2208 |
|selection| |
2209 |
||
2210 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2211 |
selection notNil ifTrue:[ |
11210 | 2212 |
self showSelection:selection. |
2213 |
contextView setSelection:selection. |
|
2214 |
selection > 1 ifTrue:[ |
|
2215 |
contextView scrollToLine:(selection - 1) |
|
2216 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2217 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2218 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2219 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 2220 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2221 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2222 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2223 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2224 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2225 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2226 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2227 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2228 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2229 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2230 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2231 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2232 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2233 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 2234 |
! ! |
2235 |
||
2236 |
!DebugView methodsFor:'help'! |
|
2237 |
||
8212 | 2238 |
flyByHelpDependsOnPositionIn:aView |
2239 |
"subclasses where the help-text depends upon the pointer position might |
|
2240 |
want to redefine this" |
|
2241 |
||
2242 |
^ aView == codeView |
|
2243 |
! |
|
2244 |
||
3510 | 2245 |
flyByHelpTextFor:aComponent |
2246 |
|s| |
|
2247 |
||
2248 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2249 |
s := 'Abort (unwind to eventLoop)' |
3510 | 2250 |
]. |
2251 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2252 |
s := 'Terminate process (close view)' |
3510 | 2253 |
]. |
2254 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2255 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2256 |
s := 'Stop' |
|
2257 |
] ifFalse:[ |
|
2258 |
s := 'Continue execution' |
|
2259 |
] |
|
3510 | 2260 |
]. |
2261 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2262 |
s := 'Step to next send (don''t enter into called methods)' |
3510 | 2263 |
]. |
2264 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2265 |
s := 'Step to next line (don''t enter into called methods)' |
3510 | 2266 |
]. |
2267 |
aComponent == nextOverButton ifTrue:[ |
|
11210 | 2268 |
s := 'Step over to cursor-line' |
3510 | 2269 |
]. |
2270 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2271 |
s := 'Step out to caller' |
3510 | 2272 |
]. |
2273 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2274 |
s := 'Send next message (enter into called methods)' |
3510 | 2275 |
]. |
2276 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2277 |
s := 'Return from selected method' |
3510 | 2278 |
]. |
2279 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2280 |
s := 'Restart selected method' |
3510 | 2281 |
]. |
2282 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2283 |
s := 'Toggle monitoring' |
3510 | 2284 |
]. |
2285 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2286 |
s := 'Update' |
3510 | 2287 |
]. |
8656 | 2288 |
aComponent == reportButton ifTrue:[ |
11210 | 2289 |
s := 'Send a defect report via eMail' |
8656 | 2290 |
]. |
3510 | 2291 |
s notNil ifTrue:[ |
11210 | 2292 |
^ resources string:s |
3510 | 2293 |
]. |
2294 |
^ nil |
|
2295 |
||
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2296 |
"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
|
2297 |
"Modified: / 18-06-2010 / 11:34:51 / cg" |
3510 | 2298 |
! |
2299 |
||
8212 | 2300 |
flyByHelpTextFor:aComponent at:aPointOrNil |
8396 | 2301 |
|s vline line col pos interval| |
8212 | 2302 |
|
2303 |
aComponent == codeView ifFalse:[^ nil]. |
|
2304 |
aPointOrNil isNil ifTrue:[^ nil]. |
|
9446 | 2305 |
self sensor motionEventPending ifTrue:[^ nil]. |
8212 | 2306 |
|
8396 | 2307 |
vline := codeView visibleLineOfY:aPointOrNil y. |
2308 |
col := codeView colOfX:aPointOrNil x inVisibleLine:vline. |
|
2309 |
line := codeView visibleLineToAbsoluteLine:vline. |
|
8212 | 2310 |
|
2311 |
pos := codeView characterPositionOfLine:line col:col. |
|
2312 |
interval := pos to:pos. |
|
2313 |
||
10205 | 2314 |
self |
11210 | 2315 |
withNodeValueAtInterval:interval |
2316 |
do:[:value :description | |
|
2317 |
|valueClassOrSizeString valueString| |
|
2318 |
||
2319 |
valueClassOrSizeString := valueString := ''. |
|
2320 |
||
2321 |
"/ some heuristics as when to show the class name (a purely subjective preference) |
|
2322 |
value isString ifTrue:[ |
|
2323 |
value isText ifTrue:[ |
|
2324 |
valueString := '"',(value contractTo:80),'"'. |
|
2325 |
] ifFalse:[ |
|
2326 |
valueString := value storeString contractTo:80. |
|
2327 |
]. |
|
2328 |
] ifFalse:[ |
|
2329 |
(value isBoolean |
|
2330 |
or:[ value isInteger |
|
2331 |
or:[ value isSymbol ]]) ifTrue:[ |
|
2332 |
valueString := value printString. |
|
2333 |
] ifFalse:[ |
|
2334 |
valueClassOrSizeString := ' (',value class name,')'. |
|
2335 |
||
2336 |
(value isArray |
|
2337 |
or:[ value isOrderedCollection ]) ifTrue:[ |
|
2338 |
valueClassOrSizeString := ' (size=',value size printString,')'. |
|
2339 |
]. |
|
2340 |
||
2341 |
Error handle:[:ex | |
|
2342 |
valueString := '??? (',ex description,')' |
|
2343 |
] do:[ |
|
2344 |
[ |
|
2345 |
valueString := value printString contractTo:80. |
|
2346 |
] valueWithWatchDog:[ valueString := value classNameWithArticle ] afterMilliseconds:30. |
|
2347 |
] |
|
2348 |
] |
|
2349 |
]. |
|
2350 |
description isEmptyOrNil ifTrue:[ |
|
2351 |
s := valueString , valueClassOrSizeString |
|
2352 |
] ifFalse:[ |
|
2353 |
s := description , ': ', valueString, valueClassOrSizeString |
|
2354 |
]. |
|
2355 |
]. |
|
8592 | 2356 |
"/ Transcript showCR:s. |
2357 |
^ s |
|
9446 | 2358 |
|
2359 |
"Modified: / 27-04-2010 / 17:51:53 / cg" |
|
8212 | 2360 |
! |
2361 |
||
266 | 2362 |
helpTextFor:aComponent |
2363 |
|s| |
|
2364 |
||
2365 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2366 |
s := 'HELP_ABORT' |
266 | 2367 |
]. |
2368 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2369 |
s := 'HELP_TERMINATE' |
266 | 2370 |
]. |
2371 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2372 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2373 |
s := 'HELP_STOP' |
|
2374 |
] ifFalse:[ |
|
2375 |
s := 'HELP_CONTINUE' |
|
2376 |
] |
|
266 | 2377 |
]. |
2378 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2379 |
s := 'HELP_STEP' |
266 | 2380 |
]. |
2381 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2382 |
s := 'HELP_NEXT' |
266 | 2383 |
]. |
1065 | 2384 |
aComponent == nextOverButton ifTrue:[ |
11210 | 2385 |
s := 'HELP_NEXTOVER' |
1065 | 2386 |
]. |
2387 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2388 |
s := 'HELP_NEXTOUT' |
1065 | 2389 |
]. |
266 | 2390 |
aComponent == stepButton ifTrue:[ |
11210 | 2391 |
s := 'HELP_STEP' |
266 | 2392 |
]. |
2393 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2394 |
s := 'HELP_SEND' |
266 | 2395 |
]. |
2396 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2397 |
s := 'HELP_RETURN' |
266 | 2398 |
]. |
2399 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2400 |
s := 'HELP_RESTART' |
266 | 2401 |
]. |
2402 |
aComponent == contextView ifTrue:[ |
|
11210 | 2403 |
s := 'HELP_WALKBACK' |
266 | 2404 |
]. |
2405 |
aComponent == codeView ifTrue:[ |
|
11210 | 2406 |
s := 'HELP_CODEVIEW' |
266 | 2407 |
]. |
2408 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2409 |
s := 'HELP_MONITOR' |
266 | 2410 |
]. |
2411 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2412 |
s := 'HELP_UPDATE' |
266 | 2413 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2414 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2415 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2416 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2417 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
11210 | 2418 |
s := 'HELP_REC_INSP' |
266 | 2419 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2420 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
11210 | 2421 |
s := 'HELP_CON_INSP' |
266 | 2422 |
]. |
2423 |
||
2424 |
s notNil ifTrue:[ |
|
11210 | 2425 |
^ resources string:s |
266 | 2426 |
]. |
2427 |
^ nil |
|
2428 |
||
2429 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 2430 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 2431 |
! ! |
2432 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2433 |
!DebugView methodsFor:'initialization & release'! |
266 | 2434 |
|
2435 |
addToCurrentProject |
|
2436 |
"ignored here" |
|
2437 |
||
2438 |
^ self |
|
2439 |
! |
|
2440 |
||
2115 | 2441 |
destroy |
2442 |
"closing the debugger implies an abort or continue" |
|
2443 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2444 |
self destroyWithConfirmation:true |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2445 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2446 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2447 |
"Modified: / 23-03-2012 / 12:50:01 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2448 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2449 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2450 |
destroyWithConfirmation:withConfirmation |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2451 |
"closing the debugger implies an abort or continue" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2452 |
|
2404 | 2453 |
|m| |
2454 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2455 |
withConfirmation ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2456 |
self checkIfCodeIsReallyModified ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2457 |
(self confirm:('Code modified - exit anyway ?')) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2458 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2459 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2460 |
] |
11210 | 2461 |
] |
2115 | 2462 |
]. |
2463 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2464 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2465 |
|
2404 | 2466 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 2467 |
inspecting ifFalse:[ |
11210 | 2468 |
"I am running on top of a process, abort or continue it" |
2469 |
||
2470 |
windowGroup notNil ifTrue:[ |
|
2471 |
windowGroup setProcess:nil. |
|
2472 |
]. |
|
2473 |
self uncacheMyself. |
|
2474 |
||
2475 |
"/ |
|
2476 |
"/ catch invalid return; |
|
2477 |
"/ this happens, when my process has somehow died (quickterminate) |
|
2478 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
2479 |
"/ #destroy-window function. |
|
2480 |
"/ |
|
2481 |
Context cannotReturnSignal handle:[:ex | |
|
2482 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
|
2483 |
self uncacheMyself. |
|
2484 |
Debugger newDebugger. |
|
2485 |
ex return. |
|
2486 |
] do:[ |
|
2487 |
AbortOperationRequest isHandled ifTrue:[ |
|
2488 |
self doAbort. |
|
2489 |
] ifFalse:[ |
|
2490 |
self doContinue |
|
2491 |
] |
|
2492 |
]. |
|
2493 |
"/ We don't reach this point normally |
|
2494 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
2115 | 2495 |
]. |
2496 |
||
2299 | 2497 |
Debugger newDebugger. |
2115 | 2498 |
"/ since I am going to be destroyed, remove me from the cache |
2499 |
self uncacheMyself. |
|
2500 |
super destroy. |
|
2501 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2502 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2503 |
"Created: / 23-03-2012 / 12:49:50 / cg" |
2115 | 2504 |
! |
2505 |
||
266 | 2506 |
initialize |
10205 | 2507 |
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel |
11305 | 2508 |
newLayout v exceptionAndTogglePanel codeToggleLabels| |
266 | 2509 |
|
2510 |
super initialize. |
|
2511 |
||
2340 | 2512 |
font := font onDevice:device. |
266 | 2513 |
|
11573 | 2514 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger ? false. |
2515 |
hideSupportCode := UserPreferences current hideSupportCodeInDebugger ? true. |
|
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
2516 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
11210 | 2517 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2518 |
|
266 | 2519 |
busy := false. |
2520 |
exclusive := false. |
|
2521 |
inspecting := false. |
|
2522 |
exitAction := nil. |
|
2523 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2524 |
stepHow := nil. |
266 | 2525 |
canContinue := false. |
2526 |
||
3269 | 2527 |
mH := 0. |
2528 |
||
3447 | 2529 |
menuPanel := MenuPanel in:self. |
8131 | 2530 |
menuPanel receiver:self. |
3447 | 2531 |
menuPanel verticalLayout:false. |
8131 | 2532 |
menu := self class menuSpec decodeAsLiteralArray. |
2533 |
menu findGuiResourcesIn:self. |
|
2534 |
menuPanel menu:menu. |
|
3447 | 2535 |
|
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2536 |
mH := menuPanel preferredHeight. |
3447 | 2537 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
2538 |
||
8148 | 2539 |
newLayout := UserPreferences current useNewLayoutInDebugger. |
2540 |
newLayout ifFalse:[ |
|
11210 | 2541 |
bpanel := HorizontalPanelView in:self. |
2542 |
||
2543 |
self initializeButtonsIn:bpanel. |
|
2544 |
||
2545 |
bH := bpanel preferredHeight + 5. |
|
2546 |
bpanel origin:(0.0 @ mH) |
|
2547 |
extent:(1.0 @ bH). |
|
2548 |
panel := VariableVerticalPanel |
|
2549 |
origin:(0.0 @ (mH + bH)) |
|
2550 |
corner:(1.0 @ 1.0) |
|
2551 |
in:self. |
|
2552 |
||
2553 |
v := self initializeContextListViewIn:panel. |
|
2554 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2555 |
||
2556 |
codePanel := View in:panel. |
|
2557 |
v := self initializeCodeViewIn:codePanel. |
|
2558 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
2559 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2560 |
||
2561 |
v := self initializeInspectorViewsIn:panel. |
|
2562 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2563 |
|
8148 | 2564 |
] ifTrue:[ |
11210 | 2565 |
bpanel1 := HorizontalPanelView in:self. |
2566 |
self initializeButtons1In:bpanel1. |
|
2567 |
||
2568 |
bH1 := bpanel1 preferredHeight + 5. |
|
2569 |
bpanel1 origin:(0.0 @ mH) |
|
2570 |
extent:(1.0 @ bH1). |
|
2571 |
panel := VariableVerticalPanel |
|
2572 |
origin:(0.0 @ (mH + bH1)) |
|
2573 |
corner:(1.0 @ 1.0) |
|
2574 |
in:self. |
|
2575 |
"/ panel showHandle:true. |
|
2576 |
"/ panel handlePosition:#left. |
|
2577 |
||
2578 |
v := self initializeContextListViewIn:panel. |
|
2579 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2580 |
||
2581 |
codePanel := View in:panel. |
|
2582 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
2583 |
self initializeButtons2In:bpanel2. |
|
2584 |
||
2585 |
bH2 := bpanel2 preferredHeight + 5. |
|
2586 |
bpanel2 origin:(0.0 @ 0.0) |
|
2587 |
extent:(1.0 @ bH2). |
|
2588 |
||
2589 |
exceptionInfoLabel := Label label:''. |
|
2590 |
exceptionInfoLabel adjust:#left. |
|
2591 |
||
2592 |
exceptionAndTogglePanel := HorizontalPanelView in:codePanel. |
|
2593 |
exceptionAndTogglePanel horizontalLayout:#left. |
|
2594 |
exceptionAndTogglePanel |
|
2595 |
geometryLayout: |
|
2596 |
((LayoutFrame |
|
2597 |
origin:(0.0 @ 0.0) |
|
2598 |
corner:(1.0 @ 0.0)) |
|
2599 |
topOffset:bH2; |
|
2600 |
bottomOffset:(bH2 + exceptionInfoLabel preferredHeight + 6); |
|
2601 |
rightOffset:-2). |
|
2602 |
||
2603 |
methodCodeToggleSelectionHolder := 1 asValue. |
|
2604 |
methodCodeToggleSelectionHolder onChangeSend:#methodCodeToggleChanged to:self. |
|
11305 | 2605 |
codeToggleLabels := resources array:{ |
2606 |
'Showing Original Code (being executed, but obsolete)' asText backgroundColorizeAllWith:Color red lightened . |
|
2607 |
'Showing Current Code' asText backgroundColorizeAllWith:Color green lightened . |
|
2608 |
}. |
|
2609 |
methodCodeToggle := PopUpList label:codeToggleLabels first in:exceptionAndTogglePanel. |
|
2610 |
methodCodeToggle list:codeToggleLabels. |
|
11210 | 2611 |
methodCodeToggle useIndex:true. |
2612 |
methodCodeToggle model:methodCodeToggleSelectionHolder. |
|
2613 |
methodCodeToggle beInvisible. |
|
2614 |
||
2615 |
exceptionAndTogglePanel add:exceptionInfoLabel. |
|
2616 |
||
2617 |
v := self initializeCodeViewIn:codePanel. |
|
2618 |
v origin:(0.0 @ (bH2+exceptionInfoLabel preferredHeight+6)) corner:(1.0 @ 1.0). |
|
2619 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2620 |
||
2621 |
v := self initializeInspectorViewsIn:panel. |
|
2622 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2623 |
]. |
2624 |
||
3387 | 2625 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
11210 | 2626 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2627 |
]. |
9626 | 2628 |
LastExtent notNil ifTrue:[ |
11210 | 2629 |
self extent:LastExtent. |
9626 | 2630 |
]. |
2631 |
LastOrigin notNil ifTrue:[ |
|
11210 | 2632 |
self origin:LastOrigin. |
9626 | 2633 |
]. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2634 |
|
3269 | 2635 |
" |
2636 |
Debugger newDebugger |
|
2637 |
" |
|
3447 | 2638 |
|
11573 | 2639 |
"Modified: / 10-06-2012 / 21:27:13 / cg" |
3269 | 2640 |
! |
2641 |
||
10205 | 2642 |
initializeAbortButtonIn:bpanel |
2643 |
abortButton := Button |
|
11210 | 2644 |
label:(resources string:'Abort') |
2645 |
action:[ |
|
2646 |
abortButton turnOffWithoutRedraw. |
|
2647 |
self doAbort |
|
2648 |
] |
|
2649 |
in:bpanel. |
|
3447 | 2650 |
|
2651 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2652 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2653 |
! |
|
2654 |
||
10205 | 2655 |
initializeButtons1In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2656 |
"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
|
2657 |
|
3447 | 2658 |
|separator| |
2659 |
||
10205 | 2660 |
bpanel horizontalLayout:#left. |
3447 | 2661 |
bpanel verticalLayout:#centerMax. |
2662 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2663 |
||
8194 | 2664 |
self initializeContinueButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2665 |
continueButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2666 |
|
9131 | 2667 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
2668 |
"/ separator borderWidth:0; level:0. |
|
3447 | 2669 |
self initializeAbortButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2670 |
abortButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2671 |
|
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2672 |
separator := View extent:(100 @ 5) in:bpanel. |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2673 |
separator borderWidth:0; level:0. |
3269 | 2674 |
|
3447 | 2675 |
self initializeTerminateButtonIn:bpanel. |
2676 |
||
9131 | 2677 |
separator := View extent:(50 @ 5) in:bpanel. |
3447 | 2678 |
separator borderWidth:0; level:0. |
2679 |
||
2680 |
self initializeDefineButtonIn:bpanel. |
|
4356 | 2681 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2682 |
separator := View extent:(10 @ 5) in:bpanel. |
2683 |
separator borderWidth:0; level:0. |
|
2684 |
self initializeReportButtonIn:bpanel. |
|
4356 | 2685 |
]. |
3447 | 2686 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2687 |
! |
2688 |
||
10205 | 2689 |
initializeButtons2In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2690 |
"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
|
2691 |
|
3269 | 2692 |
|separator| |
2693 |
||
9131 | 2694 |
bpanel horizontalLayout:#left. |
3269 | 2695 |
bpanel verticalLayout:#centerMax. |
2696 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2697 |
||
3447 | 2698 |
self initializeNextButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2699 |
nextButton width:100. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2700 |
|
3447 | 2701 |
self initializeStepButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2702 |
stepButton width:100. |
3447 | 2703 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2704 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2705 |
"/ 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
|
2706 |
"/ 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
|
2707 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2708 |
|
3269 | 2709 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2710 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2711 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2712 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2713 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2714 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2715 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2716 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2717 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2718 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2719 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2720 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2721 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2722 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2723 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2724 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2725 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2726 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2727 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2728 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2729 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2730 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2731 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2732 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2733 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2734 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2735 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2736 |
|
3447 | 2737 |
self initializeSendButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2738 |
sendButton width:100. |
3447 | 2739 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2740 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2741 |
separator borderWidth:0; level:0. |
3269 | 2742 |
|
3447 | 2743 |
self initializeReturnButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2744 |
returnButton width:100. |
3447 | 2745 |
self initializeRestartButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2746 |
restartButton width:100. |
3447 | 2747 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2748 |
"Modified: / 18-06-2010 / 08:32:05 / cg" |
3269 | 2749 |
! |
2750 |
||
10205 | 2751 |
initializeButtonsIn:bpanel |
3269 | 2752 |
|separator| |
2753 |
||
2754 |
bpanel horizontalLayout:#left. |
|
2755 |
bpanel verticalLayout:#centerMax. |
|
2756 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2757 |
||
3447 | 2758 |
self initializeAbortButtonIn:bpanel. |
2759 |
||
3269 | 2760 |
separator := View extent:(10 @ 5) in:bpanel. |
2761 |
separator borderWidth:0; level:0. |
|
2762 |
||
3447 | 2763 |
self initializeContinueButtonIn:bpanel. |
3269 | 2764 |
|
2765 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2766 |
separator borderWidth:0; level:0. |
|
2767 |
||
10205 | 2768 |
self initializeReturnButtonIn:bpanel. |
2769 |
self initializeRestartButtonIn:bpanel. |
|
3269 | 2770 |
|
2771 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2772 |
separator borderWidth:0; level:0. |
|
2773 |
||
3447 | 2774 |
self initializeNextButtonIn:bpanel. |
2775 |
self initializeStepButtonIn:bpanel. |
|
2776 |
||
3269 | 2777 |
"/ cg: |
2778 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2779 |
"/ they do not work relyable with inlined blocks yet. |
|
2780 |
"/ |
|
2781 |
||
2782 |
||
2783 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
2784 |
"/ img isNil ifTrue:[ |
|
2785 |
"/ img := (resources at:'next') |
|
2786 |
"/ ]. |
|
2787 |
"/ nextButton := Button |
|
2788 |
"/ label:img |
|
2789 |
"/ action:[stepButton turnOff. self doNext] |
|
2790 |
"/ in:bpanel. |
|
2791 |
"/ |
|
2792 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
2793 |
"/ img isNil ifTrue:[ |
|
2794 |
"/ img := (resources at:'over') |
|
2795 |
"/ ]. |
|
2796 |
"/ nextOverButton := Button |
|
2797 |
"/ label:img |
|
2798 |
"/ action:[stepButton turnOff. self doNextOver] |
|
2799 |
"/ in:bpanel. |
|
2800 |
"/ |
|
2801 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
2802 |
"/ img isNil ifTrue:[ |
|
2803 |
"/ img := (resources at:'out') |
|
2804 |
"/ ]. |
|
2805 |
"/ nextOutButton := Button |
|
2806 |
"/ label:img |
|
2807 |
"/ action:[stepButton turnOff. self doNextOut] |
|
2808 |
"/ in:bpanel. |
|
2809 |
||
3447 | 2810 |
self initializeSendButtonIn:bpanel. |
2811 |
||
3187 | 2812 |
separator := View extent:(30 @ 5) in:bpanel. |
2813 |
separator borderWidth:0; level:0. |
|
3269 | 2814 |
|
3447 | 2815 |
self initializeTerminateButtonIn:bpanel. |
2816 |
||
3269 | 2817 |
separator := View extent:(30 @ 5) in:bpanel. |
2818 |
separator borderWidth:0; level:0. |
|
2819 |
||
3447 | 2820 |
self initializeDefineButtonIn:bpanel. |
4356 | 2821 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2822 |
self initializeReportButtonIn:bpanel. |
4356 | 2823 |
]. |
2824 |
||
3447 | 2825 |
|
2826 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
2827 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 2828 |
! |
2829 |
||
2830 |
initializeCodeViewIn:panel |
|
2831 |
|v| |
|
2832 |
||
10628 | 2833 |
(UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
2834 |
v := codeView := Tools::CodeView2 in: panel. |
|
2835 |
codeView model: ValueHolder new. |
|
2836 |
codeView methodHolder: ValueHolder new. |
|
2837 |
codeView classHolder: ValueHolder new. |
|
2838 |
] ifFalse:[ |
|
2839 |
v := HVScrollableView |
|
2840 |
for:CodeView |
|
2841 |
miniScrollerH:true |
|
2842 |
miniScrollerV:false |
|
2843 |
in:panel. |
|
2844 |
||
2845 |
"/ v autoHideScrollBars:true. |
|
2846 |
codeView := v scrolledView. |
|
2847 |
codeView enableMotionEvents. "/ for active help |
|
2848 |
]. |
|
3269 | 2849 |
|
2850 |
^ v |
|
10628 | 2851 |
|
2852 |
"Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3269 | 2853 |
! |
2854 |
||
2855 |
initializeContextListViewIn:panel |
|
2856 |
|v| |
|
266 | 2857 |
|
10205 | 2858 |
v := HVScrollableView |
11210 | 2859 |
for:SelectionInListView |
2860 |
miniScrollerH:true |
|
2861 |
miniScrollerV:false |
|
2862 |
in:panel. |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2863 |
v autoHideHorizontalScrollBar:true. |
266 | 2864 |
|
2865 |
contextView := v scrolledView. |
|
2866 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 2867 |
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
|
2868 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 2869 |
|
10205 | 2870 |
contextView middleButtonMenu:(self middleButtonMenu). |
5453 | 2871 |
|
3269 | 2872 |
^ v |
2873 |
! |
|
2874 |
||
5453 | 2875 |
initializeContextViewsMiddleButtonMenu |
2876 |
<resource: #programMenu > |
|
2877 |
||
10205 | 2878 |
contextView middleButtonMenu:(self middleButtonMenu). |
2879 |
! |
|
2880 |
||
2881 |
initializeContinueButtonIn:bpanel |
|
2882 |
continueButton := Button |
|
11210 | 2883 |
label:(resources string:'Continue') |
2884 |
action:[ |
|
2885 |
continueButton turnOffWithoutRedraw. |
|
2886 |
self doContinue |
|
2887 |
] |
|
2888 |
in:bpanel. |
|
3447 | 2889 |
|
2890 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
2891 |
! |
|
2892 |
||
10205 | 2893 |
initializeDefineButtonIn:bpanel |
2894 |
defineButton := Button |
|
11210 | 2895 |
label:(resources string:'Define') |
2896 |
action:[ |
|
2897 |
defineButton turnOffWithoutRedraw. |
|
2898 |
self doDefine |
|
2899 |
] |
|
2900 |
in:bpanel. |
|
3447 | 2901 |
defineButton beInvisible |
2902 |
||
2903 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
2904 |
! |
|
2905 |
||
3269 | 2906 |
initializeInspectorViewsIn:panel |
2907 |
|hpanel| |
|
266 | 2908 |
|
2909 |
hpanel := VariableHorizontalPanel in:panel. |
|
2910 |
||
2911 |
receiverInspector := InspectorView |
|
11210 | 2912 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
2913 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2914 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 2915 |
|
2916 |
contextInspector := ContextInspectorView |
|
11210 | 2917 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
2918 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2919 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2920 |
|
3269 | 2921 |
^ hpanel |
266 | 2922 |
! |
2923 |
||
10205 | 2924 |
initializeNextButtonIn:bpanel |
2925 |
nextButton := Button |
|
11210 | 2926 |
label:(resources string:'Debug_Next') |
2927 |
action:[ |
|
2928 |
stepButton turnOff. |
|
2929 |
self doNext |
|
2930 |
] |
|
2931 |
in:bpanel. |
|
3447 | 2932 |
|
2933 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
2934 |
! |
|
2935 |
||
10205 | 2936 |
initializeReportButtonIn:bpanel |
2937 |
reportButton := Button |
|
11210 | 2938 |
label:(resources string:'Report by Mail...') |
2939 |
action:[ |
|
2940 |
reportButton turnOffWithoutRedraw. |
|
2941 |
self doOpenReportMailApp. |
|
2942 |
] |
|
2943 |
in:bpanel. |
|
4356 | 2944 |
|
2945 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
2946 |
! |
|
2947 |
||
10205 | 2948 |
initializeRestartButtonIn:bpanel |
2949 |
restartButton := Button |
|
11210 | 2950 |
label:(resources string:'Restart') |
2951 |
action:[ |
|
2952 |
restartButton turnOff. |
|
2953 |
self doRestart |
|
2954 |
] |
|
2955 |
in:bpanel. |
|
3447 | 2956 |
|
2957 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
2958 |
! |
|
2959 |
||
10205 | 2960 |
initializeReturnButtonIn:bpanel |
2961 |
returnButton := Button |
|
11210 | 2962 |
label:(resources string:'Return') |
2963 |
action:[ |
|
2964 |
returnButton turnOff. |
|
2965 |
self doReturn |
|
2966 |
] |
|
2967 |
in:bpanel. |
|
3447 | 2968 |
|
2969 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
2970 |
! |
|
2971 |
||
10205 | 2972 |
initializeSendButtonIn:bpanel |
2973 |
sendButton := Button |
|
11210 | 2974 |
label:(resources string:'Send') |
2975 |
action:[ |
|
2976 |
sendButton turnOff. |
|
2977 |
self doSend |
|
2978 |
] |
|
2979 |
in:bpanel. |
|
3447 | 2980 |
|
2981 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
2982 |
! |
|
2983 |
||
10205 | 2984 |
initializeStepButtonIn:bpanel |
2985 |
stepButton := Button |
|
11210 | 2986 |
label:(resources string:'Debug_Step') |
2987 |
action:[ |
|
2988 |
stepButton turnOff. |
|
2989 |
self doStep |
|
2990 |
] |
|
2991 |
in:bpanel. |
|
3447 | 2992 |
|
2993 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
2994 |
! |
|
2995 |
||
10205 | 2996 |
initializeTerminateButtonIn:bpanel |
2997 |
terminateButton := Button |
|
11210 | 2998 |
label:(resources string:'Debug_Terminate') |
2999 |
action:[ |
|
3000 |
terminateButton turnOffWithoutRedraw. |
|
3001 |
self doTerminate |
|
3002 |
] |
|
3003 |
in:bpanel. |
|
3447 | 3004 |
|
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3005 |
terminateButton backgroundColor:Color red lightened. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3006 |
"/ terminateButton foregroundColor:Color red. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3007 |
|
3447 | 3008 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
266 | 3009 |
! |
3010 |
||
1249 | 3011 |
postRealize |
3012 |
super postRealize. |
|
266 | 3013 |
|
3014 |
inspecting ifTrue:[ |
|
11210 | 3015 |
inspectedProcess notNil ifTrue:[ |
3016 |
" |
|
3017 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
3018 |
to run between mine and the debugged processes prio) |
|
3019 |
" |
|
3020 |
Processor activeProcess |
|
3021 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
|
3022 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3023 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3024 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3025 |
self sensor addEventListener:self. |
1249 | 3026 |
|
3027 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 3028 |
! |
3029 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3030 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3031 |
"/ 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
|
3032 |
"/ 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
|
3033 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3034 |
drawableId notNil ifTrue:[ |
11210 | 3035 |
^ self |
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3036 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3037 |
"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
|
3038 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3039 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3040 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3041 |
|
266 | 3042 |
setLabelFor:aMessage in:aProcess |
9403 | 3043 |
|l lines processNameOrNil pidOrNil osPidString| |
6821 | 3044 |
|
3045 |
lines := aMessage asStringCollection. |
|
3046 |
lines size > 1 ifTrue:[ |
|
11210 | 3047 |
l := lines first |
6821 | 3048 |
] ifFalse:[ |
11210 | 3049 |
l := aMessage. |
6821 | 3050 |
]. |
3051 |
||
3052 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
3053 |
Error handle:[:ex | |
11210 | 3054 |
l := l , '???' |
1030 | 3055 |
] do:[ |
11210 | 3056 |
processNameOrNil := aProcess name. |
3057 |
processNameOrNil notNil ifTrue:[ |
|
3058 |
l := l , (processNameOrNil contractTo:20) , ''. |
|
3059 |
]. |
|
3060 |
pidOrNil := aProcess id printString. |
|
3061 |
l := l , '[' , pidOrNil , ']'. |
|
73 | 3062 |
]. |
1030 | 3063 |
l := l , ')'. |
266 | 3064 |
self label:l. |
6821 | 3065 |
|
10205 | 3066 |
((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
11210 | 3067 |
osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
9403 | 3068 |
]. |
3069 |
||
8305 | 3070 |
exceptionInfoLabel notNil ifTrue:[ |
11210 | 3071 |
exceptionInfoLabel |
3072 |
label:(resources |
|
3073 |
string:'Exception: %1 in process %2 [%3]%4' |
|
3074 |
with:(lines first colorizeAllWith:Color red) |
|
3075 |
with:(processNameOrNil ? '') |
|
3076 |
with:(pidOrNil ? '') |
|
3077 |
with:(osPidString ? '')) |
|
8305 | 3078 |
]. |
3079 |
||
6821 | 3080 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
0 | 3081 |
! ! |
3082 |
||
3083 |
!DebugView methodsFor:'interrupt handling'! |
|
3084 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3085 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3086 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3087 |
'contextIRQ' printCR. |
3088 |
thisContext sender fullPrint. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3089 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3090 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3091 |
|
1364 | 3092 |
"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
|
3093 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3094 |
|
0 | 3095 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3096 |
DebuggingDebugger == true ifTrue:[ |
11636 | 3097 |
'stepIRQ' print. |
3098 |
"/ ' in ' print. thisContext sender fullPrint. |
|
3099 |
'' printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3100 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3101 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3102 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3103 |
|
11636 | 3104 |
"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
|
3105 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3106 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3107 |
stepOrNext |
11636 | 3108 |
|where here con s isWrap method wrappedMethod |
3109 |
originalMethodOfWrappedMethod originalMethodsContext |
|
3110 |
inBlock subBlockLeft ignore contextBelow wrapContext |
|
10205 | 3111 |
leftWrap enteredWrap anyStepBlocks |
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3112 |
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
|
3113 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3114 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3115 |
"/ DebuggingDebugger := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3116 |
"/ DebuggingDebugger2 := true |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3117 |
"/ DebuggingDebugger2 := false |
11636 | 3118 |
"/ DebuggingDebugger3 := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3119 |
"/ '' printCR |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3120 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3121 |
processName := (Processor activeProcess nameOrId),' [',Processor activeProcess id printString,']'. |
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3122 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3123 |
skipLineNr == #return ifTrue:[ |
11210 | 3124 |
self label:('stepping context returned ' , ' (process: ' , processName , ')'). |
3125 |
here := thisContext sender sender. |
|
3126 |
here setLineNumber:nil. |
|
3127 |
here := nil. |
|
3128 |
con := thisContext sender sender sender. |
|
3129 |
||
3130 |
HaltInterrupt handle:[:ex | |
|
3131 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [stepOrNext]' bindWith:ex suspendedContext) infoPrintCR. |
|
3132 |
ex proceed |
|
3133 |
] do:[ |
|
3134 |
self enter:con select:nil. |
|
3135 |
]. |
|
3136 |
con := nil. |
|
3137 |
^ self |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3138 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3139 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3140 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3141 |
"/ "/ 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
|
3142 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3143 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3144 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3145 |
"/ 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
|
3146 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3147 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3148 |
|
52 | 3149 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
11210 | 3150 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
3151 |
^ self |
|
52 | 3152 |
]. |
3153 |
||
29 | 3154 |
here := thisContext. "stepInterrupt" |
10205 | 3155 |
here := here sender. "the caller; step- or contextIRQ" |
3156 |
here := here sender. "the interrupted context" |
|
29 | 3157 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3158 |
DebuggingDebugger2 == true ifTrue:[ |
11636 | 3159 |
'***************************' printCR. |
11210 | 3160 |
'here in ' print. |
3161 |
inWrap ifTrue:['(wrap) ' print.]. |
|
3162 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
|
3163 |
here selector printCR. |
|
11636 | 3164 |
'stepping in ' print. |
3165 |
steppedContext notNil ifTrue:[ |
|
3166 |
((ObjectMemory addressOf:steppedContext) printStringRadix:16) print. ' ' print. |
|
3167 |
]. |
|
3168 |
steppedContext printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3169 |
]. |
10 | 3170 |
|
2581 | 3171 |
"/ kludge an bug-workaround; |
3172 |
"/ I should not see those ... |
|
3173 |
||
3174 |
here selector == #ioInterrupt ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3175 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3176 |
'oops - should not get that one' printCR. |
3177 |
]. |
|
3178 |
Processor ioInterrupt. |
|
3179 |
StepInterruptPending := 1. |
|
3180 |
InterruptPending := 1. |
|
3181 |
where := nil. here := nil. |
|
3182 |
InStepInterrupt := nil. |
|
3183 |
^ self |
|
2581 | 3184 |
]. |
3185 |
||
3186 |
stepUntilEntering notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3187 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3188 |
'check if entering ' print. stepUntilEntering printCR. |
3189 |
]. |
|
3190 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3191 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3192 |
'entering...' printCR. |
3193 |
]. |
|
3194 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , processName , ')'). |
|
3195 |
||
3196 |
lastStepUntilEntering := stepUntilEntering. |
|
3197 |
stepUntilEntering := nil. |
|
3198 |
self enter:here select:nil. |
|
3199 |
con := nil. |
|
3200 |
^ self |
|
3201 |
]. |
|
3202 |
"/ see if stepping context is still active ... |
|
3203 |
||
3204 |
con := here. |
|
3205 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3206 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3207 |
'start searching at: ' print. |
3208 |
con fullPrint. |
|
3209 |
]. |
|
3210 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
3211 |
con := con sender |
|
3212 |
]. |
|
3213 |
con notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3214 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3215 |
'steppingContext still active - continue stepping' printCR. |
3216 |
]. |
|
3217 |
con := nil. |
|
3218 |
where := nil. here := nil. |
|
3219 |
StepInterruptPending := 1. |
|
3220 |
InterruptPending := 1. |
|
3221 |
InStepInterrupt := nil. |
|
3222 |
^ self |
|
3223 |
]. |
|
3224 |
stepUntilEntering := nil. |
|
2581 | 3225 |
]. |
3226 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3227 |
" |
11636 | 3228 |
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
|
3229 |
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
|
3230 |
if so, ignore the interrupt and continue single sending. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3231 |
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
|
3232 |
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
|
3233 |
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
|
3234 |
" |
29 | 3235 |
isWrap := false. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3236 |
subBlockLeft := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3237 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3238 |
|
57 | 3239 |
inWrap ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3240 |
"/ situation1: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3241 |
"/ valueWithReceiver or other |
11636 | 3242 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3243 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3244 |
"/ situation2: |
11636 | 3245 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3246 |
"/ valueWithReceiver |
11636 | 3247 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3248 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3249 |
"/ situation3: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3250 |
"/ other |
11636 | 3251 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3252 |
"/ valueWithReceiver |
11636 | 3253 |
"/ foo (wrapped) <- wrapContext |
3254 |
"/ |
|
3255 |
"/ situation4: |
|
3256 |
"/ ... many-contexts ... (more than 8) |
|
3257 |
"/ possibly foo (original) |
|
3258 |
"/ valueWithReceiver or other |
|
3259 |
"/ foo (wrapped) |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3260 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3261 |
|
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3262 |
"/ 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
|
3263 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3264 |
8 timesRepeat:[ |
11636 | 3265 |
wrapContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3266 |
where notNil ifTrue:[ |
11636 | 3267 |
DebuggingDebugger2 ifTrue:[ |
3268 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3269 |
where printCR |
|
3270 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3271 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3272 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3273 |
(method notNil and:[method isWrapped]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3274 |
originalMethodOfWrappedMethod := method originalMethod. |
11636 | 3275 |
wrappedMethod := method. |
3276 |
wrapContext := where. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3277 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3278 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3279 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3280 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3281 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3282 |
]. |
11636 | 3283 |
DebuggingDebugger2 ifTrue:[ |
3284 |
'wrap-context is: ' print. |
|
3285 |
wrapContext notNil ifTrue:[ |
|
3286 |
((ObjectMemory addressOf:wrapContext) printStringRadix:16) print. ' ' print. |
|
3287 |
]. |
|
3288 |
wrapContext printCR |
|
3289 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3290 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3291 |
'oops no wrap?' errorPrintCR. |
11636 | 3292 |
]. |
3293 |
]. |
|
3294 |
||
3295 |
(inWrap and:[ originalMethodOfWrappedMethod notNil ]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3296 |
isWrap := false. |
11636 | 3297 |
"/ DebuggingDebugger2 ifTrue:[ '----------->' print. originalMethodOfWrappedMethod printCR ]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3298 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3299 |
8 timesRepeat:[ |
11636 | 3300 |
originalMethodsContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3301 |
where notNil ifTrue:[ |
11636 | 3302 |
DebuggingDebugger2 ifTrue:[ |
3303 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3304 |
where printCR |
|
3305 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3306 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3307 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3308 |
method == originalMethodOfWrappedMethod ifTrue:[ |
11636 | 3309 |
originalMethodsContext := here. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3310 |
where == here ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3311 |
"/ situation2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3312 |
DebuggingDebugger2 ifTrue:[ 's2' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3313 |
isWrap := true. |
11636 | 3314 |
"/ here setSender:(wrapContext sender). --- leads to a crash |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3315 |
] ifFalse: [ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3316 |
"/ situation3 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3317 |
DebuggingDebugger2 ifTrue:[ 's3' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3318 |
inWrap := false. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3319 |
isWrap := false. |
11210 | 3320 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3321 |
steppedContext := where |
11636 | 3322 |
"/ ] ifFalse:[ |
3323 |
"/ where selector == wrapContext selector ifTrue:[ |
|
3324 |
"/ where receiver == wrapContext receiver ifTrue:[ |
|
3325 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3326 |
"/ method printCR. |
|
3327 |
"/ method originalMethod printCR. |
|
3328 |
"/ originalMethodOfWrappedMethod printCR. |
|
3329 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3330 |
"/ ]. |
|
3331 |
"/ ]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3332 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3333 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3334 |
]. |
11210 | 3335 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3336 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3337 |
]. |
11636 | 3338 |
DebuggingDebugger2 ifTrue:[ |
3339 |
'original method-context is: ' print. |
|
3340 |
originalMethodsContext notNil ifTrue:[ |
|
3341 |
((ObjectMemory addressOf:originalMethodsContext) printStringRadix:16) print. ' ' print. |
|
3342 |
]. |
|
3343 |
originalMethodsContext printCR |
|
3344 |
]. |
|
3345 |
originalMethodsContext isNil ifTrue:[ |
|
3346 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
|
3347 |
"/ situation4 |
|
3348 |
DebuggingDebugger2 ifTrue:[ 's4' printCR ]. |
|
3349 |
DebuggingDebugger2 ifTrue:[ steppedContext printCR ]. |
|
3350 |
isWrap := false. |
|
3351 |
] ifFalse:[ |
|
3352 |
"/ situation1 |
|
3353 |
DebuggingDebugger2 ifTrue:[ 's1' printCR ]. |
|
3354 |
isWrap := true. |
|
3355 |
"/ steppedContext := wrapContext |
|
3356 |
]. |
|
11210 | 3357 |
]. |
29 | 3358 |
]. |
3359 |
||
3360 |
isWrap ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3361 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3362 |
'ignore wrap' printCR. |
3363 |
]. |
|
3364 |
||
3365 |
"/ |
|
3366 |
"/ ignore, while in wrappers hidden setup |
|
3367 |
"/ |
|
3368 |
where := nil. here := nil. |
|
3369 |
ObjectMemory flushInlineCaches. |
|
3370 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3371 |
DebuggingDebugger2 == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3372 |
skipLineNr == #return ifTrue:[ |
11210 | 3373 |
'skipRet in wrap' printCR. |
3374 |
] |
|
3375 |
]. |
|
3376 |
||
3377 |
StepInterruptPending := 1. |
|
3378 |
InterruptPending := 1. |
|
3379 |
InStepInterrupt := nil. |
|
3380 |
^ self |
|
29 | 3381 |
]. |
3382 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3383 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 3384 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3385 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3386 |
'bigStep is: ' print. bigStep printCR. |
3387 |
'steppedContext is: ' print. steppedContext printCR. |
|
2581 | 3388 |
]. |
3389 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3390 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3391 |
"/ 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
|
3392 |
"/ |
10205 | 3393 |
(bigStep |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
3394 |
and:[steppedContext notNil]) ifTrue:[ |
11210 | 3395 |
" |
3396 |
a step or next - ignore all contexts below the interesting one |
|
3397 |
" |
|
3398 |
where := here. "the interrupted context" |
|
3399 |
contextBelow := nil. |
|
3400 |
||
3401 |
where home notNil ifTrue:[ |
|
3402 |
"/ |
|
3403 |
"/ in a block called by 'our' context ? |
|
3404 |
"/ |
|
3405 |
where home == steppedContext ifTrue:[ |
|
3055 | 3406 |
"/ '*block*' printCR. |
11210 | 3407 |
inBlock := true |
3408 |
] |
|
3409 |
]. |
|
3410 |
||
3411 |
where == steppedContext ifFalse:[ |
|
3412 |
where := where sender. |
|
3413 |
||
3414 |
where notNil ifTrue:[ |
|
3415 |
where home == steppedContext ifTrue:[ |
|
3055 | 3416 |
"/ '*block*' printCR. |
11210 | 3417 |
inBlock := true. |
3418 |
] |
|
3419 |
]. |
|
57 | 3420 |
|
3421 |
"/ 'looking for ' print. |
|
3055 | 3422 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 3423 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3424 |
"/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
|
3425 |
"/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
|
3426 |
|
11210 | 3427 |
where == steppedContext ifFalse:[ |
3428 |
||
3429 |
"/ check if we are in a context below steppedContext |
|
3430 |
"/ (i.e. if steppedContext can be reached from |
|
3431 |
"/ interrupted context. Not using context-ref but its |
|
3432 |
"/ address to avoid creation of many useless contexts.) |
|
3433 |
||
3434 |
inBlock ifFalse:[ |
|
3435 |
[where notNil] whileTrue:[ |
|
3436 |
||
3437 |
"/ if either the receiver or any arg of this context |
|
3438 |
"/ is a block of the steppedContext, we must really |
|
3439 |
"/ do a single step. Otherwise, stepping through a |
|
3440 |
"/ do:-loop would be very difficult. |
|
3441 |
receiver := where receiver. |
|
3442 |
(receiver isBlock |
|
3443 |
and:[(receiver isKindOf:Block) |
|
3444 |
and:[receiver home == steppedContext]]) |
|
3445 |
ifTrue:[ |
|
3446 |
anyStepBlocks := true. |
|
3447 |
] ifFalse:[ |
|
3448 |
where args do:[:arg | |
|
3449 |
(arg isBlock |
|
3450 |
and:[(arg isKindOf:Block) |
|
3451 |
and:[arg home == steppedContext]]) |
|
3452 |
ifTrue:[ |
|
3453 |
anyStepBlocks := true. |
|
3454 |
] |
|
3455 |
] |
|
3456 |
]. |
|
3457 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3458 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3459 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
3460 |
where selector printCR. |
|
3461 |
]. |
|
3462 |
||
3463 |
where == steppedContext ifTrue:[ |
|
3055 | 3464 |
"/ 'found it - below; ignore' printCR. |
11210 | 3465 |
" |
3466 |
found the interesting context somwehere up in the |
|
3467 |
chain. We seem to be still below the interesting one ... |
|
3468 |
" |
|
3469 |
tracing == true ifTrue:[ |
|
3470 |
here printString printCR |
|
3471 |
]. |
|
3472 |
" |
|
3473 |
yes, a context below |
|
3474 |
- continue and schedule another stepInterrupt. |
|
3475 |
Must flush caches since optimized methods not always |
|
3476 |
look for pending interrupts |
|
3477 |
" |
|
3478 |
||
3479 |
contextBelow notNil ifTrue:[ |
|
3055 | 3480 |
"/ '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
|
3481 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3482 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3483 |
"/ 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
|
3484 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3485 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3486 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3487 |
'below stepCon; continue until unwind of: ' print. |
3488 |
contextBelow printCR. |
|
3489 |
]. |
|
3490 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
|
3491 |
StepInterruptPending := nil. |
|
3492 |
] ifFalse:[ |
|
3493 |
ObjectMemory flushInlineCaches. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3494 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3495 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3496 |
"/ 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
|
3497 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3498 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3499 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3500 |
'in stepCon; continue single stepping' printCR. |
3501 |
]. |
|
3502 |
StepInterruptPending := 1. |
|
3503 |
InterruptPending := 1. |
|
3504 |
]. |
|
3505 |
where := nil. here := nil. |
|
3506 |
InStepInterrupt := nil. |
|
3507 |
||
3508 |
^ self |
|
3509 |
]. |
|
3510 |
||
3511 |
(steppedContext notNil and:[ |
|
3512 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
3513 |
inBlockBelow := true. |
|
3514 |
]. |
|
3515 |
||
3516 |
anyStepBlocks ifFalse:[ |
|
3517 |
inBlock ifFalse:[ |
|
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3518 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3519 |
"/ 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
|
3520 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3521 |
where isBlockContext ifFalse:[ |
11210 | 3522 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3523 |
]. |
11210 | 3524 |
] |
3525 |
]. |
|
3526 |
where := where sender |
|
3527 |
]. |
|
3528 |
s := 'context returned'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3529 |
subBlockLeft := true. |
11210 | 3530 |
]. |
3531 |
] ifTrue:[ |
|
3055 | 3532 |
"/ 'found it right in sender' printCR. |
11210 | 3533 |
s := 'after step' |
3534 |
]. |
|
3535 |
] ifTrue:[ |
|
3055 | 3536 |
"/ 'found it right away' printCR. |
11210 | 3537 |
s := 'after step' |
3538 |
]. |
|
0 | 3539 |
] ifFalse:[ |
3055 | 3540 |
"/ ' send' printCR. |
11210 | 3541 |
" |
3542 |
a send |
|
3543 |
" |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3544 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3545 |
'clear steppedContext' printCR. |
3546 |
]. |
|
3547 |
steppedContext := nil. |
|
3548 |
s := 'after send' |
|
0 | 3549 |
]. |
7 | 3550 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3551 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3552 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
11210 | 3553 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3554 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3555 |
|
790 | 3556 |
"/ handle the case, when a subBlock leaves; |
3557 |
"/ continue stepping in the home context. |
|
3558 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3559 |
subBlockLeft ifTrue:[ |
11210 | 3560 |
steppedContext home notNil ifTrue:[ |
3561 |
steppedContext := steppedContext home. |
|
3562 |
s := 'after step'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3563 |
subBlockLeft := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3564 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3565 |
|
11210 | 3566 |
] |
790 | 3567 |
]. |
3568 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3569 |
" |
10205 | 3570 |
kludge to hide breakpoint wrappers in the context list: |
11210 | 3571 |
check if we are in a wrapper methods hidden exit-sequence |
3572 |
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
|
3573 |
" |
10205 | 3574 |
(where isNil |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3575 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3576 |
ifTrue:[ |
11210 | 3577 |
"/ did not find our steppedContext along the chain; |
3578 |
"/ could be in a wrappedMethods exitBlock ... |
|
3579 |
||
3580 |
leftWrap ifFalse:[ |
|
3581 |
where := here. |
|
3582 |
wrappedMethod := nil. |
|
3583 |
5 timesRepeat:[ |
|
3584 |
where notNil ifTrue:[ |
|
3585 |
where isBlockContext ifFalse:[ |
|
3586 |
method := where method. |
|
3587 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3588 |
where == wrapperContext ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3589 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3590 |
'change stepCon fromWrapped: ' print. |
3591 |
steppedContext print. |
|
3592 |
' to: ' print. |
|
3593 |
wrapperContext printCR. |
|
3594 |
]. |
|
3595 |
||
3596 |
inWrap := true. |
|
3597 |
enteredWrap := true. |
|
3598 |
steppedContext := wrapperContext. |
|
3599 |
wrapperContext := nil. |
|
3600 |
] |
|
3601 |
]. |
|
3602 |
]. |
|
3603 |
where := where sender |
|
3604 |
] |
|
3605 |
]. |
|
3606 |
]. |
|
3607 |
enteredWrap ifTrue:[ |
|
3608 |
ignore := true |
|
3609 |
] |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3610 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3611 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3612 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3613 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3614 |
subBlockLeft ifTrue:[ |
11210 | 3615 |
"/ special care for stepInterrupt in send, |
3616 |
"/ when created a dummy context (lineNr == 1) |
|
3617 |
||
3618 |
steppedContext lineNumber isNil ifTrue:[ |
|
3619 |
steppedContext selector == here sender selector ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3620 |
subBlockLeft := false. |
11210 | 3621 |
s := 'after step'. |
3622 |
steppedContext := here sender. |
|
3623 |
]. |
|
3624 |
]. |
|
3625 |
oneMore := true |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3626 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3627 |
|
57 | 3628 |
inBlock ifTrue:[ |
3055 | 3629 |
"/ 'inBlock' printCR. |
11210 | 3630 |
s := 'in block'. |
57 | 3631 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3632 |
inBlockBelow ifTrue:[ |
11210 | 3633 |
ignore := true |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3634 |
]. |
57 | 3635 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3636 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3637 |
where notNil ifTrue:[ |
3638 |
'(' print. steppedContextLineno print. ') ' print. |
|
3639 |
where printCR. |
|
3640 |
]. |
|
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
3641 |
]. |
57 | 3642 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3643 |
ignore ifFalse:[ |
11210 | 3644 |
(bigStep |
3645 |
and:[steppedContextLineno notNil |
|
3646 |
and:[where notNil |
|
3647 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
|
3648 |
(here isBlockContext |
|
3649 |
and:[(here methodHome == steppedContext) |
|
3650 |
or:[here home == steppedContext]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3651 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3652 |
'same line but in block' printCR. |
3653 |
]. |
|
3654 |
||
3655 |
steppedContext := actualContext := here. |
|
3656 |
steppedContextLineno := here lineNumber. |
|
3657 |
] ifFalse:[ |
|
3658 |
"/ kludge - I only have the info for up to 255 lines |
|
3659 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3660 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3661 |
'same line - ignored' printCR. |
3662 |
]. |
|
3663 |
ignore := true |
|
3664 |
]. |
|
3665 |
]. |
|
3666 |
]. |
|
3667 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3668 |
(subBlockLeft not |
11210 | 3669 |
and:[skipLineNr notNil |
3670 |
and:[where notNil |
|
3671 |
and:[where lineNumber notNil |
|
3672 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3673 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3674 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
3675 |
]. |
|
3676 |
ignore := true |
|
3677 |
]. |
|
3678 |
||
3679 |
(steppedContextLineno isNil |
|
3680 |
and:[skipLineNr isNil |
|
3681 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3682 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3683 |
'same line2 (after conIRQ) - ignored' printCR. |
3684 |
]. |
|
3685 |
ignore := true |
|
3686 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3687 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3688 |
|
57 | 3689 |
ignore ifTrue:[ |
3055 | 3690 |
"/' ' printCR. |
11210 | 3691 |
where := nil. here := nil. |
3692 |
" |
|
3693 |
yes, a context below |
|
3694 |
- continue and schedule another stepInterrupt. |
|
3695 |
Must flush caches since optimized methods not always |
|
3696 |
look for pending interrupts |
|
3697 |
" |
|
3698 |
ObjectMemory flushInlineCaches. |
|
3699 |
StepInterruptPending := 1. |
|
3700 |
InterruptPending := 1. |
|
3701 |
InStepInterrupt := nil. |
|
3702 |
^ self |
|
57 | 3703 |
]. |
3704 |
||
3055 | 3705 |
"/ ' ' printCR. |
57 | 3706 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3707 |
self label:(s , ' (process: ' , processName , ')'). |
7 | 3708 |
|
57 | 3709 |
tracing := false. |
3710 |
bigStep := false. |
|
3711 |
||
0 | 3712 |
"release refs to context" |
3713 |
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
|
3714 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3715 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3716 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3717 |
'==> 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
|
3718 |
]. |
1364 | 3719 |
|
3720 |
initiallyShown := nil. |
|
3721 |
(oneMore == true) ifTrue:[ |
|
11210 | 3722 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
3723 |
initiallyShown := 2 |
|
3724 |
] ifFalse:[ |
|
3725 |
initiallyShown := 1 |
|
3726 |
] |
|
1364 | 3727 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3728 |
con := thisContext sender sender. |
3435 | 3729 |
|
9235 | 3730 |
HaltInterrupt handle:[:ex | |
11210 | 3731 |
'DebugView [info]: halt/breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
3732 |
ex proceed |
|
3435 | 3733 |
] do:[ |
11210 | 3734 |
self enter:con select:initiallyShown |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3735 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3736 |
con := nil |
1364 | 3737 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3738 |
"Created: / 14-10-1996 / 12:53:39 / cg" |
11636 | 3739 |
"Modified: / 20-07-2012 / 15:26:26 / cg" |
0 | 3740 |
! ! |
3741 |
||
4867 | 3742 |
!DebugView methodsFor:'menu & button actions'! |
266 | 3743 |
|
5875 | 3744 |
addBrowserBookmark |
3745 |
"add a browser-bookmark for the selected contexts method" |
|
3746 |
||
3747 |
|cls sel| |
|
3748 |
||
3749 |
selectedContext isNil ifTrue:[^ self]. |
|
3750 |
||
3751 |
cls := selectedContext receiver class. |
|
3752 |
sel := selectedContext selector. |
|
3753 |
(cls includesSelector:sel) ifFalse:[ |
|
11210 | 3754 |
sel := nil |
5875 | 3755 |
]. |
3756 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
3757 |
! |
|
3758 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3759 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3760 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3761 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3762 |
"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
|
3763 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3764 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3765 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3766 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3767 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3768 |
"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
|
3769 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3770 |
|
266 | 3771 |
autoUpdateOff |
3772 |
"stop the update process" |
|
3773 |
||
3774 |
updateProcess notNil ifTrue:[ |
|
11210 | 3775 |
monitorToggle lampColor:(Color yellow). |
3776 |
updateProcess terminate. |
|
3777 |
updateProcess := nil |
|
266 | 3778 |
] |
3779 |
! |
|
3780 |
||
3781 |
autoUpdateOn |
|
3782 |
"fork a subprocess which updates the contextList in regular intervals" |
|
3783 |
||
3784 |
updateProcess isNil ifTrue:[ |
|
11210 | 3785 |
updateProcess := |
3786 |
[ |
|
3787 |
[true] whileTrue:[ |
|
3788 |
monitorToggle showLamp ifTrue:[ |
|
3789 |
monitorToggle lampColor:(Color yellow). |
|
3790 |
] ifFalse:[ |
|
3791 |
monitorToggle activeForegroundColor:Color black. |
|
3792 |
]. |
|
3793 |
(Delay forSeconds:0.25) wait. |
|
3794 |
self updateContext. |
|
3795 |
monitorToggle showLamp ifTrue:[ |
|
3796 |
monitorToggle lampColor:(Color red). |
|
3797 |
] ifFalse:[ |
|
3798 |
monitorToggle activeForegroundColor:Color red. |
|
3799 |
]. |
|
3800 |
(Delay forSeconds:0.25) wait. |
|
3801 |
self updateContext. |
|
3802 |
] |
|
3803 |
] forkAt:(Processor activePriority - 1) |
|
266 | 3804 |
] |
3805 |
||
3806 |
! |
|
3807 |
||
3269 | 3808 |
browseClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3809 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3810 |
|
3811 |
|cls sel| |
|
3812 |
||
3813 |
selectedContext isNil ifTrue:[^ self]. |
|
3814 |
||
3815 |
cls := selectedContext receiver class. |
|
3816 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3817 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 3818 |
sel := nil |
3269 | 3819 |
]. |
3820 |
cls browserClass openInClass:cls selector:sel. |
|
3821 |
||
3822 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3823 |
! |
|
3824 |
||
3825 |
browseClassHierarchy |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3826 |
"browse the receiver's classHierarchy (of the selected context's message)" |
3269 | 3827 |
|
3828 |
|cls mthd| |
|
3829 |
||
3830 |
selectedContext isNil ifTrue:[^ self]. |
|
3831 |
||
3832 |
mthd := selectedContext method. |
|
3447 | 3833 |
mthd notNil ifTrue:[ |
11210 | 3834 |
cls := mthd containingClass. |
3835 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3836 |
]. |
3837 |
cls isNil ifTrue:[ |
|
11210 | 3838 |
cls := selectedContext receiver class |
3269 | 3839 |
]. |
3840 |
cls browserClass browseClassHierarchy:cls. |
|
3841 |
||
3447 | 3842 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 3843 |
! |
3844 |
||
3845 |
browseFullClassProtocol |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3846 |
"browse the receiver's full protocol (of the selected context's message)" |
3269 | 3847 |
|
3848 |
|cls mthd| |
|
3849 |
||
3850 |
selectedContext isNil ifTrue:[^ self]. |
|
3851 |
||
3852 |
mthd := selectedContext method. |
|
3447 | 3853 |
mthd notNil ifTrue:[ |
11210 | 3854 |
cls := mthd containingClass. |
3855 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3856 |
]. |
3857 |
cls isNil ifTrue:[ |
|
11210 | 3858 |
cls := selectedContext receiver class |
3269 | 3859 |
]. |
3860 |
cls browserClass browseFullClassProtocol:cls. |
|
3861 |
||
3447 | 3862 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 3863 |
! |
3864 |
||
3865 |
browseImplementingClass |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3866 |
"browse the implementing class (of the selected context's message)" |
3269 | 3867 |
|
11610 | 3868 |
|con mthd who sel cls home| |
3869 |
||
3870 |
con := selectedContext ? actualContext. |
|
3871 |
con isNil ifTrue:[^ self]. |
|
3872 |
||
3873 |
mthd := con method. |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3874 |
mthd notNil ifTrue:[ |
11610 | 3875 |
who := mthd who. |
11210 | 3876 |
who notNil ifTrue:[ |
3877 |
cls := who methodClass. |
|
3878 |
sel := who methodSelector. |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3879 |
] ifFalse:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3880 |
"might have been re-accepted" |
11610 | 3881 |
(home := con methodHome) notNil ifTrue:[ |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3882 |
(sel := home selector) notNil ifTrue:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3883 |
cls := home receiver class |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3884 |
whichClassImplements:selectedContext selector. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3885 |
cls notNil ifTrue:[ |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3886 |
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
|
3887 |
]. |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3888 |
] |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3889 |
]. |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3890 |
]. |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3891 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3892 |
cls isNil ifTrue:[ |
11210 | 3893 |
"/ class not found - try receiver |
11610 | 3894 |
cls := con receiver class |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3895 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3896 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3897 |
cls browserClass openInClass:cls selector:sel. |
266 | 3898 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3899 |
"Created: / 22-11-1995 / 21:27:01 / cg" |
11610 | 3900 |
"Modified: / 19-07-2012 / 11:27:32 / cg" |
266 | 3901 |
! |
3902 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3903 |
browseImplementors |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3904 |
"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
|
3905 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3906 |
selectedContext isNil ifTrue:[ |
11210 | 3907 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3908 |
]. |
4153 | 3909 |
"/ selectedContext receiver class browserClass |
11610 | 3910 |
self withWaitCursorDo:[ |
3911 |
UserPreferences systemBrowserClass |
|
3912 |
browseImplementorsOf:selectedContext selector. |
|
3913 |
] |
|
3914 |
||
3915 |
"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
|
3916 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3917 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3918 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3919 |
"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
|
3920 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3921 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3922 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3923 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 3924 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3925 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3926 |
initial isNil ifTrue:[ |
11210 | 3927 |
initial := selectedContext isNil |
3928 |
ifTrue:[nil] |
|
3929 |
ifFalse:[selectedContext selector]. |
|
10205 | 3930 |
]. |
3931 |
selector := Dialog |
|
11210 | 3932 |
requestSelector:'Selector to browse implementors of:' |
3933 |
initialAnswer:initial. |
|
11610 | 3934 |
|
3935 |
selector notEmptyOrNil ifTrue:[ |
|
3936 |
self withWaitCursorDo:[ |
|
3937 |
UserPreferences systemBrowserClass |
|
3938 |
browseImplementorsMatching:selector. |
|
3939 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3940 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3941 |
|
11610 | 3942 |
"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
|
3943 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3944 |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3945 |
browseProcessesApplication |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3946 |
"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
|
3947 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3948 |
|p appClass| |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3949 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3950 |
p := inspectedProcess ? Processor activeProcess. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3951 |
(p notNil and:[p isGUIProcess]) ifTrue:[ |
11210 | 3952 |
WindowGroup scheduledWindowGroups do:[:wg | |
3953 |
wg process == p ifTrue:[ |
|
3954 |
appClass := wg application class. |
|
3955 |
appClass browserClass openInClass:appClass selector:nil. |
|
3956 |
^ self |
|
3957 |
] |
|
3958 |
] |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3959 |
]. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3960 |
! |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3961 |
|
3269 | 3962 |
browseReceiversClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3963 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3964 |
|
3965 |
|cls sel| |
|
3966 |
||
3967 |
selectedContext isNil ifTrue:[^ self]. |
|
3968 |
||
11610 | 3969 |
selectedContext isCheapBlockContext ifTrue:[ |
3970 |
cls := selectedContext method mclass. |
|
3971 |
sel := selectedContext method selector. |
|
3972 |
] ifFalse:[ |
|
3973 |
cls := selectedContext receiver class. |
|
3974 |
sel := selectedContext selector. |
|
3975 |
]. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3976 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 3977 |
sel := nil |
3269 | 3978 |
]. |
3979 |
cls browserClass openInClass:cls selector:sel. |
|
3980 |
||
11610 | 3981 |
"Modified: / 19-07-2012 / 11:29:48 / cg" |
3269 | 3982 |
! |
3983 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3984 |
browseSenders |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3985 |
"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
|
3986 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3987 |
selectedContext isNil ifTrue:[ |
11210 | 3988 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3989 |
]. |
11610 | 3990 |
self withWaitCursorDo:[ |
3991 |
UserPreferences systemBrowserClass |
|
3992 |
browseAllCallsOn:selectedContext selector. |
|
3993 |
] |
|
3994 |
||
3995 |
"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
|
3996 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3997 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3998 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3999 |
"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
|
4000 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4001 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4002 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4003 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 4004 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4005 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4006 |
initial isNil ifTrue:[ |
11210 | 4007 |
initial := selectedContext isNil |
4008 |
ifTrue:[nil] |
|
4009 |
ifFalse:[selectedContext selector]. |
|
10205 | 4010 |
]. |
4011 |
selector := Dialog |
|
11210 | 4012 |
requestSelector:'Selector to browse senders of:' |
4013 |
initialAnswer:initial. |
|
11610 | 4014 |
|
4015 |
selector notEmptyOrNil ifTrue:[ |
|
4016 |
self withWaitCursorDo:[ |
|
4017 |
UserPreferences systemBrowserClass |
|
4018 |
browseAllCallsOn:selector asSymbol. |
|
4019 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4020 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4021 |
|
11610 | 4022 |
"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
|
4023 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4024 |
|
11391 | 4025 |
clearRememberedCallchain |
4026 |
"clear the remembered callchain." |
|
4027 |
||
4028 |
RememberedCallChain := nil |
|
4029 |
||
4030 |
"Created: / 08-03-2012 / 01:29:46 / cg" |
|
4031 |
! |
|
4032 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4033 |
closeAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4034 |
(Dialog confirm:'Close all Debuggers (without confirmation if code was changed)?') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4035 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4036 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4037 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4038 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4039 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4040 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4041 |
debugger busy ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4042 |
debugger destroyWithConfirmation:true. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4043 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4044 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4045 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4046 |
self closeRequest. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4047 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4048 |
"Created: / 23-03-2012 / 12:40:22 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4049 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4050 |
|
9626 | 4051 |
configureX:x y:y width:newWidth height:newHeight |
10205 | 4052 |
super configureX:x y:y width:newWidth height:newHeight. |
9626 | 4053 |
LastExtent := self extent. |
4054 |
LastOrigin := self origin. |
|
4055 |
||
4056 |
"Created: / 10-11-2010 / 10:09:11 / cg" |
|
4057 |
! |
|
4058 |
||
266 | 4059 |
copyWalkbackText |
4060 |
"place the contents of the walkback view into the copy-paste buffer. |
|
4061 |
This allows pasting it into some other view for printing ..." |
|
4062 |
||
10760 | 4063 |
|infoText| |
4064 |
||
4065 |
contextArray isEmptyOrNil ifTrue:[ |
|
4066 |
infoText := 'No context, no walkback'. |
|
4067 |
] ifFalse:[ |
|
4068 |
infoText := (contextArray collect:[:con | con fullPrintString]) asStringCollection. |
|
4069 |
]. |
|
4070 |
||
4071 |
self setClipboardText:infoText |
|
266 | 4072 |
|
4073 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
4074 |
! |
|
4075 |
||
4076 |
doAbort |
|
1187 | 4077 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 4078 |
at save places (for example: in the event loop) and returns back |
4079 |
from whatever the process is doing, but does not terminate it." |
|
4080 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4081 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4082 |
(self confirm:('Code modified - abort anyway ?')) |
4083 |
ifFalse:[ |
|
4084 |
^ self |
|
4085 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4086 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4087 |
|
266 | 4088 |
inspecting ifTrue:[ |
11210 | 4089 |
inspectedProcess isDead ifTrue:[ |
4090 |
self showTerminated. |
|
4091 |
^ self |
|
4092 |
]. |
|
4093 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4094 |
self showError:'** the process does not handle the abort signal **' |
|
4095 |
] ifTrue:[ |
|
4096 |
self interruptProcessWith:[AbortOperationRequest raise]. |
|
4097 |
]. |
|
4098 |
^ self |
|
266 | 4099 |
]. |
4100 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4101 |
steppedContext := wrapperContext := nil. |
266 | 4102 |
haveControl := false. |
4103 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4104 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4105 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4106 |
catchBlock notNil ifTrue:[ |
11210 | 4107 |
abortButton turnOff. |
4108 |
catchBlock value. |
|
4109 |
||
4110 |
"/ not reached |
|
4111 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
266 | 4112 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4113 |
|
266 | 4114 |
^ self. |
4115 |
||
3447 | 4116 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 4117 |
! |
4118 |
||
6487 | 4119 |
doAbortAll |
4120 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
4121 |
at save places (for example: in the event loop) and returns back |
|
4122 |
from whatever the process is doing, but does not terminate it." |
|
4123 |
||
4124 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
11210 | 4125 |
(self confirm:('Code modified - abort anyway ?')) |
4126 |
ifFalse:[ |
|
4127 |
^ self |
|
4128 |
] |
|
6487 | 4129 |
]. |
4130 |
||
4131 |
inspecting ifTrue:[ |
|
11210 | 4132 |
inspectedProcess isDead ifTrue:[ |
4133 |
self showTerminated. |
|
4134 |
^ self |
|
4135 |
]. |
|
4136 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4137 |
self showError:'** the process does not handle the abort signal **' |
|
4138 |
] ifTrue:[ |
|
4139 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
4140 |
]. |
|
4141 |
^ self |
|
6487 | 4142 |
]. |
4143 |
||
4144 |
steppedContext := wrapperContext := nil. |
|
4145 |
haveControl := false. |
|
4146 |
exitAction := #abortAll. |
|
4147 |
||
4148 |
"exit private event-loop" |
|
4149 |
catchBlock notNil ifTrue:[ |
|
11210 | 4150 |
abortButton turnOff. |
4151 |
catchBlock value. |
|
4152 |
||
4153 |
"/ not reached |
|
4154 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
6487 | 4155 |
]. |
4156 |
||
4157 |
^ self. |
|
4158 |
||
4159 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
4160 |
! |
|
4161 |
||
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4162 |
doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4163 |
"ask for and change the process's priority" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4164 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4165 |
|oldPrio newPrio s| |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4166 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4167 |
oldPrio := (inspectedProcess ? Processor activeProcess) priority. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4168 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4169 |
[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4170 |
s := Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4171 |
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
|
4172 |
initialAnswer:oldPrio printString. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4173 |
s isEmptyOrNil ifTrue:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4174 |
newPrio := Integer readFrom:s onError:nil. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4175 |
newPrio isNil |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4176 |
] whileTrue. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4177 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4178 |
newPrio := newPrio max:(Processor lowestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4179 |
newPrio := newPrio min:(Processor highestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4180 |
newPrio >= Processor highIOPriority ifTrue:[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4181 |
(Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4182 |
confirm:(resources |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4183 |
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
|
4184 |
ifFalse:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4185 |
]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4186 |
(inspectedProcess ? Processor activeProcess) priority:newPrio. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4187 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4188 |
"Created: / 07-03-2012 / 14:15:09 / cg" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4189 |
! |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4190 |
|
266 | 4191 |
doContinue |
4192 |
"continue from menu" |
|
4193 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4194 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4195 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4196 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4197 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
4198 |
^ self |
|
4199 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4200 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4201 |
|
266 | 4202 |
inspecting ifTrue:[ |
11210 | 4203 |
device hasColors ifTrue:[ |
4204 |
continueButton foregroundColor:Color red darkened. |
|
4205 |
]. |
|
4206 |
continueButton label:(resources string:'Stop'). |
|
4207 |
continueButton action:[self doStop]. |
|
4208 |
||
4209 |
self processPerform:#resume. |
|
4210 |
||
4211 |
^ self |
|
266 | 4212 |
]. |
4213 |
canContinue ifTrue:[ |
|
11210 | 4214 |
exContext := thisContext findSpecialHandle:false raise:true. |
4215 |
||
4216 |
(exContext notNil |
|
4217 |
and:[ (ex := exContext receiver) isLazyValue not |
|
4218 |
and:[ ex isException |
|
4219 |
and:[ ex signal == NoHandlerError |
|
4220 |
and:[ ex parameter signal == RecursionError]]]]) |
|
4221 |
ifTrue:[ |
|
4222 |
"/ debug due to unhandled recursionInterrupt. |
|
4223 |
"/ ask if we should proceed with more stack. |
|
4224 |
||
4225 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
|
4226 |
answer == true ifTrue:[ |
|
4227 |
proc := Processor activeProcess. |
|
4228 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
|
4229 |
]. |
|
4230 |
]. |
|
4231 |
||
4232 |
steppedContext := wrapperContext := nil. |
|
4233 |
tracing := false. |
|
4234 |
haveControl := false. |
|
4235 |
exitAction := #continue. |
|
4236 |
||
4237 |
"exit private event-loop" |
|
4238 |
catchBlock value. |
|
4239 |
||
4240 |
"/ not reached. |
|
4241 |
'DebugView [warning]: continue failed' errorPrintCR. |
|
4242 |
continueButton turnOff. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4243 |
|
266 | 4244 |
] ifFalse:[ |
11210 | 4245 |
inspecting ifFalse:[ |
4246 |
'DebugView [info]: resuming top context' infoPrintCR. |
|
4247 |
self showSelection:1. |
|
4248 |
self doReturn |
|
4249 |
] |
|
266 | 4250 |
] |
477 | 4251 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
4252 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 4253 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 4254 |
! |
4255 |
||
3187 | 4256 |
doDefine |
5955 | 4257 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4258 |
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
|
4259 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4260 |
selectionIndex := contextView selection. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4261 |
restart := true. |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4262 |
|
3283 | 4263 |
selector := actualContext selector. |
8963 | 4264 |
implClass := actualContext receiver class whichClassIncludesSelector:selector. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4265 |
implClass notNil ifTrue:[ |
11210 | 4266 |
"/ must be a subclassResponsibility |
4267 |
||
4268 |
idx := contextArray identityIndexOf:actualContext. |
|
4269 |
idx > 1 ifTrue:[ |
|
4270 |
callee := contextArray at:idx-1. |
|
4271 |
||
4272 |
callee selector == #subclassResponsibility ifTrue:[ |
|
4273 |
restart := false. |
|
4274 |
] |
|
4275 |
]. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4276 |
]. |
5955 | 4277 |
|
4278 |
"generate nice argument names" |
|
4279 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
4280 |
bagOfUsedClassNames := Bag new. |
|
10205 | 4281 |
argNames := actualContext args |
11210 | 4282 |
collect: |
4283 |
[:eachArg | |
|
4284 |
|nm| |
|
4285 |
||
4286 |
nm := eachArg class name. |
|
4287 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
|
4288 |
nm article , nm |
|
4289 |
] ifFalse:[ |
|
4290 |
bagOfUsedClassNames add:nm. |
|
4291 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
4292 |
]. |
|
4293 |
]. |
|
5955 | 4294 |
|
4295 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 4296 |
|
3447 | 4297 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
4298 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
4299 |
||
4300 |
actualContext receiver isNil ifTrue:[ |
|
11210 | 4301 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
4302 |
ifFalse:[ |
|
4303 |
^ self |
|
4304 |
] |
|
3447 | 4305 |
]. |
4306 |
||
4307 |
receiversClass := actualContext receiver class. |
|
4308 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4309 |
"/ code for a getter |
3447 | 4310 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
11210 | 4311 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
4312 |
cat := 'accessing'. |
|
3447 | 4313 |
]. |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4314 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4315 |
"/ code for a setter |
3447 | 4316 |
(selector numArgs == 1 |
4317 |
and:[(selector endsWith:':') |
|
10205 | 4318 |
and:[receiversClass instVarNames includes:(selector copyWithoutLast:1)]]) |
3447 | 4319 |
ifTrue:[ |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4320 |
varName := selector copyWithoutLast:1. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4321 |
argName := argNames first. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4322 |
code := '%1\' , haltStmtFix , '\ %3 := %4.'. |
11210 | 4323 |
cat := 'accessing'. |
3447 | 4324 |
]. |
4325 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4326 |
"/ code for a tester |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4327 |
(selector numArgs == 0 |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4328 |
and:[(selector startsWith:'is') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4329 |
and:[(Smalltalk classNamed:(selector copyFrom:3)) notNil ]]) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4330 |
ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4331 |
(receiversClass nameWithoutPrefix = (selector copyFrom:3)) ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4332 |
code := '%1\' , haltStmtFix , '\ ^ true.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4333 |
] ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4334 |
code := '%1\' , haltStmtFix , '\ ^ false.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4335 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4336 |
cat := 'testing'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4337 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4338 |
|
3447 | 4339 |
"/ actualContext receiver isClass ifTrue:[ |
4340 |
"/ selector == #new ifTrue:[ |
|
4341 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
4342 |
"/ ]. |
|
4343 |
"/ selector == #'new:' ifTrue:[ |
|
4344 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
4345 |
"/ ]. |
|
4346 |
"/ ]. |
|
4347 |
code isNil ifTrue:[ |
|
11210 | 4348 |
code := '%1\' , haltStmtDef |
10205 | 4349 |
]. |
4350 |
||
4351 |
self |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4352 |
codeAccept:(code bindWith:proto with:selector with:varName with:argName) withCRs |
11210 | 4353 |
inClass:receiversClass |
4354 |
unwind:false |
|
4355 |
category:cat |
|
4356 |
onCancel:[^ self]. |
|
3269 | 4357 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4358 |
self doShowSelection:selectionIndex. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4359 |
restart ifTrue:[ |
11210 | 4360 |
self doRestart |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4361 |
] |
3427 | 4362 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4363 |
"Modified: / 23-03-2012 / 09:49:31 / cg" |
3187 | 4364 |
! |
4365 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4366 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4367 |
"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
|
4368 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4369 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4370 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4371 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4372 |
(self confirm:('Code modified - step anyway ?')) |
4373 |
ifFalse:[ |
|
4374 |
^ self |
|
4375 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4376 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4377 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4378 |
canContinue ifTrue:[ |
11210 | 4379 |
steppedContext := wrapperContext := nil. |
4380 |
haveControl := false. |
|
4381 |
exitAction := #step. |
|
4382 |
||
4383 |
"exit private event-loop" |
|
4384 |
catchBlock value. |
|
4385 |
||
4386 |
"/ not reached |
|
4387 |
'DebugView [warning]: send failed' errorPrintCR. |
|
4388 |
sendButton turnOff. |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4389 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4390 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4391 |
"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
|
4392 |
"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
|
4393 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4394 |
|
266 | 4395 |
doNext |
1072 | 4396 |
"skip for next source-code line; entering blocks" |
266 | 4397 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4398 |
stepHow := #nextIn. |
266 | 4399 |
self doStep:nil |
790 | 4400 |
|
1072 | 4401 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4402 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4403 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4404 |
doNextOut |
1072 | 4405 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4406 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4407 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4408 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4409 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4410 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 4411 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4412 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4413 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4414 |
doNextOver |
1072 | 4415 |
"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
|
4416 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4417 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4418 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4419 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4420 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 4421 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 4422 |
! |
4423 |
||
4424 |
doNoTrace |
|
4425 |
traceView notNil ifTrue:[ |
|
11210 | 4426 |
traceView topView destroy. |
4427 |
traceView := nil. |
|
266 | 4428 |
]. |
4429 |
tracing := false |
|
4430 |
! |
|
4431 |
||
4356 | 4432 |
doOpenReportMailApp |
4433 |
"open a mail report tool" |
|
4434 |
||
4435 |
| str | |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4436 |
|
4356 | 4437 |
str := '' writeStream. |
4438 |
||
4439 |
str nextPutLine:('Error notification from ' |
|
11210 | 4440 |
, OperatingSystem getLoginName |
4441 |
, '@' |
|
4442 |
, OperatingSystem getHostName). |
|
4356 | 4443 |
str cr. |
4444 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
4445 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 4446 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
4447 |
str nextPutLine:('Description: ' , self label). |
|
4448 |
"/ str nextPutLine:('Error: ', printedException description). |
|
4449 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
4450 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
4451 |
str nextPutLine:'Backtrace:'. |
|
4452 |
str cr. |
|
4453 |
||
4454 |
firstContext notNil ifTrue:[ |
|
11210 | 4455 |
firstContext fullPrintAllOn:str. |
4356 | 4456 |
]. |
4457 |
str cr;cr. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4458 |
|
10205 | 4459 |
SendMailTool |
11210 | 4460 |
openForMessage:(str contents) |
4461 |
withSubject:('STX Error:[', self label, ']') |
|
4462 |
preOpenBlock:[:inst| |
|
4463 |
inst recipientEntryField value:'error@exept.de' |
|
4464 |
]. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4465 |
|
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4466 |
"Modified: / 20-09-2007 / 12:40:40 / cg" |
4356 | 4467 |
! |
4468 |
||
266 | 4469 |
doRestart |
4470 |
"restart - the selected context will be restarted" |
|
10205 | 4471 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4472 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4473 |
(self confirm:('Code modified - restart anyway ?')) ifFalse:[ |
4474 |
^ self |
|
4475 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4476 |
]. |
266 | 4477 |
inspecting ifTrue:[ |
11210 | 4478 |
selectedContext isNil ifTrue:[ |
4479 |
^ self showError:'** select a context first **' |
|
4480 |
]. |
|
4481 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
|
4482 |
^ self |
|
266 | 4483 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4484 |
steppedContext := wrapperContext := nil. |
266 | 4485 |
haveControl := false. |
6365 | 4486 |
exitAction := #restart. "exit private event-loop" |
4487 |
||
4488 |
catchBlock value. |
|
4489 |
||
4490 |
"/ normally not reached |
|
10205 | 4491 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4492 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4493 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4494 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4495 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 4496 |
! |
4497 |
||
4498 |
doReturn |
|
4499 |
"return - the selected context will do a ^nil" |
|
4500 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4501 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4502 |
(self confirm:('Code modified - return anyway ?')) |
4503 |
ifFalse:[ |
|
4504 |
^ self |
|
4505 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4506 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4507 |
|
266 | 4508 |
inspecting ifTrue:[ |
11210 | 4509 |
selectedContext isNil ifTrue:[ |
4510 |
^ self showError:'** select a context first **' |
|
4511 |
]. |
|
4512 |
self interruptProcessWith:[selectedContext unwind:nil]. |
|
4513 |
^ self |
|
266 | 4514 |
]. |
4515 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4516 |
steppedContext := wrapperContext := nil. |
266 | 4517 |
haveControl := false. |
4518 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4519 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4520 |
"exit private event-loop" |
6365 | 4521 |
catchBlock value. |
477 | 4522 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4523 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4524 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4525 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4526 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4527 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 4528 |
! |
4529 |
||
4530 |
doSend |
|
4531 |
"single send; reenter with next message send" |
|
4532 |
||
1072 | 4533 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4534 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4535 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4536 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4537 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4538 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4539 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4540 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4541 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4542 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4543 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4544 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4545 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4546 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4547 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4548 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4549 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4550 |
|
1072 | 4551 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 4552 |
! |
4553 |
||
4554 |
doStep |
|
4555 |
"skip for next send in selected method" |
|
4556 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4557 |
stepHow := #step. |
790 | 4558 |
self doStep:-1 |
4559 |
||
1072 | 4560 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 4561 |
! |
4562 |
||
4563 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4564 |
"common helper for step, skip & next. |
10205 | 4565 |
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
|
4566 |
or to next line (if nil) or to next send (if -1)" |
266 | 4567 |
|
4568 |
|con method| |
|
4569 |
||
4570 |
inspecting ifTrue:[^ self]. |
|
4571 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4572 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4573 |
(self confirm:('Code modified - step anyway ?')) |
4574 |
ifFalse:[ |
|
4575 |
^ self |
|
4576 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4577 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4578 |
|
266 | 4579 |
canContinue ifTrue:[ |
11210 | 4580 |
selectedContext notNil ifTrue:[ |
4581 |
con := actualContext. "/ selectedContext. |
|
4582 |
steppedContextLineno := actualContext lineNumber. |
|
4583 |
] ifFalse:[ |
|
4584 |
con := contextArray at:2. |
|
4585 |
steppedContextLineno := con lineNumber. |
|
4586 |
]. |
|
4587 |
||
4588 |
skipLineNr := lineNr. |
|
4589 |
||
4590 |
lineNr == -1 ifTrue:[ |
|
4591 |
steppedContextLineno := skipLineNr := nil. |
|
4592 |
]. |
|
4593 |
||
4594 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
|
4595 |
steppedContext := contextArray at:1. |
|
4596 |
stepHow := #nextIn. |
|
4597 |
] ifFalse:[ |
|
4598 |
stepHow == #nextOut ifTrue:[ |
|
4599 |
steppedContext := con home. |
|
4600 |
] ifFalse:[ |
|
4601 |
steppedContext := con. |
|
4602 |
]. |
|
4603 |
]. |
|
4604 |
wrapperContext := nil. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4605 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
4606 |
"/ ' 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
|
4607 |
|
11210 | 4608 |
" |
4609 |
if we step in a wrapped method, |
|
4610 |
prepare to skip the prolog ... |
|
4611 |
" |
|
4612 |
||
4613 |
inWrap := false. |
|
4614 |
method := con method. |
|
4615 |
(method notNil |
|
4616 |
and:[method isWrapped |
|
4617 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
|
4618 |
inWrap := true |
|
4619 |
]. |
|
4620 |
||
4621 |
lineNr == #return ifTrue:[ |
|
4622 |
Processor activeProcess forceInterruptOnReturnOf:con. |
|
4623 |
]. |
|
4624 |
||
4625 |
con := nil. |
|
4626 |
bigStep := true. |
|
4627 |
haveControl := false. |
|
4628 |
exitAction := #step. |
|
4629 |
||
4630 |
"exit private event-loop" |
|
4631 |
catchBlock value. |
|
4632 |
||
4633 |
"/ not reached |
|
4634 |
'DebugView [warning]: step failed' errorPrintCR. |
|
4635 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
|
266 | 4636 |
] |
477 | 4637 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4638 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 4639 |
! |
4640 |
||
4641 |
doStop |
|
4642 |
"stop the process (if its running, otherwise this is a no-op)" |
|
4643 |
||
4644 |
inspecting ifTrue:[ |
|
11210 | 4645 |
device hasColors ifTrue:[ |
4646 |
continueButton foregroundColor:Color green darkened darkened. |
|
4647 |
]. |
|
4648 |
continueButton label:(resources string:'Continue'). |
|
4649 |
continueButton action:[self doContinue]. |
|
4650 |
||
4651 |
self processPerform:#stop. |
|
4652 |
||
4653 |
^ self |
|
266 | 4654 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4655 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4656 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 4657 |
! |
4658 |
||
4659 |
doTerminate |
|
4660 |
"terminate - the process has a chance for cleanup" |
|
4661 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4662 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4663 |
(self confirm:('Code modified - terminate anyway ?')) |
4664 |
ifFalse:[ |
|
4665 |
^ self |
|
4666 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4667 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4668 |
|
266 | 4669 |
inspecting ifTrue:[ |
11210 | 4670 |
self processPerform:#terminate. |
4671 |
^ self |
|
266 | 4672 |
]. |
4673 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4674 |
steppedContext := wrapperContext := nil. |
266 | 4675 |
haveControl := false. |
10205 | 4676 |
exitAction := #terminate. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4677 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4678 |
"exit private event-loop" |
6365 | 4679 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4680 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4681 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4682 |
inspecting ifFalse:[ |
11210 | 4683 |
'DebugView [warning]: terminate failed' errorPrintCR. |
4684 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
|
4685 |
Debugger newDebugger. |
|
4686 |
Processor activeProcess terminate. |
|
4687 |
] |
|
266 | 4688 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4689 |
terminateButton turnOff. |
477 | 4690 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4691 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 4692 |
! |
4693 |
||
4694 |
doTrace |
|
4695 |
"tracing - not really implemented ..." |
|
4696 |
||
4697 |
self warn:'this function is not yet implemented'. |
|
4698 |
||
4699 |
"/ |v b| |
|
4700 |
"/ |
|
4701 |
"/ traceView isNil ifTrue:[ |
|
4702 |
"/ v := StandardSystemView on:Display. |
|
4703 |
"/ v label:'Debugger-Trace'. |
|
4704 |
"/ v icon:icon. |
|
4705 |
"/ |
|
4706 |
"/ b := Button label:'untrace' in:v. |
|
4707 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
4708 |
"/ b action:[ |
|
4709 |
"/ StepInterruptPending := nil. |
|
4710 |
"/ tracing := false. |
|
4711 |
"/ v unrealize. |
|
4712 |
"/ traceView := nil |
|
4713 |
"/ ]. |
|
4714 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
4715 |
"/ traceView origin:(0 @ (b height)) |
|
4716 |
"/ extent:[v width @ (v height - b height)] |
|
4717 |
"/ ]. |
|
4718 |
"/ v realize. |
|
4719 |
"/ |
|
4720 |
"/ tracing := true. |
|
4721 |
! |
|
4722 |
||
4723 |
doTraceStep |
|
4724 |
"tracestep - not implemented yet" |
|
4725 |
||
4726 |
canContinue ifTrue:[ |
|
11210 | 4727 |
tracing := true. |
4728 |
self doStep |
|
266 | 4729 |
] |
4730 |
! |
|
4731 |
||
4732 |
exit |
|
4733 |
"exit from menu: immediate exit from smalltalk" |
|
4734 |
||
4735 |
OperatingSystem exit |
|
4736 |
! |
|
4737 |
||
11595 | 4738 |
findHandlerFor |
4739 |
|exClass con currentContext| |
|
4740 |
||
4741 |
(con := self selectedContext) isNil ifTrue:[ |
|
4742 |
con := contextArray at:1 |
|
4743 |
]. |
|
4744 |
con sender isNil ifTrue:[ |
|
4745 |
self information:'Context has already returned'. |
|
4746 |
^ self |
|
4747 |
]. |
|
4748 |
||
4749 |
exClass := Dialog |
|
4750 |
choose:'Exception class:' |
|
4751 |
fromList:(GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name]) |
|
4752 |
lines:25 |
|
4753 |
title:'Choose Exception class'. |
|
4754 |
||
4755 |
currentContext := con findExceptional. |
|
4756 |
[currentContext notNil] whileTrue:[ |
|
4757 |
|r handler| |
|
4758 |
||
4759 |
r := currentContext receiver. "receiver of #handle:do: or #on:do:" |
|
4760 |
(r notNil and:[(handler := r handlerForSignal:exClass |
|
4761 |
context:currentContext |
|
4762 |
originator:nil) notNil] |
|
4763 |
) ifTrue:[ |
|
4764 |
self halt. |
|
4765 |
]. |
|
4766 |
currentContext := currentContext findSpecialHandle:true raise:true. "search starts at currentContext sender" |
|
4767 |
"/ Transcript showCR:currentContext. |
|
4768 |
]. |
|
4769 |
||
4770 |
"Created: / 17-07-2012 / 12:51:10 / cg" |
|
4771 |
! |
|
4772 |
||
11573 | 4773 |
hideSupportCode |
4774 |
hideSupportCode := true. |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4775 |
self redisplayBacktrace. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4776 |
|
11573 | 4777 |
"Created: / 10-06-2012 / 21:27:02 / cg" |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4778 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4779 |
|
266 | 4780 |
inspectContext |
4781 |
"launch an inspector on the currently selected context" |
|
4782 |
||
11595 | 4783 |
|con| |
4784 |
||
4785 |
(con := self selectedContext) notNil ifTrue:[ |
|
4786 |
con inspect. |
|
266 | 4787 |
] |
11595 | 4788 |
|
4789 |
"Modified: / 17-07-2012 / 12:52:34 / cg" |
|
266 | 4790 |
! |
4791 |
||
8142 | 4792 |
middleButtonMenu |
4793 |
<resource: #programMenu > |
|
4794 |
||
9488 | 4795 |
|items m nameOfExecutable| |
8142 | 4796 |
|
4797 |
exclusive ifTrue:[ |
|
11210 | 4798 |
items := #( |
4799 |
('Show More WalkBack' showMore ) |
|
4800 |
('Show Verbose WalkBack' showVerboseWalkback ) |
|
4801 |
('-' ) |
|
4802 |
('Add Breakpoint' addBreakpoint ) |
|
4803 |
('Remove Breakpoint' removeBreakpoint ) |
|
11661 | 4804 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
11210 | 4805 |
('-' ) |
4806 |
). |
|
8142 | 4807 |
] ifFalse:[ |
11210 | 4808 |
items := #( |
4809 |
('Show More WalkBack' showMore ) |
|
4810 |
('Show Verbose WalkBack' showVerboseWalkback ) |
|
4811 |
('-' ) |
|
4812 |
('Skip' skip ) |
|
4813 |
('Step Out' skipForReturn ) |
|
4814 |
('Skip until Entering...' skipUntilEntering ) |
|
4815 |
('-' ) |
|
8142 | 4816 |
" |
11210 | 4817 |
('Continue' doContinue ) |
4818 |
('Terminate' doTerminate ) |
|
4819 |
('Abort' doAbort ) |
|
4820 |
('-' ) |
|
4821 |
('Step' doStep ) |
|
4822 |
('Send' doSend ) |
|
4823 |
('-' ) |
|
4824 |
('Return' doReturn ) |
|
4825 |
('Restart' doRestart ) |
|
4826 |
('-' ) |
|
8142 | 4827 |
" |
11210 | 4828 |
('Add Breakpoint' addBreakpoint ) |
4829 |
('Remove Breakpoint' removeBreakpoint ) |
|
4830 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
|
4831 |
). |
|
4832 |
||
4833 |
self allowBreakPointsInDebugger ifFalse:[ |
|
4834 |
items := items , #( |
|
4835 |
('Allow Breakpoints && halt in Debugger' doNotIgnoreBreakpoints ) |
|
4836 |
). |
|
4837 |
] ifTrue:[ |
|
4838 |
items := items , #( |
|
4839 |
('Ignore Breakpoints && halt in Debugger' doIgnoreBreakpoints ) |
|
4840 |
). |
|
4841 |
]. |
|
4842 |
||
4843 |
items := items , #( |
|
4844 |
('-' ) |
|
4845 |
('Browse Implementing Class' browseImplementingClass ) |
|
4846 |
('Browse Receivers Class' browseReceiversClass ) |
|
11610 | 4847 |
"/ ('Browse Receivers Class Hierarchy' browseClassHierarchy ) |
4848 |
"/ ('Browse Receivers Full Protocol' browseFullClassProtocol ) |
|
11210 | 4849 |
('Implementors' browseImplementors ) |
4850 |
('Implementors Of...' browseImplementorsOf ) |
|
4851 |
('Senders' browseSenders ) |
|
4852 |
('Senders Of...' browseSendersOf ) |
|
4853 |
('-' ) |
|
4854 |
('Inspect Context' inspectContext ) |
|
4855 |
). |
|
8142 | 4856 |
]. |
4857 |
||
9488 | 4858 |
items := items , #( |
11210 | 4859 |
('Copy WalkBack Text' copyWalkbackText ) |
4860 |
('-' ) |
|
4861 |
('QuickTerminate' quickTerminate ) |
|
4862 |
('=' )). |
|
9488 | 4863 |
|
4864 |
nameOfExecutable := OperatingSystem nameOfSTXExecutable asFilename withoutSuffix baseName. |
|
4865 |
nameOfExecutable = 'stx' ifTrue:[ nameOfExecutable := 'Smalltalk' ]. |
|
4866 |
||
4867 |
items := items , { |
|
11210 | 4868 |
{ 'Exit %1 (No Confirmation)' bindWith:nameOfExecutable. #exit }}. |
10205 | 4869 |
|
4870 |
m := PopUpMenu |
|
11210 | 4871 |
itemList:items |
4872 |
resources:resources |
|
4873 |
receiver:self |
|
4874 |
for:contextView. |
|
8142 | 4875 |
|
4876 |
verboseBacktrace ifTrue:[ |
|
11210 | 4877 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
4878 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback |
|
8142 | 4879 |
]. |
4880 |
||
4881 |
inspecting ifTrue:[ |
|
11210 | 4882 |
m notNil ifTrue:[ |
4883 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
|
4884 |
browseClassHierarchy browseFullClassProtocol |
|
4885 |
browseImplementors browseSenders inspectContext skip doStepOut). |
|
4886 |
]. |
|
8142 | 4887 |
]. |
4888 |
self updateMenuItems. |
|
4889 |
||
4890 |
^ m. |
|
9488 | 4891 |
|
11661 | 4892 |
"Modified: / 25-07-2012 / 19:15:27 / cg" |
8142 | 4893 |
! |
4894 |
||
11573 | 4895 |
notShowingSupportCode |
4896 |
^ hideSupportCode == true. |
|
4897 |
||
4898 |
"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
|
4899 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4900 |
|
3447 | 4901 |
openAboutThisApplication |
4902 |
"opens an about box for this application." |
|
4903 |
||
7112 | 4904 |
Dialog aboutClass:self class. |
4905 |
||
4906 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 4907 |
! |
4908 |
||
8620 | 4909 |
openSettingsDialog |
4910 |
|settingsList settingsApp| |
|
4911 |
||
10205 | 4912 |
settingsList := |
11210 | 4913 |
#( |
4914 |
#('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
4915 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
4916 |
#('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
4917 |
#('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
4918 |
). |
|
8620 | 4919 |
|
4920 |
settingsApp := SettingsDialog new. |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
4921 |
"/ settingsApp requestor:self. |
8620 | 4922 |
settingsApp installSettingsEntries:settingsList. |
4923 |
settingsApp allButOpen. |
|
4924 |
settingsApp window label:('Debugger Settings'). |
|
4925 |
settingsApp openWindow. |
|
4926 |
! |
|
4927 |
||
266 | 4928 |
quickTerminate |
4929 |
"quick terminate - the process will get no chance for cleanup actions" |
|
4930 |
||
4931 |
inspecting ifTrue:[ |
|
11210 | 4932 |
self processPerform:#terminateNoSignal. |
4933 |
^ self |
|
266 | 4934 |
]. |
4935 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4936 |
steppedContext := wrapperContext := nil. |
266 | 4937 |
haveControl := false. |
4938 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4939 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4940 |
"exit private event-loop" |
6365 | 4941 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4942 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4943 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4944 |
inspecting ifFalse:[ |
11210 | 4945 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
4946 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
4947 |
Debugger newDebugger. |
|
4948 |
Processor activeProcess terminateNoSignal. |
|
4949 |
] |
|
266 | 4950 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4951 |
terminateButton turnOff. |
477 | 4952 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4953 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 4954 |
! |
4955 |
||
11391 | 4956 |
rememberCallchain |
4957 |
"remember the callchain in a classvar. |
|
4958 |
When entered the next time, highlight already entered contexts. |
|
4959 |
This makes it possible to identitfy the caller as the first common context |
|
4960 |
along the chain (i.e. the context which is responsible for the debugger to be entered)" |
|
4961 |
||
4962 |
RememberedCallChain := contextArray copy |
|
4963 |
||
4964 |
"Created: / 07-03-2012 / 23:07:07 / cg" |
|
4965 |
! |
|
4966 |
||
11595 | 4967 |
selectedContext |
4968 |
contextView selection notNil ifTrue:[ |
|
4969 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
|
4970 |
^ (contextArray at:(contextView selection)). |
|
4971 |
] |
|
4972 |
]. |
|
4973 |
^ nil |
|
4974 |
||
4975 |
"Created: / 17-07-2012 / 12:52:10 / cg" |
|
4976 |
! |
|
4977 |
||
3447 | 4978 |
showDenseWalkback |
3427 | 4979 |
|m| |
4980 |
||
4981 |
m := contextView middleButtonMenu. |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4982 |
verboseBacktrace := false. |
3694 | 4983 |
m labelAt:#showDenseWalkback put:(resources string:'Show Verbose WalkBack'). |
3447 | 4984 |
m selectorAt:#showDenseWalkback put:#showVerboseWalkback. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4985 |
self redisplayBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4986 |
|
3447 | 4987 |
"Created: / 17.11.2001 / 20:08:08 / cg" |
4988 |
"Modified: / 17.11.2001 / 22:39:48 / cg" |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4989 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4990 |
|
11647 | 4991 |
showFullWalkback |
4992 |
"double the number of contexts shown" |
|
4993 |
||
4994 |
contextArray notNil ifTrue:[ |
|
4995 |
nChainShown := 9999. |
|
4996 |
self redisplayBacktrace. |
|
4997 |
] |
|
4998 |
||
4999 |
"Created: / 23-07-2012 / 12:24:02 / cg" |
|
5000 |
! |
|
5001 |
||
266 | 5002 |
showMore |
3447 | 5003 |
"double the number of contexts shown" |
266 | 5004 |
|
5005 |
contextArray notNil ifTrue:[ |
|
11210 | 5006 |
nChainShown := nChainShown * 2. |
5007 |
self redisplayBacktrace. |
|
266 | 5008 |
] |
563 | 5009 |
|
3447 | 5010 |
"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
|
5011 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
5012 |
|
11573 | 5013 |
showSupportCode |
5014 |
hideSupportCode := false. |
|
5015 |
self redisplayBacktrace. |
|
5016 |
||
5017 |
"Created: / 10-06-2012 / 21:27:53 / cg" |
|
5018 |
! |
|
5019 |
||
3447 | 5020 |
showVerboseWalkback |
5021 |
|m| |
|
5022 |
||
5023 |
verboseBacktrace := true. |
|
5024 |
m := contextView middleButtonMenu. |
|
3694 | 5025 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
3447 | 5026 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback. |
5027 |
||
5028 |
self redisplayBacktrace. |
|
5029 |
||
5030 |
"Created: / 17.11.2001 / 20:07:57 / cg" |
|
5031 |
"Modified: / 17.11.2001 / 22:39:41 / cg" |
|
5032 |
! |
|
5033 |
||
5034 |
showingDenseWalkback |
|
5035 |
^ verboseBacktrace == false. |
|
5036 |
||
5037 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
5038 |
! |
|
5039 |
||
11573 | 5040 |
showingSupportCode |
5041 |
^ hideSupportCode == false. |
|
5042 |
||
5043 |
"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
|
5044 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5045 |
|
3447 | 5046 |
showingVerboseWalkback |
5047 |
^ verboseBacktrace == true. |
|
5048 |
||
5049 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
5050 |
! |
|
5051 |
||
9626 | 5052 |
sizeChanged:how |
10205 | 5053 |
super sizeChanged:how. |
9626 | 5054 |
LastExtent := self extent. |
5055 |
||
5056 |
"Created: / 10-11-2010 / 09:08:41 / cg" |
|
5057 |
! |
|
5058 |
||
266 | 5059 |
skip |
5060 |
"skip for cursor line in selected method" |
|
5061 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5062 |
stepHow := #skip. |
266 | 5063 |
self doStep:codeView cursorLine. |
790 | 5064 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5065 |
"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
|
5066 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5067 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5068 |
skipForReturn |
2581 | 5069 |
"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
|
5070 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5071 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5072 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5073 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5074 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 5075 |
! |
5076 |
||
5077 |
skipUntilEntering |
|
5078 |
"skip until some particular method is invoked." |
|
5079 |
||
5080 |
|selector| |
|
5081 |
||
10205 | 5082 |
selector := Dialog |
11210 | 5083 |
request:'Skip until entering what (matchpattern):' |
5084 |
initialAnswer:self goodSkipUntilSelector. |
|
2581 | 5085 |
selector size == 0 ifTrue:[^ self]. |
5086 |
||
5087 |
stepUntilEntering := selector asSymbol. |
|
5088 |
stepHow := #send. |
|
5089 |
self doStep:-1. |
|
5090 |
||
5091 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 5092 |
! |
5093 |
||
11573 | 5094 |
toggleShowSupportCode |
5095 |
hideSupportCode ifTrue:[ |
|
5096 |
self showSupportCode |
|
11645
4f39a925956d
changed: #toggleShowSupportCode
Stefan Vogel <sv@exept.de>
parents:
11636
diff
changeset
|
5097 |
] ifFalse:[ |
11573 | 5098 |
self hideSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5099 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5100 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5101 |
"Modified: / 17-11-2001 / 20:07:45 / cg" |
11573 | 5102 |
"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
|
5103 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5104 |
|
3447 | 5105 |
toggleVerboseWalkback |
5106 |
verboseBacktrace ifFalse:[ |
|
11210 | 5107 |
self showVerboseWalkback |
3447 | 5108 |
] ifTrue:[ |
11210 | 5109 |
self showDenseWalkback |
3447 | 5110 |
]. |
5111 |
||
5112 |
"Modified: / 17.11.2001 / 20:07:45 / cg" |
|
11610 | 5113 |
! |
5114 |
||
5115 |
updateMenuItems |
|
5116 |
|m mthd cls mCls rCls| |
|
5117 |
||
5118 |
" |
|
5119 |
enable/disable some menu items |
|
5120 |
" |
|
5121 |
m := contextView middleButtonMenu. |
|
5122 |
m notNil ifTrue:[ |
|
5123 |
m disable:#removeBreakpoint. |
|
5124 |
m disable:#addBreakpoint. |
|
5125 |
canShowMore ifFalse:[ |
|
5126 |
m disable:#showMore |
|
5127 |
]. |
|
5128 |
||
5129 |
selectedContext notNil ifTrue:[ |
|
5130 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
5131 |
||
5132 |
mthd := selectedContext method. |
|
5133 |
mthd notNil ifTrue:[ |
|
5134 |
cls := mCls := mthd containingClass. |
|
5135 |
mthd isBreakpointed ifTrue:[ |
|
5136 |
m enable:#removeBreakpoint. |
|
5137 |
] ifFalse:[ |
|
5138 |
m enable:#addBreakpoint. |
|
5139 |
] |
|
5140 |
]. |
|
5141 |
(selectedContext isBlockContext and:[selectedContext home isNil]) ifTrue:[ |
|
5142 |
"/ a cheap block's context |
|
5143 |
] ifFalse:[ |
|
5144 |
rCls := selectedContext receiver class. |
|
5145 |
cls isNil ifTrue:[ |
|
5146 |
cls := rCls |
|
5147 |
]. |
|
5148 |
]. |
|
5149 |
cls notNil ifTrue:[ |
|
5150 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5151 |
rCls == mCls ifTrue:[ |
|
5152 |
m disable:#browseReceiversClass |
|
5153 |
]. |
|
5154 |
mCls isNil ifTrue:[ |
|
5155 |
m disable:#browseImplementingClass |
|
5156 |
] |
|
5157 |
||
5158 |
] ifFalse:[ |
|
5159 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5160 |
]. |
|
5161 |
mthd notNil ifTrue:[ |
|
5162 |
m enableAll:#(browseImplementingClass). |
|
5163 |
]. |
|
5164 |
selectedContext isCheapBlockContext ifTrue:[ |
|
5165 |
m disableAll:#(browseReceiversClass). |
|
5166 |
]. |
|
5167 |
] ifFalse:[ |
|
5168 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5169 |
] |
|
5170 |
] |
|
5171 |
||
5172 |
"Modified: / 19-07-2012 / 11:53:30 / cg" |
|
266 | 5173 |
! ! |
5174 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5175 |
!DebugView methodsFor:'menu & button actions-breakpoints'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5176 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5177 |
addBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5178 |
"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
|
5179 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5180 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5181 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5182 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5183 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5184 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5185 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5186 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5187 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5188 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5189 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5190 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5191 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5192 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5193 |
method setBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5194 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5195 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5196 |
contextView middleButtonMenu disable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5197 |
contextView middleButtonMenu enable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5198 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5199 |
"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
|
5200 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5201 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5202 |
allowBreakPointsInDebugger |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5203 |
^ ignoreBreakpoints not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5204 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5205 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5206 |
allowBreakPointsInDebugger:aBoolean |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5207 |
ignoreBreakpoints := aBoolean not. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5208 |
self initializeMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5209 |
self initializeContextViewsMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5210 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5211 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5212 |
doIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5213 |
self allowBreakPointsInDebugger:false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5214 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5215 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5216 |
doNotIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5217 |
self allowBreakPointsInDebugger:true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5218 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5219 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5220 |
ignoreAllHaltsForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5221 |
self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5222 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5223 |
"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
|
5224 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5225 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5226 |
ignoreAllHaltsUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5227 |
self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5228 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5229 |
"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
|
5230 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5231 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5232 |
ignoreBreakpointsWithThisParameterForever |
11370 | 5233 |
Object disableBreakPoint:breakPointParameter. |
5234 |
"/ self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
|
5235 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5236 |
"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
|
5237 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5238 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5239 |
ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5240 |
self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5241 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5242 |
"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
|
5243 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5244 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5245 |
ignoreHaltForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5246 |
self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5247 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5248 |
"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
|
5249 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5250 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5251 |
ignoreHaltUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5252 |
self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5253 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5254 |
"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
|
5255 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5256 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5257 |
openBreakPointBrowser |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5258 |
Tools::BreakpointBrowser open |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5259 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5260 |
"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
|
5261 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5262 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5263 |
openIgnoreAllHaltsUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5264 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5265 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5266 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5267 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5268 |
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
|
5269 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5270 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5271 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5272 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5273 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5274 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5275 |
self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5276 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5277 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5278 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5279 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5280 |
"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
|
5281 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5282 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5283 |
openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5284 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5285 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5286 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5287 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5288 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5289 |
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
|
5290 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5291 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5292 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5293 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5294 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5295 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5296 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5297 |
self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5298 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5299 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5300 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5301 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5302 |
"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
|
5303 |
"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
|
5304 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5305 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5306 |
openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5307 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5308 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5309 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5310 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5311 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5312 |
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
|
5313 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5314 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5315 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5316 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5317 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5318 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5319 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5320 |
self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5321 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5322 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5323 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5324 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5325 |
"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
|
5326 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5327 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5328 |
openIgnoreHaltNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5329 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5330 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5331 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5332 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5333 |
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
|
5334 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5335 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5336 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5337 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5338 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5339 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5340 |
self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5341 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5342 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5343 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5344 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5345 |
"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
|
5346 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5347 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5348 |
openIgnoreHaltUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5349 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5350 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5351 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5352 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5353 |
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
|
5354 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5355 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5356 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5357 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5358 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5359 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5360 |
self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5361 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5362 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5363 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5364 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5365 |
"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
|
5366 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5367 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5368 |
removeAllBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5369 |
"remove all trace & breakpoints - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5370 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5371 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5372 |
self withExecuteCursorDo:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5373 |
MessageTracer unwrapAllMethods |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5374 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5375 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5376 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5377 |
"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
|
5378 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5379 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5380 |
removeBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5381 |
"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
|
5382 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5383 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5384 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5385 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5386 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5387 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5388 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5389 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5390 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5391 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5392 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5393 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5394 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5395 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5396 |
method clearBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5397 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5398 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5399 |
contextView middleButtonMenu disable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5400 |
contextView middleButtonMenu enable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5401 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5402 |
"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
|
5403 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5404 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5405 |
stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5406 |
self class stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5407 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5408 |
|
266 | 5409 |
!DebugView methodsFor:'private'! |
5410 |
||
6487 | 5411 |
abortAllIsHandled |
9750 | 5412 |
^ AbortAllOperationWantedQuery query |
5413 |
||
5414 |
"Modified: / 09-02-2011 / 13:53:13 / cg" |
|
6487 | 5415 |
! |
5416 |
||
266 | 5417 |
busy |
5418 |
^ busy |
|
5419 |
! |
|
5420 |
||
5421 |
exclusive:aBoolean |
|
5422 |
exclusive := aBoolean |
|
5423 |
! |
|
5424 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5425 |
explainSelection |
8212 | 5426 |
|interval crsrPos| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5427 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5428 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5429 |
interval isEmpty ifTrue:[ |
11210 | 5430 |
crsrPos := codeView characterPositionOfCursor. |
5431 |
codeView characterUnderCursor isSeparator ifTrue:[ |
|
5432 |
crsrPos := (crsrPos - 1) max:1 |
|
5433 |
]. |
|
5434 |
interval := crsrPos to:crsrPos. |
|
10205 | 5435 |
]. |
5436 |
self |
|
11210 | 5437 |
withNodeValueAtInterval:interval |
5438 |
do:[:value :description | |
|
5439 |
self showValue:value |
|
5440 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5441 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5442 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5443 |
findNodeForInterval:interval |
8212 | 5444 |
|source| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5445 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5446 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5447 |
|
8487
ddf59247960c
slow runArray (text) operations
Claus Gittinger <cg@exept.de>
parents:
8432
diff
changeset
|
5448 |
source := codeView contentsAsString string. |
10205 | 5449 |
"/ source := currentMethod notNil |
5450 |
"/ ifTrue:[ currentMethod source ] |
|
8396 | 5451 |
"/ ifFalse:[ codeView contents asString ]. |
8257
106d3fecbca0
findNodeForInterval: care for nonexisting source
Claus Gittinger <cg@exept.de>
parents:
8225
diff
changeset
|
5452 |
source isNil ifTrue:[^ nil]. |
8214 | 5453 |
|
8212 | 5454 |
^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string) allowErrors:true. |
5455 |
"/ ^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string). |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5456 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5457 |
|
7912 | 5458 |
findNodeIn:tree forInterval:interval |
5459 |
<resource: #obsolete> |
|
10205 | 5460 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5461 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5462 |
|
7912 | 5463 |
self obsoleteMethodWarning. |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5464 |
node := nil. |
10205 | 5465 |
tree nodesDo:[:each | |
11210 | 5466 |
(each intersectsInterval:interval) ifTrue:[ |
5467 |
(node isNil or:[node == each parent]) ifTrue:[ |
|
5468 |
node := each |
|
5469 |
] ifFalse:[ |
|
5470 |
(node parent notNil |
|
5471 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
|
5472 |
] |
|
5473 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5474 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5475 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5476 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5477 |
|
2581 | 5478 |
goodSkipUntilSelector |
5479 |
|current| |
|
5480 |
||
5481 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
5482 |
selectedContext isNil ifTrue:[^ nil]. |
|
5483 |
current := selectedContext selector. |
|
5484 |
current isNil ifTrue:[^ nil]. |
|
5485 |
('change:*' match:current) ifTrue:[ |
|
11210 | 5486 |
^ 'update:*' |
2581 | 5487 |
]. |
5488 |
^ nil |
|
5489 |
! |
|
5490 |
||
8179 | 5491 |
haltSelectors |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5492 |
^ #( #'halt' #'halt:' #'breakPoint:' #'breakPoint:info:' #'break'). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5493 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5494 |
"Modified (format): / 27-01-2012 / 11:10:00 / cg" |
8179 | 5495 |
! |
5496 |
||
10205 | 5497 |
inspectedProcess |
5498 |
^ inspectedProcess |
|
266 | 5499 |
! |
5500 |
||
5501 |
interruptProcessWith:aBlock |
|
5502 |
"let inspected process do something, then update the context list" |
|
5503 |
||
5504 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5505 |
self showTerminated. |
5506 |
^ self |
|
266 | 5507 |
]. |
5508 |
inspectedProcess interruptWith:aBlock. |
|
5509 |
" |
|
5510 |
give the process a chance to run, then update |
|
5511 |
" |
|
5512 |
(Delay forSeconds:0.2) wait. |
|
5513 |
self setContext:(inspectedProcess suspendedContext). |
|
5514 |
! |
|
5515 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5516 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5517 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5518 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5519 |
|
8194 | 5520 |
openHTMLDocument: anHTMLFilename |
5521 |
"open a HTMLDocumentView on anHTMLFilename" |
|
5522 |
||
5523 |
HTMLDocumentView openFullOnDocumentationFile: anHTMLFilename |
|
5524 |
! |
|
5525 |
||
266 | 5526 |
processPerform:aMessage |
5527 |
"do something, then update the context list" |
|
5528 |
||
5529 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5530 |
self showTerminated. |
5531 |
^ self |
|
266 | 5532 |
]. |
5533 |
inspectedProcess perform:aMessage. |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
5534 |
|
266 | 5535 |
" |
5536 |
give the process a chance to run, then update |
|
5537 |
" |
|
5538 |
(Delay forSeconds:0.2) wait. |
|
5539 |
self setContext:(inspectedProcess suspendedContext). |
|
5540 |
! |
|
5541 |
||
939 | 5542 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5543 |
"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
|
5544 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5545 |
|
939 | 5546 |
|oldSelection oldContext con idx| |
5547 |
||
5548 |
contextArray notNil ifTrue:[ |
|
11210 | 5549 |
self withExecuteCursorDo:[ |
5550 |
oldSelection := contextView selection. |
|
5551 |
oldSelection notNil ifTrue:[ |
|
5552 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
5553 |
]. |
|
5554 |
||
5555 |
con := firstContext. |
|
950 | 5556 |
"/ con := contextArray at:1. |
11210 | 5557 |
"/ force redeisplay, even if same by changing the first entry |
5558 |
contextArray size > 0 ifTrue:[ |
|
5559 |
contextArray at:1 put:nil. |
|
5560 |
]. |
|
5561 |
self setContext:con. |
|
5562 |
||
5563 |
oldContext isNil ifTrue:[ |
|
5564 |
idx := oldSelection |
|
5565 |
] ifFalse:[ |
|
5566 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
5567 |
]. |
|
5568 |
contextView setSelection:idx. |
|
5569 |
idx notNil ifTrue:[ |
|
5570 |
self showSelection:idx |
|
5571 |
] |
|
5572 |
] |
|
939 | 5573 |
] |
5574 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5575 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 5576 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 5577 |
! |
5578 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5579 |
selectedInterval |
7912 | 5580 |
^ codeView selectedInterval |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5581 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5582 |
|
7823 | 5583 |
showError:message |
5584 |
codeView contents:(resources string:message). |
|
5585 |
shown ifTrue:[ |
|
11210 | 5586 |
exclusive ifTrue:[ |
5587 |
"/ consider this a kludge: |
|
5588 |
"/ if exclusive, cannot use flash, since it suspends |
|
5589 |
"/ (but we cannot suspend here ...) |
|
5590 |
codeView redrawInverted. device flush. |
|
5591 |
OperatingSystem millisecondDelay:200. |
|
5592 |
codeView redraw |
|
5593 |
] ifFalse:[ |
|
5594 |
codeView flash |
|
5595 |
] |
|
7823 | 5596 |
] |
5597 |
||
5598 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
|
5599 |
! |
|
5600 |
||
5601 |
showTerminated |
|
5602 |
self showError:'** the process has terminated **' |
|
5603 |
! |
|
5604 |
||
5605 |
showValue:aValue |
|
5606 |
"/ TODO: show value in info field |
|
5607 |
"/ Transcript showCR:aValue printString |
|
5608 |
! |
|
5609 |
||
10205 | 5610 |
stepping |
5611 |
^ stepping |
|
5612 |
! |
|
5613 |
||
5614 |
unstep |
|
7823 | 5615 |
stepping := false. |
5616 |
bigStep := false. |
|
5617 |
steppedContext := wrapperContext := nil. |
|
5618 |
exitAction := nil |
|
5619 |
||
5620 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
|
5621 |
! |
|
5622 |
||
10203 | 5623 |
updateButtonsAndMenuItemsForContext:aContext |
5624 |
|m| |
|
5625 |
||
5626 |
m := contextView middleButtonMenu. |
|
5627 |
m notNil ifTrue:[ |
|
11210 | 5628 |
self updateMenuItems. |
5629 |
||
5630 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
|
5631 |
abortButton enable. |
|
5632 |
m enable:#doAbort. |
|
5633 |
] ifFalse:[ |
|
5634 |
abortButton disable. |
|
5635 |
m disable:#doAbort. |
|
5636 |
]. |
|
5637 |
exclusive ifTrue:[ |
|
5638 |
terminateButton disable. |
|
5639 |
m disable:#doTerminate. |
|
5640 |
] ifFalse:[ |
|
5641 |
terminateButton enable. |
|
5642 |
m enable:#doTerminate. |
|
5643 |
]. |
|
10203 | 5644 |
]. |
5645 |
||
5646 |
mayProceed == false ifTrue:[ |
|
11210 | 5647 |
continueButton disable. |
5648 |
m notNil ifTrue:[m disable:#doContinue]. |
|
10203 | 5649 |
] ifFalse:[ |
11210 | 5650 |
continueButton enable. |
5651 |
m notNil ifTrue:[m enable:#doContinue] |
|
10203 | 5652 |
]. |
5653 |
||
5654 |
"Created: / 06-07-2011 / 12:24:53 / cg" |
|
5655 |
! |
|
5656 |
||
7823 | 5657 |
updateContext |
5658 |
|oldContext idx| |
|
5659 |
||
5660 |
inspectedProcess state == #dead ifTrue:[ |
|
11210 | 5661 |
self showTerminated. |
5662 |
^ self |
|
7823 | 5663 |
]. |
5664 |
||
5665 |
oldContext := selectedContext. |
|
5666 |
[ |
|
11210 | 5667 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
5668 |
oldContext notNil ifTrue:[ |
|
5669 |
contextArray notNil ifTrue:[ |
|
5670 |
idx := contextArray identityIndexOf:oldContext. |
|
5671 |
idx ~~ 0 ifTrue:[ |
|
5672 |
self showSelection:idx |
|
5673 |
] ifFalse:[ |
|
5674 |
codeView contents:('** context returned **') |
|
5675 |
] |
|
5676 |
] |
|
5677 |
] |
|
5678 |
]. |
|
7823 | 5679 |
] valueUninterruptably. |
5680 |
||
5681 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
|
8212 | 5682 |
! |
5683 |
||
5684 |
withNodeValueAtInterval:interval do:aBlock |
|
9294
e19553d7e864
changed: #withNodeValueAtInterval:do:
Stefan Vogel <sv@exept.de>
parents:
9292
diff
changeset
|
5685 |
|node definingNode nm nmBold varIdx parentNode receiver con receiversNonMetaClass| |
8212 | 5686 |
|
5687 |
"/interval printCR. |
|
10205 | 5688 |
Error |
11210 | 5689 |
handle:[:ex | ] |
5690 |
do:[ |
|
5691 |
[ |
|
5692 |
node := self findNodeForInterval:interval |
|
5693 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:50. |
|
5694 |
]. |
|
9314
e58b9abd145a
comment/format in: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9308
diff
changeset
|
5695 |
|
8212 | 5696 |
node isNil ifTrue:[ ^ self ]. |
10205 | 5697 |
node isVariable ifFalse:[ |
11210 | 5698 |
"/ Transcript showCR:node. |
5699 |
^ self |
|
8592 | 5700 |
]. |
8212 | 5701 |
|
5702 |
nm := node name. |
|
8214 | 5703 |
nmBold := nm allBold. |
8600 | 5704 |
actualContext isNil ifTrue:[^ self ]. |
8636 | 5705 |
actualContext methodHome isNil ifTrue:[^ self ]. |
8214 | 5706 |
receiver := actualContext methodHome receiver. |
8212 | 5707 |
|
5708 |
(nm = 'self') ifTrue:[ |
|
11210 | 5709 |
aBlock value:receiver value:'receiver' allBold. |
5710 |
^ self |
|
8212 | 5711 |
]. |
5712 |
(nm = 'super') ifTrue:[ |
|
11210 | 5713 |
aBlock value:receiver value:'receiver' allBold. |
5714 |
^ self |
|
8212 | 5715 |
]. |
5716 |
(nm = 'thisContext') ifTrue:[ |
|
11210 | 5717 |
aBlock value:actualContext value:'context' allBold. |
5718 |
^ self |
|
8212 | 5719 |
]. |
5720 |
||
5721 |
definingNode := node whoDefines:nm. |
|
5722 |
definingNode isNil ifTrue:[ |
|
11210 | 5723 |
(receiver class allInstVarNames includes:nm) ifTrue:[ |
8214 | 5724 |
"/aBlock value:'xIII' value:'instVar'. |
11210 | 5725 |
receiver class isMetaclass ifTrue:[ |
5726 |
aBlock value:(receiver instVarNamed:nm) value:'classInstVar ',nmBold. |
|
5727 |
] ifFalse:[ |
|
5728 |
aBlock value:(receiver instVarNamed:nm) value:'instVar ',nmBold. |
|
5729 |
]. |
|
5730 |
^ self |
|
5731 |
]. |
|
5732 |
||
5733 |
receiversNonMetaClass := receiver class theNonMetaclass. |
|
5734 |
(receiversNonMetaClass privateClasses contains:[:cls | cls nameWithoutPrefix = nm]) ifTrue:[ |
|
5735 |
aBlock value:'' value:'private class ',nmBold. |
|
5736 |
^ self |
|
5737 |
]. |
|
5738 |
(receiversNonMetaClass classVarNames includes:nm) ifTrue:[ |
|
5739 |
aBlock value:((currentMethod mclass ? receiversNonMetaClass) theNonMetaclass classVarAt:nm) value:'classVar ',nmBold. |
|
5740 |
^ self |
|
5741 |
]. |
|
5742 |
receiversNonMetaClass sharedPoolNames do:[:eachPoolName | |
|
5743 |
|pool| |
|
5744 |
||
5745 |
pool := Smalltalk at:eachPoolName. |
|
5746 |
pool isNil ifTrue:[ pool := receiversNonMetaClass topNameSpace at:eachPoolName]. |
|
5747 |
(pool classVarNames includes:nm) ifTrue:[ |
|
5748 |
aBlock value:(pool classVarAt:nm) value:'poolVar ',nm allBold,' in ',eachPoolName allBold,' '. |
|
5749 |
^ self |
|
5750 |
]. |
|
5751 |
]. |
|
5752 |
(Smalltalk includesKey:nm asSymbol) ifTrue:[ |
|
5753 |
(Smalltalk at:nm asSymbol) isClass ifTrue:[ |
|
5754 |
aBlock value:'class: ',nmBold value:nil. |
|
5755 |
] ifFalse:[ |
|
5756 |
aBlock value:(Smalltalk at:nm asSymbol) value:'global ',nmBold. |
|
5757 |
]. |
|
5758 |
^ self |
|
5759 |
]. |
|
5760 |
aBlock value:'' value:'unknown'. |
|
5761 |
^ self |
|
8212 | 5762 |
]. |
5763 |
"/definingNode printCR. |
|
5764 |
||
5765 |
definingNode isMethod ifTrue:[ |
|
11210 | 5766 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5767 |
varIdx ~~ 0 ifTrue:[ |
|
5768 |
Error |
|
5769 |
handle:[:ex | ] |
|
5770 |
do:[ aBlock value:(actualContext methodHome argAt:varIdx) value:'methodArg ',nmBold ]. |
|
5771 |
^ self |
|
5772 |
]. |
|
5773 |
varIdx := definingNode temporaries findFirst:[:var | var name = nm]. |
|
5774 |
varIdx ~~ 0 ifTrue:[ |
|
5775 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5776 |
Error |
|
5777 |
handle:[:ex | ] |
|
5778 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5779 |
^ self |
|
5780 |
] |
|
5781 |
]. |
|
8212 | 5782 |
]. |
5783 |
||
5784 |
definingNode isBlock ifTrue:[ |
|
11210 | 5785 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5786 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
5787 |
varIdx ~~ 0 ifTrue:[ |
|
5788 |
"/ am I in this block ? |
|
5789 |
(actualContext lineNumber notNil |
|
5790 |
and:[ definingNode lastLineNumber notNil |
|
5791 |
and:[ (actualContext lineNumber |
|
5792 |
between:definingNode firstLineNumber |
|
5793 |
and:definingNode lastLineNumber) |
|
5794 |
and:[ varIdx <= actualContext numArgs ] ]]) |
|
5795 |
ifTrue:[ |
|
5796 |
aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold . |
|
5797 |
^ self |
|
5798 |
]. |
|
8214 | 5799 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
11210 | 5800 |
^ self |
5801 |
] |
|
5802 |
]. |
|
8212 | 5803 |
]. |
5804 |
||
5805 |
parentNode := definingNode parent. |
|
5806 |
||
5807 |
[parentNode notNil] whileTrue:[ |
|
5808 |
"/'isMethod ' print. parentNode isMethod printCR. |
|
11210 | 5809 |
parentNode isMethod ifTrue:[ |
5810 |
varIdx := parentNode temporaries findFirst:[:var | var name = nm]. |
|
5811 |
varIdx ~~ 0 ifTrue:[ |
|
5812 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5813 |
Error |
|
5814 |
handle:[:ex | ] |
|
5815 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5816 |
^ self |
|
5817 |
] |
|
5818 |
]. |
|
5819 |
]. |
|
8212 | 5820 |
"/'isBlock ' print. parentNode isBlock printCR. |
11210 | 5821 |
parentNode isBlock ifTrue:[ |
5822 |
"/ we dont have any information on the inlineability |
|
5823 |
"/ of this block here (RBParser does not know what |
|
5824 |
"/ the compiler does. |
|
5825 |
"/ therefore, it is questionable if we can use the |
|
5826 |
"/ contexts home context here. |
|
5827 |
"/ am I in this block ? |
|
5828 |
con := actualContext. |
|
5829 |
[con notNil |
|
5830 |
and:[ parentNode lastLineNumber notNil |
|
5831 |
and:[ con lineNumber notNil |
|
5832 |
and:[ con lineNumber |
|
5833 |
between:parentNode firstLineNumber |
|
5834 |
and:parentNode lastLineNumber ]]]] whileTrue:[ |
|
5835 |
con := con sender. |
|
5836 |
]. |
|
5837 |
con notNil ifTrue:[ |
|
5838 |
varIdx := parentNode arguments findFirst:[:arg | arg name = nm]. |
|
5839 |
varIdx ~~ 0 ifTrue:[ |
|
5840 |
Error |
|
5841 |
handle:[:ex | ] |
|
5842 |
do:[ aBlock value:(con argAt:varIdx) value:'blockArg ',nmBold ]. |
|
5843 |
^ self |
|
5844 |
]. |
|
5845 |
varIdx := parentNode body temporaries findFirst:[:var | var name = nm]. |
|
5846 |
varIdx ~~ 0 ifTrue:[ |
|
5847 |
Error |
|
5848 |
handle:[:ex | ] |
|
5849 |
do:[ aBlock value:(con varAt:varIdx) value:'blockVar ',nmBold ]. |
|
5850 |
^ self |
|
5851 |
]. |
|
5852 |
]. |
|
5853 |
]. |
|
5854 |
parentNode := parentNode parent. |
|
8212 | 5855 |
]. |
8214 | 5856 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
9446 | 5857 |
|
9688
805ea34ba3ef
changed: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9662
diff
changeset
|
5858 |
"Modified: / 18-01-2011 / 17:57:34 / cg" |
7823 | 5859 |
! ! |
5860 |
||
5861 |
!DebugView methodsFor:'private queries'! |
|
5862 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5863 |
canBrowseClassHierarchy |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5864 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5865 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5866 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5867 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5868 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5869 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5870 |
canBrowseFullClassProtocol |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5871 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5872 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5873 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5874 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5875 |
! |
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 |
canBrowseImplementingClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5878 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5879 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5880 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5881 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5882 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5883 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5884 |
canBrowseProcessesApplication |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5885 |
|p| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5886 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5887 |
p := inspectedProcess ? Processor activeProcess. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5888 |
p isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5889 |
^ p isGUIProcess |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5892 |
canBrowseReceiversClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5893 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5894 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5895 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5896 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5897 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5898 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5899 |
canCloseAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5900 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5901 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5902 |
debugger busy ifTrue:[^ true]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5903 |
] |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5904 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5905 |
^ false |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5906 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5907 |
"Created: / 23-03-2012 / 12:40:18 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5908 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5909 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5910 |
canDefineMethod |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5911 |
^ defineButton isVisible |
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 |
canRestart |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5915 |
^ restartButton isEnabled |
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 |
"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
|
5918 |
! |
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 |
canReturn |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5921 |
^ returnButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5922 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5923 |
"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
|
5924 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5925 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5926 |
canSendEmail |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5927 |
^ SendMailTool notNil |
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 |
"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
|
5930 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5931 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5932 |
canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5933 |
^ canShowMore |
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 |
hasContextSelected |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5937 |
^ contextView hasSelection |
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 |
"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
|
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 |
hasHaltsToIgnore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5943 |
^ IgnoredHalts notEmptyOrNil |
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 |
|
7823 | 5946 |
isAborting |
5947 |
^ exitAction == #abort |
|
5948 |
! |
|
5949 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5950 |
isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5951 |
^ isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5952 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5953 |
"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
|
5954 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5955 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5956 |
isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5957 |
^ isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5958 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5959 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5960 |
isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5961 |
^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5962 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5963 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5964 |
selectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5965 |
|con mthd| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5966 |
|
11595 | 5967 |
(con := self selectedContext) notNil ifTrue:[ |
11610 | 5968 |
mthd := con method. |
11595 | 5969 |
^ mthd notNil and:[mthd isWrapped] |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5970 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5971 |
^ false. |
11595 | 5972 |
|
11610 | 5973 |
"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
|
5974 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5975 |
|
7823 | 5976 |
setOfHiddenCallingSelectors |
5977 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
|
5978 |
! |
|
5979 |
||
5980 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
|
5981 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
|
5982 |
! ! |
|
5983 |
||
9922 | 5984 |
!DebugView methodsFor:'private-breakpoints'! |
5985 |
||
11210 | 5986 |
addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey forAll:aBoolean |
9922 | 5987 |
|haltingContext haltingMethod lineNrOfHalt| |
5988 |
||
5989 |
aBoolean ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5990 |
haltingMethod := #all |
9922 | 5991 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5992 |
haltingContext := self findHaltingContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5993 |
haltingContext isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5994 |
Transcript showCR:'no halting context found'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5995 |
^ self |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5996 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5997 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5998 |
haltingMethod := haltingContext method. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5999 |
lineNrOfHalt := haltingContext lineNumber. |
9922 | 6000 |
]. |
6001 |
||
6002 |
self class |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6003 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
11210 | 6004 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
6005 |
||
6006 |
"Created: / 27-01-2012 / 11:31:12 / cg" |
|
9922 | 6007 |
! |
6008 |
||
6009 |
canAddBreakpoint |
|
6010 |
|m| |
|
6011 |
||
6012 |
m := contextView middleButtonMenu. |
|
6013 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
6014 |
! |
|
6015 |
||
6016 |
canRemoveBreakpoint |
|
6017 |
|m| |
|
6018 |
||
6019 |
m := contextView middleButtonMenu. |
|
6020 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
6021 |
! |
|
6022 |
||
6023 |
findHaltingContext |
|
6024 |
|haltSelectors| |
|
6025 |
||
6026 |
haltSelectors := self haltSelectors. |
|
6027 |
||
10205 | 6028 |
contextArray keysAndValuesDo:[:idx :con | |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6029 |
|sel con2 sel2 method| |
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 |
sel := con selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6032 |
(haltSelectors includes:sel) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6033 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6034 |
method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6035 |
con2 := contextArray at:idx+1. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6036 |
sel2 := con2 selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6037 |
(haltSelectors includes:sel2) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6038 |
con2 method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6039 |
^ contextArray at:idx+2. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6040 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6041 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6042 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6043 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6044 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6045 |
(contextArray at:idx+1) infoPrintCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6046 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6047 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6048 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6049 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6050 |
con method isWrapped ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6051 |
^ con |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6052 |
]. |
9922 | 6053 |
]. |
6054 |
^ nil |
|
6055 |
||
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6056 |
"Modified: / 27-01-2012 / 11:06:02 / cg" |
9922 | 6057 |
! |
6058 |
||
6059 |
ignoreBreakpoints |
|
6060 |
^ ignoreBreakpoints |
|
6061 |
||
6062 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
6063 |
! ! |
|
6064 |
||
7823 | 6065 |
!DebugView methodsFor:'private-cache handling'! |
6066 |
||
6067 |
cacheMyself |
|
6068 |
"remember myself for next debug session" |
|
6069 |
||
6070 |
"caching the last debugger will make the next debugger appear |
|
6071 |
faster, since no resources have to be allocated in the display. |
|
6072 |
We have to be careful to release all refs to the debuggee, though. |
|
6073 |
Otherwise, the GC will not be able to release it." |
|
6074 |
||
6075 |
windowGroup notNil ifTrue:[ |
|
11210 | 6076 |
windowGroup setProcess:nil. |
7823 | 6077 |
]. |
6078 |
||
6079 |
self releaseDebuggee. |
|
6080 |
||
6081 |
cachable ~~ true ifTrue:[^ self]. |
|
6082 |
||
6083 |
"/ |
|
6084 |
"/ only cache if I am on the Display |
|
6085 |
"/ |
|
6086 |
device == Display ifTrue:[ |
|
11210 | 6087 |
exclusive ifTrue:[ |
6088 |
CachedExclusive := self |
|
6089 |
] ifFalse:[ |
|
6090 |
CachedDebugger := self |
|
6091 |
]. |
|
7823 | 6092 |
]. |
6093 |
||
6094 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
11210 | 6095 |
ObjectMemory stepInterruptHandler:nil |
7823 | 6096 |
]. |
6097 |
||
6098 |
"Modified: 10.7.1997 / 15:50:46 / stefan" |
|
6099 |
"Modified: 31.7.1997 / 21:20:14 / cg" |
|
6100 |
! |
|
6101 |
||
6102 |
isCached |
|
6103 |
"tell wether we are a cached debugger" |
|
6104 |
||
6105 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6106 |
^ true. |
7823 | 6107 |
]. |
6108 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6109 |
^ true. |
7823 | 6110 |
]. |
6111 |
||
6112 |
^ false. |
|
6113 |
||
6114 |
"Created: 10.7.1997 / 15:22:43 / stefan" |
|
6115 |
! |
|
6116 |
||
6117 |
releaseDebuggee |
|
6118 |
"We have to be careful to release all refs to the debuggee, |
|
6119 |
because we may be in the cache. |
|
6120 |
Otherwise, the GC will not be able to release it" |
|
6121 |
||
6122 |
busy := false. |
|
6123 |
||
6124 |
codeView acceptAction:nil. |
|
6125 |
codeView doItAction:nil. |
|
6126 |
codeView contents:nil. |
|
6127 |
||
6128 |
receiverInspector release. |
|
6129 |
contextInspector release. |
|
6130 |
inspectedProcess := nil. |
|
6131 |
contextArray := nil. |
|
6132 |
selectedContext := actualContext := firstContext := nil. |
|
6133 |
steppedContext := wrapperContext := nil. |
|
6134 |
catchBlock := nil. |
|
6135 |
grabber := nil. |
|
6136 |
self autoUpdateOff. |
|
6137 |
||
6138 |
"Created: / 10.7.1997 / 14:57:51 / stefan" |
|
6139 |
"Modified: / 10.7.1997 / 15:50:38 / stefan" |
|
6140 |
"Modified: / 17.11.2001 / 22:58:17 / cg" |
|
6141 |
! |
|
6142 |
||
6143 |
uncacheMyself |
|
6144 |
"do not remember myself any longer for next debug session" |
|
6145 |
||
6146 |
cachable := false. |
|
6147 |
||
6148 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6149 |
CachedExclusive := nil. |
7823 | 6150 |
]. |
6151 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6152 |
CachedDebugger := nil. |
7823 | 6153 |
]. |
6154 |
OpenDebuggers notNil ifTrue:[ |
|
11210 | 6155 |
OpenDebuggers remove:self ifAbsent:[]. |
7823 | 6156 |
]. |
6157 |
||
6158 |
"Modified: 31.7.1997 / 21:20:11 / cg" |
|
6159 |
! ! |
|
6160 |
||
10628 | 6161 |
!DebugView methodsFor:'private-code view'! |
6162 |
||
6163 |
codeAspect |
|
6164 |
||
6165 |
^#method |
|
6166 |
||
6167 |
"Created: / 27-07-2011 / 13:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6168 |
! ! |
|
6169 |
||
7823 | 6170 |
!DebugView methodsFor:'private-context handling'! |
6171 |
||
11391 | 6172 |
contextListEntryFor:aContext |
6173 |
|s| |
|
6174 |
||
6175 |
aContext selector == #doIt ifTrue:[ |
|
6176 |
aContext receiver isNil ifTrue:[ |
|
6177 |
^ 'doIt' allBold |
|
6178 |
] |
|
6179 |
]. |
|
6180 |
||
6181 |
s := Text streamContents:[:s | aContext printOn:s ]. |
|
6182 |
RememberedCallChain notNil ifTrue:[ |
|
6183 |
(RememberedCallChain includesIdentical:aContext) ifTrue:[ |
|
6184 |
s := s colorizeAllWith:(Color red). |
|
6185 |
]. |
|
6186 |
]. |
|
6187 |
^ s |
|
6188 |
||
6189 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
6190 |
! |
|
6191 |
||
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6192 |
is:aHomeContext inCallingChainOf:aContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6193 |
|con| |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6194 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6195 |
con := aContext. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6196 |
[con notNil and:[con ~~ aHomeContext]] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6197 |
con := con sender |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6198 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6199 |
^ con notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6200 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6201 |
"Created: / 10-06-2012 / 18:46:29 / cg" |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6202 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6203 |
|
266 | 6204 |
setContext:aContext |
6205 |
"show calling chain from aContext in the walk-back listview" |
|
6206 |
||
641 | 6207 |
^ 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
|
6208 |
|
641 | 6209 |
"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
|
6210 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6211 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6212 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
6213 |
"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
|
6214 |
Most complications here arise from filtering less-interesting contexts |
11573 | 6215 |
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
|
6216 |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6217 |
|con text method caller caller2 called called2 m count c cc sndr |
3447 | 6218 |
suspendContext calledBySuspendContext nm h calledContext| |
266 | 6219 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6220 |
(contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6221 |
"no change" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6222 |
^ false |
266 | 6223 |
]. |
6224 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6225 |
isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := false. |
939 | 6226 |
firstContext := aContext. |
6227 |
||
266 | 6228 |
m := contextView middleButtonMenu. |
6229 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6230 |
m disable:#showMore. |
266 | 6231 |
]. |
3269 | 6232 |
canShowMore := false. |
266 | 6233 |
|
6234 |
aContext isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6235 |
text := Array with:'** no context **'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6236 |
contextArray := nil. |
266 | 6237 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6238 |
text := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6239 |
contextArray := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6240 |
con := aContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6241 |
calledContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6242 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6243 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6244 |
"/ with dense backtrace, hide the ProcessorScheduler |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6245 |
"/ 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
|
6246 |
"/ context within the first 10 contexts |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6247 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6248 |
suspendContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6249 |
c := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6250 |
1 to:10 do:[:i | |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6251 |
|sel| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6252 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6253 |
c notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6254 |
(sel := c selector) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6255 |
((sel isSymbol and:[sel startsWith:'suspend']) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6256 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6257 |
suspendContext := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6258 |
calledBySuspendContext := cc. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6259 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6260 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6261 |
cc := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6262 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6263 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6264 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6265 |
suspendContext notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6266 |
con := suspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6267 |
calledContext := calledBySuspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6268 |
suspendContext := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6269 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6270 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6271 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6272 |
con notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6273 |
"/ hide the halt implementation |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6274 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6275 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6276 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6277 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6278 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6279 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6280 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6281 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6282 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6283 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6284 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6285 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6286 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6287 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6288 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6289 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6290 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6291 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6292 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6293 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6294 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6295 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6296 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6297 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6298 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6299 |
get them all |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6300 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6301 |
count := 0. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6302 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6303 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6304 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6305 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6306 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6307 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6308 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6309 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6310 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6311 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6312 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6313 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6314 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6315 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6316 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6317 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6318 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6319 |
[ |
11636 | 6320 |
DebuggingDebugger3 == true ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6321 |
'showingContext1: (' print. con print. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6322 |
') --> ' print. (self showingContext1:con calling:calledContext) printCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6323 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6324 |
self showingContext1:con calling:calledContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6325 |
] whileFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6326 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6327 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6328 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6329 |
|
11636 | 6330 |
DebuggingDebugger3 == true ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6331 |
'showingContext2: (' print. con print. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6332 |
') --> ' print. (self showingContext2:con nesting:count) printCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6333 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6334 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6335 |
(self showingContext2:con nesting:count) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6336 |
"/ ignore it, if its in the same |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6337 |
"/ method as the previous context |
3447 | 6338 |
"/ (verboseBacktrace ~~ true |
10205 | 6339 |
"/ and:[count > 0 |
3447 | 6340 |
"/ and:[contextArray last method == con method |
10205 | 6341 |
"/ and:[(contextArray last isBlockContext not |
3447 | 6342 |
"/ & con isBlockContext not) not ]]]) ifTrue:[ |
6343 |
"/ "/ skip it, if its in the same method |
|
6344 |
"/ "/ as the called context. |
|
6345 |
"/ ] ifFalse:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6346 |
contextArray add:con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6347 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6348 |
(MoreDebuggingDetail == true) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6349 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6350 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6351 |
Error |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6352 |
handle:[:ex | nm := '???' ] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6353 |
do:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6354 |
nm := self contextListEntryFor:con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6355 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6356 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6357 |
text add:nm. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6358 |
count := count + 1. |
3447 | 6359 |
"/ ]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6360 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6361 |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6362 |
"/ with hidden enumeration code, skip over internals of the enumeration |
11573 | 6363 |
hideSupportCode == true ifTrue:[ |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6364 |
(con isBlockContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6365 |
and:[ (h := con home) notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6366 |
and:[ (self is:h inCallingChainOf:con) ]]) ifTrue:[ |
11573 | 6367 |
c := con sender. |
6368 |
[ |
|
6369 |
c notNil |
|
6370 |
and:[ |
|
6371 |
sndr := c sender. |
|
6372 |
(sndr ~= h) and:[ |
|
6373 |
c receiver isCollection "/ skip collection implementations |
|
6374 |
or:[ ( #( #'handle:do:' "/ skip exception implementations |
|
6375 |
#'handleDo:' |
|
6376 |
#'answer:do:' |
|
6377 |
#'ensure:' ) includes: c selector ) |
|
6378 |
or:[ #'perform:*' "/ skip perform implementations |
|
6379 |
match: c selector ]] |
|
6380 |
] |
|
6381 |
] |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6382 |
] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6383 |
c := sndr |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6384 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6385 |
c notNil ifTrue:[ |
11573 | 6386 |
con := h sender. |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6387 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6388 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6389 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6390 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6391 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6392 |
"/ 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
|
6393 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6394 |
method := con method. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6395 |
method notNil ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6396 |
called := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6397 |
caller := con sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6398 |
(caller notNil and:[caller receiver == method]) ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6399 |
called2 := caller. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6400 |
caller2 := caller sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6401 |
caller2 notNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6402 |
(caller2 method isWrapped |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6403 |
and:[ caller2 method originalMethod == method ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6404 |
calledContext := called2. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6405 |
con := caller2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6406 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6407 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6408 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6409 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6410 |
caller := caller2 := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6411 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6412 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6413 |
"/ with dense backtrace, skip the doIt methods context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6414 |
"/ (its dummy anyway) and fake that contexts name |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6415 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6416 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6417 |
(con isBlockContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6418 |
and:[(h := con home) == con sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6419 |
and:[h notNil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6420 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6421 |
and:[h method who isNil]]]]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6422 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6423 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6424 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6425 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6426 |
text add:(self contextListEntryFor:con methodHome). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6427 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6428 |
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
|
6429 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6430 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6431 |
"/ with dense backtrace, dont show below the doIt |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6432 |
( verboseBacktrace ~~ true |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6433 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6434 |
con := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6435 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6436 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6437 |
con := con sender |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6438 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6439 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6440 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6441 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6442 |
did we reach the end ? |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6443 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6444 |
(con isNil or:[con sender isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6445 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6446 |
"/ the very last one is the startup context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6447 |
"/ (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
|
6448 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6449 |
(contextArray notEmpty |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6450 |
and:[contextArray last selector isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6451 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6452 |
text removeLast |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6453 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6454 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6455 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6456 |
"/ in dense mode, remove the process startup |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6457 |
"/ contexts (if any) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6458 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6459 |
(contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6460 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6461 |
con selector == #start ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6462 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6463 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6464 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6465 |
[contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6466 |
and:[contextArray last methodHome == con]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6467 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6468 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6469 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6470 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6471 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6472 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6473 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6474 |
m notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6475 |
m enable:#showMore. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6476 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6477 |
canShowMore := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6478 |
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
|
6479 |
]. |
266 | 6480 |
]. |
6481 |
||
6482 |
contextView setList:text. |
|
944 | 6483 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6484 |
releaseInspectors ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6485 |
receiverInspector release. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6486 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6487 |
]. |
266 | 6488 |
|
6489 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6490 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 6491 |
]. |
3511 | 6492 |
self updateMenuItems. |
266 | 6493 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6494 |
|
7797 | 6495 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
11661 | 6496 |
"Modified: / 25-07-2012 / 19:15:01 / cg" |
266 | 6497 |
! |
6498 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6499 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6500 |
"show calling chain from aContext in the walk-back listview. |
1213 | 6501 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6502 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6503 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6504 |
|
8152 | 6505 |
con := aContext. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6506 |
verboseBacktrace ifFalse:[ |
11210 | 6507 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
6508 |
con := con sender. |
|
6509 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
|
6510 |
con := con sender. |
|
6511 |
]. |
|
6512 |
]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6513 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6514 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6515 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6516 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6517 |
"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
|
6518 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6519 |
|
3447 | 6520 |
showingContext1:aContext calling:calledContext |
7823 | 6521 |
"return false, if this (top) context is to be skipped. |
10205 | 6522 |
Here, we hide some well known methods, which are usually not too interesting; |
7823 | 6523 |
the set of methods which are suppressed is my (claus's) own choice." |
6524 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6525 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 6526 |
|
6527 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
6528 |
aContext isNil ifTrue:[ ^true ]. |
|
6529 |
||
6530 |
sel := aContext selector. |
|
6531 |
rec := aContext receiver. |
|
6532 |
mthd := aContext method. |
|
6533 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
6534 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6535 |
"/ to avoid firing/waiting the lazy or future |
10205 | 6536 |
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
|
6537 |
aContext sender notNil ifTrue:[ |
11210 | 6538 |
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
|
6539 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6540 |
|
11636 | 6541 |
DebuggingDebugger3 == true ifTrue:[ |
11210 | 6542 |
'showingContext1: (' print. aContext print. |
6543 |
') calling: (' print. calledContext print. |
|
6544 |
')' printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6545 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6546 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6547 |
(#(doCallHandler: doRaise |
3447 | 6548 |
) includes:sel) |
11210 | 6549 |
ifTrue:[ |
6550 |
recIsException ifTrue:[ ^ false]. |
|
6551 |
]. |
|
3447 | 6552 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6553 |
(#(raise raiseRequest |
3447 | 6554 |
) includes:sel) |
11210 | 6555 |
ifTrue:[ |
6556 |
recIsException ifTrue:[ |
|
6557 |
(senderRec isLazyValue not |
|
6558 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
|
6559 |
]. |
|
6560 |
]. |
|
3447 | 6561 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6562 |
(#(doWhile: |
3447 | 6563 |
) includes:sel) |
11210 | 6564 |
ifTrue:[ |
6565 |
rec isBlock ifTrue:[ |
|
6566 |
true "aContext sender isBlockContext" ifTrue:[^ false]. |
|
6567 |
]. |
|
6568 |
]. |
|
3447 | 6569 |
|
8620 | 6570 |
calledContext notNil ifTrue:[ |
11210 | 6571 |
calledSel := calledContext selector. |
6572 |
calledRec := calledContext receiver. |
|
6573 |
||
6574 |
calledRec isBlock ifTrue:[ |
|
6575 |
(calledSel == #ensure:) ifTrue:[^ false]. |
|
6576 |
(calledSel == #ifCurtailed:) ifTrue:[^ false]. |
|
6577 |
]. |
|
6578 |
(calledSel == #handle:do:) ifTrue:[^ false]. |
|
6579 |
(calledSel == #answer:do:) ifTrue:[^ false]. |
|
8620 | 6580 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6581 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6582 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6583 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6584 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6585 |
"/ |
10205 | 6586 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6587 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6588 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6589 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6590 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6591 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6592 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6593 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6594 |
"/ ]. |
8620 | 6595 |
]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6596 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6597 |
(#(handleDo:) includes:sel) |
11210 | 6598 |
ifTrue:[ |
6599 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
|
6600 |
]. |
|
10205 | 6601 |
(#( |
11210 | 6602 |
withCursor:do: |
6603 |
withWaitCursorDo: |
|
3447 | 6604 |
) includes:sel) |
11210 | 6605 |
ifTrue:[ |
6606 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
6607 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
6608 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
6609 |
]. |
|
10205 | 6610 |
|
6611 |
(#( |
|
11210 | 6612 |
wait |
6613 |
waitWithTimeout: |
|
6614 |
waitWithTimeoutMs: |
|
3447 | 6615 |
) includes:sel) |
11210 | 6616 |
ifTrue:[ |
6617 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
6618 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
6619 |
]. |
|
3447 | 6620 |
|
6621 |
^ true |
|
6622 |
||
9662 | 6623 |
"Created: / 17-11-2001 / 22:24:06 / cg" |
11636 | 6624 |
"Modified: / 20-07-2012 / 13:16:47 / cg" |
3447 | 6625 |
! |
6626 |
||
6627 |
showingContext2:aContext nesting:nesting |
|
7823 | 6628 |
"return false, if this (intermediate) context is to be skipped. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6629 |
Here, we hide some well known methods, which are usually |
10205 | 6630 |
not too interesting; |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6631 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 6632 |
|
10205 | 6633 |
|sel rec mClass |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6634 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6635 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6636 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 6637 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6638 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6639 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6640 |
sel := aContext selector. |
939 | 6641 |
mClass := aContext methodClass. |
6642 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6643 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6644 |
sender notNil ifTrue:[ |
11210 | 6645 |
senderSelector := sender selector. |
6646 |
senderReceiver := sender receiver. |
|
6647 |
senderReceiverClass := senderReceiver class. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6648 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6649 |
|
939 | 6650 |
sel == #withCursor:do: ifTrue:[ |
11210 | 6651 |
(mClass == WindowGroup) ifTrue:[^ false]. |
6652 |
(mClass == TopView) ifTrue:[^ false]. |
|
939 | 6653 |
]. |
6654 |
(sel == #withExecuteCursorDo: |
|
6655 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
11210 | 6656 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 6657 |
]. |
6658 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
6659 |
(sel == #do: |
6600 | 6660 |
or:[sel == #from:to:do: |
6601 | 6661 |
or:[sel == #keysAndValuesDo: |
6662 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
11210 | 6663 |
mClass == Array ifTrue:[^ false]. |
6664 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
6665 |
mClass == Set ifTrue:[^ false]. |
|
6666 |
mClass == Dictionary ifTrue:[^ false]. |
|
6667 |
mClass == Interval ifTrue:[^ false]. |
|
10205 | 6668 |
]. |
6669 |
(sel == #perform: |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6670 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6671 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6672 |
or:[sel == #perform:with:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6673 |
or:[sel == #perform:with:with:with:with:]]]]) |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6674 |
ifTrue:[ |
11210 | 6675 |
nesting == 0 ifTrue:[^ true]. |
6676 |
mClass == Array ifTrue:[^ false]. |
|
6677 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6678 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6679 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6680 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6681 |
|
939 | 6682 |
(mClass == Object) ifTrue:[ |
11210 | 6683 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 6684 |
]. |
6685 |
||
6686 |
(mClass == Method) ifTrue:[ |
|
11210 | 6687 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 6688 |
]. |
6689 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6690 |
(mClass == SmallInteger) ifTrue:[ |
11210 | 6691 |
(sel == #to:do:) ifTrue:[^ false]. |
6692 |
(sel == #to:by:do:) ifTrue:[^ false]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6693 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6694 |
|
939 | 6695 |
(mClass == Block) ifTrue:[ |
11210 | 6696 |
sel == #ensure: ifTrue:[^ false]. |
6697 |
sel == #ifCurtailed: ifTrue:[^ false]. |
|
6698 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
|
6699 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
|
6700 |
sel == #on:do: ifTrue:[^ false]. |
|
6701 |
||
6702 |
sel == #value ifTrue:[^ false]. |
|
6703 |
sel == #value: ifTrue:[^ false]. |
|
6704 |
sel == #value:value: ifTrue:[^ false]. |
|
6705 |
sel == #value:value:value: ifTrue:[^ false]. |
|
6706 |
sel == #value:value:value:value: ifTrue:[^ false]. |
|
6707 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
|
6708 |
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
|
6709 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6710 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6711 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6712 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6713 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6714 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6715 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6716 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6717 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6718 |
"/ 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
|
6719 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6720 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6721 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6722 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6723 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6724 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6725 |
|
11210 | 6726 |
aContext home notNil ifTrue:[ |
6727 |
aContext home receiver isLazyValue ifFalse:[ |
|
6728 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
|
6729 |
(aContext home selector == #wait) ifTrue:[^ false]. |
|
6730 |
(aContext home selector == #waitWithTimeoutMs:) ifTrue:[^ false]. |
|
6731 |
] |
|
6732 |
] |
|
6733 |
] |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6734 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6735 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6736 |
(rec isExceptionHandler) ifTrue:[ |
11210 | 6737 |
sel == #handle:do: ifTrue:[^ false]. |
6738 |
sel == #handleDo: ifTrue:[^ false]. |
|
6739 |
(sel startsWith:#raise) ifTrue:[^ false]. |
|
6740 |
sel == #answer:do: ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6741 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6742 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
11210 | 6743 |
sel == #doRaise ifTrue:[^ false]. |
6744 |
sel == #doCallHandler: ifTrue:[^ false]. |
|
6745 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
|
6746 |
senderReceiverClass == Signal ifTrue:[^ false]. |
|
6747 |
] |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6748 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6749 |
(mClass == Context) ifTrue:[ |
11210 | 6750 |
sel == #unwind ifTrue:[^ false]. |
6751 |
sel == #unwind: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6752 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6753 |
(mClass == ProcessorScheduler) ifTrue:[ |
11210 | 6754 |
sel == #interruptActive ifTrue:[^ false]. |
6755 |
sel == #threadSwitch: ifTrue:[^ false]. |
|
6756 |
sel == #suspend: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6757 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6758 |
mClass == Process ifTrue:[ |
11210 | 6759 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6760 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6761 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6762 |
|
9662 | 6763 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
6764 |
"Modified: / 08-12-2010 / 18:21:45 / cg" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
6765 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
6766 |
|
4859 | 6767 |
!DebugView methodsFor:'private-control loop'! |
266 | 6768 |
|
6769 |
controlLoop |
|
6770 |
"this is a kludge: |
|
11210 | 6771 |
start a dispatchloop which exits when |
6772 |
either continue, return or step is pressed |
|
266 | 6773 |
" |
6774 |
||
6775 |
haveControl := true. |
|
664 | 6776 |
[ |
11210 | 6777 |
[haveControl] whileTrue:[ |
6778 |
self controlLoopCatchingErrors |
|
6779 |
]. |
|
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
6780 |
] ensure:[ |
11210 | 6781 |
catchBlock := nil. |
6782 |
haveControl := false |
|
266 | 6783 |
]. |
664 | 6784 |
|
6785 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 6786 |
! |
6787 |
||
6788 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6789 |
"this is the debuggers own private event handling loop; |
1187 | 6790 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6791 |
|
266 | 6792 |
"setup a self removing catch-block" |
6793 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
6794 |
||
6795 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
11210 | 6796 |
"if we do not have multiple processes or its a system process |
6797 |
we start another dispatch loop, which exits when |
|
6798 |
either continue, return or step is pressed |
|
6799 |
or (via the catchBlock) if an error occurs. |
|
6800 |
Since our display is an extra exclusive one, |
|
6801 |
all processing for normal views stops here ... |
|
6802 |
" |
|
6803 |
||
6804 |
WindowGroup setActiveGroup:windowGroup. |
|
6805 |
SignalSet anySignal handle:[:ex | |
|
6806 |
|signal| |
|
6807 |
||
6808 |
signal := ex signal. |
|
6809 |
||
6810 |
self showError:'*** Error in modal debugger: |
|
266 | 6811 |
|
334 | 6812 |
>>>> Signal: ' , signal printString , ' |
266 | 6813 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 6814 |
>>>> From: ' , ex suspendedContext sender printString , ' |
6815 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
6816 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
6817 |
>>>> : ' , 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
|
6818 |
>>>> : ' , 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
|
6819 |
>>>> : ' , 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
|
6820 |
>>>> : ' , 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
|
6821 |
>>>> : ' , 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
|
6822 |
>>>> : ' , 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
|
6823 |
>>>> : ' , 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
|
6824 |
>>>> : ' , 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
|
6825 |
>>>> : ' , 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
|
6826 |
>>>> : ' , 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
|
6827 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 6828 |
>>>> Message: ' , ex description , ' |
266 | 6829 |
|
1187 | 6830 |
caught & ignored.'. |
11210 | 6831 |
ex return. |
6832 |
] do:[ |
|
6833 |
UserNotification handle:[:ex | |
|
6834 |
(ex signal == ActivityNotificationSignal) ifTrue:[ |
|
6835 |
ex proceed |
|
6836 |
]. |
|
6837 |
self showError:ex description. |
|
6838 |
ex proceed. |
|
6839 |
] do:[ |
|
6840 |
device dispatchModalWhile:[Processor activeProcess state:#debug. |
|
6841 |
haveControl]. |
|
6842 |
] |
|
6843 |
]. |
|
6844 |
WindowGroup setActiveGroup:nil. |
|
266 | 6845 |
] ifFalse:[ |
11210 | 6846 |
"we do have multiple processes - |
6847 |
simply enter the DebugViews-Windowgroup event loop. |
|
6848 |
effectively suspending event processing for the currently |
|
6849 |
active group. |
|
6850 |
" |
|
6851 |
SignalSet anySignal handle:[:ex | |
|
6852 |
|answer signal eMsg| |
|
6853 |
||
6854 |
signal := ex signal. |
|
6855 |
||
6856 |
DebuggingDebugger ~~ true ifTrue:[ |
|
6857 |
(signal == ActivityNotification) ifTrue:[ |
|
6858 |
ex proceed |
|
6859 |
]. |
|
6860 |
"/ |
|
6861 |
"/ ignore exceptions which say they explicitly have to be ignored |
|
6862 |
"/ |
|
6863 |
ex catchInDebugger ifTrue:[ |
|
6864 |
'DebugView [info]: ',signal printString,'-signal in debugger cought for close' infoPrintCR. |
|
6865 |
self destroy. |
|
6866 |
ex reject |
|
6867 |
]. |
|
6868 |
||
6869 |
"/ |
|
6870 |
"/ ignore recursive breakpoints |
|
6871 |
"/ |
|
6872 |
(signal isControlInterrupt) ifTrue:[ |
|
6873 |
ignoreBreakpoints == true ifTrue:[ |
|
6874 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
|
6875 |
('DebugView [info]: ',ex suspendedContext printString) infoPrintCR. |
|
6876 |
ex proceed |
|
6877 |
]. |
|
6878 |
]. |
|
6879 |
(signal == TerminateProcessRequest) ifTrue:[ |
|
6880 |
"/ mhm - someone wants to shoot me down while debugging ... |
|
6881 |
answer := Dialog |
|
6882 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
|
6883 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
6884 |
values:#( #proceed #close ) |
|
6885 |
default:#close. |
|
6886 |
answer == #close ifTrue:[ |
|
6887 |
self destroy. |
|
6888 |
ex reject |
|
6889 |
]. |
|
6890 |
ex return. |
|
6891 |
]. |
|
6892 |
signal == RecursiveExceptionError ifTrue:[ |
|
6893 |
(ex parameter signal == BreakPointInterrupt) |
|
6894 |
ifTrue:[ |
|
6895 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
|
6896 |
ex proceed. |
|
6897 |
]. |
|
6898 |
||
6899 |
self showError:'*** Recursive error in debugger: |
|
266 | 6900 |
|
6901 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 6902 |
>>>> ' , ex parameter signal printString , ' |
266 | 6903 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 6904 |
>>>> From: ' , ex suspendedContext sender printString , ' |
6905 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
6906 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
6907 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 6908 |
>>>> Message: ' , ex description , ' |
266 | 6909 |
|
1187 | 6910 |
caught & ignored.'. |
11210 | 6911 |
ex return |
6912 |
]. |
|
6913 |
]. |
|
6914 |
||
6915 |
self topView raiseDeiconified. |
|
6916 |
||
6917 |
eMsg := ex description. |
|
6918 |
(ex signal isControlInterrupt) ifTrue:[ |
|
6919 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
|
6920 |
]. |
|
6921 |
Dialog aboutToOpenBoxNotificationSignal |
|
6922 |
handle:[:ex | ex proceed ] |
|
6923 |
do:[ |
|
6924 |
answer := Dialog |
|
6925 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
|
6926 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
6927 |
values:#( #proceed #cancel #debug ) |
|
6928 |
default:#cancel. |
|
6929 |
]. |
|
6930 |
answer == #debug ifTrue:[ |
|
6931 |
'DebugView [info]: cought exception - debugging' infoPrintCR. |
|
6932 |
Debugger |
|
6933 |
enterUnconditional:(ex suspendedContext) |
|
6934 |
withMessage:'Error in debugger: ' , eMsg |
|
6935 |
mayProceed:true. |
|
6936 |
ex proceed. |
|
6937 |
]. |
|
6938 |
answer == #proceed ifTrue:[ |
|
6939 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
|
6940 |
ex proceed. |
|
6941 |
]. |
|
6942 |
'DebugView [info]: cought exception - returning' infoPrintCR. |
|
6943 |
ex return. |
|
6944 |
] do:[ |
|
6945 |
"/ make certain that sub-debuggers, inspectors etc. |
|
6946 |
"/ come up on my device. |
|
6947 |
Screen currentScreenQuerySignal answer:device |
|
6948 |
do:[ |
|
6949 |
windowGroup |
|
6950 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
6951 |
true] |
|
6952 |
onLeave:[] |
|
6953 |
] |
|
6954 |
]. |
|
266 | 6955 |
]. |
6956 |
catchBlock := nil. |
|
6957 |
||
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6958 |
"Created: / 24.11.1995 / 20:33:45 / cg" |
3447 | 6959 |
"Modified: / 18.11.2001 / 01:04:17 / cg" |
266 | 6960 |
! ! |
6961 |
||
0 | 6962 |
!DebugView methodsFor:'user interaction'! |
6963 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6964 |
checkIfCodeIsReallyModified |
6616 | 6965 |
|source| |
6966 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6967 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6968 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6969 |
currentMethod isNil ifTrue:[ |
11210 | 6970 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6971 |
]. |
6616 | 6972 |
source := currentMethod source. |
6973 |
source notNil ifTrue:[ |
|
11210 | 6974 |
source string = codeView contents string ifTrue:[ |
6975 |
^ false |
|
6976 |
]. |
|
6977 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
6978 |
^ false |
|
6979 |
]. |
|
6616 | 6980 |
]. |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6981 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6982 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6983 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6984 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6985 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6986 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6987 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6988 |
checkSelectionChangeAllowed:newSelection |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6989 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6990 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6991 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6992 |
and:[newSelection = contextView selection]) ifTrue:[ |
11210 | 6993 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6994 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6995 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6996 |
(self confirm:('Code modified - change selection anyway ?')) ifFalse:[ |
11210 | 6997 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6998 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6999 |
codeView modified:false. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7000 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7001 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7002 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7003 |
|
266 | 7004 |
codeAccept:someCode |
7005 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
7006 |
and including selected method cannot be continued." |
|
7007 |
||
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7008 |
^ self codeAccept:someCode unwind:false "true" category:nil onCancel:nil |
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7009 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7010 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 7011 |
! |
7012 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7013 |
codeAccept:someCode inClass:aClass unwind:doUnwind category:category onCancel:cancelAction |
3427 | 7014 |
"user wants some code to be recompiled - must unwind stack since everything above |
7015 |
and including selected method cannot be continued." |
|
7016 |
||
7017 |
" |
|
7018 |
actually, this is not true, since the active methods will still be |
|
7019 |
executed correctly - however, the code shown in the debugger is no |
|
7020 |
longer in sync (showing the new code) with the executed code. |
|
7021 |
Therefore, we hide those contexts to avoid confusion .... |
|
7022 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
7023 |
||
7024 |
"walk up context chain and find highest context which is either the selected context, |
|
7025 |
or - if its a block-context - whose home is the selected context" |
|
7026 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7027 |
|con top newMethod| |
3427 | 7028 |
|
7029 |
codeView withWaitCursorDo:[ |
|
11210 | 7030 |
" |
7031 |
find the method-home context for this one |
|
7032 |
" |
|
7033 |
doUnwind ifTrue:[ |
|
7034 |
con := selectedContext. |
|
7035 |
top := con. |
|
7036 |
[con notNil] whileTrue:[ |
|
7037 |
(con methodHome == selectedContext) ifTrue:[ |
|
7038 |
top := con |
|
7039 |
]. |
|
7040 |
con := con sender |
|
7041 |
]. |
|
7042 |
]. |
|
7043 |
||
7044 |
"/ |
|
7045 |
"/ provide the classes nameSpace on a query; |
|
7046 |
"/ in case we accept while in another nameSpace context, |
|
7047 |
"/ (but for a class which is somewhere else) |
|
7048 |
"/ |
|
7049 |
(Class updateChangeFileQuerySignal, |
|
7050 |
Class updateChangeListQuerySignal, |
|
7051 |
Class updateHistoryLineQuerySignal) answer:true |
|
7052 |
do:[ |
|
7053 |
Class nameSpaceQuerySignal |
|
7054 |
answer:(aClass nameSpace) |
|
7055 |
do:[ |
|
7056 |
Class packageQuerySignal |
|
7057 |
answer:(aClass package ? PackageId noProjectID) |
|
7058 |
do:[ |
|
7059 |
codeView contents:someCode. |
|
7060 |
newMethod := aClass compilerClass |
|
7061 |
compile:someCode |
|
7062 |
forClass:aClass |
|
7063 |
inCategory:category |
|
7064 |
notifying:codeView. |
|
7065 |
]. |
|
7066 |
]. |
|
7067 |
]. |
|
7068 |
||
7069 |
inspecting ifFalse:[ |
|
7070 |
" |
|
7071 |
if it worked, remove everything up to and including top |
|
7072 |
from context chain |
|
7073 |
" |
|
7074 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
7075 |
codeView modified:false. |
|
7076 |
||
7077 |
doUnwind ifTrue:[ |
|
7078 |
selectedContext canReturn ifTrue:[ |
|
7079 |
self setContext:(top "sender"). |
|
7080 |
exitAction := #restart. |
|
7081 |
selectedContext setLineNumber:1. |
|
7082 |
self doRestart. |
|
7083 |
] ifFalse:[ |
|
7084 |
self setContext:(top sender). |
|
7085 |
exitAction := #return. |
|
7086 |
]. |
|
7087 |
||
7088 |
" |
|
7089 |
continue/step is no longer possible |
|
7090 |
" |
|
7091 |
"/ continueButton disable. |
|
7092 |
"/ canContinue := false. |
|
7093 |
]. |
|
7094 |
||
7095 |
contextView selection:1. |
|
7096 |
"/ self showSelection:1. |
|
7097 |
"/ contextView makeSelectionVisible. "/ scrollToLine:(selection - 1) |
|
7098 |
] ifFalse:[ |
|
7099 |
^ cancelAction value |
|
7100 |
] |
|
7101 |
]. |
|
3427 | 7102 |
]. |
7103 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
7104 |
"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
|
7105 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
3427 | 7106 |
! |
7107 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7108 |
codeAccept:someCode unwind:doUnwind category:givenCategoryOrNil onCancel:cancelAction |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7109 |
"user wants some code to be recompiled - must unwind stack since everything above |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7110 |
and including selected method cannot be continued." |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7111 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7112 |
" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7113 |
actually, this is not true, since the active methods will still be |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7114 |
executed correctly - however, the code shown in the debugger is no |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7115 |
longer in sync (showing the new code) with the executed code. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7116 |
Therefore, we hide those contexts to avoid confusion .... |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7117 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7118 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7119 |
"walk up context chain and find highest context which is either the selected context, |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7120 |
or - if its a block-context - whose home is the selected context" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7121 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7122 |
|sel implementorClass method category| |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7123 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7124 |
codeView withWaitCursorDo:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7125 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7126 |
"/ 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
|
7127 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7128 |
"/ con := selectedContext. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7129 |
"/ top := con. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7130 |
"/ [con notNil] whileTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7131 |
"/ (con methodHome == selectedContext) ifTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7132 |
"/ top := con |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7133 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7134 |
"/ con := con sender |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7135 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7136 |
|
10628 | 7137 |
" |
7138 |
use class&selector to find the method for the compilation |
|
7139 |
and compile. |
|
7140 |
" |
|
7141 |
category := givenCategoryOrNil. |
|
7142 |
sel := selectedContext selector. |
|
7143 |
implementorClass := selectedContext methodClass. |
|
7144 |
implementorClass notNil ifTrue:[ |
|
7145 |
category isNil ifTrue:[ |
|
7146 |
method := selectedContext method. |
|
7147 |
method isNil ifTrue:[ |
|
7148 |
method := implementorClass compiledMethodAt:sel. |
|
7149 |
]. |
|
7150 |
category := method category |
|
7151 |
] |
|
7152 |
] ifFalse:[ |
|
7153 |
implementorClass := selectedContext receiver class. |
|
7154 |
implementorClass ~~ Object ifTrue:[ |
|
7155 |
implementorClass := Dialog |
|
7156 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
|
7157 |
initialAnswer:implementorClass name |
|
7158 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
7159 |
implementorClass size == 0 ifTrue:[ |
|
7160 |
^ cancelAction value "/ cancelled |
|
7161 |
]. |
|
7162 |
implementorClass := Smalltalk classNamed:implementorClass. |
|
7163 |
implementorClass isNil ifTrue:[ |
|
7164 |
Dialog warn:'No such class'. |
|
7165 |
^ cancelAction value "/ cancelled |
|
7166 |
]. |
|
7167 |
]. |
|
7168 |
]. |
|
7169 |
||
7170 |
self |
|
7171 |
codeAccept:someCode |
|
7172 |
inClass:implementorClass |
|
7173 |
unwind:doUnwind |
|
7174 |
category:category |
|
7175 |
onCancel:cancelAction. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7176 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7177 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7178 |
"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
|
7179 |
"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
|
7180 |
! |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7181 |
|
7912 | 7182 |
codeCompletion |
7183 |
|cls| |
|
7184 |
||
8212 | 7185 |
currentMethod isNil ifTrue:[ ^ self ]. |
8338 | 7186 |
|
7912 | 7187 |
cls := currentMethod mclass. |
8212 | 7188 |
cls isNil ifTrue:[ ^ self ]. |
7189 |
||
7912 | 7190 |
UserInformation handle:[:ex | |
11210 | 7191 |
ex proceed. |
7912 | 7192 |
] do:[ |
11210 | 7193 |
DoWhatIMeanSupport codeCompletionForClass:cls context:selectedContext codeView:codeView. |
7912 | 7194 |
]. |
7195 |
! |
|
7196 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7197 |
confirm:aString |
6971 | 7198 |
"open a modal yes-no dialog. |
7199 |
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
|
7200 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7201 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
11210 | 7202 |
^ true |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7203 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7204 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7205 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7206 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
7207 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
7208 |
"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
|
7209 |
Also sent to autoselect an interesting context on entry." |
0 | 7210 |
|
9235 | 7211 |
HaltInterrupt handle:[:ex | |
11210 | 7212 |
ignoreBreakpoints ifFalse:[ex reject]. |
7213 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [doShowSelection.]' bindWith:ex suspendedContext) infoPrintCR. |
|
7214 |
ex proceed |
|
3447 | 7215 |
] do:[ |
11210 | 7216 |
self updateForContext:lineNr |
3269 | 7217 |
]. |
7218 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSĂgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
7219 |
|
3447 | 7220 |
"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
|
7221 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7222 |
|
10205 | 7223 |
hideStackInspector |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7224 |
stackInspector notNil ifTrue:[ |
11210 | 7225 |
stackInspector destroy. |
7226 |
stackInspector := nil. |
|
7227 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
|
7228 |
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
|
7229 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7230 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7231 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7232 |
methodCodeToggleChanged |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7233 |
|sel| |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7234 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7235 |
sel := contextView selection. |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7236 |
sel notNil ifTrue:[ |
11210 | 7237 |
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
|
7238 |
] |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7239 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7240 |
"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
|
7241 |
! |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7242 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7243 |
processEvent:anEvent |
6129 | 7244 |
"filter keyboard events for popUp variable value display. |
7245 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7246 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7247 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7248 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7249 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7250 |
evView notNil ifTrue:[ |
11210 | 7251 |
focusView := evView windowGroup focusView. |
7252 |
focusView isNil ifTrue:[ |
|
7253 |
focusView := evView. |
|
7254 |
]. |
|
7255 |
||
7256 |
anEvent isKeyPressEvent ifTrue:[ |
|
7257 |
key := anEvent key. |
|
7258 |
rawKey := anEvent rawKey. |
|
7259 |
||
7260 |
inCodeView := (focusView == codeView |
|
7261 |
or:[focusView isComponentOf:codeView]). |
|
7262 |
inCodeView ifTrue:[ |
|
7263 |
key == #CodeCompletion ifTrue:[ |
|
7264 |
"/ complete the word before/under the cursor. |
|
7265 |
self sensor |
|
7266 |
pushUserEvent:#codeCompletion |
|
7267 |
for:self |
|
7268 |
withArguments:#(). |
|
7269 |
^ true |
|
7270 |
]. |
|
7271 |
]. |
|
7272 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7273 |
|
3602 | 7274 |
false ifTrue:[ |
11210 | 7275 |
anEvent isButtonReleaseEvent ifTrue:[ |
7276 |
anEvent view == codeView ifTrue:[ |
|
7277 |
(RBParser notNil and:[RBParser isLoaded]) |
|
7278 |
ifTrue:[ |
|
7279 |
self sensor |
|
7280 |
pushEvent:anEvent. "/ must be first in queue |
|
7281 |
||
7282 |
self sensor |
|
7283 |
pushUserEvent:#explainSelection |
|
7284 |
for:self |
|
7285 |
withArguments:nil. |
|
7286 |
^ true "/ eaten |
|
7287 |
] |
|
7288 |
] |
|
7289 |
]. |
|
3602 | 7290 |
]. |
7291 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7292 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7293 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7294 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7295 |
|
8212 | 7296 |
setCurrentMethod:aMethodOrNil |
7297 |
currentMethod := aMethodOrNil. |
|
7298 |
! |
|
7299 |
||
11610 | 7300 |
showSelection:lineNr |
1327 | 7301 |
"user clicked on a header line - show selected code in textView. |
7302 |
Also sent to autoselect an interesting context on entry." |
|
11610 | 7303 |
|
7304 |
Notification |
|
7305 |
handle:[:ex | |
|
7306 |
"/ ex suspendedContext fullPrintAll. |
|
7307 |
Transcript showCR:ex description. |
|
7308 |
"/ Transcript showCR:ex parameter. |
|
7309 |
ex proceed |
|
7310 |
] |
|
7311 |
do:[ |
|
7312 |
Error |
|
7313 |
handle:[:ex | |
|
7314 |
|s con| |
|
7315 |
||
7316 |
ex signal isControlInterrupt ifTrue:[ |
|
7317 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' |
|
7318 |
infoPrintCR. |
|
7319 |
ex proceed |
|
7320 |
]. |
|
7321 |
('DebugView [info]: error at %1 when showing selection in debugger ignored' |
|
7322 |
bindWith:ex suspendedContext) infoPrintCR. |
|
7323 |
s := '' writeStream. |
|
7324 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
7325 |
s nextPutLine:'****'. |
|
7326 |
s nextPutLine:'**** ',(ex description). |
|
7327 |
s nextPutLine:'****'. |
|
7328 |
con := ex suspendedContext. |
|
7329 |
s nextPutLine:'**** ',(con printString). |
|
7330 |
con := con sender. |
|
7331 |
HaltInterrupt ignoreIn:[ con fullPrintAllOn:s. ]. |
|
7332 |
||
5842 | 7333 |
"/ [con notNil] whileTrue:[ |
7334 |
"/ Error catch:[:ex | |
|
7335 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
7336 |
"/ ]. |
|
4947 | 7337 |
"/ |
5842 | 7338 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
7339 |
"/ con := nil |
|
7340 |
"/ ] ifFalse:[ |
|
7341 |
"/ con := con sender. |
|
7342 |
"/ ] |
|
7343 |
"/ ]. |
|
11610 | 7344 |
|
7345 |
codeView contents:(s contents). |
|
7346 |
ex return. |
|
7347 |
] |
|
7348 |
do:[ self doShowSelection:lineNr ] |
|
7349 |
] |
|
7350 |
||
7351 |
"Modified: / 19-07-2012 / 10:56:58 / cg" |
|
1327 | 7352 |
! |
7353 |
||
10205 | 7354 |
showStackInspectorFor:con |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7355 |
stackInspector isNil ifTrue:[ |
11210 | 7356 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
7357 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
|
7358 |
stackInspector := InspectorView |
|
7359 |
origin:(0.6 @ 0.0) |
|
7360 |
corner:(1.0 @ 1.0) |
|
7361 |
in:contextInspector superView. |
|
7362 |
stackInspector realize. |
|
7363 |
stackInspector fieldListLabel:'Stack'. |
|
7364 |
stackInspector hideReceiver:true |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7365 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7366 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7367 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7368 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7369 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7370 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7371 |
"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
|
7372 |
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
|
7373 |
|
56 | 7374 |
|con homeContext sel method code canAccept |
105 | 7375 |
implementorClass lineNrInMethod rec m line |
10205 | 7376 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 7377 |
codeSet highlighter evaluatorClass |
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7378 |
canDefine callee searchClass originalMethod| |
3187 | 7379 |
|
7380 |
canDefine := false. |
|
8212 | 7381 |
self setCurrentMethod:nil. |
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
7382 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7383 |
contextArray notNil ifTrue:[ |
10628 | 7384 |
lineNr <= contextArray size ifTrue:[ |
7385 |
con := contextArray at:lineNr. |
|
7386 |
callee := contextArray at:lineNr-1 ifAbsent:nil. |
|
7387 |
]. |
|
7388 |
" |
|
7389 |
clicking on the '** ...'-line shows more ... |
|
7390 |
" |
|
7391 |
con isNil ifTrue:[ |
|
7392 |
line := contextView list at:lineNr. |
|
7393 |
(line startsWith:'**') ifTrue:[ |
|
7394 |
self showMore. |
|
7395 |
lineNr >= contextArray size ifTrue:[ |
|
7396 |
contextView setSelection:lineNr. |
|
7397 |
con := contextArray at:lineNr ifAbsent:nil |
|
7398 |
] |
|
7399 |
]. |
|
7400 |
con isNil ifTrue:[ |
|
7401 |
codeView contents:nil. |
|
7402 |
^ self |
|
7403 |
]. |
|
7404 |
]. |
|
7405 |
||
7406 |
selectedContext := con. |
|
7407 |
m := contextView middleButtonMenu. |
|
7408 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
|
7409 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
|
7410 |
]. |
|
7411 |
||
7412 |
self withExecuteCursorDo:[ |
|
7413 |
codeSet := false. |
|
7414 |
||
7415 |
" |
|
7416 |
give it to the (lower right) inspector |
|
7417 |
" |
|
7418 |
Error handle:[:ex | |
|
11595 | 7419 |
'DebugView [warning]: error while accessing context: ' errorPrint. |
7420 |
ex description errorPrintCR. |
|
10628 | 7421 |
contextInspector inspect:nil. |
11595 | 7422 |
ex suspendedContext fullPrintAllOn: Transcript. |
9479 | 7423 |
"/ ex reject. |
10628 | 7424 |
] do:[ |
7425 |
contextInspector inspect:con. |
|
7426 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
|
7427 |
]. |
|
7428 |
||
7429 |
"/ show a stack inspector sometimes |
|
7430 |
||
7431 |
con hasStackToShow ifTrue:[ |
|
7432 |
self showStackInspectorFor:con |
|
7433 |
] ifFalse:[ |
|
7434 |
self hideStackInspector |
|
7435 |
]. |
|
7436 |
||
7437 |
homeContext := con methodHome. |
|
7438 |
con canReturn ifTrue:[ |
|
7439 |
returnButton enable. restartButton enable. |
|
7440 |
] ifFalse:[ |
|
7441 |
returnButton disable. restartButton disable. |
|
7442 |
]. |
|
7443 |
||
7444 |
lineNrInMethod := con lineNumber. |
|
7445 |
||
7446 |
canAccept := false. |
|
7447 |
||
7448 |
homeContext isNil ifTrue:[ |
|
7449 |
" |
|
7450 |
mhmh - an optimized block |
|
7451 |
should get the block here, and get the method from |
|
7452 |
that one ... |
|
7453 |
But in the current version, there is no easy way to get to the block |
|
7454 |
since that one is not in the context. |
|
7455 |
A future new block calling scheme will fix this |
|
7456 |
(passing the block instead of the home as block argument). |
|
7457 |
" |
|
11610 | 7458 |
(method := con method) isNil ifTrue:[ |
7459 |
"temporary kludge - peek into the sender context. |
|
7460 |
If its a do-like method and there is a single block variable |
|
7461 |
in the args or temporaries, that must be the one. |
|
7462 |
This helps in some cases. |
|
7463 |
" |
|
7464 |
(sender := con sender) notNil ifTrue:[ |
|
7465 |
tryVars := false. |
|
7466 |
(selSender := sender selector) notNil ifTrue:[ |
|
7467 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
|
7468 |
tryVars := true. |
|
7469 |
] |
|
7470 |
]. |
|
7471 |
tryVars ifTrue:[ |
|
7472 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
|
7473 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
|
7474 |
possibleBlocks size == 1 ifTrue:[ |
|
7475 |
method := possibleBlocks first method. |
|
7476 |
]. |
|
10628 | 7477 |
] |
7478 |
]. |
|
11610 | 7479 |
] |
10628 | 7480 |
] ifFalse:[ |
7481 |
"fetch rec here - so we won't need context in doItAction" |
|
7482 |
rec := homeContext receiver. |
|
7483 |
sel := homeContext selector. |
|
7484 |
sel notNil ifTrue:[ |
|
7485 |
canAccept := true. |
|
7486 |
||
7487 |
implementorClass := homeContext methodClass. |
|
7488 |
implementorClass isNil ifTrue:[ |
|
7489 |
Error handle:[:ex | |
|
7490 |
ex signal == BreakPointInterrupt ifTrue:[ |
|
7491 |
ex proceed. |
|
7492 |
]. |
|
7493 |
code := 'error while asking method for its source'. |
|
7494 |
code := code , Character cr , ex signal printString. |
|
7495 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7496 |
||
7497 |
canAccept := false. |
|
7498 |
ex return. |
|
7499 |
] do:[ |
|
7500 |
" |
|
7501 |
special: look if this context was created by |
|
7502 |
valueWithReceiver kind of method invocation; |
|
7503 |
if so, grab the method from the sender and show it |
|
7504 |
" |
|
7505 |
((sender := homeContext sender) notNil |
|
7506 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
|
7507 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7508 |
method := sender receiver. |
|
7509 |
canAccept := false. |
|
7510 |
] ifFalse:[ |
|
7511 |
(method := con method) notNil ifTrue:[ |
|
7512 |
canAccept := false. |
|
7513 |
] |
|
7514 |
]. |
|
7515 |
] |
|
7516 |
] ifFalse:[ |
|
7517 |
method := implementorClass compiledMethodAt:sel. |
|
7518 |
]. |
|
7519 |
] |
|
7520 |
]. |
|
7521 |
||
7522 |
homeContext notNil ifTrue:[ |
|
7523 |
searchClass := homeContext searchClass ? rec class. |
|
7524 |
currentMethod := searchClass lookupMethodFor:sel. |
|
7525 |
]. |
|
7526 |
originalMethod := currentMethod. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7527 |
(currentMethod notNil |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7528 |
and:[currentMethod ~~ method |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7529 |
and:[ (currentMethod isWrapped and:[ method == currentMethod originalMethod]) not ]]) ifTrue:[ |
10628 | 7530 |
originalMethod := method. |
7531 |
methodCodeToggleSelectionHolder value = 1 ifTrue:[ |
|
7532 |
method := originalMethod. |
|
7533 |
] ifFalse:[ |
|
7534 |
method := currentMethod. |
|
7535 |
lineNrInMethod := nil. |
|
7536 |
canAccept := true. |
|
7537 |
]. |
|
7538 |
methodCodeToggle beVisible. |
|
7539 |
] ifFalse:[ |
|
7540 |
methodCodeToggle beInvisible. |
|
7541 |
]. |
|
7542 |
||
7543 |
code isNil ifTrue:[ |
|
7544 |
errMsg := nil. |
|
7545 |
method isNil ifTrue:[ |
|
7546 |
"/ fall back heuristics |
|
7547 |
con isBlockContext ifTrue:[ |
|
7548 |
((sender := con sender) notNil |
|
7549 |
and:[((sender selector ? '') startsWith:'value') |
|
7550 |
and:[sender receiver isBlock]]) ifTrue:[ |
|
7551 |
code := sender receiver source. |
|
7552 |
] |
|
7553 |
] ifFalse:[ |
|
7554 |
((sender := con sender) notNil |
|
7555 |
and:[((sender selector ? '') startsWith:'valueWith') |
|
7556 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7557 |
method := sender receiver. |
|
7558 |
] |
|
7559 |
] |
|
7560 |
]. |
|
7561 |
method notNil ifTrue:[ |
|
7562 |
Error handle:[:ex | |
|
7563 |
ex signal isControlInterrupt ifTrue:[ |
|
7564 |
ex proceed. |
|
7565 |
]. |
|
7566 |
code := 'error while asking method for its source'. |
|
7567 |
code := code , Character cr , ex signal printString. |
|
7568 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7569 |
||
7570 |
canAccept := false. |
|
7571 |
ex return. |
|
7572 |
] do:[ |
|
7573 |
self sensor shiftDown ifTrue:[ |
|
7574 |
code := method decompiledSource |
|
7575 |
] ifFalse:[ |
|
7576 |
code := method source. |
|
7577 |
]. |
|
7578 |
]. |
|
7579 |
code isNil ifTrue:[ |
|
7580 |
method sourceFilename notNil ifTrue:[ |
|
7581 |
codeView contents:(resources |
|
7582 |
string:'** no sourcefile: %1 **' |
|
7583 |
with:method sourceFilename). |
|
7584 |
codeView flash. |
|
7585 |
codeSet := true. |
|
7586 |
] ifFalse:[ |
|
7587 |
[ |
|
7588 |
|src| |
|
7589 |
||
7590 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
|
7591 |
codeView contents:src. |
|
7592 |
codeSet := true. |
|
7593 |
] on: Error do:[ |
|
7594 |
errMsg := '** no source **' |
|
7595 |
]. |
|
7596 |
] |
|
7597 |
]. |
|
7598 |
] ifFalse:[ |
|
7599 |
homeContext isNil ifTrue:[ |
|
7600 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
|
7601 |
] ifFalse:[ |
|
7602 |
errMsg := '** no method - no source **'. |
|
7603 |
canDefine := true. |
|
7604 |
] |
|
7605 |
]. |
|
7606 |
errMsg notNil ifTrue:[ |
|
7607 |
self showError:errMsg. |
|
7608 |
codeSet := true. |
|
7609 |
] |
|
7610 |
]. |
|
7611 |
||
7612 |
code isNil ifTrue:[ |
|
7613 |
"/ canAccept := false. |
|
7614 |
codeSet ifFalse:[ |
|
7615 |
codeView contents:nil. |
|
7616 |
] |
|
7617 |
] ifFalse:[ |
|
7618 |
lineNrInMethod notNil ifTrue:[ |
|
7619 |
lineNrInMethod == 0 ifTrue:[ |
|
7620 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
7621 |
lineNrInMethod := method lineNumber |
|
7622 |
]. |
|
7623 |
"/ guess lineNumber from sent-messages selector |
|
7624 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
|
7625 |
lineNrInMethod == 0 ifTrue:[ |
|
7626 |
|conIdx sentContext messages| |
|
7627 |
||
7628 |
conIdx := contextArray identityIndexOf:con. |
|
7629 |
conIdx > 1 ifTrue:[ |
|
7630 |
sentContext := contextArray at:conIdx-1. |
|
7631 |
sentContext isBlockContext ifFalse:[ |
|
7632 |
(method notNil and:[code notNil]) ifTrue:[ |
|
7633 |
messages := method messagesSent. |
|
7634 |
messages size == 1 ifTrue:[ |
|
7635 |
sentContext selector == messages first ifTrue:[ |
|
7636 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
|
7637 |
] |
|
7638 |
] |
|
7639 |
]. |
|
7640 |
]. |
|
7641 |
]. |
|
7642 |
]. |
|
7643 |
]. |
|
7644 |
]. |
|
7645 |
codeView isCodeView2 ifTrue:[ |
|
10649
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7646 |
codeView model setValue: code. |
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7647 |
codeView model changed. |
10628 | 7648 |
codeView methodHolder value: method. |
10752 | 7649 |
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class]) |
10628 | 7650 |
] ifFalse:[ |
7651 |
||
7652 |
UserPreferences current syntaxColoring ifTrue:[ |
|
7653 |
implementorClass isNil ifTrue:[ |
|
7654 |
(con isBlockContext |
|
7655 |
and:[con home isNil |
|
7656 |
and:[con guessedHome notNil]]) |
|
7657 |
ifTrue:[ |
|
7658 |
implementorClass := con guessedHome mclass |
|
7659 |
] |
|
7660 |
]. |
|
7661 |
implementorClass notNil ifTrue:[ |
|
7662 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
|
7663 |
code size < 100000 ifTrue:[ |
|
7664 |
Error handle:[:ex | |
|
7665 |
] do:[ |
|
7666 |
code := highlighter formatMethod:code in:implementorClass. |
|
7667 |
] |
|
7668 |
] |
|
7669 |
] |
|
7670 |
] |
|
7671 |
]. |
|
1555 | 7672 |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7673 |
"/ code ~= (codeView contents) ifTrue:[ |
10628 | 7674 |
codeView setContents:code. |
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7675 |
"/ ]. |
10628 | 7676 |
]. |
7677 |
(lineNrInMethod notNil |
|
7678 |
and:[lineNrInMethod ~~ 0 |
|
7679 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
|
7000 | 7680 |
lineNrInMethod == 255 ifFalse:[ |
10628 | 7681 |
(lineNrInMethod == 255 |
7682 |
and:[method notNil |
|
7683 |
and:[method hasCode not]]) ifTrue:[ |
|
7684 |
"/ means: do not really know in interpreted methods |
|
7685 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
|
7686 |
] ifFalse:[ |
|
7687 |
codeView selectLine:lineNrInMethod. |
|
7688 |
]. |
|
7689 |
codeView makeSelectionVisible |
|
7000 | 7690 |
]. |
10628 | 7691 |
] ifFalse:[ |
7692 |
codeView unselect. |
|
7693 |
codeView scrollToTop |
|
7694 |
] |
|
7695 |
]. |
|
7696 |
||
7697 |
codeView acceptEnabled:canAccept. |
|
7698 |
canAccept ifTrue:[ |
|
7699 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
7700 |
] ifFalse:[ |
|
7701 |
codeView acceptAction:[:code | self beep] |
|
7702 |
]. |
|
7703 |
||
7704 |
receiverInspector inspect:rec. |
|
7705 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
|
7706 |
||
7707 |
" |
|
7708 |
the one below is wrong: currently, the |
|
7709 |
evaluator cannot handle passed contexts. |
|
7710 |
Once it does, pass con as in:-arg |
|
7711 |
" |
|
7712 |
(rec isJavaObject |
|
7713 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
7714 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
7715 |
evaluatorClass := Parser |
|
7716 |
] ifFalse:[ |
|
7717 |
(method notNil and:[method mclass notNil]) ifTrue:[ |
|
7718 |
evaluatorClass := method mclass evaluatorClass. |
|
7719 |
] ifFalse:[ |
|
7720 |
evaluatorClass := rec class evaluatorClass. |
|
7721 |
]. |
|
7722 |
]. |
|
7723 |
||
7724 |
codeView doItAction:[:theCode | |
|
7725 |
evaluatorClass |
|
7726 |
evaluate:theCode |
|
7727 |
in:actualContext |
|
7728 |
receiver:rec |
|
7729 |
notifying:codeView |
|
7730 |
logged:true |
|
7731 |
ifFail:nil |
|
7732 |
]. |
|
7733 |
self setCurrentMethod:method. |
|
7734 |
||
11610 | 7735 |
selectedContext := homeContext ? con. |
10628 | 7736 |
actualContext := con |
7737 |
]. |
|
4122 | 7738 |
] ifFalse:[ |
10628 | 7739 |
codeView contents:nil. |
4122 | 7740 |
]. |
7741 |
codeView modified:false. |
|
7742 |
||
7743 |
con isContext ifFalse:[ |
|
10628 | 7744 |
sendButton disable. |
4122 | 7745 |
] ifTrue:[ |
10628 | 7746 |
sendButton enable. |
10205 | 7747 |
]. |
7748 |
||
7749 |
"clear out locals to prevent keeping around unneeded contexts |
|
4122 | 7750 |
(due to the block held in codeView). |
7751 |
(not really needed, since stuff gets collected away sooner or later ... |
|
7752 |
... but this makes it a bit sooner) |
|
7753 |
" |
|
7754 |
con := nil. |
|
7755 |
homeContext := nil. |
|
7756 |
||
10205 | 7757 |
(callee notNil |
7758 |
and:[callee method notNil |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7759 |
and:[callee method selector == #subclassResponsibility]] |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7760 |
) ifTrue:[ |
10628 | 7761 |
canDefine := true. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7762 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7763 |
|
4122 | 7764 |
canDefine ifTrue:[ |
10628 | 7765 |
defineButton beVisible. |
4122 | 7766 |
] ifFalse:[ |
10628 | 7767 |
defineButton beInvisible. |
4122 | 7768 |
]. |
7769 |
||
7770 |
" |
|
7771 |
enable/disable some menu items |
|
7772 |
" |
|
7773 |
self updateMenuItems |
|
7774 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
7775 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
10752 | 7776 |
"Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11647 | 7777 |
"Modified: / 23-07-2012 / 12:23:49 / cg" |
4122 | 7778 |
! ! |
7779 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7780 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'! |
8170 | 7781 |
|
7782 |
ignoreCount:something |
|
7783 |
ignoreCount := something. |
|
7784 |
! |
|
7785 |
||
7786 |
ignoreEndTime:something |
|
7787 |
ignoreEndTime := something. |
|
7788 |
! |
|
7789 |
||
11210 | 7790 |
ignoreUntilShiftKeyPressed:aBoolean |
7791 |
ignoreUntilShiftKeyPressed := aBoolean. |
|
7792 |
||
7793 |
"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
|
7794 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7795 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7796 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7797 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7798 |
decrementIgnoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7799 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7800 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7801 |
ignoreCount := ignoreCount - 1 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7802 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7803 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7804 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7805 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7806 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7807 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7808 |
printConditionOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7809 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7810 |
aStream nextPutAll:' until shiftKey pressed'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7811 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7812 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7813 |
aStream nextPutAll:' until '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7814 |
ignoreEndTime printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7815 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7816 |
(ignoreCount > 0) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7817 |
aStream nextPutAll:' for '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7818 |
ignoreCount printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7819 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7820 |
(ignoreCount < 0) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7821 |
aStream nextPutAll:' forEver'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7822 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7823 |
aStream nextPutAll:' no longer'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7824 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7825 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7826 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7827 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7828 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7829 |
"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
|
7830 |
"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
|
7831 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7832 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7833 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7834 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7835 |
haltIgnoredInfoString |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7836 |
"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
|
7837 |
nil if not ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7838 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7839 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7840 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7841 |
^ '%1 more calls ignored' bindWith:ignoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7842 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7843 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7844 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7845 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7846 |
(ignoreEndTime > Timestamp now) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7847 |
^ 'ignored until %1' bindWith:ignoreEndTime |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7848 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7849 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7850 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7851 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7852 |
Display shiftDown ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7853 |
^ 'ignored until shiftKey is pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7854 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7855 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7856 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7857 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7858 |
^ 'ignored until reenabled' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7859 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7860 |
"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
|
7861 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7862 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7863 |
isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7864 |
"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
|
7865 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7866 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7867 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7868 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7869 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7870 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7871 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7872 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7873 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7874 |
"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
|
7875 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7876 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7877 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7878 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7879 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7880 |
"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
|
7881 |
"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
|
7882 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7883 |
|
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7884 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7885 |
^ false |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7886 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7887 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7888 |
"Created: / 06-03-2012 / 14:36:28 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7889 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7890 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7891 |
isHaltIgnored |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7892 |
"true if this halt should be ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7893 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7894 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7895 |
^ Display shiftDown not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7896 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7897 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7898 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7899 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7900 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7901 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7902 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7903 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7904 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7905 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7906 |
"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
|
7907 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7908 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7909 |
!DebugView::IgnoredHalt methodsFor:'accessing'! |
11210 | 7910 |
|
8170 | 7911 |
method |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7912 |
|m| |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7913 |
|
9922 | 7914 |
weakMethodHolder == #all ifTrue:[^ weakMethodHolder ]. |
7915 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7916 |
m := weakMethodHolder at:1. |
9796 | 7917 |
"/ wait until really gone (it could still be on the call stack |
7918 |
"/ |
|
7919 |
"/ m notNil ifTrue:[ |
|
7920 |
"/ m mclass isNil ifTrue:[ |
|
7921 |
"/ "/ no longer valid |
|
7922 |
"/ weakMethodHolder at:1 put:nil. |
|
7923 |
"/ ^ nil |
|
7924 |
"/ ]. |
|
7925 |
"/ ]. |
|
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7926 |
^ m |
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7927 |
|
9922 | 7928 |
"Modified: / 08-05-2011 / 10:28:10 / cg" |
8170 | 7929 |
! |
7930 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7931 |
method:methodArg lineNumber:lineNumberArg |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7932 |
"/ self assert:(methodArg mclass notNil). |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7933 |
|
9922 | 7934 |
methodArg == #all ifTrue:[ |
11210 | 7935 |
weakMethodHolder := methodArg |
9922 | 7936 |
] ifFalse:[ |
11210 | 7937 |
weakMethodHolder := WeakArray with:methodArg. |
9922 | 7938 |
]. |
8170 | 7939 |
lineNumber := lineNumberArg. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7940 |
|
9922 | 7941 |
"Modified: / 08-05-2011 / 10:28:41 / cg" |
8170 | 7942 |
! ! |
7943 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7944 |
!DebugView::IgnoredHalt methodsFor:'printing'! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7945 |
|
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7946 |
printOn:aStream |
9922 | 7947 |
|method| |
7948 |
||
7949 |
(method := self method) isNil ifTrue:[ |
|
11210 | 7950 |
aStream nextPutAll:'an obsolete IgnoredHalt'. |
7951 |
^ self |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7952 |
]. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7953 |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7954 |
aStream nextPutAll:'Ignore '. |
11210 | 7955 |
method whoString printOn:aStream. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7956 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7957 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7958 |
"Modified: / 06-03-2012 / 12:41:19 / cg" |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7959 |
! ! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7960 |
|
8170 | 7961 |
!DebugView::IgnoredHalt methodsFor:'queries'! |
7962 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7963 |
isActive |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7964 |
"true if this ignore-entry is still active" |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7965 |
|
9796 | 7966 |
self method isNil ifTrue:[self halt. ^ false ]. "/ method no longer valid |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7967 |
^ super isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7968 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7969 |
"Modified: / 06-03-2012 / 12:40:20 / cg" |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7970 |
! |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7971 |
|
8170 | 7972 |
isForMethod:aMethod line:line |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7973 |
"/ check in this order - method has a flushing side-effect, which is useful here... |
9922 | 7974 |
weakMethodHolder == #all ifTrue:[^ true]. |
7975 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7976 |
^ (aMethod = self method) and:[ line = lineNumber ]. |
9922 | 7977 |
|
7978 |
"Modified: / 08-05-2011 / 10:27:31 / cg" |
|
8170 | 7979 |
! |
7980 |
||
7981 |
isHaltIgnoredInMethod:aMethod line:line |
|
9095 | 7982 |
"/ 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
|
7983 |
|
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7984 |
(self isForMethod:aMethod line:line) ifFalse:[^ false]. |
9095 | 7985 |
"/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored. |
8170 | 7986 |
|
7987 |
^ self isHaltIgnored |
|
7988 |
! ! |
|
7989 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7990 |
!DebugView::IgnoredBreakpoint methodsFor:'accessing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7991 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7992 |
parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7993 |
^ parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7994 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7995 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7996 |
parameter:something |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7997 |
parameter := something. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7998 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7999 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8000 |
!DebugView::IgnoredBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8001 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8002 |
printOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8003 |
aStream nextPutAll:'Ignore breakpoint:#', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8004 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8005 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8006 |
"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
|
8007 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8008 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8009 |
!DebugView::IgnoredBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8010 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8011 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8012 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8013 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8014 |
"Created: / 06-03-2012 / 12:54:35 / cg" |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8015 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8016 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8017 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8018 |
^ paramArg = parameter |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8019 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8020 |
"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
|
8021 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8022 |
|
4122 | 8023 |
!DebugView class methodsFor:'documentation'! |
8024 |
||
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8025 |
version |
11661 | 8026 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.549 2012-07-25 17:20:06 cg Exp $' |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8027 |
! |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8028 |
|
8952
7742c63ff6f5
catch halts in: #showSelection:
Claus Gittinger <cg@exept.de>
parents:
8745
diff
changeset
|
8029 |
version_CVS |
11661 | 8030 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.549 2012-07-25 17:20:06 cg Exp $' |
10628 | 8031 |
! |
8032 |
||
8033 |
version_SVN |
|
8034 |
^ '§Id: DebugView.st 7818 2011-08-18 11:42:39Z vranyj1 §' |
|
4122 | 8035 |
! ! |
8036 |
||
8037 |
DebugView initialize! |