author | Claus Gittinger <cg@exept.de> |
Fri, 22 Jan 2016 20:21:35 +0100 | |
changeset 16058 | d07dc4e285bc |
parent 15960 | 196e6963974c |
child 16065 | 9993910b75c5 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
15413 | 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 |
|
15084 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
0 | 16 |
StandardSystemView subclass:#DebugView |
12839 | 17 |
instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView |
18 |
receiverInspector contextInspector contextArray selectedContext |
|
19 |
catchBlock grabber mayProceed traceView tracing bigStep |
|
14714 | 20 |
skipLineNr abortButton terminateButton continueButton stepButton |
21 |
nextButton nextOverButton nextOutButton sendButton returnButton |
|
22 |
restartButton exclusive inspecting nChainShown inspectedProcess |
|
23 |
updateProcess updateButton defineButton monitorToggle stepping |
|
24 |
steppedContextLineno actualContext inWrap stackInspector |
|
15257 | 25 |
steppedContext wrapperContext firstContext stepHow cachable |
26 |
currentMethod ignoreBreakpoints stepUntilEntering |
|
27 |
lastStepUntilEntering lastSelectionInReceiverInspector |
|
28 |
lastSelectionInContextInspector canShowMore reportButton |
|
29 |
setOfHiddenCallingSelectors isStoppedAtHaltOrBreakPoint |
|
30 |
exceptionInfoLabel methodCodeToggle |
|
12839 | 31 |
methodCodeToggleSelectionHolder |
32 |
isStoppedAtBreakPointWithParameter breakPointParameter |
|
13362 | 33 |
hideSupportCode contextInfoLabel resendButton |
13488 | 34 |
gotoDialogOpenerButton isStoppedInModalDialog selectorToDefine |
14523 | 35 |
classToDefineIn gotoApplicationActionMethodButton |
15257 | 36 |
isStoppedInApplicationAction isStoppedAtStatementBreakpoint |
37 |
verboseBacktraceHolder' |
|
12839 | 38 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
15497 | 39 |
DebuggingDebugger DebuggingDebugger2 DebuggingContextWalk |
12839 | 40 |
DefaultDebuggerBackgroundColor InitialNChainShown IgnoredHalts |
41 |
ShowThreadID LastIgnoreHaltNTimes LastIgnoreHaltDuration |
|
13111 | 42 |
LastExtent LastOrigin RememberedCallChain DebuggingDebugger3 |
14695 | 43 |
NumberOfDebuggers DebuggerOnMainDisplayOnly' |
12839 | 44 |
poolDictionaries:'' |
45 |
category:'Interface-Debugger' |
|
0 | 46 |
! |
47 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
48 |
Object subclass:#IgnoredHaltOrBreakpoint |
12937 | 49 |
instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed |
14608 | 50 |
ignoredReceiverClasses ignoredProcesses |
51 |
ignoredSendingClassAndSelectors' |
|
12839 | 52 |
classVariableNames:'' |
53 |
poolDictionaries:'' |
|
54 |
privateIn:DebugView |
|
11366
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
57 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredHalt |
12839 | 58 |
instanceVariableNames:'weakMethodHolder lineNumber' |
59 |
classVariableNames:'' |
|
60 |
poolDictionaries:'' |
|
61 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
62 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
63 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
64 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredBreakpoint |
12839 | 65 |
instanceVariableNames:'parameter' |
66 |
classVariableNames:'' |
|
67 |
poolDictionaries:'' |
|
68 |
privateIn:DebugView |
|
8170 | 69 |
! |
70 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
71 |
!DebugView class methodsFor:'documentation'! |
29 | 72 |
|
73 |
copyright |
|
74 |
" |
|
75 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
15413 | 76 |
All Rights Reserved |
29 | 77 |
|
78 |
This software is furnished under a license and may be used |
|
79 |
only in accordance with the terms of that license and with the |
|
80 |
inclusion of the above copyright notice. This software may not |
|
81 |
be provided or otherwise made available to, or used by, any |
|
82 |
other person. No title to or ownership of the software is |
|
83 |
hereby transferred. |
|
84 |
" |
|
85 |
! |
|
0 | 86 |
|
29 | 87 |
documentation |
88 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
89 |
This class implements a graphical debugger interface. |
29 | 90 |
The debugger usually sits on top of the faulting process, |
10205 | 91 |
taking over its event processing. |
12840 | 92 |
|
2358 | 93 |
(this is different from other Smalltalk debuggers, which control |
94 |
the debuggee as a separate process. Consider this an historic |
|
14680 | 95 |
leftover - the debugger was one of the first applications written for ST/X. |
96 |
||
12840 | 97 |
The whole setup might be changed, once the required process primitives |
98 |
are available, which allow control of another processes execution |
|
99 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
14680 | 100 |
to have the debugger control the debuggee (i.e. two processes). |
15413 | 101 |
However, as it works as it is, and is reliable enough, |
14680 | 102 |
why should we change it without a particular need...). |
2358 | 103 |
|
104 |
Only the 'stopped' debugged process is affected; |
|
29 | 105 |
other processes continue to respond to events. |
12840 | 106 |
The one exception to this is when an error occurs within the dispatcher process |
107 |
or in one of the eventhandler processes. In this case, the debugger |
|
29 | 108 |
will sit on an exclusive display connection. |
109 |
||
35 | 110 |
See additional information in 'doc/misc/debugger.doc'. |
53 | 111 |
|
14680 | 112 |
Notice & Warning (attention when changing thingslike menus, window spec etc. here): |
15413 | 113 |
the DebugView class caches the last used debugger in a class variable, |
114 |
and hides/shows this window without recreating one from scratch. This is done to make |
|
115 |
the debugger come up faster when single stepping, or hopping from breakpoint to breakpoint. |
|
116 |
||
117 |
It may happen, that a malfunctioning debugger (for example, a halfway created/destroyed one) |
|
118 |
is kept there. You will notice this, if a debugger comes up without showing any contents. |
|
119 |
In this case, close (or destroy) the broken debugView, and execute |
|
120 |
Debugger newDebugger |
|
121 |
which removes the cached debugger and forces creation of a new one the next time. |
|
122 |
This is a temporary workaround - the debugger should be fixed to avoid this situation. |
|
123 |
||
124 |
You must also flush the cached debugger, if you change the debugger's |
|
125 |
initialization code (buttons, menu, etc.) or the debugger's class layout, |
|
126 |
and you want the new code to become effective. |
|
508 | 127 |
|
128 |
[author:] |
|
15413 | 129 |
Claus Gittinger |
508 | 130 |
|
131 |
[see also:] |
|
15413 | 132 |
Exception Signal |
133 |
Process |
|
29 | 134 |
" |
135 |
! ! |
|
0 | 136 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
137 |
!DebugView class methodsFor:'initialization'! |
243 | 138 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
139 |
initialize |
13362 | 140 |
DebuggingDebugger := DebuggingDebugger2 := MoreDebuggingDetail := false. |
141 |
||
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
142 |
InitialNChainShown := 50. |
8148 | 143 |
"/ DefaultDebuggerBackgroundColor := nil. |
3387 | 144 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
145 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
146 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
147 |
"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
|
148 |
"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
|
149 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
150 |
|
243 | 151 |
reinitialize |
7822 | 152 |
"reinitialize after an image-restart" |
153 |
||
243 | 154 |
self newDebugger |
155 |
! ! |
|
156 |
||
10203 | 157 |
!DebugView class methodsFor:'cleanup'! |
158 |
||
10205 | 159 |
lowSpaceCleanup |
10203 | 160 |
"in low memory situations, give up cached debuggers" |
161 |
||
162 |
CachedDebugger := nil. |
|
163 |
CachedExclusive := nil. |
|
164 |
OpenDebuggers := nil. |
|
11391 | 165 |
RememberedCallChain := nil. |
10203 | 166 |
|
167 |
" |
|
168 |
DebugView lowSpaceCleanup |
|
169 |
" |
|
170 |
||
11391 | 171 |
"Modified: / 08-03-2012 / 01:30:21 / cg" |
10203 | 172 |
! |
173 |
||
174 |
newDebugger |
|
13488 | 175 |
"force creation of a new debugger (give up cached debuggers). |
176 |
Call this, if you changed the debugger heavily, and you want to avoid |
|
177 |
that an old, cached debugger gets reused when the next error comes around." |
|
10203 | 178 |
|
179 |
CachedDebugger := nil. |
|
180 |
CachedExclusive := nil. |
|
181 |
OpenDebuggers := nil. |
|
182 |
||
183 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
|
15413 | 184 |
Debugger := self |
10203 | 185 |
]. |
186 |
||
187 |
" |
|
188 |
DebugView newDebugger |
|
189 |
" |
|
190 |
! ! |
|
191 |
||
192 |
!DebugView class methodsFor:'defaults'! |
|
193 |
||
14695 | 194 |
debuggerOnMainDisplayOnly |
195 |
^ DebuggerOnMainDisplayOnly ? true |
|
196 |
! |
|
197 |
||
10203 | 198 |
defaultIcon |
199 |
"return the browsers default window icon" |
|
200 |
||
201 |
<resource: #programImage> |
|
202 |
||
10205 | 203 |
^ ToolbarIconLibrary debug22x22Icon |
10203 | 204 |
"/ ^ ToolbarIconLibrary debugIt20x20Icon |
205 |
||
206 |
"Modified: / 11-02-2007 / 11:47:20 / cg" |
|
207 |
! |
|
208 |
||
209 |
defaultIconForAboutBox |
|
210 |
<resource: #programImage> |
|
211 |
||
10205 | 212 |
^ ToolbarIconLibrary debug22x22IconForBlackBackgound |
10203 | 213 |
! |
214 |
||
215 |
defaultVerboseBacktrace |
|
216 |
<resource: #obsolete> |
|
217 |
self obsoleteMethodWarning. |
|
218 |
^ UserPreferences current verboseBacktraceInDebugger |
|
219 |
||
220 |
"Created: 11.1.1997 / 12:14:35 / cg" |
|
221 |
! |
|
222 |
||
223 |
defaultVerboseBacktrace:aBoolean |
|
224 |
<resource: #obsolete> |
|
225 |
self obsoleteMethodWarning. |
|
226 |
UserPreferences current verboseBacktraceInDebugger:aBoolean |
|
227 |
! |
|
228 |
||
13111 | 229 |
maxNumberOfDebuggers |
230 |
"to prevent debuggers from flooding the screen, |
|
231 |
in case of an error in an ever-forked background process |
|
232 |
(such as tooltip process)" |
|
233 |
||
234 |
^ 10 |
|
235 |
! |
|
236 |
||
10203 | 237 |
updateStyleCache |
238 |
"extract values from the styleSheet and cache them in class variables" |
|
239 |
||
240 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
241 |
||
242 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
|
243 |
||
244 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
245 |
! ! |
|
246 |
||
247 |
!DebugView class methodsFor:'ignoring halts'! |
|
248 |
||
249 |
haltIgnoreInformationFor:haltingMethod atLineNr:lineNrInHaltingMethod |
|
250 |
"the information (if any) about the ignore-state of a halt" |
|
251 |
||
252 |
IgnoredHalts isNil ifTrue:[^ nil]. |
|
253 |
||
10205 | 254 |
IgnoredHalts do:[:ign | |
15413 | 255 |
(ign isForMethod:haltingMethod line:lineNrInHaltingMethod) |
256 |
"/ (ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) |
|
257 |
ifTrue:[ |
|
258 |
^ ign |
|
259 |
]. |
|
10203 | 260 |
]. |
261 |
^ nil. |
|
262 |
! |
|
263 |
||
264 |
hasIgnoredHalts |
|
265 |
self removeInactiveIgnores. |
|
266 |
^ IgnoredHalts notEmptyOrNil |
|
267 |
! |
|
268 |
||
15413 | 269 |
ignoreBreakpointWithParameter:parameterOrNil |
270 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
271 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
14608 | 272 |
|
12937 | 273 |
"remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations |
274 |
or until some time has elapsed. |
|
275 |
With nil count and time arguments, such an ignored breakpoint is reactivated" |
|
276 |
||
15413 | 277 |
self |
278 |
ignoreHaltOrBreakpoint:#halt |
|
279 |
method:nil line:nil |
|
280 |
parameter:parameterOrNil |
|
281 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
282 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
283 |
orIfCalledFromMethod:nil |
|
284 |
! |
|
285 |
||
286 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
|
287 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
288 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
14608 | 289 |
|
12937 | 290 |
"remember to ignore a halt in some method for some number of invocations |
291 |
or until some time has elapsed. |
|
292 |
With nil count and time arguments, such an ignored halt is reactivated" |
|
293 |
||
15413 | 294 |
self |
295 |
ignoreHaltOrBreakpoint:#halt |
|
296 |
method:haltingMethod line:lineNrOfHalt |
|
297 |
parameter:nil |
|
298 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
299 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
300 |
orIfCalledFromMethod:nil |
|
301 |
! |
|
302 |
||
303 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
|
304 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
305 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
306 |
orIfCalledFromMethod:ifCalledForMethodOrNil |
|
14608 | 307 |
|
308 |
"remember to ignore a halt in some method for some number of invocations |
|
309 |
or until some time has elapsed. |
|
310 |
With nil count and time arguments, such an ignored halt is reactivated" |
|
311 |
||
15413 | 312 |
self |
313 |
ignoreHaltOrBreakpoint:#halt |
|
314 |
method:haltingMethod line:lineNrOfHalt |
|
315 |
parameter:nil |
|
316 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
317 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
318 |
orIfCalledFromMethod:ifCalledForMethodOrNil |
|
319 |
! |
|
320 |
||
321 |
ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil |
|
322 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
323 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
12937 | 324 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
325 |
"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
|
326 |
or until some time has elapsed. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
327 |
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
|
328 |
|
14608 | 329 |
^ self |
15413 | 330 |
ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil |
331 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
332 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
333 |
orIfCalledFromMethod:nil |
|
334 |
! |
|
335 |
||
336 |
ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil |
|
337 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
338 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
339 |
orIfCalledFromMethod:ifCalledFromMethodOrNil |
|
14608 | 340 |
|
341 |
"remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations |
|
342 |
or until some time has elapsed. |
|
343 |
With nil count and time arguments, such an ignored breakpoint is reactivated" |
|
344 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
345 |
|oldEntry ign| |
12947 | 346 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
347 |
IgnoredHalts notNil ifTrue:[ |
15413 | 348 |
self removeInactiveIgnores. |
349 |
type == #halt ifTrue:[ |
|
350 |
oldEntry := IgnoredHalts |
|
351 |
detect:[:ign | ign isForMethod:methodOrNil line:lineNrOfHaltOrNil] |
|
352 |
ifNone:nil. |
|
353 |
] ifFalse:[ |
|
354 |
oldEntry := IgnoredHalts |
|
355 |
detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil] |
|
356 |
ifNone:nil. |
|
357 |
]. |
|
358 |
oldEntry notNil ifTrue:[ |
|
359 |
(processOrNil notNil or:[receiverClassOrNil notNil]) ifTrue:[ |
|
360 |
receiverClassOrNil notNil ifTrue:[ |
|
361 |
oldEntry ignoreForReceiverClass:receiverClassOrNil. |
|
362 |
]. |
|
363 |
processOrNil notNil ifTrue:[ |
|
364 |
oldEntry ignoreForProcess:processOrNil. |
|
365 |
]. |
|
366 |
^ self. |
|
367 |
]. |
|
368 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
|
369 |
] |
|
370 |
]. |
|
371 |
||
372 |
(countOrNil notNil |
|
373 |
or:[dTOrNil notNil |
|
12937 | 374 |
or:[untilShiftKey == true |
375 |
or:[receiverClassOrNil notNil |
|
14608 | 376 |
or:[processOrNil notNil |
377 |
or:[ifCalledFromMethodOrNil notNil]]]]] |
|
12937 | 378 |
) ifTrue:[ |
15413 | 379 |
IgnoredHalts isNil ifTrue:[ |
380 |
IgnoredHalts := OrderedCollection new. |
|
381 |
]. |
|
382 |
type == #halt ifTrue:[ |
|
383 |
ign := IgnoredHalt new method:methodOrNil lineNumber:lineNrOfHaltOrNil. |
|
384 |
] ifFalse:[ |
|
385 |
ign := IgnoredHalt new breakpointWithParameter:parameterOrNil. |
|
386 |
]. |
|
387 |
||
388 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
|
389 |
ign ignoreCount:countOrNil. |
|
390 |
]. |
|
391 |
(dTOrNil notNil) ifTrue:[ |
|
392 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
|
393 |
]. |
|
394 |
untilShiftKey == true ifTrue:[ |
|
395 |
ign ignoreUntilShiftKeyPressed:true. |
|
396 |
]. |
|
397 |
receiverClassOrNil notNil ifTrue:[ |
|
398 |
ign ignoreForReceiverClass:receiverClassOrNil. |
|
399 |
]. |
|
400 |
processOrNil notNil ifTrue:[ |
|
401 |
ign ignoreForProcess:processOrNil. |
|
402 |
]. |
|
403 |
ifCalledFromMethodOrNil notNil ifTrue:[ |
|
404 |
ign ignoreIfCalledFromMethod:ifCalledFromMethodOrNil. |
|
405 |
]. |
|
406 |
IgnoredHalts add:ign. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
407 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
408 |
Smalltalk changed:#ignoredHalts. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
409 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
410 |
"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
|
411 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
412 |
|
12937 | 413 |
isBreakpointToBeIgnoredForParameter:parameter context:aContext modifyEntryCount:modifyCount |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
414 |
"/ should a breakpoint be ignored ? |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
415 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
416 |
IgnoredHalts isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
417 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
418 |
"/ 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
|
419 |
IgnoredHalts do:[:ign | |
15413 | 420 |
(ign isForBreakpointWithParameter:parameter) ifTrue:[ |
421 |
Transcript show:'Debugger [info]: break ignored for ', parameter. |
|
422 |
||
423 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
|
424 |
ign isHaltIgnored ifFalse:[ |
|
425 |
Transcript showCR:'Debugger [info]: no longer ignore breakpoint for ', parameter. |
|
426 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
427 |
]. |
|
428 |
^ true. |
|
429 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
430 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
431 |
|
13162 | 432 |
IgnoredHalts := (IgnoredHalts reject:[:ign | ign isActive not ]) asNilIfEmpty. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
433 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
434 |
^ false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
435 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
436 |
"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
|
437 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
438 |
|
12937 | 439 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod context:aContext modifyEntryCount:modifyCount |
12562 | 440 |
"should a halt be ignored ?" |
441 |
||
442 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
443 |
||
444 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
|
445 |
IgnoredHalts do:[:ign | |
|
15413 | 446 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod context:aContext) ifTrue:[ |
447 |
Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString. |
|
448 |
Transcript show:' ('; show:ign; showCR:')'. |
|
449 |
||
450 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
|
451 |
ign isHaltIgnored ifFalse:[ |
|
452 |
Transcript showCR:'Debugger [info]: no longer ignore halt in ', haltingMethod whoString. |
|
453 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
454 |
]. |
|
455 |
^ true. |
|
456 |
]. |
|
12562 | 457 |
]. |
458 |
||
13162 | 459 |
IgnoredHalts := (IgnoredHalts reject:[:ign | ign isActive not]) asNilIfEmpty. |
12562 | 460 |
|
461 |
^ false. |
|
462 |
||
463 |
"Modified (comment): / 06-03-2012 / 12:51:43 / cg" |
|
464 |
! |
|
465 |
||
10203 | 466 |
removeInactiveIgnores |
467 |
IgnoredHalts notNil ifTrue:[ |
|
15413 | 468 |
IgnoredHalts := IgnoredHalts select:[:i | i isActive]. |
10203 | 469 |
]. |
470 |
! |
|
471 |
||
472 |
stopIgnoringHalts |
|
473 |
"forget about all ignored halts" |
|
474 |
||
475 |
IgnoredHalts := nil. |
|
476 |
Smalltalk changed:#ignoredHalts. |
|
15302 | 477 |
! |
478 |
||
479 |
stopIgnoringHaltsFor:haltingMethod atLineNr:lineNrInHaltingMethod |
|
480 |
"remove the information (if any) about the ignore-state of a halt; |
|
481 |
effectively reenables the breakpoint/halt" |
|
482 |
||
483 |
IgnoredHalts isNil ifTrue:[^ self]. |
|
484 |
||
485 |
IgnoredHalts := IgnoredHalts reject:[:ign | |
|
15413 | 486 |
(ign isForMethod:haltingMethod line:lineNrInHaltingMethod) |
15302 | 487 |
]. |
10203 | 488 |
! ! |
489 |
||
490 |
!DebugView class methodsFor:'instance creation / entering'! |
|
0 | 491 |
|
2421 | 492 |
enter |
493 |
"enter a debugger" |
|
494 |
||
5455 | 495 |
<context: #return> |
496 |
||
10205 | 497 |
^ self |
15413 | 498 |
enter:thisContext sender |
499 |
withMessage:'Debugger Entered' |
|
500 |
mayProceed:true. |
|
10205 | 501 |
! |
502 |
||
503 |
enter:aContext withMessage:aString |
|
2355 | 504 |
"enter a debugger" |
505 |
||
5455 | 506 |
<context: #return> |
507 |
||
2355 | 508 |
^ self |
15413 | 509 |
enter:aContext |
510 |
withMessage:aString |
|
511 |
mayProceed:true |
|
2355 | 512 |
! |
513 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
514 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 515 |
"enter a debugger; if this is a recursive invocation, enter |
516 |
a MiniDebugger instead. |
|
517 |
This is the standard way of entering the debugger; |
|
518 |
sent from error- and halt messages." |
|
0 | 519 |
|
3447 | 520 |
<context: #return> |
521 |
||
14695 | 522 |
|display| |
523 |
||
13111 | 524 |
(NumberOfDebuggers ? 0) > self maxNumberOfDebuggers ifTrue:[ |
15413 | 525 |
NumberOfDebuggers := self allInstances count:[:d | d isOpen]. |
526 |
NumberOfDebuggers > self maxNumberOfDebuggers ifTrue:[ |
|
527 |
MiniDebugger enter:aContext withMessage:'too many debuggers - looping?' mayProceed:true. |
|
528 |
]. |
|
13111 | 529 |
]. |
530 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
531 |
DebuggingDebugger == true ifTrue:[ |
15413 | 532 |
'==> enter1: (' print. aContext print. ')' printCR. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
533 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
534 |
|
14695 | 535 |
display := (self debuggerOnMainDisplayOnly) |
15413 | 536 |
ifTrue:[ Display ] |
537 |
ifFalse:[ Screen current ]. |
|
14695 | 538 |
|
539 |
Screen currentScreenQuerySignal answer:display |
|
540 |
do:[ |
|
15413 | 541 |
StepInterruptPending := nil. |
542 |
ControlInterrupt handle:[:ex | |
|
543 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
|
544 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
545 |
ex proceed |
|
546 |
] do:[ |
|
547 |
|debugger| |
|
548 |
||
549 |
" |
|
550 |
well, it could be a stepping or sending debugger up there; |
|
551 |
in this case, return to it. This happens, when a stepping process |
|
552 |
runs into an error (for example, a halt). In this case, we want the |
|
553 |
stepping debugger to come up again instead of a new one. |
|
554 |
" |
|
555 |
(debugger := self openDebuggerForActiveProcess) notNil ifTrue:[ |
|
556 |
debugger unstep. |
|
557 |
debugger setLabelFor:aString in:Processor activeProcess. |
|
558 |
debugger mayProceed:mayProceed. |
|
559 |
^ debugger enter:aContext select:nil. |
|
560 |
]. |
|
561 |
]. |
|
562 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
|
14695 | 563 |
]. |
526 | 564 |
|
13666 | 565 |
"Modified: / 06-11-2013 / 20:58:54 / cg" |
53 | 566 |
! |
567 |
||
8347 | 568 |
enterException:ex |
569 |
"enter a debugger; if this is a recursive invocation, enter |
|
570 |
a MiniDebugger instead. |
|
571 |
This is the standard way of entering the debugger; |
|
572 |
sent from error- and halt messages." |
|
573 |
||
15730 | 574 |
"/ a quick check for ignored breakpoints here, |
575 |
"/ to shortcut the expensive debugger setup. |
|
576 |
"/ big speedup when many ignored breakpoints are reached. |
|
577 |
IgnoredHalts notNil ifTrue:[ |
|
578 |
((ex creator == NoHandlerError) |
|
579 |
and:[ ex exception creator == BreakPointInterrupt ]) ifTrue:[ |
|
580 |
(self |
|
581 |
isHaltToBeIgnoredIn:(ex suspendedContext method) |
|
582 |
atLineNr:1 |
|
583 |
context:(ex suspendedContext) |
|
584 |
modifyEntryCount:true |
|
585 |
) ifTrue:[ |
|
586 |
"/ Transcript showCR:'quick ignored'. |
|
587 |
^ true. |
|
588 |
]. |
|
589 |
]. |
|
590 |
]. |
|
8347 | 591 |
^ self |
15730 | 592 |
enter:ex returnableSuspendedContext |
593 |
withMessage:('[',ex originalSignal class name,']: ',ex descriptionForDebugger) |
|
594 |
mayProceed:(ex mayProceed). |
|
8347 | 595 |
! |
596 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
597 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 598 |
"enter a debugger - do not check for recursive invocation" |
599 |
||
5455 | 600 |
<context: #return> |
601 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
602 |
|aDebugger| |
266 | 603 |
|
604 |
StepInterruptPending := nil. |
|
13111 | 605 |
NumberOfDebuggers := (NumberOfDebuggers ? 0) + 1. |
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
606 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
607 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
608 |
"/ to avoid recursive debugging ... |
3447 | 609 |
ControlInterrupt handle:[:ex | |
15413 | 610 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
611 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
612 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
613 |
] do:[ |
15413 | 614 |
aDebugger := self new. |
3447 | 615 |
]. |
616 |
||
617 |
aDebugger isNil ifTrue:[ |
|
15413 | 618 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
619 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
620 |
mayProceed ifTrue:[ |
|
621 |
(Dialog confirm:'Error/Breakpoint caught.\\Press Continue or Abort.' withCRs |
|
622 |
yesLabel:'Continue' noLabel:'Abort') |
|
623 |
ifTrue:[ |
|
624 |
^ nil |
|
625 |
]. |
|
626 |
] ifFalse:[ |
|
627 |
self information:'Error caught.\\Press OK to abort the operation.' withCRs. |
|
628 |
]. |
|
629 |
AbortOperationRequest raise. |
|
630 |
"not reached" |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
631 |
]. |
3447 | 632 |
|
633 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
634 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 635 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
636 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
637 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
638 |
" |
15413 | 639 |
nil halt |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
640 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
641 |
|
3447 | 642 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 643 |
! |
644 |
||
6430 | 645 |
enterWithMessage:message |
646 |
"enter a debugger" |
|
647 |
||
648 |
<context: #return> |
|
649 |
||
10205 | 650 |
^ self |
15413 | 651 |
enter:(thisContext sender) |
652 |
withMessage:message |
|
653 |
mayProceed:true. |
|
6430 | 654 |
! |
655 |
||
266 | 656 |
new |
10205 | 657 |
"return a new DebugView. |
2358 | 658 |
- return a cached debugger if it already exists. |
659 |
Also, care for remote displays on which no debugger is wanted |
|
660 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
661 |
||
14695 | 662 |
|debugger currentScreen debuggerScreen| |
2358 | 663 |
|
664 |
currentScreen := Screen current. |
|
14 | 665 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
666 |
currentScreen notNil ifTrue:[ |
15413 | 667 |
(currentScreen suppressDebugger) ifTrue:[ |
668 |
"/ no debuggers with that device - show an alertBox which aborts... |
|
669 |
^ nil. |
|
670 |
]. |
|
671 |
(currentScreen mayOpenDebugger) ifFalse:[ |
|
672 |
"/ no debugger on that device - but on the main screen |
|
673 |
currentScreen := Display ? Screen default. |
|
674 |
]. |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
675 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
676 |
|
266 | 677 |
" |
10205 | 678 |
need a blocking debugger if no processes or |
679 |
or if its a timing/interrupt process |
|
266 | 680 |
(because otherwise we would not get any events here ... |
681 |
" |
|
682 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
15413 | 683 |
((debugger := CachedExclusive) isNil |
684 |
or:[debugger device ~~ currentScreen |
|
685 |
or:[currentScreen isNil |
|
686 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
|
687 |
debugger := self newExclusive |
|
688 |
]. |
|
689 |
CachedExclusive := nil. |
|
266 | 690 |
] ifFalse:[ |
15413 | 691 |
CachedDebugger notNil ifTrue:[ |
692 |
(CachedDebugger device ~~ currentScreen |
|
693 |
or:[currentScreen isNil |
|
694 |
or:[currentScreen isOpen not |
|
695 |
or:[CachedDebugger class ~~ self]]]) ifTrue:[ |
|
696 |
CachedDebugger := nil |
|
697 |
] |
|
698 |
]. |
|
699 |
||
700 |
(debugger := CachedDebugger) notNil ifTrue:[ |
|
701 |
CachedDebugger := nil. |
|
702 |
] ifFalse:[ |
|
703 |
debuggerScreen := currentScreen. |
|
704 |
debuggerScreen isNil ifTrue:[ |
|
705 |
"/ use the default display |
|
706 |
debuggerScreen := Screen default. |
|
707 |
]. |
|
708 |
(debuggerScreen isNil |
|
709 |
or:[debuggerScreen isOpen not |
|
710 |
"/ or:[debuggerDevice mayOpenDebugger not] |
|
711 |
]) ifTrue:[ |
|
712 |
"/ no debugger |
|
713 |
^ nil. |
|
714 |
]. |
|
715 |
||
716 |
Screen currentScreenQuerySignal answer:debuggerScreen |
|
717 |
do:[ |
|
718 |
debugger := super new. |
|
719 |
]. |
|
720 |
debugger label:'Debugger'. |
|
721 |
debugger icon:self defaultIcon. |
|
722 |
] |
|
266 | 723 |
]. |
73 | 724 |
^ debugger |
875 | 725 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
726 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 727 |
! |
0 | 728 |
|
266 | 729 |
newExclusive |
730 |
"return a debugger for exclusive display access" |
|
731 |
||
732 |
|debugger| |
|
105 | 733 |
|
266 | 734 |
debugger := super new. |
735 |
debugger label:'Debugger'. |
|
875 | 736 |
debugger icon:self defaultIcon. |
266 | 737 |
debugger exclusive:true. |
738 |
^ debugger |
|
875 | 739 |
|
740 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 741 |
! |
742 |
||
13666 | 743 |
openDebuggerForActiveProcess |
744 |
"return an already open debugger for the active process, or nil, if there is none. |
|
745 |
Open debuggers exist when stepping only, as then, the debugger is left open until the step |
|
746 |
is reached, to avoid too much flickering and redrawing on the screen" |
|
747 |
||
748 |
|active| |
|
749 |
||
750 |
" |
|
751 |
well, it could be a stepping or sending debugger up there; |
|
752 |
in this case, return to it. This happens, when a stepping process |
|
753 |
runs into an error (for example, a halt). In this case, we want the |
|
754 |
stepping debugger to come up again instead of a new one. |
|
755 |
" |
|
756 |
OpenDebuggers notNil ifTrue:[ |
|
15413 | 757 |
active := Processor activeProcess. |
758 |
OpenDebuggers do:[:aDebugger | |
|
759 |
|debuggersProcess| |
|
760 |
||
761 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
|
762 |
debuggersProcess := aDebugger inspectedProcess. |
|
763 |
debuggersProcess == active ifTrue:[ |
|
764 |
aDebugger device isOpen ifTrue:[ |
|
765 |
DebuggingDebugger == true ifTrue:[ |
|
766 |
'reusing cached debugger' errorPrintCR. |
|
767 |
]. |
|
768 |
aDebugger unstep. |
|
769 |
^ aDebugger. |
|
770 |
] |
|
771 |
]. |
|
772 |
(debuggersProcess notNil and:[ debuggersProcess isDead ]) ifTrue:[ |
|
773 |
aDebugger destroy. |
|
774 |
]. |
|
775 |
] |
|
776 |
] |
|
13666 | 777 |
]. |
778 |
^ nil |
|
779 |
||
780 |
"Created: / 06-11-2013 / 20:57:49 / cg" |
|
781 |
! |
|
782 |
||
29 | 783 |
openOn:aProcess |
784 |
"start a debugger on aProcess |
|
785 |
(actually not more than a good-looking inspector)" |
|
15 | 786 |
|
52 | 787 |
|aDebugger label nm| |
15 | 788 |
|
789 |
aDebugger := super new. |
|
875 | 790 |
aDebugger icon:self defaultIcon. |
29 | 791 |
aProcess notNil ifTrue:[ |
15413 | 792 |
nm := aProcess name. |
793 |
nm notNil ifTrue:[ |
|
794 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
795 |
] ifFalse:[ |
|
796 |
nm := aProcess id printString |
|
797 |
]. |
|
798 |
label := 'Debugger [' , nm , ']'. |
|
29 | 799 |
] ifFalse:[ |
15413 | 800 |
label := 'no process' |
29 | 801 |
]. |
1114 | 802 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 803 |
aDebugger openOn:aProcess. |
804 |
^ nil |
|
875 | 805 |
|
1114 | 806 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 807 |
! ! |
808 |
||
3269 | 809 |
!DebugView class methodsFor:'menu specs'! |
810 |
||
12437 | 811 |
breakPointMenuSpec |
812 |
"This resource specification was automatically generated |
|
813 |
by the MenuEditor of ST/X." |
|
814 |
||
815 |
"Do not manually edit this!! If it is corrupted, |
|
816 |
the MenuEditor may not be able to read the specification." |
|
817 |
||
818 |
||
819 |
" |
|
820 |
MenuEditor new openOnClass:DebugView andSelector:#breakPointMenuSpec |
|
821 |
(Menu new fromLiteralArrayEncoding:(DebugView breakPointMenuSpec)) startUp |
|
822 |
" |
|
823 |
||
824 |
<resource: #menu> |
|
825 |
||
15413 | 826 |
^ |
12437 | 827 |
#(Menu |
15413 | 828 |
( |
829 |
(MenuItem |
|
830 |
enabled: canRemoveBreakpoint |
|
831 |
label: 'Remove Breakpoint' |
|
832 |
itemValue: removeBreakpoint |
|
833 |
) |
|
834 |
(MenuItem |
|
835 |
label: 'Remove all Breakpoints' |
|
836 |
itemValue: removeAllBreakpoints |
|
837 |
) |
|
838 |
(MenuItem |
|
839 |
label: '-' |
|
840 |
) |
|
841 |
(MenuItem |
|
842 |
label: 'Ignore this Halt/BreakPoint' |
|
843 |
submenu: |
|
844 |
(Menu |
|
845 |
( |
|
846 |
(MenuItem |
|
847 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
848 |
label: 'Forever (Until Ignoring is Stopped)' |
|
849 |
itemValue: ignoreHaltForever |
|
850 |
) |
|
851 |
(MenuItem |
|
852 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
853 |
label: 'For Some Time...' |
|
854 |
itemValue: openIgnoreHaltUntilTimeElapsedDialog |
|
855 |
) |
|
856 |
(MenuItem |
|
857 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
858 |
label: 'For the Next N Times...' |
|
859 |
itemValue: openIgnoreHaltNTimesDialog |
|
860 |
) |
|
861 |
(MenuItem |
|
862 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
863 |
label: 'Until Shift-Key is Pressed' |
|
864 |
itemValue: ignoreHaltUntilShiftKeyIsPressed |
|
865 |
) |
|
866 |
(MenuItem |
|
867 |
label: '-' |
|
868 |
) |
|
869 |
(MenuItem |
|
870 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
871 |
label: 'In Current Process' |
|
872 |
itemValue: ignoreHaltForCurrentProcess |
|
873 |
) |
|
874 |
(MenuItem |
|
875 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
876 |
label: 'For this Receiver Class' |
|
877 |
itemValue: ignoreHaltForThisReceiverClass |
|
878 |
) |
|
879 |
(MenuItem |
|
880 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
881 |
label: 'If Called from Any Of' |
|
882 |
submenuChannel: menuForIgnoreBreakpointIfCalledFromAnyOf |
|
883 |
) |
|
884 |
) |
|
885 |
nil |
|
886 |
nil |
|
887 |
) |
|
888 |
) |
|
889 |
(MenuItem |
|
890 |
enabled: isStoppedAtBreakPointWithParameter |
|
891 |
label: 'Ignore all BreakPoints with this Parameter' |
|
892 |
submenu: |
|
893 |
(Menu |
|
894 |
( |
|
895 |
(MenuItem |
|
896 |
enabled: isStoppedAtBreakPointWithParameter |
|
897 |
label: 'Forever (Reenable in BreakPoint-Browser)' |
|
898 |
itemValue: ignoreBreakpointsWithThisParameterForever |
|
899 |
) |
|
900 |
(MenuItem |
|
901 |
enabled: isStoppedAtBreakPointWithParameter |
|
902 |
label: 'For Some Time...' |
|
903 |
itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
|
904 |
) |
|
905 |
(MenuItem |
|
906 |
enabled: isStoppedAtBreakPointWithParameter |
|
907 |
label: 'For the Next N Times...' |
|
908 |
itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog |
|
909 |
) |
|
910 |
(MenuItem |
|
911 |
enabled: isStoppedAtBreakPointWithParameter |
|
912 |
label: 'Until Shift-Key is Pressed' |
|
913 |
itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
|
914 |
) |
|
915 |
(MenuItem |
|
916 |
label: '-' |
|
917 |
) |
|
918 |
(MenuItem |
|
919 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
920 |
label: 'In Current Process' |
|
921 |
itemValue: ignoreAllHaltsForCurrentProcess |
|
922 |
) |
|
923 |
(MenuItem |
|
924 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
925 |
label: 'For this Receiver Class' |
|
926 |
itemValue: ignoreAllHaltsForThisReceiverClass |
|
927 |
) |
|
928 |
(MenuItem |
|
929 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
930 |
label: 'If Called from Any Of' |
|
931 |
submenuChannel: menuForIgnoreAllBreakpointsIfCalledFromAnyOf |
|
932 |
) |
|
933 |
) |
|
934 |
nil |
|
935 |
nil |
|
936 |
) |
|
937 |
) |
|
938 |
(MenuItem |
|
939 |
label: 'Ignore all Halts/BreakPoints' |
|
940 |
submenu: |
|
941 |
(Menu |
|
942 |
( |
|
943 |
(MenuItem |
|
944 |
label: 'Forever (Until Ignoring is Stopped)' |
|
945 |
itemValue: ignoreAllHaltsForever |
|
946 |
) |
|
947 |
(MenuItem |
|
948 |
label: 'For Some Time...' |
|
949 |
itemValue: openIgnoreAllHaltsUntilTimeElapsedDialog |
|
950 |
) |
|
951 |
(MenuItem |
|
952 |
label: 'Until Shift-Key is Pressed' |
|
953 |
itemValue: ignoreAllHaltsUntilShiftKeyIsPressed |
|
954 |
) |
|
955 |
) |
|
956 |
nil |
|
957 |
nil |
|
958 |
) |
|
959 |
) |
|
960 |
(MenuItem |
|
961 |
enabled: hasHaltsToIgnore |
|
962 |
label: 'Stop Ignoring' |
|
963 |
itemValue: stopIgnoringHalts |
|
964 |
) |
|
965 |
(MenuItem |
|
966 |
label: '-' |
|
967 |
) |
|
968 |
(MenuItem |
|
969 |
enabled: canAddBreakpoint |
|
970 |
label: 'Add Breakpoint' |
|
971 |
itemValue: addBreakpoint |
|
972 |
) |
|
973 |
(MenuItem |
|
974 |
label: 'Manage Breakpoints' |
|
975 |
itemValue: openBreakPointBrowser |
|
976 |
) |
|
977 |
(MenuItem |
|
978 |
label: '-' |
|
979 |
) |
|
980 |
(MenuItem |
|
981 |
label: 'Allow Halt in Debugger' |
|
982 |
itemValue: allowBreakPointsInDebugger: |
|
983 |
indication: allowBreakPointsInDebugger |
|
984 |
) |
|
985 |
) |
|
986 |
nil |
|
987 |
nil |
|
12437 | 988 |
) |
989 |
! |
|
990 |
||
991 |
classMenuSpec |
|
992 |
"This resource specification was automatically generated |
|
993 |
by the MenuEditor of ST/X." |
|
994 |
||
995 |
"Do not manually edit this!! If it is corrupted, |
|
996 |
the MenuEditor may not be able to read the specification." |
|
997 |
||
998 |
||
999 |
" |
|
12840 | 1000 |
MenuEditor new openOnClass:DebugView andSelector:#receiverMenuSpec |
1001 |
(Menu new fromLiteralArrayEncoding:(DebugView receiverMenuSpec)) startUp |
|
12437 | 1002 |
" |
1003 |
||
1004 |
<resource: #menu> |
|
1005 |
||
15413 | 1006 |
^ |
12437 | 1007 |
#(Menu |
15413 | 1008 |
( |
1009 |
(MenuItem |
|
1010 |
enabled: canBrowseImplementingClass |
|
1011 |
label: 'Browse Implementing Class' |
|
1012 |
itemValue: browseImplementingClass |
|
1013 |
) |
|
1014 |
(MenuItem |
|
1015 |
enabled: canBrowseReceiversClass |
|
1016 |
label: 'Browse Receiver''s Class' |
|
1017 |
itemValue: browseReceiversClass |
|
1018 |
) |
|
1019 |
(MenuItem |
|
1020 |
enabled: canBrowseProcessesApplication |
|
1021 |
label: 'Browse Application Class' |
|
1022 |
itemValue: browseProcessesApplication |
|
1023 |
) |
|
1024 |
(MenuItem |
|
1025 |
label: '-' |
|
1026 |
) |
|
1027 |
(MenuItem |
|
1028 |
enabled: canBrowseClassHierarchy |
|
1029 |
label: 'Browse Receiver''s Class Hierarchy' |
|
1030 |
itemValue: browseClassHierarchy |
|
1031 |
isVisible: false |
|
1032 |
) |
|
1033 |
(MenuItem |
|
1034 |
enabled: canBrowseFullClassProtocol |
|
1035 |
label: 'Browse Receiver''s Full Protocol' |
|
1036 |
itemValue: browseFullClassProtocol |
|
1037 |
isVisible: false |
|
1038 |
) |
|
1039 |
(MenuItem |
|
1040 |
label: '-' |
|
1041 |
isVisible: false |
|
1042 |
) |
|
1043 |
(MenuItem |
|
1044 |
enabled: canInspectWidgetHierarchy |
|
1045 |
label: 'Inspect Widget Hierarchy' |
|
1046 |
itemValue: inspectWidgetHierarchy |
|
1047 |
) |
|
1048 |
) |
|
1049 |
nil |
|
1050 |
nil |
|
12437 | 1051 |
) |
1052 |
! |
|
1053 |
||
1054 |
contextMenuSpec |
|
1055 |
"This resource specification was automatically generated |
|
1056 |
by the MenuEditor of ST/X." |
|
1057 |
||
1058 |
"Do not manually edit this!! If it is corrupted, |
|
1059 |
the MenuEditor may not be able to read the specification." |
|
1060 |
||
1061 |
||
1062 |
" |
|
1063 |
MenuEditor new openOnClass:DebugView andSelector:#contextMenuSpec |
|
1064 |
(Menu new fromLiteralArrayEncoding:(DebugView contextMenuSpec)) startUp |
|
1065 |
" |
|
1066 |
||
1067 |
<resource: #menu> |
|
1068 |
||
15413 | 1069 |
^ |
12437 | 1070 |
#(Menu |
15413 | 1071 |
( |
1072 |
(MenuItem |
|
1073 |
enabled: canReturn |
|
1074 |
label: 'Return' |
|
1075 |
itemValue: doReturn |
|
1076 |
) |
|
1077 |
(MenuItem |
|
1078 |
enabled: canRestart |
|
1079 |
label: 'Restart' |
|
1080 |
itemValue: doRestart |
|
1081 |
) |
|
1082 |
(MenuItem |
|
1083 |
label: '-' |
|
1084 |
) |
|
1085 |
(MenuItem |
|
1086 |
enabled: hasContextSelected |
|
1087 |
label: 'Inspect' |
|
1088 |
itemValue: inspectContext |
|
1089 |
) |
|
1090 |
(MenuItem |
|
1091 |
label: 'Copy WalkBack Text' |
|
1092 |
itemValue: copyWalkbackText |
|
1093 |
) |
|
1094 |
(MenuItem |
|
1095 |
label: 'Inspect Method' |
|
1096 |
itemValue: inspectContextsMethod |
|
1097 |
) |
|
1098 |
(MenuItem |
|
1099 |
label: 'Bookmark Method in SystemBrowser' |
|
1100 |
itemValue: addBrowserBookmark |
|
1101 |
) |
|
1102 |
(MenuItem |
|
1103 |
label: '-' |
|
1104 |
) |
|
1105 |
(MenuItem |
|
1106 |
enabled: hasBlockContextSelected |
|
1107 |
label: 'Find Home Context in Caller Chain...' |
|
1108 |
itemValue: findHomeContext |
|
1109 |
) |
|
1110 |
(MenuItem |
|
1111 |
enabled: hasContextSelected |
|
1112 |
label: 'Find Context with String in Source...' |
|
1113 |
itemValue: findContextWithStringInSource |
|
1114 |
) |
|
1115 |
(MenuItem |
|
1116 |
enabled: hasContextSelected |
|
1117 |
label: 'Find Context with Value in Variable...' |
|
1118 |
itemValue: findContextWithValueInVariable |
|
1119 |
) |
|
1120 |
(MenuItem |
|
1121 |
enabled: hasContextSelected |
|
1122 |
label: 'Find Next Exception Handler' |
|
1123 |
itemValue: findNextExceptionHandlerContext |
|
1124 |
) |
|
1125 |
(MenuItem |
|
1126 |
enabled: hasContextSelected |
|
1127 |
label: 'Find Handler For...' |
|
1128 |
itemValue: findHandlerFor |
|
1129 |
) |
|
1130 |
(MenuItem |
|
1131 |
label: 'Find Dialog Opener...' |
|
1132 |
itemValue: doGotoDialogOpener |
|
1133 |
) |
|
1134 |
(MenuItem |
|
1135 |
label: 'Find Application Action Method...' |
|
1136 |
itemValue: doGotoApplicationActionMethod |
|
1137 |
) |
|
1138 |
(MenuItem |
|
1139 |
label: '-' |
|
1140 |
) |
|
1141 |
(MenuItem |
|
1142 |
label: 'Remember Callchain && Highlight on Next Entry' |
|
1143 |
itemValue: rememberCallchain |
|
1144 |
) |
|
1145 |
(MenuItem |
|
1146 |
label: 'Clear Remembered Callchain' |
|
1147 |
itemValue: clearRememberedCallchain |
|
1148 |
) |
|
1149 |
) |
|
1150 |
nil |
|
1151 |
nil |
|
12437 | 1152 |
) |
1153 |
! |
|
1154 |
||
1155 |
fileMenuSpec |
|
1156 |
"This resource specification was automatically generated |
|
1157 |
by the MenuEditor of ST/X." |
|
1158 |
||
1159 |
"Do not manually edit this!! If it is corrupted, |
|
1160 |
the MenuEditor may not be able to read the specification." |
|
1161 |
||
1162 |
||
1163 |
" |
|
1164 |
MenuEditor new openOnClass:DebugView andSelector:#fileMenuSpec |
|
1165 |
(Menu new fromLiteralArrayEncoding:(DebugView fileMenuSpec)) startUp |
|
1166 |
" |
|
1167 |
||
1168 |
<resource: #menu> |
|
1169 |
||
15413 | 1170 |
^ |
12437 | 1171 |
#(Menu |
15413 | 1172 |
( |
1173 |
(MenuItem |
|
1174 |
enabled: canSendEmail |
|
1175 |
label: 'Report a Bug via eMail...' |
|
1176 |
itemValue: doOpenReportMailApp |
|
1177 |
) |
|
1178 |
(MenuItem |
|
1179 |
label: '-' |
|
1180 |
) |
|
1181 |
(MenuItem |
|
1182 |
enabled: canCloseAllDebuggers |
|
1183 |
label: 'Close all Debuggers...' |
|
1184 |
itemValue: closeAllDebuggers |
|
1185 |
isVisible: isNotInspecting |
|
1186 |
) |
|
1187 |
(MenuItem |
|
1188 |
label: '-' |
|
1189 |
) |
|
1190 |
(MenuItem |
|
1191 |
label: 'Exit' |
|
1192 |
itemValue: closeRequest |
|
1193 |
isVisible: isInspecting |
|
1194 |
) |
|
1195 |
(MenuItem |
|
1196 |
label: 'Close Debugger and Abort' |
|
1197 |
itemValue: closeRequest |
|
1198 |
isVisible: isNotInspecting |
|
1199 |
) |
|
1200 |
) |
|
1201 |
nil |
|
1202 |
nil |
|
12437 | 1203 |
) |
1204 |
! |
|
1205 |
||
1206 |
helpMenuSpec |
|
1207 |
"This resource specification was automatically generated |
|
1208 |
by the MenuEditor of ST/X." |
|
1209 |
||
1210 |
"Do not manually edit this!! If it is corrupted, |
|
1211 |
the MenuEditor may not be able to read the specification." |
|
1212 |
||
1213 |
||
1214 |
" |
|
1215 |
MenuEditor new openOnClass:DebugView andSelector:#helpMenuSpec |
|
1216 |
(Menu new fromLiteralArrayEncoding:(DebugView helpMenuSpec)) startUp |
|
1217 |
" |
|
1218 |
||
1219 |
<resource: #menu> |
|
1220 |
||
15413 | 1221 |
^ |
12437 | 1222 |
#(Menu |
15413 | 1223 |
( |
1224 |
(MenuItem |
|
1225 |
label: 'Debugger''s Documentation' |
|
1226 |
itemValue: openHTMLDocument: |
|
1227 |
argument: 'tools/debugger/TOP.html' |
|
1228 |
) |
|
1229 |
(MenuItem |
|
1230 |
label: '-' |
|
1231 |
) |
|
1232 |
(MenuItem |
|
1233 |
label: 'About DebugView...' |
|
1234 |
itemValue: openAboutThisApplication |
|
1235 |
) |
|
1236 |
) |
|
1237 |
nil |
|
1238 |
nil |
|
12437 | 1239 |
) |
1240 |
! |
|
1241 |
||
3269 | 1242 |
menuSpec |
1243 |
"This resource specification was automatically generated |
|
1244 |
by the MenuEditor of ST/X." |
|
1245 |
||
1246 |
"Do not manually edit this!! If it is corrupted, |
|
1247 |
the MenuEditor may not be able to read the specification." |
|
1248 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1249 |
|
3269 | 1250 |
" |
1251 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
1252 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
1253 |
" |
|
1254 |
||
1255 |
<resource: #menu> |
|
1256 |
||
15413 | 1257 |
^ |
5875 | 1258 |
#(Menu |
15413 | 1259 |
( |
1260 |
(MenuItem |
|
1261 |
label: 'File' |
|
1262 |
submenuChannel: fileMenuSpec |
|
1263 |
) |
|
1264 |
(MenuItem |
|
1265 |
label: 'View' |
|
1266 |
submenuChannel: viewMenuSpec |
|
1267 |
) |
|
1268 |
(MenuItem |
|
1269 |
label: 'Process' |
|
1270 |
submenuChannel: processMenuSpec |
|
1271 |
) |
|
1272 |
(MenuItem |
|
1273 |
label: 'Context' |
|
1274 |
submenuChannel: contextMenuSpec |
|
1275 |
) |
|
1276 |
(MenuItem |
|
1277 |
label: 'Receiver' |
|
1278 |
submenuChannel: classMenuSpec |
|
1279 |
) |
|
1280 |
(MenuItem |
|
1281 |
label: 'Selector' |
|
1282 |
submenuChannel: selectorMenuSpec |
|
1283 |
) |
|
1284 |
(MenuItem |
|
1285 |
label: 'Breakpoint' |
|
1286 |
submenuChannel: breakPointMenuSpec |
|
1287 |
) |
|
1288 |
(MenuItem |
|
1289 |
label: 'MENU_Help' |
|
1290 |
startGroup: conditionalRight |
|
1291 |
submenuChannel: helpMenuSpec |
|
1292 |
) |
|
1293 |
) |
|
1294 |
nil |
|
1295 |
nil |
|
12437 | 1296 |
) |
1297 |
! |
|
1298 |
||
1299 |
processMenuSpec |
|
1300 |
"This resource specification was automatically generated |
|
1301 |
by the MenuEditor of ST/X." |
|
1302 |
||
1303 |
"Do not manually edit this!! If it is corrupted, |
|
1304 |
the MenuEditor may not be able to read the specification." |
|
1305 |
||
1306 |
||
1307 |
" |
|
1308 |
MenuEditor new openOnClass:DebugView andSelector:#processMenuSpec |
|
1309 |
(Menu new fromLiteralArrayEncoding:(DebugView processMenuSpec)) startUp |
|
1310 |
" |
|
1311 |
||
1312 |
<resource: #menu> |
|
1313 |
||
15413 | 1314 |
^ |
12437 | 1315 |
#(Menu |
15413 | 1316 |
( |
1317 |
(MenuItem |
|
1318 |
label: 'Continue' |
|
1319 |
itemValue: doContinue |
|
1320 |
) |
|
1321 |
(MenuItem |
|
1322 |
label: 'Next (Line-Step)' |
|
1323 |
itemValue: doNext |
|
1324 |
) |
|
1325 |
(MenuItem |
|
1326 |
label: 'Step' |
|
1327 |
itemValue: doStep |
|
1328 |
) |
|
1329 |
(MenuItem |
|
1330 |
label: '-' |
|
1331 |
) |
|
1332 |
(MenuItem |
|
1333 |
label: 'After 5 Seconds' |
|
1334 |
submenu: |
|
1335 |
(Menu |
|
1336 |
( |
|
1337 |
(MenuItem |
|
1338 |
label: 'Continue' |
|
1339 |
itemValue: doContinueAfterDelay |
|
1340 |
) |
|
1341 |
(MenuItem |
|
1342 |
label: 'Next (Line-Step)' |
|
1343 |
itemValue: doNextAfterDelay |
|
1344 |
) |
|
1345 |
(MenuItem |
|
1346 |
label: 'Step' |
|
1347 |
itemValue: doStepAfterDelay |
|
1348 |
) |
|
1349 |
) |
|
1350 |
nil |
|
1351 |
nil |
|
1352 |
) |
|
1353 |
) |
|
1354 |
(MenuItem |
|
1355 |
label: '-' |
|
1356 |
) |
|
1357 |
(MenuItem |
|
1358 |
label: 'Skip to Cursor Line' |
|
1359 |
itemValue: skip |
|
1360 |
) |
|
1361 |
(MenuItem |
|
1362 |
label: 'Step Out (Skip until Return)' |
|
1363 |
itemValue: skipForReturn |
|
1364 |
) |
|
1365 |
(MenuItem |
|
1366 |
label: 'Skip until Entering...' |
|
1367 |
itemValue: skipUntilEntering |
|
1368 |
) |
|
1369 |
(MenuItem |
|
1370 |
label: '-' |
|
1371 |
) |
|
1372 |
(MenuItem |
|
1373 |
label: 'Abort' |
|
1374 |
itemValue: doAbort |
|
1375 |
) |
|
1376 |
(MenuItem |
|
1377 |
enabled: abortAllIsHandled |
|
1378 |
label: 'Abort All' |
|
1379 |
itemValue: doAbortAll |
|
1380 |
) |
|
1381 |
(MenuItem |
|
1382 |
label: '-' |
|
1383 |
) |
|
1384 |
(MenuItem |
|
1385 |
label: 'Inspect' |
|
1386 |
itemValue: doInspectProcess |
|
1387 |
) |
|
1388 |
(MenuItem |
|
1389 |
label: 'Change Priority...' |
|
1390 |
itemValue: doChangeProcessPriority |
|
1391 |
) |
|
1392 |
(MenuItem |
|
1393 |
label: '-' |
|
1394 |
) |
|
1395 |
(MenuItem |
|
1396 |
label: 'Terminate' |
|
1397 |
itemValue: doTerminate |
|
1398 |
) |
|
1399 |
(MenuItem |
|
1400 |
label: 'Hard Terminate (Danger)' |
|
1401 |
itemValue: quickTerminate |
|
1402 |
isVisible: false |
|
1403 |
) |
|
1404 |
) |
|
1405 |
nil |
|
1406 |
nil |
|
12437 | 1407 |
) |
1408 |
! |
|
1409 |
||
1410 |
selectorMenuSpec |
|
1411 |
"This resource specification was automatically generated |
|
1412 |
by the MenuEditor of ST/X." |
|
1413 |
||
1414 |
"Do not manually edit this!! If it is corrupted, |
|
1415 |
the MenuEditor may not be able to read the specification." |
|
1416 |
||
1417 |
||
1418 |
" |
|
1419 |
MenuEditor new openOnClass:DebugView andSelector:#selectorMenuSpec |
|
1420 |
(Menu new fromLiteralArrayEncoding:(DebugView selectorMenuSpec)) startUp |
|
1421 |
" |
|
1422 |
||
1423 |
<resource: #menu> |
|
1424 |
||
15413 | 1425 |
^ |
12437 | 1426 |
#(Menu |
15413 | 1427 |
( |
1428 |
(MenuItem |
|
1429 |
label: 'Browse Implementors...' |
|
1430 |
itemValue: browseImplementorsOf |
|
1431 |
) |
|
1432 |
(MenuItem |
|
1433 |
label: 'Browse Senders...' |
|
1434 |
itemValue: browseSendersOf |
|
1435 |
) |
|
1436 |
(MenuItem |
|
1437 |
label: '-' |
|
1438 |
) |
|
1439 |
(MenuItem |
|
1440 |
enabled: canDefineMethod |
|
1441 |
label: 'Define Missing Method' |
|
1442 |
itemValue: doDefineMethod |
|
1443 |
) |
|
1444 |
) |
|
1445 |
nil |
|
1446 |
nil |
|
12437 | 1447 |
) |
1448 |
! |
|
1449 |
||
1450 |
viewMenuSpec |
|
1451 |
"This resource specification was automatically generated |
|
1452 |
by the MenuEditor of ST/X." |
|
1453 |
||
1454 |
"Do not manually edit this!! If it is corrupted, |
|
1455 |
the MenuEditor may not be able to read the specification." |
|
1456 |
||
1457 |
||
1458 |
" |
|
1459 |
MenuEditor new openOnClass:DebugView andSelector:#viewMenuSpec |
|
1460 |
(Menu new fromLiteralArrayEncoding:(DebugView viewMenuSpec)) startUp |
|
1461 |
" |
|
1462 |
||
1463 |
<resource: #menu> |
|
1464 |
||
15413 | 1465 |
^ |
12437 | 1466 |
#(Menu |
15413 | 1467 |
( |
1468 |
(MenuItem |
|
1469 |
enabled: canShowMore |
|
1470 |
label: 'Show More WalkBack' |
|
1471 |
itemValue: showMoreWalkback |
|
1472 |
) |
|
1473 |
(MenuItem |
|
1474 |
enabled: canShowMore |
|
1475 |
label: 'Show Full WalkBack' |
|
1476 |
itemValue: showFullWalkback |
|
1477 |
) |
|
1478 |
(MenuItem |
|
1479 |
label: '-' |
|
1480 |
) |
|
1481 |
(MenuItem |
|
1482 |
label: 'Show Dense WalkBack' |
|
1483 |
itemValue: showingDenseWalkback: |
|
1484 |
hideMenuOnActivated: false |
|
1485 |
indication: showingDenseWalkback |
|
1486 |
) |
|
1487 |
(MenuItem |
|
1488 |
enabled: notShowingDenseWalkbackHolder |
|
1489 |
label: 'Show Support Code (Implementation of Enumerations, Exceptions etc.)' |
|
1490 |
itemValue: showingSupportCode: |
|
1491 |
hideMenuOnActivated: false |
|
1492 |
indication: showingSupportCode |
|
1493 |
) |
|
1494 |
(MenuItem |
|
1495 |
label: '-' |
|
1496 |
) |
|
1497 |
(MenuItem |
|
1498 |
label: 'Raise Debugger when Entering' |
|
1499 |
itemValue: autoRaiseView: |
|
1500 |
hideMenuOnActivated: false |
|
1501 |
indication: autoRaiseView |
|
1502 |
) |
|
1503 |
(MenuItem |
|
1504 |
label: '-' |
|
1505 |
) |
|
1506 |
(MenuItem |
|
1507 |
label: 'Settings...' |
|
1508 |
itemValue: openSettingsDialog |
|
1509 |
) |
|
1510 |
) |
|
1511 |
nil |
|
1512 |
nil |
|
3269 | 1513 |
) |
1514 |
! ! |
|
1515 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1516 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1517 |
|
4121 | 1518 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1519 |
"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
|
1520 |
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
|
1521 |
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
|
1522 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1523 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1524 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1525 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1526 |
|
12839 | 1527 |
"/ fetch some contexts... |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1528 |
someContexts := Array new:25. |
2042 | 1529 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1530 |
idx := 1. |
10205 | 1531 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
15413 | 1532 |
someContexts at:idx put:con. |
1533 |
con := con sender. |
|
1534 |
idx := idx + 1. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1535 |
]. |
12839 | 1536 |
"/ search... |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1537 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1538 |
^ someContexts at:idx. |
13398 | 1539 |
|
1540 |
"Modified: / 28-08-2013 / 20:12:47 / cg" |
|
3447 | 1541 |
! |
1542 |
||
10205 | 1543 |
interestingContextIndexIn:aContextArray |
12039 | 1544 |
"return an interesting context's index, or nil. |
1545 |
This is the context initially shown (selected) in the walkback. |
|
3447 | 1546 |
We move up the calling chain, skipping all intermediate Signal |
12039 | 1547 |
and Exception contexts, to present the context in which the error actually occured. |
13398 | 1548 |
Just for your (my) convenience :-)" |
3447 | 1549 |
|
13309 | 1550 |
|con found offset sel prev rcvr nMax idx methodHome method| |
3447 | 1551 |
|
13398 | 1552 |
"/ Transcript showCR:'x'. |
7713 | 1553 |
"/ Transcript showCR:aContextArray. |
7648 | 1554 |
|
3447 | 1555 |
nMax := aContextArray size. |
1556 |
nMax <= 1 ifTrue:[^ 1]. |
|
1557 |
con := aContextArray at:1. |
|
1558 |
con isBlockContext ifTrue:[^ 1]. |
|
12039 | 1559 |
(con method notNil and:[ con method isWrapped ]) ifTrue:[^ 1]. "/ we are already there |
3447 | 1560 |
|
1561 |
"/ somewhere, at the bottom, there must be a raise ... |
|
1562 |
"/ find the exception |
|
1563 |
1 to:5 do:[:i | |
|
15413 | 1564 |
found isNil ifTrue:[ |
1565 |
con := aContextArray at:i ifAbsent:nil. |
|
1566 |
con notNil ifTrue:[ |
|
1567 |
sel := con selector ? ''. |
|
1568 |
(sel isSymbol |
|
1569 |
and:[ (sel startsWith:'raise') |
|
1570 |
and:[ ((rcvr := con receiver) isLazyValue not) |
|
1571 |
and:[ rcvr isExceptionCreator]]]) ifTrue:[ |
|
1572 |
offset := i. |
|
1573 |
found := con. |
|
1574 |
||
1575 |
"/ if this is a noHandler exception, |
|
1576 |
"/ skip forward to the erronous context |
|
1577 |
(rcvr isException) ifTrue:[ |
|
1578 |
rcvr creator == Signal noHandlerSignal ifTrue:[ |
|
1579 |
found := rcvr suspendedContext. |
|
1580 |
offset := aContextArray identityIndexOf:found. |
|
1581 |
] |
|
1582 |
]. |
|
1583 |
]. |
|
1584 |
]. |
|
1585 |
]. |
|
3447 | 1586 |
]. |
12039 | 1587 |
"/ Transcript showCR:con. |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1588 |
"/ Transcript show:'1 '; showCR:found. |
12839 | 1589 |
|
3447 | 1590 |
found isNil ifTrue:[ |
15413 | 1591 |
"/ this is a kludge, but convenient. |
1592 |
"/ show the place where the error (divisionByZero...) happend, |
|
1593 |
"/ not where the signal was raised. |
|
1594 |
con := (aContextArray at:1). |
|
1595 |
sel := con methodHome selector. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1596 |
|
13398 | 1597 |
"/ Transcript show:'2 '; showCR:con. |
15413 | 1598 |
"/ typically a DivisionByZero - show caller of division |
1599 |
(sel == #// |
|
1600 |
or:[sel == #/ |
|
1601 |
or:[sel == #\\]]) ifTrue:[ |
|
1602 |
^ 2 |
|
1603 |
]. |
|
1604 |
||
1605 |
"/ show the place of the bad message; not where the Signal was raised... |
|
1606 |
(sel == #doesNotUnderstand:) ifTrue:[ |
|
1607 |
idx := 3. |
|
1608 |
nMax > 2 ifTrue:[ |
|
1609 |
sel := (aContextArray at:idx) selector ? ''. |
|
1610 |
sel == #doesNotUnderstand: ifTrue:[ |
|
1611 |
idx := 4 |
|
1612 |
]. |
|
1613 |
nMax > idx ifTrue:[ |
|
1614 |
sel := (aContextArray at:idx) selector ? ''. |
|
1615 |
"/ show the place of the perfor-send; not where the Signal was raised... |
|
1616 |
((sel == #perform:) |
|
1617 |
or:[sel startsWith:'perform:with']) ifTrue:[ |
|
1618 |
idx := idx + 1 |
|
1619 |
]. |
|
1620 |
] |
|
1621 |
]. |
|
1622 |
^ idx min:nMax |
|
1623 |
]. |
|
1624 |
||
1625 |
"/ show the bad method; not where the Signal was raised... |
|
1626 |
(sel == #noByteCode) ifTrue:[ |
|
1627 |
^ 2 |
|
1628 |
]. |
|
3447 | 1629 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1630 |
"/ "/ 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
|
1631 |
"/ ((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1632 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1633 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1634 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1635 |
"/ "/ 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
|
1636 |
"/ (sel == #shouldImplement) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1637 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1638 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1639 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1640 |
"/ "/ 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
|
1641 |
"/ ((sel == #error:mayProceed:) |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1642 |
"/ or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1643 |
"/ nMax > 2 ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1644 |
"/ sel := (aContextArray at:2) selector. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1645 |
"/ sel == #mustBeBoolean ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1646 |
"/ ^ 3 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1647 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1648 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1649 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1650 |
"/ ]. |
7862 | 1651 |
|
15413 | 1652 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
1653 |
(sel == #signalInterrupt:) ifTrue:[ |
|
1654 |
^ 2 |
|
1655 |
]. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1656 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1657 |
"/ "/ 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
|
1658 |
"/ ((sel == #error) or:[sel == #error:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1659 |
"/ con method mclass == Object ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1660 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1661 |
"/ ] |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1662 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1663 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1664 |
"/ "/ 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
|
1665 |
"/ (sel == #subclassResponsibility) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1666 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1667 |
"/ ]. |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
1668 |
|
15413 | 1669 |
"/ show the place of the bad index; not where the Signal was raised... |
1670 |
( #(#notIndexed |
|
1671 |
#indexNotIntegerOrOutOfBounds: |
|
1672 |
#subscriptBoundsError: |
|
1673 |
#elementBoundsError: |
|
1674 |
"/ #subclassResponsibility |
|
1675 |
) includes:sel) ifTrue:[ |
|
1676 |
idx := 2. |
|
1677 |
[ idx <= 3 |
|
1678 |
and:[ |
|
1679 |
sel := (aContextArray at:idx) selector. |
|
1680 |
#(#notIndexed |
|
1681 |
#indexNotIntegerOrOutOfBounds: |
|
1682 |
#subscriptBoundsError: |
|
1683 |
#elementBoundsError: ) includes:sel |
|
1684 |
] |
|
1685 |
] whileTrue:[ idx := idx + 1 ]. |
|
1686 |
sel := (aContextArray at:idx) selector. |
|
1687 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
|
1688 |
ifTrue:[ |
|
1689 |
sel := (aContextArray at:idx+1) selector. |
|
1690 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
|
1691 |
ifTrue:[ |
|
1692 |
sel := (aContextArray at:idx+2) selector. |
|
1693 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
|
1694 |
ifTrue:[ |
|
1695 |
^ idx+3 |
|
1696 |
]. |
|
1697 |
^ idx+2 |
|
1698 |
]. |
|
1699 |
^ idx+1 |
|
1700 |
]. |
|
1701 |
^ idx |
|
1702 |
]. |
|
1703 |
offset := 1. |
|
8152 | 1704 |
]. |
1705 |
||
1706 |
"/ the above is all too hard-coded; |
|
1707 |
"/ ask the method, if it thinks it should be skipped in the walkback. |
|
1708 |
"/ as more methods get flagged, remove code from above. |
|
1709 |
con := aContextArray at:offset ifAbsent:nil. |
|
13398 | 1710 |
"/ Transcript show:'2 '; showCR:con. |
10205 | 1711 |
[ |
15413 | 1712 |
con notNil |
1713 |
and:[ (methodHome := con methodHome) notNil |
|
1714 |
and:[ (method := methodHome method) notNil |
|
1715 |
and:[ method shouldBeSkippedInDebuggersWalkBack ]]] |
|
8152 | 1716 |
] whileTrue:[ |
1717 |
"/ Transcript showCR:con methodHome method. |
|
15413 | 1718 |
offset := offset + 1. |
1719 |
con := aContextArray at:offset ifAbsent:nil. |
|
8152 | 1720 |
]. |
13309 | 1721 |
methodHome := nil. "/ help GC |
3447 | 1722 |
|
1723 |
" |
|
1724 |
got it; move up, skipping all intermediate Signal and |
|
1725 |
Exception contexts |
|
1726 |
" |
|
1727 |
prev := nil. |
|
1728 |
rcvr := con receiver. |
|
10205 | 1729 |
[ |
15413 | 1730 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 1731 |
] whileTrue:[ |
15413 | 1732 |
prev := con. |
1733 |
nMax > offset ifFalse:[^ offset]. |
|
1734 |
||
1735 |
offset := offset + 1. |
|
1736 |
con := aContextArray at:offset. |
|
1737 |
rcvr := con receiver. |
|
3447 | 1738 |
]. |
1739 |
||
1740 |
" |
|
1741 |
now, we are one above the raising context |
|
1742 |
" |
|
13398 | 1743 |
"/ Transcript show:'3 '; showCR:con. |
1744 |
||
1745 |
(con selector == #retry:coercing:) ifTrue:[ |
|
15413 | 1746 |
"/ show the operation which failed to coerce, not the coerce |
1747 |
^ offset + 1 |
|
13398 | 1748 |
]. |
3447 | 1749 |
|
1750 |
" |
|
13398 | 1751 |
if the sender-method of the raise is one of object's error methods ... |
3447 | 1752 |
" |
10205 | 1753 |
( #( halt halt: |
15413 | 1754 |
error error: |
1755 |
doesNotUnderstand: |
|
1756 |
subclassResponsibility |
|
1757 |
primitiveFailed) includes:con selector) |
|
3447 | 1758 |
ifTrue:[ |
15413 | 1759 |
con selector == #doesNotUnderstand: ifTrue:[ |
1760 |
" |
|
1761 |
one more up, to get to the originating context |
|
1762 |
" |
|
1763 |
con := aContextArray at:(offset + 1). |
|
1764 |
con isNil ifTrue:[^ offset]. |
|
1765 |
offset := offset + 1. |
|
1766 |
]. |
|
1767 |
con := aContextArray at:(offset + 1). |
|
1768 |
con isNil ifTrue:[^ offset]. |
|
1769 |
offset := offset + 1. |
|
3447 | 1770 |
] ifFalse:[ |
15413 | 1771 |
" |
1772 |
ok, got the raise - if its a BreakPoint, look for the sender |
|
1773 |
" |
|
1774 |
(prev notNil and:[prev receiver == BreakPointInterrupt]) ifTrue:[ |
|
1775 |
offset := offset + 1 |
|
1776 |
]. |
|
3447 | 1777 |
]. |
1778 |
||
1779 |
^ offset |
|
1780 |
||
7713 | 1781 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
13398 | 1782 |
"Modified: / 28-08-2013 / 20:23:35 / cg" |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1783 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1784 |
|
14662 | 1785 |
!DebugView methodsFor:'accessing'! |
1786 |
||
1787 |
contextInspector |
|
1788 |
^ contextInspector |
|
1789 |
! |
|
1790 |
||
1791 |
inspectedProcess |
|
1792 |
^ inspectedProcess |
|
1793 |
! ! |
|
1794 |
||
15257 | 1795 |
!DebugView methodsFor:'aspects'! |
1796 |
||
1797 |
verboseBacktraceHolder |
|
1798 |
verboseBacktraceHolder isNil ifTrue:[ |
|
15413 | 1799 |
verboseBacktraceHolder := ValueHolder with:false |
15257 | 1800 |
]. |
1801 |
^ verboseBacktraceHolder |
|
1802 |
! ! |
|
1803 |
||
73 | 1804 |
!DebugView methodsFor:'basic'! |
1805 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1806 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1807 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1808 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1809 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1810 |
m notNil ifTrue:[ |
15413 | 1811 |
self updateMenuItems. |
1812 |
||
1813 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
|
1814 |
abortButton enable. |
|
1815 |
m enable:#doAbort. |
|
1816 |
] ifFalse:[ |
|
1817 |
abortButton disable. |
|
1818 |
m disable:#doAbort. |
|
1819 |
]. |
|
1820 |
exclusive ifTrue:[ |
|
1821 |
terminateButton disable. |
|
1822 |
m disable:#doTerminate. |
|
1823 |
] ifFalse:[ |
|
1824 |
terminateButton enable. |
|
1825 |
m enable:#doTerminate. |
|
1826 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1827 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1828 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1829 |
mayProceed == false ifTrue:[ |
15413 | 1830 |
continueButton disable. |
1831 |
m notNil ifTrue:[m disable:#doContinue]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1832 |
] ifFalse:[ |
15413 | 1833 |
continueButton enable. |
1834 |
m notNil ifTrue:[m enable:#doContinue] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1835 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1836 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1837 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1838 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1839 |
|
13842 | 1840 |
enter |
1841 |
"enter a debugger" |
|
1842 |
||
1843 |
<context: #return> |
|
1844 |
||
1845 |
^ self |
|
15413 | 1846 |
enter:thisContext sender |
1847 |
select: nil. |
|
13842 | 1848 |
|
1849 |
"Modified: / 28-08-2012 / 21:13:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1850 |
! |
|
1851 |
||
1364 | 1852 |
enter:aContext select:initialSelectionOrNil |
73 | 1853 |
"enter the debugger - get and display the context, then start an |
1854 |
exclusive event loop on top of eveything else" |
|
1855 |
||
3447 | 1856 |
<context: #return> |
1857 |
||
16058 | 1858 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c |
1859 |
userprefs logFile| |
|
3447 | 1860 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1861 |
DebuggingDebugger == true ifTrue:[ |
16058 | 1862 |
'==> enter2: (' print. aContext print. |
1863 |
') select: ' print. initialSelectionOrNil printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1864 |
]. |
3447 | 1865 |
thisContext isRecursive ifTrue:[ |
16058 | 1866 |
"/ care for the special case, were the Debugger was autoloaded. |
1867 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1868 |
"/ condition. |
|
1869 |
foundNoByteCodeContext := false. |
|
1870 |
foundExitContext := false. |
|
1871 |
||
1872 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1873 |
[ |
|
1874 |
foundNoByteCodeContext not |
|
1875 |
and:[ foundExitContext not |
|
1876 |
and:[c notNil |
|
1877 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
|
1878 |
]]]] |
|
1879 |
whileTrue:[ |
|
1880 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1881 |
foundExitContext := true |
|
1882 |
]. |
|
1883 |
c selector == #noByteCode ifTrue:[ |
|
1884 |
foundNoByteCodeContext := true |
|
1885 |
]. |
|
1886 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1887 |
]. |
|
1888 |
||
1889 |
(foundNoByteCodeContext not |
|
1890 |
and:[ foundExitContext not]) ifFalse:[ |
|
1891 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1892 |
||
1893 |
^ MiniDebugger |
|
1894 |
enter:aContext |
|
1895 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1896 |
mayProceed:mayProceed. |
|
1897 |
]. |
|
1898 |
foundExitContext ifTrue:[ |
|
1899 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1900 |
^ self. |
|
1901 |
]. |
|
3447 | 1902 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1903 |
|
10203 | 1904 |
"/'entering: ' print. aContext printCR. |
1905 |
"/'initial: ' print. initialSelectionOrNil printCR. |
|
8170 | 1906 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1907 |
||
11890 | 1908 |
(self isHaltToBeIgnored) ifTrue:[ |
16058 | 1909 |
^ self. |
8170 | 1910 |
]. |
11892 | 1911 |
"/ "/ does not work yet - but we should ignore any breakpoints while stepping |
1912 |
"/ (stepping and:[steppedContext notNil]) ifTrue:[ |
|
1913 |
"/ self isEnteredDueToBreakpointOrHalt ifTrue:[ |
|
1914 |
"/ 'DebugView [info]: ignored other interrupt while stepping' infoPrintCR. |
|
1915 |
"/ ^ self |
|
1916 |
"/ ]. |
|
1917 |
"/ ]. |
|
16058 | 1918 |
userprefs := UserPreferences current. |
1919 |
"/ optionally log this debugger entry |
|
1920 |
(logFile := userprefs debuggerLogFile) notNil ifTrue:[ |
|
1921 |
logFile asFilename appendingFileDo:[:s | |
|
1922 |
s cr. |
|
1923 |
s nextPutLine:'-----------------------'. |
|
1924 |
Timestamp now printOn:s. |
|
1925 |
s nextPutAll:' ['; nextPutAll:Processor activeProcess name; nextPutAll:']'; cr. |
|
1926 |
s cr. |
|
1927 |
aContext fullPrintAllOn:s |
|
1928 |
]. |
|
1929 |
]. |
|
1930 |
||
13965 | 1931 |
iAmNew := self drawableId isNil. |
73 | 1932 |
|
16058 | 1933 |
self verboseBacktraceHolder value:(userprefs verboseBacktraceInDebugger). |
939 | 1934 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1935 |
busy := cachable := true. |
73 | 1936 |
inspecting := false. |
1937 |
inspectedProcess := Processor activeProcess. |
|
1938 |
stepping := false. |
|
1939 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1940 |
stepHow := nil. |
8148 | 1941 |
nChainShown := InitialNChainShown. |
73 | 1942 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1943 |
"/ if debugger is entered while a box has grabbed the |
9076 | 1944 |
"/ 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
|
1945 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1946 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1947 |
"/ 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
|
1948 |
"/ 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
|
1949 |
"/ 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
|
1950 |
Screen allScreens do:[:aScreen | |
16058 | 1951 |
aScreen ungrabPointer. |
1952 |
aScreen ungrabKeyboard. |
|
10205 | 1953 |
]. |
1954 |
||
1955 |
("inspectedProcess suspendedContext isNil |
|
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1956 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
16058 | 1957 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1958 |
] ifFalse:[ |
16058 | 1959 |
terminateButton enable. |
1960 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1961 |
]. |
73 | 1962 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1963 |
iAmNew ifFalse:[ |
16058 | 1964 |
"/ not the first time - disable buttons & menus |
1965 |
"/ from the previous life |
|
1966 |
self turnOffAllButtons. |
|
1967 |
||
1968 |
m := contextView middleButtonMenu. |
|
1969 |
m notNil ifTrue:[ |
|
1970 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
|
1971 |
]. |
|
1972 |
self showingDenseWalkback:(self verboseBacktraceHolder value not). |
|
132 | 1973 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1974 |
self iconLabel:'Debugger'. |
132 | 1975 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1976 |
windowGroup isNil ifTrue:[ |
16058 | 1977 |
self windowGroup: WindowGroup new. |
1978 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1979 |
]. |
132 | 1980 |
exclusive ifFalse:[ |
16058 | 1981 |
"/ create a (modal) windowGroup for myself |
1982 |
||
1983 |
windowGroup setModal:true. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1984 |
] ifTrue:[ |
16058 | 1985 |
"/ create a windowGroup with a synchronous sensor for me |
1986 |
||
1987 |
windowGroup beSynchronous. |
|
73 | 1988 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1989 |
windowGroup setProcess:Processor activeProcess. |
15027 | 1990 |
IsDebuggingQuery answer:true do:[ |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1991 |
|
16058 | 1992 |
" |
1993 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
|
1994 |
" |
|
12039 | 1995 |
"/Transcript show:'0 '; showCR:aContext. |
1996 |
"/Transcript show:'0 '; showCR:thisContext sender. |
|
1997 |
"/Transcript show:'0 '; showCR:thisContext sender sender. |
|
1998 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender. |
|
1999 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender. |
|
2000 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender. |
|
2001 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender. |
|
2002 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender. |
|
2003 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender . |
|
2004 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender. |
|
2005 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender. |
|
2006 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender sender. |
|
2007 |
"/Transcript showCR:initialSelectionOrNil. |
|
16058 | 2008 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
2009 |
"/'after setContext; first is ' print. |
|
2010 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
|
2011 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
2012 |
||
2013 |
self updateButtonsAndMenuItemsForContext:aContext. |
|
2014 |
||
2015 |
" |
|
2016 |
If this is a new debugger, do a realize. |
|
2017 |
Otherwise, its probably better to do a map, which shows the |
|
2018 |
view at the previous position, without a need for the user to set the |
|
2019 |
position again |
|
2020 |
" |
|
2021 |
iAmNew ifTrue:[ |
|
2022 |
self realize. |
|
2023 |
] ifFalse:[ |
|
2024 |
self remap. |
|
2025 |
]. |
|
2026 |
self setForegroundWindow. |
|
2027 |
||
2028 |
exclusive ifTrue:[ |
|
2029 |
self showError:' |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
2030 |
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
|
2031 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
2032 |
This is a modal debugger - all event processing is stopped.. |
10205 | 2033 |
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
|
2034 |
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
|
2035 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
2036 |
Also, there is no event processing (redraw) for other views.' |
16058 | 2037 |
]. |
2038 |
||
2039 |
self autoRaiseView ifTrue:[ |
|
2040 |
"/ self raise. |
|
2041 |
self raiseDeiconified. |
|
2042 |
self topView activate; setForegroundWindow; activate. |
|
2043 |
]. |
|
2044 |
||
2045 |
canContinue := true. |
|
2046 |
exitAction := nil. |
|
2047 |
||
2048 |
"/ enter private event handling loop. This is left (and we come back here again) |
|
2049 |
"/ when any button was pressed which requires continuation of the debuggee or |
|
2050 |
"/ closedown of the debugger. |
|
2051 |
[self controlLoop] ifCurtailed:[ |
|
2052 |
windowGroup notNil ifTrue:[ |
|
2053 |
windowGroup setProcess:nil. |
|
2054 |
]. |
|
2055 |
NumberOfDebuggers := (NumberOfDebuggers ? 1) - 1. |
|
2056 |
self destroy |
|
2057 |
]. |
|
2058 |
NumberOfDebuggers := (NumberOfDebuggers ? 1) - 1. |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
2059 |
]. |
10203 | 2060 |
"/ here after my own control loop is finished. |
2061 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2062 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2063 |
"/ 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
|
2064 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 2065 |
contextView contents:nil. |
2066 |
||
73 | 2067 |
codeView acceptAction:nil. |
942 | 2068 |
codeView doItAction:nil. |
73 | 2069 |
|
4892 | 2070 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
16058 | 2071 |
ObjectMemory stepInterruptHandler:nil. |
4892 | 2072 |
]. |
2073 |
||
11911 | 2074 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
2075 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
|
2076 |
||
73 | 2077 |
(exitAction ~~ #step) ifTrue:[ |
16058 | 2078 |
"/ not stepping or continue - close window |
2079 |
self cacheMyself. |
|
2080 |
receiverInspector release. |
|
2081 |
contextInspector release. |
|
2082 |
||
2083 |
self unmap. |
|
2084 |
self flush. |
|
2085 |
||
2086 |
(exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
|
2087 |
(exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
|
2088 |
(exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
|
2089 |
(exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
|
2090 |
(exitAction == #resend) ifTrue:[ self exit_resend. "does not return" ]. |
|
2091 |
(exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
|
2092 |
(exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
|
2093 |
exitAction isBlock ifTrue:[ |
|
2094 |
self exit_unwindThenDo:exitAction. |
|
2095 |
"does not return" |
|
2096 |
]. |
|
2097 |
"not reached" |
|
2098 |
^ self |
|
73 | 2099 |
]. |
2100 |
||
3447 | 2101 |
"/ stepping - window stays open |
940 | 2102 |
selectedContext := actualContext := firstContext := nil. |
73 | 2103 |
|
2472 | 2104 |
"/ restore the previous pointer grab |
73 | 2105 |
grabber notNil ifTrue:[ |
16058 | 2106 |
self graphicsDevice grabPointerInView:grabber. |
2107 |
grabber := nil. |
|
61 | 2108 |
]. |
73 | 2109 |
|
2110 |
(exitAction == #step) ifTrue:[ |
|
16058 | 2111 |
" |
2112 |
schedule another stepInterrupt |
|
2113 |
- must enter myself into the collection of open debuggers, |
|
2114 |
in case the stepping process comes back again via a halt or signal |
|
2115 |
before the step is finished. In this case, the stepping debugger should |
|
2116 |
come up (instead of a new one) |
|
2117 |
- must flush caches since optimized methods not always |
|
2118 |
look for pending interrupts |
|
2119 |
" |
|
2120 |
||
2121 |
"/ |
|
2122 |
"/ also must care for stepping into a return |
|
2123 |
"/ |
|
2124 |
steppedContext notNil ifTrue:[ |
|
2125 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
|
2126 |
]. |
|
2127 |
||
2128 |
OpenDebuggers isNil ifTrue:[ |
|
2129 |
OpenDebuggers := WeakIdentitySet new. |
|
2130 |
]. |
|
2131 |
OpenDebuggers add:self. |
|
2132 |
||
2133 |
self label:'single stepping - please wait ...'. |
|
2134 |
stepping := true. |
|
2135 |
||
2136 |
ObjectMemory stepInterruptHandler:self. |
|
2137 |
Processor activeProcess stepInterruptHandler:self. |
|
2138 |
ObjectMemory flushCaches. |
|
2139 |
||
2140 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
|
2141 |
Context singleStepInterruptRequest |
|
2142 |
raiseWith: |
|
2143 |
(("bigStep" steppedContextLineno notNil) |
|
2144 |
ifTrue:[#next] |
|
2145 |
ifFalse:[#step]) |
|
2146 |
] ifFalse:[ |
|
2147 |
"/ see if we came here through an interrupt-action |
|
2148 |
"/ (i.e. aProcess interruptWith:...) |
|
2149 |
||
2150 |
enteredByInterrupt := false. |
|
2151 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
2152 |
[enteredByInterrupt not |
|
2153 |
and:[con notNil |
|
2154 |
and:[con ~~ aContext]]] whileTrue:[ |
|
2155 |
((sel := con selector) == #timerInterrupt |
|
2156 |
or:[sel == #ioInterrupt]) ifTrue:[ |
|
2157 |
enteredByInterrupt := true. |
|
2158 |
] ifFalse:[ |
|
2159 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
2160 |
]. |
|
2161 |
]. |
|
2162 |
||
2163 |
ObjectMemory flushInlineCaches. |
|
2164 |
||
2165 |
DebuggingDebugger == true ifTrue:[ |
|
2166 |
enteredByInterrupt printCR. |
|
2167 |
]. |
|
2168 |
enteredByInterrupt ifTrue:[ |
|
2169 |
"/ don't want to step through all intermediate |
|
2170 |
"/ (scheduler-) contexts; place a return-trap on the |
|
2171 |
"/ one right below the interesting one |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
2172 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
2173 |
"/ 'special unwind return' printCR. |
16058 | 2174 |
con unwindThenDo:[ |
2175 |
Processor activeProcess stepInterruptHandler:self. |
|
2176 |
ObjectMemory stepInterruptHandler:self. |
|
2177 |
InStepInterrupt := nil. |
|
2178 |
StepInterruptPending := 1. |
|
2179 |
InterruptPending := 1]. |
|
2180 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
2181 |
"/ 'normal step return' printCR. |
16058 | 2182 |
skipLineNr ~~ #return ifTrue:[ |
2183 |
StepInterruptPending := 1. |
|
2184 |
InterruptPending := 1. |
|
2185 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
2186 |
"/ 'step for return' printCR. |
16058 | 2187 |
] |
2188 |
]. |
|
2189 |
InStepInterrupt := nil |
|
2190 |
] |
|
73 | 2191 |
] ifFalse:[ |
16058 | 2192 |
OpenDebuggers notNil ifTrue:[ |
2193 |
OpenDebuggers remove:self ifAbsent:[]. |
|
2194 |
]. |
|
2195 |
self cacheMyself. |
|
73 | 2196 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
2197 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
2198 |
"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
|
2199 |
"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
|
2200 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
11697 | 2201 |
"Modified: / 27-07-2012 / 17:35:56 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2202 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2203 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2204 |
exit_abort |
5455 | 2205 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
2206 |
"/ that one would run on top of this context. |
|
2207 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
2208 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
2209 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 2210 |
"/ done in the #enter:select method. |
5455 | 2211 |
"/ You are not expected to understand this. |
2212 |
||
6487 | 2213 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
2214 |
! |
|
2215 |
||
2216 |
exit_abortAll |
|
2217 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
2218 |
"/ that one would run on top of this context. |
|
2219 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
2220 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
2221 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 2222 |
"/ done in the #enter:select method. |
6487 | 2223 |
"/ You are not expected to understand this. |
2224 |
||
2225 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2226 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2227 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2228 |
exit_quickTerminate |
3447 | 2229 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2230 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2231 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2232 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 2233 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2234 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2235 |
|
13360 | 2236 |
exit_resend |
2237 |
|con| |
|
2238 |
||
2239 |
selectedContext notNil ifTrue:[ |
|
15413 | 2240 |
con := selectedContext. |
2241 |
self cacheMyself. |
|
2242 |
" |
|
2243 |
have to catch errors occuring in unwind-blocks |
|
2244 |
" |
|
2245 |
Error handle:[:ex | |
|
2246 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
2247 |
ex description infoPrintCR. |
|
2248 |
ex proceed |
|
2249 |
] do:[ |
|
2250 |
^ con unwindThenResend. |
|
2251 |
]. |
|
2252 |
'DebugView [warning]: cannot resend selected context''s message' errorPrintCR |
|
13360 | 2253 |
] |
2254 |
! |
|
2255 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2256 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2257 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2258 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2259 |
selectedContext notNil ifTrue:[ |
15413 | 2260 |
con := selectedContext. |
2261 |
self cacheMyself. |
|
2262 |
" |
|
2263 |
have to catch errors occuring in unwind-blocks |
|
2264 |
" |
|
2265 |
Error handle:[:ex | |
|
2266 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
2267 |
ex description infoPrintCR. |
|
2268 |
ex proceed |
|
2269 |
] do:[ |
|
2270 |
con unwindAndRestart. |
|
2271 |
]. |
|
2272 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2273 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2274 |
|
11818 | 2275 |
"Created: / 16-11-2001 / 17:23:17 / cg" |
11819 | 2276 |
"Modified: / 26-09-2012 / 15:09:52 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2277 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2278 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2279 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2280 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2281 |
|
14902 | 2282 |
retVal := nil. |
2283 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2284 |
selectedContext notNil ifTrue:[ |
15413 | 2285 |
" |
2286 |
if there is a selection in the codeView, |
|
2287 |
evaluate it and use the result as return value |
|
2288 |
" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2289 |
"/ 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
|
2290 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2291 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2292 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2293 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2294 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2295 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2296 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2297 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2298 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2299 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2300 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2301 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2302 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2303 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2304 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2305 |
|
15413 | 2306 |
con := selectedContext. |
2307 |
self cacheMyself. |
|
2308 |
" |
|
2309 |
have to catch errors occuring in unwind-blocks |
|
2310 |
" |
|
2311 |
Error handle:[:ex | |
|
2312 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
2313 |
ex description infoPrintCR. |
|
2314 |
ex proceed |
|
2315 |
] do:[ |
|
2316 |
con unwind:retVal. |
|
2317 |
]. |
|
2318 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2319 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2320 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2321 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 2322 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2323 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2324 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2325 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2326 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2327 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2328 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2329 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2330 |
Error handle:[:ex | |
15413 | 2331 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
2332 |
ex description infoPrintCR. |
|
2333 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2334 |
] do:[ |
15413 | 2335 |
self cacheMyself. |
2336 |
Processor activeProcess terminate. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2337 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2338 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2339 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2340 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 2341 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
2342 |
! |
|
2343 |
||
6487 | 2344 |
exit_unwindThenDo:aBlock |
2345 |
|con| |
|
2346 |
||
2347 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
2348 |
"/ that one would run on top of this context. |
|
2349 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
2350 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
2351 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 2352 |
"/ done in the #enter:select method. |
6487 | 2353 |
"/ You are not expected to understand this. |
2354 |
||
2355 |
" |
|
2356 |
have to catch errors occuring in unwind-blocks |
|
2357 |
" |
|
2358 |
self cacheMyself. |
|
12743 | 2359 |
con := thisContext sender. |
6487 | 2360 |
|
2361 |
Error handle:[:ex | |
|
15413 | 2362 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
2363 |
ex description infoPrintCR. |
|
2364 |
ex proceed |
|
6487 | 2365 |
] do:[ |
15413 | 2366 |
"/ find the enter:select context. |
2367 |
[(con selector ~~ #enter:select:) or:[con receiver ~~ self]] whileTrue:[ |
|
2368 |
con := con sender |
|
2369 |
]. |
|
2370 |
||
2371 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
2372 |
con sender receiver == self class ifTrue:[ |
|
2373 |
con := con sender. |
|
2374 |
con sender receiver == self class ifTrue:[ |
|
2375 |
con := con sender methodHome. |
|
2376 |
]. |
|
2377 |
]. |
|
2378 |
||
2379 |
con unwindThenDo:aBlock. |
|
6487 | 2380 |
]. |
2381 |
'DebugView [warning]: abort failed' errorPrintCR |
|
2382 |
||
2383 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
2384 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
2385 |
! |
|
2386 |
||
3447 | 2387 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
2388 |
|selection con1 con2 h| |
|
2389 |
||
2390 |
initialSelectionOrNil notNil ifTrue:[ |
|
15413 | 2391 |
^ initialSelectionOrNil |
3447 | 2392 |
]. |
2393 |
||
2394 |
" |
|
2395 |
and find the one context to show initially |
|
2396 |
- if we came here by a send (single step), its the top context; |
|
2397 |
- if we came here by a step (i.e. bigStep), its the top context |
|
2398 |
(for ifs and whiles) or the sender (for regular sends). |
|
2399 |
- otherwise, we came here by some signal raise, and we are interested |
|
2400 |
in the context where the raise actually occured. |
|
2401 |
" |
|
2402 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
2403 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
12039 | 2404 |
"/ Transcript show:'x '; showCR:exitAction. |
2405 |
||
2406 |
"/ came here via a step? |
|
3447 | 2407 |
exitAction == #step ifTrue:[ |
15413 | 2408 |
selection := 1. |
2409 |
steppedContext notNil ifTrue:[ |
|
2410 |
||
2411 |
" |
|
2412 |
if we came here by a big-step, show the method where we are |
|
2413 |
" |
|
2414 |
con1 == steppedContext ifTrue:[ |
|
2415 |
selection := 1 |
|
2416 |
] ifFalse:[ |
|
2417 |
con2 == steppedContext ifTrue:[ |
|
2418 |
selection := 2 |
|
2419 |
] |
|
2420 |
]. |
|
2421 |
" |
|
2422 |
for bigStep, we could also be in a block below the actual method ... |
|
2423 |
" |
|
2424 |
((h := con1 home) notNil |
|
2425 |
and:[h == steppedContext]) ifTrue:[ |
|
2426 |
selection := 1 |
|
2427 |
] ifFalse:[ |
|
2428 |
(con2 notNil |
|
2429 |
and:[(h := con2 home) notNil |
|
2430 |
and:[h == steppedContext]]) ifTrue:[ |
|
2431 |
selection := 2 |
|
2432 |
] |
|
2433 |
]. |
|
2434 |
h := nil. |
|
2435 |
] |
|
3447 | 2436 |
] ifFalse:[ |
15413 | 2437 |
steppedContext isNil ifTrue:[ |
2438 |
" |
|
2439 |
preselect a more interesting context, (where halt/raise was ...) |
|
2440 |
" |
|
2441 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
2442 |
selection := self class interestingContextIndexIn:contextArray. |
|
12039 | 2443 |
"/ Transcript show:'x '; showCR:selection. |
15413 | 2444 |
selection := selection min:(contextArray size). |
2445 |
] ifFalse:[ |
|
2446 |
" |
|
2447 |
if we came here by a big-step, show the method where we are |
|
2448 |
" |
|
2449 |
con1 == steppedContext ifTrue:[ |
|
2450 |
selection := 1 |
|
2451 |
] ifFalse:[ |
|
2452 |
con2 == steppedContext ifTrue:[ |
|
2453 |
selection := 2. |
|
2454 |
] |
|
2455 |
] |
|
2456 |
] |
|
3447 | 2457 |
]. |
2458 |
^ selection |
|
2459 |
||
2460 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
2461 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 2462 |
! |
2463 |
||
5110 | 2464 |
isInspecting |
2465 |
^ inspecting |
|
2466 |
! |
|
2467 |
||
2468 |
isNotInspecting |
|
2469 |
^ inspecting not |
|
2470 |
! |
|
2471 |
||
73 | 2472 |
openOn:aProcess |
10205 | 2473 |
"enter the debugger on a process - |
73 | 2474 |
in this case, we are just inspecting the context chain of the process, |
2475 |
not running on top of the debugged process, but as a separate |
|
2476 |
one. (think of it as an inspector showing more detail, and offering |
|
2477 |
some more control operations)" |
|
2478 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2479 |
|bpanel dummy w| |
73 | 2480 |
|
15257 | 2481 |
self verboseBacktraceHolder value:( UserPreferences current verboseBacktraceInDebugger ). |
939 | 2482 |
|
73 | 2483 |
busy := true. |
2484 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2485 |
stepHow := nil. |
73 | 2486 |
inspecting := true. |
2487 |
inspectedProcess := aProcess. |
|
8148 | 2488 |
nChainShown := InitialNChainShown. |
73 | 2489 |
|
2490 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2491 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2492 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2493 |
"/ get the max size & freeze button |
6647 | 2494 |
continueButton label:(resources string:'Continue'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2495 |
w := continueButton preferredWidth. |
6647 | 2496 |
continueButton label:(resources string:'Stop'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2497 |
w := w max:(continueButton preferredWidth). |
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2498 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2499 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2500 |
aProcess state == #run ifTrue:[ |
15413 | 2501 |
self graphicsDevice hasColors ifTrue:[ |
2502 |
continueButton foregroundColor:Color red darkened. |
|
2503 |
]. |
|
2504 |
continueButton label:(resources string:'Stop'). |
|
2505 |
continueButton action:[self doStop]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2506 |
] ifFalse:[ |
15413 | 2507 |
self graphicsDevice hasColors ifTrue:[ |
2508 |
continueButton foregroundColor:Color green darkened darkened. |
|
2509 |
]. |
|
2510 |
continueButton label:(resources string:'Continue'). |
|
2511 |
continueButton action:[self doContinue]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2512 |
]. |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2513 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
73 | 2514 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2515 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2516 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2517 |
|
92 | 2518 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 2519 |
dummy borderWidth:0; level:0. |
61 | 2520 |
|
73 | 2521 |
"/ stepButton destroy. |
2522 |
"/ sendButton destroy. |
|
2523 |
||
2524 |
updateButton := Button |
|
15413 | 2525 |
label:(resources string:'Update') |
2526 |
action:[self updateContext] |
|
2527 |
in:bpanel. |
|
73 | 2528 |
monitorToggle := Toggle in:bpanel. |
6647 | 2529 |
monitorToggle label:(resources string:'Monitor'). |
73 | 2530 |
monitorToggle pressAction:[self autoUpdateOn]. |
2531 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
2532 |
||
2533 |
"can only look into process - context chain is not active" |
|
2534 |
canContinue := true. |
|
2535 |
||
2536 |
terminateButton enable. |
|
2537 |
abortButton enable. |
|
2538 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2539 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2540 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2541 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2542 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2543 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 2544 |
|
2545 |
aProcess isNil ifTrue:[ |
|
15413 | 2546 |
terminateButton disable. |
2547 |
abortButton disable. |
|
2548 |
continueButton disable. |
|
2549 |
returnButton disable. |
|
2550 |
restartButton disable. |
|
73 | 2551 |
] ifFalse:[ |
15413 | 2552 |
(aProcess suspendedContext isNil |
2553 |
or:[aProcess isSystemProcess]) ifTrue:[ |
|
2554 |
terminateButton disable. |
|
2555 |
]. |
|
2556 |
||
2557 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
|
2558 |
||
2559 |
catchBlock := [ |
|
2560 |
catchBlock := nil. |
|
2561 |
contextArray := nil. |
|
2562 |
selectedContext := actualContext := firstContext := nil. |
|
2563 |
steppedContext := wrapperContext := nil. |
|
2564 |
||
2565 |
(exitAction == #terminate) ifTrue:[ |
|
2566 |
aProcess terminate. |
|
2567 |
]. |
|
2568 |
(exitAction == #quickTerminate) ifTrue:[ |
|
2569 |
aProcess terminateNoSignal. |
|
2570 |
]. |
|
2571 |
super destroy |
|
2572 |
]. |
|
73 | 2573 |
]. |
2574 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
2575 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2576 |
"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
|
2577 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2578 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2579 |
|
13388 | 2580 |
selectContextWithIndex:index |
13362 | 2581 |
self showSelection:index. |
2582 |
contextView setSelection:index. |
|
2583 |
index > 1 ifTrue:[ |
|
15413 | 2584 |
contextView scrollToLine:(index - 1) |
13362 | 2585 |
]. |
2586 |
! |
|
2587 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2588 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 2589 |
|selection| |
2590 |
||
2591 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2592 |
selection notNil ifTrue:[ |
15413 | 2593 |
self selectContextWithIndex:selection |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2594 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2595 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2596 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 2597 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2598 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2599 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2600 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2601 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2602 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2603 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2604 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2605 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2606 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2607 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2608 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2609 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2610 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 2611 |
! ! |
2612 |
||
2613 |
!DebugView methodsFor:'help'! |
|
2614 |
||
8212 | 2615 |
flyByHelpDependsOnPositionIn:aView |
2616 |
"subclasses where the help-text depends upon the pointer position might |
|
2617 |
want to redefine this" |
|
2618 |
||
2619 |
^ aView == codeView |
|
2620 |
! |
|
2621 |
||
3510 | 2622 |
flyByHelpTextFor:aComponent |
2623 |
|s| |
|
2624 |
||
15774 | 2625 |
aComponent == codeView ifTrue:[ |
2626 |
|point localPoint| |
|
2627 |
||
15857
9a3213bfdd68
Use access method for #device (delegate GC!)
Stefan Vogel <sv@exept.de>
parents:
15835
diff
changeset
|
2628 |
point := self device pointerPosition. |
9a3213bfdd68
Use access method for #device (delegate GC!)
Stefan Vogel <sv@exept.de>
parents:
15835
diff
changeset
|
2629 |
localPoint := self device translatePointFromRoot:point toView:codeView. |
15774 | 2630 |
((localPoint x between:0 and:codeView width) |
2631 |
and:[localPoint y between:0 and:codeView height]) |
|
2632 |
ifTrue:[ |
|
2633 |
^ self flyByHelpTextFor:codeView at:localPoint |
|
2634 |
]. |
|
2635 |
^ nil |
|
2636 |
]. |
|
2637 |
||
3510 | 2638 |
aComponent == abortButton ifTrue:[ |
15774 | 2639 |
s := 'Abort (unwind to eventLoop)' |
3510 | 2640 |
]. |
2641 |
aComponent == terminateButton ifTrue:[ |
|
15774 | 2642 |
Processor activeProcess isGUIProcess ifTrue:[ |
2643 |
s := 'Terminate the process (closes view and shuts down application)' |
|
2644 |
] ifFalse:[ |
|
2645 |
s := 'Terminate the process' |
|
2646 |
] |
|
3510 | 2647 |
]. |
2648 |
aComponent == continueButton ifTrue:[ |
|
15774 | 2649 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2650 |
s := 'Stop' |
|
2651 |
] ifFalse:[ |
|
2652 |
s := 'Continue execution' |
|
2653 |
] |
|
3510 | 2654 |
]. |
2655 |
aComponent == stepButton ifTrue:[ |
|
15774 | 2656 |
s := 'Step to next send in selected context (don''t enter into called methods)' |
3510 | 2657 |
]. |
2658 |
aComponent == nextButton ifTrue:[ |
|
15774 | 2659 |
s := 'Step to next line in selected context (don''t enter into called methods)' |
3510 | 2660 |
]. |
2661 |
aComponent == nextOverButton ifTrue:[ |
|
15774 | 2662 |
s := 'Step over to cursor-line' |
3510 | 2663 |
]. |
2664 |
aComponent == nextOutButton ifTrue:[ |
|
15774 | 2665 |
s := 'Step out to caller' |
3510 | 2666 |
]. |
2667 |
aComponent == sendButton ifTrue:[ |
|
15774 | 2668 |
s := 'Send next message (enter into called methods)' |
3510 | 2669 |
]. |
2670 |
aComponent == returnButton ifTrue:[ |
|
15774 | 2671 |
restartButton enabled ifTrue:[ |
2672 |
s := 'Return from the selected method' |
|
2673 |
] ifFalse:[ |
|
2674 |
s := 'Return from the selected method.\Disabled, because this method was compiled with context optimization, and cannot be returned from.' withCRs |
|
2675 |
] |
|
3510 | 2676 |
]. |
2677 |
aComponent == restartButton ifTrue:[ |
|
15774 | 2678 |
restartButton enabled ifTrue:[ |
2679 |
s := 'Restart the selected method.\If the code was changed in the meanwhile, the original method will be executed again' |
|
2680 |
] ifFalse:[ |
|
2681 |
s := 'Restart the selected method.\Disabled, because this method was compiled with context optimization, and cannot be returned from.' withCRs |
|
2682 |
] |
|
3510 | 2683 |
]. |
13361 | 2684 |
aComponent == resendButton ifTrue:[ |
15774 | 2685 |
resendButton enabled ifTrue:[ |
2686 |
s := 'Resend the selected method''s message.\If the code was changed in the meanwhile, the new method will be called with the original arguments.' |
|
2687 |
] ifFalse:[ |
|
2688 |
s := 'Resend the selected method''s message.\Disabled, because this method was compiled with context optimization, and cannot be returned from.' withCRs |
|
2689 |
] |
|
13361 | 2690 |
]. |
3510 | 2691 |
aComponent == monitorToggle ifTrue:[ |
15774 | 2692 |
s := 'Toggle monitoring' |
3510 | 2693 |
]. |
2694 |
aComponent == updateButton ifTrue:[ |
|
15774 | 2695 |
s := 'Update' |
3510 | 2696 |
]. |
13464 | 2697 |
aComponent == defineButton ifTrue:[ |
15774 | 2698 |
s := 'Define the missing method (as halting) and proceed into it.\A debugger will reopen there, so you can add the code then' |
13464 | 2699 |
]. |
8656 | 2700 |
aComponent == reportButton ifTrue:[ |
15774 | 2701 |
s := 'Send a defect report via eMail' |
8656 | 2702 |
]. |
3510 | 2703 |
s notNil ifTrue:[ |
15774 | 2704 |
^ resources stringWithCRs:s |
3510 | 2705 |
]. |
2706 |
^ nil |
|
2707 |
||
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2708 |
"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
|
2709 |
"Modified: / 18-06-2010 / 11:34:51 / cg" |
3510 | 2710 |
! |
2711 |
||
8212 | 2712 |
flyByHelpTextFor:aComponent at:aPointOrNil |
8396 | 2713 |
|s vline line col pos interval| |
8212 | 2714 |
|
2715 |
aComponent == codeView ifFalse:[^ nil]. |
|
2716 |
aPointOrNil isNil ifTrue:[^ nil]. |
|
9446 | 2717 |
self sensor motionEventPending ifTrue:[^ nil]. |
8212 | 2718 |
|
8396 | 2719 |
vline := codeView visibleLineOfY:aPointOrNil y. |
2720 |
col := codeView colOfX:aPointOrNil x inVisibleLine:vline. |
|
2721 |
line := codeView visibleLineToAbsoluteLine:vline. |
|
8212 | 2722 |
|
2723 |
pos := codeView characterPositionOfLine:line col:col. |
|
2724 |
interval := pos to:pos. |
|
2725 |
||
10205 | 2726 |
self |
15413 | 2727 |
withNodeValueAtInterval:interval |
2728 |
do:[:value :description | |
|
2729 |
|valueClassOrSizeString valueString| |
|
2730 |
||
2731 |
valueClassOrSizeString := valueString := ''. |
|
2732 |
||
2733 |
"/ some heuristics as when to show the class name (a purely subjective preference) |
|
2734 |
value isString ifTrue:[ |
|
2735 |
value isText ifTrue:[ |
|
2736 |
valueString := '"',(value contractTo:80),'"'. |
|
2737 |
] ifFalse:[ |
|
2738 |
valueString := value storeString contractTo:80. |
|
2739 |
]. |
|
2740 |
] ifFalse:[ |
|
2741 |
(value isBoolean |
|
2742 |
or:[ value isInteger |
|
2743 |
or:[ value isSymbol ]]) ifTrue:[ |
|
2744 |
valueString := value printString. |
|
2745 |
] ifFalse:[ |
|
2746 |
valueClassOrSizeString := ' (',value class name,')'. |
|
2747 |
||
2748 |
(value isArray |
|
2749 |
or:[ value isOrderedCollection ]) ifTrue:[ |
|
2750 |
valueClassOrSizeString := ' (size=',value size printString,')'. |
|
2751 |
]. |
|
2752 |
||
2753 |
Error handle:[:ex | |
|
2754 |
valueString := '??? (',ex description,')' |
|
2755 |
] do:[ |
|
2756 |
[ |
|
2757 |
valueString := value printString contractTo:80. |
|
2758 |
] valueWithWatchDog:[ valueString := value classNameWithArticle ] afterMilliseconds:30. |
|
2759 |
] |
|
2760 |
] |
|
2761 |
]. |
|
2762 |
description isEmptyOrNil ifTrue:[ |
|
2763 |
s := valueString , valueClassOrSizeString |
|
2764 |
] ifFalse:[ |
|
2765 |
s := description , ': ', valueString, valueClassOrSizeString |
|
2766 |
]. |
|
2767 |
]. |
|
8592 | 2768 |
"/ Transcript showCR:s. |
2769 |
^ s |
|
9446 | 2770 |
|
2771 |
"Modified: / 27-04-2010 / 17:51:53 / cg" |
|
8212 | 2772 |
! |
2773 |
||
266 | 2774 |
helpTextFor:aComponent |
2775 |
|s| |
|
2776 |
||
2777 |
aComponent == abortButton ifTrue:[ |
|
15413 | 2778 |
s := 'HELP_ABORT' |
266 | 2779 |
]. |
2780 |
aComponent == terminateButton ifTrue:[ |
|
15413 | 2781 |
s := 'HELP_TERMINATE' |
266 | 2782 |
]. |
2783 |
aComponent == continueButton ifTrue:[ |
|
15413 | 2784 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2785 |
s := 'HELP_STOP' |
|
2786 |
] ifFalse:[ |
|
2787 |
s := 'HELP_CONTINUE' |
|
2788 |
] |
|
266 | 2789 |
]. |
2790 |
aComponent == stepButton ifTrue:[ |
|
15413 | 2791 |
s := 'HELP_STEP' |
266 | 2792 |
]. |
2793 |
aComponent == nextButton ifTrue:[ |
|
15413 | 2794 |
s := 'HELP_NEXT' |
266 | 2795 |
]. |
1065 | 2796 |
aComponent == nextOverButton ifTrue:[ |
15413 | 2797 |
s := 'HELP_NEXTOVER' |
1065 | 2798 |
]. |
2799 |
aComponent == nextOutButton ifTrue:[ |
|
15413 | 2800 |
s := 'HELP_NEXTOUT' |
1065 | 2801 |
]. |
266 | 2802 |
aComponent == stepButton ifTrue:[ |
15413 | 2803 |
s := 'HELP_STEP' |
266 | 2804 |
]. |
2805 |
aComponent == sendButton ifTrue:[ |
|
15413 | 2806 |
s := 'HELP_SEND' |
266 | 2807 |
]. |
2808 |
aComponent == returnButton ifTrue:[ |
|
15413 | 2809 |
returnButton enabled ifTrue:[ |
2810 |
s := 'HELP_RETURN' |
|
2811 |
] ifFalse:[ |
|
2812 |
s := 'HELP_RETURN_DISABLED' |
|
2813 |
]. |
|
266 | 2814 |
]. |
2815 |
aComponent == restartButton ifTrue:[ |
|
15413 | 2816 |
restartButton enabled ifTrue:[ |
2817 |
s := 'HELP_RESTART' |
|
2818 |
] ifFalse:[ |
|
2819 |
s := 'HELP_RESTART_DISABLED' |
|
2820 |
]. |
|
266 | 2821 |
]. |
13361 | 2822 |
aComponent == resendButton ifTrue:[ |
15413 | 2823 |
resendButton enabled ifTrue:[ |
2824 |
s := 'HELP_RESEND' |
|
2825 |
] ifFalse:[ |
|
2826 |
s := 'HELP_RESEND_DISABLED' |
|
2827 |
]. |
|
13361 | 2828 |
]. |
266 | 2829 |
aComponent == contextView ifTrue:[ |
15413 | 2830 |
s := 'HELP_WALKBACK' |
266 | 2831 |
]. |
2832 |
aComponent == codeView ifTrue:[ |
|
15413 | 2833 |
s := 'HELP_CODEVIEW' |
266 | 2834 |
]. |
2835 |
aComponent == monitorToggle ifTrue:[ |
|
15413 | 2836 |
s := 'HELP_MONITOR' |
266 | 2837 |
]. |
2838 |
aComponent == updateButton ifTrue:[ |
|
15413 | 2839 |
s := 'HELP_UPDATE' |
266 | 2840 |
]. |
14523 | 2841 |
aComponent == gotoDialogOpenerButton ifTrue:[ |
15413 | 2842 |
s := 'HELP_GOTO_DIALOG_OPENER' |
14523 | 2843 |
]. |
2844 |
aComponent == gotoApplicationActionMethodButton ifTrue:[ |
|
15413 | 2845 |
s := 'HELP_GOTO_APPLICATION_ACTION' |
14523 | 2846 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2847 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2848 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2849 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2850 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
15413 | 2851 |
s := 'HELP_REC_INSP' |
266 | 2852 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2853 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
15413 | 2854 |
s := 'HELP_CON_INSP' |
266 | 2855 |
]. |
2856 |
||
2857 |
s notNil ifTrue:[ |
|
15413 | 2858 |
^ resources stringWithCRs:s |
266 | 2859 |
]. |
2860 |
^ nil |
|
2861 |
||
2862 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 2863 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 2864 |
! ! |
2865 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2866 |
!DebugView methodsFor:'initialization & release'! |
266 | 2867 |
|
2868 |
addToCurrentProject |
|
2869 |
"ignored here" |
|
2870 |
||
2871 |
^ self |
|
2872 |
! |
|
2873 |
||
2115 | 2874 |
destroy |
2875 |
"closing the debugger implies an abort or continue" |
|
2876 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2877 |
self destroyWithConfirmation:true |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2878 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2879 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2880 |
"Modified: / 23-03-2012 / 12:50:01 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2881 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2882 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2883 |
destroyWithConfirmation:withConfirmation |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2884 |
"closing the debugger implies an abort or continue" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2885 |
|
2404 | 2886 |
|m| |
2887 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2888 |
withConfirmation ifTrue:[ |
15413 | 2889 |
self checkIfCodeIsReallyModified ifTrue:[ |
2890 |
(self confirm:('Code modified - exit anyway ?')) |
|
2891 |
ifFalse:[ |
|
2892 |
^ self |
|
2893 |
] |
|
2894 |
] |
|
2115 | 2895 |
]. |
2896 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2897 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2898 |
|
2404 | 2899 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 2900 |
inspecting ifFalse:[ |
15413 | 2901 |
"I am running on top of a process, abort or continue it" |
2902 |
||
2903 |
windowGroup notNil ifTrue:[ |
|
2904 |
windowGroup setProcess:nil. |
|
2905 |
]. |
|
2906 |
self uncacheMyself. |
|
2907 |
||
2908 |
"/ |
|
2909 |
"/ catch invalid return; |
|
2910 |
"/ this happens, when my process has somehow died (quickterminate) |
|
2911 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
2912 |
"/ #destroy-window function. |
|
2913 |
"/ |
|
2914 |
Context cannotReturnSignal handle:[:ex | |
|
2915 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
|
2916 |
self uncacheMyself. |
|
2917 |
Debugger newDebugger. |
|
2918 |
ex return. |
|
2919 |
] do:[ |
|
2920 |
AbortOperationRequest isHandled ifTrue:[ |
|
2921 |
self doAbort. |
|
2922 |
] ifFalse:[ |
|
2923 |
self doContinue |
|
2924 |
] |
|
2925 |
]. |
|
2926 |
"/ We don't reach this point normally |
|
2927 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
2115 | 2928 |
]. |
2929 |
||
2299 | 2930 |
Debugger newDebugger. |
2115 | 2931 |
"/ since I am going to be destroyed, remove me from the cache |
2932 |
self uncacheMyself. |
|
2933 |
super destroy. |
|
2934 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2935 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2936 |
"Created: / 23-03-2012 / 12:49:50 / cg" |
2115 | 2937 |
! |
2938 |
||
266 | 2939 |
initialize |
10205 | 2940 |
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel |
12529 | 2941 |
newLayout v exceptionAndTogglePanel codeToggleLabels userPrefs| |
266 | 2942 |
|
2943 |
super initialize. |
|
2944 |
||
12529 | 2945 |
userPrefs := UserPreferences current. |
2946 |
||
15257 | 2947 |
self verboseBacktraceHolder value:(userPrefs verboseBacktraceInDebugger). |
2948 |
||
12529 | 2949 |
hideSupportCode := userPrefs hideSupportCodeInDebugger ? false. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
2950 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
15413 | 2951 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2952 |
|
266 | 2953 |
busy := false. |
2954 |
exclusive := false. |
|
2955 |
inspecting := false. |
|
2956 |
exitAction := nil. |
|
2957 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2958 |
stepHow := nil. |
266 | 2959 |
canContinue := false. |
2960 |
||
3269 | 2961 |
mH := 0. |
2962 |
||
3447 | 2963 |
menuPanel := MenuPanel in:self. |
8131 | 2964 |
menuPanel receiver:self. |
3447 | 2965 |
menuPanel verticalLayout:false. |
8131 | 2966 |
menu := self class menuSpec decodeAsLiteralArray. |
2967 |
menu findGuiResourcesIn:self. |
|
2968 |
menuPanel menu:menu. |
|
3447 | 2969 |
|
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2970 |
mH := menuPanel preferredHeight. |
3447 | 2971 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
2972 |
||
12529 | 2973 |
newLayout := userPrefs useNewLayoutInDebugger. |
8148 | 2974 |
newLayout ifFalse:[ |
15413 | 2975 |
bpanel := HorizontalPanelView in:self. |
2976 |
||
2977 |
self initializeButtonsIn:bpanel. |
|
2978 |
||
2979 |
bH := bpanel preferredHeight + 5. |
|
2980 |
bpanel origin:(0.0 @ mH) |
|
2981 |
extent:(1.0 @ bH). |
|
2982 |
panel := VariableVerticalPanel |
|
2983 |
origin:(0.0 @ (mH + bH)) |
|
2984 |
corner:(1.0 @ 1.0) |
|
2985 |
in:self. |
|
2986 |
||
2987 |
v := self initializeContextListViewIn:panel. |
|
2988 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2989 |
||
2990 |
codePanel := View in:panel. |
|
2991 |
v := self initializeCodeViewIn:codePanel. |
|
2992 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
2993 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2994 |
||
2995 |
v := self initializeInspectorViewsIn:panel. |
|
2996 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2997 |
|
8148 | 2998 |
] ifTrue:[ |
15413 | 2999 |
bpanel1 := HorizontalPanelView in:self. |
3000 |
self initializeButtons1In:bpanel1. |
|
3001 |
||
3002 |
contextInfoLabel := Label label:''. |
|
3003 |
contextInfoLabel adjust:#left. |
|
3004 |
bpanel1 add:contextInfoLabel. |
|
3005 |
||
3006 |
bH1 := bpanel1 preferredHeight + 5. |
|
3007 |
bpanel1 origin:(0.0 @ mH) |
|
3008 |
extent:(1.0 @ bH1). |
|
3009 |
panel := VariableVerticalPanel |
|
3010 |
origin:(0.0 @ (mH + bH1)) |
|
3011 |
corner:(1.0 @ 1.0) |
|
3012 |
in:self. |
|
3013 |
"/ panel showHandle:true. |
|
3014 |
"/ panel handlePosition:#left. |
|
3015 |
||
3016 |
v := self initializeContextListViewIn:panel. |
|
3017 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
3018 |
||
3019 |
codePanel := View in:panel. |
|
3020 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
3021 |
self initializeButtons2In:bpanel2. |
|
3022 |
||
3023 |
bH2 := bpanel2 preferredHeight + 5. |
|
3024 |
bpanel2 origin:(0.0 @ 0.0) |
|
3025 |
extent:(1.0 @ bH2). |
|
3026 |
||
3027 |
exceptionInfoLabel := Label label:''. |
|
3028 |
exceptionInfoLabel adjust:#left. |
|
3029 |
||
3030 |
exceptionAndTogglePanel := HorizontalPanelView in:codePanel. |
|
3031 |
exceptionAndTogglePanel horizontalLayout:#left. |
|
3032 |
exceptionAndTogglePanel |
|
3033 |
geometryLayout: |
|
3034 |
((LayoutFrame |
|
3035 |
origin:(0.0 @ 0.0) |
|
3036 |
corner:(1.0 @ 0.0)) |
|
3037 |
topOffset:bH2; |
|
3038 |
bottomOffset:(bH2 + exceptionInfoLabel preferredHeight + 6); |
|
3039 |
rightOffset:-2). |
|
3040 |
||
3041 |
methodCodeToggleSelectionHolder := 1 asValue. |
|
3042 |
methodCodeToggleSelectionHolder onChangeSend:#methodCodeToggleChanged to:self. |
|
3043 |
codeToggleLabels := resources array:{ |
|
3044 |
'Showing Original Code (being executed, but obsolete)' asText backgroundColorizeAllWith:Color red lightened . |
|
3045 |
'Showing Current Code' asText backgroundColorizeAllWith:Color green lightened . |
|
3046 |
}. |
|
3047 |
methodCodeToggle := PopUpList label:codeToggleLabels first in:exceptionAndTogglePanel. |
|
3048 |
methodCodeToggle list:codeToggleLabels. |
|
3049 |
methodCodeToggle useIndex:true. |
|
3050 |
methodCodeToggle model:methodCodeToggleSelectionHolder. |
|
3051 |
methodCodeToggle beInvisible. |
|
3052 |
||
3053 |
exceptionAndTogglePanel add:exceptionInfoLabel. |
|
3054 |
||
3055 |
v := self initializeCodeViewIn:codePanel. |
|
3056 |
v origin:(0.0 @ (bH2+exceptionInfoLabel preferredHeight+6)) corner:(1.0 @ 1.0). |
|
3057 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
3058 |
||
3059 |
v := self initializeInspectorViewsIn:panel. |
|
3060 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 3061 |
]. |
3062 |
||
3387 | 3063 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
15413 | 3064 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
3065 |
]. |
9626 | 3066 |
LastExtent notNil ifTrue:[ |
15413 | 3067 |
self extent:LastExtent. |
9626 | 3068 |
]. |
3069 |
LastOrigin notNil ifTrue:[ |
|
15413 | 3070 |
self origin:LastOrigin. |
9626 | 3071 |
]. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
3072 |
|
3269 | 3073 |
" |
3074 |
Debugger newDebugger |
|
3075 |
" |
|
3447 | 3076 |
|
11693 | 3077 |
"Modified: / 27-07-2012 / 14:46:07 / cg" |
3269 | 3078 |
! |
3079 |
||
10205 | 3080 |
initializeAbortButtonIn:bpanel |
3081 |
abortButton := Button |
|
15413 | 3082 |
label:(resources string:'Abort') |
3083 |
action:[ |
|
3084 |
abortButton turnOffWithoutRedraw. |
|
3085 |
self doAbort |
|
3086 |
] |
|
3087 |
in:bpanel. |
|
3447 | 3088 |
|
3089 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
3090 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
3091 |
! |
|
3092 |
||
10205 | 3093 |
initializeButtons1In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
3094 |
"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
|
3095 |
|
3447 | 3096 |
|separator| |
3097 |
||
10205 | 3098 |
bpanel horizontalLayout:#left. |
3447 | 3099 |
bpanel verticalLayout:#centerMax. |
3100 |
bpanel verticalSpace:ViewSpacing // 2. |
|
3101 |
||
8194 | 3102 |
self initializeContinueButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3103 |
continueButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3104 |
|
9131 | 3105 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
3106 |
"/ separator borderWidth:0; level:0. |
|
3447 | 3107 |
self initializeAbortButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3108 |
abortButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3109 |
|
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3110 |
separator := View extent:(100 @ 5) in:bpanel. |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
3111 |
separator borderWidth:0; level:0. |
3269 | 3112 |
|
3447 | 3113 |
self initializeTerminateButtonIn:bpanel. |
3114 |
||
9131 | 3115 |
separator := View extent:(50 @ 5) in:bpanel. |
3447 | 3116 |
separator borderWidth:0; level:0. |
3117 |
||
13362 | 3118 |
self initializeGotoDialogOpenerButtonIn:bpanel. |
14523 | 3119 |
self initializeGotoApplicationActionMethodButtonIn:bpanel. |
3447 | 3120 |
self initializeDefineButtonIn:bpanel. |
14523 | 3121 |
|
4356 | 3122 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
15413 | 3123 |
separator := View extent:(10 @ 5) in:bpanel. |
3124 |
separator borderWidth:0; level:0. |
|
3125 |
self initializeReportButtonIn:bpanel. |
|
4356 | 3126 |
]. |
3447 | 3127 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 3128 |
! |
3129 |
||
10205 | 3130 |
initializeButtons2In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
3131 |
"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
|
3132 |
|
3269 | 3133 |
|separator| |
3134 |
||
9131 | 3135 |
bpanel horizontalLayout:#left. |
3269 | 3136 |
bpanel verticalLayout:#centerMax. |
3137 |
bpanel verticalSpace:ViewSpacing // 2. |
|
3138 |
||
3447 | 3139 |
self initializeNextButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3140 |
nextButton width:100. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3141 |
|
3447 | 3142 |
self initializeStepButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3143 |
stepButton width:100. |
3447 | 3144 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3145 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3146 |
"/ 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
|
3147 |
"/ 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
|
3148 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3149 |
|
3269 | 3150 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3151 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3152 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3153 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3154 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3155 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3156 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3157 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3158 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3159 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3160 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3161 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3162 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3163 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3164 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3165 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3166 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3167 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3168 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3169 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3170 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3171 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3172 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3173 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3174 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3175 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
3176 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3177 |
|
3447 | 3178 |
self initializeSendButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3179 |
sendButton width:100. |
3447 | 3180 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
3181 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
3182 |
separator borderWidth:0; level:0. |
3269 | 3183 |
|
3447 | 3184 |
self initializeReturnButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3185 |
returnButton width:100. |
3447 | 3186 |
self initializeRestartButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3187 |
restartButton width:100. |
13360 | 3188 |
self initializeResendButtonIn:bpanel. |
3189 |
resendButton width:100. |
|
3447 | 3190 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
3191 |
"Modified: / 18-06-2010 / 08:32:05 / cg" |
3269 | 3192 |
! |
3193 |
||
10205 | 3194 |
initializeButtonsIn:bpanel |
3269 | 3195 |
|separator| |
3196 |
||
3197 |
bpanel horizontalLayout:#left. |
|
3198 |
bpanel verticalLayout:#centerMax. |
|
3199 |
bpanel verticalSpace:ViewSpacing // 2. |
|
3200 |
||
3447 | 3201 |
self initializeAbortButtonIn:bpanel. |
3202 |
||
3269 | 3203 |
separator := View extent:(10 @ 5) in:bpanel. |
3204 |
separator borderWidth:0; level:0. |
|
3205 |
||
3447 | 3206 |
self initializeContinueButtonIn:bpanel. |
3269 | 3207 |
|
3208 |
separator := View extent:(10 @ 5) in:bpanel. |
|
3209 |
separator borderWidth:0; level:0. |
|
3210 |
||
10205 | 3211 |
self initializeReturnButtonIn:bpanel. |
3212 |
self initializeRestartButtonIn:bpanel. |
|
13360 | 3213 |
self initializeResendButtonIn:bpanel. |
3269 | 3214 |
|
3215 |
separator := View extent:(10 @ 5) in:bpanel. |
|
3216 |
separator borderWidth:0; level:0. |
|
3217 |
||
3447 | 3218 |
self initializeNextButtonIn:bpanel. |
3219 |
self initializeStepButtonIn:bpanel. |
|
3220 |
||
3269 | 3221 |
"/ cg: |
3222 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
3223 |
"/ they do not work relyable with inlined blocks yet. |
|
3224 |
"/ |
|
3225 |
||
3226 |
||
3227 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
3228 |
"/ img isNil ifTrue:[ |
|
3229 |
"/ img := (resources at:'next') |
|
3230 |
"/ ]. |
|
3231 |
"/ nextButton := Button |
|
3232 |
"/ label:img |
|
3233 |
"/ action:[stepButton turnOff. self doNext] |
|
3234 |
"/ in:bpanel. |
|
3235 |
"/ |
|
3236 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
3237 |
"/ img isNil ifTrue:[ |
|
3238 |
"/ img := (resources at:'over') |
|
3239 |
"/ ]. |
|
3240 |
"/ nextOverButton := Button |
|
3241 |
"/ label:img |
|
3242 |
"/ action:[stepButton turnOff. self doNextOver] |
|
3243 |
"/ in:bpanel. |
|
3244 |
"/ |
|
3245 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
3246 |
"/ img isNil ifTrue:[ |
|
3247 |
"/ img := (resources at:'out') |
|
3248 |
"/ ]. |
|
3249 |
"/ nextOutButton := Button |
|
3250 |
"/ label:img |
|
3251 |
"/ action:[stepButton turnOff. self doNextOut] |
|
3252 |
"/ in:bpanel. |
|
3253 |
||
3447 | 3254 |
self initializeSendButtonIn:bpanel. |
3255 |
||
3187 | 3256 |
separator := View extent:(30 @ 5) in:bpanel. |
3257 |
separator borderWidth:0; level:0. |
|
3269 | 3258 |
|
3447 | 3259 |
self initializeTerminateButtonIn:bpanel. |
3260 |
||
3269 | 3261 |
separator := View extent:(30 @ 5) in:bpanel. |
3262 |
separator borderWidth:0; level:0. |
|
3263 |
||
3447 | 3264 |
self initializeDefineButtonIn:bpanel. |
4356 | 3265 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
15413 | 3266 |
self initializeReportButtonIn:bpanel. |
4356 | 3267 |
]. |
3268 |
||
3447 | 3269 |
|
3270 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
3271 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 3272 |
! |
3273 |
||
3274 |
initializeCodeViewIn:panel |
|
13519 | 3275 |
|scrollableCodeView| |
3269 | 3276 |
|
10628 | 3277 |
(UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
15413 | 3278 |
scrollableCodeView := codeView := Tools::CodeView2 new. |
3279 |
codeView model: ValueHolder new. |
|
3280 |
codeView methodHolder: ValueHolder new. |
|
3281 |
codeView classHolder: ValueHolder new. |
|
10628 | 3282 |
] ifFalse:[ |
15413 | 3283 |
scrollableCodeView := HVScrollableView |
3284 |
for:CodeView |
|
3285 |
miniScrollerH:true |
|
3286 |
miniScrollerV:false |
|
3287 |
in:panel. |
|
3288 |
||
3289 |
codeView := scrollableCodeView scrolledView. |
|
3290 |
codeView enableMotionEvents. "/ for active help |
|
3291 |
]. |
|
3292 |
||
3293 |
(UserPreferences current showAcceptCancelBarInBrowser |
|
3294 |
and:[codeView isCodeView2 not or:[UserPreferences current codeView2ShowAcceptCancel not]]) ifTrue:[ |
|
3295 |
ViewWithAcceptAndCancelBar notNil ifTrue:[ |
|
3296 |
|v| |
|
3297 |
||
3298 |
v := ViewWithAcceptAndCancelBar new. |
|
3299 |
v slaveView:scrollableCodeView. |
|
3300 |
v reallyModifiedHolder:(codeView isCodeView2 |
|
3301 |
ifTrue:[ codeView reallyModifiedChannel ] |
|
3302 |
ifFalse:[ |
|
3303 |
BlockValue |
|
3304 |
with:[:m | |
|
3305 |
|same| |
|
3306 |
||
3307 |
same := (codeView contentsAsString string = currentMethod source string). |
|
3308 |
codeView modifiedChannel setValue:false. "/ so it triggers again |
|
3309 |
same not. |
|
3310 |
] |
|
3311 |
argument:codeView modifiedChannel |
|
3312 |
]). |
|
3313 |
v cancelAction: |
|
3314 |
[ |
|
3315 |
"/ codeView setClipboardText:(codeView contents). "/ for undo |
|
3316 |
codeView device rememberInCopyBufferHistory:(codeView contents). "/ for undo |
|
3317 |
codeView contents:(currentMethod source). |
|
3318 |
codeView modifiedChannel setValue:false; changed. "/ trigger |
|
3319 |
codeView requestFocus. |
|
3320 |
]. |
|
3321 |
v compareAction: |
|
3322 |
[ |
|
3323 |
v := DiffCodeView |
|
3324 |
openOn:codeView contentsAsString |
|
3325 |
label:(resources string:'Changed definition (to be accepted ?)') |
|
3326 |
and:currentMethod source |
|
3327 |
label:(resources string:'Method''s Original Code'). |
|
3328 |
v label:(resources string:'Changed Code in Debugger'). |
|
3329 |
v waitUntilVisible. |
|
3330 |
"/ codeView requestFocus |
|
3331 |
]. |
|
3332 |
scrollableCodeView := v. |
|
3333 |
] |
|
13519 | 3334 |
]. |
3335 |
||
3336 |
panel add:scrollableCodeView. |
|
3337 |
^ scrollableCodeView |
|
10628 | 3338 |
|
13842 | 3339 |
"Modified: / 06-12-2013 / 17:30:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3269 | 3340 |
! |
3341 |
||
3342 |
initializeContextListViewIn:panel |
|
3343 |
|v| |
|
266 | 3344 |
|
10205 | 3345 |
v := HVScrollableView |
15413 | 3346 |
for:SelectionInListView |
3347 |
miniScrollerH:true |
|
3348 |
miniScrollerV:false |
|
3349 |
in:panel. |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
3350 |
v autoHideHorizontalScrollBar:true. |
266 | 3351 |
|
3352 |
contextView := v scrolledView. |
|
3353 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 3354 |
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
|
3355 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 3356 |
|
10205 | 3357 |
contextView middleButtonMenu:(self middleButtonMenu). |
5453 | 3358 |
|
3269 | 3359 |
^ v |
3360 |
! |
|
3361 |
||
5453 | 3362 |
initializeContextViewsMiddleButtonMenu |
3363 |
<resource: #programMenu > |
|
3364 |
||
10205 | 3365 |
contextView middleButtonMenu:(self middleButtonMenu). |
3366 |
! |
|
3367 |
||
3368 |
initializeContinueButtonIn:bpanel |
|
3369 |
continueButton := Button |
|
15413 | 3370 |
label:(resources string:'Continue') |
3371 |
action:[ |
|
3372 |
continueButton turnOffWithoutRedraw. |
|
3373 |
self doContinue |
|
3374 |
] |
|
3375 |
in:bpanel. |
|
3447 | 3376 |
|
3377 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
3378 |
! |
|
3379 |
||
10205 | 3380 |
initializeDefineButtonIn:bpanel |
3381 |
defineButton := Button |
|
15413 | 3382 |
label:(resources string:'Define') |
3383 |
action:[ |
|
3384 |
defineButton turnOffWithoutRedraw. |
|
3385 |
self doDefine |
|
3386 |
] |
|
3387 |
in:bpanel. |
|
3447 | 3388 |
defineButton beInvisible |
3389 |
||
3390 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
3391 |
! |
|
3392 |
||
14523 | 3393 |
initializeGotoApplicationActionMethodButtonIn:bpanel |
3394 |
gotoApplicationActionMethodButton := Button |
|
15413 | 3395 |
label:(resources string:'Goto Responsible Application Method') |
3396 |
action:[ |
|
3397 |
gotoApplicationActionMethodButton turnOffWithoutRedraw. |
|
3398 |
self doGotoApplicationActionMethod |
|
3399 |
] |
|
3400 |
in:bpanel. |
|
14523 | 3401 |
|
3402 |
gotoApplicationActionMethodButton beInvisible |
|
3403 |
! |
|
3404 |
||
13362 | 3405 |
initializeGotoDialogOpenerButtonIn:bpanel |
3406 |
gotoDialogOpenerButton := Button |
|
15413 | 3407 |
label:(resources string:'Goto Dialog Opener') |
3408 |
action:[ |
|
3409 |
gotoDialogOpenerButton turnOffWithoutRedraw. |
|
3410 |
self doGotoDialogOpener |
|
3411 |
] |
|
3412 |
in:bpanel. |
|
13362 | 3413 |
|
3414 |
gotoDialogOpenerButton beInvisible |
|
3415 |
! |
|
3416 |
||
3269 | 3417 |
initializeInspectorViewsIn:panel |
3418 |
|hpanel| |
|
266 | 3419 |
|
3420 |
hpanel := VariableHorizontalPanel in:panel. |
|
3421 |
||
3422 |
receiverInspector := InspectorView |
|
15413 | 3423 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
3424 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
3425 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 3426 |
|
3427 |
contextInspector := ContextInspectorView |
|
15413 | 3428 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
3429 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
3430 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
3431 |
|
3269 | 3432 |
^ hpanel |
266 | 3433 |
! |
3434 |
||
10205 | 3435 |
initializeNextButtonIn:bpanel |
3436 |
nextButton := Button |
|
15413 | 3437 |
label:(resources string:'Debug_Next') |
3438 |
action:[ |
|
3439 |
stepButton turnOff. |
|
3440 |
self doNext |
|
3441 |
] |
|
3442 |
in:bpanel. |
|
3447 | 3443 |
|
3444 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
3445 |
! |
|
3446 |
||
10205 | 3447 |
initializeReportButtonIn:bpanel |
3448 |
reportButton := Button |
|
15413 | 3449 |
label:(resources string:'Report by Mail...') |
3450 |
action:[ |
|
3451 |
reportButton turnOffWithoutRedraw. |
|
3452 |
self doOpenReportMailApp. |
|
3453 |
] |
|
3454 |
in:bpanel. |
|
4356 | 3455 |
|
3456 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
3457 |
! |
|
3458 |
||
13360 | 3459 |
initializeResendButtonIn:bpanel |
3460 |
resendButton := Button |
|
15413 | 3461 |
label:(resources string:'Resend') |
3462 |
action:[ |
|
3463 |
resendButton turnOff. |
|
3464 |
self doResend |
|
3465 |
] |
|
3466 |
in:bpanel. |
|
13490 | 3467 |
|
3468 |
"/ if we have this, we do not need the restart button |
|
3469 |
restartButton beInvisible. |
|
13360 | 3470 |
! |
3471 |
||
10205 | 3472 |
initializeRestartButtonIn:bpanel |
3473 |
restartButton := Button |
|
15413 | 3474 |
label:(resources string:'Restart') |
3475 |
action:[ |
|
3476 |
restartButton turnOff. |
|
3477 |
self doRestart |
|
3478 |
] |
|
3479 |
in:bpanel. |
|
3447 | 3480 |
|
3481 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
3482 |
! |
|
3483 |
||
10205 | 3484 |
initializeReturnButtonIn:bpanel |
3485 |
returnButton := Button |
|
15413 | 3486 |
label:(resources string:'Return') |
3487 |
action:[ |
|
3488 |
returnButton turnOff. |
|
3489 |
self doReturn |
|
3490 |
] |
|
3491 |
in:bpanel. |
|
3447 | 3492 |
|
3493 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
3494 |
! |
|
3495 |
||
10205 | 3496 |
initializeSendButtonIn:bpanel |
3497 |
sendButton := Button |
|
15413 | 3498 |
label:(resources string:'Send') |
3499 |
action:[ |
|
3500 |
sendButton turnOff. |
|
3501 |
self doSend |
|
3502 |
] |
|
3503 |
in:bpanel. |
|
3447 | 3504 |
|
3505 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
3506 |
! |
|
3507 |
||
10205 | 3508 |
initializeStepButtonIn:bpanel |
3509 |
stepButton := Button |
|
15413 | 3510 |
label:(resources string:'Debug_Step') |
3511 |
action:[ |
|
3512 |
stepButton turnOff. |
|
3513 |
self doStep |
|
3514 |
] |
|
3515 |
in:bpanel. |
|
3447 | 3516 |
|
3517 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
3518 |
! |
|
3519 |
||
10205 | 3520 |
initializeTerminateButtonIn:bpanel |
3521 |
terminateButton := Button |
|
15413 | 3522 |
label:(resources string:'Debug_Terminate') |
3523 |
action:[ |
|
3524 |
terminateButton turnOffWithoutRedraw. |
|
3525 |
self doTerminate |
|
3526 |
] |
|
3527 |
in:bpanel. |
|
3447 | 3528 |
|
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3529 |
terminateButton backgroundColor:Color red lightened. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3530 |
"/ terminateButton foregroundColor:Color red. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3531 |
|
3447 | 3532 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
266 | 3533 |
! |
3534 |
||
1249 | 3535 |
postRealize |
3536 |
super postRealize. |
|
266 | 3537 |
|
3538 |
inspecting ifTrue:[ |
|
15413 | 3539 |
inspectedProcess notNil ifTrue:[ |
3540 |
" |
|
3541 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
3542 |
to run between mine and the debugged processes prio) |
|
3543 |
" |
|
3544 |
Processor activeProcess |
|
3545 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
|
3546 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3547 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3548 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3549 |
self sensor addEventListener:self. |
1249 | 3550 |
|
3551 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 3552 |
! |
3553 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3554 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3555 |
"/ 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
|
3556 |
"/ 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
|
3557 |
|
13965 | 3558 |
self drawableId notNil ifTrue:[ |
15413 | 3559 |
^ self |
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3560 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3561 |
"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
|
3562 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3563 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3564 |
|
11818 | 3565 |
releaseDebuggee |
3566 |
"We have to be careful to release all refs to the debuggee, |
|
3567 |
because we may be in the cache. |
|
3568 |
Otherwise, the GC will not be able to release it" |
|
3569 |
||
3570 |
busy := false. |
|
3571 |
||
3572 |
codeView acceptAction:nil. |
|
3573 |
codeView doItAction:nil. |
|
3574 |
codeView contents:nil. |
|
3575 |
||
3576 |
receiverInspector release. |
|
3577 |
contextInspector release. |
|
3578 |
inspectedProcess := nil. |
|
3579 |
contextArray := nil. |
|
13361 | 3580 |
((exitAction == #restart) or:[exitAction == #return or:[exitAction == #resend]]) ifFalse:[ |
15413 | 3581 |
selectedContext := nil. |
11818 | 3582 |
]. |
3583 |
actualContext := firstContext := nil. |
|
3584 |
steppedContext := wrapperContext := nil. |
|
3585 |
catchBlock := nil. |
|
3586 |
grabber := nil. |
|
3587 |
self autoUpdateOff. |
|
3588 |
||
3589 |
"Created: / 10-07-1997 / 14:57:51 / stefan" |
|
3590 |
"Modified: / 26-09-2012 / 15:08:21 / cg" |
|
3591 |
! |
|
3592 |
||
266 | 3593 |
setLabelFor:aMessage in:aProcess |
9403 | 3594 |
|l lines processNameOrNil pidOrNil osPidString| |
6821 | 3595 |
|
3596 |
lines := aMessage asStringCollection. |
|
3597 |
lines size > 1 ifTrue:[ |
|
15413 | 3598 |
l := lines first |
6821 | 3599 |
] ifFalse:[ |
15413 | 3600 |
l := aMessage. |
6821 | 3601 |
]. |
3602 |
||
3603 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
3604 |
Error handle:[:ex | |
15413 | 3605 |
l := l , '???' |
1030 | 3606 |
] do:[ |
15413 | 3607 |
processNameOrNil := aProcess name. |
3608 |
processNameOrNil notNil ifTrue:[ |
|
3609 |
l := l , (processNameOrNil contractTo:20) , ''. |
|
3610 |
]. |
|
3611 |
pidOrNil := aProcess id printString. |
|
3612 |
l := l , '[' , pidOrNil , ']'. |
|
73 | 3613 |
]. |
1030 | 3614 |
l := l , ')'. |
266 | 3615 |
self label:l. |
6821 | 3616 |
|
10205 | 3617 |
((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
15413 | 3618 |
osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
9403 | 3619 |
]. |
3620 |
||
8305 | 3621 |
exceptionInfoLabel notNil ifTrue:[ |
15413 | 3622 |
exceptionInfoLabel |
3623 |
label:(resources |
|
3624 |
string:'%1 in process %2 [%3]%4' |
|
3625 |
with:(lines first colorizeAllWith:Color red) |
|
3626 |
with:(processNameOrNil ? '') |
|
3627 |
with:(pidOrNil ? '') |
|
3628 |
with:(osPidString ? '')) |
|
8305 | 3629 |
]. |
3630 |
||
6821 | 3631 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
0 | 3632 |
! ! |
3633 |
||
3634 |
!DebugView methodsFor:'interrupt handling'! |
|
3635 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3636 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3637 |
DebuggingDebugger == true ifTrue:[ |
15413 | 3638 |
'contextIRQ' printCR. |
3639 |
thisContext methodHome sender fullPrint. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3640 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3641 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3642 |
|
1364 | 3643 |
"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
|
3644 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3645 |
|
0 | 3646 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3647 |
DebuggingDebugger == true ifTrue:[ |
15413 | 3648 |
'stepIRQ' print. |
3649 |
"/ ' in ' print. thisContext sender fullPrint. |
|
3650 |
'' printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3651 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3652 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3653 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3654 |
|
11636 | 3655 |
"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
|
3656 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3657 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3658 |
stepOrNext |
15413 | 3659 |
|where here con s isWrap method wrappedMethod |
11636 | 3660 |
originalMethodOfWrappedMethod originalMethodsContext |
3661 |
inBlock subBlockLeft ignore contextBelow wrapContext |
|
10205 | 3662 |
leftWrap enteredWrap anyStepBlocks |
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3663 |
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
|
3664 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3665 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3666 |
"/ DebuggingDebugger := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3667 |
"/ DebuggingDebugger2 := true |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3668 |
"/ DebuggingDebugger2 := false |
11636 | 3669 |
"/ DebuggingDebugger3 := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3670 |
"/ '' printCR |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3671 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3672 |
processName := (Processor activeProcess nameOrId),' [',Processor activeProcess id printString,']'. |
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3673 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3674 |
skipLineNr == #return ifTrue:[ |
15413 | 3675 |
self label:('stepping context returned ' , ' (process: ' , processName , ')'). |
3676 |
here := thisContext sender sender. |
|
3677 |
here setLineNumber:nil. |
|
3678 |
here := nil. |
|
3679 |
con := thisContext sender sender sender. |
|
3680 |
||
3681 |
HaltInterrupt handle:[:ex | |
|
3682 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [stepOrNext]' bindWith:ex suspendedContext) infoPrintCR. |
|
3683 |
ex proceed |
|
3684 |
] do:[ |
|
3685 |
self enter:con select:nil. |
|
3686 |
]. |
|
3687 |
con := nil. |
|
3688 |
^ self |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3689 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3690 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3691 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3692 |
"/ "/ 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
|
3693 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3694 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3695 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3696 |
"/ 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
|
3697 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3698 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3699 |
|
52 | 3700 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
15413 | 3701 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
3702 |
^ self |
|
52 | 3703 |
]. |
3704 |
||
29 | 3705 |
here := thisContext. "stepInterrupt" |
10205 | 3706 |
here := here sender. "the caller; step- or contextIRQ" |
3707 |
here := here sender. "the interrupted context" |
|
29 | 3708 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3709 |
DebuggingDebugger2 == true ifTrue:[ |
15413 | 3710 |
'***************************' printCR. |
3711 |
'here in ' print. |
|
3712 |
inWrap ifTrue:['(wrap) ' print.]. |
|
3713 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
|
3714 |
here selector printCR. |
|
3715 |
'stepping in ' print. |
|
3716 |
steppedContext notNil ifTrue:[ |
|
3717 |
((ObjectMemory addressOf:steppedContext) printStringRadix:16) print. ' ' print. |
|
3718 |
]. |
|
3719 |
steppedContext printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3720 |
]. |
10 | 3721 |
|
13197 | 3722 |
"/ when single stepping, ignore breakpoints |
3723 |
here selector == #break ifTrue:[ |
|
15413 | 3724 |
(here receiver isKindOf:Breakpoint) ifTrue:[ |
3725 |
false "here receiver isEnabled" ifFalse:[ |
|
3726 |
con := nil. |
|
3727 |
where := nil. here := nil. |
|
3728 |
StepInterruptPending := 1. |
|
3729 |
InterruptPending := 1. |
|
3730 |
InStepInterrupt := nil. |
|
3731 |
^ self |
|
3732 |
] |
|
3733 |
]. |
|
13197 | 3734 |
]. |
3735 |
||
3736 |
"/ kludge: a bug-workaround; |
|
3737 |
"/ I should not see those... |
|
2581 | 3738 |
|
3739 |
here selector == #ioInterrupt ifTrue:[ |
|
15413 | 3740 |
DebuggingDebugger2 == true ifTrue:[ |
3741 |
'oops - should not get that one' printCR. |
|
3742 |
]. |
|
3743 |
Processor ioInterrupt. |
|
3744 |
StepInterruptPending := 1. |
|
3745 |
InterruptPending := 1. |
|
3746 |
where := nil. here := nil. |
|
3747 |
InStepInterrupt := nil. |
|
3748 |
^ self |
|
2581 | 3749 |
]. |
3750 |
||
3751 |
stepUntilEntering notNil ifTrue:[ |
|
15413 | 3752 |
DebuggingDebugger2 == true ifTrue:[ |
3753 |
'check if entering ' print. stepUntilEntering printCR. |
|
3754 |
]. |
|
3755 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
3756 |
DebuggingDebugger2 == true ifTrue:[ |
|
3757 |
'entering...' printCR. |
|
3758 |
]. |
|
3759 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , processName , ')'). |
|
3760 |
||
3761 |
lastStepUntilEntering := stepUntilEntering. |
|
3762 |
stepUntilEntering := nil. |
|
3763 |
self enter:here select:nil. |
|
3764 |
con := nil. |
|
3765 |
^ self |
|
3766 |
]. |
|
3767 |
"/ see if stepping context is still active ... |
|
3768 |
||
3769 |
con := here. |
|
3770 |
||
3771 |
DebuggingDebugger2 == true ifTrue:[ |
|
3772 |
'start searching at: ' print. |
|
3773 |
con fullPrint. |
|
3774 |
]. |
|
3775 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
3776 |
con := con sender |
|
3777 |
]. |
|
3778 |
con notNil ifTrue:[ |
|
3779 |
DebuggingDebugger2 == true ifTrue:[ |
|
3780 |
'steppingContext still active - continue stepping' printCR. |
|
3781 |
]. |
|
3782 |
con := nil. |
|
3783 |
where := nil. here := nil. |
|
3784 |
StepInterruptPending := 1. |
|
3785 |
InterruptPending := 1. |
|
3786 |
InStepInterrupt := nil. |
|
3787 |
^ self |
|
3788 |
]. |
|
3789 |
stepUntilEntering := nil. |
|
2581 | 3790 |
]. |
3791 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3792 |
" |
11636 | 3793 |
kludge to hide breakpoint wrappers in the context list and when single stepping: |
15413 | 3794 |
check if we are in a wrapper method's hidden setup-sequence |
3795 |
if so, ignore the interrupt and continue single sending. |
|
3796 |
Assume we are in a wrappers setup code, if there is another context above, |
|
3797 |
which is for the wrapper method (i.e. if there is context with an originalmethod |
|
3798 |
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
|
3799 |
" |
29 | 3800 |
isWrap := false. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3801 |
subBlockLeft := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3802 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3803 |
|
57 | 3804 |
inWrap ifTrue:[ |
15413 | 3805 |
"/ situation1: |
3806 |
"/ valueWithReceiver or other |
|
3807 |
"/ foo (wrapped) <- wrapContext |
|
3808 |
"/ |
|
3809 |
"/ situation2: |
|
3810 |
"/ foo (original) <- originalMethodsContext |
|
3811 |
"/ valueWithReceiver |
|
3812 |
"/ foo (wrapped) <- wrapContext |
|
3813 |
"/ |
|
3814 |
"/ situation3: |
|
3815 |
"/ other |
|
3816 |
"/ foo (original) <- originalMethodsContext |
|
3817 |
"/ valueWithReceiver |
|
3818 |
"/ foo (wrapped) <- wrapContext |
|
3819 |
"/ |
|
3820 |
"/ situation4: |
|
3821 |
"/ ... many-contexts ... (more than 8) |
|
3822 |
"/ possibly foo (original) |
|
3823 |
"/ valueWithReceiver or other |
|
3824 |
"/ foo (wrapped) |
|
3825 |
"/ |
|
3826 |
||
3827 |
"/ search for the wrapped method's context and extract the original method |
|
3828 |
where := here. |
|
3829 |
8 timesRepeat:[ |
|
3830 |
wrapContext isNil ifTrue:[ |
|
3831 |
where notNil ifTrue:[ |
|
3832 |
DebuggingDebugger2 == true ifTrue:[ |
|
3833 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3834 |
where printCR |
|
3835 |
]. |
|
3836 |
where isBlockContext ifFalse:[ |
|
3837 |
method := where method. |
|
3838 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3839 |
originalMethodOfWrappedMethod := method originalMethod. |
|
3840 |
wrappedMethod := method. |
|
3841 |
wrapContext := where. |
|
3842 |
]. |
|
3843 |
]. |
|
3844 |
where := where sender |
|
3845 |
] |
|
3846 |
] |
|
3847 |
]. |
|
3848 |
DebuggingDebugger2 == true ifTrue:[ |
|
3849 |
'wrap-context is: ' print. |
|
3850 |
wrapContext notNil ifTrue:[ |
|
3851 |
((ObjectMemory addressOf:wrapContext) printStringRadix:16) print. ' ' print. |
|
3852 |
]. |
|
3853 |
wrapContext printCR |
|
3854 |
]. |
|
3855 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
|
3856 |
'oops no wrap?' errorPrintCR. |
|
3857 |
]. |
|
11636 | 3858 |
]. |
3859 |
||
3860 |
(inWrap and:[ originalMethodOfWrappedMethod notNil ]) ifTrue:[ |
|
15413 | 3861 |
isWrap := false. |
3862 |
"/ DebuggingDebugger2 ifTrue:[ '----------->' print. originalMethodOfWrappedMethod printCR ]. |
|
3863 |
where := here. |
|
3864 |
8 timesRepeat:[ |
|
3865 |
originalMethodsContext isNil ifTrue:[ |
|
3866 |
where notNil ifTrue:[ |
|
3867 |
DebuggingDebugger2 ifTrue:[ |
|
3868 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3869 |
where printCR |
|
3870 |
]. |
|
3871 |
where isBlockContext ifFalse:[ |
|
3872 |
method := where method. |
|
3873 |
method == originalMethodOfWrappedMethod ifTrue:[ |
|
3874 |
originalMethodsContext := here. |
|
3875 |
where == here ifTrue:[ |
|
3876 |
"/ situation2 |
|
3877 |
DebuggingDebugger2 ifTrue:[ 's2' printCR ]. |
|
3878 |
isWrap := true. |
|
3879 |
"/ here setSender:(wrapContext sender). --- leads to a crash |
|
3880 |
] ifFalse: [ |
|
3881 |
"/ situation3 |
|
3882 |
DebuggingDebugger2 ifTrue:[ 's3' printCR ]. |
|
3883 |
inWrap := false. |
|
3884 |
isWrap := false. |
|
3885 |
]. |
|
3886 |
steppedContext := where |
|
11636 | 3887 |
"/ ] ifFalse:[ |
3888 |
"/ where selector == wrapContext selector ifTrue:[ |
|
3889 |
"/ where receiver == wrapContext receiver ifTrue:[ |
|
3890 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3891 |
"/ method printCR. |
|
3892 |
"/ method originalMethod printCR. |
|
3893 |
"/ originalMethodOfWrappedMethod printCR. |
|
3894 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3895 |
"/ ]. |
|
3896 |
"/ ]. |
|
15413 | 3897 |
]. |
3898 |
where := where sender |
|
3899 |
]. |
|
3900 |
]. |
|
3901 |
]. |
|
3902 |
]. |
|
3903 |
DebuggingDebugger2 ifTrue:[ |
|
3904 |
'original method-context is: ' print. |
|
3905 |
originalMethodsContext notNil ifTrue:[ |
|
3906 |
((ObjectMemory addressOf:originalMethodsContext) printStringRadix:16) print. ' ' print. |
|
3907 |
]. |
|
3908 |
originalMethodsContext printCR |
|
3909 |
]. |
|
3910 |
originalMethodsContext isNil ifTrue:[ |
|
3911 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
|
3912 |
"/ situation4 |
|
3913 |
DebuggingDebugger2 ifTrue:[ 's4' printCR ]. |
|
3914 |
DebuggingDebugger2 ifTrue:[ steppedContext printCR ]. |
|
3915 |
isWrap := false. |
|
3916 |
] ifFalse:[ |
|
3917 |
"/ situation1 |
|
3918 |
DebuggingDebugger2 ifTrue:[ 's1' printCR ]. |
|
3919 |
isWrap := true. |
|
3920 |
"/ steppedContext := wrapContext |
|
3921 |
]. |
|
3922 |
]. |
|
29 | 3923 |
]. |
3924 |
||
3925 |
isWrap ifTrue:[ |
|
15413 | 3926 |
DebuggingDebugger2 == true ifTrue:[ |
3927 |
'ignore wrap' printCR. |
|
3928 |
]. |
|
3929 |
||
3930 |
"/ |
|
3931 |
"/ ignore, while in wrappers hidden setup |
|
3932 |
"/ |
|
3933 |
where := nil. here := nil. |
|
3934 |
ObjectMemory flushInlineCaches. |
|
3935 |
||
3936 |
DebuggingDebugger2 == true ifTrue:[ |
|
3937 |
skipLineNr == #return ifTrue:[ |
|
3938 |
'skipRet in wrap' printCR. |
|
3939 |
] |
|
3940 |
]. |
|
3941 |
||
3942 |
StepInterruptPending := 1. |
|
3943 |
InterruptPending := 1. |
|
3944 |
InStepInterrupt := nil. |
|
3945 |
^ self |
|
29 | 3946 |
]. |
3947 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3948 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 3949 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3950 |
DebuggingDebugger2 == true ifTrue:[ |
15413 | 3951 |
'bigStep is: ' print. bigStep printCR. |
3952 |
'steppedContext is: ' print. steppedContext printCR. |
|
2581 | 3953 |
]. |
3954 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3955 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3956 |
"/ 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
|
3957 |
"/ |
10205 | 3958 |
(bigStep |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
3959 |
and:[steppedContext notNil]) ifTrue:[ |
15413 | 3960 |
" |
3961 |
a step or next - ignore all contexts below the interesting one |
|
3962 |
" |
|
3963 |
where := here. "the interrupted context" |
|
3964 |
contextBelow := nil. |
|
3965 |
||
3966 |
where home notNil ifTrue:[ |
|
3967 |
"/ |
|
3968 |
"/ in a block called by 'our' context ? |
|
3969 |
"/ |
|
3970 |
where home == steppedContext ifTrue:[ |
|
3971 |
"/ '*block*' printCR. |
|
3972 |
inBlock := true |
|
3973 |
] |
|
3974 |
]. |
|
3975 |
||
3976 |
where == steppedContext ifFalse:[ |
|
3977 |
where := where sender. |
|
3978 |
||
3979 |
where notNil ifTrue:[ |
|
3980 |
where home == steppedContext ifTrue:[ |
|
3981 |
"/ '*block*' printCR. |
|
3982 |
inBlock := true. |
|
3983 |
] |
|
3984 |
]. |
|
57 | 3985 |
|
3986 |
"/ 'looking for ' print. |
|
3055 | 3987 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 3988 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3989 |
"/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
|
3990 |
"/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
|
3991 |
|
15413 | 3992 |
where == steppedContext ifFalse:[ |
3993 |
||
3994 |
"/ check if we are in a context below steppedContext |
|
3995 |
"/ (i.e. if steppedContext can be reached from |
|
3996 |
"/ interrupted context. Not using context-ref but its |
|
3997 |
"/ address to avoid creation of many useless contexts.) |
|
3998 |
||
3999 |
inBlock ifFalse:[ |
|
4000 |
[where notNil] whileTrue:[ |
|
4001 |
||
4002 |
"/ if either the receiver or any arg of this context |
|
4003 |
"/ is a block of the steppedContext, we must really |
|
4004 |
"/ do a single step. Otherwise, stepping through a |
|
4005 |
"/ do:-loop would be very difficult. |
|
4006 |
receiver := where receiver. |
|
13197 | 4007 |
where selector == #critical: ifTrue:[ |
4008 |
anyStepBlocks := true. |
|
4009 |
] ifFalse:[ |
|
15413 | 4010 |
(receiver isBlock |
4011 |
and:[(receiver isKindOf:Block) |
|
4012 |
and:[receiver homeMethod == steppedContext method |
|
4013 |
"receiver home == steppedContext"]]) |
|
4014 |
ifTrue:[ |
|
4015 |
anyStepBlocks := true. |
|
4016 |
] ifFalse:[ |
|
4017 |
where args do:[:arg | |
|
4018 |
(arg isBlock |
|
4019 |
and:[(arg isKindOf:Block) |
|
4020 |
and:[arg homeMethod == steppedContext method |
|
4021 |
"arg home == steppedContext"]]) |
|
4022 |
ifTrue:[ |
|
4023 |
anyStepBlocks := true. |
|
4024 |
] ifFalse:[ |
|
4025 |
(where methodHome notNil |
|
4026 |
and:[where methodHome receiver isBlock |
|
4027 |
and:[(where methodHome receiver isKindOf:Block) |
|
4028 |
and:[where methodHome receiver homeMethod == steppedContext method |
|
4029 |
"where methodHome receiver home == steppedContext"]]]) |
|
4030 |
ifTrue:[ |
|
4031 |
anyStepBlocks := true. |
|
4032 |
] |
|
4033 |
]. |
|
4034 |
] |
|
4035 |
]. |
|
13197 | 4036 |
]. |
15413 | 4037 |
DebuggingDebugger2 == true ifTrue:[ |
4038 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
|
4039 |
where selector printCR. |
|
4040 |
]. |
|
4041 |
||
4042 |
where == steppedContext ifTrue:[ |
|
3055 | 4043 |
"/ 'found it - below; ignore' printCR. |
15413 | 4044 |
" |
4045 |
found the interesting context somwehere up in the |
|
4046 |
chain. We seem to be still below the interesting one ... |
|
4047 |
" |
|
4048 |
tracing == true ifTrue:[ |
|
4049 |
here printString printCR |
|
4050 |
]. |
|
4051 |
" |
|
4052 |
yes, a context below |
|
4053 |
- continue and schedule another stepInterrupt. |
|
4054 |
Must flush caches since optimized methods not always |
|
4055 |
look for pending interrupts |
|
4056 |
" |
|
4057 |
||
4058 |
contextBelow notNil ifTrue:[ |
|
3055 | 4059 |
"/ '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
|
4060 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
4061 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
4062 |
"/ 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
|
4063 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4064 |
|
15413 | 4065 |
DebuggingDebugger2 == true ifTrue:[ |
4066 |
'below stepCon; continue until unwind of: ' print. |
|
4067 |
contextBelow printCR. |
|
4068 |
]. |
|
4069 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
|
4070 |
StepInterruptPending := nil. |
|
4071 |
] ifFalse:[ |
|
4072 |
ObjectMemory flushInlineCaches. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4073 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
4074 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
4075 |
"/ 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
|
4076 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
4077 |
|
15413 | 4078 |
DebuggingDebugger2 == true ifTrue:[ |
4079 |
'in stepCon; continue single stepping' printCR. |
|
4080 |
]. |
|
4081 |
StepInterruptPending := 1. |
|
4082 |
InterruptPending := 1. |
|
4083 |
]. |
|
4084 |
where := nil. here := nil. |
|
4085 |
InStepInterrupt := nil. |
|
4086 |
||
4087 |
^ self |
|
4088 |
]. |
|
4089 |
||
4090 |
(steppedContext notNil and:[ |
|
4091 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
4092 |
inBlockBelow := true. |
|
4093 |
]. |
|
4094 |
||
4095 |
anyStepBlocks ifFalse:[ |
|
4096 |
inBlock ifFalse:[ |
|
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
4097 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
4098 |
"/ 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
|
4099 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
4100 |
where isBlockContext ifFalse:[ |
15413 | 4101 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
4102 |
]. |
15413 | 4103 |
] |
4104 |
]. |
|
4105 |
where := where sender |
|
4106 |
]. |
|
4107 |
s := 'Debugger: context returned'. |
|
4108 |
subBlockLeft := true. |
|
4109 |
]. |
|
4110 |
] ifTrue:[ |
|
3055 | 4111 |
"/ 'found it right in sender' printCR. |
15413 | 4112 |
s := 'Debugger: after step' |
4113 |
]. |
|
4114 |
] ifTrue:[ |
|
3055 | 4115 |
"/ 'found it right away' printCR. |
15413 | 4116 |
s := 'Debugger: after step' |
4117 |
]. |
|
0 | 4118 |
] ifFalse:[ |
3055 | 4119 |
"/ ' send' printCR. |
15413 | 4120 |
" |
4121 |
a send |
|
4122 |
" |
|
4123 |
DebuggingDebugger2 == true ifTrue:[ |
|
4124 |
'clear steppedContext' printCR. |
|
4125 |
]. |
|
4126 |
steppedContext := nil. |
|
4127 |
s := 'Debugger: after send' |
|
0 | 4128 |
]. |
7 | 4129 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4130 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4131 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
15413 | 4132 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4133 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4134 |
|
790 | 4135 |
"/ handle the case, when a subBlock leaves; |
4136 |
"/ continue stepping in the home context. |
|
4137 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4138 |
subBlockLeft ifTrue:[ |
15413 | 4139 |
steppedContext home notNil ifTrue:[ |
4140 |
steppedContext := steppedContext home. |
|
4141 |
s := 'Debugger: after step'. |
|
4142 |
subBlockLeft := false. |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
4143 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
4144 |
|
15413 | 4145 |
] |
790 | 4146 |
]. |
4147 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4148 |
" |
10205 | 4149 |
kludge to hide breakpoint wrappers in the context list: |
15413 | 4150 |
check if we are in a wrapper methods hidden exit-sequence |
4151 |
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
|
4152 |
" |
10205 | 4153 |
(where isNil |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4154 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4155 |
ifTrue:[ |
15413 | 4156 |
"/ did not find our steppedContext along the chain; |
4157 |
"/ could be in a wrappedMethods exitBlock ... |
|
4158 |
||
4159 |
leftWrap ifFalse:[ |
|
4160 |
where := here. |
|
4161 |
wrappedMethod := nil. |
|
4162 |
5 timesRepeat:[ |
|
4163 |
where notNil ifTrue:[ |
|
4164 |
where isBlockContext ifFalse:[ |
|
4165 |
method := where method. |
|
4166 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
4167 |
where == wrapperContext ifTrue:[ |
|
4168 |
DebuggingDebugger2 == true ifTrue:[ |
|
4169 |
'change stepCon fromWrapped: ' print. |
|
4170 |
steppedContext print. |
|
4171 |
' to: ' print. |
|
4172 |
wrapperContext printCR. |
|
4173 |
]. |
|
4174 |
||
4175 |
inWrap := true. |
|
4176 |
enteredWrap := true. |
|
4177 |
steppedContext := wrapperContext. |
|
4178 |
wrapperContext := nil. |
|
4179 |
] |
|
4180 |
]. |
|
4181 |
]. |
|
4182 |
where := where sender |
|
4183 |
] |
|
4184 |
]. |
|
4185 |
]. |
|
4186 |
enteredWrap ifTrue:[ |
|
4187 |
ignore := true |
|
4188 |
] |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4189 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4190 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4191 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4192 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4193 |
subBlockLeft ifTrue:[ |
15413 | 4194 |
"/ special care for stepInterrupt in send, |
4195 |
"/ when created a dummy context (lineNr == 1) |
|
4196 |
||
4197 |
steppedContext lineNumber isNil ifTrue:[ |
|
4198 |
steppedContext selector == here sender selector ifTrue:[ |
|
4199 |
subBlockLeft := false. |
|
4200 |
s := 'Debugger: after step'. |
|
4201 |
steppedContext := here sender. |
|
4202 |
]. |
|
4203 |
]. |
|
4204 |
oneMore := true |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
4205 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
4206 |
|
57 | 4207 |
inBlock ifTrue:[ |
15413 | 4208 |
DebuggingDebugger2 == true ifTrue:[ |
4209 |
'inBlock' printCR. |
|
4210 |
]. |
|
4211 |
s := 'Debugger: in block'. |
|
57 | 4212 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
4213 |
inBlockBelow ifTrue:[ |
15413 | 4214 |
DebuggingDebugger2 == true ifTrue:[ |
4215 |
'inBlockBelow' printCR. |
|
4216 |
]. |
|
4217 |
ignore := true |
|
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
4218 |
]. |
57 | 4219 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4220 |
DebuggingDebugger2 == true ifTrue:[ |
15413 | 4221 |
where notNil ifTrue:[ |
4222 |
'(' print. steppedContextLineno print. ') ' print. |
|
4223 |
where printCR. |
|
4224 |
]. |
|
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
4225 |
]. |
57 | 4226 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4227 |
ignore ifFalse:[ |
15413 | 4228 |
(bigStep |
4229 |
and:[steppedContextLineno notNil |
|
4230 |
and:[where notNil |
|
4231 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
|
4232 |
(here isBlockContext |
|
4233 |
and:[(here methodHome == steppedContext) |
|
4234 |
or:[here home == steppedContext]]) ifTrue:[ |
|
4235 |
DebuggingDebugger2 == true ifTrue:[ |
|
4236 |
'same line but in block' printCR. |
|
4237 |
]. |
|
4238 |
||
4239 |
steppedContext := actualContext := here. |
|
4240 |
steppedContextLineno := here lineNumber. |
|
4241 |
] ifFalse:[ |
|
4242 |
"/ kludge - I only have the info for up to 255 lines |
|
4243 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
4244 |
DebuggingDebugger2 == true ifTrue:[ |
|
4245 |
'same line - ignored' printCR. |
|
4246 |
]. |
|
4247 |
ignore := true |
|
4248 |
]. |
|
4249 |
]. |
|
4250 |
]. |
|
4251 |
||
4252 |
(subBlockLeft not |
|
4253 |
and:[skipLineNr notNil |
|
4254 |
and:[where notNil |
|
4255 |
and:[where lineNumber notNil |
|
4256 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
|
4257 |
DebuggingDebugger2 == true ifTrue:[ |
|
4258 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
|
4259 |
]. |
|
4260 |
ignore := true |
|
4261 |
]. |
|
4262 |
||
4263 |
(steppedContextLineno isNil |
|
4264 |
and:[skipLineNr isNil |
|
4265 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
|
4266 |
DebuggingDebugger2 == true ifTrue:[ |
|
4267 |
'same line2 (after conIRQ) - ignored' printCR. |
|
4268 |
]. |
|
4269 |
ignore := true |
|
4270 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4271 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4272 |
|
57 | 4273 |
ignore ifTrue:[ |
3055 | 4274 |
"/' ' printCR. |
15413 | 4275 |
where := nil. here := nil. |
4276 |
" |
|
4277 |
yes, a context below |
|
4278 |
- continue and schedule another stepInterrupt. |
|
4279 |
Must flush caches since optimized methods not always |
|
4280 |
look for pending interrupts |
|
4281 |
" |
|
4282 |
ObjectMemory flushInlineCaches. |
|
4283 |
StepInterruptPending := 1. |
|
4284 |
InterruptPending := 1. |
|
4285 |
InStepInterrupt := nil. |
|
4286 |
^ self |
|
57 | 4287 |
]. |
4288 |
||
3055 | 4289 |
"/ ' ' printCR. |
57 | 4290 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
4291 |
self label:(s , ' (process: ' , processName , ')'). |
7 | 4292 |
|
57 | 4293 |
tracing := false. |
4294 |
bigStep := false. |
|
4295 |
||
0 | 4296 |
"release refs to context" |
4297 |
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
|
4298 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4299 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4300 |
DebuggingDebugger2 == true ifTrue:[ |
15413 | 4301 |
'==> 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
|
4302 |
]. |
1364 | 4303 |
|
4304 |
initiallyShown := nil. |
|
4305 |
(oneMore == true) ifTrue:[ |
|
15413 | 4306 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
4307 |
initiallyShown := 2 |
|
4308 |
] ifFalse:[ |
|
4309 |
initiallyShown := 1 |
|
4310 |
] |
|
1364 | 4311 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4312 |
con := thisContext sender sender. |
3435 | 4313 |
|
9235 | 4314 |
HaltInterrupt handle:[:ex | |
15413 | 4315 |
'DebugView [info]: halt/breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
4316 |
ex proceed |
|
3435 | 4317 |
] do:[ |
15413 | 4318 |
self enter:con select:initiallyShown |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4319 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4320 |
con := nil |
1364 | 4321 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
4322 |
"Created: / 14-10-1996 / 12:53:39 / cg" |
11636 | 4323 |
"Modified: / 20-07-2012 / 15:26:26 / cg" |
0 | 4324 |
! ! |
4325 |
||
4867 | 4326 |
!DebugView methodsFor:'menu & button actions'! |
266 | 4327 |
|
5875 | 4328 |
addBrowserBookmark |
4329 |
"add a browser-bookmark for the selected contexts method" |
|
4330 |
||
4331 |
|cls sel| |
|
4332 |
||
4333 |
selectedContext isNil ifTrue:[^ self]. |
|
4334 |
||
4335 |
cls := selectedContext receiver class. |
|
4336 |
sel := selectedContext selector. |
|
4337 |
(cls includesSelector:sel) ifFalse:[ |
|
15413 | 4338 |
sel := nil |
5875 | 4339 |
]. |
4340 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
4341 |
! |
|
4342 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4343 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4344 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4345 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4346 |
"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
|
4347 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4348 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4349 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4350 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4351 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4352 |
"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
|
4353 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
4354 |
|
266 | 4355 |
autoUpdateOff |
4356 |
"stop the update process" |
|
4357 |
||
4358 |
updateProcess notNil ifTrue:[ |
|
15413 | 4359 |
monitorToggle lampColor:(Color yellow). |
4360 |
updateProcess terminate. |
|
4361 |
updateProcess := nil |
|
266 | 4362 |
] |
4363 |
! |
|
4364 |
||
4365 |
autoUpdateOn |
|
4366 |
"fork a subprocess which updates the contextList in regular intervals" |
|
4367 |
||
4368 |
updateProcess isNil ifTrue:[ |
|
15413 | 4369 |
updateProcess := |
4370 |
[ |
|
4371 |
[true] whileTrue:[ |
|
4372 |
monitorToggle showLamp ifTrue:[ |
|
4373 |
monitorToggle lampColor:(Color yellow). |
|
4374 |
] ifFalse:[ |
|
4375 |
monitorToggle activeForegroundColor:Color black. |
|
4376 |
]. |
|
4377 |
(Delay forSeconds:0.25) wait. |
|
4378 |
self updateContext. |
|
4379 |
monitorToggle showLamp ifTrue:[ |
|
4380 |
monitorToggle lampColor:(Color red). |
|
4381 |
] ifFalse:[ |
|
4382 |
monitorToggle activeForegroundColor:Color red. |
|
4383 |
]. |
|
4384 |
(Delay forSeconds:0.25) wait. |
|
4385 |
self updateContext. |
|
4386 |
] |
|
4387 |
] forkAt:(Processor activePriority - 1) |
|
266 | 4388 |
] |
4389 |
||
4390 |
! |
|
4391 |
||
13408 | 4392 |
browseBlocksHome |
4393 |
"browse the receiver block's home method (if a value-like send is selected)" |
|
4394 |
||
13414 | 4395 |
|cls sel block mthd| |
13408 | 4396 |
|
4397 |
selectedContext isNil ifTrue:[^ self]. |
|
4398 |
(block := selectedContext receiver) isBlock ifFalse:[ ^ self ]. |
|
4399 |
||
13414 | 4400 |
mthd := block method. |
4401 |
cls := mthd mclass. |
|
4402 |
sel := mthd selector. |
|
4403 |
||
4404 |
(cls notNil and:[(cls includesSelector:sel)]) ifTrue:[ |
|
15835 | 4405 |
cls browserClass openInClass:cls selector:sel. |
4406 |
^ self |
|
13414 | 4407 |
]. |
4408 |
||
4409 |
mthd source notEmptyOrNil ifTrue:[ |
|
15835 | 4410 |
(Dialog confirm:'Block''s home method is (no longer) present in any class.\Do you want to see the method anyway?' withCRs) |
4411 |
ifTrue:[ |
|
4412 |
SystemBrowser default browseMethods:{ mthd } title:'Unbound Method' sort:false |
|
4413 |
"/ TextView openWith:mthd source title:'Unbound Method''s Source'. |
|
4414 |
]. |
|
4415 |
^ self |
|
13414 | 4416 |
]. |
4417 |
cls notNil ifTrue:[ |
|
15835 | 4418 |
(Dialog confirm:'Block''s home method is (no longer) present in any class and no source can be shown.\Do you want to browse the method''s last class instead?' withCRs) |
4419 |
ifTrue:[ |
|
4420 |
cls browserClass openInClass:cls selector:nil. |
|
4421 |
]. |
|
4422 |
^ self |
|
13414 | 4423 |
]. |
4424 |
Dialog information:'Block''s home method is (no longer) present in any class.'. |
|
13408 | 4425 |
! |
4426 |
||
3269 | 4427 |
browseClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4428 |
"browse the receiver's class (of the selected context's message)" |
3269 | 4429 |
|
4430 |
|cls sel| |
|
4431 |
||
4432 |
selectedContext isNil ifTrue:[^ self]. |
|
4433 |
||
4434 |
cls := selectedContext receiver class. |
|
4435 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
4436 |
(cls includesSelector:sel) ifFalse:[ |
15413 | 4437 |
sel := nil |
3269 | 4438 |
]. |
4439 |
cls browserClass openInClass:cls selector:sel. |
|
4440 |
||
4441 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
4442 |
! |
|
4443 |
||
4444 |
browseClassHierarchy |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4445 |
"browse the receiver's classHierarchy (of the selected context's message)" |
3269 | 4446 |
|
4447 |
|cls mthd| |
|
4448 |
||
4449 |
selectedContext isNil ifTrue:[^ self]. |
|
4450 |
||
4451 |
mthd := selectedContext method. |
|
3447 | 4452 |
mthd notNil ifTrue:[ |
15413 | 4453 |
cls := mthd containingClass. |
4454 |
"/ still nil if unbound - then use receivers class |
|
3447 | 4455 |
]. |
4456 |
cls isNil ifTrue:[ |
|
15413 | 4457 |
cls := selectedContext receiver class |
3269 | 4458 |
]. |
4459 |
cls browserClass browseClassHierarchy:cls. |
|
4460 |
||
3447 | 4461 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 4462 |
! |
4463 |
||
4464 |
browseFullClassProtocol |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4465 |
"browse the receiver's full protocol (of the selected context's message)" |
3269 | 4466 |
|
4467 |
|cls mthd| |
|
4468 |
||
4469 |
selectedContext isNil ifTrue:[^ self]. |
|
4470 |
||
4471 |
mthd := selectedContext method. |
|
3447 | 4472 |
mthd notNil ifTrue:[ |
15413 | 4473 |
cls := mthd containingClass. |
4474 |
"/ still nil if unbound - then use receivers class |
|
3447 | 4475 |
]. |
4476 |
cls isNil ifTrue:[ |
|
15413 | 4477 |
cls := selectedContext receiver class |
3269 | 4478 |
]. |
4479 |
cls browserClass browseFullClassProtocol:cls. |
|
4480 |
||
3447 | 4481 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 4482 |
! |
4483 |
||
4484 |
browseImplementingClass |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4485 |
"browse the implementing class (of the selected context's message)" |
3269 | 4486 |
|
11610 | 4487 |
|con mthd who sel cls home| |
4488 |
||
4489 |
con := selectedContext ? actualContext. |
|
4490 |
con isNil ifTrue:[^ self]. |
|
4491 |
||
4492 |
mthd := con method. |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4493 |
mthd notNil ifTrue:[ |
15413 | 4494 |
who := mthd who. |
4495 |
who notNil ifTrue:[ |
|
4496 |
cls := who methodClass. |
|
4497 |
sel := who methodSelector. |
|
4498 |
] ifFalse:[ |
|
4499 |
"might have been re-accepted" |
|
4500 |
(home := con methodHome) notNil ifTrue:[ |
|
4501 |
(sel := home selector) notNil ifTrue:[ |
|
4502 |
cls := home receiver class |
|
4503 |
whichClassImplements:selectedContext selector. |
|
4504 |
cls notNil ifTrue:[ |
|
4505 |
Dialog information:'Method has been changed/moved in the meanwhile.\Browser will show the most recent (current) version.' withCRs. |
|
4506 |
]. |
|
4507 |
] |
|
4508 |
]. |
|
4509 |
]. |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4510 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4511 |
cls isNil ifTrue:[ |
15413 | 4512 |
"/ class not found - try receiver |
4513 |
cls := con receiver class |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4514 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4515 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
4516 |
cls browserClass openInClass:cls selector:sel. |
266 | 4517 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
4518 |
"Created: / 22-11-1995 / 21:27:01 / cg" |
11610 | 4519 |
"Modified: / 19-07-2012 / 11:27:32 / cg" |
266 | 4520 |
! |
4521 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4522 |
browseImplementors |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4523 |
"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
|
4524 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4525 |
selectedContext isNil ifTrue:[ |
15413 | 4526 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4527 |
]. |
4153 | 4528 |
"/ selectedContext receiver class browserClass |
11610 | 4529 |
self withWaitCursorDo:[ |
15413 | 4530 |
UserPreferences systemBrowserClass |
4531 |
browseImplementorsOf:selectedContext selector. |
|
11610 | 4532 |
] |
4533 |
||
4534 |
"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
|
4535 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4536 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4537 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4538 |
"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
|
4539 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4540 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4541 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4542 |
(sel := codeView selection) notNil ifTrue:[ |
15413 | 4543 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4544 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4545 |
initial isNil ifTrue:[ |
15413 | 4546 |
initial := selectedContext isNil |
4547 |
ifTrue:[nil] |
|
4548 |
ifFalse:[selectedContext selector]. |
|
10205 | 4549 |
]. |
4550 |
selector := Dialog |
|
15413 | 4551 |
requestSelector:'Selector to browse implementors of:' |
4552 |
initialAnswer:initial. |
|
11610 | 4553 |
|
4554 |
selector notEmptyOrNil ifTrue:[ |
|
15413 | 4555 |
self withWaitCursorDo:[ |
4556 |
UserPreferences systemBrowserClass |
|
4557 |
browseImplementorsMatching:selector. |
|
4558 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4559 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4560 |
|
11610 | 4561 |
"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
|
4562 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4563 |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4564 |
browseProcessesApplication |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4565 |
"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
|
4566 |
|
13488 | 4567 |
|app appClass| |
4568 |
||
4569 |
(app := self processesApplication) notNil ifTrue:[ |
|
15413 | 4570 |
appClass := app class. |
4571 |
appClass browserClass openInClass:appClass selector:nil. |
|
4572 |
^ self |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4573 |
]. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4574 |
! |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4575 |
|
3269 | 4576 |
browseReceiversClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4577 |
"browse the receiver's class (of the selected context's message)" |
3269 | 4578 |
|
4579 |
|cls sel| |
|
4580 |
||
4581 |
selectedContext isNil ifTrue:[^ self]. |
|
4582 |
||
11610 | 4583 |
selectedContext isCheapBlockContext ifTrue:[ |
15413 | 4584 |
cls := selectedContext method mclass. |
4585 |
sel := selectedContext method selector. |
|
11610 | 4586 |
] ifFalse:[ |
15413 | 4587 |
cls := selectedContext receiver class. |
4588 |
sel := selectedContext selector. |
|
11610 | 4589 |
]. |
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
4590 |
(cls includesSelector:sel) ifFalse:[ |
15413 | 4591 |
sel := nil |
3269 | 4592 |
]. |
4593 |
cls browserClass openInClass:cls selector:sel. |
|
4594 |
||
11610 | 4595 |
"Modified: / 19-07-2012 / 11:29:48 / cg" |
3269 | 4596 |
! |
4597 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4598 |
browseSenders |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4599 |
"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
|
4600 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4601 |
selectedContext isNil ifTrue:[ |
15413 | 4602 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4603 |
]. |
11610 | 4604 |
self withWaitCursorDo:[ |
15413 | 4605 |
UserPreferences systemBrowserClass |
4606 |
browseAllCallsOn:selectedContext selector. |
|
11610 | 4607 |
] |
4608 |
||
4609 |
"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
|
4610 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4611 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4612 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4613 |
"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
|
4614 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4615 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4616 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4617 |
(sel := codeView selection) notNil ifTrue:[ |
15413 | 4618 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4619 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4620 |
initial isNil ifTrue:[ |
15413 | 4621 |
initial := selectedContext isNil |
4622 |
ifTrue:[nil] |
|
4623 |
ifFalse:[selectedContext selector]. |
|
10205 | 4624 |
]. |
4625 |
selector := Dialog |
|
15413 | 4626 |
requestSelector:'Selector to browse senders of:' |
4627 |
initialAnswer:initial. |
|
11610 | 4628 |
|
4629 |
selector notEmptyOrNil ifTrue:[ |
|
15413 | 4630 |
self withWaitCursorDo:[ |
4631 |
UserPreferences systemBrowserClass |
|
4632 |
browseAllCallsOn:selector asSymbol. |
|
4633 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4634 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4635 |
|
11610 | 4636 |
"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
|
4637 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4638 |
|
11391 | 4639 |
clearRememberedCallchain |
4640 |
"clear the remembered callchain." |
|
4641 |
||
4642 |
RememberedCallChain := nil |
|
4643 |
||
4644 |
"Created: / 08-03-2012 / 01:29:46 / cg" |
|
4645 |
! |
|
4646 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4647 |
closeAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4648 |
(Dialog confirm:'Close all Debuggers (without confirmation if code was changed)?') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4649 |
ifFalse:[ |
15413 | 4650 |
^ self |
4651 |
]. |
|
4652 |
||
4653 |
self class allInstancesDo:[:debugger | |
|
4654 |
debugger ~~ self ifTrue:[ |
|
4655 |
debugger busy ifTrue:[ |
|
4656 |
debugger destroyWithConfirmation:true. |
|
4657 |
]. |
|
4658 |
]. |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4659 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4660 |
self closeRequest. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4661 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4662 |
"Created: / 23-03-2012 / 12:40:22 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4663 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4664 |
|
9626 | 4665 |
configureX:x y:y width:newWidth height:newHeight |
10205 | 4666 |
super configureX:x y:y width:newWidth height:newHeight. |
9626 | 4667 |
LastExtent := self extent. |
4668 |
LastOrigin := self origin. |
|
4669 |
||
4670 |
"Created: / 10-11-2010 / 10:09:11 / cg" |
|
4671 |
! |
|
4672 |
||
266 | 4673 |
copyWalkbackText |
4674 |
"place the contents of the walkback view into the copy-paste buffer. |
|
12884 | 4675 |
This allows pasting it into some other view for printing. |
4676 |
||
4677 |
Show the full verbose context without filtering." |
|
266 | 4678 |
|
10760 | 4679 |
|infoText| |
4680 |
||
12884 | 4681 |
firstContext isNil ifTrue:[ |
15413 | 4682 |
infoText := 'No context, no walkback'. |
10760 | 4683 |
] ifFalse:[ |
15413 | 4684 |
exceptionInfoLabel notNil ifTrue:[ |
4685 |
infoText := exceptionInfoLabel label , '\\' withCRs. |
|
4686 |
] ifFalse:[ |
|
4687 |
infoText := '' |
|
4688 |
]. |
|
4689 |
infoText := infoText asStringCollection, firstContext fullPrintAllString asStringCollection. |
|
10760 | 4690 |
]. |
4691 |
||
4692 |
self setClipboardText:infoText |
|
266 | 4693 |
|
4694 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
4695 |
! |
|
4696 |
||
4697 |
doAbort |
|
1187 | 4698 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 4699 |
at save places (for example: in the event loop) and returns back |
4700 |
from whatever the process is doing, but does not terminate it." |
|
4701 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4702 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 4703 |
(self confirm:('Code modified - abort anyway ?')) |
4704 |
ifFalse:[ |
|
4705 |
^ self |
|
4706 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4707 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4708 |
|
266 | 4709 |
inspecting ifTrue:[ |
15413 | 4710 |
inspectedProcess isDead ifTrue:[ |
4711 |
self showTerminated. |
|
4712 |
^ self |
|
4713 |
]. |
|
4714 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4715 |
self showError:'** the process does not handle the abort signal **' |
|
4716 |
] ifTrue:[ |
|
4717 |
self interruptProcessWith:[AbortOperationRequest raise]. |
|
4718 |
]. |
|
4719 |
^ self |
|
266 | 4720 |
]. |
4721 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4722 |
steppedContext := wrapperContext := nil. |
266 | 4723 |
haveControl := false. |
4724 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4725 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4726 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4727 |
catchBlock notNil ifTrue:[ |
15413 | 4728 |
abortButton turnOff. |
4729 |
catchBlock value. |
|
4730 |
||
4731 |
"/ not reached |
|
4732 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
266 | 4733 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4734 |
|
266 | 4735 |
^ self. |
4736 |
||
3447 | 4737 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 4738 |
! |
4739 |
||
6487 | 4740 |
doAbortAll |
4741 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
4742 |
at save places (for example: in the event loop) and returns back |
|
4743 |
from whatever the process is doing, but does not terminate it." |
|
4744 |
||
4745 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
15413 | 4746 |
(self confirm:('Code modified - abort anyway ?')) |
4747 |
ifFalse:[ |
|
4748 |
^ self |
|
4749 |
] |
|
6487 | 4750 |
]. |
4751 |
||
4752 |
inspecting ifTrue:[ |
|
15413 | 4753 |
inspectedProcess isDead ifTrue:[ |
4754 |
self showTerminated. |
|
4755 |
^ self |
|
4756 |
]. |
|
4757 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4758 |
self showError:'** the process does not handle the abort signal **' |
|
4759 |
] ifTrue:[ |
|
4760 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
4761 |
]. |
|
4762 |
^ self |
|
6487 | 4763 |
]. |
4764 |
||
4765 |
steppedContext := wrapperContext := nil. |
|
4766 |
haveControl := false. |
|
4767 |
exitAction := #abortAll. |
|
4768 |
||
4769 |
"exit private event-loop" |
|
4770 |
catchBlock notNil ifTrue:[ |
|
15413 | 4771 |
abortButton turnOff. |
4772 |
catchBlock value. |
|
4773 |
||
4774 |
"/ not reached |
|
4775 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
6487 | 4776 |
]. |
4777 |
||
4778 |
^ self. |
|
4779 |
||
4780 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
4781 |
! |
|
4782 |
||
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4783 |
doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4784 |
"ask for and change the process's priority" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4785 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4786 |
|oldPrio newPrio s| |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4787 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4788 |
oldPrio := (inspectedProcess ? Processor activeProcess) priority. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4789 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4790 |
[ |
15413 | 4791 |
s := Dialog |
4792 |
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)\') |
|
4793 |
initialAnswer:oldPrio printString. |
|
4794 |
s isEmptyOrNil ifTrue:[^ self]. |
|
4795 |
newPrio := Integer readFrom:s onError:nil. |
|
4796 |
newPrio isNil |
|
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4797 |
] whileTrue. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4798 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4799 |
newPrio := newPrio max:(Processor lowestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4800 |
newPrio := newPrio min:(Processor highestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4801 |
newPrio >= Processor highIOPriority ifTrue:[ |
15413 | 4802 |
(Dialog |
4803 |
confirm:(resources |
|
4804 |
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?')) |
|
4805 |
ifFalse:[^ self]. |
|
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4806 |
]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4807 |
(inspectedProcess ? Processor activeProcess) priority:newPrio. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4808 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4809 |
"Created: / 07-03-2012 / 14:15:09 / cg" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4810 |
! |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4811 |
|
266 | 4812 |
doContinue |
4813 |
"continue from menu" |
|
4814 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4815 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4816 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4817 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 4818 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
4819 |
^ self |
|
4820 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4821 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4822 |
|
266 | 4823 |
inspecting ifTrue:[ |
15413 | 4824 |
self graphicsDevice hasColors ifTrue:[ |
4825 |
continueButton foregroundColor:Color red darkened. |
|
4826 |
]. |
|
4827 |
continueButton label:(resources string:'Stop'). |
|
4828 |
continueButton action:[self doStop]. |
|
4829 |
||
4830 |
self processPerform:#resume. |
|
4831 |
||
4832 |
^ self |
|
266 | 4833 |
]. |
4834 |
canContinue ifTrue:[ |
|
15413 | 4835 |
exContext := thisContext findSpecialHandle:false raise:true. |
4836 |
||
4837 |
(exContext notNil |
|
4838 |
and:[ (ex := exContext receiver) isLazyValue not |
|
4839 |
and:[ ex isException |
|
4840 |
and:[ ex creator == NoHandlerError |
|
4841 |
and:[ ex exception creator == RecursionError]]]]) |
|
4842 |
ifTrue:[ |
|
4843 |
"/ debug due to unhandled recursionInterrupt. |
|
4844 |
"/ ask if we should proceed with more stack. |
|
4845 |
||
4846 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
|
4847 |
answer == true ifTrue:[ |
|
4848 |
proc := Processor activeProcess. |
|
4849 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
|
4850 |
]. |
|
4851 |
]. |
|
4852 |
||
4853 |
steppedContext := wrapperContext := nil. |
|
4854 |
tracing := false. |
|
4855 |
haveControl := false. |
|
4856 |
exitAction := #continue. |
|
4857 |
||
4858 |
"exit private event-loop" |
|
4859 |
catchBlock value. |
|
4860 |
||
4861 |
"/ not reached. |
|
4862 |
'DebugView [warning]: continue failed' errorPrintCR. |
|
4863 |
continueButton turnOff. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4864 |
|
266 | 4865 |
] ifFalse:[ |
15413 | 4866 |
inspecting ifFalse:[ |
4867 |
'DebugView [info]: resuming top context' infoPrintCR. |
|
4868 |
self showSelection:1. |
|
4869 |
self doReturn |
|
4870 |
] |
|
266 | 4871 |
] |
477 | 4872 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
4873 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 4874 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 4875 |
! |
4876 |
||
13351 | 4877 |
doContinueAfterDelay |
4878 |
Delay waitForSeconds:5. |
|
4879 |
self doContinue. |
|
4880 |
! |
|
4881 |
||
3187 | 4882 |
doDefine |
5955 | 4883 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4884 |
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
|
4885 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4886 |
selectionIndex := contextView selection. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4887 |
restart := true. |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4888 |
|
13488 | 4889 |
selectorToDefine notNil ifTrue:[ |
15413 | 4890 |
selector := selectorToDefine. |
4891 |
receiversClass := classToDefineIn. |
|
13488 | 4892 |
] ifFalse:[ |
15413 | 4893 |
selector := actualContext selector. |
4894 |
receiversClass := actualContext receiver class. |
|
13538 | 4895 |
]. |
4896 |
||
4897 |
implClass := actualContext receiver class whichClassIncludesSelector:selector. |
|
4898 |
implClass notNil ifTrue:[ |
|
15413 | 4899 |
"/ must be a subclassResponsibility |
4900 |
||
4901 |
idx := contextArray identityIndexOf:actualContext. |
|
4902 |
idx > 1 ifTrue:[ |
|
4903 |
callee := contextArray at:idx-1. |
|
4904 |
||
4905 |
callee selector == #subclassResponsibility ifTrue:[ |
|
4906 |
restart := false. |
|
4907 |
] |
|
4908 |
]. |
|
13538 | 4909 |
]. |
4910 |
||
4911 |
"generate nice argument names" |
|
4912 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
4913 |
bagOfUsedClassNames := Bag new. |
|
4914 |
argNames := actualContext args |
|
15413 | 4915 |
collect: |
4916 |
[:eachArg | |
|
4917 |
|nm| |
|
4918 |
||
4919 |
nm := eachArg class nameWithoutPrefix. |
|
4920 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
|
4921 |
nm article , nm |
|
4922 |
] ifFalse:[ |
|
4923 |
bagOfUsedClassNames add:nm. |
|
4924 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
4925 |
]. |
|
4926 |
]. |
|
5955 | 4927 |
|
4928 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 4929 |
|
3447 | 4930 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
4931 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
4932 |
||
13488 | 4933 |
|
4934 |
( { UndefinedObject . True . False } includes:receiversClass ) ifTrue:[ |
|
15413 | 4935 |
(self confirm:'Are you sure you want to add this method (to ',receiversClass name,') ?') |
4936 |
ifFalse:[ |
|
4937 |
^ self |
|
4938 |
] |
|
3447 | 4939 |
]. |
4940 |
||
4941 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4942 |
"/ code for a getter |
3447 | 4943 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
15413 | 4944 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
4945 |
cat := 'accessing'. |
|
3447 | 4946 |
]. |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4947 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4948 |
"/ code for a setter |
3447 | 4949 |
(selector numArgs == 1 |
4950 |
and:[(selector endsWith:':') |
|
12716
062e27d32904
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12687
diff
changeset
|
4951 |
and:[receiversClass instVarNames includes:(selector copyButLast:1)]]) |
3447 | 4952 |
ifTrue:[ |
15413 | 4953 |
varName := selector copyButLast:1. |
4954 |
argName := argNames first. |
|
4955 |
code := '%1\' , haltStmtFix , '\ %3 := %4.'. |
|
4956 |
cat := 'accessing'. |
|
3447 | 4957 |
]. |
4958 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4959 |
"/ code for a tester |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4960 |
(selector numArgs == 0 |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4961 |
and:[(selector startsWith:'is') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4962 |
and:[(Smalltalk classNamed:(selector copyFrom:3)) notNil ]]) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4963 |
ifTrue:[ |
15413 | 4964 |
(receiversClass nameWithoutPrefix = (selector copyFrom:3)) ifTrue:[ |
4965 |
code := '%1\' , haltStmtFix , '\ ^ true.'. |
|
4966 |
] ifFalse:[ |
|
4967 |
code := '%1\' , haltStmtFix , '\ ^ false.'. |
|
4968 |
]. |
|
4969 |
cat := 'testing'. |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4970 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4971 |
|
3447 | 4972 |
"/ actualContext receiver isClass ifTrue:[ |
4973 |
"/ selector == #new ifTrue:[ |
|
4974 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
4975 |
"/ ]. |
|
4976 |
"/ selector == #'new:' ifTrue:[ |
|
4977 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
4978 |
"/ ]. |
|
4979 |
"/ ]. |
|
4980 |
code isNil ifTrue:[ |
|
15413 | 4981 |
code := '%1\' , haltStmtDef |
10205 | 4982 |
]. |
4983 |
||
4984 |
self |
|
15413 | 4985 |
codeAccept:(code bindWith:proto with:selector with:varName with:argName) withCRs |
4986 |
inClass:receiversClass |
|
4987 |
unwind:false |
|
4988 |
category:cat |
|
4989 |
onCancel:[^ self]. |
|
3269 | 4990 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4991 |
self doShowSelection:selectionIndex. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4992 |
restart ifTrue:[ |
15413 | 4993 |
self doRestart |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4994 |
] |
3427 | 4995 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4996 |
"Modified: / 23-03-2012 / 09:49:31 / cg" |
3187 | 4997 |
! |
4998 |
||
14523 | 4999 |
doGotoApplicationActionMethod |
5000 |
"select the first application-model context. |
|
5001 |
This is another great helper, when you hit an exception, |
|
5002 |
to quickly navigate to the responsible code of you application" |
|
5003 |
||
5004 |
contextArray keysAndValuesDo:[:i :c | |
|
15413 | 5005 |
|nextCon nextRcvr dialog| |
5006 |
||
5007 |
"/ find the first appModel context |
|
5008 |
nextCon := contextArray at:i+1. |
|
5009 |
"/ |
|
5010 |
"/ while not in the appModel |
|
5011 |
"/ |
|
5012 |
[ |
|
5013 |
nextRcvr := nextCon receiver. |
|
5014 |
(nextRcvr isKindOf:ApplicationModel) |
|
5015 |
] whileFalse:[ |
|
5016 |
nextCon := nextCon sender |
|
5017 |
]. |
|
5018 |
self selectContext:nextCon. |
|
5019 |
^ self. |
|
14523 | 5020 |
]. |
5021 |
"/ not found |
|
5022 |
gotoApplicationActionMethodButton disable. |
|
5023 |
! |
|
5024 |
||
13362 | 5025 |
doGotoDialogOpener |
14523 | 5026 |
"select the context where the dialog was opened. |
5027 |
This is a great helper, when you press interrupt while a modal dialog |
|
5028 |
is open, to quickly navigate to the corresponding opening code of you application" |
|
13362 | 5029 |
|
5030 |
contextArray keysAndValuesDo:[:i :c | |
|
15413 | 5031 |
|nextCon nextRcvr dialog| |
5032 |
||
5033 |
"/ find the openModal, then walk upward |
|
5034 |
((c selector == #openModal) or:[c selector == #openModal:]) ifTrue:[ |
|
5035 |
dialog := c receiver. |
|
5036 |
nextCon := contextArray at:i+1. |
|
5037 |
"/ |
|
5038 |
"/ while still in dialog code |
|
5039 |
"/ |
|
5040 |
[ |
|
5041 |
nextRcvr := nextCon receiver. |
|
5042 |
(nextRcvr == dialog) |
|
5043 |
or:[ nextRcvr == dialog class |
|
5044 |
or:[ nextRcvr == DialogBox ]] |
|
5045 |
] whileTrue:[ |
|
5046 |
(nextCon isBlockContext and:[ nextCon methodHome notNil]) ifTrue:[ |
|
5047 |
nextCon := nextCon methodHome |
|
5048 |
]. |
|
5049 |
nextCon := nextCon sender. |
|
5050 |
]. |
|
5051 |
"/ |
|
5052 |
"/ while still in a Notification |
|
5053 |
"/ |
|
5054 |
[ |
|
5055 |
nextRcvr := nextCon receiver. |
|
5056 |
(nextRcvr isKindOf:UserInformation) |
|
5057 |
or:[ nextRcvr isBehavior |
|
5058 |
and:[nextRcvr includesBehavior:UserInformation]] |
|
5059 |
] whileTrue:[ |
|
5060 |
nextCon := nextCon sender |
|
5061 |
]. |
|
5062 |
"/ |
|
5063 |
"/ while still in UIBuilder |
|
5064 |
"/ |
|
5065 |
[ |
|
5066 |
nextRcvr := nextCon receiver. |
|
5067 |
(nextRcvr isKindOf:WindowBuilder) |
|
5068 |
] whileTrue:[ |
|
5069 |
nextCon := nextCon sender |
|
5070 |
]. |
|
5071 |
"/ |
|
5072 |
"/ while still in SimpleDialog |
|
5073 |
"/ |
|
5074 |
[ |
|
5075 |
nextRcvr := nextCon receiver. |
|
5076 |
(nextRcvr class == SimpleDialog) |
|
5077 |
] whileTrue:[ |
|
5078 |
nextCon := nextCon sender |
|
5079 |
]. |
|
5080 |
"/ |
|
5081 |
"/ while still in applicationModel support code |
|
5082 |
"/ |
|
5083 |
[ |
|
5084 |
(nextCon selector startsWith:'openDialogSpec'). |
|
5085 |
] whileTrue:[ |
|
5086 |
nextCon := nextCon sender |
|
5087 |
]. |
|
5088 |
self selectContext:nextCon. |
|
5089 |
^ self. |
|
5090 |
] |
|
13362 | 5091 |
]. |
13388 | 5092 |
"/ not found |
13362 | 5093 |
gotoDialogOpenerButton disable. |
5094 |
! |
|
5095 |
||
12671 | 5096 |
doInspectProcess |
5097 |
(inspectedProcess ? Processor activeProcess) inspect. |
|
5098 |
! |
|
5099 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5100 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5101 |
"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
|
5102 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5103 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5104 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5105 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 5106 |
(self confirm:('Code modified - step anyway ?')) |
5107 |
ifFalse:[ |
|
5108 |
^ self |
|
5109 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5110 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5111 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5112 |
canContinue ifTrue:[ |
15413 | 5113 |
steppedContext := wrapperContext := nil. |
5114 |
haveControl := false. |
|
5115 |
exitAction := #step. |
|
5116 |
||
5117 |
"exit private event-loop" |
|
5118 |
catchBlock value. |
|
5119 |
||
5120 |
"/ not reached |
|
5121 |
'DebugView [warning]: send failed' errorPrintCR. |
|
5122 |
sendButton turnOff. |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5123 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5124 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5125 |
"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
|
5126 |
"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
|
5127 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5128 |
|
266 | 5129 |
doNext |
1072 | 5130 |
"skip for next source-code line; entering blocks" |
266 | 5131 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5132 |
stepHow := #nextIn. |
266 | 5133 |
self doStep:nil |
790 | 5134 |
|
1072 | 5135 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5136 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5137 |
|
13351 | 5138 |
doNextAfterDelay |
5139 |
Delay waitForSeconds:5. |
|
5140 |
self doNext. |
|
5141 |
! |
|
5142 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5143 |
doNextOut |
1072 | 5144 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5145 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5146 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5147 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5148 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5149 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 5150 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5151 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5152 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5153 |
doNextOver |
1072 | 5154 |
"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
|
5155 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5156 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5157 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5158 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5159 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 5160 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 5161 |
! |
5162 |
||
5163 |
doNoTrace |
|
5164 |
traceView notNil ifTrue:[ |
|
15413 | 5165 |
traceView topView destroy. |
5166 |
traceView := nil. |
|
266 | 5167 |
]. |
5168 |
tracing := false |
|
5169 |
! |
|
5170 |
||
4356 | 5171 |
doOpenReportMailApp |
5172 |
"open a mail report tool" |
|
5173 |
||
5174 |
| str | |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
5175 |
|
4356 | 5176 |
str := '' writeStream. |
5177 |
||
5178 |
str nextPutLine:('Error notification from ' |
|
15413 | 5179 |
, OperatingSystem getLoginName |
5180 |
, '@' |
|
5181 |
, OperatingSystem getHostName). |
|
4356 | 5182 |
str cr. |
5183 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
5184 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 5185 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
5186 |
str nextPutLine:('Description: ' , self label). |
|
5187 |
"/ str nextPutLine:('Error: ', printedException description). |
|
5188 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
5189 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
5190 |
str nextPutLine:'Backtrace:'. |
|
5191 |
str cr. |
|
5192 |
||
5193 |
firstContext notNil ifTrue:[ |
|
15413 | 5194 |
firstContext fullPrintAllOn:str. |
4356 | 5195 |
]. |
5196 |
str cr;cr. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
5197 |
|
10205 | 5198 |
SendMailTool |
15413 | 5199 |
openForMessage:(str contents) |
5200 |
withSubject:('STX Error:[', self label, ']') |
|
5201 |
preOpenBlock:[:inst| |
|
5202 |
inst recipientEntryField value:'error@exept.de' |
|
5203 |
]. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
5204 |
|
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
5205 |
"Modified: / 20-09-2007 / 12:40:40 / cg" |
4356 | 5206 |
! |
5207 |
||
13360 | 5208 |
doResend |
5209 |
"resend - the selected context is unwound and its message resent. |
|
5210 |
To be done after a cde change, to get nto the new method" |
|
5211 |
||
5212 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
15413 | 5213 |
(self confirm:('Code modified - resend anyway ?')) ifFalse:[ |
5214 |
^ self |
|
5215 |
] |
|
13360 | 5216 |
]. |
5217 |
inspecting ifTrue:[ |
|
15413 | 5218 |
^ self showError:'** not avail in inspecting debugger **' |
13360 | 5219 |
]. |
5220 |
steppedContext := wrapperContext := nil. |
|
5221 |
haveControl := false. |
|
5222 |
exitAction := #resend. "exit private event-loop" |
|
5223 |
||
5224 |
catchBlock value. |
|
5225 |
||
5226 |
"/ normally not reached |
|
5227 |
||
5228 |
'DebugView [warning]: resend failed' errorPrintCR. |
|
5229 |
resendButton turnOff. |
|
5230 |
! |
|
5231 |
||
266 | 5232 |
doRestart |
5233 |
"restart - the selected context will be restarted" |
|
10205 | 5234 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5235 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 5236 |
(self confirm:('Code modified - restart anyway ?')) ifFalse:[ |
5237 |
^ self |
|
5238 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5239 |
]. |
266 | 5240 |
inspecting ifTrue:[ |
15413 | 5241 |
selectedContext isNil ifTrue:[ |
5242 |
^ self showError:'** select a context first **' |
|
5243 |
]. |
|
5244 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
|
5245 |
^ self |
|
266 | 5246 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
5247 |
steppedContext := wrapperContext := nil. |
266 | 5248 |
haveControl := false. |
6365 | 5249 |
exitAction := #restart. "exit private event-loop" |
5250 |
||
5251 |
catchBlock value. |
|
5252 |
||
5253 |
"/ normally not reached |
|
10205 | 5254 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
5255 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5256 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5257 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5258 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 5259 |
! |
5260 |
||
5261 |
doReturn |
|
5262 |
"return - the selected context will do a ^nil" |
|
5263 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5264 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 5265 |
(self confirm:('Code modified - return anyway ?')) |
5266 |
ifFalse:[ |
|
5267 |
^ self |
|
5268 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5269 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5270 |
|
266 | 5271 |
inspecting ifTrue:[ |
15413 | 5272 |
selectedContext isNil ifTrue:[ |
5273 |
^ self showError:'** select a context first **' |
|
5274 |
]. |
|
5275 |
self interruptProcessWith:[selectedContext unwind:nil]. |
|
5276 |
^ self |
|
266 | 5277 |
]. |
5278 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
5279 |
steppedContext := wrapperContext := nil. |
266 | 5280 |
haveControl := false. |
5281 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5282 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5283 |
"exit private event-loop" |
6365 | 5284 |
catchBlock value. |
477 | 5285 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5286 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
5287 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5288 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5289 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5290 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 5291 |
! |
5292 |
||
5293 |
doSend |
|
5294 |
"single send; reenter with next message send" |
|
5295 |
||
1072 | 5296 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5297 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5298 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5299 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5300 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5301 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5302 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5303 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5304 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5305 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5306 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5307 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5308 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5309 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5310 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5311 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5312 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
5313 |
|
1072 | 5314 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 5315 |
! |
5316 |
||
5317 |
doStep |
|
5318 |
"skip for next send in selected method" |
|
5319 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5320 |
stepHow := #step. |
790 | 5321 |
self doStep:-1 |
5322 |
||
1072 | 5323 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 5324 |
! |
5325 |
||
13197 | 5326 |
doStep:lineNrOrNilOrMinus1 |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5327 |
"common helper for step, skip & next. |
10205 | 5328 |
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
|
5329 |
or to next line (if nil) or to next send (if -1)" |
266 | 5330 |
|
5331 |
|con method| |
|
5332 |
||
5333 |
inspecting ifTrue:[^ self]. |
|
5334 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5335 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 5336 |
(self confirm:('Code modified - step anyway ?')) |
5337 |
ifFalse:[ |
|
5338 |
^ self |
|
5339 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5340 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5341 |
|
266 | 5342 |
canContinue ifTrue:[ |
15413 | 5343 |
selectedContext notNil ifTrue:[ |
5344 |
con := actualContext. "/ selectedContext. |
|
5345 |
steppedContextLineno := actualContext lineNumber. |
|
5346 |
] ifFalse:[ |
|
5347 |
con := contextArray at:2. |
|
5348 |
steppedContextLineno := con lineNumber. |
|
5349 |
]. |
|
5350 |
||
5351 |
skipLineNr := lineNrOrNilOrMinus1. |
|
5352 |
||
5353 |
lineNrOrNilOrMinus1 == -1 ifTrue:[ |
|
5354 |
steppedContextLineno := skipLineNr := nil. |
|
5355 |
]. |
|
5356 |
||
5357 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
|
5358 |
steppedContext := contextArray at:1. |
|
5359 |
stepHow := #nextIn. |
|
5360 |
] ifFalse:[ |
|
5361 |
stepHow == #nextOut ifTrue:[ |
|
5362 |
steppedContext := con home. |
|
5363 |
] ifFalse:[ |
|
5364 |
steppedContext := con. |
|
5365 |
]. |
|
5366 |
]. |
|
5367 |
||
5368 |
wrapperContext := nil. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5369 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
5370 |
"/ ' 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
|
5371 |
|
15413 | 5372 |
" |
5373 |
if we step in a wrapped method, |
|
5374 |
prepare to skip the prolog ... |
|
5375 |
" |
|
5376 |
||
5377 |
inWrap := false. |
|
5378 |
method := con method. |
|
5379 |
(method notNil |
|
5380 |
and:[method isWrapped |
|
5381 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
|
5382 |
inWrap := true |
|
5383 |
]. |
|
5384 |
||
5385 |
lineNrOrNilOrMinus1 == #return ifTrue:[ |
|
5386 |
Processor activeProcess forceInterruptOnReturnOf:con. |
|
5387 |
]. |
|
5388 |
||
5389 |
con := nil. |
|
5390 |
bigStep := true. |
|
5391 |
haveControl := false. |
|
5392 |
exitAction := #step. |
|
5393 |
||
5394 |
"exit private event-loop" |
|
5395 |
catchBlock value. |
|
5396 |
||
5397 |
"/ not reached |
|
5398 |
'DebugView [warning]: step failed' errorPrintCR. |
|
5399 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
|
266 | 5400 |
] |
477 | 5401 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5402 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 5403 |
! |
5404 |
||
13351 | 5405 |
doStepAfterDelay |
5406 |
Delay waitForSeconds:5. |
|
5407 |
self doStep. |
|
5408 |
! |
|
5409 |
||
266 | 5410 |
doStop |
5411 |
"stop the process (if its running, otherwise this is a no-op)" |
|
5412 |
||
5413 |
inspecting ifTrue:[ |
|
15413 | 5414 |
self graphicsDevice hasColors ifTrue:[ |
5415 |
continueButton foregroundColor:Color green darkened darkened. |
|
5416 |
]. |
|
5417 |
continueButton label:(resources string:'Continue'). |
|
5418 |
continueButton action:[self doContinue]. |
|
5419 |
||
5420 |
self processPerform:#stop. |
|
5421 |
||
5422 |
^ self |
|
266 | 5423 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
5424 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
5425 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 5426 |
! |
5427 |
||
5428 |
doTerminate |
|
5429 |
"terminate - the process has a chance for cleanup" |
|
5430 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
5431 |
self checkIfCodeIsReallyModified ifTrue:[ |
15413 | 5432 |
(self confirm:('Code modified - terminate anyway ?')) |
5433 |
ifFalse:[ |
|
5434 |
^ self |
|
5435 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5436 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5437 |
|
266 | 5438 |
inspecting ifTrue:[ |
15413 | 5439 |
self processPerform:#terminate. |
5440 |
^ self |
|
266 | 5441 |
]. |
5442 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
5443 |
steppedContext := wrapperContext := nil. |
266 | 5444 |
haveControl := false. |
10205 | 5445 |
exitAction := #terminate. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5446 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5447 |
"exit private event-loop" |
6365 | 5448 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5449 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5450 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5451 |
inspecting ifFalse:[ |
15413 | 5452 |
'DebugView [warning]: terminate failed' errorPrintCR. |
5453 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
|
5454 |
Debugger newDebugger. |
|
5455 |
Processor activeProcess terminate. |
|
5456 |
] |
|
266 | 5457 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5458 |
terminateButton turnOff. |
477 | 5459 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
5460 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 5461 |
! |
5462 |
||
5463 |
doTrace |
|
5464 |
"tracing - not really implemented ..." |
|
5465 |
||
5466 |
self warn:'this function is not yet implemented'. |
|
5467 |
||
5468 |
"/ |v b| |
|
5469 |
"/ |
|
5470 |
"/ traceView isNil ifTrue:[ |
|
5471 |
"/ v := StandardSystemView on:Display. |
|
5472 |
"/ v label:'Debugger-Trace'. |
|
5473 |
"/ v icon:icon. |
|
5474 |
"/ |
|
5475 |
"/ b := Button label:'untrace' in:v. |
|
5476 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
5477 |
"/ b action:[ |
|
5478 |
"/ StepInterruptPending := nil. |
|
5479 |
"/ tracing := false. |
|
5480 |
"/ v unrealize. |
|
5481 |
"/ traceView := nil |
|
5482 |
"/ ]. |
|
5483 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
5484 |
"/ traceView origin:(0 @ (b height)) |
|
5485 |
"/ extent:[v width @ (v height - b height)] |
|
5486 |
"/ ]. |
|
5487 |
"/ v realize. |
|
5488 |
"/ |
|
5489 |
"/ tracing := true. |
|
5490 |
! |
|
5491 |
||
5492 |
doTraceStep |
|
5493 |
"tracestep - not implemented yet" |
|
5494 |
||
5495 |
canContinue ifTrue:[ |
|
15413 | 5496 |
tracing := true. |
5497 |
self doStep |
|
266 | 5498 |
] |
5499 |
! |
|
5500 |
||
5501 |
exit |
|
5502 |
"exit from menu: immediate exit from smalltalk" |
|
5503 |
||
14129 | 5504 |
OperatingSystem exit:10 |
266 | 5505 |
! |
5506 |
||
13388 | 5507 |
findContextForWhich:aBlock thenDo:additionalAction |
5508 |
|con| |
|
5509 |
||
5510 |
con := self selectedContext. |
|
5511 |
con isNil ifTrue:[^ self]. |
|
5512 |
||
5513 |
con := con sender. |
|
5514 |
[con notNil] whileTrue:[ |
|
15413 | 5515 |
(aBlock value:con) ifTrue:[ |
5516 |
(self selectContext:con) ifTrue:[ |
|
5517 |
additionalAction value:con. |
|
5518 |
^ self. |
|
5519 |
] |
|
5520 |
]. |
|
5521 |
con := con sender. |
|
13388 | 5522 |
]. |
5523 |
||
5524 |
Dialog information:'None found'. |
|
5525 |
! |
|
5526 |
||
5527 |
findContextWithStringInSource |
|
5528 |
|stringToSearch source| |
|
5529 |
||
5530 |
stringToSearch := Dialog request:'Search what:'. |
|
5531 |
stringToSearch isEmptyOrNil ifTrue:[^ self]. |
|
5532 |
||
15413 | 5533 |
self |
5534 |
findContextForWhich:[:con | |
|
5535 |
con method notNil |
|
5536 |
and:[ (source := con method source) notNil |
|
5537 |
and:[ (source includesString:stringToSearch) ]] |
|
5538 |
] |
|
5539 |
thenDo:[:con | |
|
5540 |
codeView searchFwd:stringToSearch. |
|
5541 |
] |
|
13388 | 5542 |
! |
5543 |
||
5544 |
findContextWithValueInVariable |
|
5545 |
|valueStringToSearch| |
|
5546 |
||
5547 |
valueStringToSearch := Dialog request:'Search for a local value whith printString containing:'. |
|
5548 |
valueStringToSearch isEmptyOrNil ifTrue:[^ self]. |
|
5549 |
||
15413 | 5550 |
self |
5551 |
findContextForWhich:[:con | |
|
5552 |
con argsAndVars contains:[:val | val printString asLowercase includesString: valueStringToSearch asLowercase] |
|
5553 |
] |
|
5554 |
thenDo:[:con | ] |
|
13388 | 5555 |
! |
5556 |
||
11595 | 5557 |
findHandlerFor |
13388 | 5558 |
|exClass con| |
11595 | 5559 |
|
15413 | 5560 |
(con := self selectedContext) isNil ifTrue:[ |
5561 |
con := contextArray at:1 |
|
11595 | 5562 |
]. |
5563 |
con sender isNil ifTrue:[ |
|
15413 | 5564 |
self information:'Context has already returned'. |
5565 |
^ self |
|
5566 |
]. |
|
5567 |
||
5568 |
exClass := Dialog |
|
5569 |
choose:'Exception class:' |
|
5570 |
fromList:(GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name]) |
|
5571 |
lines:25 |
|
5572 |
title:'Choose Exception class'. |
|
14523 | 5573 |
exClass isNil ifTrue:[^ self]. |
13388 | 5574 |
|
15413 | 5575 |
self |
5576 |
findContextForWhich:[:con | |
|
5577 |
con isHandleContext |
|
5578 |
and:[ (con receiver handlerForSignal:exClass context:con originator:nil) notNil ] |
|
5579 |
] |
|
5580 |
thenDo:[:con | |
|
5581 |
self selectContext:con sender. |
|
5582 |
] |
|
13388 | 5583 |
! |
5584 |
||
15255 | 5585 |
findHomeContext |
5586 |
|con home| |
|
5587 |
||
5588 |
(con := self selectedContext) isNil ifTrue:[ |
|
15413 | 5589 |
self beep. |
5590 |
^ self. |
|
15255 | 5591 |
]. |
5592 |
(home := con home) isNil ifTrue:[ |
|
15413 | 5593 |
self beep. |
5594 |
^ self. |
|
15255 | 5595 |
]. |
5596 |
||
5597 |
"/ still have to find it - home could be elsewhere (another process) |
|
5598 |
"/ (i.e. cannot simply select it) |
|
5599 |
||
15413 | 5600 |
self |
5601 |
findContextForWhich:[:con | |
|
5602 |
con == home |
|
5603 |
] |
|
5604 |
thenDo:[:con | |
|
5605 |
self selectContext:con. |
|
5606 |
] |
|
15255 | 5607 |
! |
5608 |
||
13388 | 5609 |
findNextExceptionHandlerContext |
15413 | 5610 |
self |
5611 |
findContextForWhich:[:con | |
|
5612 |
con isHandleContext |
|
5613 |
] |
|
5614 |
thenDo:[:con | |
|
5615 |
self selectContext:con sender. |
|
5616 |
] |
|
11595 | 5617 |
! |
5618 |
||
266 | 5619 |
inspectContext |
5620 |
"launch an inspector on the currently selected context" |
|
5621 |
||
11595 | 5622 |
|con| |
5623 |
||
5624 |
(con := self selectedContext) notNil ifTrue:[ |
|
15413 | 5625 |
con inspect. |
266 | 5626 |
] |
11595 | 5627 |
|
5628 |
"Modified: / 17-07-2012 / 12:52:34 / cg" |
|
266 | 5629 |
! |
5630 |
||
15247 | 5631 |
inspectContextsMethod |
5632 |
"launch an inspector on the currently selected context's method" |
|
5633 |
||
5634 |
|con| |
|
5635 |
||
5636 |
(con := self selectedContext) notNil ifTrue:[ |
|
15413 | 5637 |
con method inspect. |
15247 | 5638 |
] |
5639 |
! |
|
5640 |
||
12840 | 5641 |
inspectWidgetHierarchy |
5642 |
|rcvr view| |
|
5643 |
||
5644 |
selectedContext isNil ifTrue:[ ^ self ]. |
|
5645 |
Tools::ViewTreeInspectorApplication isNil ifTrue:[ |
|
15413 | 5646 |
Dialog warn:'Missing class: Tools::ViewTreeInspectorApplication'. |
5647 |
^ self. |
|
12840 | 5648 |
]. |
5649 |
||
5650 |
rcvr := selectedContext receiver. |
|
5651 |
rcvr isView ifTrue:[ |
|
15413 | 5652 |
view := rcvr |
12840 | 5653 |
] ifFalse:[ |
15413 | 5654 |
view := rcvr window |
12840 | 5655 |
]. |
5656 |
Tools::ViewTreeInspectorApplication openOn:view |
|
5657 |
! |
|
5658 |
||
8142 | 5659 |
middleButtonMenu |
5660 |
<resource: #programMenu > |
|
5661 |
||
9488 | 5662 |
|items m nameOfExecutable| |
8142 | 5663 |
|
5664 |
exclusive ifTrue:[ |
|
15413 | 5665 |
items := #( |
5666 |
('Show More WalkBack' showMore ) |
|
5667 |
('-' ) |
|
5668 |
('Add Breakpoint' addBreakpoint ) |
|
5669 |
('Remove Breakpoint' removeBreakpoint ) |
|
5670 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
|
5671 |
('-' ) |
|
5672 |
). |
|
8142 | 5673 |
] ifFalse:[ |
15413 | 5674 |
items := #( |
5675 |
('Show More WalkBack' showMore ) |
|
5676 |
('-' ) |
|
5677 |
('Skip' skip ) |
|
5678 |
('Step Out' skipForReturn ) |
|
5679 |
('Skip until Entering...' skipUntilEntering ) |
|
5680 |
('-' ) |
|
8142 | 5681 |
" |
15413 | 5682 |
('Continue' doContinue ) |
5683 |
('Terminate' doTerminate ) |
|
5684 |
('Abort' doAbort ) |
|
5685 |
('-' ) |
|
5686 |
('Step' doStep ) |
|
5687 |
('Send' doSend ) |
|
5688 |
('-' ) |
|
5689 |
('Return' doReturn ) |
|
5690 |
('Restart' doRestart ) |
|
5691 |
('-' ) |
|
8142 | 5692 |
" |
15413 | 5693 |
('Add Breakpoint' addBreakpoint ) |
5694 |
('Remove Breakpoint' removeBreakpoint ) |
|
5695 |
('Remove all Break- & Tracepoints' removeAllBreakpoints ) |
|
5696 |
). |
|
11210 | 5697 |
|
12840 | 5698 |
"/ self allowBreakPointsInDebugger ifFalse:[ |
5699 |
"/ items := items , #( |
|
5700 |
"/ ('Allow Breakpoints & halt in Debugger' doNotIgnoreBreakpoints ) |
|
5701 |
"/ ). |
|
5702 |
"/ ] ifTrue:[ |
|
5703 |
"/ items := items , #( |
|
5704 |
"/ ('Ignore Breakpoints & halt in Debugger' doIgnoreBreakpoints ) |
|
5705 |
"/ ). |
|
5706 |
"/ ]. |
|
11210 | 5707 |
|
15413 | 5708 |
items := items , #( |
5709 |
('-' ) |
|
5710 |
('Browse Implementing Class' browseImplementingClass ) |
|
5711 |
('Browse Receiver''s Class' browseReceiversClass ) |
|
5712 |
('Browse Blocks''s Home' browseBlocksHome ) |
|
11610 | 5713 |
"/ ('Browse Receivers Class Hierarchy' browseClassHierarchy ) |
5714 |
"/ ('Browse Receivers Full Protocol' browseFullClassProtocol ) |
|
15413 | 5715 |
('Implementors' browseImplementors ) |
5716 |
('Implementors Of...' browseImplementorsOf ) |
|
5717 |
('Senders' browseSenders ) |
|
5718 |
('Senders Of...' browseSendersOf ) |
|
5719 |
('-' ) |
|
5720 |
('Inspect Context' inspectContext ) |
|
5721 |
). |
|
8142 | 5722 |
]. |
5723 |
||
9488 | 5724 |
items := items , #( |
15413 | 5725 |
('Copy WalkBack Text' copyWalkbackText ) |
5726 |
('-' ) |
|
5727 |
('Hard Terminate (Danger)' quickTerminate ) |
|
5728 |
('=' )). |
|
9488 | 5729 |
|
5730 |
nameOfExecutable := OperatingSystem nameOfSTXExecutable asFilename withoutSuffix baseName. |
|
5731 |
nameOfExecutable = 'stx' ifTrue:[ nameOfExecutable := 'Smalltalk' ]. |
|
5732 |
||
5733 |
items := items , { |
|
15413 | 5734 |
{ 'Exit %1 (No Confirmation)' bindWith:nameOfExecutable. #exit }}. |
10205 | 5735 |
|
5736 |
m := PopUpMenu |
|
15413 | 5737 |
itemList:items |
5738 |
resources:resources |
|
5739 |
receiver:self |
|
5740 |
for:contextView. |
|
8142 | 5741 |
|
5742 |
inspecting ifTrue:[ |
|
15413 | 5743 |
m notNil ifTrue:[ |
5744 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
|
5745 |
browseClassHierarchy browseFullClassProtocol |
|
5746 |
browseImplementors browseSenders browseBlocksHome inspectContext skip doStepOut). |
|
5747 |
]. |
|
8142 | 5748 |
]. |
5749 |
self updateMenuItems. |
|
5750 |
||
5751 |
^ m. |
|
9488 | 5752 |
|
13210 | 5753 |
"Modified: / 22-07-2013 / 15:30:05 / cg" |
8142 | 5754 |
! |
5755 |
||
15257 | 5756 |
notShowingDenseWalkbackHolder |
5757 |
^ BlockValue forLogicalNot: self showingDenseWalkbackHolder. |
|
5758 |
! |
|
5759 |
||
11573 | 5760 |
notShowingSupportCode |
5761 |
^ hideSupportCode == true. |
|
5762 |
||
5763 |
"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
|
5764 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5765 |
|
3447 | 5766 |
openAboutThisApplication |
5767 |
"opens an about box for this application." |
|
5768 |
||
7112 | 5769 |
Dialog aboutClass:self class. |
5770 |
||
5771 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 5772 |
! |
5773 |
||
8620 | 5774 |
openSettingsDialog |
14559 | 5775 |
|settingsList| |
8620 | 5776 |
|
10205 | 5777 |
settingsList := |
15413 | 5778 |
#( |
5779 |
#('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
5780 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
5781 |
#('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
5782 |
#('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
5783 |
). |
|
5784 |
||
5785 |
SettingsDialog |
|
5786 |
openWithList:settingsList |
|
5787 |
label:(resources string:'Debugger Settings'). |
|
8620 | 5788 |
! |
5789 |
||
13488 | 5790 |
processesApplication |
5791 |
"if the debugged process is a GUI process, |
|
5792 |
AND it has an applicaiton, return it. |
|
5793 |
Otherwise, return nil" |
|
5794 |
||
14430 | 5795 |
|p wgs app nonModalWGs| |
13488 | 5796 |
|
5797 |
p := inspectedProcess ? Processor activeProcess. |
|
5798 |
(p notNil and:[p isGUIProcess]) ifTrue:[ |
|
15413 | 5799 |
wgs := WindowGroup scheduledWindowGroups select:[:wg | wg process == p]. |
5800 |
nonModalWGs := wgs reject:[:wg | wg isModal]. |
|
5801 |
nonModalWGs notEmpty ifTrue:[^ nonModalWGs first application]. |
|
5802 |
||
5803 |
wgs do:[:wg | |
|
5804 |
|wgi| |
|
5805 |
||
5806 |
wgi := wg. |
|
5807 |
[wgi notNil] whileTrue:[ |
|
5808 |
(app := wgi application) notNil ifTrue:[^ app]. |
|
5809 |
wgi isModal ifTrue:[ |
|
5810 |
wgi := wgi previousGroup |
|
5811 |
] ifFalse:[ |
|
5812 |
wgi := nil. |
|
5813 |
] |
|
5814 |
] |
|
5815 |
] |
|
13488 | 5816 |
]. |
5817 |
^ nil |
|
5818 |
! |
|
5819 |
||
266 | 5820 |
quickTerminate |
5821 |
"quick terminate - the process will get no chance for cleanup actions" |
|
5822 |
||
5823 |
inspecting ifTrue:[ |
|
15413 | 5824 |
self processPerform:#terminateNoSignal. |
5825 |
^ self |
|
266 | 5826 |
]. |
5827 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
5828 |
steppedContext := wrapperContext := nil. |
266 | 5829 |
haveControl := false. |
5830 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5831 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5832 |
"exit private event-loop" |
6365 | 5833 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5834 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5835 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5836 |
inspecting ifFalse:[ |
15413 | 5837 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
5838 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
5839 |
Debugger newDebugger. |
|
5840 |
Processor activeProcess terminateNoSignal. |
|
5841 |
] |
|
266 | 5842 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
5843 |
terminateButton turnOff. |
477 | 5844 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
5845 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 5846 |
! |
5847 |
||
11391 | 5848 |
rememberCallchain |
5849 |
"remember the callchain in a classvar. |
|
5850 |
When entered the next time, highlight already entered contexts. |
|
5851 |
This makes it possible to identitfy the caller as the first common context |
|
5852 |
along the chain (i.e. the context which is responsible for the debugger to be entered)" |
|
5853 |
||
5854 |
RememberedCallChain := contextArray copy |
|
5855 |
||
5856 |
"Created: / 07-03-2012 / 23:07:07 / cg" |
|
5857 |
! |
|
5858 |
||
13388 | 5859 |
selectContext:aContext |
5860 |
|idx| |
|
5861 |
||
5862 |
idx := contextArray identityIndexOf:aContext. |
|
5863 |
idx == 0 ifTrue:[ |
|
15413 | 5864 |
"/ some contexts hidden? |
5865 |
(self showingDenseWalkback or:[self showingSupportCode not]) ifTrue:[ |
|
5866 |
Dialog information:'Context is hidden - disabling the "hideSupportCode" option (see view menu)'. |
|
5867 |
self showFullWalkback. |
|
5868 |
self showingDenseWalkback:false. |
|
5869 |
self showingSupportCode:true. |
|
5870 |
]. |
|
5871 |
idx := contextArray identityIndexOf:aContext. |
|
13388 | 5872 |
]. |
5873 |
idx ~~ 0 ifTrue:[ |
|
15413 | 5874 |
self selectContextWithIndex:idx. |
5875 |
^ true. |
|
13388 | 5876 |
]. |
5877 |
^ false |
|
5878 |
! |
|
5879 |
||
11595 | 5880 |
selectedContext |
15960 | 5881 |
|selIdx| |
5882 |
||
5883 |
(selIdx := contextView selection) notNil ifTrue:[ |
|
5884 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
|
5885 |
^ (contextArray at:selIdx). |
|
5886 |
] |
|
11595 | 5887 |
]. |
5888 |
^ nil |
|
5889 |
||
5890 |
"Created: / 17-07-2012 / 12:52:10 / cg" |
|
5891 |
! |
|
5892 |
||
11647 | 5893 |
showFullWalkback |
5894 |
"double the number of contexts shown" |
|
5895 |
||
5896 |
contextArray notNil ifTrue:[ |
|
15413 | 5897 |
nChainShown := 9999. |
5898 |
self redisplayBacktrace. |
|
11647 | 5899 |
] |
5900 |
||
5901 |
"Created: / 23-07-2012 / 12:24:02 / cg" |
|
5902 |
! |
|
5903 |
||
266 | 5904 |
showMore |
3447 | 5905 |
"double the number of contexts shown" |
266 | 5906 |
|
5907 |
contextArray notNil ifTrue:[ |
|
15413 | 5908 |
nChainShown := nChainShown * 2. |
5909 |
self redisplayBacktrace. |
|
266 | 5910 |
] |
563 | 5911 |
|
3447 | 5912 |
"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
|
5913 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
5914 |
|
11573 | 5915 |
showSupportCode |
5916 |
hideSupportCode := false. |
|
5917 |
self redisplayBacktrace. |
|
5918 |
||
5919 |
"Created: / 10-06-2012 / 21:27:53 / cg" |
|
5920 |
! |
|
5921 |
||
3447 | 5922 |
showingDenseWalkback |
15257 | 5923 |
^ self verboseBacktraceHolder value not |
3447 | 5924 |
|
5925 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
5926 |
! |
|
5927 |
||
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5928 |
showingDenseWalkback:aBoolean |
15257 | 5929 |
self verboseBacktraceHolder value:aBoolean not. |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5930 |
self redisplayBacktrace. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5931 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5932 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5933 |
! |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5934 |
|
15257 | 5935 |
showingDenseWalkbackHolder |
5936 |
^ BlockValue forLogicalNot:self verboseBacktraceHolder |
|
5937 |
! |
|
5938 |
||
11573 | 5939 |
showingSupportCode |
5940 |
^ hideSupportCode == false. |
|
5941 |
||
5942 |
"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
|
5943 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5944 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5945 |
showingSupportCode:aBoolean |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5946 |
hideSupportCode := aBoolean not. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5947 |
self redisplayBacktrace. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5948 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5949 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5950 |
! |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5951 |
|
3447 | 5952 |
showingVerboseWalkback |
15257 | 5953 |
^ self verboseBacktraceHolder value |
3447 | 5954 |
|
5955 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
5956 |
! |
|
5957 |
||
9626 | 5958 |
sizeChanged:how |
10205 | 5959 |
super sizeChanged:how. |
9626 | 5960 |
LastExtent := self extent. |
5961 |
||
5962 |
"Created: / 10-11-2010 / 09:08:41 / cg" |
|
5963 |
! |
|
5964 |
||
266 | 5965 |
skip |
5966 |
"skip for cursor line in selected method" |
|
5967 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5968 |
stepHow := #skip. |
266 | 5969 |
self doStep:codeView cursorLine. |
790 | 5970 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5971 |
"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
|
5972 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5973 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5974 |
skipForReturn |
2581 | 5975 |
"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
|
5976 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5977 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5978 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5979 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5980 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 5981 |
! |
5982 |
||
5983 |
skipUntilEntering |
|
5984 |
"skip until some particular method is invoked." |
|
5985 |
||
5986 |
|selector| |
|
5987 |
||
10205 | 5988 |
selector := Dialog |
15413 | 5989 |
request:'Skip until entering what (matchpattern):' |
5990 |
initialAnswer:self goodSkipUntilSelector. |
|
2581 | 5991 |
selector size == 0 ifTrue:[^ self]. |
5992 |
||
5993 |
stepUntilEntering := selector asSymbol. |
|
5994 |
stepHow := #send. |
|
5995 |
self doStep:-1. |
|
5996 |
||
5997 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 5998 |
! |
5999 |
||
11573 | 6000 |
toggleShowSupportCode |
6001 |
hideSupportCode ifTrue:[ |
|
15413 | 6002 |
self showSupportCode |
11645
4f39a925956d
changed: #toggleShowSupportCode
Stefan Vogel <sv@exept.de>
parents:
11636
diff
changeset
|
6003 |
] ifFalse:[ |
15413 | 6004 |
self hideSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6005 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6006 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6007 |
"Modified: / 17-11-2001 / 20:07:45 / cg" |
11573 | 6008 |
"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
|
6009 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6010 |
|
3447 | 6011 |
toggleVerboseWalkback |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6012 |
self showingDenseWalkback:(self showingDenseWalkback not) |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6013 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6014 |
"Modified: / 27-07-2012 / 15:00:15 / cg" |
11610 | 6015 |
! |
6016 |
||
6017 |
updateMenuItems |
|
13408 | 6018 |
"enable/disable some menu items, depending on the current selected context" |
6019 |
||
11610 | 6020 |
|m mthd cls mCls rCls| |
6021 |
||
6022 |
m := contextView middleButtonMenu. |
|
6023 |
m notNil ifTrue:[ |
|
15413 | 6024 |
m disable:#removeBreakpoint. |
6025 |
m disable:#addBreakpoint. |
|
6026 |
canShowMore ifFalse:[ |
|
6027 |
m disable:#showMore |
|
6028 |
]. |
|
6029 |
||
6030 |
selectedContext notNil ifTrue:[ |
|
6031 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
6032 |
||
6033 |
mthd := selectedContext method. |
|
6034 |
mthd notNil ifTrue:[ |
|
6035 |
cls := mCls := mthd containingClass. |
|
6036 |
mthd isBreakpointed ifTrue:[ |
|
6037 |
m enable:#removeBreakpoint. |
|
6038 |
] ifFalse:[ |
|
6039 |
m enable:#addBreakpoint. |
|
6040 |
] |
|
6041 |
]. |
|
6042 |
(selectedContext isBlockContext and:[selectedContext home isNil]) ifTrue:[ |
|
6043 |
"/ a cheap block's context |
|
6044 |
] ifFalse:[ |
|
6045 |
rCls := selectedContext receiver class. |
|
6046 |
cls isNil ifTrue:[ |
|
6047 |
cls := rCls |
|
6048 |
]. |
|
6049 |
]. |
|
6050 |
cls notNil ifTrue:[ |
|
6051 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
6052 |
rCls == mCls ifTrue:[ |
|
6053 |
m disable:#browseReceiversClass |
|
6054 |
]. |
|
6055 |
mCls isNil ifTrue:[ |
|
6056 |
m disable:#browseImplementingClass |
|
6057 |
] |
|
6058 |
||
6059 |
] ifFalse:[ |
|
6060 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
6061 |
]. |
|
6062 |
mthd notNil ifTrue:[ |
|
6063 |
m enableAll:#(browseImplementingClass). |
|
6064 |
]. |
|
6065 |
selectedContext isCheapBlockContext ifTrue:[ |
|
6066 |
m disableAll:#(browseReceiversClass). |
|
6067 |
]. |
|
6068 |
selectedContext receiver isBlock ifTrue:[ |
|
6069 |
m enableAll:#(browseBlocksHome). |
|
6070 |
] ifFalse:[ |
|
6071 |
m disableAll:#(browseBlocksHome). |
|
6072 |
]. |
|
6073 |
] ifFalse:[ |
|
6074 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy |
|
6075 |
browseBlocksHome browseFullClassProtocol). |
|
6076 |
] |
|
11610 | 6077 |
] |
6078 |
||
6079 |
"Modified: / 19-07-2012 / 11:53:30 / cg" |
|
266 | 6080 |
! ! |
6081 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6082 |
!DebugView methodsFor:'menu & button actions-breakpoints'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6083 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6084 |
addBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6085 |
"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
|
6086 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6087 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6088 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6089 |
selectedContext isNil ifTrue:[ |
15413 | 6090 |
^ self showError:'** select a context first **' |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6091 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6092 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
15413 | 6093 |
^ self |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6094 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6095 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6096 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6097 |
implementorClass notNil ifTrue:[ |
15413 | 6098 |
method := implementorClass compiledMethodAt:selectedContext selector. |
6099 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
|
6100 |
method setBreakPoint |
|
6101 |
] |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6102 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6103 |
contextView middleButtonMenu disable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6104 |
contextView middleButtonMenu enable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6105 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6106 |
"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
|
6107 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6108 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6109 |
allowBreakPointsInDebugger |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6110 |
^ ignoreBreakpoints not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6111 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6112 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6113 |
allowBreakPointsInDebugger:aBoolean |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6114 |
ignoreBreakpoints := aBoolean not. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6115 |
self initializeMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6116 |
self initializeContextViewsMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6117 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6118 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6119 |
doIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6120 |
self allowBreakPointsInDebugger:false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6121 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6122 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6123 |
doNotIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6124 |
self allowBreakPointsInDebugger:true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6125 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6126 |
|
14680 | 6127 |
ignoreAllHaltsForCurrentProcess |
15413 | 6128 |
self |
6129 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
6130 |
orThisReceiverClass:false orCurrentProcess:true |
|
6131 |
orIfCalledFromMethod:nil |
|
6132 |
forAll:true. |
|
14680 | 6133 |
|
6134 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
|
6135 |
! |
|
6136 |
||
6137 |
ignoreAllHaltsForThisReceiverClass |
|
15413 | 6138 |
self |
6139 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
6140 |
orThisReceiverClass:true orCurrentProcess:false |
|
6141 |
orIfCalledFromMethod:nil |
|
6142 |
forAll:true. |
|
14680 | 6143 |
|
6144 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
|
6145 |
! |
|
6146 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6147 |
ignoreAllHaltsForever |
15413 | 6148 |
self |
6149 |
addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false |
|
6150 |
orThisReceiverClass:false orCurrentProcess:false |
|
6151 |
orIfCalledFromMethod:nil |
|
6152 |
forAll:true. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6153 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6154 |
"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
|
6155 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6156 |
|
14680 | 6157 |
ignoreAllHaltsIfCalledFromMethod:aMethod |
15413 | 6158 |
self |
6159 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
6160 |
orThisReceiverClass:false orCurrentProcess:false |
|
6161 |
orIfCalledFromMethod:aMethod |
|
6162 |
forAll:true. |
|
14680 | 6163 |
! |
6164 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6165 |
ignoreAllHaltsUntilShiftKeyIsPressed |
15413 | 6166 |
self |
6167 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true |
|
6168 |
orThisReceiverClass:false orCurrentProcess:false |
|
6169 |
orIfCalledFromMethod:nil |
|
6170 |
forAll:true. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6171 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6172 |
"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
|
6173 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6174 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6175 |
ignoreBreakpointsWithThisParameterForever |
11370 | 6176 |
Object disableBreakPoint:breakPointParameter. |
6177 |
"/ self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
|
6178 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6179 |
"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
|
6180 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6181 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6182 |
ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
15413 | 6183 |
self |
6184 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true |
|
6185 |
orThisReceiverClass:false orCurrentProcess:false |
|
6186 |
orIfCalledFromMethod:nil |
|
6187 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6188 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6189 |
"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
|
6190 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6191 |
|
12937 | 6192 |
ignoreHaltForCurrentProcess |
15413 | 6193 |
self |
6194 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
6195 |
orThisReceiverClass:false orCurrentProcess:true |
|
6196 |
orIfCalledFromMethod:nil |
|
6197 |
forAll:false. |
|
12937 | 6198 |
|
6199 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
|
6200 |
! |
|
6201 |
||
6202 |
ignoreHaltForThisReceiverClass |
|
15413 | 6203 |
self |
6204 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
6205 |
orThisReceiverClass:true orCurrentProcess:false |
|
6206 |
orIfCalledFromMethod:nil |
|
6207 |
forAll:false. |
|
12937 | 6208 |
|
6209 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
|
6210 |
! |
|
6211 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6212 |
ignoreHaltForever |
15413 | 6213 |
self |
6214 |
addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false |
|
6215 |
orThisReceiverClass:false orCurrentProcess:false |
|
6216 |
orIfCalledFromMethod:nil |
|
6217 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6218 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6219 |
"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
|
6220 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6221 |
|
14608 | 6222 |
ignoreHaltIfCalledFromMethod:aMethod |
15413 | 6223 |
self |
6224 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false |
|
6225 |
orThisReceiverClass:false orCurrentProcess:false |
|
6226 |
orIfCalledFromMethod:aMethod |
|
6227 |
forAll:false. |
|
14608 | 6228 |
! |
6229 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6230 |
ignoreHaltUntilShiftKeyIsPressed |
15413 | 6231 |
self |
6232 |
addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true |
|
6233 |
orThisReceiverClass:false orCurrentProcess:false |
|
6234 |
orIfCalledFromMethod:nil |
|
6235 |
forAll:false. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6236 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6237 |
"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
|
6238 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6239 |
|
14680 | 6240 |
menuForIgnoreAllBreakpointsIfCalledFromAnyOf |
6241 |
<resource: #programMenu > |
|
6242 |
||
6243 |
^ self menuForIgnoreBreakpointIfCalledFromAnyOfForAll:true |
|
6244 |
! |
|
6245 |
||
14608 | 6246 |
menuForIgnoreBreakpointIfCalledFromAnyOf |
6247 |
<resource: #programMenu > |
|
6248 |
||
14680 | 6249 |
^ self menuForIgnoreBreakpointIfCalledFromAnyOfForAll:false |
6250 |
! |
|
6251 |
||
6252 |
menuForIgnoreBreakpointIfCalledFromAnyOfForAll:forAllHaltsBoolean |
|
6253 |
<resource: #programMenu > |
|
6254 |
||
14608 | 6255 |
|m count already| |
6256 |
||
6257 |
m := Menu new. |
|
6258 |
count := 0. |
|
6259 |
already := IdentitySet new. |
|
6260 |
||
6261 |
contextArray do:[:con | |
|
15413 | 6262 |
|mthd cls sel| |
6263 |
||
6264 |
mthd := con method. |
|
6265 |
mthd notNil ifTrue:[ |
|
6266 |
mthd isWrapped ifFalse:[ |
|
6267 |
(already includes:already) ifFalse:[ |
|
6268 |
already add:mthd. |
|
6269 |
m addItem:(MenuItem |
|
6270 |
label: (mthd whoString) |
|
6271 |
itemValue: [ forAllHaltsBoolean |
|
6272 |
ifTrue:[self ignoreHaltIfCalledFromMethod:mthd] |
|
6273 |
ifFalse:[self ignoreAllHaltsIfCalledFromMethod:mthd] |
|
6274 |
] |
|
6275 |
translateLabel: false). |
|
6276 |
count := count + 1. |
|
6277 |
(count > 20) ifTrue:[ |
|
6278 |
^ m |
|
6279 |
]. |
|
6280 |
] |
|
6281 |
] |
|
6282 |
] |
|
14608 | 6283 |
]. |
6284 |
^ m |
|
6285 |
! |
|
6286 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6287 |
openBreakPointBrowser |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6288 |
Tools::BreakpointBrowser open |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6289 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6290 |
"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
|
6291 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6292 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6293 |
openIgnoreAllHaltsUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6294 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6295 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6296 |
[ |
15413 | 6297 |
answer := Dialog |
6298 |
request:(resources string:'How long should all halts/breakpoints be ignored [smh] ?') |
|
6299 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
|
6300 |
answer isEmptyOrNil ifTrue:[^ self]. |
|
6301 |
||
6302 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
|
6303 |
dT notNil ifTrue:[ |
|
6304 |
LastIgnoreHaltDuration := dT. |
|
6305 |
self |
|
6306 |
addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false |
|
6307 |
orThisReceiverClass:false orCurrentProcess:false |
|
6308 |
orIfCalledFromMethod:nil |
|
6309 |
forAll:true. |
|
6310 |
^ self. |
|
6311 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6312 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6313 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6314 |
"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
|
6315 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6316 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6317 |
openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6318 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6319 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6320 |
[ |
15413 | 6321 |
answer := Dialog |
6322 |
request:(resources |
|
6323 |
string:'How often should breakpoints with parameter "%1" be ignored ?' |
|
6324 |
with:breakPointParameter) |
|
6325 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
|
6326 |
answer isEmptyOrNil ifTrue:[^ self]. |
|
6327 |
||
6328 |
n := Integer readFrom:answer onError:nil. |
|
6329 |
n notNil ifTrue:[ |
|
6330 |
LastIgnoreHaltNTimes := n. |
|
6331 |
self |
|
6332 |
addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false |
|
6333 |
orThisReceiverClass:false orCurrentProcess:false |
|
6334 |
orIfCalledFromMethod:nil |
|
6335 |
forAll:false. |
|
6336 |
^ self. |
|
6337 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6338 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6339 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6340 |
"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
|
6341 |
"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
|
6342 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6343 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6344 |
openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6345 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6346 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6347 |
[ |
15413 | 6348 |
answer := Dialog |
6349 |
request:(resources |
|
6350 |
string:'How long should breakpoints with parameter "%1" be ignored (s/m/h) ?' |
|
6351 |
with:breakPointParameter) |
|
6352 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
|
6353 |
answer isEmptyOrNil ifTrue:[^ self]. |
|
6354 |
||
6355 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
|
6356 |
dT notNil ifTrue:[ |
|
6357 |
LastIgnoreHaltDuration := dT. |
|
6358 |
self |
|
6359 |
addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false |
|
6360 |
orThisReceiverClass:false orCurrentProcess:false |
|
6361 |
orIfCalledFromMethod:nil |
|
6362 |
forAll:false. |
|
6363 |
^ self. |
|
6364 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6365 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6366 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6367 |
"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
|
6368 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6369 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6370 |
openIgnoreHaltNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6371 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6372 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6373 |
[ |
15413 | 6374 |
answer := Dialog |
6375 |
request:(resources string:'How often should this halt be ignored ?') |
|
6376 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
|
6377 |
answer isEmptyOrNil ifTrue:[^ self]. |
|
6378 |
||
6379 |
n := Integer readFrom:answer onError:nil. |
|
6380 |
n notNil ifTrue:[ |
|
6381 |
LastIgnoreHaltNTimes := n. |
|
6382 |
self |
|
6383 |
addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false |
|
6384 |
orThisReceiverClass:false orCurrentProcess:false |
|
6385 |
orIfCalledFromMethod:nil |
|
6386 |
forAll:false. |
|
6387 |
^ self. |
|
6388 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6389 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6390 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6391 |
"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
|
6392 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6393 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6394 |
openIgnoreHaltUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6395 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6396 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6397 |
[ |
15413 | 6398 |
answer := Dialog |
6399 |
request:(resources string:'How long should this halt/breakpoint be ignored (s/m/h) ?') |
|
6400 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
|
6401 |
answer isEmptyOrNil ifTrue:[^ self]. |
|
6402 |
||
6403 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
|
6404 |
dT notNil ifTrue:[ |
|
6405 |
LastIgnoreHaltDuration := dT. |
|
6406 |
self |
|
6407 |
addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false |
|
6408 |
orThisReceiverClass:false orCurrentProcess:false |
|
6409 |
orIfCalledFromMethod:nil |
|
6410 |
forAll:false. |
|
6411 |
^ self. |
|
6412 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6413 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6414 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6415 |
"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
|
6416 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6417 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6418 |
removeAllBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6419 |
"remove all trace & breakpoints - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6420 |
|
14532 | 6421 |
self withExecuteCursorDo:[ |
15413 | 6422 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
6423 |
MessageTracer unwrapAllMethods |
|
6424 |
]. |
|
6425 |
(MethodWithBreakpoints notNil and:[MethodWithBreakpoints isLoaded]) ifTrue:[ |
|
6426 |
MethodWithBreakpoints removeAllBreakpoints |
|
6427 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6428 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6429 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6430 |
"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
|
6431 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6432 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6433 |
removeBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6434 |
"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
|
6435 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6436 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6437 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6438 |
selectedContext isNil ifTrue:[ |
15413 | 6439 |
^ self showError:'** select a context first **' |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6440 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6441 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
15413 | 6442 |
^ self |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6443 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6444 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6445 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6446 |
implementorClass notNil ifTrue:[ |
15413 | 6447 |
method := implementorClass compiledMethodAt:selectedContext selector. |
6448 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
|
6449 |
method clearBreakPoint |
|
6450 |
] |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6451 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6452 |
contextView middleButtonMenu disable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6453 |
contextView middleButtonMenu enable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6454 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6455 |
"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
|
6456 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6457 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6458 |
stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6459 |
self class stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6460 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6461 |
|
266 | 6462 |
!DebugView methodsFor:'private'! |
6463 |
||
6487 | 6464 |
abortAllIsHandled |
9750 | 6465 |
^ AbortAllOperationWantedQuery query |
6466 |
||
6467 |
"Modified: / 09-02-2011 / 13:53:13 / cg" |
|
6487 | 6468 |
! |
6469 |
||
266 | 6470 |
busy |
6471 |
^ busy |
|
6472 |
! |
|
6473 |
||
6474 |
exclusive:aBoolean |
|
6475 |
exclusive := aBoolean |
|
6476 |
! |
|
6477 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6478 |
explainSelection |
8212 | 6479 |
|interval crsrPos| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6480 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6481 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6482 |
interval isEmpty ifTrue:[ |
15413 | 6483 |
crsrPos := codeView characterPositionOfCursor. |
6484 |
codeView characterUnderCursor isSeparator ifTrue:[ |
|
6485 |
crsrPos := (crsrPos - 1) max:1 |
|
6486 |
]. |
|
6487 |
interval := crsrPos to:crsrPos. |
|
10205 | 6488 |
]. |
6489 |
self |
|
15413 | 6490 |
withNodeValueAtInterval:interval |
6491 |
do:[:value :description | |
|
6492 |
self showValue:value |
|
6493 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6494 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6495 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6496 |
findNodeForInterval:interval |
8212 | 6497 |
|source| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6498 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6499 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6500 |
|
8487
ddf59247960c
slow runArray (text) operations
Claus Gittinger <cg@exept.de>
parents:
8432
diff
changeset
|
6501 |
source := codeView contentsAsString string. |
10205 | 6502 |
"/ source := currentMethod notNil |
6503 |
"/ ifTrue:[ currentMethod source ] |
|
8396 | 6504 |
"/ ifFalse:[ codeView contents asString ]. |
8257
106d3fecbca0
findNodeForInterval: care for nonexisting source
Claus Gittinger <cg@exept.de>
parents:
8225
diff
changeset
|
6505 |
source isNil ifTrue:[^ nil]. |
8214 | 6506 |
|
8212 | 6507 |
^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string) allowErrors:true. |
6508 |
"/ ^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string). |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6509 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6510 |
|
7912 | 6511 |
findNodeIn:tree forInterval:interval |
6512 |
<resource: #obsolete> |
|
10205 | 6513 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6514 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6515 |
|
7912 | 6516 |
self obsoleteMethodWarning. |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6517 |
node := nil. |
10205 | 6518 |
tree nodesDo:[:each | |
15413 | 6519 |
(each intersectsInterval:interval) ifTrue:[ |
6520 |
(node isNil or:[node == each parent]) ifTrue:[ |
|
6521 |
node := each |
|
6522 |
] ifFalse:[ |
|
6523 |
(node parent notNil |
|
6524 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
|
6525 |
] |
|
6526 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6527 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6528 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6529 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6530 |
|
2581 | 6531 |
goodSkipUntilSelector |
6532 |
|current| |
|
6533 |
||
6534 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
6535 |
selectedContext isNil ifTrue:[^ nil]. |
|
6536 |
current := selectedContext selector. |
|
6537 |
current isNil ifTrue:[^ nil]. |
|
6538 |
('change:*' match:current) ifTrue:[ |
|
15413 | 6539 |
^ 'update:*' |
2581 | 6540 |
]. |
6541 |
^ nil |
|
6542 |
! |
|
6543 |
||
8179 | 6544 |
haltSelectors |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6545 |
^ #( #'halt' #'halt:' #'breakPoint:' #'breakPoint:info:' #'break'). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6546 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6547 |
"Modified (format): / 27-01-2012 / 11:10:00 / cg" |
8179 | 6548 |
! |
6549 |
||
266 | 6550 |
interruptProcessWith:aBlock |
6551 |
"let inspected process do something, then update the context list" |
|
6552 |
||
6553 |
inspectedProcess isDead ifTrue:[ |
|
15413 | 6554 |
self showTerminated. |
6555 |
^ self |
|
266 | 6556 |
]. |
6557 |
inspectedProcess interruptWith:aBlock. |
|
6558 |
" |
|
6559 |
give the process a chance to run, then update |
|
6560 |
" |
|
6561 |
(Delay forSeconds:0.2) wait. |
|
6562 |
self setContext:(inspectedProcess suspendedContext). |
|
6563 |
! |
|
6564 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6565 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6566 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6567 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
6568 |
|
8194 | 6569 |
openHTMLDocument: anHTMLFilename |
6570 |
"open a HTMLDocumentView on anHTMLFilename" |
|
6571 |
||
6572 |
HTMLDocumentView openFullOnDocumentationFile: anHTMLFilename |
|
6573 |
! |
|
6574 |
||
266 | 6575 |
processPerform:aMessage |
6576 |
"do something, then update the context list" |
|
6577 |
||
6578 |
inspectedProcess isDead ifTrue:[ |
|
15413 | 6579 |
self showTerminated. |
6580 |
^ self |
|
266 | 6581 |
]. |
6582 |
inspectedProcess perform:aMessage. |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
6583 |
|
266 | 6584 |
" |
6585 |
give the process a chance to run, then update |
|
6586 |
" |
|
6587 |
(Delay forSeconds:0.2) wait. |
|
6588 |
self setContext:(inspectedProcess suspendedContext). |
|
6589 |
! |
|
6590 |
||
939 | 6591 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6592 |
"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
|
6593 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6594 |
|
939 | 6595 |
|oldSelection oldContext con idx| |
6596 |
||
6597 |
contextArray notNil ifTrue:[ |
|
15413 | 6598 |
self withExecuteCursorDo:[ |
6599 |
oldSelection := contextView selection. |
|
6600 |
oldSelection notNil ifTrue:[ |
|
6601 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
6602 |
]. |
|
6603 |
||
6604 |
con := firstContext. |
|
950 | 6605 |
"/ con := contextArray at:1. |
15413 | 6606 |
"/ force redeisplay, even if same by changing the first entry |
6607 |
contextArray size > 0 ifTrue:[ |
|
6608 |
contextArray at:1 put:nil. |
|
6609 |
]. |
|
6610 |
self setContext:con. |
|
6611 |
||
6612 |
oldContext isNil ifTrue:[ |
|
6613 |
idx := oldSelection |
|
6614 |
] ifFalse:[ |
|
6615 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
6616 |
]. |
|
6617 |
contextView setSelection:idx. |
|
6618 |
idx notNil ifTrue:[ |
|
6619 |
self showSelection:idx |
|
6620 |
] |
|
6621 |
] |
|
939 | 6622 |
] |
6623 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6624 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 6625 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 6626 |
! |
6627 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6628 |
selectedInterval |
7912 | 6629 |
^ codeView selectedInterval |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6630 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6631 |
|
7823 | 6632 |
showError:message |
6633 |
codeView contents:(resources string:message). |
|
6634 |
shown ifTrue:[ |
|
15413 | 6635 |
exclusive ifTrue:[ |
6636 |
"/ consider this a kludge: |
|
6637 |
"/ if exclusive, cannot use flash, since it suspends |
|
6638 |
"/ (but we cannot suspend here ...) |
|
6639 |
codeView redrawInverted. self flush. |
|
6640 |
OperatingSystem millisecondDelay:200. |
|
6641 |
codeView redraw |
|
6642 |
] ifFalse:[ |
|
6643 |
codeView flash |
|
6644 |
] |
|
7823 | 6645 |
] |
6646 |
||
6647 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
|
6648 |
! |
|
6649 |
||
6650 |
showTerminated |
|
6651 |
self showError:'** the process has terminated **' |
|
6652 |
! |
|
6653 |
||
6654 |
showValue:aValue |
|
6655 |
"/ TODO: show value in info field |
|
6656 |
"/ Transcript showCR:aValue printString |
|
6657 |
! |
|
6658 |
||
10205 | 6659 |
stepping |
6660 |
^ stepping |
|
6661 |
! |
|
6662 |
||
6663 |
unstep |
|
7823 | 6664 |
stepping := false. |
6665 |
bigStep := false. |
|
6666 |
steppedContext := wrapperContext := nil. |
|
6667 |
exitAction := nil |
|
6668 |
||
6669 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
|
6670 |
! |
|
6671 |
||
10203 | 6672 |
updateButtonsAndMenuItemsForContext:aContext |
6673 |
|m| |
|
6674 |
||
6675 |
m := contextView middleButtonMenu. |
|
6676 |
m notNil ifTrue:[ |
|
15413 | 6677 |
self updateMenuItems. |
6678 |
||
6679 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
|
6680 |
abortButton enable. |
|
6681 |
m enable:#doAbort. |
|
6682 |
] ifFalse:[ |
|
6683 |
abortButton disable. |
|
6684 |
m disable:#doAbort. |
|
6685 |
]. |
|
6686 |
exclusive ifTrue:[ |
|
6687 |
terminateButton disable. |
|
6688 |
m disable:#doTerminate. |
|
6689 |
] ifFalse:[ |
|
6690 |
terminateButton enable. |
|
6691 |
m enable:#doTerminate. |
|
6692 |
]. |
|
10203 | 6693 |
]. |
6694 |
||
6695 |
mayProceed == false ifTrue:[ |
|
15413 | 6696 |
continueButton disable. |
6697 |
m notNil ifTrue:[m disable:#doContinue]. |
|
10203 | 6698 |
] ifFalse:[ |
15413 | 6699 |
continueButton enable. |
6700 |
m notNil ifTrue:[m enable:#doContinue] |
|
10203 | 6701 |
]. |
6702 |
||
13363 | 6703 |
isStoppedInModalDialog ifTrue:[ |
15413 | 6704 |
gotoDialogOpenerButton enable. |
6705 |
gotoDialogOpenerButton beVisible. |
|
13362 | 6706 |
] ifFalse:[ |
15413 | 6707 |
gotoDialogOpenerButton beInvisible. |
13362 | 6708 |
]. |
6709 |
||
14523 | 6710 |
(isStoppedInModalDialog not & isStoppedInApplicationAction) ifTrue:[ |
15413 | 6711 |
gotoApplicationActionMethodButton enable. |
6712 |
gotoApplicationActionMethodButton beVisible. |
|
14523 | 6713 |
] ifFalse:[ |
15413 | 6714 |
gotoApplicationActionMethodButton beInvisible. |
14523 | 6715 |
]. |
6716 |
||
10203 | 6717 |
"Created: / 06-07-2011 / 12:24:53 / cg" |
6718 |
! |
|
6719 |
||
7823 | 6720 |
updateContext |
6721 |
|oldContext idx| |
|
6722 |
||
6723 |
inspectedProcess state == #dead ifTrue:[ |
|
15413 | 6724 |
self showTerminated. |
6725 |
^ self |
|
7823 | 6726 |
]. |
6727 |
||
6728 |
oldContext := selectedContext. |
|
6729 |
[ |
|
15413 | 6730 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
6731 |
oldContext notNil ifTrue:[ |
|
6732 |
contextArray notNil ifTrue:[ |
|
6733 |
idx := contextArray identityIndexOf:oldContext. |
|
6734 |
idx ~~ 0 ifTrue:[ |
|
6735 |
self showSelection:idx |
|
6736 |
] ifFalse:[ |
|
6737 |
codeView contents:('** context returned **') |
|
6738 |
] |
|
6739 |
] |
|
6740 |
] |
|
6741 |
]. |
|
7823 | 6742 |
] valueUninterruptably. |
6743 |
||
6744 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
|
8212 | 6745 |
! |
6746 |
||
6747 |
withNodeValueAtInterval:interval do:aBlock |
|
14122 | 6748 |
"helper for flyByHelp and explan-selection" |
6749 |
||
15413 | 6750 |
|node definingNode nm nmBold nameSymbol |
14122 | 6751 |
varIdx parentNode receiver con receiversNonMetaClass| |
6752 |
||
6753 |
"/ interval printCR. |
|
10205 | 6754 |
Error |
15413 | 6755 |
handle:[:ex | ] |
6756 |
do:[ |
|
6757 |
[ |
|
6758 |
node := self findNodeForInterval:interval |
|
6759 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:50. |
|
6760 |
]. |
|
9314
e58b9abd145a
comment/format in: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9308
diff
changeset
|
6761 |
|
8212 | 6762 |
node isNil ifTrue:[ ^ self ]. |
10205 | 6763 |
node isVariable ifFalse:[ |
15413 | 6764 |
"/ Transcript showCR:node. |
6765 |
^ self |
|
8592 | 6766 |
]. |
8212 | 6767 |
|
6768 |
nm := node name. |
|
8214 | 6769 |
nmBold := nm allBold. |
8600 | 6770 |
actualContext isNil ifTrue:[^ self ]. |
8636 | 6771 |
actualContext methodHome isNil ifTrue:[^ self ]. |
8214 | 6772 |
receiver := actualContext methodHome receiver. |
8212 | 6773 |
|
6774 |
(nm = 'self') ifTrue:[ |
|
15413 | 6775 |
aBlock value:receiver value:'receiver' allBold. |
6776 |
^ self |
|
8212 | 6777 |
]. |
6778 |
(nm = 'super') ifTrue:[ |
|
15413 | 6779 |
aBlock value:receiver value:'receiver' allBold. |
6780 |
^ self |
|
8212 | 6781 |
]. |
6782 |
(nm = 'thisContext') ifTrue:[ |
|
15413 | 6783 |
aBlock value:actualContext value:'context' allBold. |
6784 |
^ self |
|
8212 | 6785 |
]. |
6786 |
||
6787 |
definingNode := node whoDefines:nm. |
|
6788 |
definingNode isNil ifTrue:[ |
|
15413 | 6789 |
(receiver class allInstVarNames includes:nm) ifTrue:[ |
8214 | 6790 |
"/aBlock value:'xIII' value:'instVar'. |
15413 | 6791 |
receiver class isMetaclass ifTrue:[ |
6792 |
aBlock value:(receiver instVarNamed:nm) value:'classInstVar ',nmBold. |
|
6793 |
] ifFalse:[ |
|
6794 |
aBlock value:(receiver instVarNamed:nm) value:'instVar ',nmBold. |
|
6795 |
]. |
|
6796 |
^ self |
|
6797 |
]. |
|
6798 |
||
6799 |
receiversNonMetaClass := receiver class theNonMetaclass. |
|
6800 |
(receiversNonMetaClass privateClasses contains:[:cls | cls nameWithoutPrefix = nm]) ifTrue:[ |
|
6801 |
aBlock value:'' value:'private class ',nmBold. |
|
6802 |
^ self |
|
6803 |
]. |
|
6804 |
(receiversNonMetaClass classVarNames includes:nm) ifTrue:[ |
|
6805 |
aBlock value:((currentMethod mclass ? receiversNonMetaClass) theNonMetaclass classVarAt:nm) value:'classVar ',nmBold. |
|
6806 |
^ self |
|
6807 |
]. |
|
6808 |
receiversNonMetaClass sharedPoolNames do:[:eachPoolName | |
|
6809 |
|pool| |
|
6810 |
||
6811 |
pool := Smalltalk at:eachPoolName. |
|
6812 |
pool isNil ifTrue:[ pool := receiversNonMetaClass topNameSpace at:eachPoolName]. |
|
6813 |
(pool classVarNames includes:nm) ifTrue:[ |
|
6814 |
aBlock value:(pool classVarAt:nm) value:'poolVar ',nm allBold,' in ',eachPoolName allBold,' '. |
|
6815 |
^ self |
|
6816 |
]. |
|
6817 |
]. |
|
6818 |
nameSymbol := nm asSymbolIfInterned. |
|
6819 |
nameSymbol notNil ifTrue:[ |
|
6820 |
(Smalltalk includesKey:nameSymbol) ifTrue:[ |
|
6821 |
(Smalltalk at:nameSymbol) isClass ifTrue:[ |
|
6822 |
aBlock value:'class: ',nmBold value:nil. |
|
6823 |
] ifFalse:[ |
|
6824 |
aBlock value:(Smalltalk at:nameSymbol) value:'global ',nmBold. |
|
6825 |
]. |
|
6826 |
^ self |
|
6827 |
]. |
|
6828 |
]. |
|
6829 |
aBlock value:'' value:'unknown'. |
|
6830 |
^ self |
|
8212 | 6831 |
]. |
6832 |
"/definingNode printCR. |
|
6833 |
||
6834 |
definingNode isMethod ifTrue:[ |
|
15413 | 6835 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
6836 |
varIdx ~~ 0 ifTrue:[ |
|
6837 |
Error |
|
6838 |
handle:[:ex | ] |
|
6839 |
do:[ aBlock value:(actualContext methodHome argAt:varIdx) value:'methodArg ',nmBold ]. |
|
6840 |
^ self |
|
6841 |
]. |
|
6842 |
varIdx := definingNode temporaries findFirst:[:var | var name = nm]. |
|
6843 |
varIdx ~~ 0 ifTrue:[ |
|
6844 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
6845 |
Error |
|
6846 |
handle:[:ex | ] |
|
6847 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
6848 |
^ self |
|
6849 |
] |
|
6850 |
]. |
|
8212 | 6851 |
]. |
6852 |
||
6853 |
definingNode isBlock ifTrue:[ |
|
15413 | 6854 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
6855 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
6856 |
varIdx ~~ 0 ifTrue:[ |
|
6857 |
"/ am I in this block ? |
|
6858 |
(actualContext lineNumber notNil |
|
6859 |
and:[ definingNode lastLineNumber notNil |
|
6860 |
and:[ (actualContext lineNumber |
|
6861 |
between:definingNode firstLineNumber |
|
6862 |
and:definingNode lastLineNumber) |
|
6863 |
and:[ varIdx <= actualContext numArgs ] ]]) |
|
6864 |
ifTrue:[ |
|
6865 |
aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold . |
|
6866 |
^ self |
|
6867 |
]. |
|
6868 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
|
6869 |
^ self |
|
6870 |
] |
|
6871 |
]. |
|
8212 | 6872 |
]. |
6873 |
||
6874 |
parentNode := definingNode parent. |
|
6875 |
||
6876 |
[parentNode notNil] whileTrue:[ |
|
15413 | 6877 |
"/'isMethod ' print. parentNode isMethod printCR. |
6878 |
parentNode isMethod ifTrue:[ |
|
6879 |
varIdx := parentNode temporaries findFirst:[:var | var name = nm]. |
|
6880 |
varIdx ~~ 0 ifTrue:[ |
|
6881 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
6882 |
Error |
|
6883 |
handle:[:ex | ] |
|
6884 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
6885 |
^ self |
|
6886 |
] |
|
6887 |
]. |
|
6888 |
]. |
|
6889 |
"/'isBlock ' print. parentNode isBlock printCR. |
|
6890 |
parentNode isBlock ifTrue:[ |
|
6891 |
"/ we don't have any information on the inlineability |
|
6892 |
"/ of this block here (RBParser does not know what |
|
6893 |
"/ the compiler does). |
|
6894 |
"/ therefore, it is questionable if we can use the |
|
6895 |
"/ context's home context here. |
|
6896 |
"/ am I in this block ? |
|
6897 |
con := actualContext. |
|
6898 |
[con notNil |
|
6899 |
and:[ parentNode lastLineNumber notNil |
|
6900 |
and:[ con lineNumber notNil |
|
6901 |
and:[ con lineNumber |
|
6902 |
between:parentNode firstLineNumber |
|
6903 |
and:parentNode lastLineNumber ]]]] whileTrue:[ |
|
6904 |
con := con sender. |
|
6905 |
]. |
|
6906 |
con notNil ifTrue:[ |
|
6907 |
varIdx := parentNode arguments findFirst:[:arg | arg name = nm]. |
|
6908 |
varIdx ~~ 0 ifTrue:[ |
|
6909 |
Error |
|
6910 |
handle:[:ex | ] |
|
6911 |
do:[ aBlock value:(con argAt:varIdx) value:'blockArg ',nmBold ]. |
|
6912 |
^ self |
|
6913 |
]. |
|
6914 |
varIdx := parentNode body temporaries findFirst:[:var | var name = nm]. |
|
6915 |
varIdx ~~ 0 ifTrue:[ |
|
6916 |
Error |
|
6917 |
handle:[:ex | ] |
|
6918 |
do:[ aBlock value:(con varAt:varIdx) value:'blockVar ',nmBold ]. |
|
6919 |
^ self |
|
6920 |
]. |
|
6921 |
]. |
|
6922 |
]. |
|
6923 |
parentNode := parentNode parent. |
|
8212 | 6924 |
]. |
8214 | 6925 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
9446 | 6926 |
|
9688
805ea34ba3ef
changed: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9662
diff
changeset
|
6927 |
"Modified: / 18-01-2011 / 17:57:34 / cg" |
7823 | 6928 |
! ! |
6929 |
||
6930 |
!DebugView methodsFor:'private queries'! |
|
6931 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6932 |
canBrowseClassHierarchy |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6933 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6934 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6935 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6936 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6937 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6938 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6939 |
canBrowseFullClassProtocol |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6940 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6941 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6942 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6943 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6944 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6945 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6946 |
canBrowseImplementingClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6947 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6948 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6949 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6950 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6951 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6952 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6953 |
canBrowseProcessesApplication |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6954 |
|p| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6955 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6956 |
p := inspectedProcess ? Processor activeProcess. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6957 |
p isNil ifTrue:[^ false]. |
14430 | 6958 |
^ p isGUIProcess and:[self processesApplication notNil ]. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6959 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6960 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6961 |
canBrowseReceiversClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6962 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6963 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6964 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6965 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6966 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6967 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6968 |
canCloseAllDebuggers |
15413 | 6969 |
self class allInstancesDo:[:debugger | |
6970 |
debugger ~~ self ifTrue:[ |
|
6971 |
debugger busy ifTrue:[^ true]. |
|
6972 |
] |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6973 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6974 |
^ false |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6975 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6976 |
"Created: / 23-03-2012 / 12:40:18 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6977 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
6978 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6979 |
canDefineMethod |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6980 |
^ defineButton isVisible |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6981 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6982 |
|
12840 | 6983 |
canInspectWidgetHierarchy |
6984 |
|rcvr| |
|
6985 |
||
6986 |
^ selectedContext notNil |
|
6987 |
and:[ (rcvr := selectedContext receiver) isView |
|
15413 | 6988 |
or:[ rcvr isKindOf: ApplicationModel ]] |
12840 | 6989 |
! |
6990 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6991 |
canRestart |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6992 |
^ restartButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6993 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6994 |
"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
|
6995 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6996 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6997 |
canReturn |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6998 |
^ returnButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6999 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7000 |
"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
|
7001 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7002 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7003 |
canSendEmail |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7004 |
^ SendMailTool notNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7005 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7006 |
"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
|
7007 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7008 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7009 |
canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7010 |
^ canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7011 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7012 |
|
15255 | 7013 |
hasBlockContextSelected |
7014 |
^ contextView hasSelection |
|
7015 |
and:[ self selectedContext isBlockContext ] |
|
7016 |
! |
|
7017 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7018 |
hasContextSelected |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7019 |
^ contextView hasSelection |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7020 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7021 |
"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
|
7022 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7023 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7024 |
hasHaltsToIgnore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7025 |
^ IgnoredHalts notEmptyOrNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7026 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7027 |
|
7823 | 7028 |
isAborting |
7029 |
^ exitAction == #abort |
|
7030 |
! |
|
7031 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7032 |
isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7033 |
^ isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7034 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7035 |
"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
|
7036 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7037 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7038 |
isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7039 |
^ isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7040 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7041 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7042 |
isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7043 |
^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7044 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7045 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7046 |
selectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7047 |
|con mthd| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7048 |
|
11595 | 7049 |
(con := self selectedContext) notNil ifTrue:[ |
15413 | 7050 |
mthd := con method. |
7051 |
^ mthd notNil and:[mthd isWrapped] |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7052 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7053 |
^ false. |
11595 | 7054 |
|
11610 | 7055 |
"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
|
7056 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7057 |
|
7823 | 7058 |
setOfHiddenCallingSelectors |
7059 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
|
7060 |
! |
|
7061 |
||
7062 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
|
7063 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
|
7064 |
! ! |
|
7065 |
||
9922 | 7066 |
!DebugView methodsFor:'private-breakpoints'! |
7067 |
||
15413 | 7068 |
addIgnoredHaltForCount:countOrNil |
7069 |
orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
7070 |
orThisReceiverClass:forThisReceiverClass orCurrentProcess:forCurrentProcess |
|
7071 |
orIfCalledFromMethod:ifCalledForMethodOrNil |
|
7072 |
forAll:aBoolean |
|
14608 | 7073 |
|
12937 | 7074 |
|haltingContext haltingMethod lineNrOfHalt receiverClassOrNil processOrNil| |
9922 | 7075 |
|
7076 |
aBoolean ifTrue:[ |
|
15413 | 7077 |
haltingMethod := #all |
9922 | 7078 |
] ifFalse:[ |
15413 | 7079 |
haltingContext := self findHaltingContext. |
7080 |
haltingContext isNil ifTrue:[ |
|
7081 |
Transcript showCR:'no halting context found'. |
|
7082 |
^ self |
|
7083 |
]. |
|
7084 |
||
7085 |
haltingMethod := haltingContext method. |
|
7086 |
lineNrOfHalt := haltingContext lineNumber. |
|
7087 |
(lineNrOfHalt isNil or:[lineNrOfHalt <= 0]) ifTrue:[ |
|
7088 |
Transcript showCR:'no halt lineNr found'. |
|
7089 |
^ self |
|
7090 |
]. |
|
7091 |
forThisReceiverClass ifTrue:[ |
|
7092 |
receiverClassOrNil := haltingContext receiver class |
|
7093 |
]. |
|
7094 |
forCurrentProcess ifTrue:[ |
|
7095 |
processOrNil := Processor activeProcess |
|
7096 |
]. |
|
9922 | 7097 |
]. |
7098 |
||
7099 |
self class |
|
15413 | 7100 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
7101 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
|
7102 |
orReceiverClass:receiverClassOrNil orProcess:processOrNil |
|
7103 |
orIfCalledFromMethod:ifCalledForMethodOrNil |
|
11210 | 7104 |
|
7105 |
"Created: / 27-01-2012 / 11:31:12 / cg" |
|
9922 | 7106 |
! |
7107 |
||
7108 |
canAddBreakpoint |
|
7109 |
|m| |
|
7110 |
||
7111 |
m := contextView middleButtonMenu. |
|
7112 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
7113 |
! |
|
7114 |
||
7115 |
canRemoveBreakpoint |
|
7116 |
|m| |
|
7117 |
||
7118 |
m := contextView middleButtonMenu. |
|
7119 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
7120 |
! |
|
7121 |
||
7122 |
findHaltingContext |
|
7123 |
|haltSelectors| |
|
7124 |
||
7125 |
haltSelectors := self haltSelectors. |
|
7126 |
||
10205 | 7127 |
contextArray keysAndValuesDo:[:idx :con | |
15413 | 7128 |
|sel con2 sel2 method| |
7129 |
||
7130 |
sel := con selector. |
|
7131 |
(haltSelectors includes:sel) ifTrue:[ |
|
7132 |
(method := con method) notNil ifTrue:[ |
|
7133 |
method mclass == Object ifTrue:[ |
|
7134 |
con2 := contextArray at:idx+1. |
|
7135 |
sel2 := con2 selector. |
|
7136 |
(haltSelectors includes:sel2) ifTrue:[ |
|
7137 |
con2 method mclass == Object ifTrue:[ |
|
7138 |
^ contextArray at:idx+2. |
|
7139 |
] |
|
7140 |
]. |
|
7141 |
^ contextArray at:idx+1 |
|
7142 |
]. |
|
7143 |
method mclass == Breakpoint ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7144 |
(contextArray at:idx+1) infoPrintCR. |
15413 | 7145 |
^ contextArray at:idx+1 |
7146 |
]. |
|
7147 |
]. |
|
7148 |
]. |
|
7149 |
con method isWrapped ifTrue:[ |
|
7150 |
^ con |
|
7151 |
]. |
|
9922 | 7152 |
]. |
7153 |
^ nil |
|
7154 |
||
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
7155 |
"Modified: / 27-01-2012 / 11:06:02 / cg" |
9922 | 7156 |
! |
7157 |
||
7158 |
ignoreBreakpoints |
|
7159 |
^ ignoreBreakpoints |
|
7160 |
||
7161 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
7162 |
! ! |
|
7163 |
||
7823 | 7164 |
!DebugView methodsFor:'private-cache handling'! |
7165 |
||
7166 |
cacheMyself |
|
7167 |
"remember myself for next debug session" |
|
7168 |
||
7169 |
"caching the last debugger will make the next debugger appear |
|
7170 |
faster, since no resources have to be allocated in the display. |
|
7171 |
We have to be careful to release all refs to the debuggee, though. |
|
7172 |
Otherwise, the GC will not be able to release it." |
|
7173 |
||
7174 |
windowGroup notNil ifTrue:[ |
|
15413 | 7175 |
windowGroup setProcess:nil. |
7823 | 7176 |
]. |
7177 |
||
7178 |
self releaseDebuggee. |
|
7179 |
||
7180 |
cachable ~~ true ifTrue:[^ self]. |
|
7181 |
||
7182 |
"/ |
|
13764
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
7183 |
"/ only cache if I am on the Display (i.e. the default screen) |
7823 | 7184 |
"/ |
13965 | 7185 |
self graphicsDevice == Display ifTrue:[ |
15413 | 7186 |
exclusive ifTrue:[ |
7187 |
CachedExclusive := self |
|
7188 |
] ifFalse:[ |
|
7189 |
CachedDebugger := self |
|
7190 |
]. |
|
7823 | 7191 |
]. |
7192 |
||
7193 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
15413 | 7194 |
ObjectMemory stepInterruptHandler:nil |
7823 | 7195 |
]. |
7196 |
||
7197 |
"Modified: 10.7.1997 / 15:50:46 / stefan" |
|
7198 |
"Modified: 31.7.1997 / 21:20:14 / cg" |
|
7199 |
! |
|
7200 |
||
7201 |
isCached |
|
13226 | 7202 |
"tell whether we are a cached debugger" |
7823 | 7203 |
|
7204 |
CachedExclusive == self ifTrue:[ |
|
15413 | 7205 |
^ true. |
7823 | 7206 |
]. |
7207 |
CachedDebugger == self ifTrue:[ |
|
15413 | 7208 |
^ true. |
7823 | 7209 |
]. |
7210 |
||
7211 |
^ false. |
|
7212 |
||
13226 | 7213 |
"Created: / 10-07-1997 / 15:22:43 / stefan" |
7214 |
"Modified (comment): / 27-07-2013 / 15:38:47 / cg" |
|
7823 | 7215 |
! |
7216 |
||
7217 |
uncacheMyself |
|
7218 |
"do not remember myself any longer for next debug session" |
|
7219 |
||
7220 |
cachable := false. |
|
7221 |
||
7222 |
CachedExclusive == self ifTrue:[ |
|
15413 | 7223 |
CachedExclusive := nil. |
7823 | 7224 |
]. |
7225 |
CachedDebugger == self ifTrue:[ |
|
15413 | 7226 |
CachedDebugger := nil. |
7823 | 7227 |
]. |
7228 |
OpenDebuggers notNil ifTrue:[ |
|
15413 | 7229 |
OpenDebuggers remove:self ifAbsent:[]. |
7823 | 7230 |
]. |
7231 |
||
7232 |
"Modified: 31.7.1997 / 21:20:11 / cg" |
|
7233 |
! ! |
|
7234 |
||
10628 | 7235 |
!DebugView methodsFor:'private-code view'! |
7236 |
||
7237 |
codeAspect |
|
11704 | 7238 |
^ SyntaxHighlighter codeAspectMethod |
10628 | 7239 |
|
7240 |
"Created: / 27-07-2011 / 13:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11704 | 7241 |
"Modified: / 27-07-2012 / 22:20:27 / cg" |
10628 | 7242 |
! ! |
7243 |
||
7823 | 7244 |
!DebugView methodsFor:'private-context handling'! |
7245 |
||
11391 | 7246 |
contextListEntryFor:aContext |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
7247 |
^ Error |
15413 | 7248 |
handle:[:ex | '???' ] |
7249 |
do:[ |
|
7250 |
|s| |
|
7251 |
||
7252 |
aContext selector == #doIt ifTrue:[ |
|
7253 |
aContext receiver isNil ifTrue:[ |
|
7254 |
s := 'doIt' allBold |
|
7255 |
] |
|
7256 |
]. |
|
7257 |
||
7258 |
s := Text streamContents:[:s | aContext printOn:s ]. |
|
7259 |
RememberedCallChain notNil ifTrue:[ |
|
7260 |
(RememberedCallChain includesIdentical:aContext) ifTrue:[ |
|
7261 |
s := s colorizeAllWith:(Color red). |
|
7262 |
]. |
|
7263 |
]. |
|
7264 |
s |
|
7265 |
]. |
|
11391 | 7266 |
|
7267 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
7268 |
! |
|
7269 |
||
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7270 |
is:aHomeContext inCallingChainOf:aContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7271 |
|con| |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7272 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7273 |
con := aContext. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7274 |
[con notNil and:[con ~~ aHomeContext]] whileTrue:[ |
15413 | 7275 |
con := con sender |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7276 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7277 |
^ con notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7278 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7279 |
"Created: / 10-06-2012 / 18:46:29 / cg" |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7280 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
7281 |
|
11890 | 7282 |
isEnteredDueToBreakpointOrHalt |
7283 |
"see if we came here due to a step interrupt" |
|
7284 |
||
7285 |
|c cReceiver| |
|
7286 |
||
7287 |
"/ look for a breakpoint-wrapper's context |
|
7288 |
c := thisContext findNextContextWithSelector:#'raiseRequestWith:errorString:in:' or:nil or:nil. |
|
7289 |
c isNil ifTrue:[ |
|
15413 | 7290 |
^ true. |
11890 | 7291 |
]. |
7292 |
cReceiver := c receiver. |
|
7293 |
^ cReceiver == BreakPointInterrupt |
|
13293 | 7294 |
|
7295 |
"Modified: / 01-08-2013 / 23:34:01 / cg" |
|
11890 | 7296 |
! |
7297 |
||
7298 |
isHaltToBeIgnored |
|
7299 |
"see if the current halt (if any) is in the ignore-list" |
|
7300 |
||
13059 | 7301 |
|c cReceiver sender haltingMethod lineNrInHaltingMethod breakpointParameter |
7302 |
sReceiver| |
|
11890 | 7303 |
|
7304 |
"/ should a halt be ignored ? |
|
7305 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
7306 |
||
13059 | 7307 |
"/ look for a method breakpoint-wrapper's context |
11890 | 7308 |
c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil. |
7309 |
c notNil ifTrue:[ |
|
15413 | 7310 |
((cReceiver := c receiver) isKindOf:NoHandlerError) ifTrue:[ |
7311 |
c := c sender findNextContextWithSelector:#doRaise or:nil or:nil. |
|
7312 |
cReceiver := c receiver. |
|
7313 |
]. |
|
7314 |
(cReceiver isKindOf:BreakPointInterrupt) ifFalse:[ |
|
7315 |
c := nil |
|
7316 |
] ifTrue:[ |
|
7317 |
[ |
|
7318 |
sender := c sender. |
|
7319 |
((sReceiver := sender receiver) isKindOf:BreakPointInterrupt) |
|
7320 |
or:[ sReceiver == BreakPointInterrupt ] |
|
7321 |
] whileTrue:[ |
|
7322 |
c := sender |
|
7323 |
]. |
|
7324 |
[ (sender := c sender) isBlockContext ] whileTrue:[ |
|
7325 |
c := sender |
|
7326 |
]. |
|
7327 |
sender := nil. "/ avoid keeping a reference to this context |
|
7328 |
]. |
|
11890 | 7329 |
]. |
14993 | 7330 |
"/ Transcript showCR:c. |
11890 | 7331 |
c isNil ifTrue:[ |
15413 | 7332 |
"/ look for halts or explicit breakpoints |
7333 |
c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil. |
|
7334 |
c isNil ifTrue:[ |
|
7335 |
c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil. |
|
7336 |
c isNil ifTrue:[ |
|
7337 |
^ false |
|
7338 |
]. |
|
7339 |
breakpointParameter := c argAt:1. |
|
7340 |
(self class |
|
7341 |
isBreakpointToBeIgnoredForParameter:breakpointParameter |
|
7342 |
context:(c sender) |
|
7343 |
modifyEntryCount:true |
|
7344 |
) ifTrue:[ |
|
7345 |
^ true. |
|
7346 |
]. |
|
7347 |
]. |
|
11890 | 7348 |
]. |
7349 |
||
7350 |
c := c sender. |
|
7351 |
"/ a code-breakpoint ? |
|
7352 |
(c receiver isKindOf:Breakpoint) ifTrue:[ |
|
15413 | 7353 |
c := c sender. |
11890 | 7354 |
]. |
7355 |
haltingMethod := c method. |
|
7356 |
||
7357 |
haltingMethod isWrapped ifTrue:[ |
|
15413 | 7358 |
lineNrInHaltingMethod := 1. |
11890 | 7359 |
] ifFalse:[ |
15413 | 7360 |
lineNrInHaltingMethod := c lineNumber. |
7361 |
"/ Transcript showCR:c. |
|
11890 | 7362 |
]. |
7363 |
||
12562 | 7364 |
^ self class |
15413 | 7365 |
isHaltToBeIgnoredIn:haltingMethod |
7366 |
atLineNr:lineNrInHaltingMethod |
|
7367 |
context:c |
|
7368 |
modifyEntryCount:true. |
|
11890 | 7369 |
|
7370 |
"Created: / 22-10-2010 / 12:09:53 / cg" |
|
7371 |
"Modified: / 06-03-2012 / 12:54:09 / cg" |
|
7372 |
! |
|
7373 |
||
266 | 7374 |
setContext:aContext |
7375 |
"show calling chain from aContext in the walk-back listview" |
|
7376 |
||
641 | 7377 |
^ 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
|
7378 |
|
641 | 7379 |
"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
|
7380 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7381 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7382 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
7383 |
"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
|
7384 |
Most complications here arise from filtering less-interesting contexts |
15256 | 7385 |
if not in verbose-context mode or when hiding implementation contexts. |
15413 | 7386 |
There is a lot of heuristic magic here, to make the debugger as useful |
15256 | 7387 |
as possible for the user (but not particularly for the debugger-developer)" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7388 |
|
14531 | 7389 |
|con sel text method caller caller2 called called2 m count c cc sndr |
14523 | 7390 |
suspendContext calledBySuspendContext nm h calledContext show2 |
15257 | 7391 |
alreadyInApplicationCode verboseBacktrace| |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7392 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7393 |
"/ (contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7394 |
"/ "no change" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7395 |
"/ ^ false |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
7396 |
"/ ]. |
266 | 7397 |
|
14523 | 7398 |
isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := false. |
7399 |
isStoppedInModalDialog := isStoppedInApplicationAction := alreadyInApplicationCode := false. |
|
14531 | 7400 |
isStoppedAtStatementBreakpoint := false. |
939 | 7401 |
firstContext := aContext. |
15257 | 7402 |
verboseBacktrace := self verboseBacktraceHolder value. |
939 | 7403 |
|
266 | 7404 |
m := contextView middleButtonMenu. |
7405 |
m notNil ifTrue:[ |
|
15497 | 7406 |
m disable:#showMore. |
266 | 7407 |
]. |
3269 | 7408 |
canShowMore := false. |
266 | 7409 |
|
7410 |
aContext isNil ifTrue:[ |
|
15497 | 7411 |
text := Array with:'** no context **'. |
7412 |
contextArray := nil. |
|
266 | 7413 |
] ifFalse:[ |
15497 | 7414 |
text := OrderedCollection new:nChainShown. |
7415 |
contextArray := OrderedCollection new:nChainShown. |
|
7416 |
||
7417 |
con := aContext. |
|
7418 |
calledContext := nil. |
|
7419 |
||
7420 |
DebuggingContextWalk == true ifTrue:[ |
|
7421 |
'======================================' print. con printCR. |
|
7422 |
]. |
|
7423 |
alreadyInApplicationCode := |
|
7424 |
con receiver isLazyValue not "/ careful to not force futures/lazy values |
|
7425 |
and:[con receiver isKindOf:ApplicationModel]. |
|
7426 |
||
7427 |
verboseBacktrace ~~ true ifTrue:[ |
|
7428 |
"/ with dense backtrace, hide the ProcessorScheduler |
|
7429 |
"/ contexts at the top; look for a Process>>suspend* |
|
7430 |
"/ context within the first 10 contexts |
|
7431 |
||
7432 |
suspendContext := nil. |
|
7433 |
c := con. |
|
7434 |
1 to:10 do:[:i | |
|
7435 |
|selector| |
|
7436 |
||
7437 |
c notNil ifTrue:[ |
|
7438 |
selector := c selector. |
|
7439 |
selector notNil ifTrue:[ |
|
7440 |
(selector isSymbol and:[(selector startsWith:'suspend') and:[c receiver isMemberOf:Process]]) ifTrue:[ |
|
7441 |
suspendContext := c. |
|
7442 |
calledBySuspendContext := cc. |
|
7443 |
]. |
|
7444 |
]. |
|
7445 |
cc := c. |
|
7446 |
c := c sender. |
|
7447 |
] |
|
7448 |
]. |
|
7449 |
suspendContext notNil ifTrue:[ |
|
7450 |
con := suspendContext. |
|
7451 |
calledContext := calledBySuspendContext. |
|
7452 |
suspendContext := nil |
|
7453 |
]. |
|
7454 |
]. |
|
7455 |
"/ Transcript show:'1 '; showCR:con. |
|
7456 |
con notNil ifTrue:[ |
|
7457 |
"/ hide the halt implementation |
|
7458 |
sel := con selector. |
|
7459 |
(self haltSelectors includes:sel) ifTrue:[ |
|
7460 |
(method := con method) notNil ifTrue:[ |
|
7461 |
method mclass == Object ifTrue:[ |
|
7462 |
(sel isSymbol and:[ sel startsWith:'breakPoint:']) ifTrue:[ |
|
7463 |
isStoppedAtBreakPointWithParameter := true. |
|
7464 |
breakPointParameter := con argAt:1. |
|
7465 |
]. |
|
7466 |
isStoppedAtHaltOrBreakPoint := true. |
|
7467 |
verboseBacktrace ~~ true ifTrue:[ |
|
7468 |
calledContext := con. |
|
7469 |
con := con sender. |
|
7470 |
] |
|
7471 |
] ifFalse:[ |
|
7472 |
method mclass == Breakpoint ifTrue:[ |
|
7473 |
isStoppedAtHaltOrBreakPoint := true. |
|
7474 |
isStoppedAtStatementBreakpoint := true. |
|
7475 |
verboseBacktrace ~~ true ifTrue:[ |
|
7476 |
calledContext := con. |
|
7477 |
con := con sender. |
|
7478 |
]. |
|
7479 |
"/ Transcript show:'2 '; showCR:con. |
|
7480 |
]. |
|
7481 |
]. |
|
7482 |
]. |
|
7483 |
]. |
|
7484 |
]. |
|
7485 |
||
7486 |
(verboseBacktrace not or:[ hideSupportCode]) ifTrue:[ |
|
7487 |
[ |
|
7488 |
con notNil |
|
7489 |
and:[ con isBlockContext not |
|
7490 |
and:[ con method notNil |
|
7491 |
and:[ (con method shouldBeSkippedInDebuggersWalkBack) |
|
7492 |
and:[ (self haltSelectors includes: con selector) not]]]] |
|
7493 |
] whileTrue:[ |
|
7494 |
"/ Transcript show:'xx '; showCR:con. |
|
7495 |
calledContext := con. |
|
7496 |
con := con sender |
|
7497 |
]. |
|
7498 |
]. |
|
7499 |
||
7500 |
" |
|
7501 |
get them all, by walking along the caller chain. |
|
7502 |
depending on the settings, skip some intermediate contexts |
|
7503 |
(such as collection enumeration implementations), which are usually not |
|
7504 |
of interest when debugging an application. |
|
7505 |
On the fly, gather some additional information |
|
7506 |
such as: are we at a halt/breakpoint, are we in a modal dialog opened, |
|
7507 |
are we coming from an application model's action etc. |
|
7508 |
" |
|
7509 |
count := 0. |
|
7510 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
|
7511 |
"/ remember any halt/breakpoint or openModal on the fly |
|
7512 |
DebuggingContextWalk == true ifTrue:[ '---' print. con printCR ]. |
|
7513 |
||
7514 |
sel := con selector. |
|
7515 |
(self haltSelectors includes:sel) ifTrue:[ |
|
7516 |
(method := con method) notNil ifTrue:[ |
|
7517 |
method mclass == Object ifTrue:[ |
|
7518 |
(sel isSymbol and:[sel startsWith:'breakPoint:']) ifTrue:[ |
|
7519 |
isStoppedAtBreakPointWithParameter := true. |
|
7520 |
breakPointParameter := con argAt:1. |
|
7521 |
]. |
|
7522 |
isStoppedAtHaltOrBreakPoint := true. |
|
7523 |
] ifFalse:[ |
|
7524 |
method mclass == Breakpoint ifTrue:[ |
|
7525 |
isStoppedAtHaltOrBreakPoint := true. |
|
7526 |
]. |
|
7527 |
] |
|
7528 |
] |
|
7529 |
] ifFalse:[ |
|
7530 |
((sel == #openModal) or:[sel == #openModal:]) ifTrue:[ |
|
7531 |
isStoppedInModalDialog := true. |
|
7532 |
] ifFalse:[ |
|
7533 |
alreadyInApplicationCode ifFalse:[ |
|
7534 |
(con receiver isLazyValue not "/ careful to not force futures/lazy values |
|
7535 |
and:[con receiver isKindOf:ApplicationModel]) ifTrue:[ |
|
7536 |
isStoppedInApplicationAction := true. |
|
7537 |
] |
|
7538 |
] |
|
7539 |
] |
|
7540 |
]. |
|
7541 |
||
7542 |
[ |
|
7543 |
|show1| |
|
7544 |
||
7545 |
show1 := self showingContext1:con calling:calledContext. |
|
7546 |
DebuggingDebugger3 == true ifTrue:[ |
|
7547 |
'showingContext1: (' print. con print. ') --> ' print. show1 printCR. |
|
7548 |
]. |
|
7549 |
show1 |
|
7550 |
] whileFalse:[ |
|
7551 |
calledContext := con. |
|
7552 |
con := con sender. |
|
7553 |
]. |
|
7554 |
||
7555 |
show2 := self showingContext2:con nesting:count. |
|
7556 |
DebuggingDebugger3 == true ifTrue:[ |
|
7557 |
'showingContext2: (' print. con print. ') --> ' print. show2 printCR. |
|
7558 |
]. |
|
7559 |
||
7560 |
show2 ifTrue:[ |
|
7561 |
contextArray add:con. |
|
7562 |
||
7563 |
(MoreDebuggingDetail == true) ifTrue:[ |
|
7564 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
|
7565 |
] ifFalse:[ |
|
7566 |
nm := self contextListEntryFor:con. |
|
7567 |
]. |
|
7568 |
text add:nm. |
|
7569 |
count := count + 1. |
|
7570 |
]. |
|
7571 |
||
7572 |
"/ with hidden support code, skip over internals of exceptions |
|
7573 |
hideSupportCode == true ifTrue:[ |
|
7574 |
"/ Transcript showCR:'x'. |
|
7575 |
(con isBlockContext |
|
7576 |
and:[ (h := con home) notNil |
|
7577 |
and:[ (self is:h inCallingChainOf:con) ]]) ifTrue:[ |
|
7578 |
|blocksReceiver| |
|
7579 |
blocksReceiver := con receiver. |
|
7580 |
c := con sender. |
|
7581 |
[ |
|
7582 |
c notNil |
|
7583 |
and:[ |
|
7584 |
sndr := c sender. |
|
7585 |
(sndr ~= h) |
|
7586 |
and:[ |
|
7587 |
blocksReceiver isCollection "/ skip collection implementations |
|
7588 |
or:[ ( #( #'handle:do:' "/ skip exception implementations |
|
7589 |
#'handleDo:' |
|
7590 |
#'answer:do:' |
|
7591 |
#'ensure:' ) includes: c selector ) |
|
7592 |
or:[ #'perform:*' "/ skip perform implementations |
|
7593 |
match: c selector ]] |
|
7594 |
] |
|
7595 |
] |
|
7596 |
] whileTrue:[ |
|
7597 |
c := sndr |
|
7598 |
]. |
|
7599 |
c notNil ifTrue:[ |
|
7600 |
con := c "sender". |
|
7601 |
]. |
|
7602 |
]. |
|
7603 |
]. |
|
7604 |
||
7605 |
"/ |
|
7606 |
"/ kludge: if it's a wrapped method, then hide the wrap-call |
|
7607 |
"/ |
|
7608 |
method := con method. |
|
7609 |
method notNil ifTrue:[ |
|
7610 |
called := con. |
|
7611 |
caller := con sender. |
|
7612 |
(caller notNil and:[caller receiver == method]) ifTrue:[ |
|
7613 |
called2 := caller. |
|
7614 |
caller2 := caller sender. |
|
7615 |
caller2 notNil ifTrue:[ |
|
7616 |
(caller2 method isWrapped |
|
7617 |
and:[ caller2 method originalMethod == method ]) ifTrue:[ |
|
7618 |
calledContext := called2. |
|
7619 |
con := caller2 |
|
7620 |
]. |
|
7621 |
]. |
|
7622 |
||
7623 |
]. |
|
7624 |
caller := caller2 := nil |
|
7625 |
]. |
|
7626 |
||
7627 |
"/ with dense backtrace, skip the doIt method's context |
|
7628 |
"/ (its dummy anyway) and fake that context's name |
|
7629 |
||
7630 |
verboseBacktrace ~~ true ifTrue:[ |
|
7631 |
(con isBlockContext |
|
7632 |
and:[(h := con home) == con sender |
|
7633 |
and:[h notNil |
|
7634 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
|
7635 |
and:[h method who isNil]]]]) ifTrue:[ |
|
7636 |
calledContext := con. |
|
7637 |
con := con sender. |
|
7638 |
text removeLast. |
|
7639 |
||
7640 |
text add:(self contextListEntryFor:con methodHome). |
|
7641 |
]. |
|
7642 |
h := nil. "/ never keep refs to contexts unless you really need them ... |
|
7643 |
]. |
|
7644 |
||
7645 |
"/ with dense backtrace, don't show contexts below the doIt |
|
7646 |
( verboseBacktrace ~~ true |
|
7647 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
|
7648 |
con := nil. |
|
7649 |
] ifFalse:[ |
|
7650 |
calledContext := con. |
|
7651 |
con := con sender |
|
7652 |
]. |
|
7653 |
]. |
|
7654 |
||
7655 |
" |
|
7656 |
did we reach the end ? |
|
7657 |
" |
|
7658 |
(con isNil or:[con sender isNil]) ifTrue:[ |
|
7659 |
||
7660 |
"/ the very last one is the startup context |
|
7661 |
"/ (in main) - it has nil as receiver and nil as selector |
|
7662 |
||
7663 |
(contextArray notEmpty |
|
7664 |
and:[contextArray last selector isNil]) ifTrue:[ |
|
7665 |
contextArray removeLast. |
|
7666 |
text removeLast |
|
7667 |
]. |
|
7668 |
||
7669 |
verboseBacktrace ~~ true ifTrue:[ |
|
7670 |
"/ in dense mode, remove process startup contexts (if any) |
|
7671 |
||
7672 |
(contextArray size > 0 |
|
7673 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
|
7674 |
con selector == #start ifTrue:[ |
|
7675 |
contextArray removeLast. |
|
7676 |
text removeLast. |
|
7677 |
||
7678 |
[contextArray size > 0 |
|
7679 |
and:[contextArray last methodHome == con]] whileTrue:[ |
|
7680 |
contextArray removeLast. |
|
7681 |
text removeLast. |
|
7682 |
] |
|
7683 |
] |
|
7684 |
] |
|
7685 |
] |
|
7686 |
] ifFalse:[ |
|
7687 |
m notNil ifTrue:[ |
|
7688 |
m enable:#showMore. |
|
7689 |
]. |
|
7690 |
canShowMore := true. |
|
7691 |
text add:(resources string:'*** more walkback follows - click here to see them ***') |
|
7692 |
]. |
|
266 | 7693 |
]. |
7694 |
||
7695 |
contextView setList:text. |
|
944 | 7696 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7697 |
releaseInspectors ifTrue:[ |
15497 | 7698 |
receiverInspector release. |
7699 |
contextInspector release. |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7700 |
]. |
266 | 7701 |
|
7702 |
m notNil ifTrue:[ |
|
15497 | 7703 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 7704 |
]. |
3511 | 7705 |
self updateMenuItems. |
266 | 7706 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
7707 |
|
7797 | 7708 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
7709 |
"Modified: / 27-07-2012 / 15:10:53 / cg" |
266 | 7710 |
! |
7711 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7712 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7713 |
"show calling chain from aContext in the walk-back listview. |
1213 | 7714 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7715 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7716 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7717 |
|
8152 | 7718 |
con := aContext. |
15257 | 7719 |
self verboseBacktraceHolder value ifFalse:[ |
15413 | 7720 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
7721 |
con := con sender. |
|
7722 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
|
7723 |
con := con sender. |
|
7724 |
]. |
|
7725 |
]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7726 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7727 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7728 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
7729 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
7730 |
"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
|
7731 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
7732 |
|
3447 | 7733 |
showingContext1:aContext calling:calledContext |
7823 | 7734 |
"return false, if this (top) context is to be skipped. |
10205 | 7735 |
Here, we hide some well known methods, which are usually not too interesting; |
7823 | 7736 |
the set of methods which are suppressed is my (claus's) own choice." |
7737 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7738 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 7739 |
|
15257 | 7740 |
self verboseBacktraceHolder value ifTrue:[ ^true ]. |
3447 | 7741 |
aContext isNil ifTrue:[ ^true ]. |
7742 |
||
7743 |
sel := aContext selector. |
|
7744 |
rec := aContext receiver. |
|
7745 |
mthd := aContext method. |
|
7746 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
7747 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7748 |
"/ to avoid firing/waiting the lazy or future |
10205 | 7749 |
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
|
7750 |
aContext sender notNil ifTrue:[ |
15413 | 7751 |
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
|
7752 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7753 |
|
11636 | 7754 |
DebuggingDebugger3 == true ifTrue:[ |
15413 | 7755 |
'showingContext1: (' print. aContext print. |
7756 |
') calling: (' print. calledContext print. |
|
7757 |
')' printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7758 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7759 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7760 |
(#(doCallHandler: doRaise |
3447 | 7761 |
) includes:sel) |
15413 | 7762 |
ifTrue:[ |
7763 |
recIsException ifTrue:[ ^ false]. |
|
7764 |
]. |
|
3447 | 7765 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7766 |
(#(raise raiseRequest |
3447 | 7767 |
) includes:sel) |
15413 | 7768 |
ifTrue:[ |
7769 |
recIsException ifTrue:[ |
|
7770 |
(senderRec isLazyValue not |
|
7771 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
|
7772 |
]. |
|
7773 |
]. |
|
3447 | 7774 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7775 |
(#(doWhile: |
3447 | 7776 |
) includes:sel) |
15413 | 7777 |
ifTrue:[ |
7778 |
rec isBlock ifTrue:[ |
|
7779 |
true "aContext sender isBlockContext" ifTrue:[^ false]. |
|
7780 |
]. |
|
7781 |
]. |
|
3447 | 7782 |
|
8620 | 7783 |
calledContext notNil ifTrue:[ |
15413 | 7784 |
calledSel := calledContext selector. |
7785 |
calledRec := calledContext receiver. |
|
7786 |
||
7787 |
calledRec isBlock ifTrue:[ |
|
7788 |
(calledSel == #ensure:) ifTrue:[^ false]. |
|
7789 |
(calledSel == #ifCurtailed:) ifTrue:[^ false]. |
|
7790 |
]. |
|
7791 |
(calledSel == #handle:do:) ifTrue:[^ false]. |
|
7792 |
(calledSel == #answer:do:) ifTrue:[^ false]. |
|
8620 | 7793 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7794 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7795 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7796 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7797 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7798 |
"/ |
10205 | 7799 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7800 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7801 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7802 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7803 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7804 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7805 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7806 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
7807 |
"/ ]. |
8620 | 7808 |
]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7809 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7810 |
(#(handleDo:) includes:sel) |
15413 | 7811 |
ifTrue:[ |
7812 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
|
7813 |
]. |
|
10205 | 7814 |
(#( |
15413 | 7815 |
withCursor:do: |
7816 |
withWaitCursorDo: |
|
7817 |
withReadCursorDo: |
|
7818 |
withWriteCursorDo: |
|
7819 |
withSearchCursorDo: |
|
3447 | 7820 |
) includes:sel) |
15413 | 7821 |
ifTrue:[ |
7822 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
7823 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
7824 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
7825 |
]. |
|
10205 | 7826 |
|
7827 |
(#( |
|
15413 | 7828 |
wait |
7829 |
waitWithTimeout: |
|
7830 |
waitWithTimeoutMs: |
|
3447 | 7831 |
) includes:sel) |
15413 | 7832 |
ifTrue:[ |
7833 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
7834 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
7835 |
]. |
|
3447 | 7836 |
|
7837 |
^ true |
|
7838 |
||
9662 | 7839 |
"Created: / 17-11-2001 / 22:24:06 / cg" |
11696 | 7840 |
"Modified: / 27-07-2012 / 17:30:18 / cg" |
3447 | 7841 |
! |
7842 |
||
7843 |
showingContext2:aContext nesting:nesting |
|
7823 | 7844 |
"return false, if this (intermediate) context is to be skipped. |
13455 | 7845 |
Here, we hide some well known methods, which are usually not too interesting; |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7846 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 7847 |
|
10205 | 7848 |
|sel rec mClass |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7849 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7850 |
|
15257 | 7851 |
self verboseBacktraceHolder value ifTrue:[^ true]. |
3447 | 7852 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7853 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7854 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7855 |
sel := aContext selector. |
939 | 7856 |
mClass := aContext methodClass. |
7857 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7858 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7859 |
sender notNil ifTrue:[ |
15413 | 7860 |
senderSelector := sender selector. |
7861 |
senderReceiver := sender receiver. |
|
7862 |
senderReceiverClass := senderReceiver class. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7863 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7864 |
|
939 | 7865 |
sel == #withCursor:do: ifTrue:[ |
15413 | 7866 |
(mClass == WindowGroup) ifTrue:[^ false]. |
7867 |
(mClass == TopView) ifTrue:[^ false]. |
|
939 | 7868 |
]. |
7869 |
(sel == #withExecuteCursorDo: |
|
7870 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
15413 | 7871 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 7872 |
]. |
7873 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
7874 |
(sel == #do: |
6600 | 7875 |
or:[sel == #from:to:do: |
6601 | 7876 |
or:[sel == #keysAndValuesDo: |
7877 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
15413 | 7878 |
mClass == Array ifTrue:[^ false]. |
7879 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
7880 |
mClass == Set ifTrue:[^ false]. |
|
7881 |
mClass == Dictionary ifTrue:[^ false]. |
|
7882 |
mClass == Interval ifTrue:[^ false]. |
|
10205 | 7883 |
]. |
7884 |
(sel == #perform: |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7885 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7886 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7887 |
or:[sel == #perform:with:with:with: |
11696 | 7888 |
or:[sel == #perform:with:with:with:with: |
7889 |
or:[sel == #perform:withArguments: |
|
7890 |
or:[sel == #perform:with:ifNotUnderstood: |
|
7891 |
or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]) |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7892 |
ifTrue:[ |
15413 | 7893 |
hideSupportCode == true ifTrue:[ |
7894 |
"/ 'x' printCR. |
|
7895 |
mClass == Object ifTrue:[^ false] |
|
7896 |
]. |
|
7897 |
nesting == 0 ifTrue:[^ true]. |
|
7898 |
mClass == Array ifTrue:[^ false]. |
|
7899 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7900 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7901 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7902 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7903 |
|
939 | 7904 |
(mClass == Object) ifTrue:[ |
15413 | 7905 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 7906 |
]. |
7907 |
||
7908 |
(mClass == Method) ifTrue:[ |
|
15413 | 7909 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 7910 |
]. |
7911 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
7912 |
(mClass == SmallInteger) ifTrue:[ |
15413 | 7913 |
(sel == #to:do:) ifTrue:[^ false]. |
7914 |
(sel == #to:by:do:) ifTrue:[^ false]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
7915 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
7916 |
|
939 | 7917 |
(mClass == Block) ifTrue:[ |
15413 | 7918 |
sel == #ensure: ifTrue:[^ false]. |
7919 |
sel == #ifCurtailed: ifTrue:[^ false]. |
|
7920 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
|
7921 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
|
7922 |
sel == #on:do: ifTrue:[^ false]. |
|
7923 |
||
7924 |
sel == #value ifTrue:[^ false]. |
|
7925 |
sel == #value: ifTrue:[^ false]. |
|
7926 |
sel == #value:value: ifTrue:[^ false]. |
|
7927 |
sel == #value:value:value: ifTrue:[^ false]. |
|
7928 |
sel == #value:value:value:value: ifTrue:[^ false]. |
|
7929 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
|
7930 |
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
|
7931 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7932 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7933 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7934 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7935 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7936 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7937 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7938 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7939 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7940 |
"/ 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
|
7941 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7942 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7943 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7944 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7945 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7946 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7947 |
|
15413 | 7948 |
aContext home notNil ifTrue:[ |
7949 |
aContext home receiver isLazyValue ifFalse:[ |
|
7950 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
|
7951 |
(aContext home selector == #wait) ifTrue:[^ false]. |
|
7952 |
(aContext home selector == #waitWithTimeoutMs:) ifTrue:[^ false]. |
|
7953 |
] |
|
7954 |
] |
|
7955 |
] |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7956 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7957 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
7958 |
(rec isExceptionHandler) ifTrue:[ |
15413 | 7959 |
sel == #handle:do: ifTrue:[^ false]. |
7960 |
sel == #handleDo: ifTrue:[^ false]. |
|
7961 |
(sel startsWith:#raise) ifTrue:[^ false]. |
|
7962 |
sel == #answer:do: ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
7963 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
7964 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
15413 | 7965 |
sel == #doRaise ifTrue:[^ false]. |
7966 |
sel == #doCallHandler: ifTrue:[^ false]. |
|
7967 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
|
7968 |
senderReceiverClass == Signal ifTrue:[^ false]. |
|
7969 |
] |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7970 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7971 |
(mClass == Context) ifTrue:[ |
15413 | 7972 |
sel == #unwind ifTrue:[^ false]. |
7973 |
sel == #unwind: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7974 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7975 |
(mClass == ProcessorScheduler) ifTrue:[ |
15413 | 7976 |
sel == #interruptActive ifTrue:[^ false]. |
7977 |
sel == #threadSwitch: ifTrue:[^ false]. |
|
7978 |
sel == #suspend: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7979 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7980 |
mClass == Process ifTrue:[ |
15413 | 7981 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
7982 |
]. |
15256 | 7983 |
(sel == #break) ifTrue:[ |
15413 | 7984 |
(mClass == Breakpoint) ifTrue:[^ false]. |
15256 | 7985 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7986 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
7987 |
|
9662 | 7988 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
11696 | 7989 |
"Modified: / 27-07-2012 / 17:26:54 / cg" |
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
7990 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
7991 |
|
4859 | 7992 |
!DebugView methodsFor:'private-control loop'! |
266 | 7993 |
|
7994 |
controlLoop |
|
7995 |
"this is a kludge: |
|
15413 | 7996 |
start a dispatchloop which exits when |
7997 |
either continue, return or step is pressed |
|
266 | 7998 |
" |
7999 |
||
8000 |
haveControl := true. |
|
664 | 8001 |
[ |
15413 | 8002 |
[haveControl] whileTrue:[ |
13388 | 8003 |
AbortOperationRequest handle:[:ex | |
8004 |
] do:[ |
|
15413 | 8005 |
self controlLoopCatchingErrors |
13388 | 8006 |
] |
15413 | 8007 |
]. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
8008 |
] ensure:[ |
15413 | 8009 |
catchBlock := nil. |
8010 |
haveControl := false |
|
266 | 8011 |
]. |
664 | 8012 |
|
8013 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 8014 |
! |
8015 |
||
8016 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
8017 |
"this is the debuggers own private event handling loop; |
1187 | 8018 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
8019 |
|
266 | 8020 |
"setup a self removing catch-block" |
8021 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
8022 |
||
8023 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
15757 | 8024 |
"if we do not have multiple processes or its a system process |
8025 |
we start another dispatch loop, which exits when |
|
8026 |
either continue, return or step is pressed |
|
8027 |
or (via the catchBlock) if an error occurs. |
|
8028 |
Since our display is an extra exclusive one, |
|
8029 |
all processing for normal views stops here ... |
|
8030 |
" |
|
8031 |
||
8032 |
WindowGroup setActiveGroup:windowGroup. |
|
8033 |
SignalSet anySignal handle:[:ex | |
|
8034 |
|signal| |
|
8035 |
||
8036 |
signal := ex creator. |
|
8037 |
(UserInterruptSignal accepts:signal) ifTrue:[ |
|
14835 | 8038 |
Transcript showCR:'UserInterruptSignal'. |
15757 | 8039 |
self topView raiseDeiconified. |
8040 |
ex proceed. |
|
8041 |
]. |
|
8042 |
||
8043 |
(UserNotification accepts:signal) ifTrue:[ |
|
11890 | 8044 |
Transcript showCR:'UserNotification'. |
15757 | 8045 |
(signal ~~ ActivityNotificationSignal) ifTrue:[ |
8046 |
self showError:ex description. |
|
8047 |
]. |
|
8048 |
ex proceed. |
|
8049 |
]. |
|
8050 |
(HaltInterrupt accepts:signal) ifTrue:[ |
|
11890 | 8051 |
Transcript showCR:'HaltInterrupt'. |
15757 | 8052 |
Transcript showCR:'Halt/Break in debugger ignored'. |
8053 |
self topView raiseDeiconified. |
|
8054 |
ex proceed. |
|
8055 |
]. |
|
8056 |
||
8057 |
self showError:'*** Error in modal debugger: |
|
266 | 8058 |
|
334 | 8059 |
>>>> Signal: ' , signal printString , ' |
266 | 8060 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 8061 |
>>>> From: ' , ex suspendedContext sender printString , ' |
8062 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
8063 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
8064 |
>>>> : ' , 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
|
8065 |
>>>> : ' , 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
|
8066 |
>>>> : ' , 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
|
8067 |
>>>> : ' , 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
|
8068 |
>>>> : ' , 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
|
8069 |
>>>> : ' , 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
|
8070 |
>>>> : ' , 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
|
8071 |
>>>> : ' , 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
|
8072 |
>>>> : ' , 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
|
8073 |
>>>> : ' , 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
|
8074 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 8075 |
>>>> Message: ' , ex description , ' |
266 | 8076 |
|
1187 | 8077 |
caught & ignored.'. |
15757 | 8078 |
ex return. |
8079 |
] do:[ |
|
11890 | 8080 |
"/ UserNotification handle:[:ex | |
8081 |
"/ (ex signal == ActivityNotificationSignal) ifTrue:[ |
|
8082 |
"/ ex proceed |
|
8083 |
"/ ]. |
|
8084 |
"/ self showError:ex description. |
|
8085 |
"/ ex proceed. |
|
8086 |
"/ ] do:[ |
|
15757 | 8087 |
self graphicsDevice |
8088 |
dispatchModalWhile:[ |
|
8089 |
Processor activeProcess state:#debug. |
|
8090 |
haveControl]. |
|
11890 | 8091 |
"/ ] |
15757 | 8092 |
]. |
8093 |
WindowGroup setActiveGroup:nil. |
|
266 | 8094 |
] ifFalse:[ |
15757 | 8095 |
"we do have multiple processes - |
8096 |
simply enter the DebugViews-Windowgroup event loop. |
|
8097 |
effectively suspending event processing for the currently |
|
8098 |
active group. |
|
8099 |
" |
|
8100 |
SignalSet anySignal handle:[:ex | |
|
8101 |
|answer signal eMsg| |
|
8102 |
||
8103 |
signal := ex creator. |
|
8104 |
||
8105 |
DebuggingDebugger ~~ true ifTrue:[ |
|
8106 |
(signal == ActivityNotification) ifTrue:[ |
|
8107 |
ex proceed |
|
8108 |
]. |
|
8109 |
"/ |
|
8110 |
"/ ignore exceptions which say they explicitly have to be ignored |
|
8111 |
"/ |
|
8112 |
ex catchInDebugger ifTrue:[ |
|
8113 |
'DebugView [info]: ',signal printString,'-signal in debugger caught for close' infoPrintCR. |
|
8114 |
self halt. "/ self destroy. |
|
8115 |
ex reject |
|
8116 |
]. |
|
8117 |
||
8118 |
"/ |
|
8119 |
"/ ignore recursive breakpoints |
|
8120 |
"/ |
|
8121 |
(signal isControlInterrupt) ifTrue:[ |
|
8122 |
ignoreBreakpoints == true ifTrue:[ |
|
8123 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
|
8124 |
('DebugView [info]: ',ex suspendedContext printString) infoPrintCR. |
|
8125 |
self topView raiseDeiconified. |
|
8126 |
ex proceed |
|
8127 |
]. |
|
8128 |
]. |
|
8129 |
(signal == TerminateProcessRequest) ifTrue:[ |
|
8130 |
"/ mhm - someone wants to shoot me down while debugging ... |
|
8131 |
answer := Dialog |
|
8132 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
|
8133 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
8134 |
values:#( #proceed #close ) |
|
8135 |
default:#close. |
|
8136 |
answer == #close ifTrue:[ |
|
8137 |
self destroy. |
|
8138 |
ex reject |
|
8139 |
]. |
|
8140 |
ex return. |
|
8141 |
]. |
|
8142 |
signal == RecursiveExceptionError ifTrue:[ |
|
8143 |
(ex exception creator == BreakPointInterrupt) |
|
8144 |
ifTrue:[ |
|
8145 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
|
8146 |
ex proceed. |
|
8147 |
]. |
|
8148 |
||
8149 |
self showError:'*** Recursive error in debugger: |
|
266 | 8150 |
|
12687
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
8151 |
>>>> Signal: ' , ex creator printString , ' |
1d78c217e701
use #creator instead of #signal
Claus Gittinger <cg@exept.de>
parents:
12671
diff
changeset
|
8152 |
>>>> ' , ex parameter creator printString , ' |
266 | 8153 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 8154 |
>>>> From: ' , ex suspendedContext sender printString , ' |
8155 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
8156 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
8157 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 8158 |
>>>> Message: ' , ex description , ' |
266 | 8159 |
|
1187 | 8160 |
caught & ignored.'. |
15757 | 8161 |
ex return |
8162 |
]. |
|
8163 |
]. |
|
8164 |
||
8165 |
self topView raiseDeiconified. |
|
8166 |
||
8167 |
eMsg := ex description. |
|
8168 |
(signal isControlInterrupt) ifTrue:[ |
|
8169 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
|
8170 |
]. |
|
8171 |
Dialog aboutToOpenBoxNotificationSignal |
|
8172 |
handle:[:ex | ex proceed ] |
|
8173 |
do:[ |
|
8174 |
answer := Dialog |
|
8175 |
choose:(ex creator class name,' in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
|
8176 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
8177 |
values:#( #proceed #cancel #debug ) |
|
8178 |
default:#cancel. |
|
8179 |
]. |
|
8180 |
answer == #debug ifTrue:[ |
|
8181 |
'DebugView [info]: caught exception - debugging' infoPrintCR. |
|
8182 |
Debugger |
|
8183 |
enterUnconditional:(ex suspendedContext) |
|
8184 |
withMessage:(ex creator class name,' in debugger: ' , eMsg) |
|
8185 |
mayProceed:true. |
|
8186 |
ex proceed. |
|
8187 |
]. |
|
8188 |
answer == #proceed ifTrue:[ |
|
8189 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
|
8190 |
ex proceed. |
|
8191 |
]. |
|
8192 |
'DebugView [info]: caught exception - returning' infoPrintCR. |
|
8193 |
ex return. |
|
8194 |
] do:[ |
|
8195 |
"/ make certain that sub-debuggers, inspectors etc. |
|
8196 |
"/ come up on my device. |
|
8197 |
Screen currentScreenQuerySignal answer:self graphicsDevice |
|
8198 |
do:[ |
|
8199 |
Dialog aboutToOpenBoxNotificationSignal |
|
8200 |
handle:[:ex | ex proceed ] |
|
8201 |
do:[ |
|
8202 |
windowGroup |
|
8203 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
8204 |
true] |
|
8205 |
onLeave:[] |
|
8206 |
] |
|
8207 |
] |
|
8208 |
]. |
|
266 | 8209 |
]. |
8210 |
catchBlock := nil. |
|
8211 |
||
11818 | 8212 |
"Created: / 24-11-1995 / 20:33:45 / cg" |
8213 |
"Modified: / 26-09-2012 / 15:03:39 / cg" |
|
266 | 8214 |
! ! |
8215 |
||
13416 | 8216 |
!DebugView methodsFor:'queries'! |
8217 |
||
13488 | 8218 |
canDefineForCallee:callee |
8219 |
"again, pure heuristics here" |
|
8220 |
||
13489 | 8221 |
|mthd app heuristic selector| |
13488 | 8222 |
|
8223 |
classToDefineIn := selectorToDefine := nil. "/ sorry - left as info to define action |
|
8224 |
||
8225 |
callee notNil ifTrue:[ |
|
15413 | 8226 |
"/ clicked on an unimplemented method ? |
8227 |
callee sender notNil ifTrue:[ |
|
8228 |
mthd := callee sender method. |
|
8229 |
mthd isNil ifTrue:[ |
|
8230 |
callee sender isBlockContext ifFalse:[ |
|
8231 |
"/ an unimplemented method |
|
8232 |
selector := callee sender selector. |
|
8233 |
(callee sender receiver class canUnderstand:selector) ifFalse:[ |
|
8234 |
classToDefineIn := callee sender receiver class. |
|
8235 |
selectorToDefine := selector. |
|
8236 |
^ true |
|
8237 |
] |
|
8238 |
] |
|
8239 |
]. |
|
8240 |
]. |
|
8241 |
||
8242 |
mthd := callee method. |
|
8243 |
mthd notNil ifTrue:[ |
|
8244 |
(mthd selector == #subclassResponsibility) ifTrue:[ |
|
8245 |
classToDefineIn := callee sender receiver class. |
|
8246 |
selectorToDefine := callee sender selector. |
|
8247 |
^ true. |
|
8248 |
]. |
|
8249 |
||
8250 |
"/ that's a big hack, but I am tired of navigating to find the missing menu message... |
|
8251 |
"/ you will thank me!! |
|
8252 |
mthd selector == #error:mayProceed: ifTrue:[ |
|
8253 |
(callee receiver isKindOf:MenuPanel) ifTrue:[ |
|
8254 |
callee sender home notNil ifTrue:[ |
|
8255 |
(callee sender home selector startsWith:'accept:') ifTrue:[ |
|
8256 |
(inspectedProcess notNil and:[inspectedProcess isGUIProcess]) ifTrue:[ |
|
8257 |
(app := self processesApplication) notNil ifTrue:[ |
|
8258 |
heuristic := callee sender home argsAndVars select:[:o | o isSymbol]. |
|
8259 |
heuristic size == 1 ifTrue:[ |
|
8260 |
classToDefineIn := app class. |
|
8261 |
selectorToDefine := heuristic first. |
|
8262 |
^ true |
|
8263 |
]. |
|
8264 |
]. |
|
8265 |
]. |
|
8266 |
]. |
|
8267 |
]. |
|
8268 |
]. |
|
8269 |
] |
|
8270 |
] |
|
13488 | 8271 |
]. |
8272 |
^ false |
|
8273 |
! |
|
8274 |
||
13489 | 8275 |
showingAlreadyModifiedCode |
8276 |
^ methodCodeToggle isVisible |
|
8277 |
and:[ methodCodeToggleSelectionHolder value = 2 ] |
|
8278 |
! ! |
|
8279 |
||
8280 |
!DebugView methodsFor:'user interaction'! |
|
8281 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8282 |
checkIfCodeIsReallyModified |
6616 | 8283 |
|source| |
8284 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8285 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8286 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8287 |
currentMethod isNil ifTrue:[ |
15413 | 8288 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8289 |
]. |
6616 | 8290 |
source := currentMethod source. |
8291 |
source notNil ifTrue:[ |
|
15413 | 8292 |
source string = codeView contents string ifTrue:[ |
8293 |
^ false |
|
8294 |
]. |
|
8295 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
8296 |
^ false |
|
8297 |
]. |
|
6616 | 8298 |
]. |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8299 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8300 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8301 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
8302 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
8303 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
8304 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
8305 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
8306 |
checkSelectionChangeAllowed:newSelection |
13388 | 8307 |
|answer v| |
8308 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8309 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8310 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8311 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8312 |
and:[newSelection = contextView selection]) ifTrue:[ |
15413 | 8313 |
^ true |
8314 |
]. |
|
8315 |
||
8316 |
answer := Dialog |
|
8317 |
confirmWithCancel:('Code modified - change selection anyway ?') |
|
8318 |
labels:#('No' 'No, Show Diffs' 'Yes'). |
|
13388 | 8319 |
answer isNil ifTrue:[^ false]. |
8320 |
answer == false ifTrue:[ |
|
15413 | 8321 |
v := DiffCodeView |
8322 |
openOn:codeView contents |
|
8323 |
label:(resources string:'Changed code (to be accepted ?)') |
|
8324 |
and:currentMethod source |
|
8325 |
label:(resources string:'Method''s actual (maybe original) code'). |
|
8326 |
v label:(resources string:'Comparing method''s code'). |
|
8327 |
v waitUntilVisible. |
|
8328 |
^ false |
|
13388 | 8329 |
]. |
8330 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
8331 |
codeView modified:false. |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
8332 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
8333 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
8334 |
|
266 | 8335 |
codeAccept:someCode |
13394 | 8336 |
"user wants some code to be recompiled" |
8337 |
||
14640 | 8338 |
ParseError handle:[:ex | |
15413 | 8339 |
ex lineNumber notNil ifTrue:[ |
8340 |
codeView selectLine:ex lineNumber. "/ selectFromCharacterPosition:ex startPosition to:ex endPosition. |
|
8341 |
]. |
|
8342 |
Dialog information:ex description. |
|
14640 | 8343 |
"/ ParseError new |
8344 |
"/ errorMessage:aMessage startPosition:position endPosition:endPos; |
|
8345 |
"/ parameter:self; |
|
8346 |
"/ lineNumber:tokenLineNr; "lineNr" |
|
8347 |
"/ raiseRequest. |
|
15413 | 8348 |
] do:[ |
8349 |
^ self codeAccept:someCode unwind:false category:nil onCancel:nil |
|
14640 | 8350 |
]. |
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
8351 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
8352 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 8353 |
! |
8354 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8355 |
codeAccept:someCode inClass:aClass unwind:doUnwind category:category onCancel:cancelAction |
13394 | 8356 |
"user wants some code to be recompiled. |
8357 |
Optionally unwind stack to right above the changed method. |
|
13455 | 8358 |
This undwind option is a leftover from times, when the debugger had no chance to |
15413 | 8359 |
show the original code. |
8360 |
Now, it can, and got a choice-field to select between original and changed code. |
|
8361 |
So the undwind option is not longer used and probably completely obsolete now |
|
13455 | 8362 |
(aka: this method is always called with doUnwind==false, these days)" |
3427 | 8363 |
|
13842 | 8364 |
|con newMethod| |
3427 | 8365 |
|
8366 |
codeView withWaitCursorDo:[ |
|
15413 | 8367 |
" |
8368 |
find the method-home context for this one |
|
8369 |
" |
|
8370 |
doUnwind ifTrue:[ |
|
8371 |
con := selectedContext. |
|
8372 |
top := con. |
|
8373 |
[con notNil] whileTrue:[ |
|
8374 |
(con methodHome == selectedContext) ifTrue:[ |
|
8375 |
top := con |
|
8376 |
]. |
|
8377 |
con := con sender |
|
8378 |
]. |
|
8379 |
]. |
|
8380 |
||
8381 |
"/ |
|
8382 |
"/ provide the classes nameSpace and changefile-update answers; |
|
8383 |
"/ in case we accept while in another context, to not capture these settings again |
|
8384 |
"/ |
|
8385 |
(Class updateChangeFileQuerySignal, |
|
8386 |
Class updateChangeListQuerySignal, |
|
8387 |
Class updateHistoryLineQuerySignal) answer:true |
|
8388 |
do:[ |
|
8389 |
Class nameSpaceQuerySignal answer:(aClass nameSpace) |
|
8390 |
do:[ |
|
8391 |
"/ the compiler nowadays already cares for the package... |
|
8392 |
"/ no, actually, it does not in case we are in the middle of a fileIn, |
|
8393 |
"/ and packageQuery is already answered by someone else. |
|
8394 |
"/ Better make it unpackaged, in case the user makes changes to other |
|
8395 |
"/ classes here (actually, I often change compiler, debugger, inspector here) |
|
8396 |
Class packageQuerySignal |
|
8397 |
answer:nil |
|
8398 |
do:[ |
|
8399 |
codeView contents:someCode. |
|
8400 |
Class methodRedefinitionNotification |
|
8401 |
answer:#keep |
|
8402 |
do:[ |
|
8403 |
| breakpoints | |
|
8404 |
||
8405 |
breakpoints := nil. |
|
8406 |
codeView isCodeView2 ifTrue:[ |
|
8407 |
breakpoints := codeView breakpoints. |
|
8408 |
]. |
|
8409 |
||
8410 |
BreakpointQuery answer: breakpoints do:[ |
|
8411 |
"/ Use original method's programming language instead of class's one. |
|
8412 |
"/ In most cases it's the same, but it may be that the method edited |
|
8413 |
"/ and accepted was an extension method written in another languages |
|
8414 |
"/ (such as Smalltalk extension to Java class or Ruby extension to |
|
8415 |
"/ Smalltalk class. |
|
8416 |
newMethod := selectedContext programmingLanguage compilerClassForInteractiveTools |
|
8417 |
compile:someCode |
|
8418 |
forClass:aClass |
|
8419 |
inCategory:category |
|
8420 |
notifying:codeView. |
|
8421 |
"/ Kludge for accepting Java code in a debugger. The Java compiler |
|
8422 |
"/ does not compile single classes by always a full class and returns |
|
8423 |
"/ the compiled class(es) rather than a method. However, we need to update |
|
8424 |
"/ method holder of a codeView. |
|
8425 |
"/ |
|
8426 |
"/ So, here we check whether the retuned `newMethod` is really a method, |
|
8427 |
"/ if it's a class, try to search that class for a method with the |
|
8428 |
"/ same selector as selector of currently selected context. If found, |
|
8429 |
"/ thet's the 'new' method we are going to show. |
|
8430 |
newMethod isBehavior ifTrue:[ |
|
8431 |
| selector | |
|
8432 |
||
8433 |
selector := selectedContext selector. |
|
8434 |
newMethod := newMethod"actually a class" compiledMethodAt: selector ifAbsent: nil. |
|
8435 |
]. |
|
8436 |
]. |
|
8437 |
]. |
|
8438 |
]. |
|
8439 |
]. |
|
8440 |
]. |
|
8441 |
||
8442 |
methodCodeToggleSelectionHolder value:2. "/ showing current code |
|
8443 |
methodCodeToggle beVisible. |
|
8444 |
||
8445 |
inspecting ifFalse:[ |
|
8446 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
8447 |
codeView modified:false. |
|
8448 |
codeView isCodeView2 ifTrue:[ |
|
8449 |
codeView methodHolder value: newMethod. |
|
8450 |
]. |
|
8451 |
||
8452 |
doUnwind ifTrue:[ |
|
8453 |
"/ if it worked, and doUnwind is true, |
|
8454 |
"/ remove everything up to and including top |
|
8455 |
"/ from the context chain |
|
8456 |
||
8457 |
selectedContext canReturn ifTrue:[ |
|
8458 |
self setContext:(top "sender"). |
|
8459 |
exitAction := #restart. |
|
8460 |
selectedContext setLineNumber:1. |
|
8461 |
self doRestart. |
|
8462 |
] ifFalse:[ |
|
8463 |
self setContext:(top sender). |
|
8464 |
exitAction := #return. |
|
8465 |
]. |
|
8466 |
]. |
|
8467 |
] ifFalse:[ |
|
8468 |
^ cancelAction value |
|
8469 |
] |
|
8470 |
]. |
|
3427 | 8471 |
]. |
8472 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
8473 |
"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
|
8474 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
14713 | 8475 |
"Modified: / 17-08-2014 / 11:44:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3427 | 8476 |
! |
8477 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8478 |
codeAccept:someCode unwind:doUnwind category:givenCategoryOrNil onCancel:cancelAction |
13394 | 8479 |
"user wants some code to be recompiled" |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8480 |
|
12812 | 8481 |
|sel implementorClass receiverClass method category| |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8482 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8483 |
codeView withWaitCursorDo:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8484 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8485 |
"/ 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
|
8486 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8487 |
"/ con := selectedContext. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8488 |
"/ top := con. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8489 |
"/ [con notNil] whileTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8490 |
"/ (con methodHome == selectedContext) ifTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8491 |
"/ top := con |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8492 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8493 |
"/ con := con sender |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8494 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8495 |
|
15413 | 8496 |
" |
8497 |
use class&selector to find the method for the compilation |
|
8498 |
and compile. |
|
8499 |
" |
|
8500 |
category := givenCategoryOrNil. |
|
8501 |
sel := selectedContext selector. |
|
8502 |
implementorClass := selectedContext methodClass. |
|
8503 |
method := selectedContext method. |
|
8504 |
||
8505 |
implementorClass isNil ifTrue:[ |
|
8506 |
(method notNil and:[method mclass isNil and:[method wrapper notNil]]) ifTrue:[ |
|
8507 |
method := method wrapper. |
|
8508 |
]. |
|
8509 |
method notNil ifTrue:[ |
|
8510 |
implementorClass := method mclass. |
|
8511 |
implementorClass isNil ifTrue:[ |
|
8512 |
implementorClass := method getMclass |
|
8513 |
]. |
|
8514 |
]. |
|
8515 |
]. |
|
8516 |
implementorClass notNil ifTrue:[ |
|
8517 |
category isNil ifTrue:[ |
|
8518 |
method isNil ifTrue:[ |
|
8519 |
method := implementorClass compiledMethodAt:sel. |
|
8520 |
]. |
|
8521 |
category := method category |
|
8522 |
] |
|
8523 |
] ifFalse:[ |
|
8524 |
receiverClass := selectedContext receiver class. |
|
8525 |
implementorClass := receiverClass whichClassImplements:sel. |
|
8526 |
implementorClass := implementorClass ? receiverClass. |
|
8527 |
implementorClass ~~ Object ifTrue:[ |
|
8528 |
implementorClass := Dialog |
|
8529 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
|
8530 |
initialAnswer:implementorClass name |
|
8531 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
8532 |
implementorClass size == 0 ifTrue:[ |
|
8533 |
^ cancelAction value "/ cancelled |
|
8534 |
]. |
|
8535 |
implementorClass := Smalltalk classNamed:implementorClass. |
|
8536 |
implementorClass isNil ifTrue:[ |
|
8537 |
Dialog warn:'No such class'. |
|
8538 |
^ cancelAction value "/ cancelled |
|
8539 |
]. |
|
8540 |
]. |
|
8541 |
]. |
|
8542 |
||
8543 |
self |
|
8544 |
codeAccept:someCode |
|
8545 |
inClass:implementorClass |
|
8546 |
unwind:doUnwind |
|
8547 |
category:category |
|
8548 |
onCancel:cancelAction. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8549 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8550 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8551 |
"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
|
8552 |
"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
|
8553 |
! |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8554 |
|
7912 | 8555 |
codeCompletion |
15413 | 8556 |
"/ I found this code 3 times (CodeView2, NewSystemBrowser and DebugView) - smell? |
14109 | 8557 |
"/ (can we move that to a utility - probably DoWhatIMeanSupport) |
8558 |
||
8559 |
|cls language| |
|
7912 | 8560 |
|
8212 | 8561 |
currentMethod isNil ifTrue:[ ^ self ]. |
8338 | 8562 |
|
7912 | 8563 |
cls := currentMethod mclass. |
15413 | 8564 |
cls notNil ifTrue:[ |
8565 |
language := cls programmingLanguage. |
|
14109 | 8566 |
]. |
8212 | 8567 |
|
7912 | 8568 |
UserInformation handle:[:ex | |
15413 | 8569 |
ex proceed. |
7912 | 8570 |
] do:[ |
15413 | 8571 |
DoWhatIMeanSupport codeCompletionForLanguage:language class:cls context:selectedContext codeView:codeView. |
13562
56d3659b75a0
Pass programming language when asking DWIM to complete code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13553
diff
changeset
|
8572 |
]. |
56d3659b75a0
Pass programming language when asking DWIM to complete code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13553
diff
changeset
|
8573 |
|
56d3659b75a0
Pass programming language when asking DWIM to complete code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13553
diff
changeset
|
8574 |
"Modified: / 18-09-2013 / 14:20:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7912 | 8575 |
! |
8576 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
8577 |
confirm:aString |
6971 | 8578 |
"open a modal yes-no dialog. |
8579 |
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
|
8580 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
8581 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
15413 | 8582 |
^ true |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
8583 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
8584 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
8585 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
8586 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
8587 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
8588 |
"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
|
8589 |
Also sent to autoselect an interesting context on entry." |
0 | 8590 |
|
9235 | 8591 |
HaltInterrupt handle:[:ex | |
15413 | 8592 |
ignoreBreakpoints ifFalse:[ex reject]. |
8593 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [doShowSelection.]' bindWith:ex suspendedContext) infoPrintCR. |
|
8594 |
ex proceed |
|
3447 | 8595 |
] do:[ |
15413 | 8596 |
self updateForContext:lineNr |
3269 | 8597 |
]. |
8598 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
8599 |
|
3447 | 8600 |
"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
|
8601 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8602 |
|
10205 | 8603 |
hideStackInspector |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8604 |
stackInspector notNil ifTrue:[ |
15413 | 8605 |
stackInspector destroy. |
8606 |
stackInspector := nil. |
|
8607 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
|
8608 |
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
|
8609 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8610 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8611 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8612 |
methodCodeToggleChanged |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8613 |
|sel| |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8614 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8615 |
sel := contextView selection. |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8616 |
sel notNil ifTrue:[ |
15413 | 8617 |
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
|
8618 |
] |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8619 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8620 |
"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
|
8621 |
! |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
8622 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8623 |
processEvent:anEvent |
6129 | 8624 |
"filter keyboard events for popUp variable value display. |
8625 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8626 |
|
12106 | 8627 |
<resource: #keyboard (#CodeCompletion )> |
8628 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8629 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8630 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8631 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8632 |
evView notNil ifTrue:[ |
15413 | 8633 |
focusView := evView windowGroup focusView. |
8634 |
focusView isNil ifTrue:[ |
|
8635 |
focusView := evView. |
|
8636 |
]. |
|
8637 |
||
8638 |
anEvent isKeyPressEvent ifTrue:[ |
|
8639 |
key := anEvent key. |
|
8640 |
rawKey := anEvent rawKey. |
|
8641 |
||
8642 |
inCodeView := (focusView == codeView |
|
8643 |
or:[focusView isComponentOf:codeView]). |
|
8644 |
inCodeView ifTrue:[ |
|
8645 |
key == #CodeCompletion ifTrue:[ |
|
8646 |
"/ complete the word before/under the cursor. |
|
8647 |
self sensor |
|
8648 |
pushUserEvent:#codeCompletion |
|
8649 |
for:self |
|
8650 |
withArguments:#(). |
|
8651 |
^ true |
|
8652 |
]. |
|
8653 |
]. |
|
8654 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8655 |
|
3602 | 8656 |
false ifTrue:[ |
15413 | 8657 |
anEvent isButtonReleaseEvent ifTrue:[ |
8658 |
anEvent view == codeView ifTrue:[ |
|
8659 |
(RBParser notNil and:[RBParser isLoaded]) |
|
8660 |
ifTrue:[ |
|
8661 |
self sensor |
|
8662 |
pushEvent:anEvent. "/ must be first in queue |
|
8663 |
||
8664 |
self sensor |
|
8665 |
pushUserEvent:#explainSelection |
|
8666 |
for:self |
|
8667 |
withArguments:nil. |
|
8668 |
^ true "/ eaten |
|
8669 |
] |
|
8670 |
] |
|
8671 |
]. |
|
3602 | 8672 |
]. |
8673 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8674 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8675 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8676 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
8677 |
|
8212 | 8678 |
setCurrentMethod:aMethodOrNil |
8679 |
currentMethod := aMethodOrNil. |
|
8680 |
! |
|
8681 |
||
15413 | 8682 |
showSelection:lineNr |
1327 | 8683 |
"user clicked on a header line - show selected code in textView. |
8684 |
Also sent to autoselect an interesting context on entry." |
|
15413 | 8685 |
|
8686 |
UserNotification |
|
8687 |
handle:[:ex | |
|
8688 |
"/ ex suspendedContext fullPrintAll. |
|
8689 |
Transcript showCR:ex description. |
|
8690 |
"/ Transcript showCR:ex parameter. |
|
8691 |
ex proceed |
|
8692 |
] |
|
8693 |
do:[ |
|
8694 |
Error |
|
8695 |
handle:[:ex | |
|
8696 |
|s con| |
|
8697 |
||
8698 |
ex creator isControlInterrupt ifTrue:[ |
|
8699 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' |
|
8700 |
infoPrintCR. |
|
8701 |
ex proceed |
|
8702 |
]. |
|
8703 |
('DebugView [info]: error at %1 when showing selection in debugger ignored' |
|
8704 |
bindWith:ex suspendedContext) infoPrintCR. |
|
8705 |
s := '' writeStream. |
|
8706 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
8707 |
s nextPutLine:'****'. |
|
8708 |
s nextPutLine:'**** ',(ex description). |
|
8709 |
s nextPutLine:'****'. |
|
8710 |
con := ex suspendedContext. |
|
8711 |
s nextPutLine:'**** ',(con printString). |
|
8712 |
con := con sender. |
|
8713 |
HaltInterrupt ignoreIn:[ con fullPrintAllOn:s. ]. |
|
8714 |
||
5842 | 8715 |
"/ [con notNil] whileTrue:[ |
8716 |
"/ Error catch:[:ex | |
|
8717 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
8718 |
"/ ]. |
|
4947 | 8719 |
"/ |
5842 | 8720 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
8721 |
"/ con := nil |
|
8722 |
"/ ] ifFalse:[ |
|
8723 |
"/ con := con sender. |
|
8724 |
"/ ] |
|
8725 |
"/ ]. |
|
15413 | 8726 |
|
8727 |
codeView contents:(s contents). |
|
8728 |
ex return. |
|
8729 |
] |
|
8730 |
do:[ self doShowSelection:lineNr ] |
|
8731 |
] |
|
11610 | 8732 |
|
8733 |
"Modified: / 19-07-2012 / 10:56:58 / cg" |
|
1327 | 8734 |
! |
8735 |
||
10205 | 8736 |
showStackInspectorFor:con |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8737 |
stackInspector isNil ifTrue:[ |
15413 | 8738 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
8739 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
|
8740 |
stackInspector := InspectorView |
|
8741 |
origin:(0.6 @ 0.0) |
|
8742 |
corner:(1.0 @ 1.0) |
|
8743 |
in:contextInspector superView. |
|
8744 |
stackInspector realize. |
|
8745 |
stackInspector fieldListLabel:'Stack'. |
|
8746 |
stackInspector hideReceiver:true |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8747 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8748 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8749 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8750 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
8751 |
|
12529 | 8752 |
updateContextInfoFor:aContext |
8753 |
"additional info as-per selected context; |
|
8754 |
for now: |
|
15656 | 8755 |
update:with:from: - show who was responsible |
12529 | 8756 |
" |
8757 |
||
12552 | 8758 |
|whatChanged changedObject receiver| |
12529 | 8759 |
|
8760 |
aContext selector == #'update:with:from:' ifTrue:[ |
|
15656 | 8761 |
receiver := aContext receiver. |
8762 |
whatChanged := aContext argAt:1. |
|
8763 |
changedObject := aContext argAt:3. |
|
8764 |
||
8765 |
changedObject isBehavior ifTrue:[ |
|
8766 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject name allBold). |
|
8767 |
^ self |
|
8768 |
]. |
|
8769 |
||
8770 |
receiver class allInstanceVariableNames keysAndValuesDo:[:i :nm | |
|
8771 |
|val| |
|
8772 |
||
8773 |
IsDebuggingQuery answer:true do:[ |
|
8774 |
val := (receiver instVarAt:i). |
|
8775 |
]. |
|
8776 |
val == changedObject ifTrue:[ |
|
8777 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',nm allBold). |
|
8778 |
^ self |
|
8779 |
] |
|
8780 |
]. |
|
8781 |
||
8782 |
(receiver isKindOf:ApplicationModel) ifTrue:[ |
|
8783 |
receiver builder notNil ifTrue:[ |
|
8784 |
(receiver builder bindings ? #()) keysAndValuesDo:[:eachAspect :eachValue | |
|
8785 |
eachValue == changedObject ifTrue:[ |
|
8786 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by aspect ',eachAspect allBold). |
|
8787 |
^ self |
|
8788 |
] |
|
8789 |
] |
|
8790 |
] |
|
8791 |
]. |
|
8792 |
||
8793 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject classNameWithArticle allBold). |
|
8794 |
^self. |
|
12529 | 8795 |
]. |
8796 |
contextInfoLabel label:nil. |
|
8797 |
! |
|
8798 |
||
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8799 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8800 |
"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
|
8801 |
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
|
8802 |
|
56 | 8803 |
|con homeContext sel method code canAccept |
105 | 8804 |
implementorClass lineNrInMethod rec m line |
10205 | 8805 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 8806 |
codeSet highlighter evaluatorClass |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8807 |
canDefine callee searchClass originalMethod cannotAcceptDueToOutdatedClass| |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8808 |
|
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
8809 |
canDefine := cannotAcceptDueToOutdatedClass := false. |
8212 | 8810 |
self setCurrentMethod:nil. |
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
8811 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
8812 |
contextArray notNil ifTrue:[ |
15413 | 8813 |
lineNr <= contextArray size ifTrue:[ |
8814 |
con := contextArray at:lineNr. |
|
8815 |
callee := contextArray at:lineNr-1 ifAbsent:nil. |
|
8816 |
]. |
|
8817 |
" |
|
8818 |
clicking on the '** ...'-line shows more ... |
|
8819 |
" |
|
8820 |
con isNil ifTrue:[ |
|
8821 |
line := contextView list at:lineNr. |
|
8822 |
(line startsWith:'**') ifTrue:[ |
|
8823 |
self showMore. |
|
8824 |
lineNr >= contextArray size ifTrue:[ |
|
8825 |
contextView setSelection:lineNr. |
|
8826 |
con := contextArray at:lineNr ifAbsent:nil |
|
8827 |
] |
|
8828 |
]. |
|
8829 |
con isNil ifTrue:[ |
|
8830 |
codeView contents:nil. |
|
8831 |
^ self |
|
8832 |
]. |
|
8833 |
]. |
|
8834 |
||
8835 |
selectedContext := con. |
|
8836 |
m := contextView middleButtonMenu. |
|
8837 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
|
8838 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
|
8839 |
]. |
|
8840 |
||
8841 |
self withExecuteCursorDo:[ |
|
8842 |
codeSet := false. |
|
8843 |
||
8844 |
" |
|
8845 |
give it to the (lower right) inspector |
|
8846 |
" |
|
8847 |
Error handle:[:ex | |
|
8848 |
'DebugView [warning]: error while accessing context: ' errorPrint. |
|
8849 |
ex description errorPrintCR. |
|
8850 |
contextInspector inspect:nil. |
|
8851 |
contextInspector fieldListLabel:('Context'). |
|
8852 |
ex suspendedContext fullPrintAllOn: Transcript. |
|
9479 | 8853 |
"/ ex reject. |
15413 | 8854 |
] do:[ |
8855 |
contextInspector inspect:con. |
|
8856 |
"/ contextInspector fieldListLabel:('Context: ',con method whoString). |
|
8857 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
|
8858 |
]. |
|
8859 |
||
8860 |
"/ show a stack inspector sometimes |
|
8861 |
||
8862 |
con hasStackToShow ifTrue:[ |
|
8863 |
self showStackInspectorFor:con |
|
8864 |
] ifFalse:[ |
|
8865 |
self hideStackInspector |
|
8866 |
]. |
|
8867 |
||
8868 |
homeContext := con methodHome. |
|
8869 |
con canReturn ifTrue:[ |
|
8870 |
returnButton enable. restartButton enable. |
|
8871 |
] ifFalse:[ |
|
8872 |
returnButton disable. restartButton disable. |
|
8873 |
]. |
|
8874 |
||
8875 |
lineNrInMethod := con lineNumber. |
|
8876 |
||
8877 |
canAccept := false. |
|
8878 |
||
8879 |
homeContext isNil ifTrue:[ |
|
8880 |
" |
|
8881 |
mhmh - an optimized block |
|
8882 |
should get the block here, and get the method from |
|
8883 |
that one ... |
|
8884 |
But in the current version, there is no easy way to get to the block |
|
8885 |
since that one is not in the context. |
|
8886 |
A future new block calling scheme will fix this |
|
8887 |
(passing the block instead of the home as block argument). |
|
8888 |
" |
|
8889 |
(method := con method) isNil ifTrue:[ |
|
8890 |
"temporary kludge - peek into the sender context. |
|
8891 |
If its a do-like method and there is a single block variable |
|
8892 |
in the args or temporaries, that must be the one. |
|
8893 |
This helps in some cases. |
|
8894 |
" |
|
8895 |
(sender := con sender) notNil ifTrue:[ |
|
8896 |
tryVars := false. |
|
8897 |
(selSender := sender selector) notNil ifTrue:[ |
|
8898 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
|
8899 |
tryVars := true. |
|
8900 |
] |
|
8901 |
]. |
|
8902 |
tryVars ifTrue:[ |
|
8903 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
|
8904 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
|
8905 |
possibleBlocks size == 1 ifTrue:[ |
|
8906 |
method := possibleBlocks first method. |
|
8907 |
]. |
|
8908 |
] |
|
8909 |
]. |
|
8910 |
] |
|
8911 |
] ifFalse:[ |
|
8912 |
"fetch rec here - so we won't need context in doItAction" |
|
8913 |
rec := homeContext receiver. |
|
8914 |
sel := homeContext selector. |
|
8915 |
sel notNil ifTrue:[ |
|
8916 |
canAccept := true. |
|
8917 |
||
8918 |
implementorClass := homeContext methodClass. |
|
8919 |
implementorClass isNil ifTrue:[ |
|
8920 |
homeContext method notNil ifTrue:[ |
|
8921 |
WrappedMethod allInstancesDo:[:wrapped | |
|
8922 |
wrapped originalMethod == homeContext method ifTrue:[ |
|
8923 |
implementorClass := wrapped mclass |
|
8924 |
] |
|
8925 |
]. |
|
8926 |
implementorClass isNil ifTrue:[ |
|
8927 |
(homeContext searchClass notNil |
|
8928 |
and:[homeContext searchClass isObsolete]) ifTrue:[ |
|
8929 |
cannotAcceptDueToOutdatedClass := true. |
|
8930 |
] |
|
8931 |
]. |
|
8932 |
]. |
|
8933 |
]. |
|
8934 |
implementorClass isNil ifTrue:[ |
|
8935 |
Error handle:[:ex | |
|
11890 | 8936 |
"/ not covered by Error, anyway |
8937 |
"/ ex signal == BreakPointInterrupt ifTrue:[ |
|
8938 |
"/ ex proceed. |
|
8939 |
"/ ]. |
|
15413 | 8940 |
code := 'error while asking method for its source'. |
8941 |
code := code , Character cr , ex creator printString. |
|
8942 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
8943 |
||
8944 |
canAccept := false. |
|
8945 |
ex return. |
|
8946 |
] do:[ |
|
8947 |
" |
|
8948 |
special: look if this context was created by |
|
8949 |
valueWithReceiver kind of method invocation; |
|
8950 |
if so, grab the method from the sender and show it |
|
8951 |
" |
|
8952 |
((sender := homeContext sender) notNil |
|
8953 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
|
8954 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
8955 |
method := sender receiver. |
|
8956 |
canAccept := false. |
|
8957 |
] ifFalse:[ |
|
8958 |
(method := con method) notNil ifTrue:[ |
|
8959 |
canAccept := false. |
|
8960 |
] |
|
8961 |
]. |
|
8962 |
] |
|
8963 |
] ifFalse:[ |
|
8964 |
method := implementorClass compiledMethodAt:sel. |
|
8965 |
]. |
|
8966 |
] |
|
8967 |
]. |
|
8968 |
||
8969 |
homeContext notNil ifTrue:[ |
|
8970 |
searchClass := homeContext searchClass ? rec class. |
|
8971 |
currentMethod := searchClass lookupMethodFor:sel. |
|
8972 |
]. |
|
8973 |
originalMethod := currentMethod. |
|
8974 |
(currentMethod notNil |
|
8975 |
and:[currentMethod ~~ method |
|
8976 |
and:[ (currentMethod isWrapped and:[ method == currentMethod originalMethod]) not ]]) ifTrue:[ |
|
8977 |
originalMethod := method. |
|
8978 |
methodCodeToggleSelectionHolder value = 1 ifTrue:[ |
|
8979 |
method := originalMethod. "/ the one which is suspended / was executing |
|
8980 |
] ifFalse:[ |
|
8981 |
method := currentMethod. "/ the one which has already been accepted/modified. |
|
8982 |
lineNrInMethod := nil. |
|
8983 |
canAccept := true. |
|
8984 |
]. |
|
8985 |
methodCodeToggle beVisible. |
|
8986 |
] ifFalse:[ |
|
8987 |
methodCodeToggle beInvisible. |
|
8988 |
]. |
|
8989 |
||
8990 |
code isNil ifTrue:[ |
|
8991 |
errMsg := nil. |
|
8992 |
method isNil ifTrue:[ |
|
8993 |
"/ fall back heuristics (see how this was called, fetch block from caller) |
|
8994 |
sender := con sender. |
|
8995 |
con isBlockContext ifTrue:[ |
|
8996 |
(sender notNil |
|
8997 |
and:[((sender selector ? '') startsWith:'value') |
|
8998 |
and:[sender receiver isBlock]]) ifTrue:[ |
|
8999 |
code := sender receiver source. |
|
9000 |
] |
|
9001 |
] ifFalse:[ |
|
9002 |
(sender notNil |
|
9003 |
and:[((sender selector ? '') startsWith:'valueWith') |
|
9004 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
9005 |
method := sender receiver. |
|
9006 |
] |
|
9007 |
] |
|
9008 |
]. |
|
9009 |
method notNil ifTrue:[ |
|
9010 |
contextInspector fieldListLabel:(method selector "whoString"). |
|
9011 |
Error handle:[:ex | |
|
11890 | 9012 |
"/ not covered by Error, anyway |
9013 |
"/ ex signal isControlInterrupt ifTrue:[ |
|
9014 |
"/ ex proceed. |
|
9015 |
"/ ]. |
|
15413 | 9016 |
code := 'error while asking method for its source'. |
9017 |
code := code , Character cr , ex creator printString. |
|
9018 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
9019 |
||
9020 |
canAccept := false. |
|
9021 |
ex return. |
|
9022 |
] do:[ |
|
9023 |
self sensor shiftDown ifTrue:[ |
|
9024 |
code := method decompiledSource |
|
9025 |
] ifFalse:[ |
|
9026 |
code := method source. |
|
9027 |
]. |
|
9028 |
]. |
|
9029 |
||
9030 |
code isNil ifTrue:[ |
|
9031 |
method sourceFilename notNil ifTrue:[ |
|
9032 |
codeView contents:(resources |
|
9033 |
string:'** no sourcefile: %1 **' |
|
9034 |
with:method sourceFilename). |
|
9035 |
codeView realized ifTrue:[ |
|
9036 |
"codeView is not realized on initial startup" |
|
9037 |
codeView flash:'no source'. |
|
9038 |
]. |
|
9039 |
codeSet := true. |
|
9040 |
] ifFalse:[ |
|
9041 |
[ |
|
9042 |
|src| |
|
9043 |
||
9044 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
|
9045 |
codeView contents:src. |
|
9046 |
codeSet := true. |
|
9047 |
] on: Error do:[ |
|
9048 |
errMsg := '** no source **' |
|
9049 |
]. |
|
9050 |
] |
|
9051 |
]. |
|
9052 |
] ifFalse:[ |
|
9053 |
contextInspector fieldListLabel:'Context'. |
|
9054 |
homeContext isNil ifTrue:[ |
|
9055 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
|
9056 |
] ifFalse:[ |
|
9057 |
errMsg := '** no method - no source **'. |
|
9058 |
canDefine := false. "/ true. |
|
9059 |
] |
|
9060 |
]. |
|
9061 |
errMsg notNil ifTrue:[ |
|
9062 |
self showError:errMsg. |
|
9063 |
codeSet := true. |
|
9064 |
] |
|
9065 |
]. |
|
9066 |
||
9067 |
code isNil ifTrue:[ |
|
9068 |
"/ canAccept := false. |
|
9069 |
codeSet ifFalse:[ |
|
9070 |
codeView contents:nil. |
|
9071 |
] |
|
9072 |
] ifFalse:[ |
|
9073 |
lineNrInMethod notNil ifTrue:[ |
|
9074 |
lineNrInMethod == 0 ifTrue:[ |
|
9075 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
9076 |
lineNrInMethod := method lineNumber |
|
9077 |
]. |
|
9078 |
"/ guess lineNumber from sent-messages selector |
|
9079 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
|
9080 |
lineNrInMethod == 0 ifTrue:[ |
|
9081 |
|conIdx sentContext messages| |
|
9082 |
||
9083 |
conIdx := contextArray identityIndexOf:con. |
|
9084 |
conIdx > 1 ifTrue:[ |
|
9085 |
sentContext := contextArray at:conIdx-1. |
|
9086 |
sentContext isBlockContext ifFalse:[ |
|
9087 |
(method notNil and:[code notNil]) ifTrue:[ |
|
9088 |
messages := method messagesSent. |
|
9089 |
messages size == 1 ifTrue:[ |
|
9090 |
sentContext selector == messages first ifTrue:[ |
|
9091 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
|
9092 |
] |
|
9093 |
] |
|
9094 |
]. |
|
9095 |
]. |
|
9096 |
]. |
|
9097 |
]. |
|
9098 |
]. |
|
9099 |
]. |
|
9100 |
codeView isCodeView2 ifTrue:[ |
|
9101 |
codeView model |
|
9102 |
setValue: code; |
|
9103 |
changed. |
|
9104 |
codeView methodHolder value: method. |
|
9105 |
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class]) |
|
9106 |
] ifFalse:[ |
|
9107 |
UserPreferences current syntaxColoring ifTrue:[ |
|
9108 |
implementorClass isNil ifTrue:[ |
|
9109 |
(con isBlockContext |
|
9110 |
and:[con home isNil |
|
9111 |
and:[con guessedHome notNil]]) |
|
9112 |
ifTrue:[ |
|
9113 |
implementorClass := con guessedHome mclass |
|
9114 |
] |
|
9115 |
]. |
|
9116 |
implementorClass notNil ifTrue:[ |
|
9117 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
|
9118 |
code size < 100000 ifTrue:[ |
|
9119 |
Error catch:[ |
|
9120 |
code := highlighter formatMethodSource:code in:implementorClass. |
|
9121 |
] |
|
9122 |
] |
|
9123 |
] |
|
9124 |
] |
|
9125 |
]. |
|
1555 | 9126 |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
9127 |
"/ code ~= (codeView contents) ifTrue:[ |
15413 | 9128 |
cannotAcceptDueToOutdatedClass ifTrue:[ |
9129 |
codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString). |
|
9130 |
] ifFalse:[ |
|
9131 |
codeView setContents:code. |
|
9132 |
]. |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
9133 |
"/ ]. |
15413 | 9134 |
]. |
9135 |
(lineNrInMethod notNil |
|
9136 |
and:[lineNrInMethod ~~ 0 |
|
9137 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
|
7000 | 9138 |
lineNrInMethod == 255 ifFalse:[ |
15413 | 9139 |
(lineNrInMethod == 255 |
9140 |
and:[method notNil |
|
9141 |
and:[method hasCode not]]) ifTrue:[ |
|
9142 |
"/ means: do not really know in interpreted methods |
|
9143 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
|
9144 |
] ifFalse:[ |
|
9145 |
codeView selectLine:lineNrInMethod. |
|
9146 |
]. |
|
9147 |
codeView makeSelectionVisible |
|
7000 | 9148 |
]. |
15413 | 9149 |
] ifFalse:[ |
9150 |
codeView unselect. |
|
9151 |
codeView scrollToTop |
|
9152 |
] |
|
9153 |
]. |
|
9154 |
||
9155 |
codeView acceptEnabled:canAccept. |
|
9156 |
canAccept ifTrue:[ |
|
9157 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
9158 |
] ifFalse:[ |
|
9159 |
codeView acceptAction:[:code | self beep] |
|
9160 |
]. |
|
9161 |
||
9162 |
receiverInspector inspect:rec. |
|
9163 |
receiverInspector fieldListLabel:("'Receiver: ',"rec classNameWithArticle). |
|
9164 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
|
9165 |
||
9166 |
" |
|
9167 |
the one below is wrong: currently, the |
|
9168 |
evaluator cannot handle passed contexts. |
|
9169 |
Once it does, pass con as in:-arg |
|
9170 |
" |
|
9171 |
(rec isJavaObject |
|
9172 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
9173 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
9174 |
evaluatorClass := Parser. |
|
9175 |
codeView commentStrings:#( '//' ( '/*' '*/' ) ). |
|
9176 |
] ifFalse:[ |
|
9177 |
(method notNil and:[method mclass notNil]) ifTrue:[ |
|
9178 |
evaluatorClass := method mclass evaluatorClass. |
|
9179 |
codeView commentStrings:method mclass programmingLanguage commentStrings. |
|
9180 |
] ifFalse:[ |
|
9181 |
evaluatorClass := rec class evaluatorClass. |
|
9182 |
codeView commentStrings:rec class programmingLanguage commentStrings. |
|
9183 |
]. |
|
9184 |
]. |
|
9185 |
||
9186 |
codeView |
|
9187 |
doItAction: |
|
9188 |
[:theCode | |
|
9189 |
evaluatorClass |
|
9190 |
evaluate:theCode |
|
9191 |
in:actualContext "/ (selectedContext ? actualContext) |
|
9192 |
receiver:rec |
|
9193 |
notifying:codeView |
|
9194 |
logged:true |
|
9195 |
ifFail:nil |
|
9196 |
]; |
|
9197 |
editedMethodOrClass:(method ? rec class). |
|
9198 |
||
9199 |
||
9200 |
self setCurrentMethod:method. |
|
9201 |
||
9202 |
selectedContext := homeContext ? con. |
|
9203 |
actualContext := con |
|
9204 |
]. |
|
4122 | 9205 |
] ifFalse:[ |
15413 | 9206 |
codeView contents:nil. |
4122 | 9207 |
]. |
9208 |
codeView modified:false. |
|
9209 |
||
9210 |
con isContext ifFalse:[ |
|
15413 | 9211 |
sendButton disable. |
4122 | 9212 |
] ifTrue:[ |
15413 | 9213 |
sendButton enable. |
10205 | 9214 |
]. |
12529 | 9215 |
self updateContextInfoFor:con. |
10205 | 9216 |
|
9217 |
"clear out locals to prevent keeping around unneeded contexts |
|
4122 | 9218 |
(due to the block held in codeView). |
9219 |
(not really needed, since stuff gets collected away sooner or later ... |
|
9220 |
... but this makes it a bit sooner) |
|
9221 |
" |
|
9222 |
con := nil. |
|
9223 |
homeContext := nil. |
|
9224 |
||
13488 | 9225 |
(canDefine or:[self canDefineForCallee:callee]) ifTrue:[ |
15413 | 9226 |
defineButton beVisible. |
4122 | 9227 |
] ifFalse:[ |
15413 | 9228 |
defineButton beInvisible. |
4122 | 9229 |
]. |
9230 |
||
12529 | 9231 |
"/ enable/disable some menu items |
4122 | 9232 |
self updateMenuItems |
9233 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
9234 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
10752 | 9235 |
"Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13394 | 9236 |
"Modified: / 28-08-2013 / 15:13:02 / cg" |
4122 | 9237 |
! ! |
9238 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9239 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'! |
8170 | 9240 |
|
9241 |
ignoreCount:something |
|
9242 |
ignoreCount := something. |
|
9243 |
! |
|
9244 |
||
9245 |
ignoreEndTime:something |
|
9246 |
ignoreEndTime := something. |
|
9247 |
! |
|
9248 |
||
12937 | 9249 |
ignoreForProcess:aProcess |
9250 |
ignoredProcesses isNil ifTrue:[ |
|
15413 | 9251 |
ignoredProcesses := WeakIdentitySet new. |
12937 | 9252 |
]. |
9253 |
ignoredProcesses add:aProcess |
|
9254 |
! |
|
9255 |
||
9256 |
ignoreForReceiverClass:aClass |
|
9257 |
ignoredReceiverClasses isNil ifTrue:[ |
|
15413 | 9258 |
ignoredReceiverClasses := WeakIdentitySet new. |
12937 | 9259 |
]. |
9260 |
ignoredReceiverClasses add:aClass |
|
9261 |
! |
|
9262 |
||
14608 | 9263 |
ignoreIfCalledFromMethod:aMethod |
9264 |
ignoredSendingClassAndSelectors isNil ifTrue:[ |
|
15413 | 9265 |
ignoredSendingClassAndSelectors := OrderedCollection new. |
14608 | 9266 |
]. |
9267 |
||
9268 |
"/ remember the method's name, not the method. |
|
9269 |
"/ so it can be recompiled and we still detect ignores |
|
9270 |
ignoredSendingClassAndSelectors add:{aMethod mclass name . aMethod selector } |
|
9271 |
! |
|
9272 |
||
11210 | 9273 |
ignoreUntilShiftKeyPressed:aBoolean |
9274 |
ignoreUntilShiftKeyPressed := aBoolean. |
|
9275 |
||
9276 |
"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
|
9277 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9278 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9279 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9280 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9281 |
decrementIgnoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9282 |
ignoreCount notNil ifTrue:[ |
15413 | 9283 |
ignoreCount > 0 ifTrue:[ |
9284 |
ignoreCount := ignoreCount - 1 |
|
9285 |
] |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9286 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9287 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9288 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9289 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9290 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9291 |
printConditionOn:aStream |
14608 | 9292 |
ignoredSendingClassAndSelectors notEmptyOrNil ifTrue:[ |
15413 | 9293 |
aStream nextPutAll:(' if called from %1 >> %2' |
9294 |
bindWith:ignoredSendingClassAndSelectors first first |
|
9295 |
with:ignoredSendingClassAndSelectors first second). |
|
9296 |
^ self. |
|
14608 | 9297 |
]. |
12937 | 9298 |
ignoredProcesses notEmptyOrNil ifTrue:[ |
15413 | 9299 |
aStream nextPutAll:(' in %1 processes (%2)' |
9300 |
bindWith:ignoredProcesses size |
|
9301 |
with:((ignoredProcesses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')). |
|
9302 |
^ self. |
|
14608 | 9303 |
]. |
9304 |
ignoredReceiverClasses notNil ifTrue:[ |
|
15413 | 9305 |
aStream nextPutAll:(' for %1 classes (%2)' |
9306 |
bindWith:ignoredReceiverClasses size |
|
9307 |
with:((ignoredReceiverClasses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')). |
|
9308 |
^ self. |
|
14608 | 9309 |
]. |
9310 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
|
15413 | 9311 |
aStream nextPutAll:' until shiftKey pressed'. |
9312 |
^ self. |
|
14608 | 9313 |
]. |
9314 |
ignoreEndTime notNil ifTrue:[ |
|
15413 | 9315 |
aStream nextPutAll:' until '. |
9316 |
ignoreEndTime printOn:aStream. |
|
9317 |
^ self. |
|
14608 | 9318 |
]. |
9319 |
(ignoreCount notNil) ifTrue:[ |
|
15413 | 9320 |
(ignoreCount > 0) ifTrue:[ |
9321 |
aStream nextPutAll:' for '. |
|
9322 |
ignoreCount printOn:aStream. |
|
9323 |
^ self. |
|
9324 |
]. |
|
9325 |
(ignoreCount < 0) ifTrue:[ |
|
9326 |
aStream nextPutAll:' forEver'. |
|
9327 |
^ self. |
|
9328 |
]. |
|
9329 |
aStream nextPutAll:' no longer'. |
|
14608 | 9330 |
]. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9331 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9332 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9333 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9334 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9335 |
haltIgnoredInfoString |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9336 |
"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
|
9337 |
nil if not ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9338 |
|
12941 | 9339 |
^ String streamContents:[:s | |
15413 | 9340 |
s nextPutAll:'ignored '. |
9341 |
self printConditionOn:s |
|
12941 | 9342 |
]. |
9343 |
||
13764
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9344 |
"/ ignoreCount notNil ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9345 |
"/ ignoreCount > 0 ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9346 |
"/ ^ '%1 more calls ignored' bindWith:ignoreCount |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9347 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9348 |
"/ ^ nil |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9349 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9350 |
"/ ignoreEndTime notNil ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9351 |
"/ (ignoreEndTime > Timestamp now) ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9352 |
"/ ^ 'ignored until %1' bindWith:ignoreEndTime |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9353 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9354 |
"/ ^ nil |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9355 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9356 |
"/ ignoreUntilShiftKeyPressed == true ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9357 |
"/ Screen current shiftDown ifFalse:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9358 |
"/ ^ 'ignored until shiftKey is pressed' |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9359 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9360 |
"/ ^ nil |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9361 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9362 |
"/ ignoredProcesses notNil ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9363 |
"/ ^ 'ignored in some processes' |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9364 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9365 |
"/ ignoredReceiverClasses notNil ifTrue:[ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9366 |
"/ ^ 'ignored for some receiver classes' |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9367 |
"/ ]. |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9368 |
"/ |
225df800cafd
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
13666
diff
changeset
|
9369 |
"/ ^ 'ignored until reenabled' |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9370 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9371 |
"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
|
9372 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9373 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9374 |
isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9375 |
"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
|
9376 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9377 |
ignoreEndTime notNil ifTrue:[ |
15413 | 9378 |
^ ignoreEndTime > Timestamp now |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9379 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9380 |
ignoreCount notNil ifTrue:[ |
15413 | 9381 |
^ ignoreCount == -1 or:[ ignoreCount > 0 ] |
12562 | 9382 |
]. |
12941 | 9383 |
ignoredProcesses notNil ifTrue:[ |
15413 | 9384 |
ignoredProcesses := ignoredProcesses reject:[:p | p notNil and:[p isDead]]. |
9385 |
ignoredProcesses isEmpty ifTrue:[ |
|
9386 |
ignoredProcesses := nil. |
|
9387 |
^ false |
|
9388 |
]. |
|
12941 | 9389 |
]. |
12562 | 9390 |
^ true |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9391 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9392 |
"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
|
9393 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9394 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9395 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9396 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9397 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9398 |
"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
|
9399 |
"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
|
9400 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9401 |
|
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9402 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9403 |
^ false |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9404 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9405 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9406 |
"Created: / 06-03-2012 / 14:36:28 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9407 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9408 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9409 |
isHaltIgnored |
12941 | 9410 |
"true if this halt should be ignored (sometimes)" |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9411 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9412 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
15413 | 9413 |
^ Screen current shiftDown not |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9414 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9415 |
ignoreCount notNil ifTrue:[ |
15413 | 9416 |
^ ignoreCount > 0 |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9417 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9418 |
ignoreEndTime notNil ifTrue:[ |
15413 | 9419 |
^ ignoreEndTime > Timestamp now |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9420 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9421 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9422 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9423 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9424 |
"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
|
9425 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9426 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9427 |
!DebugView::IgnoredHalt methodsFor:'accessing'! |
11210 | 9428 |
|
8170 | 9429 |
method |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9430 |
|m| |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9431 |
|
9922 | 9432 |
weakMethodHolder == #all ifTrue:[^ weakMethodHolder ]. |
9433 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9434 |
m := weakMethodHolder at:1. |
9796 | 9435 |
"/ wait until really gone (it could still be on the call stack |
9436 |
"/ |
|
9437 |
"/ m notNil ifTrue:[ |
|
9438 |
"/ m mclass isNil ifTrue:[ |
|
9439 |
"/ "/ no longer valid |
|
9440 |
"/ weakMethodHolder at:1 put:nil. |
|
9441 |
"/ ^ nil |
|
9442 |
"/ ]. |
|
9443 |
"/ ]. |
|
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
9444 |
^ m |
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
9445 |
|
9922 | 9446 |
"Modified: / 08-05-2011 / 10:28:10 / cg" |
8170 | 9447 |
! |
9448 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9449 |
method:methodArg lineNumber:lineNumberArg |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
9450 |
"/ self assert:(methodArg mclass notNil). |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9451 |
|
9922 | 9452 |
methodArg == #all ifTrue:[ |
15413 | 9453 |
weakMethodHolder := methodArg |
9922 | 9454 |
] ifFalse:[ |
15413 | 9455 |
weakMethodHolder := WeakArray with:methodArg. |
9922 | 9456 |
]. |
8170 | 9457 |
lineNumber := lineNumberArg. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
9458 |
|
9922 | 9459 |
"Modified: / 08-05-2011 / 10:28:41 / cg" |
8170 | 9460 |
! ! |
9461 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9462 |
!DebugView::IgnoredHalt methodsFor:'printing'! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9463 |
|
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9464 |
printOn:aStream |
9922 | 9465 |
|method| |
9466 |
||
9467 |
(method := self method) isNil ifTrue:[ |
|
15413 | 9468 |
aStream nextPutAll:'an obsolete IgnoredHalt'. |
9469 |
^ self |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9470 |
]. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
9471 |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9472 |
aStream nextPutAll:'Ignore '. |
11704 | 9473 |
method isSymbol ifTrue:[ |
15413 | 9474 |
method printOn:aStream. |
11704 | 9475 |
] ifFalse:[ |
15413 | 9476 |
method whoString printOn:aStream. |
11704 | 9477 |
]. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9478 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9479 |
|
11704 | 9480 |
"Modified: / 27-07-2012 / 23:04:42 / cg" |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9481 |
! ! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
9482 |
|
8170 | 9483 |
!DebugView::IgnoredHalt methodsFor:'queries'! |
9484 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9485 |
isActive |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9486 |
"true if this ignore-entry is still active" |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9487 |
|
12941 | 9488 |
self method isNil ifTrue:[self breakPoint:#cg. ^ false ]. "/ method no longer valid |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9489 |
^ super isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9490 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9491 |
"Modified: / 06-03-2012 / 12:40:20 / cg" |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9492 |
! |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9493 |
|
8170 | 9494 |
isForMethod:aMethod line:line |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9495 |
"/ check in this order - method has a flushing side-effect, which is useful here... |
9922 | 9496 |
weakMethodHolder == #all ifTrue:[^ true]. |
9497 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9498 |
^ (aMethod = self method) and:[ line = lineNumber ]. |
9922 | 9499 |
|
9500 |
"Modified: / 08-05-2011 / 10:27:31 / cg" |
|
8170 | 9501 |
! |
9502 |
||
9503 |
isHaltIgnoredInMethod:aMethod line:line |
|
12937 | 9504 |
^ self isHaltIgnoredInMethod:aMethod line:line context:nil |
9505 |
! |
|
9506 |
||
9507 |
isHaltIgnoredInMethod:aMethod line:line context:context |
|
9095 | 9508 |
"/ 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
|
9509 |
|
13059 | 9510 |
"/ Transcript showCR:'-----------------------------'. |
9511 |
"/ Transcript showCR:aMethod. |
|
9512 |
"/ Transcript showCR:line. |
|
9513 |
"/ Transcript showCR:context. |
|
9514 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
9515 |
(self isForMethod:aMethod line:line) ifFalse:[^ false]. |
9095 | 9516 |
"/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored. |
8170 | 9517 |
|
12937 | 9518 |
context notNil ifTrue:[ |
15413 | 9519 |
ignoredReceiverClasses notNil ifTrue:[ |
9520 |
^ ignoredReceiverClasses includes:(context receiver class) |
|
9521 |
]. |
|
12941 | 9522 |
]. |
13059 | 9523 |
|
9524 |
"/ Transcript showCR:ignoredProcesses. |
|
9525 |
"/ Transcript showCR:Processor activeProcess. |
|
12941 | 9526 |
ignoredProcesses notNil ifTrue:[ |
15413 | 9527 |
^ ignoredProcesses includes:(Processor activeProcess) |
12937 | 9528 |
]. |
14608 | 9529 |
ignoredSendingClassAndSelectors notNil ifTrue:[ |
15413 | 9530 |
context withAllSendersDo:[:each | |
9531 |
|m className selector cls| |
|
9532 |
||
9533 |
(m := each method) notNil ifTrue:[ |
|
9534 |
cls := m mclass. |
|
9535 |
cls notNil ifTrue:[ |
|
9536 |
className := cls name. |
|
9537 |
selector := m selector. |
|
9538 |
(ignoredSendingClassAndSelectors contains:[:entry | entry first = className and:[entry second = selector]]) |
|
9539 |
ifTrue:[^ true]. |
|
9540 |
]. |
|
9541 |
] |
|
9542 |
] |
|
14608 | 9543 |
]. |
9544 |
||
9545 |
^ self isHaltIgnored "/ unconditionally |
|
8170 | 9546 |
! ! |
9547 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9548 |
!DebugView::IgnoredBreakpoint methodsFor:'accessing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9549 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9550 |
parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9551 |
^ parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9552 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9553 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9554 |
parameter:something |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9555 |
parameter := something. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9556 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9557 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9558 |
!DebugView::IgnoredBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9559 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9560 |
printOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9561 |
aStream nextPutAll:'Ignore breakpoint:#', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9562 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9563 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9564 |
"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
|
9565 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9566 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9567 |
!DebugView::IgnoredBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9568 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9569 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9570 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9571 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9572 |
"Created: / 06-03-2012 / 12:54:35 / cg" |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9573 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9574 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9575 |
isForBreakpointWithParameter:paramArg |
15730 | 9576 |
Transcript showCR:parameter. |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9577 |
^ paramArg = parameter |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9578 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
9579 |
"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
|
9580 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
9581 |
|
4122 | 9582 |
!DebugView class methodsFor:'documentation'! |
9583 |
||
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
9584 |
version |
15730 | 9585 |
^ '$Header$' |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
9586 |
! |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
9587 |
|
8952
7742c63ff6f5
catch halts in: #showSelection:
Claus Gittinger <cg@exept.de>
parents:
8745
diff
changeset
|
9588 |
version_CVS |
15730 | 9589 |
^ '$Header$' |
10628 | 9590 |
! |
9591 |
||
9592 |
version_SVN |
|
15730 | 9593 |
^ '$Id$' |
4122 | 9594 |
! ! |
9595 |
||
12106 | 9596 |
|
4122 | 9597 |
DebugView initialize! |