author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 13 Mar 2013 01:04:29 +0000 | |
branch | jv |
changeset 12459 | 7899fe07efd7 |
parent 12431 | 9f0c59c742d5 |
parent 12437 | 7f9093a67e5f |
child 12571 | b2e5fdb702cb |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
11210 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
13 |
|
0 | 14 |
StandardSystemView subclass:#DebugView |
11898 | 15 |
instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView |
16 |
receiverInspector contextInspector contextArray selectedContext |
|
17 |
catchBlock grabber mayProceed traceView tracing bigStep |
|
18 |
skipLineNr steppedContextAddress abortButton terminateButton |
|
19 |
continueButton stepButton nextButton nextOverButton nextOutButton |
|
20 |
sendButton returnButton restartButton exclusive inspecting |
|
21 |
nChainShown inspectedProcess updateProcess stopButton |
|
22 |
updateButton defineButton monitorToggle stepping |
|
23 |
steppedContextLineno stepForReturn actualContext inWrap |
|
24 |
stackInspector steppedContext wrapperContext verboseBacktrace |
|
25 |
firstContext stepHow cachable currentMethod ignoreBreakpoints |
|
26 |
stepUntilEntering lastStepUntilEntering |
|
27 |
lastSelectionInReceiverInspector lastSelectionInContextInspector |
|
28 |
canShowMore exitAbort reportButton setOfHiddenCallingSelectors |
|
29 |
isStoppedAtHaltOrBreakPoint exceptionInfoLabel methodCodeToggle |
|
30 |
methodCodeToggleSelectionHolder |
|
31 |
isStoppedAtBreakPointWithParameter breakPointParameter |
|
32 |
hideSupportCode' |
|
33 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
|
34 |
DebuggingDebugger DebuggingDebugger2 |
|
35 |
DefaultDebuggerBackgroundColor InitialNChainShown IgnoredHalts |
|
36 |
ShowThreadID LastIgnoreHaltNTimes LastIgnoreHaltDuration |
|
37 |
LastExtent LastOrigin RememberedCallChain DebuggingDebugger3' |
|
38 |
poolDictionaries:'' |
|
39 |
category:'Interface-Debugger' |
|
0 | 40 |
! |
41 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
42 |
Object subclass:#IgnoredHaltOrBreakpoint |
11898 | 43 |
instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed' |
44 |
classVariableNames:'' |
|
45 |
poolDictionaries:'' |
|
46 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
47 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
48 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
49 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredHalt |
11898 | 50 |
instanceVariableNames:'weakMethodHolder lineNumber' |
51 |
classVariableNames:'' |
|
52 |
poolDictionaries:'' |
|
53 |
privateIn:DebugView |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
54 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
55 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
56 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredBreakpoint |
11898 | 57 |
instanceVariableNames:'parameter' |
58 |
classVariableNames:'' |
|
59 |
poolDictionaries:'' |
|
60 |
privateIn:DebugView |
|
8170 | 61 |
! |
62 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
63 |
!DebugView class methodsFor:'documentation'! |
29 | 64 |
|
65 |
copyright |
|
66 |
" |
|
67 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
11210 | 68 |
All Rights Reserved |
29 | 69 |
|
70 |
This software is furnished under a license and may be used |
|
71 |
only in accordance with the terms of that license and with the |
|
72 |
inclusion of the above copyright notice. This software may not |
|
73 |
be provided or otherwise made available to, or used by, any |
|
74 |
other person. No title to or ownership of the software is |
|
75 |
hereby transferred. |
|
76 |
" |
|
77 |
! |
|
0 | 78 |
|
29 | 79 |
documentation |
80 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
81 |
This class implements a graphical debugger interface. |
29 | 82 |
The debugger usually sits on top of the faulting process, |
10205 | 83 |
taking over its event processing. |
2358 | 84 |
(this is different from other Smalltalk debuggers, which control |
85 |
the debuggee as a separate process. Consider this an historic |
|
86 |
leftover - the debugger was one of the first applications written for |
|
87 |
ST/X; however, why should we change it without a particular need ...). |
|
88 |
||
89 |
Only the 'stopped' debugged process is affected; |
|
29 | 90 |
other processes continue to respond to events. |
91 |
||
92 |
The one exception is when an error occurs within the dispatcher process |
|
93 |
or in one of the eventhandler processes - in this case, the debugger |
|
94 |
will sit on an exclusive display connection. |
|
95 |
||
96 |
The whole debugging will be changed, once the required process primitives |
|
97 |
are available, which allow control of another processes execution |
|
98 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
99 |
to have the debugger control the debuggee (i.e. two processes) |
|
35 | 100 |
|
101 |
See additional information in 'doc/misc/debugger.doc'. |
|
53 | 102 |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
103 |
Notice & Warning: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
104 |
the DebugView class caches the last used debugger in a class variable. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
105 |
It may happen, that a malfunctioning debugger (for example, a halfway destroyed one) |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
106 |
is kept there. You will notice this, if a debugger comes up without showing any contents. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
107 |
In this case, close (or destroy) the broken debugView, and execute |
11210 | 108 |
Debugger newDebugger |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
109 |
which removes the cached debugger and forces creation of a new one the next time. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
110 |
This is a temporary workaround - the debugger will be fixed to avoid this problem. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
111 |
|
11210 | 112 |
You also have to remove the cached debugger, if you change the debugger's |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
113 |
initialization code (buttons, menu, etc.) or the debugger's class layout, |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
114 |
and you want the new code to become effective. |
508 | 115 |
|
116 |
[author:] |
|
11210 | 117 |
Claus Gittinger |
508 | 118 |
|
119 |
[see also:] |
|
11210 | 120 |
Exception Signal |
121 |
Process |
|
29 | 122 |
" |
123 |
! ! |
|
0 | 124 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
125 |
!DebugView class methodsFor:'initialization'! |
243 | 126 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
127 |
initialize |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
128 |
InitialNChainShown := 50. |
8148 | 129 |
"/ DefaultDebuggerBackgroundColor := nil. |
3387 | 130 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
131 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
132 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
133 |
"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
|
134 |
"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
|
135 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
136 |
|
243 | 137 |
reinitialize |
7822 | 138 |
"reinitialize after an image-restart" |
139 |
||
243 | 140 |
self newDebugger |
141 |
! ! |
|
142 |
||
10203 | 143 |
!DebugView class methodsFor:'cleanup'! |
144 |
||
10205 | 145 |
lowSpaceCleanup |
10203 | 146 |
"in low memory situations, give up cached debuggers" |
147 |
||
148 |
CachedDebugger := nil. |
|
149 |
CachedExclusive := nil. |
|
150 |
OpenDebuggers := nil. |
|
11391 | 151 |
RememberedCallChain := nil. |
10203 | 152 |
|
153 |
" |
|
154 |
DebugView lowSpaceCleanup |
|
155 |
" |
|
156 |
||
11391 | 157 |
"Modified: / 08-03-2012 / 01:30:21 / cg" |
10203 | 158 |
! |
159 |
||
160 |
newDebugger |
|
161 |
"force creation of a new debugger (give up cached debuggers)" |
|
162 |
||
163 |
CachedDebugger := nil. |
|
164 |
CachedExclusive := nil. |
|
165 |
OpenDebuggers := nil. |
|
166 |
||
167 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
|
11210 | 168 |
Debugger := self |
10203 | 169 |
]. |
170 |
||
171 |
" |
|
172 |
DebugView newDebugger |
|
173 |
" |
|
174 |
! ! |
|
175 |
||
176 |
!DebugView class methodsFor:'defaults'! |
|
177 |
||
178 |
defaultIcon |
|
179 |
"return the browsers default window icon" |
|
180 |
||
181 |
<resource: #programImage> |
|
182 |
||
10205 | 183 |
^ ToolbarIconLibrary debug22x22Icon |
10203 | 184 |
"/ ^ ToolbarIconLibrary debugIt20x20Icon |
185 |
||
186 |
"Modified: / 11-02-2007 / 11:47:20 / cg" |
|
187 |
! |
|
188 |
||
189 |
defaultIconForAboutBox |
|
190 |
<resource: #programImage> |
|
191 |
||
10205 | 192 |
^ ToolbarIconLibrary debug22x22IconForBlackBackgound |
10203 | 193 |
! |
194 |
||
195 |
defaultVerboseBacktrace |
|
196 |
<resource: #obsolete> |
|
197 |
self obsoleteMethodWarning. |
|
198 |
^ UserPreferences current verboseBacktraceInDebugger |
|
199 |
||
200 |
"Created: 11.1.1997 / 12:14:35 / cg" |
|
201 |
! |
|
202 |
||
203 |
defaultVerboseBacktrace:aBoolean |
|
204 |
<resource: #obsolete> |
|
205 |
self obsoleteMethodWarning. |
|
206 |
UserPreferences current verboseBacktraceInDebugger:aBoolean |
|
207 |
! |
|
208 |
||
209 |
updateStyleCache |
|
210 |
"extract values from the styleSheet and cache them in class variables" |
|
211 |
||
212 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
213 |
||
214 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
|
215 |
||
216 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
217 |
! ! |
|
218 |
||
219 |
!DebugView class methodsFor:'ignoring halts'! |
|
220 |
||
221 |
haltIgnoreInformationFor:haltingMethod atLineNr:lineNrInHaltingMethod |
|
222 |
"the information (if any) about the ignore-state of a halt" |
|
223 |
||
224 |
IgnoredHalts isNil ifTrue:[^ nil]. |
|
225 |
||
10205 | 226 |
IgnoredHalts do:[:ign | |
11210 | 227 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
228 |
^ ign |
|
229 |
]. |
|
10203 | 230 |
]. |
231 |
^ nil. |
|
232 |
! |
|
233 |
||
234 |
hasIgnoredHalts |
|
235 |
self removeInactiveIgnores. |
|
236 |
^ IgnoredHalts notEmptyOrNil |
|
237 |
! |
|
238 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
239 |
ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
240 |
"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
|
241 |
or until some time has elapsed. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
242 |
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
|
243 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
244 |
|oldEntry ign| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
245 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
246 |
IgnoredHalts notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
247 |
self removeInactiveIgnores. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
248 |
oldEntry := IgnoredHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
249 |
detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
250 |
ifNone:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
251 |
oldEntry notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
252 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
253 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
254 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
255 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
256 |
(countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
257 |
IgnoredHalts isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
258 |
IgnoredHalts := OrderedCollection new. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
259 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
260 |
ign := IgnoredHalt new breakpointWithParameter:parameterOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
261 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
262 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
263 |
ign ignoreCount:countOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
264 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
265 |
(dTOrNil notNil) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
266 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
267 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
268 |
untilShiftKey == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
269 |
ign ignoreUntilShiftKeyPressed:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
270 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
271 |
IgnoredHalts add:ign. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
272 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
273 |
Smalltalk changed:#ignoredHalts. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
274 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
275 |
"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
|
276 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
277 |
|
11210 | 278 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
10203 | 279 |
"remember to ignore a halt in some method for some number of invocations |
280 |
or until some time has elapsed. |
|
281 |
With nil count and time arguments, such an ignored halt is reactivated" |
|
282 |
||
283 |
|oldEntry ign| |
|
284 |
||
285 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 286 |
self removeInactiveIgnores. |
287 |
oldEntry := IgnoredHalts |
|
288 |
detect:[:ign | ign isForMethod:haltingMethod line:lineNrOfHalt] |
|
289 |
ifNone:nil. |
|
290 |
oldEntry notNil ifTrue:[ |
|
291 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
|
292 |
] |
|
293 |
]. |
|
294 |
||
295 |
(countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[ |
|
296 |
IgnoredHalts isNil ifTrue:[ |
|
297 |
IgnoredHalts := OrderedCollection new. |
|
298 |
]. |
|
299 |
ign := IgnoredHalt new method:haltingMethod lineNumber:lineNrOfHalt. |
|
300 |
||
301 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
|
302 |
ign ignoreCount:countOrNil. |
|
303 |
]. |
|
304 |
(dTOrNil notNil) ifTrue:[ |
|
305 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
|
306 |
]. |
|
307 |
untilShiftKey == true ifTrue:[ |
|
308 |
ign ignoreUntilShiftKeyPressed:true. |
|
309 |
]. |
|
310 |
IgnoredHalts add:ign. |
|
10203 | 311 |
]. |
312 |
Smalltalk changed:#ignoredHalts. |
|
313 |
||
11210 | 314 |
"Created: / 27-01-2012 / 11:33:38 / cg" |
10203 | 315 |
! |
316 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
317 |
isBreakpointToBeIgnoredForParameter:parameter modifyEntryCount:modifyCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
318 |
"/ should a breakpoint be ignored ? |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
319 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
320 |
IgnoredHalts isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
321 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
322 |
"/ 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
|
323 |
IgnoredHalts do:[:ign | |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
324 |
(ign isForBreakpointWithParameter:parameter) ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
325 |
Transcript show:'Debugger [info]: break ignored for ', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
326 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
327 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
328 |
ign isHaltIgnored ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
329 |
Transcript showCR:'Debugger [info]: no longer ignore breakpoint for ', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
330 |
IgnoredHalts remove:ign ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
331 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
332 |
^ true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
333 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
334 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
335 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
336 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
337 |
IgnoredHalts isEmpty ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
338 |
IgnoredHalts := nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
339 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
340 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
341 |
^ false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
342 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
343 |
"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
|
344 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
345 |
|
10203 | 346 |
removeInactiveIgnores |
347 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 348 |
IgnoredHalts := IgnoredHalts select:[:i | i isActive]. |
10203 | 349 |
]. |
350 |
! |
|
351 |
||
352 |
stopIgnoringHalts |
|
353 |
"forget about all ignored halts" |
|
354 |
||
355 |
IgnoredHalts := nil. |
|
356 |
Smalltalk changed:#ignoredHalts. |
|
357 |
! ! |
|
358 |
||
359 |
!DebugView class methodsFor:'instance creation / entering'! |
|
0 | 360 |
|
2421 | 361 |
enter |
362 |
"enter a debugger" |
|
363 |
||
5455 | 364 |
<context: #return> |
365 |
||
10205 | 366 |
^ self |
11210 | 367 |
enter:thisContext sender |
368 |
withMessage:'debugger entered' |
|
369 |
mayProceed:true. |
|
10205 | 370 |
! |
371 |
||
372 |
enter:aContext withMessage:aString |
|
2355 | 373 |
"enter a debugger" |
374 |
||
5455 | 375 |
<context: #return> |
376 |
||
2355 | 377 |
^ self |
11210 | 378 |
enter:aContext |
379 |
withMessage:aString |
|
380 |
mayProceed:true |
|
2355 | 381 |
! |
382 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
383 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 384 |
"enter a debugger; if this is a recursive invocation, enter |
385 |
a MiniDebugger instead. |
|
386 |
This is the standard way of entering the debugger; |
|
387 |
sent from error- and halt messages." |
|
0 | 388 |
|
3447 | 389 |
<context: #return> |
390 |
||
3702 | 391 |
|active| |
93 | 392 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
393 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
394 |
'==> enter1: (' print. aContext print. ')' printCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
395 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
396 |
|
57 | 397 |
StepInterruptPending := nil. |
3998 | 398 |
ControlInterrupt handle:[:ex | |
11210 | 399 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
400 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
401 |
ex proceed |
|
3998 | 402 |
] do:[ |
11210 | 403 |
" |
404 |
well, it could be a stepping or sending debugger up there; |
|
405 |
in this case, return to it. This happens, when a stepping process |
|
406 |
runs into an error (for example, a halt). In this case, we want the |
|
407 |
stepping debugger to come up again instead of a new one. |
|
408 |
" |
|
409 |
OpenDebuggers notNil ifTrue:[ |
|
410 |
active := Processor activeProcess. |
|
411 |
OpenDebuggers do:[:aDebugger | |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
412 |
|debuggersProcess| |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
413 |
|
11210 | 414 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
415 |
debuggersProcess := aDebugger inspectedProcess. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
416 |
debuggersProcess == active ifTrue:[ |
11210 | 417 |
aDebugger device isOpen ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
418 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
419 |
'reusing cached debugger' errorPrintCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
420 |
]. |
11210 | 421 |
aDebugger unstep. |
422 |
aDebugger setLabelFor:aString in:active. |
|
423 |
aDebugger mayProceed:mayProceed. |
|
424 |
^ aDebugger enter:aContext select:nil. |
|
425 |
] |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
426 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
427 |
(debuggersProcess notNil and:[ debuggersProcess isDead ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
428 |
aDebugger destroy. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
429 |
]. |
11210 | 430 |
] |
431 |
] |
|
432 |
]. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
433 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
434 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 435 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
436 |
"Modified: / 17-07-2012 / 19:08:18 / cg" |
53 | 437 |
! |
438 |
||
8347 | 439 |
enterException:ex |
440 |
"enter a debugger; if this is a recursive invocation, enter |
|
441 |
a MiniDebugger instead. |
|
442 |
This is the standard way of entering the debugger; |
|
443 |
sent from error- and halt messages." |
|
444 |
||
445 |
^ self |
|
11210 | 446 |
enter:ex returnableSuspendedContext |
447 |
withMessage:ex descriptionForDebugger |
|
448 |
mayProceed:(ex mayProceed). |
|
8347 | 449 |
! |
450 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
451 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 452 |
"enter a debugger - do not check for recursive invocation" |
453 |
||
5455 | 454 |
<context: #return> |
455 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
456 |
|aDebugger| |
266 | 457 |
|
458 |
StepInterruptPending := nil. |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
459 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
460 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
461 |
"/ to avoid recursive debugging ... |
3447 | 462 |
ControlInterrupt handle:[:ex | |
11210 | 463 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
464 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
465 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
466 |
] do:[ |
11210 | 467 |
aDebugger := self new. |
3447 | 468 |
]. |
469 |
||
470 |
aDebugger isNil ifTrue:[ |
|
11210 | 471 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
472 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
473 |
mayProceed ifTrue:[ |
|
12333 | 474 |
(Dialog confirm:'Error/Breakpoint caught.\\Press Continue or Abort.' withCRs |
11210 | 475 |
yesLabel:'Continue' noLabel:'Abort') |
476 |
ifTrue:[ |
|
477 |
^ nil |
|
478 |
]. |
|
479 |
] ifFalse:[ |
|
12333 | 480 |
self information:'Error caught.\\Press OK to abort the operation.' withCRs. |
11210 | 481 |
]. |
482 |
AbortOperationRequest raise. |
|
483 |
"not reached" |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
484 |
]. |
3447 | 485 |
|
486 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
487 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 488 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
489 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
490 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
491 |
" |
11210 | 492 |
nil halt |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
493 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
494 |
|
3447 | 495 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 496 |
! |
497 |
||
6430 | 498 |
enterWithMessage:message |
499 |
"enter a debugger" |
|
500 |
||
501 |
<context: #return> |
|
502 |
||
10205 | 503 |
^ self |
11210 | 504 |
enter:(thisContext sender) |
505 |
withMessage:message |
|
506 |
mayProceed:true. |
|
6430 | 507 |
! |
508 |
||
266 | 509 |
new |
10205 | 510 |
"return a new DebugView. |
2358 | 511 |
- return a cached debugger if it already exists. |
512 |
Also, care for remote displays on which no debugger is wanted |
|
513 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
514 |
||
515 |
|debugger currentScreen debuggerDevice| |
|
516 |
||
517 |
currentScreen := Screen current. |
|
14 | 518 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
519 |
currentScreen notNil ifTrue:[ |
11210 | 520 |
(currentScreen suppressDebugger) ifTrue:[ |
521 |
"/ no debuggers with that device - show an alertBox which aborts... |
|
522 |
^ nil. |
|
523 |
]. |
|
524 |
(currentScreen mayOpenDebugger) ifFalse:[ |
|
525 |
"/ no debugger on that device - but on the main screen |
|
526 |
currentScreen := Screen default. |
|
527 |
]. |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
528 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
529 |
|
266 | 530 |
" |
10205 | 531 |
need a blocking debugger if no processes or |
532 |
or if its a timing/interrupt process |
|
266 | 533 |
(because otherwise we would not get any events here ... |
534 |
" |
|
535 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
11210 | 536 |
((debugger := CachedExclusive) isNil |
537 |
or:[debugger device ~~ currentScreen |
|
538 |
or:[currentScreen isNil |
|
539 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
|
540 |
debugger := self newExclusive |
|
541 |
]. |
|
542 |
CachedExclusive := nil. |
|
266 | 543 |
] ifFalse:[ |
11210 | 544 |
CachedDebugger notNil ifTrue:[ |
545 |
(CachedDebugger device ~~ currentScreen |
|
546 |
or:[currentScreen isNil |
|
547 |
or:[currentScreen isOpen not |
|
548 |
or:[CachedDebugger class ~~ self]]]) ifTrue:[ |
|
549 |
CachedDebugger := nil |
|
550 |
] |
|
551 |
]. |
|
552 |
||
553 |
(debugger := CachedDebugger) notNil ifTrue:[ |
|
554 |
CachedDebugger := nil. |
|
555 |
] ifFalse:[ |
|
556 |
debuggerDevice := currentScreen. |
|
557 |
debuggerDevice isNil ifTrue:[ |
|
558 |
"/ use the default display |
|
559 |
debuggerDevice := Screen default. |
|
560 |
]. |
|
561 |
(debuggerDevice isNil |
|
562 |
or:[debuggerDevice isOpen not |
|
563 |
"/ or:[debuggerDevice mayOpenDebugger not] |
|
564 |
]) ifTrue:[ |
|
565 |
"/ no debugger |
|
566 |
^ nil. |
|
567 |
]. |
|
568 |
||
569 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
570 |
do:[ |
|
571 |
debugger := super new. |
|
572 |
]. |
|
573 |
debugger label:'Debugger'. |
|
574 |
debugger icon:self defaultIcon. |
|
575 |
] |
|
266 | 576 |
]. |
73 | 577 |
^ debugger |
875 | 578 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
579 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 580 |
! |
0 | 581 |
|
266 | 582 |
newExclusive |
583 |
"return a debugger for exclusive display access" |
|
584 |
||
585 |
|debugger| |
|
105 | 586 |
|
266 | 587 |
debugger := super new. |
588 |
debugger label:'Debugger'. |
|
875 | 589 |
debugger icon:self defaultIcon. |
266 | 590 |
debugger exclusive:true. |
591 |
^ debugger |
|
875 | 592 |
|
593 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 594 |
! |
595 |
||
29 | 596 |
openOn:aProcess |
597 |
"start a debugger on aProcess |
|
598 |
(actually not more than a good-looking inspector)" |
|
15 | 599 |
|
52 | 600 |
|aDebugger label nm| |
15 | 601 |
|
602 |
aDebugger := super new. |
|
875 | 603 |
aDebugger icon:self defaultIcon. |
29 | 604 |
aProcess notNil ifTrue:[ |
11210 | 605 |
nm := aProcess name. |
606 |
nm notNil ifTrue:[ |
|
607 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
608 |
] ifFalse:[ |
|
609 |
nm := aProcess id printString |
|
610 |
]. |
|
611 |
label := 'Debugger [' , nm , ']'. |
|
29 | 612 |
] ifFalse:[ |
11210 | 613 |
label := 'no process' |
29 | 614 |
]. |
1114 | 615 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 616 |
aDebugger openOn:aProcess. |
617 |
^ nil |
|
875 | 618 |
|
1114 | 619 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 620 |
! ! |
621 |
||
3269 | 622 |
!DebugView class methodsFor:'menu specs'! |
623 |
||
12437 | 624 |
breakPointMenuSpec |
625 |
"This resource specification was automatically generated |
|
626 |
by the MenuEditor of ST/X." |
|
627 |
||
628 |
"Do not manually edit this!! If it is corrupted, |
|
629 |
the MenuEditor may not be able to read the specification." |
|
630 |
||
631 |
||
632 |
" |
|
633 |
MenuEditor new openOnClass:DebugView andSelector:#breakPointMenuSpec |
|
634 |
(Menu new fromLiteralArrayEncoding:(DebugView breakPointMenuSpec)) startUp |
|
635 |
" |
|
636 |
||
637 |
<resource: #menu> |
|
638 |
||
639 |
^ |
|
640 |
#(Menu |
|
641 |
( |
|
642 |
(MenuItem |
|
643 |
enabled: canRemoveBreakpoint |
|
644 |
label: 'Remove Breakpoint' |
|
645 |
itemValue: removeBreakpoint |
|
646 |
) |
|
647 |
(MenuItem |
|
648 |
label: 'Remove all Breakpoints' |
|
649 |
itemValue: removeAllBreakpoints |
|
650 |
) |
|
651 |
(MenuItem |
|
652 |
label: '-' |
|
653 |
) |
|
654 |
(MenuItem |
|
655 |
enabled: canAddBreakpoint |
|
656 |
label: 'Add Breakpoint' |
|
657 |
itemValue: addBreakpoint |
|
658 |
) |
|
659 |
(MenuItem |
|
660 |
label: '-' |
|
661 |
) |
|
662 |
(MenuItem |
|
663 |
label: 'Ignore this Halt/BreakPoint' |
|
664 |
submenu: |
|
665 |
(Menu |
|
666 |
( |
|
667 |
(MenuItem |
|
668 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
669 |
label: 'For Some Time...' |
|
670 |
itemValue: openIgnoreHaltUntilTimeElapsedDialog |
|
671 |
) |
|
672 |
(MenuItem |
|
673 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
674 |
label: 'For the Next N Times...' |
|
675 |
itemValue: openIgnoreHaltNTimesDialog |
|
676 |
) |
|
677 |
(MenuItem |
|
678 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
679 |
label: 'Until Shift-Key is Pressed' |
|
680 |
itemValue: ignoreHaltUntilShiftKeyIsPressed |
|
681 |
) |
|
682 |
(MenuItem |
|
683 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
684 |
label: 'Forever (Until Ignoring is Stopped)' |
|
685 |
itemValue: ignoreHaltForever |
|
686 |
) |
|
687 |
) |
|
688 |
nil |
|
689 |
nil |
|
690 |
) |
|
691 |
) |
|
692 |
(MenuItem |
|
693 |
enabled: isStoppedAtBreakPointWithParameter |
|
694 |
label: 'Ignore all BreakPoints with this Parameter' |
|
695 |
submenu: |
|
696 |
(Menu |
|
697 |
( |
|
698 |
(MenuItem |
|
699 |
enabled: isStoppedAtBreakPointWithParameter |
|
700 |
label: 'For Some Time...' |
|
701 |
itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
|
702 |
) |
|
703 |
(MenuItem |
|
704 |
enabled: isStoppedAtBreakPointWithParameter |
|
705 |
label: 'For the Next N Times...' |
|
706 |
itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog |
|
707 |
) |
|
708 |
(MenuItem |
|
709 |
enabled: isStoppedAtBreakPointWithParameter |
|
710 |
label: 'Until Shift-Key is Pressed' |
|
711 |
itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
|
712 |
) |
|
713 |
(MenuItem |
|
714 |
enabled: isStoppedAtBreakPointWithParameter |
|
715 |
label: 'Forever (Reenable in BreakPoint-Browser)' |
|
716 |
itemValue: ignoreBreakpointsWithThisParameterForever |
|
717 |
) |
|
718 |
) |
|
719 |
nil |
|
720 |
nil |
|
721 |
) |
|
722 |
) |
|
723 |
(MenuItem |
|
724 |
label: 'Ignore all Halts/BreakPoints' |
|
725 |
submenu: |
|
726 |
(Menu |
|
727 |
( |
|
728 |
(MenuItem |
|
729 |
label: 'For Some Time...' |
|
730 |
itemValue: openIgnoreAllHaltsUntilTimeElapsedDialog |
|
731 |
) |
|
732 |
(MenuItem |
|
733 |
label: 'Until Shift-Key is Pressed' |
|
734 |
itemValue: ignoreAllHaltsUntilShiftKeyIsPressed |
|
735 |
) |
|
736 |
(MenuItem |
|
737 |
label: 'Forever (Until Ignoring is Stopped)' |
|
738 |
itemValue: ignoreAllHaltsForever |
|
739 |
) |
|
740 |
) |
|
741 |
nil |
|
742 |
nil |
|
743 |
) |
|
744 |
) |
|
745 |
(MenuItem |
|
746 |
enabled: hasHaltsToIgnore |
|
747 |
label: 'Stop Ignoring' |
|
748 |
itemValue: stopIgnoringHalts |
|
749 |
) |
|
750 |
(MenuItem |
|
751 |
label: '-' |
|
752 |
) |
|
753 |
(MenuItem |
|
754 |
label: 'Manage Breakpoints' |
|
755 |
itemValue: openBreakPointBrowser |
|
756 |
) |
|
757 |
(MenuItem |
|
758 |
label: 'Allow Halt in Debugger' |
|
759 |
itemValue: allowBreakPointsInDebugger: |
|
760 |
indication: allowBreakPointsInDebugger |
|
761 |
) |
|
762 |
) |
|
763 |
nil |
|
764 |
nil |
|
765 |
) |
|
766 |
! |
|
767 |
||
768 |
classMenuSpec |
|
769 |
"This resource specification was automatically generated |
|
770 |
by the MenuEditor of ST/X." |
|
771 |
||
772 |
"Do not manually edit this!! If it is corrupted, |
|
773 |
the MenuEditor may not be able to read the specification." |
|
774 |
||
775 |
||
776 |
" |
|
777 |
MenuEditor new openOnClass:DebugView andSelector:#classMenuSpec |
|
778 |
(Menu new fromLiteralArrayEncoding:(DebugView classMenuSpec)) startUp |
|
779 |
" |
|
780 |
||
781 |
<resource: #menu> |
|
782 |
||
783 |
^ |
|
784 |
#(Menu |
|
785 |
( |
|
786 |
(MenuItem |
|
787 |
enabled: canBrowseImplementingClass |
|
788 |
label: 'Browse Implementing Class' |
|
789 |
itemValue: browseImplementingClass |
|
790 |
) |
|
791 |
(MenuItem |
|
792 |
enabled: canBrowseReceiversClass |
|
793 |
label: 'Browse Receivers Class' |
|
794 |
itemValue: browseReceiversClass |
|
795 |
) |
|
796 |
(MenuItem |
|
797 |
label: '-' |
|
798 |
) |
|
799 |
(MenuItem |
|
800 |
enabled: canBrowseClassHierarchy |
|
801 |
label: 'Browse Receivers Class Hierarchy' |
|
802 |
itemValue: browseClassHierarchy |
|
803 |
isVisible: false |
|
804 |
) |
|
805 |
(MenuItem |
|
806 |
enabled: canBrowseFullClassProtocol |
|
807 |
label: 'Browse Receivers Full Protocol' |
|
808 |
itemValue: browseFullClassProtocol |
|
809 |
isVisible: false |
|
810 |
) |
|
811 |
(MenuItem |
|
812 |
label: '-' |
|
813 |
isVisible: false |
|
814 |
) |
|
815 |
(MenuItem |
|
816 |
enabled: canBrowseProcessesApplication |
|
817 |
label: 'Browse Application Class' |
|
818 |
itemValue: browseProcessesApplication |
|
819 |
) |
|
820 |
) |
|
821 |
nil |
|
822 |
nil |
|
823 |
) |
|
824 |
! |
|
825 |
||
826 |
contextMenuSpec |
|
827 |
"This resource specification was automatically generated |
|
828 |
by the MenuEditor of ST/X." |
|
829 |
||
830 |
"Do not manually edit this!! If it is corrupted, |
|
831 |
the MenuEditor may not be able to read the specification." |
|
832 |
||
833 |
||
834 |
" |
|
835 |
MenuEditor new openOnClass:DebugView andSelector:#contextMenuSpec |
|
836 |
(Menu new fromLiteralArrayEncoding:(DebugView contextMenuSpec)) startUp |
|
837 |
" |
|
838 |
||
839 |
<resource: #menu> |
|
840 |
||
841 |
^ |
|
842 |
#(Menu |
|
843 |
( |
|
844 |
(MenuItem |
|
845 |
enabled: canReturn |
|
846 |
label: 'Return' |
|
847 |
itemValue: doReturn |
|
848 |
) |
|
849 |
(MenuItem |
|
850 |
enabled: canRestart |
|
851 |
label: 'Restart' |
|
852 |
itemValue: doRestart |
|
853 |
) |
|
854 |
(MenuItem |
|
855 |
label: '-' |
|
856 |
) |
|
857 |
(MenuItem |
|
858 |
enabled: hasContextSelected |
|
859 |
label: 'Inspect' |
|
860 |
itemValue: inspectContext |
|
861 |
) |
|
862 |
(MenuItem |
|
863 |
label: 'Copy WalkBack Text' |
|
864 |
itemValue: copyWalkbackText |
|
865 |
) |
|
866 |
(MenuItem |
|
867 |
label: 'Bookmark Method in SystemBrowser' |
|
868 |
itemValue: addBrowserBookmark |
|
869 |
) |
|
870 |
(MenuItem |
|
871 |
label: '-' |
|
872 |
isVisible: false |
|
873 |
) |
|
874 |
(MenuItem |
|
875 |
label: 'Find Handler For...' |
|
876 |
itemValue: findHandlerFor |
|
877 |
isVisible: false |
|
878 |
) |
|
879 |
(MenuItem |
|
880 |
label: '-' |
|
881 |
) |
|
882 |
(MenuItem |
|
883 |
label: 'Remember Callchain && Highlight on Next Entry' |
|
884 |
itemValue: rememberCallchain |
|
885 |
) |
|
886 |
(MenuItem |
|
887 |
label: 'Clear Remembered Callchain' |
|
888 |
itemValue: clearRememberedCallchain |
|
889 |
) |
|
890 |
) |
|
891 |
nil |
|
892 |
nil |
|
893 |
) |
|
894 |
! |
|
895 |
||
896 |
fileMenuSpec |
|
897 |
"This resource specification was automatically generated |
|
898 |
by the MenuEditor of ST/X." |
|
899 |
||
900 |
"Do not manually edit this!! If it is corrupted, |
|
901 |
the MenuEditor may not be able to read the specification." |
|
902 |
||
903 |
||
904 |
" |
|
905 |
MenuEditor new openOnClass:DebugView andSelector:#fileMenuSpec |
|
906 |
(Menu new fromLiteralArrayEncoding:(DebugView fileMenuSpec)) startUp |
|
907 |
" |
|
908 |
||
909 |
<resource: #menu> |
|
910 |
||
911 |
^ |
|
912 |
#(Menu |
|
913 |
( |
|
914 |
(MenuItem |
|
915 |
enabled: canSendEmail |
|
916 |
label: 'Report a Bug via eMail...' |
|
917 |
itemValue: doOpenReportMailApp |
|
918 |
) |
|
919 |
(MenuItem |
|
920 |
label: '-' |
|
921 |
) |
|
922 |
(MenuItem |
|
923 |
enabled: canCloseAllDebuggers |
|
924 |
label: 'Close all Debuggers...' |
|
925 |
itemValue: closeAllDebuggers |
|
926 |
isVisible: isNotInspecting |
|
927 |
) |
|
928 |
(MenuItem |
|
929 |
label: '-' |
|
930 |
) |
|
931 |
(MenuItem |
|
932 |
label: 'Exit' |
|
933 |
itemValue: closeRequest |
|
934 |
isVisible: isInspecting |
|
935 |
) |
|
936 |
(MenuItem |
|
937 |
label: 'Close Debugger and Abort' |
|
938 |
itemValue: closeRequest |
|
939 |
isVisible: isNotInspecting |
|
940 |
) |
|
941 |
) |
|
942 |
nil |
|
943 |
nil |
|
944 |
) |
|
945 |
! |
|
946 |
||
947 |
helpMenuSpec |
|
948 |
"This resource specification was automatically generated |
|
949 |
by the MenuEditor of ST/X." |
|
950 |
||
951 |
"Do not manually edit this!! If it is corrupted, |
|
952 |
the MenuEditor may not be able to read the specification." |
|
953 |
||
954 |
||
955 |
" |
|
956 |
MenuEditor new openOnClass:DebugView andSelector:#helpMenuSpec |
|
957 |
(Menu new fromLiteralArrayEncoding:(DebugView helpMenuSpec)) startUp |
|
958 |
" |
|
959 |
||
960 |
<resource: #menu> |
|
961 |
||
962 |
^ |
|
963 |
#(Menu |
|
964 |
( |
|
965 |
(MenuItem |
|
966 |
label: 'Debugger''s Documentation' |
|
967 |
itemValue: openHTMLDocument: |
|
968 |
argument: 'tools/debugger/TOP.html' |
|
969 |
) |
|
970 |
(MenuItem |
|
971 |
label: '-' |
|
972 |
) |
|
973 |
(MenuItem |
|
974 |
label: 'About DebugView...' |
|
975 |
itemValue: openAboutThisApplication |
|
976 |
) |
|
977 |
) |
|
978 |
nil |
|
979 |
nil |
|
980 |
) |
|
981 |
! |
|
982 |
||
3269 | 983 |
menuSpec |
984 |
"This resource specification was automatically generated |
|
985 |
by the MenuEditor of ST/X." |
|
986 |
||
987 |
"Do not manually edit this!! If it is corrupted, |
|
988 |
the MenuEditor may not be able to read the specification." |
|
989 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
990 |
|
3269 | 991 |
" |
992 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
993 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
994 |
" |
|
995 |
||
996 |
<resource: #menu> |
|
997 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
998 |
^ |
5875 | 999 |
#(Menu |
11210 | 1000 |
( |
1001 |
(MenuItem |
|
1002 |
label: 'File' |
|
12437 | 1003 |
submenuChannel: fileMenuSpec |
11210 | 1004 |
) |
1005 |
(MenuItem |
|
1006 |
label: 'View' |
|
12437 | 1007 |
submenuChannel: viewMenuSpec |
11210 | 1008 |
) |
1009 |
(MenuItem |
|
12437 | 1010 |
label: 'Linked Menu' |
1011 |
submenuChannel: unspecified |
|
11210 | 1012 |
) |
1013 |
(MenuItem |
|
1014 |
label: 'Context' |
|
12437 | 1015 |
submenuChannel: contextMenuSpec |
11210 | 1016 |
) |
1017 |
(MenuItem |
|
1018 |
label: 'Class' |
|
12437 | 1019 |
submenuChannel: classMenuSpec |
11210 | 1020 |
) |
1021 |
(MenuItem |
|
1022 |
label: 'Selector' |
|
12437 | 1023 |
submenuChannel: selectorMenuSpec |
11210 | 1024 |
) |
1025 |
(MenuItem |
|
1026 |
label: 'Breakpoint' |
|
12437 | 1027 |
submenuChannel: breakPointMenuSpec |
11210 | 1028 |
) |
1029 |
(MenuItem |
|
1030 |
label: 'Help' |
|
12437 | 1031 |
startGroup: conditionalRight |
1032 |
submenuChannel: helpMenuSpec |
|
1033 |
) |
|
1034 |
) |
|
1035 |
nil |
|
1036 |
nil |
|
1037 |
) |
|
1038 |
! |
|
1039 |
||
1040 |
processMenuSpec |
|
1041 |
"This resource specification was automatically generated |
|
1042 |
by the MenuEditor of ST/X." |
|
1043 |
||
1044 |
"Do not manually edit this!! If it is corrupted, |
|
1045 |
the MenuEditor may not be able to read the specification." |
|
1046 |
||
1047 |
||
1048 |
" |
|
1049 |
MenuEditor new openOnClass:DebugView andSelector:#processMenuSpec |
|
1050 |
(Menu new fromLiteralArrayEncoding:(DebugView processMenuSpec)) startUp |
|
1051 |
" |
|
1052 |
||
1053 |
<resource: #menu> |
|
1054 |
||
1055 |
^ |
|
1056 |
#(Menu |
|
1057 |
( |
|
1058 |
(MenuItem |
|
1059 |
label: 'Continue' |
|
1060 |
itemValue: doContinue |
|
1061 |
) |
|
1062 |
(MenuItem |
|
1063 |
label: 'Next (Line-Step)' |
|
1064 |
itemValue: doNext |
|
1065 |
) |
|
1066 |
(MenuItem |
|
1067 |
label: 'Step' |
|
1068 |
itemValue: doStep |
|
1069 |
) |
|
1070 |
(MenuItem |
|
1071 |
label: '-' |
|
1072 |
) |
|
1073 |
(MenuItem |
|
1074 |
label: 'Change Priority...' |
|
1075 |
itemValue: doChangeProcessPriority |
|
1076 |
) |
|
1077 |
(MenuItem |
|
1078 |
label: '-' |
|
1079 |
) |
|
1080 |
(MenuItem |
|
1081 |
label: 'Abort' |
|
1082 |
itemValue: doAbort |
|
1083 |
) |
|
1084 |
(MenuItem |
|
1085 |
enabled: abortAllIsHandled |
|
1086 |
label: 'Abort All' |
|
1087 |
itemValue: doAbortAll |
|
1088 |
) |
|
1089 |
(MenuItem |
|
1090 |
label: '-' |
|
1091 |
) |
|
1092 |
(MenuItem |
|
1093 |
label: 'Terminate' |
|
1094 |
itemValue: doTerminate |
|
1095 |
) |
|
1096 |
) |
|
1097 |
nil |
|
1098 |
nil |
|
1099 |
) |
|
1100 |
! |
|
1101 |
||
1102 |
selectorMenuSpec |
|
1103 |
"This resource specification was automatically generated |
|
1104 |
by the MenuEditor of ST/X." |
|
1105 |
||
1106 |
"Do not manually edit this!! If it is corrupted, |
|
1107 |
the MenuEditor may not be able to read the specification." |
|
1108 |
||
1109 |
||
1110 |
" |
|
1111 |
MenuEditor new openOnClass:DebugView andSelector:#selectorMenuSpec |
|
1112 |
(Menu new fromLiteralArrayEncoding:(DebugView selectorMenuSpec)) startUp |
|
1113 |
" |
|
1114 |
||
1115 |
<resource: #menu> |
|
1116 |
||
1117 |
^ |
|
1118 |
#(Menu |
|
1119 |
( |
|
1120 |
(MenuItem |
|
1121 |
label: 'Browse Implementors...' |
|
1122 |
itemValue: browseImplementorsOf |
|
1123 |
) |
|
1124 |
(MenuItem |
|
1125 |
label: 'Browse Senders...' |
|
1126 |
itemValue: browseSendersOf |
|
1127 |
) |
|
1128 |
(MenuItem |
|
1129 |
label: '-' |
|
1130 |
) |
|
1131 |
(MenuItem |
|
1132 |
enabled: canDefineMethod |
|
1133 |
label: 'Define Missing Method' |
|
1134 |
itemValue: doDefineMethod |
|
1135 |
) |
|
1136 |
) |
|
1137 |
nil |
|
1138 |
nil |
|
1139 |
) |
|
1140 |
! |
|
1141 |
||
1142 |
viewMenuSpec |
|
1143 |
"This resource specification was automatically generated |
|
1144 |
by the MenuEditor of ST/X." |
|
1145 |
||
1146 |
"Do not manually edit this!! If it is corrupted, |
|
1147 |
the MenuEditor may not be able to read the specification." |
|
1148 |
||
1149 |
||
1150 |
" |
|
1151 |
MenuEditor new openOnClass:DebugView andSelector:#viewMenuSpec |
|
1152 |
(Menu new fromLiteralArrayEncoding:(DebugView viewMenuSpec)) startUp |
|
1153 |
" |
|
1154 |
||
1155 |
<resource: #menu> |
|
1156 |
||
1157 |
^ |
|
1158 |
#(Menu |
|
1159 |
( |
|
1160 |
(MenuItem |
|
1161 |
enabled: canShowMore |
|
1162 |
label: 'Show More WalkBack' |
|
1163 |
itemValue: showMoreWalkback |
|
1164 |
) |
|
1165 |
(MenuItem |
|
1166 |
enabled: canShowMore |
|
1167 |
label: 'Show Full WalkBack' |
|
1168 |
itemValue: showFullWalkback |
|
1169 |
) |
|
1170 |
(MenuItem |
|
1171 |
label: '-' |
|
1172 |
) |
|
1173 |
(MenuItem |
|
1174 |
label: 'Show Dense WalkBack' |
|
1175 |
itemValue: showingDenseWalkback: |
|
1176 |
hideMenuOnActivated: false |
|
1177 |
indication: showingDenseWalkback |
|
1178 |
) |
|
1179 |
(MenuItem |
|
1180 |
label: 'Show Support Code (Implementation of Enumerations, Exceptions etc.)' |
|
1181 |
itemValue: showingSupportCode: |
|
1182 |
hideMenuOnActivated: false |
|
1183 |
indication: showingSupportCode |
|
1184 |
) |
|
1185 |
(MenuItem |
|
1186 |
label: '-' |
|
1187 |
) |
|
1188 |
(MenuItem |
|
1189 |
label: 'Raise Debugger when Entering' |
|
1190 |
itemValue: autoRaiseView: |
|
1191 |
hideMenuOnActivated: false |
|
1192 |
indication: autoRaiseView |
|
1193 |
) |
|
1194 |
(MenuItem |
|
1195 |
label: '-' |
|
1196 |
) |
|
1197 |
(MenuItem |
|
1198 |
label: 'Settings...' |
|
1199 |
itemValue: openSettingsDialog |
|
11210 | 1200 |
) |
1201 |
) |
|
1202 |
nil |
|
1203 |
nil |
|
3269 | 1204 |
) |
1205 |
! ! |
|
1206 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1207 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1208 |
|
4121 | 1209 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1210 |
"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
|
1211 |
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
|
1212 |
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
|
1213 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1214 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1215 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1216 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1217 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1218 |
someContexts := Array new:25. |
2042 | 1219 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1220 |
idx := 1. |
10205 | 1221 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
11210 | 1222 |
someContexts at:idx put:con. |
1223 |
con := con sender. |
|
1224 |
idx := idx + 1. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1225 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1226 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1227 |
^ someContexts at:idx. |
3447 | 1228 |
! |
1229 |
||
10205 | 1230 |
interestingContextIndexIn:aContextArray |
12039 | 1231 |
"return an interesting context's index, or nil. |
1232 |
This is the context initially shown (selected) in the walkback. |
|
3447 | 1233 |
We move up the calling chain, skipping all intermediate Signal |
12039 | 1234 |
and Exception contexts, to present the context in which the error actually occured. |
3447 | 1235 |
Just for your convenience :-)" |
1236 |
||
8152 | 1237 |
|con found offset sel prev ex rcvr nMax idx| |
3447 | 1238 |
|
7713 | 1239 |
"/ Transcript showCR:aContextArray. |
7648 | 1240 |
|
3447 | 1241 |
nMax := aContextArray size. |
1242 |
nMax <= 1 ifTrue:[^ 1]. |
|
1243 |
con := aContextArray at:1. |
|
1244 |
con isBlockContext ifTrue:[^ 1]. |
|
12039 | 1245 |
(con method notNil and:[ con method isWrapped ]) ifTrue:[^ 1]. "/ we are already there |
3447 | 1246 |
|
1247 |
"/ somewhere, at the bottom, there must be a raise ... |
|
1248 |
"/ find the exception |
|
1249 |
1 to:5 do:[:i | |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1250 |
con := aContextArray at:i ifAbsent:nil. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1251 |
con notNil ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1252 |
sel := con selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1253 |
(sel startsWith:'raise') ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1254 |
rcvr := con receiver. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1255 |
(rcvr isLazyValue not and:[rcvr isException]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1256 |
ex := rcvr. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1257 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1258 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1259 |
] ifFalse:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1260 |
(rcvr isLazyValue not and:[rcvr isExceptionCreator]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1261 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1262 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1263 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1264 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1265 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1266 |
]. |
3447 | 1267 |
]. |
12039 | 1268 |
"/ Transcript showCR:con. |
3447 | 1269 |
" |
1270 |
if this is a noHandler exception, skip forward |
|
1271 |
to the erronous context |
|
1272 |
" |
|
1273 |
ex notNil ifTrue:[ |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1274 |
ex signal == Signal noHandlerSignal ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1275 |
found := ex suspendedContext |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1276 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1277 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1278 |
"/ Transcript show:'1 '; showCR:found. |
3447 | 1279 |
found isNil ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1280 |
"/ this is a kludge, but convenient. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1281 |
"/ show the place where the error (divisionByZero...) happend, |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1282 |
"/ not where the signal was raised. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1283 |
con := (aContextArray at:1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1284 |
sel := con methodHome selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1285 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1286 |
"/ typically a DivisionByZero - show caller of division |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1287 |
(sel == #// |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1288 |
or:[sel == #/ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1289 |
or:[sel == #\\]]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1290 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1291 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1292 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1293 |
"/ show the place of the bad message; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1294 |
(sel == #doesNotUnderstand:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1295 |
idx := 3. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1296 |
nMax > 2 ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1297 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1298 |
sel == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1299 |
idx := 4 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1300 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1301 |
nMax > idx ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1302 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1303 |
"/ show the place of the perfor-send; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1304 |
((sel == #perform:) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1305 |
or:[sel startsWith:'perform:with']) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1306 |
idx := idx + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1307 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1308 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1309 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1310 |
^ idx min:nMax |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1311 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1312 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1313 |
"/ show the bad method; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1314 |
(sel == #noByteCode) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1315 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1316 |
]. |
3447 | 1317 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1318 |
"/ "/ 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
|
1319 |
"/ ((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1320 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1321 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1322 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1323 |
"/ "/ 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
|
1324 |
"/ (sel == #shouldImplement) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1325 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1326 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1327 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1328 |
"/ "/ 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
|
1329 |
"/ ((sel == #error:mayProceed:) |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1330 |
"/ or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1331 |
"/ nMax > 2 ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1332 |
"/ sel := (aContextArray at:2) selector. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1333 |
"/ sel == #mustBeBoolean ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1334 |
"/ ^ 3 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1335 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1336 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1337 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1338 |
"/ ]. |
7862 | 1339 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1340 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1341 |
(sel == #signalInterrupt:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1342 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1343 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1344 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1345 |
"/ "/ 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
|
1346 |
"/ ((sel == #error) or:[sel == #error:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1347 |
"/ con method mclass == Object ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1348 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1349 |
"/ ] |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1350 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1351 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1352 |
"/ "/ 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
|
1353 |
"/ (sel == #subclassResponsibility) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1354 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1355 |
"/ ]. |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
1356 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1357 |
"/ show the place of the bad index; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1358 |
( #(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1359 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1360 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1361 |
#elementBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1362 |
"/ #subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1363 |
) includes:sel) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1364 |
idx := 2. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1365 |
[ idx <= 3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1366 |
and:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1367 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1368 |
#(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1369 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1370 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1371 |
#elementBoundsError: ) includes:sel |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1372 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1373 |
] whileTrue:[ idx := idx + 1 ]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1374 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1375 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1376 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1377 |
sel := (aContextArray at:idx+1) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1378 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1379 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1380 |
sel := (aContextArray at:idx+2) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1381 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1382 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1383 |
^ idx+3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1384 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1385 |
^ idx+2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1386 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1387 |
^ idx+1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1388 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1389 |
^ idx |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1390 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1391 |
offset := 1. |
8152 | 1392 |
]. |
1393 |
||
1394 |
"/ the above is all too hard-coded; |
|
1395 |
"/ ask the method, if it thinks it should be skipped in the walkback. |
|
1396 |
"/ as more methods get flagged, remove code from above. |
|
1397 |
con := aContextArray at:offset ifAbsent:nil. |
|
1398 |
||
10205 | 1399 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1400 |
con notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1401 |
and:[ con methodHome notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1402 |
and:[ con methodHome method notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1403 |
and:[ con methodHome method shouldBeSkippedInDebuggersWalkBack ]]] |
8152 | 1404 |
] whileTrue:[ |
1405 |
"/ Transcript showCR:con methodHome method. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1406 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1407 |
con := aContextArray at:offset ifAbsent:nil. |
8152 | 1408 |
]. |
3447 | 1409 |
|
1410 |
" |
|
1411 |
got it; move up, skipping all intermediate Signal and |
|
1412 |
Exception contexts |
|
1413 |
" |
|
1414 |
prev := nil. |
|
1415 |
rcvr := con receiver. |
|
10205 | 1416 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1417 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 1418 |
] whileTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1419 |
prev := con. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1420 |
nMax > offset ifFalse:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1421 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1422 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1423 |
con := aContextArray at:offset. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1424 |
rcvr := con receiver. |
3447 | 1425 |
]. |
1426 |
||
1427 |
" |
|
1428 |
now, we are one above the raising context |
|
1429 |
" |
|
1430 |
||
1431 |
" |
|
1432 |
if the sender-method of the raise is one of objects error methods ... |
|
1433 |
" |
|
10205 | 1434 |
( #( halt halt: |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1435 |
error error: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1436 |
doesNotUnderstand: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1437 |
subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1438 |
primitiveFailed) includes:con selector) |
3447 | 1439 |
ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1440 |
con selector == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1441 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1442 |
one more up, to get to the originating context |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1443 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1444 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1445 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1446 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1447 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1448 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1449 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1450 |
offset := offset + 1. |
3447 | 1451 |
] ifFalse:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1452 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1453 |
ok, got the raise - if its a BreakPoint, look for the sender |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1454 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1455 |
(prev notNil and:[prev receiver == BreakPointInterrupt]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1456 |
offset := offset + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1457 |
]. |
3447 | 1458 |
]. |
1459 |
||
1460 |
^ offset |
|
1461 |
||
7713 | 1462 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1463 |
"Modified: / 08-07-2011 / 13:15:49 / cg" |
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1464 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1465 |
|
73 | 1466 |
!DebugView methodsFor:'basic'! |
1467 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1468 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1469 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1470 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1471 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1472 |
m notNil ifTrue:[ |
11210 | 1473 |
self updateMenuItems. |
1474 |
||
1475 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
|
1476 |
abortButton enable. |
|
1477 |
m enable:#doAbort. |
|
1478 |
] ifFalse:[ |
|
1479 |
abortButton disable. |
|
1480 |
m disable:#doAbort. |
|
1481 |
]. |
|
1482 |
exclusive ifTrue:[ |
|
1483 |
terminateButton disable. |
|
1484 |
m disable:#doTerminate. |
|
1485 |
] ifFalse:[ |
|
1486 |
terminateButton enable. |
|
1487 |
m enable:#doTerminate. |
|
1488 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1489 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1490 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1491 |
mayProceed == false ifTrue:[ |
11210 | 1492 |
continueButton disable. |
1493 |
m notNil ifTrue:[m disable:#doContinue]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1494 |
] ifFalse:[ |
11210 | 1495 |
continueButton enable. |
1496 |
m notNil ifTrue:[m enable:#doContinue] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1497 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1498 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1499 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1500 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1501 |
|
12281 | 1502 |
enter |
1503 |
"enter a debugger" |
|
1504 |
||
1505 |
<context: #return> |
|
1506 |
||
1507 |
^ self |
|
1508 |
enter:thisContext sender |
|
1509 |
select: nil. |
|
1510 |
||
1511 |
"Modified: / 28-08-2012 / 21:13:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1512 |
! |
|
1513 |
||
1364 | 1514 |
enter:aContext select:initialSelectionOrNil |
73 | 1515 |
"enter the debugger - get and display the context, then start an |
1516 |
exclusive event loop on top of eveything else" |
|
1517 |
||
3447 | 1518 |
<context: #return> |
1519 |
||
9076 | 1520 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
3447 | 1521 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1522 |
DebuggingDebugger == true ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1523 |
'==> enter2: (' print. aContext print. |
11210 | 1524 |
') select: ' print. initialSelectionOrNil printCR. |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1525 |
]. |
3447 | 1526 |
thisContext isRecursive ifTrue:[ |
11210 | 1527 |
"/ care for the special case, were the Debugger was autoloaded. |
1528 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1529 |
"/ condition. |
|
1530 |
foundNoByteCodeContext := false. |
|
1531 |
foundExitContext := false. |
|
1532 |
||
1533 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1534 |
[ |
|
1535 |
foundNoByteCodeContext not |
|
1536 |
and:[ foundExitContext not |
|
1537 |
and:[c notNil |
|
1538 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
|
1539 |
]]]] |
|
1540 |
whileTrue:[ |
|
1541 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1542 |
foundExitContext := true |
|
1543 |
]. |
|
1544 |
c selector == #noByteCode ifTrue:[ |
|
1545 |
foundNoByteCodeContext := true |
|
1546 |
]. |
|
1547 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1548 |
]. |
|
1549 |
||
1550 |
(foundNoByteCodeContext not |
|
1551 |
and:[ foundExitContext not]) ifFalse:[ |
|
1552 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1553 |
||
1554 |
^ MiniDebugger |
|
1555 |
enter:aContext |
|
1556 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1557 |
mayProceed:mayProceed. |
|
1558 |
]. |
|
1559 |
foundExitContext ifTrue:[ |
|
1560 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1561 |
^ self. |
|
1562 |
]. |
|
3447 | 1563 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1564 |
|
10203 | 1565 |
"/'entering: ' print. aContext printCR. |
1566 |
"/'initial: ' print. initialSelectionOrNil printCR. |
|
8170 | 1567 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1568 |
||
11890 | 1569 |
(self isHaltToBeIgnored) ifTrue:[ |
11210 | 1570 |
^ self. |
8170 | 1571 |
]. |
11892 | 1572 |
"/ "/ does not work yet - but we should ignore any breakpoints while stepping |
1573 |
"/ (stepping and:[steppedContext notNil]) ifTrue:[ |
|
1574 |
"/ self isEnteredDueToBreakpointOrHalt ifTrue:[ |
|
1575 |
"/ 'DebugView [info]: ignored other interrupt while stepping' infoPrintCR. |
|
1576 |
"/ ^ self |
|
1577 |
"/ ]. |
|
1578 |
"/ ]. |
|
8170 | 1579 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1580 |
iAmNew := drawableId isNil. |
73 | 1581 |
|
8148 | 1582 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 1583 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1584 |
busy := cachable := true. |
73 | 1585 |
inspecting := false. |
1586 |
inspectedProcess := Processor activeProcess. |
|
1587 |
stepping := false. |
|
1588 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1589 |
stepHow := nil. |
8148 | 1590 |
nChainShown := InitialNChainShown. |
73 | 1591 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1592 |
"/ if debugger is entered while a box has grabbed the |
9076 | 1593 |
"/ 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
|
1594 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1595 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1596 |
"/ 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
|
1597 |
"/ 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
|
1598 |
"/ 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
|
1599 |
Screen allScreens do:[:aScreen | |
11210 | 1600 |
aScreen ungrabPointer. |
1601 |
aScreen ungrabKeyboard. |
|
10205 | 1602 |
]. |
1603 |
||
1604 |
("inspectedProcess suspendedContext isNil |
|
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1605 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
11210 | 1606 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1607 |
] ifFalse:[ |
11210 | 1608 |
terminateButton enable. |
1609 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1610 |
]. |
73 | 1611 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1612 |
iAmNew ifFalse:[ |
11210 | 1613 |
"/ not the first time - disable buttons & menus |
1614 |
"/ from the previous life |
|
1615 |
self turnOffAllButtons. |
|
1616 |
||
1617 |
m := contextView middleButtonMenu. |
|
1618 |
m notNil ifTrue:[ |
|
1619 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
|
1620 |
]. |
|
11697 | 1621 |
self showingDenseWalkback:(verboseBacktrace not). |
132 | 1622 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1623 |
self iconLabel:'Debugger'. |
132 | 1624 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1625 |
windowGroup isNil ifTrue:[ |
11210 | 1626 |
self windowGroup: WindowGroup new. |
1627 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1628 |
]. |
132 | 1629 |
exclusive ifFalse:[ |
11210 | 1630 |
"/ create a (modal) windowGroup for myself |
1631 |
||
1632 |
windowGroup setModal:true. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1633 |
] ifTrue:[ |
11210 | 1634 |
"/ create a windowGroup with a synchronous sensor for me |
1635 |
||
1636 |
windowGroup beSynchronous. |
|
73 | 1637 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1638 |
windowGroup setProcess:Processor activeProcess. |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1639 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1640 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1641 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1642 |
" |
12039 | 1643 |
"/Transcript show:'0 '; showCR:aContext. |
1644 |
"/Transcript show:'0 '; showCR:thisContext sender. |
|
1645 |
"/Transcript show:'0 '; showCR:thisContext sender sender. |
|
1646 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender. |
|
1647 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender. |
|
1648 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender. |
|
1649 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender. |
|
1650 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender. |
|
1651 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender . |
|
1652 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender. |
|
1653 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender. |
|
1654 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender sender. |
|
1655 |
"/Transcript showCR:initialSelectionOrNil. |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1656 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1657 |
"/'after setContext; first is ' print. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1658 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1659 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1660 |
|
12039 | 1661 |
IsDebuggingQuery answer:true do:[ |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1662 |
self updateButtonsAndMenuItemsForContext:aContext. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1663 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1664 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1665 |
If this is a new debugger, do a realize. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1666 |
Otherwise, its probably better to do a map, which shows the |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1667 |
view at the previous position, without a need for the user to set the |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1668 |
position again |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1669 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1670 |
iAmNew ifFalse:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1671 |
self remap. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1672 |
] ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1673 |
self realize. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1674 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1675 |
self setForegroundWindow. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1676 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1677 |
exclusive ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1678 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1679 |
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
|
1680 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1681 |
This is a modal debugger - all event processing is stopped.. |
10205 | 1682 |
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
|
1683 |
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
|
1684 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1685 |
Also, there is no event processing (redraw) for other views.' |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1686 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1687 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1688 |
self autoRaiseView ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1689 |
"/ self raise. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1690 |
self raiseDeiconified. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1691 |
self topView activate; setForegroundWindow; activate. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1692 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1693 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1694 |
canContinue := true. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1695 |
exitAction := nil. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1696 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1697 |
"/ enter private event handling loop. This is left (and we come back here again) |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1698 |
"/ when any button was pressed which requires continuation of the debuggee or |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1699 |
"/ closedown of the debugger. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1700 |
[self controlLoop] ifCurtailed:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1701 |
windowGroup notNil ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1702 |
windowGroup setProcess:nil. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1703 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1704 |
self destroy |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1705 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1706 |
]. |
10203 | 1707 |
"/ here after my own control loop is finished. |
1708 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1709 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1710 |
"/ 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
|
1711 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1712 |
contextView contents:nil. |
1713 |
||
73 | 1714 |
codeView acceptAction:nil. |
942 | 1715 |
codeView doItAction:nil. |
73 | 1716 |
|
4892 | 1717 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
11210 | 1718 |
ObjectMemory stepInterruptHandler:nil. |
4892 | 1719 |
]. |
1720 |
||
11911 | 1721 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
1722 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
|
1723 |
||
73 | 1724 |
(exitAction ~~ #step) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1725 |
"/ not stepping or continue - close window |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1726 |
self cacheMyself. |
11210 | 1727 |
receiverInspector release. |
1728 |
contextInspector release. |
|
1729 |
||
1730 |
self unmap. |
|
1731 |
device flush. |
|
1732 |
||
1733 |
(exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
|
1734 |
(exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
|
1735 |
(exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
|
1736 |
(exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
|
1737 |
(exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
|
1738 |
(exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
|
1739 |
exitAction isBlock ifTrue:[ |
|
1740 |
self exit_unwindThenDo:exitAction. |
|
1741 |
"does not return" |
|
1742 |
]. |
|
1743 |
"not reached" |
|
1744 |
^ self |
|
73 | 1745 |
]. |
1746 |
||
3447 | 1747 |
"/ stepping - window stays open |
940 | 1748 |
selectedContext := actualContext := firstContext := nil. |
73 | 1749 |
|
2472 | 1750 |
"/ restore the previous pointer grab |
73 | 1751 |
grabber notNil ifTrue:[ |
11210 | 1752 |
device grabPointerInView:grabber. |
1753 |
grabber := nil. |
|
61 | 1754 |
]. |
73 | 1755 |
|
1756 |
(exitAction == #step) ifTrue:[ |
|
11210 | 1757 |
" |
1758 |
schedule another stepInterrupt |
|
1759 |
- must enter myself into the collection of open debuggers, |
|
1760 |
in case the stepping process comes back again via a halt or signal |
|
1761 |
before the step is finished. In this case, the stepping debugger should |
|
1762 |
come up (instead of a new one) |
|
1763 |
- must flush caches since optimized methods not always |
|
1764 |
look for pending interrupts |
|
1765 |
" |
|
1766 |
||
1767 |
"/ |
|
1768 |
"/ also must care for stepping into a return |
|
1769 |
"/ |
|
1770 |
steppedContext notNil ifTrue:[ |
|
1771 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
|
1772 |
]. |
|
1773 |
||
1774 |
OpenDebuggers isNil ifTrue:[ |
|
1775 |
OpenDebuggers := WeakIdentitySet new. |
|
1776 |
]. |
|
1777 |
OpenDebuggers add:self. |
|
1778 |
||
1779 |
self label:'single stepping - please wait ...'. |
|
1780 |
stepping := true. |
|
1781 |
||
1782 |
ObjectMemory stepInterruptHandler:self. |
|
1783 |
Processor activeProcess stepInterruptHandler:self. |
|
1784 |
ObjectMemory flushCaches. |
|
1785 |
||
1786 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
|
1787 |
Context singleStepInterruptRequest |
|
1788 |
raiseWith: |
|
1789 |
(("bigStep" steppedContextLineno notNil) |
|
1790 |
ifTrue:[#next] |
|
1791 |
ifFalse:[#step]) |
|
1792 |
] ifFalse:[ |
|
1793 |
"/ see if we came here through an interrupt-action |
|
1794 |
"/ (i.e. aProcess interruptWith:...) |
|
1795 |
||
1796 |
enteredByInterrupt := false. |
|
1797 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1798 |
[enteredByInterrupt not |
|
1799 |
and:[con notNil |
|
1800 |
and:[con ~~ aContext]]] whileTrue:[ |
|
1801 |
((sel := con selector) == #timerInterrupt |
|
1802 |
or:[sel == #ioInterrupt]) ifTrue:[ |
|
1803 |
enteredByInterrupt := true. |
|
1804 |
] ifFalse:[ |
|
1805 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1806 |
]. |
|
1807 |
]. |
|
1808 |
||
1809 |
ObjectMemory flushInlineCaches. |
|
1810 |
||
1811 |
DebuggingDebugger == true ifTrue:[ |
|
1812 |
enteredByInterrupt printCR. |
|
1813 |
]. |
|
1814 |
enteredByInterrupt ifTrue:[ |
|
11890 | 1815 |
"/ don't want to step through all intermediate |
11210 | 1816 |
"/ (scheduler-) contexts; place a return-trap on the |
1817 |
"/ one right below the interesting one |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1818 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1819 |
"/ 'special unwind return' printCR. |
11210 | 1820 |
con unwindThenDo:[ |
1821 |
Processor activeProcess stepInterruptHandler:self. |
|
1822 |
ObjectMemory stepInterruptHandler:self. |
|
1823 |
InStepInterrupt := nil. |
|
1824 |
StepInterruptPending := 1. |
|
1825 |
InterruptPending := 1]. |
|
1826 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1827 |
"/ 'normal step return' printCR. |
11210 | 1828 |
skipLineNr ~~ #return ifTrue:[ |
1829 |
StepInterruptPending := 1. |
|
1830 |
InterruptPending := 1. |
|
1831 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1832 |
"/ 'step for return' printCR. |
11210 | 1833 |
] |
1834 |
]. |
|
1835 |
InStepInterrupt := nil |
|
1836 |
] |
|
73 | 1837 |
] ifFalse:[ |
11210 | 1838 |
OpenDebuggers notNil ifTrue:[ |
1839 |
OpenDebuggers remove:self ifAbsent:[]. |
|
1840 |
]. |
|
1841 |
self cacheMyself. |
|
73 | 1842 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1843 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1844 |
"Modified: / 17-04-1997 / 13:01:32 / stefan" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1845 |
"Created: / 30-10-1997 / 21:08:18 / cg" |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1846 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
11697 | 1847 |
"Modified: / 27-07-2012 / 17:35:56 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1848 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1849 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1850 |
exit_abort |
5455 | 1851 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
1852 |
"/ that one would run on top of this context. |
|
1853 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1854 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1855 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1856 |
"/ done in the #enter:select method. |
5455 | 1857 |
"/ You are not expected to understand this. |
1858 |
||
6487 | 1859 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
1860 |
! |
|
1861 |
||
1862 |
exit_abortAll |
|
1863 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1864 |
"/ that one would run on top of this context. |
|
1865 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1866 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1867 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1868 |
"/ done in the #enter:select method. |
6487 | 1869 |
"/ You are not expected to understand this. |
1870 |
||
1871 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1872 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1873 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1874 |
exit_quickTerminate |
3447 | 1875 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1876 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1877 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1878 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 1879 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1880 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1881 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1882 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1883 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1884 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1885 |
selectedContext notNil ifTrue:[ |
11210 | 1886 |
con := selectedContext. |
1887 |
self cacheMyself. |
|
1888 |
" |
|
1889 |
have to catch errors occuring in unwind-blocks |
|
1890 |
" |
|
1891 |
Error handle:[:ex | |
|
1892 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1893 |
ex description infoPrintCR. |
|
1894 |
ex proceed |
|
1895 |
] do:[ |
|
1896 |
con unwindAndRestart. |
|
1897 |
]. |
|
1898 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1899 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1900 |
|
11818 | 1901 |
"Created: / 16-11-2001 / 17:23:17 / cg" |
11819 | 1902 |
"Modified: / 26-09-2012 / 15:09:52 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1903 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1904 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1905 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1906 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1907 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1908 |
selectedContext notNil ifTrue:[ |
11210 | 1909 |
" |
1910 |
if there is a selection in the codeView, |
|
1911 |
evaluate it and use the result as return value |
|
1912 |
" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1913 |
"/ disabled for now, there is almost always a selection (the current line) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1914 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1915 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1916 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1917 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1918 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1919 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1920 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1921 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1922 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1923 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1924 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1925 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1926 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1927 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1928 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1929 |
|
11210 | 1930 |
con := selectedContext. |
1931 |
self cacheMyself. |
|
1932 |
" |
|
1933 |
have to catch errors occuring in unwind-blocks |
|
1934 |
" |
|
1935 |
Error handle:[:ex | |
|
1936 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1937 |
ex description infoPrintCR. |
|
1938 |
ex proceed |
|
1939 |
] do:[ |
|
1940 |
con unwind:retVal. |
|
1941 |
]. |
|
1942 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1943 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1944 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1945 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 1946 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1947 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1948 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1949 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1950 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1951 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1952 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1953 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1954 |
Error handle:[:ex | |
11210 | 1955 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1956 |
ex description infoPrintCR. |
|
1957 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1958 |
] do:[ |
11210 | 1959 |
self cacheMyself. |
1960 |
Processor activeProcess terminate. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1961 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1962 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1963 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1964 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 1965 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
1966 |
! |
|
1967 |
||
6487 | 1968 |
exit_unwindThenDo:aBlock |
1969 |
|con| |
|
1970 |
||
1971 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1972 |
"/ that one would run on top of this context. |
|
1973 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1974 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1975 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1976 |
"/ done in the #enter:select method. |
6487 | 1977 |
"/ You are not expected to understand this. |
1978 |
||
1979 |
" |
|
1980 |
have to catch errors occuring in unwind-blocks |
|
1981 |
" |
|
1982 |
self cacheMyself. |
|
1983 |
||
1984 |
Error handle:[:ex | |
|
11210 | 1985 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1986 |
ex description infoPrintCR. |
|
1987 |
||
1988 |
ex proceed |
|
6487 | 1989 |
] do:[ |
11210 | 1990 |
"/ find the enter:select context. |
1991 |
con := thisContext sender. |
|
1992 |
[ |
|
1993 |
(con selector == #enter:select:) |
|
1994 |
and:[con receiver == self] |
|
1995 |
] |
|
1996 |
whileFalse:[ con := con sender ]. |
|
1997 |
||
1998 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
1999 |
con sender receiver == self class ifTrue:[ |
|
2000 |
con := con sender. |
|
2001 |
con sender receiver == self class ifTrue:[ |
|
2002 |
con := con sender. |
|
2003 |
con isBlockContext ifTrue:[ |
|
2004 |
con := con methodHome. |
|
2005 |
] |
|
2006 |
]. |
|
2007 |
]. |
|
2008 |
||
2009 |
con unwindThenDo:aBlock. |
|
6487 | 2010 |
]. |
2011 |
'DebugView [warning]: abort failed' errorPrintCR |
|
2012 |
||
2013 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
2014 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
2015 |
! |
|
2016 |
||
3447 | 2017 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
2018 |
|selection con1 con2 h| |
|
2019 |
||
2020 |
initialSelectionOrNil notNil ifTrue:[ |
|
11210 | 2021 |
^ initialSelectionOrNil |
3447 | 2022 |
]. |
2023 |
||
2024 |
" |
|
2025 |
and find the one context to show initially |
|
2026 |
- if we came here by a send (single step), its the top context; |
|
2027 |
- if we came here by a step (i.e. bigStep), its the top context |
|
2028 |
(for ifs and whiles) or the sender (for regular sends). |
|
2029 |
- otherwise, we came here by some signal raise, and we are interested |
|
2030 |
in the context where the raise actually occured. |
|
2031 |
" |
|
2032 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
2033 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
12039 | 2034 |
"/ Transcript show:'x '; showCR:exitAction. |
2035 |
||
2036 |
"/ came here via a step? |
|
3447 | 2037 |
exitAction == #step ifTrue:[ |
11210 | 2038 |
selection := 1. |
2039 |
steppedContext notNil ifTrue:[ |
|
2040 |
||
2041 |
" |
|
2042 |
if we came here by a big-step, show the method where we are |
|
2043 |
" |
|
2044 |
con1 == steppedContext ifTrue:[ |
|
2045 |
selection := 1 |
|
2046 |
] ifFalse:[ |
|
2047 |
con2 == steppedContext ifTrue:[ |
|
2048 |
selection := 2 |
|
2049 |
] |
|
2050 |
]. |
|
2051 |
" |
|
2052 |
for bigStep, we could also be in a block below the actual method ... |
|
2053 |
" |
|
2054 |
((h := con1 home) notNil |
|
2055 |
and:[h == steppedContext]) ifTrue:[ |
|
2056 |
selection := 1 |
|
2057 |
] ifFalse:[ |
|
2058 |
(con2 notNil |
|
2059 |
and:[(h := con2 home) notNil |
|
2060 |
and:[h == steppedContext]]) ifTrue:[ |
|
2061 |
selection := 2 |
|
2062 |
] |
|
2063 |
]. |
|
2064 |
h := nil. |
|
2065 |
] |
|
3447 | 2066 |
] ifFalse:[ |
11210 | 2067 |
steppedContext isNil ifTrue:[ |
2068 |
" |
|
2069 |
preselect a more interesting context, (where halt/raise was ...) |
|
2070 |
" |
|
2071 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
2072 |
selection := self class interestingContextIndexIn:contextArray. |
|
12039 | 2073 |
"/ Transcript show:'x '; showCR:selection. |
11210 | 2074 |
selection := selection min:(contextArray size). |
2075 |
] ifFalse:[ |
|
2076 |
" |
|
2077 |
if we came here by a big-step, show the method where we are |
|
2078 |
" |
|
2079 |
con1 == steppedContext ifTrue:[ |
|
2080 |
selection := 1 |
|
2081 |
] ifFalse:[ |
|
2082 |
con2 == steppedContext ifTrue:[ |
|
2083 |
selection := 2. |
|
2084 |
] |
|
2085 |
] |
|
2086 |
] |
|
3447 | 2087 |
]. |
2088 |
^ selection |
|
2089 |
||
2090 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
2091 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 2092 |
! |
2093 |
||
5110 | 2094 |
isInspecting |
2095 |
^ inspecting |
|
2096 |
! |
|
2097 |
||
2098 |
isNotInspecting |
|
2099 |
^ inspecting not |
|
2100 |
! |
|
2101 |
||
73 | 2102 |
openOn:aProcess |
10205 | 2103 |
"enter the debugger on a process - |
73 | 2104 |
in this case, we are just inspecting the context chain of the process, |
2105 |
not running on top of the debugged process, but as a separate |
|
2106 |
one. (think of it as an inspector showing more detail, and offering |
|
2107 |
some more control operations)" |
|
2108 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2109 |
|bpanel dummy w| |
73 | 2110 |
|
8148 | 2111 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 2112 |
|
73 | 2113 |
busy := true. |
2114 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2115 |
stepHow := nil. |
73 | 2116 |
inspecting := true. |
2117 |
inspectedProcess := aProcess. |
|
8148 | 2118 |
nChainShown := InitialNChainShown. |
73 | 2119 |
|
2120 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2121 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2122 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2123 |
"/ get the max size & freeze button |
6647 | 2124 |
continueButton label:(resources string:'Continue'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2125 |
w := continueButton preferredWidth. |
6647 | 2126 |
continueButton label:(resources string:'Stop'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2127 |
w := w max:(continueButton preferredWidth). |
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2128 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2129 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2130 |
aProcess state == #run ifTrue:[ |
11210 | 2131 |
device hasColors ifTrue:[ |
2132 |
continueButton foregroundColor:Color red darkened. |
|
2133 |
]. |
|
2134 |
continueButton label:(resources string:'Stop'). |
|
2135 |
continueButton action:[self doStop]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2136 |
] ifFalse:[ |
11210 | 2137 |
device hasColors ifTrue:[ |
2138 |
continueButton foregroundColor:Color green darkened darkened. |
|
2139 |
]. |
|
2140 |
continueButton label:(resources string:'Continue'). |
|
2141 |
continueButton action:[self doContinue]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2142 |
]. |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2143 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
73 | 2144 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2145 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2146 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2147 |
|
92 | 2148 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 2149 |
dummy borderWidth:0; level:0. |
61 | 2150 |
|
73 | 2151 |
"/ stepButton destroy. |
2152 |
"/ sendButton destroy. |
|
2153 |
||
2154 |
updateButton := Button |
|
11210 | 2155 |
label:(resources string:'Update') |
2156 |
action:[self updateContext] |
|
2157 |
in:bpanel. |
|
73 | 2158 |
monitorToggle := Toggle in:bpanel. |
6647 | 2159 |
monitorToggle label:(resources string:'Monitor'). |
73 | 2160 |
monitorToggle pressAction:[self autoUpdateOn]. |
2161 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
2162 |
||
2163 |
"can only look into process - context chain is not active" |
|
2164 |
canContinue := true. |
|
2165 |
||
2166 |
terminateButton enable. |
|
2167 |
abortButton enable. |
|
2168 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2169 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2170 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2171 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2172 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2173 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 2174 |
|
2175 |
aProcess isNil ifTrue:[ |
|
11210 | 2176 |
terminateButton disable. |
2177 |
abortButton disable. |
|
2178 |
continueButton disable. |
|
2179 |
returnButton disable. |
|
2180 |
restartButton disable. |
|
73 | 2181 |
] ifFalse:[ |
11210 | 2182 |
(aProcess suspendedContext isNil |
2183 |
or:[aProcess isSystemProcess]) ifTrue:[ |
|
2184 |
terminateButton disable. |
|
2185 |
]. |
|
2186 |
||
2187 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
|
2188 |
||
2189 |
catchBlock := [ |
|
2190 |
catchBlock := nil. |
|
2191 |
contextArray := nil. |
|
2192 |
selectedContext := actualContext := firstContext := nil. |
|
2193 |
steppedContext := wrapperContext := nil. |
|
2194 |
||
2195 |
(exitAction == #terminate) ifTrue:[ |
|
2196 |
aProcess terminate. |
|
2197 |
]. |
|
2198 |
(exitAction == #quickTerminate) ifTrue:[ |
|
2199 |
aProcess terminateNoSignal. |
|
2200 |
]. |
|
2201 |
super destroy |
|
2202 |
]. |
|
73 | 2203 |
]. |
2204 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
2205 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2206 |
"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
|
2207 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2208 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2209 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2210 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 2211 |
|selection| |
2212 |
||
2213 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2214 |
selection notNil ifTrue:[ |
11210 | 2215 |
self showSelection:selection. |
2216 |
contextView setSelection:selection. |
|
2217 |
selection > 1 ifTrue:[ |
|
2218 |
contextView scrollToLine:(selection - 1) |
|
2219 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2220 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2221 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2222 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 2223 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2224 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2225 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2226 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2227 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2228 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2229 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2230 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2231 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2232 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2233 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2234 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2235 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2236 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 2237 |
! ! |
2238 |
||
2239 |
!DebugView methodsFor:'help'! |
|
2240 |
||
8212 | 2241 |
flyByHelpDependsOnPositionIn:aView |
2242 |
"subclasses where the help-text depends upon the pointer position might |
|
2243 |
want to redefine this" |
|
2244 |
||
2245 |
^ aView == codeView |
|
2246 |
! |
|
2247 |
||
3510 | 2248 |
flyByHelpTextFor:aComponent |
2249 |
|s| |
|
2250 |
||
2251 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2252 |
s := 'Abort (unwind to eventLoop)' |
3510 | 2253 |
]. |
2254 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2255 |
s := 'Terminate process (close view)' |
3510 | 2256 |
]. |
2257 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2258 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2259 |
s := 'Stop' |
|
2260 |
] ifFalse:[ |
|
2261 |
s := 'Continue execution' |
|
2262 |
] |
|
3510 | 2263 |
]. |
2264 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2265 |
s := 'Step to next send (don''t enter into called methods)' |
3510 | 2266 |
]. |
2267 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2268 |
s := 'Step to next line (don''t enter into called methods)' |
3510 | 2269 |
]. |
2270 |
aComponent == nextOverButton ifTrue:[ |
|
11210 | 2271 |
s := 'Step over to cursor-line' |
3510 | 2272 |
]. |
2273 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2274 |
s := 'Step out to caller' |
3510 | 2275 |
]. |
2276 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2277 |
s := 'Send next message (enter into called methods)' |
3510 | 2278 |
]. |
2279 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2280 |
s := 'Return from selected method' |
3510 | 2281 |
]. |
2282 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2283 |
s := 'Restart selected method' |
3510 | 2284 |
]. |
2285 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2286 |
s := 'Toggle monitoring' |
3510 | 2287 |
]. |
2288 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2289 |
s := 'Update' |
3510 | 2290 |
]. |
8656 | 2291 |
aComponent == reportButton ifTrue:[ |
11210 | 2292 |
s := 'Send a defect report via eMail' |
8656 | 2293 |
]. |
3510 | 2294 |
s notNil ifTrue:[ |
11210 | 2295 |
^ resources string:s |
3510 | 2296 |
]. |
2297 |
^ nil |
|
2298 |
||
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2299 |
"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
|
2300 |
"Modified: / 18-06-2010 / 11:34:51 / cg" |
3510 | 2301 |
! |
2302 |
||
8212 | 2303 |
flyByHelpTextFor:aComponent at:aPointOrNil |
8396 | 2304 |
|s vline line col pos interval| |
8212 | 2305 |
|
2306 |
aComponent == codeView ifFalse:[^ nil]. |
|
2307 |
aPointOrNil isNil ifTrue:[^ nil]. |
|
9446 | 2308 |
self sensor motionEventPending ifTrue:[^ nil]. |
8212 | 2309 |
|
8396 | 2310 |
vline := codeView visibleLineOfY:aPointOrNil y. |
2311 |
col := codeView colOfX:aPointOrNil x inVisibleLine:vline. |
|
2312 |
line := codeView visibleLineToAbsoluteLine:vline. |
|
8212 | 2313 |
|
2314 |
pos := codeView characterPositionOfLine:line col:col. |
|
2315 |
interval := pos to:pos. |
|
2316 |
||
10205 | 2317 |
self |
11210 | 2318 |
withNodeValueAtInterval:interval |
2319 |
do:[:value :description | |
|
2320 |
|valueClassOrSizeString valueString| |
|
2321 |
||
2322 |
valueClassOrSizeString := valueString := ''. |
|
2323 |
||
2324 |
"/ some heuristics as when to show the class name (a purely subjective preference) |
|
2325 |
value isString ifTrue:[ |
|
2326 |
value isText ifTrue:[ |
|
2327 |
valueString := '"',(value contractTo:80),'"'. |
|
2328 |
] ifFalse:[ |
|
2329 |
valueString := value storeString contractTo:80. |
|
2330 |
]. |
|
2331 |
] ifFalse:[ |
|
2332 |
(value isBoolean |
|
2333 |
or:[ value isInteger |
|
2334 |
or:[ value isSymbol ]]) ifTrue:[ |
|
2335 |
valueString := value printString. |
|
2336 |
] ifFalse:[ |
|
2337 |
valueClassOrSizeString := ' (',value class name,')'. |
|
2338 |
||
2339 |
(value isArray |
|
2340 |
or:[ value isOrderedCollection ]) ifTrue:[ |
|
2341 |
valueClassOrSizeString := ' (size=',value size printString,')'. |
|
2342 |
]. |
|
2343 |
||
2344 |
Error handle:[:ex | |
|
2345 |
valueString := '??? (',ex description,')' |
|
2346 |
] do:[ |
|
2347 |
[ |
|
2348 |
valueString := value printString contractTo:80. |
|
2349 |
] valueWithWatchDog:[ valueString := value classNameWithArticle ] afterMilliseconds:30. |
|
2350 |
] |
|
2351 |
] |
|
2352 |
]. |
|
2353 |
description isEmptyOrNil ifTrue:[ |
|
2354 |
s := valueString , valueClassOrSizeString |
|
2355 |
] ifFalse:[ |
|
2356 |
s := description , ': ', valueString, valueClassOrSizeString |
|
2357 |
]. |
|
2358 |
]. |
|
8592 | 2359 |
"/ Transcript showCR:s. |
2360 |
^ s |
|
9446 | 2361 |
|
2362 |
"Modified: / 27-04-2010 / 17:51:53 / cg" |
|
8212 | 2363 |
! |
2364 |
||
266 | 2365 |
helpTextFor:aComponent |
2366 |
|s| |
|
2367 |
||
2368 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2369 |
s := 'HELP_ABORT' |
266 | 2370 |
]. |
2371 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2372 |
s := 'HELP_TERMINATE' |
266 | 2373 |
]. |
2374 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2375 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2376 |
s := 'HELP_STOP' |
|
2377 |
] ifFalse:[ |
|
2378 |
s := 'HELP_CONTINUE' |
|
2379 |
] |
|
266 | 2380 |
]. |
2381 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2382 |
s := 'HELP_STEP' |
266 | 2383 |
]. |
2384 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2385 |
s := 'HELP_NEXT' |
266 | 2386 |
]. |
1065 | 2387 |
aComponent == nextOverButton ifTrue:[ |
11210 | 2388 |
s := 'HELP_NEXTOVER' |
1065 | 2389 |
]. |
2390 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2391 |
s := 'HELP_NEXTOUT' |
1065 | 2392 |
]. |
266 | 2393 |
aComponent == stepButton ifTrue:[ |
11210 | 2394 |
s := 'HELP_STEP' |
266 | 2395 |
]. |
2396 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2397 |
s := 'HELP_SEND' |
266 | 2398 |
]. |
2399 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2400 |
s := 'HELP_RETURN' |
266 | 2401 |
]. |
2402 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2403 |
s := 'HELP_RESTART' |
266 | 2404 |
]. |
2405 |
aComponent == contextView ifTrue:[ |
|
11210 | 2406 |
s := 'HELP_WALKBACK' |
266 | 2407 |
]. |
2408 |
aComponent == codeView ifTrue:[ |
|
11210 | 2409 |
s := 'HELP_CODEVIEW' |
266 | 2410 |
]. |
2411 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2412 |
s := 'HELP_MONITOR' |
266 | 2413 |
]. |
2414 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2415 |
s := 'HELP_UPDATE' |
266 | 2416 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2417 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2418 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2419 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2420 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
11210 | 2421 |
s := 'HELP_REC_INSP' |
266 | 2422 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2423 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
11210 | 2424 |
s := 'HELP_CON_INSP' |
266 | 2425 |
]. |
2426 |
||
2427 |
s notNil ifTrue:[ |
|
11210 | 2428 |
^ resources string:s |
266 | 2429 |
]. |
2430 |
^ nil |
|
2431 |
||
2432 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 2433 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 2434 |
! ! |
2435 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2436 |
!DebugView methodsFor:'initialization & release'! |
266 | 2437 |
|
2438 |
addToCurrentProject |
|
2439 |
"ignored here" |
|
2440 |
||
2441 |
^ self |
|
2442 |
! |
|
2443 |
||
2115 | 2444 |
destroy |
2445 |
"closing the debugger implies an abort or continue" |
|
2446 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2447 |
self destroyWithConfirmation:true |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2448 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2449 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2450 |
"Modified: / 23-03-2012 / 12:50:01 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2451 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2452 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2453 |
destroyWithConfirmation:withConfirmation |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2454 |
"closing the debugger implies an abort or continue" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2455 |
|
2404 | 2456 |
|m| |
2457 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2458 |
withConfirmation ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2459 |
self checkIfCodeIsReallyModified ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2460 |
(self confirm:('Code modified - exit anyway ?')) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2461 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2462 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2463 |
] |
11210 | 2464 |
] |
2115 | 2465 |
]. |
2466 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2467 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2468 |
|
2404 | 2469 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 2470 |
inspecting ifFalse:[ |
11210 | 2471 |
"I am running on top of a process, abort or continue it" |
2472 |
||
2473 |
windowGroup notNil ifTrue:[ |
|
2474 |
windowGroup setProcess:nil. |
|
2475 |
]. |
|
2476 |
self uncacheMyself. |
|
2477 |
||
2478 |
"/ |
|
2479 |
"/ catch invalid return; |
|
2480 |
"/ this happens, when my process has somehow died (quickterminate) |
|
2481 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
2482 |
"/ #destroy-window function. |
|
2483 |
"/ |
|
2484 |
Context cannotReturnSignal handle:[:ex | |
|
2485 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
|
2486 |
self uncacheMyself. |
|
2487 |
Debugger newDebugger. |
|
2488 |
ex return. |
|
2489 |
] do:[ |
|
2490 |
AbortOperationRequest isHandled ifTrue:[ |
|
2491 |
self doAbort. |
|
2492 |
] ifFalse:[ |
|
2493 |
self doContinue |
|
2494 |
] |
|
2495 |
]. |
|
2496 |
"/ We don't reach this point normally |
|
2497 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
2115 | 2498 |
]. |
2499 |
||
2299 | 2500 |
Debugger newDebugger. |
2115 | 2501 |
"/ since I am going to be destroyed, remove me from the cache |
2502 |
self uncacheMyself. |
|
2503 |
super destroy. |
|
2504 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2505 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2506 |
"Created: / 23-03-2012 / 12:49:50 / cg" |
2115 | 2507 |
! |
2508 |
||
266 | 2509 |
initialize |
10205 | 2510 |
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel |
11305 | 2511 |
newLayout v exceptionAndTogglePanel codeToggleLabels| |
266 | 2512 |
|
2513 |
super initialize. |
|
2514 |
||
2340 | 2515 |
font := font onDevice:device. |
266 | 2516 |
|
11573 | 2517 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger ? false. |
11693 | 2518 |
hideSupportCode := UserPreferences current hideSupportCodeInDebugger ? false. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
2519 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
11210 | 2520 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2521 |
|
266 | 2522 |
busy := false. |
2523 |
exclusive := false. |
|
2524 |
inspecting := false. |
|
2525 |
exitAction := nil. |
|
2526 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2527 |
stepHow := nil. |
266 | 2528 |
canContinue := false. |
2529 |
||
3269 | 2530 |
mH := 0. |
2531 |
||
3447 | 2532 |
menuPanel := MenuPanel in:self. |
8131 | 2533 |
menuPanel receiver:self. |
3447 | 2534 |
menuPanel verticalLayout:false. |
8131 | 2535 |
menu := self class menuSpec decodeAsLiteralArray. |
2536 |
menu findGuiResourcesIn:self. |
|
2537 |
menuPanel menu:menu. |
|
3447 | 2538 |
|
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2539 |
mH := menuPanel preferredHeight. |
3447 | 2540 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
2541 |
||
8148 | 2542 |
newLayout := UserPreferences current useNewLayoutInDebugger. |
2543 |
newLayout ifFalse:[ |
|
11210 | 2544 |
bpanel := HorizontalPanelView in:self. |
2545 |
||
2546 |
self initializeButtonsIn:bpanel. |
|
2547 |
||
2548 |
bH := bpanel preferredHeight + 5. |
|
2549 |
bpanel origin:(0.0 @ mH) |
|
2550 |
extent:(1.0 @ bH). |
|
2551 |
panel := VariableVerticalPanel |
|
2552 |
origin:(0.0 @ (mH + bH)) |
|
2553 |
corner:(1.0 @ 1.0) |
|
2554 |
in:self. |
|
2555 |
||
2556 |
v := self initializeContextListViewIn:panel. |
|
2557 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2558 |
||
2559 |
codePanel := View in:panel. |
|
2560 |
v := self initializeCodeViewIn:codePanel. |
|
2561 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
2562 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2563 |
||
2564 |
v := self initializeInspectorViewsIn:panel. |
|
2565 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2566 |
|
8148 | 2567 |
] ifTrue:[ |
11210 | 2568 |
bpanel1 := HorizontalPanelView in:self. |
2569 |
self initializeButtons1In:bpanel1. |
|
2570 |
||
2571 |
bH1 := bpanel1 preferredHeight + 5. |
|
2572 |
bpanel1 origin:(0.0 @ mH) |
|
2573 |
extent:(1.0 @ bH1). |
|
2574 |
panel := VariableVerticalPanel |
|
2575 |
origin:(0.0 @ (mH + bH1)) |
|
2576 |
corner:(1.0 @ 1.0) |
|
2577 |
in:self. |
|
2578 |
"/ panel showHandle:true. |
|
2579 |
"/ panel handlePosition:#left. |
|
2580 |
||
2581 |
v := self initializeContextListViewIn:panel. |
|
2582 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2583 |
||
2584 |
codePanel := View in:panel. |
|
2585 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
2586 |
self initializeButtons2In:bpanel2. |
|
2587 |
||
2588 |
bH2 := bpanel2 preferredHeight + 5. |
|
2589 |
bpanel2 origin:(0.0 @ 0.0) |
|
2590 |
extent:(1.0 @ bH2). |
|
2591 |
||
2592 |
exceptionInfoLabel := Label label:''. |
|
2593 |
exceptionInfoLabel adjust:#left. |
|
2594 |
||
2595 |
exceptionAndTogglePanel := HorizontalPanelView in:codePanel. |
|
2596 |
exceptionAndTogglePanel horizontalLayout:#left. |
|
2597 |
exceptionAndTogglePanel |
|
2598 |
geometryLayout: |
|
2599 |
((LayoutFrame |
|
2600 |
origin:(0.0 @ 0.0) |
|
2601 |
corner:(1.0 @ 0.0)) |
|
2602 |
topOffset:bH2; |
|
2603 |
bottomOffset:(bH2 + exceptionInfoLabel preferredHeight + 6); |
|
2604 |
rightOffset:-2). |
|
2605 |
||
2606 |
methodCodeToggleSelectionHolder := 1 asValue. |
|
2607 |
methodCodeToggleSelectionHolder onChangeSend:#methodCodeToggleChanged to:self. |
|
11305 | 2608 |
codeToggleLabels := resources array:{ |
2609 |
'Showing Original Code (being executed, but obsolete)' asText backgroundColorizeAllWith:Color red lightened . |
|
2610 |
'Showing Current Code' asText backgroundColorizeAllWith:Color green lightened . |
|
2611 |
}. |
|
2612 |
methodCodeToggle := PopUpList label:codeToggleLabels first in:exceptionAndTogglePanel. |
|
2613 |
methodCodeToggle list:codeToggleLabels. |
|
11210 | 2614 |
methodCodeToggle useIndex:true. |
2615 |
methodCodeToggle model:methodCodeToggleSelectionHolder. |
|
2616 |
methodCodeToggle beInvisible. |
|
2617 |
||
2618 |
exceptionAndTogglePanel add:exceptionInfoLabel. |
|
2619 |
||
2620 |
v := self initializeCodeViewIn:codePanel. |
|
2621 |
v origin:(0.0 @ (bH2+exceptionInfoLabel preferredHeight+6)) corner:(1.0 @ 1.0). |
|
2622 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2623 |
||
2624 |
v := self initializeInspectorViewsIn:panel. |
|
2625 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2626 |
]. |
2627 |
||
3387 | 2628 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
11210 | 2629 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2630 |
]. |
9626 | 2631 |
LastExtent notNil ifTrue:[ |
11210 | 2632 |
self extent:LastExtent. |
9626 | 2633 |
]. |
2634 |
LastOrigin notNil ifTrue:[ |
|
11210 | 2635 |
self origin:LastOrigin. |
9626 | 2636 |
]. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2637 |
|
3269 | 2638 |
" |
2639 |
Debugger newDebugger |
|
2640 |
" |
|
3447 | 2641 |
|
11693 | 2642 |
"Modified: / 27-07-2012 / 14:46:07 / cg" |
3269 | 2643 |
! |
2644 |
||
10205 | 2645 |
initializeAbortButtonIn:bpanel |
2646 |
abortButton := Button |
|
11210 | 2647 |
label:(resources string:'Abort') |
2648 |
action:[ |
|
2649 |
abortButton turnOffWithoutRedraw. |
|
2650 |
self doAbort |
|
2651 |
] |
|
2652 |
in:bpanel. |
|
3447 | 2653 |
|
2654 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2655 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2656 |
! |
|
2657 |
||
10205 | 2658 |
initializeButtons1In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2659 |
"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
|
2660 |
|
3447 | 2661 |
|separator| |
2662 |
||
10205 | 2663 |
bpanel horizontalLayout:#left. |
3447 | 2664 |
bpanel verticalLayout:#centerMax. |
2665 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2666 |
||
8194 | 2667 |
self initializeContinueButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2668 |
continueButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2669 |
|
9131 | 2670 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
2671 |
"/ separator borderWidth:0; level:0. |
|
3447 | 2672 |
self initializeAbortButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2673 |
abortButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2674 |
|
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2675 |
separator := View extent:(100 @ 5) in:bpanel. |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2676 |
separator borderWidth:0; level:0. |
3269 | 2677 |
|
3447 | 2678 |
self initializeTerminateButtonIn:bpanel. |
2679 |
||
9131 | 2680 |
separator := View extent:(50 @ 5) in:bpanel. |
3447 | 2681 |
separator borderWidth:0; level:0. |
2682 |
||
2683 |
self initializeDefineButtonIn:bpanel. |
|
4356 | 2684 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2685 |
separator := View extent:(10 @ 5) in:bpanel. |
2686 |
separator borderWidth:0; level:0. |
|
2687 |
self initializeReportButtonIn:bpanel. |
|
4356 | 2688 |
]. |
3447 | 2689 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2690 |
! |
2691 |
||
10205 | 2692 |
initializeButtons2In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2693 |
"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
|
2694 |
|
3269 | 2695 |
|separator| |
2696 |
||
9131 | 2697 |
bpanel horizontalLayout:#left. |
3269 | 2698 |
bpanel verticalLayout:#centerMax. |
2699 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2700 |
||
3447 | 2701 |
self initializeNextButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2702 |
nextButton width:100. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2703 |
|
3447 | 2704 |
self initializeStepButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2705 |
stepButton width:100. |
3447 | 2706 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2707 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2708 |
"/ 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
|
2709 |
"/ 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
|
2710 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2711 |
|
3269 | 2712 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2713 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2714 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2715 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2716 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2717 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2718 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2719 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2720 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2721 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2722 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2723 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2724 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2725 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2726 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2727 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2728 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2729 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2730 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2731 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2732 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2733 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2734 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2735 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2736 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2737 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2738 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2739 |
|
3447 | 2740 |
self initializeSendButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2741 |
sendButton width:100. |
3447 | 2742 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2743 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2744 |
separator borderWidth:0; level:0. |
3269 | 2745 |
|
3447 | 2746 |
self initializeReturnButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2747 |
returnButton width:100. |
3447 | 2748 |
self initializeRestartButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2749 |
restartButton width:100. |
3447 | 2750 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2751 |
"Modified: / 18-06-2010 / 08:32:05 / cg" |
3269 | 2752 |
! |
2753 |
||
10205 | 2754 |
initializeButtonsIn:bpanel |
3269 | 2755 |
|separator| |
2756 |
||
2757 |
bpanel horizontalLayout:#left. |
|
2758 |
bpanel verticalLayout:#centerMax. |
|
2759 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2760 |
||
3447 | 2761 |
self initializeAbortButtonIn:bpanel. |
2762 |
||
3269 | 2763 |
separator := View extent:(10 @ 5) in:bpanel. |
2764 |
separator borderWidth:0; level:0. |
|
2765 |
||
3447 | 2766 |
self initializeContinueButtonIn:bpanel. |
3269 | 2767 |
|
2768 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2769 |
separator borderWidth:0; level:0. |
|
2770 |
||
10205 | 2771 |
self initializeReturnButtonIn:bpanel. |
2772 |
self initializeRestartButtonIn:bpanel. |
|
3269 | 2773 |
|
2774 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2775 |
separator borderWidth:0; level:0. |
|
2776 |
||
3447 | 2777 |
self initializeNextButtonIn:bpanel. |
2778 |
self initializeStepButtonIn:bpanel. |
|
2779 |
||
3269 | 2780 |
"/ cg: |
2781 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2782 |
"/ they do not work relyable with inlined blocks yet. |
|
2783 |
"/ |
|
2784 |
||
2785 |
||
2786 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
2787 |
"/ img isNil ifTrue:[ |
|
2788 |
"/ img := (resources at:'next') |
|
2789 |
"/ ]. |
|
2790 |
"/ nextButton := Button |
|
2791 |
"/ label:img |
|
2792 |
"/ action:[stepButton turnOff. self doNext] |
|
2793 |
"/ in:bpanel. |
|
2794 |
"/ |
|
2795 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
2796 |
"/ img isNil ifTrue:[ |
|
2797 |
"/ img := (resources at:'over') |
|
2798 |
"/ ]. |
|
2799 |
"/ nextOverButton := Button |
|
2800 |
"/ label:img |
|
2801 |
"/ action:[stepButton turnOff. self doNextOver] |
|
2802 |
"/ in:bpanel. |
|
2803 |
"/ |
|
2804 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
2805 |
"/ img isNil ifTrue:[ |
|
2806 |
"/ img := (resources at:'out') |
|
2807 |
"/ ]. |
|
2808 |
"/ nextOutButton := Button |
|
2809 |
"/ label:img |
|
2810 |
"/ action:[stepButton turnOff. self doNextOut] |
|
2811 |
"/ in:bpanel. |
|
2812 |
||
3447 | 2813 |
self initializeSendButtonIn:bpanel. |
2814 |
||
3187 | 2815 |
separator := View extent:(30 @ 5) in:bpanel. |
2816 |
separator borderWidth:0; level:0. |
|
3269 | 2817 |
|
3447 | 2818 |
self initializeTerminateButtonIn:bpanel. |
2819 |
||
3269 | 2820 |
separator := View extent:(30 @ 5) in:bpanel. |
2821 |
separator borderWidth:0; level:0. |
|
2822 |
||
3447 | 2823 |
self initializeDefineButtonIn:bpanel. |
4356 | 2824 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2825 |
self initializeReportButtonIn:bpanel. |
4356 | 2826 |
]. |
2827 |
||
3447 | 2828 |
|
2829 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
2830 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 2831 |
! |
2832 |
||
2833 |
initializeCodeViewIn:panel |
|
2834 |
|v| |
|
2835 |
||
10628 | 2836 |
(UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
2837 |
v := codeView := Tools::CodeView2 in: panel. |
|
2838 |
codeView model: ValueHolder new. |
|
2839 |
codeView methodHolder: ValueHolder new. |
|
2840 |
codeView classHolder: ValueHolder new. |
|
2841 |
] ifFalse:[ |
|
2842 |
v := HVScrollableView |
|
2843 |
for:CodeView |
|
2844 |
miniScrollerH:true |
|
2845 |
miniScrollerV:false |
|
2846 |
in:panel. |
|
2847 |
||
2848 |
"/ v autoHideScrollBars:true. |
|
2849 |
codeView := v scrolledView. |
|
2850 |
codeView enableMotionEvents. "/ for active help |
|
2851 |
]. |
|
3269 | 2852 |
|
2853 |
^ v |
|
10628 | 2854 |
|
2855 |
"Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3269 | 2856 |
! |
2857 |
||
2858 |
initializeContextListViewIn:panel |
|
2859 |
|v| |
|
266 | 2860 |
|
10205 | 2861 |
v := HVScrollableView |
11210 | 2862 |
for:SelectionInListView |
2863 |
miniScrollerH:true |
|
2864 |
miniScrollerV:false |
|
2865 |
in:panel. |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2866 |
v autoHideHorizontalScrollBar:true. |
266 | 2867 |
|
2868 |
contextView := v scrolledView. |
|
2869 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 2870 |
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
|
2871 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 2872 |
|
10205 | 2873 |
contextView middleButtonMenu:(self middleButtonMenu). |
5453 | 2874 |
|
3269 | 2875 |
^ v |
2876 |
! |
|
2877 |
||
5453 | 2878 |
initializeContextViewsMiddleButtonMenu |
2879 |
<resource: #programMenu > |
|
2880 |
||
10205 | 2881 |
contextView middleButtonMenu:(self middleButtonMenu). |
2882 |
! |
|
2883 |
||
2884 |
initializeContinueButtonIn:bpanel |
|
2885 |
continueButton := Button |
|
11210 | 2886 |
label:(resources string:'Continue') |
2887 |
action:[ |
|
2888 |
continueButton turnOffWithoutRedraw. |
|
2889 |
self doContinue |
|
2890 |
] |
|
2891 |
in:bpanel. |
|
3447 | 2892 |
|
2893 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
2894 |
! |
|
2895 |
||
10205 | 2896 |
initializeDefineButtonIn:bpanel |
2897 |
defineButton := Button |
|
11210 | 2898 |
label:(resources string:'Define') |
2899 |
action:[ |
|
2900 |
defineButton turnOffWithoutRedraw. |
|
2901 |
self doDefine |
|
2902 |
] |
|
2903 |
in:bpanel. |
|
3447 | 2904 |
defineButton beInvisible |
2905 |
||
2906 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
2907 |
! |
|
2908 |
||
3269 | 2909 |
initializeInspectorViewsIn:panel |
2910 |
|hpanel| |
|
266 | 2911 |
|
2912 |
hpanel := VariableHorizontalPanel in:panel. |
|
2913 |
||
2914 |
receiverInspector := InspectorView |
|
11210 | 2915 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
2916 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2917 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 2918 |
|
2919 |
contextInspector := ContextInspectorView |
|
11210 | 2920 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
2921 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2922 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2923 |
|
3269 | 2924 |
^ hpanel |
266 | 2925 |
! |
2926 |
||
10205 | 2927 |
initializeNextButtonIn:bpanel |
2928 |
nextButton := Button |
|
11210 | 2929 |
label:(resources string:'Debug_Next') |
2930 |
action:[ |
|
2931 |
stepButton turnOff. |
|
2932 |
self doNext |
|
2933 |
] |
|
2934 |
in:bpanel. |
|
3447 | 2935 |
|
2936 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
2937 |
! |
|
2938 |
||
10205 | 2939 |
initializeReportButtonIn:bpanel |
2940 |
reportButton := Button |
|
11210 | 2941 |
label:(resources string:'Report by Mail...') |
2942 |
action:[ |
|
2943 |
reportButton turnOffWithoutRedraw. |
|
2944 |
self doOpenReportMailApp. |
|
2945 |
] |
|
2946 |
in:bpanel. |
|
4356 | 2947 |
|
2948 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
2949 |
! |
|
2950 |
||
10205 | 2951 |
initializeRestartButtonIn:bpanel |
2952 |
restartButton := Button |
|
11210 | 2953 |
label:(resources string:'Restart') |
2954 |
action:[ |
|
2955 |
restartButton turnOff. |
|
2956 |
self doRestart |
|
2957 |
] |
|
2958 |
in:bpanel. |
|
3447 | 2959 |
|
2960 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
2961 |
! |
|
2962 |
||
10205 | 2963 |
initializeReturnButtonIn:bpanel |
2964 |
returnButton := Button |
|
11210 | 2965 |
label:(resources string:'Return') |
2966 |
action:[ |
|
2967 |
returnButton turnOff. |
|
2968 |
self doReturn |
|
2969 |
] |
|
2970 |
in:bpanel. |
|
3447 | 2971 |
|
2972 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
2973 |
! |
|
2974 |
||
10205 | 2975 |
initializeSendButtonIn:bpanel |
2976 |
sendButton := Button |
|
11210 | 2977 |
label:(resources string:'Send') |
2978 |
action:[ |
|
2979 |
sendButton turnOff. |
|
2980 |
self doSend |
|
2981 |
] |
|
2982 |
in:bpanel. |
|
3447 | 2983 |
|
2984 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
2985 |
! |
|
2986 |
||
10205 | 2987 |
initializeStepButtonIn:bpanel |
2988 |
stepButton := Button |
|
11210 | 2989 |
label:(resources string:'Debug_Step') |
2990 |
action:[ |
|
2991 |
stepButton turnOff. |
|
2992 |
self doStep |
|
2993 |
] |
|
2994 |
in:bpanel. |
|
3447 | 2995 |
|
2996 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
2997 |
! |
|
2998 |
||
10205 | 2999 |
initializeTerminateButtonIn:bpanel |
3000 |
terminateButton := Button |
|
11210 | 3001 |
label:(resources string:'Debug_Terminate') |
3002 |
action:[ |
|
3003 |
terminateButton turnOffWithoutRedraw. |
|
3004 |
self doTerminate |
|
3005 |
] |
|
3006 |
in:bpanel. |
|
3447 | 3007 |
|
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3008 |
terminateButton backgroundColor:Color red lightened. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3009 |
"/ terminateButton foregroundColor:Color red. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3010 |
|
3447 | 3011 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
266 | 3012 |
! |
3013 |
||
1249 | 3014 |
postRealize |
3015 |
super postRealize. |
|
266 | 3016 |
|
3017 |
inspecting ifTrue:[ |
|
11210 | 3018 |
inspectedProcess notNil ifTrue:[ |
3019 |
" |
|
3020 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
3021 |
to run between mine and the debugged processes prio) |
|
3022 |
" |
|
3023 |
Processor activeProcess |
|
3024 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
|
3025 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3026 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3027 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3028 |
self sensor addEventListener:self. |
1249 | 3029 |
|
3030 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 3031 |
! |
3032 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3033 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3034 |
"/ 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
|
3035 |
"/ 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
|
3036 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3037 |
drawableId notNil ifTrue:[ |
11210 | 3038 |
^ self |
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3039 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3040 |
"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
|
3041 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3042 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3043 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3044 |
|
11818 | 3045 |
releaseDebuggee |
3046 |
"We have to be careful to release all refs to the debuggee, |
|
3047 |
because we may be in the cache. |
|
3048 |
Otherwise, the GC will not be able to release it" |
|
3049 |
||
3050 |
busy := false. |
|
3051 |
||
3052 |
codeView acceptAction:nil. |
|
3053 |
codeView doItAction:nil. |
|
3054 |
codeView contents:nil. |
|
3055 |
||
3056 |
receiverInspector release. |
|
3057 |
contextInspector release. |
|
3058 |
inspectedProcess := nil. |
|
3059 |
contextArray := nil. |
|
3060 |
((exitAction == #restart) or:[exitAction == #return]) ifFalse:[ |
|
3061 |
selectedContext := nil. |
|
3062 |
]. |
|
3063 |
actualContext := firstContext := nil. |
|
3064 |
steppedContext := wrapperContext := nil. |
|
3065 |
catchBlock := nil. |
|
3066 |
grabber := nil. |
|
3067 |
self autoUpdateOff. |
|
3068 |
||
3069 |
"Created: / 10-07-1997 / 14:57:51 / stefan" |
|
3070 |
"Modified: / 26-09-2012 / 15:08:21 / cg" |
|
3071 |
! |
|
3072 |
||
266 | 3073 |
setLabelFor:aMessage in:aProcess |
9403 | 3074 |
|l lines processNameOrNil pidOrNil osPidString| |
6821 | 3075 |
|
3076 |
lines := aMessage asStringCollection. |
|
3077 |
lines size > 1 ifTrue:[ |
|
11210 | 3078 |
l := lines first |
6821 | 3079 |
] ifFalse:[ |
11210 | 3080 |
l := aMessage. |
6821 | 3081 |
]. |
3082 |
||
3083 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
3084 |
Error handle:[:ex | |
11210 | 3085 |
l := l , '???' |
1030 | 3086 |
] do:[ |
11210 | 3087 |
processNameOrNil := aProcess name. |
3088 |
processNameOrNil notNil ifTrue:[ |
|
3089 |
l := l , (processNameOrNil contractTo:20) , ''. |
|
3090 |
]. |
|
3091 |
pidOrNil := aProcess id printString. |
|
3092 |
l := l , '[' , pidOrNil , ']'. |
|
73 | 3093 |
]. |
1030 | 3094 |
l := l , ')'. |
266 | 3095 |
self label:l. |
6821 | 3096 |
|
10205 | 3097 |
((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
11210 | 3098 |
osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
9403 | 3099 |
]. |
3100 |
||
8305 | 3101 |
exceptionInfoLabel notNil ifTrue:[ |
11210 | 3102 |
exceptionInfoLabel |
3103 |
label:(resources |
|
3104 |
string:'Exception: %1 in process %2 [%3]%4' |
|
3105 |
with:(lines first colorizeAllWith:Color red) |
|
3106 |
with:(processNameOrNil ? '') |
|
3107 |
with:(pidOrNil ? '') |
|
3108 |
with:(osPidString ? '')) |
|
8305 | 3109 |
]. |
3110 |
||
6821 | 3111 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
0 | 3112 |
! ! |
3113 |
||
3114 |
!DebugView methodsFor:'interrupt handling'! |
|
3115 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3116 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3117 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3118 |
'contextIRQ' printCR. |
3119 |
thisContext sender fullPrint. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3120 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3121 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3122 |
|
1364 | 3123 |
"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
|
3124 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3125 |
|
0 | 3126 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3127 |
DebuggingDebugger == true ifTrue:[ |
11636 | 3128 |
'stepIRQ' print. |
3129 |
"/ ' in ' print. thisContext sender fullPrint. |
|
3130 |
'' printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3131 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3132 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3133 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3134 |
|
11636 | 3135 |
"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
|
3136 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3137 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3138 |
stepOrNext |
11636 | 3139 |
|where here con s isWrap method wrappedMethod |
3140 |
originalMethodOfWrappedMethod originalMethodsContext |
|
3141 |
inBlock subBlockLeft ignore contextBelow wrapContext |
|
10205 | 3142 |
leftWrap enteredWrap anyStepBlocks |
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3143 |
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
|
3144 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3145 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3146 |
"/ DebuggingDebugger := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3147 |
"/ DebuggingDebugger2 := true |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3148 |
"/ DebuggingDebugger2 := false |
11636 | 3149 |
"/ DebuggingDebugger3 := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3150 |
"/ '' printCR |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3151 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3152 |
processName := (Processor activeProcess nameOrId),' [',Processor activeProcess id printString,']'. |
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3153 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3154 |
skipLineNr == #return ifTrue:[ |
11210 | 3155 |
self label:('stepping context returned ' , ' (process: ' , processName , ')'). |
3156 |
here := thisContext sender sender. |
|
3157 |
here setLineNumber:nil. |
|
3158 |
here := nil. |
|
3159 |
con := thisContext sender sender sender. |
|
3160 |
||
3161 |
HaltInterrupt handle:[:ex | |
|
3162 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [stepOrNext]' bindWith:ex suspendedContext) infoPrintCR. |
|
3163 |
ex proceed |
|
3164 |
] do:[ |
|
3165 |
self enter:con select:nil. |
|
3166 |
]. |
|
3167 |
con := nil. |
|
3168 |
^ self |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3169 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3170 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3171 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3172 |
"/ "/ 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
|
3173 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3174 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3175 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3176 |
"/ 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
|
3177 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3178 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3179 |
|
52 | 3180 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
11210 | 3181 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
3182 |
^ self |
|
52 | 3183 |
]. |
3184 |
||
29 | 3185 |
here := thisContext. "stepInterrupt" |
10205 | 3186 |
here := here sender. "the caller; step- or contextIRQ" |
3187 |
here := here sender. "the interrupted context" |
|
29 | 3188 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3189 |
DebuggingDebugger2 == true ifTrue:[ |
11636 | 3190 |
'***************************' printCR. |
11210 | 3191 |
'here in ' print. |
3192 |
inWrap ifTrue:['(wrap) ' print.]. |
|
3193 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
|
3194 |
here selector printCR. |
|
11636 | 3195 |
'stepping in ' print. |
3196 |
steppedContext notNil ifTrue:[ |
|
3197 |
((ObjectMemory addressOf:steppedContext) printStringRadix:16) print. ' ' print. |
|
3198 |
]. |
|
3199 |
steppedContext printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3200 |
]. |
10 | 3201 |
|
2581 | 3202 |
"/ kludge an bug-workaround; |
3203 |
"/ I should not see those ... |
|
3204 |
||
3205 |
here selector == #ioInterrupt ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3206 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3207 |
'oops - should not get that one' printCR. |
3208 |
]. |
|
3209 |
Processor ioInterrupt. |
|
3210 |
StepInterruptPending := 1. |
|
3211 |
InterruptPending := 1. |
|
3212 |
where := nil. here := nil. |
|
3213 |
InStepInterrupt := nil. |
|
3214 |
^ self |
|
2581 | 3215 |
]. |
3216 |
||
3217 |
stepUntilEntering notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3218 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3219 |
'check if entering ' print. stepUntilEntering printCR. |
3220 |
]. |
|
3221 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3222 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3223 |
'entering...' printCR. |
3224 |
]. |
|
3225 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , processName , ')'). |
|
3226 |
||
3227 |
lastStepUntilEntering := stepUntilEntering. |
|
3228 |
stepUntilEntering := nil. |
|
3229 |
self enter:here select:nil. |
|
3230 |
con := nil. |
|
3231 |
^ self |
|
3232 |
]. |
|
3233 |
"/ see if stepping context is still active ... |
|
3234 |
||
3235 |
con := here. |
|
3236 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3237 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3238 |
'start searching at: ' print. |
3239 |
con fullPrint. |
|
3240 |
]. |
|
3241 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
3242 |
con := con sender |
|
3243 |
]. |
|
3244 |
con notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3245 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3246 |
'steppingContext still active - continue stepping' printCR. |
3247 |
]. |
|
3248 |
con := nil. |
|
3249 |
where := nil. here := nil. |
|
3250 |
StepInterruptPending := 1. |
|
3251 |
InterruptPending := 1. |
|
3252 |
InStepInterrupt := nil. |
|
3253 |
^ self |
|
3254 |
]. |
|
3255 |
stepUntilEntering := nil. |
|
2581 | 3256 |
]. |
3257 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3258 |
" |
11636 | 3259 |
kludge to hide breakpoint wrappers in the context list and when single stepping: |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3260 |
check if we are in a wrapper method's hidden setup-sequence |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3261 |
if so, ignore the interrupt and continue single sending. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3262 |
Assume we are in a wrappers setup code, if there is another context above, |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3263 |
which is for the wrapper method (i.e. if there is context with an originalmethod |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3264 |
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
|
3265 |
" |
29 | 3266 |
isWrap := false. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3267 |
subBlockLeft := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3268 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3269 |
|
57 | 3270 |
inWrap ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3271 |
"/ situation1: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3272 |
"/ valueWithReceiver or other |
11636 | 3273 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3274 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3275 |
"/ situation2: |
11636 | 3276 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3277 |
"/ valueWithReceiver |
11636 | 3278 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3279 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3280 |
"/ situation3: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3281 |
"/ other |
11636 | 3282 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3283 |
"/ valueWithReceiver |
11636 | 3284 |
"/ foo (wrapped) <- wrapContext |
3285 |
"/ |
|
3286 |
"/ situation4: |
|
3287 |
"/ ... many-contexts ... (more than 8) |
|
3288 |
"/ possibly foo (original) |
|
3289 |
"/ valueWithReceiver or other |
|
3290 |
"/ foo (wrapped) |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3291 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3292 |
|
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3293 |
"/ search for the wrapped method's context and extract the original method |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3294 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3295 |
8 timesRepeat:[ |
11636 | 3296 |
wrapContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3297 |
where notNil ifTrue:[ |
11636 | 3298 |
DebuggingDebugger2 ifTrue:[ |
3299 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3300 |
where printCR |
|
3301 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3302 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3303 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3304 |
(method notNil and:[method isWrapped]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3305 |
originalMethodOfWrappedMethod := method originalMethod. |
11636 | 3306 |
wrappedMethod := method. |
3307 |
wrapContext := where. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3308 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3309 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3310 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3311 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3312 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3313 |
]. |
11636 | 3314 |
DebuggingDebugger2 ifTrue:[ |
3315 |
'wrap-context is: ' print. |
|
3316 |
wrapContext notNil ifTrue:[ |
|
3317 |
((ObjectMemory addressOf:wrapContext) printStringRadix:16) print. ' ' print. |
|
3318 |
]. |
|
3319 |
wrapContext printCR |
|
3320 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3321 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3322 |
'oops no wrap?' errorPrintCR. |
11636 | 3323 |
]. |
3324 |
]. |
|
3325 |
||
3326 |
(inWrap and:[ originalMethodOfWrappedMethod notNil ]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3327 |
isWrap := false. |
11636 | 3328 |
"/ DebuggingDebugger2 ifTrue:[ '----------->' print. originalMethodOfWrappedMethod printCR ]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3329 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3330 |
8 timesRepeat:[ |
11636 | 3331 |
originalMethodsContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3332 |
where notNil ifTrue:[ |
11636 | 3333 |
DebuggingDebugger2 ifTrue:[ |
3334 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3335 |
where printCR |
|
3336 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3337 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3338 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3339 |
method == originalMethodOfWrappedMethod ifTrue:[ |
11636 | 3340 |
originalMethodsContext := here. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3341 |
where == here ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3342 |
"/ situation2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3343 |
DebuggingDebugger2 ifTrue:[ 's2' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3344 |
isWrap := true. |
11636 | 3345 |
"/ here setSender:(wrapContext sender). --- leads to a crash |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3346 |
] ifFalse: [ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3347 |
"/ situation3 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3348 |
DebuggingDebugger2 ifTrue:[ 's3' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3349 |
inWrap := false. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3350 |
isWrap := false. |
11210 | 3351 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3352 |
steppedContext := where |
11636 | 3353 |
"/ ] ifFalse:[ |
3354 |
"/ where selector == wrapContext selector ifTrue:[ |
|
3355 |
"/ where receiver == wrapContext receiver ifTrue:[ |
|
3356 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3357 |
"/ method printCR. |
|
3358 |
"/ method originalMethod printCR. |
|
3359 |
"/ originalMethodOfWrappedMethod printCR. |
|
3360 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3361 |
"/ ]. |
|
3362 |
"/ ]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3363 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3364 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3365 |
]. |
11210 | 3366 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3367 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3368 |
]. |
11636 | 3369 |
DebuggingDebugger2 ifTrue:[ |
3370 |
'original method-context is: ' print. |
|
3371 |
originalMethodsContext notNil ifTrue:[ |
|
3372 |
((ObjectMemory addressOf:originalMethodsContext) printStringRadix:16) print. ' ' print. |
|
3373 |
]. |
|
3374 |
originalMethodsContext printCR |
|
3375 |
]. |
|
3376 |
originalMethodsContext isNil ifTrue:[ |
|
3377 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
|
3378 |
"/ situation4 |
|
3379 |
DebuggingDebugger2 ifTrue:[ 's4' printCR ]. |
|
3380 |
DebuggingDebugger2 ifTrue:[ steppedContext printCR ]. |
|
3381 |
isWrap := false. |
|
3382 |
] ifFalse:[ |
|
3383 |
"/ situation1 |
|
3384 |
DebuggingDebugger2 ifTrue:[ 's1' printCR ]. |
|
3385 |
isWrap := true. |
|
3386 |
"/ steppedContext := wrapContext |
|
3387 |
]. |
|
11210 | 3388 |
]. |
29 | 3389 |
]. |
3390 |
||
3391 |
isWrap ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3392 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3393 |
'ignore wrap' printCR. |
3394 |
]. |
|
3395 |
||
3396 |
"/ |
|
3397 |
"/ ignore, while in wrappers hidden setup |
|
3398 |
"/ |
|
3399 |
where := nil. here := nil. |
|
3400 |
ObjectMemory flushInlineCaches. |
|
3401 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3402 |
DebuggingDebugger2 == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3403 |
skipLineNr == #return ifTrue:[ |
11210 | 3404 |
'skipRet in wrap' printCR. |
3405 |
] |
|
3406 |
]. |
|
3407 |
||
3408 |
StepInterruptPending := 1. |
|
3409 |
InterruptPending := 1. |
|
3410 |
InStepInterrupt := nil. |
|
3411 |
^ self |
|
29 | 3412 |
]. |
3413 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3414 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 3415 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3416 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3417 |
'bigStep is: ' print. bigStep printCR. |
3418 |
'steppedContext is: ' print. steppedContext printCR. |
|
2581 | 3419 |
]. |
3420 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3421 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3422 |
"/ 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
|
3423 |
"/ |
10205 | 3424 |
(bigStep |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
3425 |
and:[steppedContext notNil]) ifTrue:[ |
11210 | 3426 |
" |
3427 |
a step or next - ignore all contexts below the interesting one |
|
3428 |
" |
|
3429 |
where := here. "the interrupted context" |
|
3430 |
contextBelow := nil. |
|
3431 |
||
3432 |
where home notNil ifTrue:[ |
|
3433 |
"/ |
|
3434 |
"/ in a block called by 'our' context ? |
|
3435 |
"/ |
|
3436 |
where home == steppedContext ifTrue:[ |
|
3055 | 3437 |
"/ '*block*' printCR. |
11210 | 3438 |
inBlock := true |
3439 |
] |
|
3440 |
]. |
|
3441 |
||
3442 |
where == steppedContext ifFalse:[ |
|
3443 |
where := where sender. |
|
3444 |
||
3445 |
where notNil ifTrue:[ |
|
3446 |
where home == steppedContext ifTrue:[ |
|
3055 | 3447 |
"/ '*block*' printCR. |
11210 | 3448 |
inBlock := true. |
3449 |
] |
|
3450 |
]. |
|
57 | 3451 |
|
3452 |
"/ 'looking for ' print. |
|
3055 | 3453 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 3454 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3455 |
"/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
|
3456 |
"/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
|
3457 |
|
11210 | 3458 |
where == steppedContext ifFalse:[ |
3459 |
||
3460 |
"/ check if we are in a context below steppedContext |
|
3461 |
"/ (i.e. if steppedContext can be reached from |
|
3462 |
"/ interrupted context. Not using context-ref but its |
|
3463 |
"/ address to avoid creation of many useless contexts.) |
|
3464 |
||
3465 |
inBlock ifFalse:[ |
|
3466 |
[where notNil] whileTrue:[ |
|
3467 |
||
3468 |
"/ if either the receiver or any arg of this context |
|
3469 |
"/ is a block of the steppedContext, we must really |
|
3470 |
"/ do a single step. Otherwise, stepping through a |
|
3471 |
"/ do:-loop would be very difficult. |
|
3472 |
receiver := where receiver. |
|
3473 |
(receiver isBlock |
|
3474 |
and:[(receiver isKindOf:Block) |
|
3475 |
and:[receiver home == steppedContext]]) |
|
3476 |
ifTrue:[ |
|
3477 |
anyStepBlocks := true. |
|
3478 |
] ifFalse:[ |
|
3479 |
where args do:[:arg | |
|
3480 |
(arg isBlock |
|
3481 |
and:[(arg isKindOf:Block) |
|
3482 |
and:[arg home == steppedContext]]) |
|
3483 |
ifTrue:[ |
|
3484 |
anyStepBlocks := true. |
|
3485 |
] |
|
3486 |
] |
|
3487 |
]. |
|
3488 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3489 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3490 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
3491 |
where selector printCR. |
|
3492 |
]. |
|
3493 |
||
3494 |
where == steppedContext ifTrue:[ |
|
3055 | 3495 |
"/ 'found it - below; ignore' printCR. |
11210 | 3496 |
" |
3497 |
found the interesting context somwehere up in the |
|
3498 |
chain. We seem to be still below the interesting one ... |
|
3499 |
" |
|
3500 |
tracing == true ifTrue:[ |
|
3501 |
here printString printCR |
|
3502 |
]. |
|
3503 |
" |
|
3504 |
yes, a context below |
|
3505 |
- continue and schedule another stepInterrupt. |
|
3506 |
Must flush caches since optimized methods not always |
|
3507 |
look for pending interrupts |
|
3508 |
" |
|
3509 |
||
3510 |
contextBelow notNil ifTrue:[ |
|
3055 | 3511 |
"/ '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
|
3512 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3513 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3514 |
"/ 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
|
3515 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3516 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3517 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3518 |
'below stepCon; continue until unwind of: ' print. |
3519 |
contextBelow printCR. |
|
3520 |
]. |
|
3521 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
|
3522 |
StepInterruptPending := nil. |
|
3523 |
] ifFalse:[ |
|
3524 |
ObjectMemory flushInlineCaches. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3525 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3526 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3527 |
"/ 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
|
3528 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3529 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3530 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3531 |
'in stepCon; continue single stepping' printCR. |
3532 |
]. |
|
3533 |
StepInterruptPending := 1. |
|
3534 |
InterruptPending := 1. |
|
3535 |
]. |
|
3536 |
where := nil. here := nil. |
|
3537 |
InStepInterrupt := nil. |
|
3538 |
||
3539 |
^ self |
|
3540 |
]. |
|
3541 |
||
3542 |
(steppedContext notNil and:[ |
|
3543 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
3544 |
inBlockBelow := true. |
|
3545 |
]. |
|
3546 |
||
3547 |
anyStepBlocks ifFalse:[ |
|
3548 |
inBlock ifFalse:[ |
|
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3549 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3550 |
"/ 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
|
3551 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3552 |
where isBlockContext ifFalse:[ |
11210 | 3553 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3554 |
]. |
11210 | 3555 |
] |
3556 |
]. |
|
3557 |
where := where sender |
|
3558 |
]. |
|
3559 |
s := 'context returned'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3560 |
subBlockLeft := true. |
11210 | 3561 |
]. |
3562 |
] ifTrue:[ |
|
3055 | 3563 |
"/ 'found it right in sender' printCR. |
11210 | 3564 |
s := 'after step' |
3565 |
]. |
|
3566 |
] ifTrue:[ |
|
3055 | 3567 |
"/ 'found it right away' printCR. |
11210 | 3568 |
s := 'after step' |
3569 |
]. |
|
0 | 3570 |
] ifFalse:[ |
3055 | 3571 |
"/ ' send' printCR. |
11210 | 3572 |
" |
3573 |
a send |
|
3574 |
" |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3575 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3576 |
'clear steppedContext' printCR. |
3577 |
]. |
|
3578 |
steppedContext := nil. |
|
3579 |
s := 'after send' |
|
0 | 3580 |
]. |
7 | 3581 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3582 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3583 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
11210 | 3584 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3585 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3586 |
|
790 | 3587 |
"/ handle the case, when a subBlock leaves; |
3588 |
"/ continue stepping in the home context. |
|
3589 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3590 |
subBlockLeft ifTrue:[ |
11210 | 3591 |
steppedContext home notNil ifTrue:[ |
3592 |
steppedContext := steppedContext home. |
|
3593 |
s := 'after step'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3594 |
subBlockLeft := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3595 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3596 |
|
11210 | 3597 |
] |
790 | 3598 |
]. |
3599 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3600 |
" |
10205 | 3601 |
kludge to hide breakpoint wrappers in the context list: |
11210 | 3602 |
check if we are in a wrapper methods hidden exit-sequence |
3603 |
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
|
3604 |
" |
10205 | 3605 |
(where isNil |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3606 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3607 |
ifTrue:[ |
11210 | 3608 |
"/ did not find our steppedContext along the chain; |
3609 |
"/ could be in a wrappedMethods exitBlock ... |
|
3610 |
||
3611 |
leftWrap ifFalse:[ |
|
3612 |
where := here. |
|
3613 |
wrappedMethod := nil. |
|
3614 |
5 timesRepeat:[ |
|
3615 |
where notNil ifTrue:[ |
|
3616 |
where isBlockContext ifFalse:[ |
|
3617 |
method := where method. |
|
3618 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3619 |
where == wrapperContext ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3620 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3621 |
'change stepCon fromWrapped: ' print. |
3622 |
steppedContext print. |
|
3623 |
' to: ' print. |
|
3624 |
wrapperContext printCR. |
|
3625 |
]. |
|
3626 |
||
3627 |
inWrap := true. |
|
3628 |
enteredWrap := true. |
|
3629 |
steppedContext := wrapperContext. |
|
3630 |
wrapperContext := nil. |
|
3631 |
] |
|
3632 |
]. |
|
3633 |
]. |
|
3634 |
where := where sender |
|
3635 |
] |
|
3636 |
]. |
|
3637 |
]. |
|
3638 |
enteredWrap ifTrue:[ |
|
3639 |
ignore := true |
|
3640 |
] |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3641 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3642 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3643 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3644 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3645 |
subBlockLeft ifTrue:[ |
11210 | 3646 |
"/ special care for stepInterrupt in send, |
3647 |
"/ when created a dummy context (lineNr == 1) |
|
3648 |
||
3649 |
steppedContext lineNumber isNil ifTrue:[ |
|
3650 |
steppedContext selector == here sender selector ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3651 |
subBlockLeft := false. |
11210 | 3652 |
s := 'after step'. |
3653 |
steppedContext := here sender. |
|
3654 |
]. |
|
3655 |
]. |
|
3656 |
oneMore := true |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3657 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3658 |
|
57 | 3659 |
inBlock ifTrue:[ |
3055 | 3660 |
"/ 'inBlock' printCR. |
11210 | 3661 |
s := 'in block'. |
57 | 3662 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3663 |
inBlockBelow ifTrue:[ |
11210 | 3664 |
ignore := true |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3665 |
]. |
57 | 3666 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3667 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3668 |
where notNil ifTrue:[ |
3669 |
'(' print. steppedContextLineno print. ') ' print. |
|
3670 |
where printCR. |
|
3671 |
]. |
|
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
3672 |
]. |
57 | 3673 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3674 |
ignore ifFalse:[ |
11210 | 3675 |
(bigStep |
3676 |
and:[steppedContextLineno notNil |
|
3677 |
and:[where notNil |
|
3678 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
|
3679 |
(here isBlockContext |
|
3680 |
and:[(here methodHome == steppedContext) |
|
3681 |
or:[here home == steppedContext]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3682 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3683 |
'same line but in block' printCR. |
3684 |
]. |
|
3685 |
||
3686 |
steppedContext := actualContext := here. |
|
3687 |
steppedContextLineno := here lineNumber. |
|
3688 |
] ifFalse:[ |
|
3689 |
"/ kludge - I only have the info for up to 255 lines |
|
3690 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3691 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3692 |
'same line - ignored' printCR. |
3693 |
]. |
|
3694 |
ignore := true |
|
3695 |
]. |
|
3696 |
]. |
|
3697 |
]. |
|
3698 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3699 |
(subBlockLeft not |
11210 | 3700 |
and:[skipLineNr notNil |
3701 |
and:[where notNil |
|
3702 |
and:[where lineNumber notNil |
|
3703 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3704 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3705 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
3706 |
]. |
|
3707 |
ignore := true |
|
3708 |
]. |
|
3709 |
||
3710 |
(steppedContextLineno isNil |
|
3711 |
and:[skipLineNr isNil |
|
3712 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3713 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3714 |
'same line2 (after conIRQ) - ignored' printCR. |
3715 |
]. |
|
3716 |
ignore := true |
|
3717 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3718 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3719 |
|
57 | 3720 |
ignore ifTrue:[ |
3055 | 3721 |
"/' ' printCR. |
11210 | 3722 |
where := nil. here := nil. |
3723 |
" |
|
3724 |
yes, a context below |
|
3725 |
- continue and schedule another stepInterrupt. |
|
3726 |
Must flush caches since optimized methods not always |
|
3727 |
look for pending interrupts |
|
3728 |
" |
|
3729 |
ObjectMemory flushInlineCaches. |
|
3730 |
StepInterruptPending := 1. |
|
3731 |
InterruptPending := 1. |
|
3732 |
InStepInterrupt := nil. |
|
3733 |
^ self |
|
57 | 3734 |
]. |
3735 |
||
3055 | 3736 |
"/ ' ' printCR. |
57 | 3737 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3738 |
self label:(s , ' (process: ' , processName , ')'). |
7 | 3739 |
|
57 | 3740 |
tracing := false. |
3741 |
bigStep := false. |
|
3742 |
||
0 | 3743 |
"release refs to context" |
3744 |
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
|
3745 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3746 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3747 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3748 |
'==> 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
|
3749 |
]. |
1364 | 3750 |
|
3751 |
initiallyShown := nil. |
|
3752 |
(oneMore == true) ifTrue:[ |
|
11210 | 3753 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
3754 |
initiallyShown := 2 |
|
3755 |
] ifFalse:[ |
|
3756 |
initiallyShown := 1 |
|
3757 |
] |
|
1364 | 3758 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3759 |
con := thisContext sender sender. |
3435 | 3760 |
|
9235 | 3761 |
HaltInterrupt handle:[:ex | |
11210 | 3762 |
'DebugView [info]: halt/breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
3763 |
ex proceed |
|
3435 | 3764 |
] do:[ |
11210 | 3765 |
self enter:con select:initiallyShown |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3766 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3767 |
con := nil |
1364 | 3768 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3769 |
"Created: / 14-10-1996 / 12:53:39 / cg" |
11636 | 3770 |
"Modified: / 20-07-2012 / 15:26:26 / cg" |
0 | 3771 |
! ! |
3772 |
||
4867 | 3773 |
!DebugView methodsFor:'menu & button actions'! |
266 | 3774 |
|
5875 | 3775 |
addBrowserBookmark |
3776 |
"add a browser-bookmark for the selected contexts method" |
|
3777 |
||
3778 |
|cls sel| |
|
3779 |
||
3780 |
selectedContext isNil ifTrue:[^ self]. |
|
3781 |
||
3782 |
cls := selectedContext receiver class. |
|
3783 |
sel := selectedContext selector. |
|
3784 |
(cls includesSelector:sel) ifFalse:[ |
|
11210 | 3785 |
sel := nil |
5875 | 3786 |
]. |
3787 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
3788 |
! |
|
3789 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3790 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3791 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3792 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3793 |
"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
|
3794 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3795 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3796 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3797 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3798 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3799 |
"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
|
3800 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3801 |
|
266 | 3802 |
autoUpdateOff |
3803 |
"stop the update process" |
|
3804 |
||
3805 |
updateProcess notNil ifTrue:[ |
|
11210 | 3806 |
monitorToggle lampColor:(Color yellow). |
3807 |
updateProcess terminate. |
|
3808 |
updateProcess := nil |
|
266 | 3809 |
] |
3810 |
! |
|
3811 |
||
3812 |
autoUpdateOn |
|
3813 |
"fork a subprocess which updates the contextList in regular intervals" |
|
3814 |
||
3815 |
updateProcess isNil ifTrue:[ |
|
11210 | 3816 |
updateProcess := |
3817 |
[ |
|
3818 |
[true] whileTrue:[ |
|
3819 |
monitorToggle showLamp ifTrue:[ |
|
3820 |
monitorToggle lampColor:(Color yellow). |
|
3821 |
] ifFalse:[ |
|
3822 |
monitorToggle activeForegroundColor:Color black. |
|
3823 |
]. |
|
3824 |
(Delay forSeconds:0.25) wait. |
|
3825 |
self updateContext. |
|
3826 |
monitorToggle showLamp ifTrue:[ |
|
3827 |
monitorToggle lampColor:(Color red). |
|
3828 |
] ifFalse:[ |
|
3829 |
monitorToggle activeForegroundColor:Color red. |
|
3830 |
]. |
|
3831 |
(Delay forSeconds:0.25) wait. |
|
3832 |
self updateContext. |
|
3833 |
] |
|
3834 |
] forkAt:(Processor activePriority - 1) |
|
266 | 3835 |
] |
3836 |
||
3837 |
! |
|
3838 |
||
3269 | 3839 |
browseClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3840 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3841 |
|
3842 |
|cls sel| |
|
3843 |
||
3844 |
selectedContext isNil ifTrue:[^ self]. |
|
3845 |
||
3846 |
cls := selectedContext receiver class. |
|
3847 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3848 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 3849 |
sel := nil |
3269 | 3850 |
]. |
3851 |
cls browserClass openInClass:cls selector:sel. |
|
3852 |
||
3853 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3854 |
! |
|
3855 |
||
3856 |
browseClassHierarchy |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3857 |
"browse the receiver's classHierarchy (of the selected context's message)" |
3269 | 3858 |
|
3859 |
|cls mthd| |
|
3860 |
||
3861 |
selectedContext isNil ifTrue:[^ self]. |
|
3862 |
||
3863 |
mthd := selectedContext method. |
|
3447 | 3864 |
mthd notNil ifTrue:[ |
11210 | 3865 |
cls := mthd containingClass. |
3866 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3867 |
]. |
3868 |
cls isNil ifTrue:[ |
|
11210 | 3869 |
cls := selectedContext receiver class |
3269 | 3870 |
]. |
3871 |
cls browserClass browseClassHierarchy:cls. |
|
3872 |
||
3447 | 3873 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 3874 |
! |
3875 |
||
3876 |
browseFullClassProtocol |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3877 |
"browse the receiver's full protocol (of the selected context's message)" |
3269 | 3878 |
|
3879 |
|cls mthd| |
|
3880 |
||
3881 |
selectedContext isNil ifTrue:[^ self]. |
|
3882 |
||
3883 |
mthd := selectedContext method. |
|
3447 | 3884 |
mthd notNil ifTrue:[ |
11210 | 3885 |
cls := mthd containingClass. |
3886 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3887 |
]. |
3888 |
cls isNil ifTrue:[ |
|
11210 | 3889 |
cls := selectedContext receiver class |
3269 | 3890 |
]. |
3891 |
cls browserClass browseFullClassProtocol:cls. |
|
3892 |
||
3447 | 3893 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 3894 |
! |
3895 |
||
3896 |
browseImplementingClass |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3897 |
"browse the implementing class (of the selected context's message)" |
3269 | 3898 |
|
11610 | 3899 |
|con mthd who sel cls home| |
3900 |
||
3901 |
con := selectedContext ? actualContext. |
|
3902 |
con isNil ifTrue:[^ self]. |
|
3903 |
||
3904 |
mthd := con method. |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3905 |
mthd notNil ifTrue:[ |
11610 | 3906 |
who := mthd who. |
11210 | 3907 |
who notNil ifTrue:[ |
3908 |
cls := who methodClass. |
|
3909 |
sel := who methodSelector. |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3910 |
] ifFalse:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3911 |
"might have been re-accepted" |
11610 | 3912 |
(home := con methodHome) notNil ifTrue:[ |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3913 |
(sel := home selector) notNil ifTrue:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3914 |
cls := home receiver class |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3915 |
whichClassImplements:selectedContext selector. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3916 |
cls notNil ifTrue:[ |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3917 |
Dialog information:'Method has been changed/moved in the meanwhile.\Browser will show the most recent (current) version.' withCRs. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3918 |
]. |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3919 |
] |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3920 |
]. |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3921 |
]. |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3922 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3923 |
cls isNil ifTrue:[ |
11210 | 3924 |
"/ class not found - try receiver |
11610 | 3925 |
cls := con receiver class |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3926 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3927 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3928 |
cls browserClass openInClass:cls selector:sel. |
266 | 3929 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3930 |
"Created: / 22-11-1995 / 21:27:01 / cg" |
11610 | 3931 |
"Modified: / 19-07-2012 / 11:27:32 / cg" |
266 | 3932 |
! |
3933 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3934 |
browseImplementors |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3935 |
"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
|
3936 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3937 |
selectedContext isNil ifTrue:[ |
11210 | 3938 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3939 |
]. |
4153 | 3940 |
"/ selectedContext receiver class browserClass |
11610 | 3941 |
self withWaitCursorDo:[ |
3942 |
UserPreferences systemBrowserClass |
|
3943 |
browseImplementorsOf:selectedContext selector. |
|
3944 |
] |
|
3945 |
||
3946 |
"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
|
3947 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3948 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3949 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3950 |
"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
|
3951 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3952 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3953 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3954 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 3955 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3956 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3957 |
initial isNil ifTrue:[ |
11210 | 3958 |
initial := selectedContext isNil |
3959 |
ifTrue:[nil] |
|
3960 |
ifFalse:[selectedContext selector]. |
|
10205 | 3961 |
]. |
3962 |
selector := Dialog |
|
11210 | 3963 |
requestSelector:'Selector to browse implementors of:' |
3964 |
initialAnswer:initial. |
|
11610 | 3965 |
|
3966 |
selector notEmptyOrNil ifTrue:[ |
|
3967 |
self withWaitCursorDo:[ |
|
3968 |
UserPreferences systemBrowserClass |
|
3969 |
browseImplementorsMatching:selector. |
|
3970 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3971 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3972 |
|
11610 | 3973 |
"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
|
3974 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3975 |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3976 |
browseProcessesApplication |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3977 |
"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
|
3978 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3979 |
|p appClass| |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3980 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3981 |
p := inspectedProcess ? Processor activeProcess. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3982 |
(p notNil and:[p isGUIProcess]) ifTrue:[ |
11210 | 3983 |
WindowGroup scheduledWindowGroups do:[:wg | |
3984 |
wg process == p ifTrue:[ |
|
3985 |
appClass := wg application class. |
|
3986 |
appClass browserClass openInClass:appClass selector:nil. |
|
3987 |
^ self |
|
3988 |
] |
|
3989 |
] |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3990 |
]. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3991 |
! |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3992 |
|
3269 | 3993 |
browseReceiversClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3994 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3995 |
|
3996 |
|cls sel| |
|
3997 |
||
3998 |
selectedContext isNil ifTrue:[^ self]. |
|
3999 |
||
11610 | 4000 |
selectedContext isCheapBlockContext ifTrue:[ |
4001 |
cls := selectedContext method mclass. |
|
4002 |
sel := selectedContext method selector. |
|
4003 |
] ifFalse:[ |
|
4004 |
cls := selectedContext receiver class. |
|
4005 |
sel := selectedContext selector. |
|
4006 |
]. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
4007 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 4008 |
sel := nil |
3269 | 4009 |
]. |
4010 |
cls browserClass openInClass:cls selector:sel. |
|
4011 |
||
11610 | 4012 |
"Modified: / 19-07-2012 / 11:29:48 / cg" |
3269 | 4013 |
! |
4014 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4015 |
browseSenders |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4016 |
"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
|
4017 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4018 |
selectedContext isNil ifTrue:[ |
11210 | 4019 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4020 |
]. |
11610 | 4021 |
self withWaitCursorDo:[ |
4022 |
UserPreferences systemBrowserClass |
|
4023 |
browseAllCallsOn:selectedContext selector. |
|
4024 |
] |
|
4025 |
||
4026 |
"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
|
4027 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4028 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4029 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4030 |
"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
|
4031 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4032 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4033 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4034 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 4035 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4036 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4037 |
initial isNil ifTrue:[ |
11210 | 4038 |
initial := selectedContext isNil |
4039 |
ifTrue:[nil] |
|
4040 |
ifFalse:[selectedContext selector]. |
|
10205 | 4041 |
]. |
4042 |
selector := Dialog |
|
11210 | 4043 |
requestSelector:'Selector to browse senders of:' |
4044 |
initialAnswer:initial. |
|
11610 | 4045 |
|
4046 |
selector notEmptyOrNil ifTrue:[ |
|
4047 |
self withWaitCursorDo:[ |
|
4048 |
UserPreferences systemBrowserClass |
|
4049 |
browseAllCallsOn:selector asSymbol. |
|
4050 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4051 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4052 |
|
11610 | 4053 |
"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
|
4054 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4055 |
|
11391 | 4056 |
clearRememberedCallchain |
4057 |
"clear the remembered callchain." |
|
4058 |
||
4059 |
RememberedCallChain := nil |
|
4060 |
||
4061 |
"Created: / 08-03-2012 / 01:29:46 / cg" |
|
4062 |
! |
|
4063 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4064 |
closeAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4065 |
(Dialog confirm:'Close all Debuggers (without confirmation if code was changed)?') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4066 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4067 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4068 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4069 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4070 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4071 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4072 |
debugger busy ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4073 |
debugger destroyWithConfirmation:true. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4074 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4075 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4076 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4077 |
self closeRequest. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4078 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4079 |
"Created: / 23-03-2012 / 12:40:22 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4080 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4081 |
|
9626 | 4082 |
configureX:x y:y width:newWidth height:newHeight |
10205 | 4083 |
super configureX:x y:y width:newWidth height:newHeight. |
9626 | 4084 |
LastExtent := self extent. |
4085 |
LastOrigin := self origin. |
|
4086 |
||
4087 |
"Created: / 10-11-2010 / 10:09:11 / cg" |
|
4088 |
! |
|
4089 |
||
266 | 4090 |
copyWalkbackText |
4091 |
"place the contents of the walkback view into the copy-paste buffer. |
|
4092 |
This allows pasting it into some other view for printing ..." |
|
4093 |
||
10760 | 4094 |
|infoText| |
4095 |
||
4096 |
contextArray isEmptyOrNil ifTrue:[ |
|
4097 |
infoText := 'No context, no walkback'. |
|
4098 |
] ifFalse:[ |
|
4099 |
infoText := (contextArray collect:[:con | con fullPrintString]) asStringCollection. |
|
4100 |
]. |
|
4101 |
||
4102 |
self setClipboardText:infoText |
|
266 | 4103 |
|
4104 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
4105 |
! |
|
4106 |
||
4107 |
doAbort |
|
1187 | 4108 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 4109 |
at save places (for example: in the event loop) and returns back |
4110 |
from whatever the process is doing, but does not terminate it." |
|
4111 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4112 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4113 |
(self confirm:('Code modified - abort anyway ?')) |
4114 |
ifFalse:[ |
|
4115 |
^ self |
|
4116 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4117 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4118 |
|
266 | 4119 |
inspecting ifTrue:[ |
11210 | 4120 |
inspectedProcess isDead ifTrue:[ |
4121 |
self showTerminated. |
|
4122 |
^ self |
|
4123 |
]. |
|
4124 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4125 |
self showError:'** the process does not handle the abort signal **' |
|
4126 |
] ifTrue:[ |
|
4127 |
self interruptProcessWith:[AbortOperationRequest raise]. |
|
4128 |
]. |
|
4129 |
^ self |
|
266 | 4130 |
]. |
4131 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4132 |
steppedContext := wrapperContext := nil. |
266 | 4133 |
haveControl := false. |
4134 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4135 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4136 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4137 |
catchBlock notNil ifTrue:[ |
11210 | 4138 |
abortButton turnOff. |
4139 |
catchBlock value. |
|
4140 |
||
4141 |
"/ not reached |
|
4142 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
266 | 4143 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4144 |
|
266 | 4145 |
^ self. |
4146 |
||
3447 | 4147 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 4148 |
! |
4149 |
||
6487 | 4150 |
doAbortAll |
4151 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
4152 |
at save places (for example: in the event loop) and returns back |
|
4153 |
from whatever the process is doing, but does not terminate it." |
|
4154 |
||
4155 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
11210 | 4156 |
(self confirm:('Code modified - abort anyway ?')) |
4157 |
ifFalse:[ |
|
4158 |
^ self |
|
4159 |
] |
|
6487 | 4160 |
]. |
4161 |
||
4162 |
inspecting ifTrue:[ |
|
11210 | 4163 |
inspectedProcess isDead ifTrue:[ |
4164 |
self showTerminated. |
|
4165 |
^ self |
|
4166 |
]. |
|
4167 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4168 |
self showError:'** the process does not handle the abort signal **' |
|
4169 |
] ifTrue:[ |
|
4170 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
4171 |
]. |
|
4172 |
^ self |
|
6487 | 4173 |
]. |
4174 |
||
4175 |
steppedContext := wrapperContext := nil. |
|
4176 |
haveControl := false. |
|
4177 |
exitAction := #abortAll. |
|
4178 |
||
4179 |
"exit private event-loop" |
|
4180 |
catchBlock notNil ifTrue:[ |
|
11210 | 4181 |
abortButton turnOff. |
4182 |
catchBlock value. |
|
4183 |
||
4184 |
"/ not reached |
|
4185 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
6487 | 4186 |
]. |
4187 |
||
4188 |
^ self. |
|
4189 |
||
4190 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
4191 |
! |
|
4192 |
||
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4193 |
doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4194 |
"ask for and change the process's priority" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4195 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4196 |
|oldPrio newPrio s| |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4197 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4198 |
oldPrio := (inspectedProcess ? Processor activeProcess) priority. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4199 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4200 |
[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4201 |
s := Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4202 |
request:(resources stringWithCRs:'Change the processes priority to (proceed with prio):\\ 2 - system background\ 4 - user background\ 8 - normal\ 9 - high\ 16 - I/O (danger alert)\') |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4203 |
initialAnswer:oldPrio printString. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4204 |
s isEmptyOrNil ifTrue:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4205 |
newPrio := Integer readFrom:s onError:nil. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4206 |
newPrio isNil |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4207 |
] whileTrue. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4208 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4209 |
newPrio := newPrio max:(Processor lowestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4210 |
newPrio := newPrio min:(Processor highestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4211 |
newPrio >= Processor highIOPriority ifTrue:[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4212 |
(Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4213 |
confirm:(resources |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4214 |
stringWithCRs:'Attention: event handling takes place at prio 16.\An ever running high priority process\could block the system and make the UI unusable.\\Proceed?')) |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4215 |
ifFalse:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4216 |
]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4217 |
(inspectedProcess ? Processor activeProcess) priority:newPrio. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4218 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4219 |
"Created: / 07-03-2012 / 14:15:09 / cg" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4220 |
! |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4221 |
|
266 | 4222 |
doContinue |
4223 |
"continue from menu" |
|
4224 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4225 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4226 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4227 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4228 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
4229 |
^ self |
|
4230 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4231 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4232 |
|
266 | 4233 |
inspecting ifTrue:[ |
11210 | 4234 |
device hasColors ifTrue:[ |
4235 |
continueButton foregroundColor:Color red darkened. |
|
4236 |
]. |
|
4237 |
continueButton label:(resources string:'Stop'). |
|
4238 |
continueButton action:[self doStop]. |
|
4239 |
||
4240 |
self processPerform:#resume. |
|
4241 |
||
4242 |
^ self |
|
266 | 4243 |
]. |
4244 |
canContinue ifTrue:[ |
|
11210 | 4245 |
exContext := thisContext findSpecialHandle:false raise:true. |
4246 |
||
4247 |
(exContext notNil |
|
4248 |
and:[ (ex := exContext receiver) isLazyValue not |
|
4249 |
and:[ ex isException |
|
4250 |
and:[ ex signal == NoHandlerError |
|
4251 |
and:[ ex parameter signal == RecursionError]]]]) |
|
4252 |
ifTrue:[ |
|
4253 |
"/ debug due to unhandled recursionInterrupt. |
|
4254 |
"/ ask if we should proceed with more stack. |
|
4255 |
||
4256 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
|
4257 |
answer == true ifTrue:[ |
|
4258 |
proc := Processor activeProcess. |
|
4259 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
|
4260 |
]. |
|
4261 |
]. |
|
4262 |
||
4263 |
steppedContext := wrapperContext := nil. |
|
4264 |
tracing := false. |
|
4265 |
haveControl := false. |
|
4266 |
exitAction := #continue. |
|
4267 |
||
4268 |
"exit private event-loop" |
|
4269 |
catchBlock value. |
|
4270 |
||
4271 |
"/ not reached. |
|
4272 |
'DebugView [warning]: continue failed' errorPrintCR. |
|
4273 |
continueButton turnOff. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4274 |
|
266 | 4275 |
] ifFalse:[ |
11210 | 4276 |
inspecting ifFalse:[ |
4277 |
'DebugView [info]: resuming top context' infoPrintCR. |
|
4278 |
self showSelection:1. |
|
4279 |
self doReturn |
|
4280 |
] |
|
266 | 4281 |
] |
477 | 4282 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
4283 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 4284 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 4285 |
! |
4286 |
||
3187 | 4287 |
doDefine |
5955 | 4288 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4289 |
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
|
4290 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4291 |
selectionIndex := contextView selection. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4292 |
restart := true. |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4293 |
|
3283 | 4294 |
selector := actualContext selector. |
8963 | 4295 |
implClass := actualContext receiver class whichClassIncludesSelector:selector. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4296 |
implClass notNil ifTrue:[ |
11210 | 4297 |
"/ must be a subclassResponsibility |
4298 |
||
4299 |
idx := contextArray identityIndexOf:actualContext. |
|
4300 |
idx > 1 ifTrue:[ |
|
4301 |
callee := contextArray at:idx-1. |
|
4302 |
||
4303 |
callee selector == #subclassResponsibility ifTrue:[ |
|
4304 |
restart := false. |
|
4305 |
] |
|
4306 |
]. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4307 |
]. |
5955 | 4308 |
|
4309 |
"generate nice argument names" |
|
4310 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
4311 |
bagOfUsedClassNames := Bag new. |
|
10205 | 4312 |
argNames := actualContext args |
11210 | 4313 |
collect: |
4314 |
[:eachArg | |
|
4315 |
|nm| |
|
4316 |
||
12080 | 4317 |
nm := eachArg class nameWithoutPrefix. |
11210 | 4318 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
4319 |
nm article , nm |
|
4320 |
] ifFalse:[ |
|
4321 |
bagOfUsedClassNames add:nm. |
|
4322 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
4323 |
]. |
|
4324 |
]. |
|
5955 | 4325 |
|
4326 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 4327 |
|
3447 | 4328 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
4329 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
4330 |
||
4331 |
actualContext receiver isNil ifTrue:[ |
|
11210 | 4332 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
4333 |
ifFalse:[ |
|
4334 |
^ self |
|
4335 |
] |
|
3447 | 4336 |
]. |
4337 |
||
4338 |
receiversClass := actualContext receiver class. |
|
4339 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4340 |
"/ code for a getter |
3447 | 4341 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
11210 | 4342 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
4343 |
cat := 'accessing'. |
|
3447 | 4344 |
]. |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4345 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4346 |
"/ code for a setter |
3447 | 4347 |
(selector numArgs == 1 |
4348 |
and:[(selector endsWith:':') |
|
10205 | 4349 |
and:[receiversClass instVarNames includes:(selector copyWithoutLast:1)]]) |
3447 | 4350 |
ifTrue:[ |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4351 |
varName := selector copyWithoutLast:1. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4352 |
argName := argNames first. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4353 |
code := '%1\' , haltStmtFix , '\ %3 := %4.'. |
11210 | 4354 |
cat := 'accessing'. |
3447 | 4355 |
]. |
4356 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4357 |
"/ code for a tester |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4358 |
(selector numArgs == 0 |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4359 |
and:[(selector startsWith:'is') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4360 |
and:[(Smalltalk classNamed:(selector copyFrom:3)) notNil ]]) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4361 |
ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4362 |
(receiversClass nameWithoutPrefix = (selector copyFrom:3)) ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4363 |
code := '%1\' , haltStmtFix , '\ ^ true.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4364 |
] ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4365 |
code := '%1\' , haltStmtFix , '\ ^ false.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4366 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4367 |
cat := 'testing'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4368 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4369 |
|
3447 | 4370 |
"/ actualContext receiver isClass ifTrue:[ |
4371 |
"/ selector == #new ifTrue:[ |
|
4372 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
4373 |
"/ ]. |
|
4374 |
"/ selector == #'new:' ifTrue:[ |
|
4375 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
4376 |
"/ ]. |
|
4377 |
"/ ]. |
|
4378 |
code isNil ifTrue:[ |
|
11210 | 4379 |
code := '%1\' , haltStmtDef |
10205 | 4380 |
]. |
4381 |
||
4382 |
self |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4383 |
codeAccept:(code bindWith:proto with:selector with:varName with:argName) withCRs |
11210 | 4384 |
inClass:receiversClass |
4385 |
unwind:false |
|
4386 |
category:cat |
|
4387 |
onCancel:[^ self]. |
|
3269 | 4388 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4389 |
self doShowSelection:selectionIndex. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4390 |
restart ifTrue:[ |
11210 | 4391 |
self doRestart |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4392 |
] |
3427 | 4393 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4394 |
"Modified: / 23-03-2012 / 09:49:31 / cg" |
3187 | 4395 |
! |
4396 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4397 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4398 |
"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
|
4399 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4400 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4401 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4402 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4403 |
(self confirm:('Code modified - step anyway ?')) |
4404 |
ifFalse:[ |
|
4405 |
^ self |
|
4406 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4407 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4408 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4409 |
canContinue ifTrue:[ |
11210 | 4410 |
steppedContext := wrapperContext := nil. |
4411 |
haveControl := false. |
|
4412 |
exitAction := #step. |
|
4413 |
||
4414 |
"exit private event-loop" |
|
4415 |
catchBlock value. |
|
4416 |
||
4417 |
"/ not reached |
|
4418 |
'DebugView [warning]: send failed' errorPrintCR. |
|
4419 |
sendButton turnOff. |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4420 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4421 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4422 |
"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
|
4423 |
"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
|
4424 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4425 |
|
266 | 4426 |
doNext |
1072 | 4427 |
"skip for next source-code line; entering blocks" |
266 | 4428 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4429 |
stepHow := #nextIn. |
266 | 4430 |
self doStep:nil |
790 | 4431 |
|
1072 | 4432 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4433 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4434 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4435 |
doNextOut |
1072 | 4436 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4437 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4438 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4439 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4440 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4441 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 4442 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4443 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4444 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4445 |
doNextOver |
1072 | 4446 |
"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
|
4447 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4448 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4449 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4450 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4451 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 4452 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 4453 |
! |
4454 |
||
4455 |
doNoTrace |
|
4456 |
traceView notNil ifTrue:[ |
|
11210 | 4457 |
traceView topView destroy. |
4458 |
traceView := nil. |
|
266 | 4459 |
]. |
4460 |
tracing := false |
|
4461 |
! |
|
4462 |
||
4356 | 4463 |
doOpenReportMailApp |
4464 |
"open a mail report tool" |
|
4465 |
||
4466 |
| str | |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4467 |
|
4356 | 4468 |
str := '' writeStream. |
4469 |
||
4470 |
str nextPutLine:('Error notification from ' |
|
11210 | 4471 |
, OperatingSystem getLoginName |
4472 |
, '@' |
|
4473 |
, OperatingSystem getHostName). |
|
4356 | 4474 |
str cr. |
4475 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
4476 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 4477 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
4478 |
str nextPutLine:('Description: ' , self label). |
|
4479 |
"/ str nextPutLine:('Error: ', printedException description). |
|
4480 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
4481 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
4482 |
str nextPutLine:'Backtrace:'. |
|
4483 |
str cr. |
|
4484 |
||
4485 |
firstContext notNil ifTrue:[ |
|
11210 | 4486 |
firstContext fullPrintAllOn:str. |
4356 | 4487 |
]. |
4488 |
str cr;cr. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4489 |
|
10205 | 4490 |
SendMailTool |
11210 | 4491 |
openForMessage:(str contents) |
4492 |
withSubject:('STX Error:[', self label, ']') |
|
4493 |
preOpenBlock:[:inst| |
|
4494 |
inst recipientEntryField value:'error@exept.de' |
|
4495 |
]. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4496 |
|
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4497 |
"Modified: / 20-09-2007 / 12:40:40 / cg" |
4356 | 4498 |
! |
4499 |
||
266 | 4500 |
doRestart |
4501 |
"restart - the selected context will be restarted" |
|
10205 | 4502 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4503 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4504 |
(self confirm:('Code modified - restart anyway ?')) ifFalse:[ |
4505 |
^ self |
|
4506 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4507 |
]. |
266 | 4508 |
inspecting ifTrue:[ |
11210 | 4509 |
selectedContext isNil ifTrue:[ |
4510 |
^ self showError:'** select a context first **' |
|
4511 |
]. |
|
4512 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
|
4513 |
^ self |
|
266 | 4514 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4515 |
steppedContext := wrapperContext := nil. |
266 | 4516 |
haveControl := false. |
6365 | 4517 |
exitAction := #restart. "exit private event-loop" |
4518 |
||
4519 |
catchBlock value. |
|
4520 |
||
4521 |
"/ normally not reached |
|
10205 | 4522 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4523 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4524 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4525 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4526 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 4527 |
! |
4528 |
||
4529 |
doReturn |
|
4530 |
"return - the selected context will do a ^nil" |
|
4531 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4532 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4533 |
(self confirm:('Code modified - return anyway ?')) |
4534 |
ifFalse:[ |
|
4535 |
^ self |
|
4536 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4537 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4538 |
|
266 | 4539 |
inspecting ifTrue:[ |
11210 | 4540 |
selectedContext isNil ifTrue:[ |
4541 |
^ self showError:'** select a context first **' |
|
4542 |
]. |
|
4543 |
self interruptProcessWith:[selectedContext unwind:nil]. |
|
4544 |
^ self |
|
266 | 4545 |
]. |
4546 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4547 |
steppedContext := wrapperContext := nil. |
266 | 4548 |
haveControl := false. |
4549 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4550 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4551 |
"exit private event-loop" |
6365 | 4552 |
catchBlock value. |
477 | 4553 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4554 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4555 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4556 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4557 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4558 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 4559 |
! |
4560 |
||
4561 |
doSend |
|
4562 |
"single send; reenter with next message send" |
|
4563 |
||
1072 | 4564 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4565 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4566 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4567 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4568 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4569 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4570 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4571 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4572 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4573 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4574 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4575 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4576 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4577 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4578 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4579 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4580 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4581 |
|
1072 | 4582 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 4583 |
! |
4584 |
||
4585 |
doStep |
|
4586 |
"skip for next send in selected method" |
|
4587 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4588 |
stepHow := #step. |
790 | 4589 |
self doStep:-1 |
4590 |
||
1072 | 4591 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 4592 |
! |
4593 |
||
4594 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4595 |
"common helper for step, skip & next. |
10205 | 4596 |
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
|
4597 |
or to next line (if nil) or to next send (if -1)" |
266 | 4598 |
|
4599 |
|con method| |
|
4600 |
||
4601 |
inspecting ifTrue:[^ self]. |
|
4602 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4603 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4604 |
(self confirm:('Code modified - step anyway ?')) |
4605 |
ifFalse:[ |
|
4606 |
^ self |
|
4607 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4608 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4609 |
|
266 | 4610 |
canContinue ifTrue:[ |
11210 | 4611 |
selectedContext notNil ifTrue:[ |
4612 |
con := actualContext. "/ selectedContext. |
|
4613 |
steppedContextLineno := actualContext lineNumber. |
|
4614 |
] ifFalse:[ |
|
4615 |
con := contextArray at:2. |
|
4616 |
steppedContextLineno := con lineNumber. |
|
4617 |
]. |
|
4618 |
||
4619 |
skipLineNr := lineNr. |
|
4620 |
||
4621 |
lineNr == -1 ifTrue:[ |
|
4622 |
steppedContextLineno := skipLineNr := nil. |
|
4623 |
]. |
|
4624 |
||
4625 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
|
4626 |
steppedContext := contextArray at:1. |
|
4627 |
stepHow := #nextIn. |
|
4628 |
] ifFalse:[ |
|
4629 |
stepHow == #nextOut ifTrue:[ |
|
4630 |
steppedContext := con home. |
|
4631 |
] ifFalse:[ |
|
4632 |
steppedContext := con. |
|
4633 |
]. |
|
4634 |
]. |
|
4635 |
wrapperContext := nil. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4636 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
4637 |
"/ ' 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
|
4638 |
|
11210 | 4639 |
" |
4640 |
if we step in a wrapped method, |
|
4641 |
prepare to skip the prolog ... |
|
4642 |
" |
|
4643 |
||
4644 |
inWrap := false. |
|
4645 |
method := con method. |
|
4646 |
(method notNil |
|
4647 |
and:[method isWrapped |
|
4648 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
|
4649 |
inWrap := true |
|
4650 |
]. |
|
4651 |
||
4652 |
lineNr == #return ifTrue:[ |
|
4653 |
Processor activeProcess forceInterruptOnReturnOf:con. |
|
4654 |
]. |
|
4655 |
||
4656 |
con := nil. |
|
4657 |
bigStep := true. |
|
4658 |
haveControl := false. |
|
4659 |
exitAction := #step. |
|
4660 |
||
4661 |
"exit private event-loop" |
|
4662 |
catchBlock value. |
|
4663 |
||
4664 |
"/ not reached |
|
4665 |
'DebugView [warning]: step failed' errorPrintCR. |
|
4666 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
|
266 | 4667 |
] |
477 | 4668 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4669 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 4670 |
! |
4671 |
||
4672 |
doStop |
|
4673 |
"stop the process (if its running, otherwise this is a no-op)" |
|
4674 |
||
4675 |
inspecting ifTrue:[ |
|
11210 | 4676 |
device hasColors ifTrue:[ |
4677 |
continueButton foregroundColor:Color green darkened darkened. |
|
4678 |
]. |
|
4679 |
continueButton label:(resources string:'Continue'). |
|
4680 |
continueButton action:[self doContinue]. |
|
4681 |
||
4682 |
self processPerform:#stop. |
|
4683 |
||
4684 |
^ self |
|
266 | 4685 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4686 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4687 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 4688 |
! |
4689 |
||
4690 |
doTerminate |
|
4691 |
"terminate - the process has a chance for cleanup" |
|
4692 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4693 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4694 |
(self confirm:('Code modified - terminate anyway ?')) |
4695 |
ifFalse:[ |
|
4696 |
^ self |
|
4697 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4698 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4699 |
|
266 | 4700 |
inspecting ifTrue:[ |
11210 | 4701 |
self processPerform:#terminate. |
4702 |
^ self |
|
266 | 4703 |
]. |
4704 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4705 |
steppedContext := wrapperContext := nil. |
266 | 4706 |
haveControl := false. |
10205 | 4707 |
exitAction := #terminate. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4708 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4709 |
"exit private event-loop" |
6365 | 4710 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4711 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4712 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4713 |
inspecting ifFalse:[ |
11210 | 4714 |
'DebugView [warning]: terminate failed' errorPrintCR. |
4715 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
|
4716 |
Debugger newDebugger. |
|
4717 |
Processor activeProcess terminate. |
|
4718 |
] |
|
266 | 4719 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4720 |
terminateButton turnOff. |
477 | 4721 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4722 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 4723 |
! |
4724 |
||
4725 |
doTrace |
|
4726 |
"tracing - not really implemented ..." |
|
4727 |
||
4728 |
self warn:'this function is not yet implemented'. |
|
4729 |
||
4730 |
"/ |v b| |
|
4731 |
"/ |
|
4732 |
"/ traceView isNil ifTrue:[ |
|
4733 |
"/ v := StandardSystemView on:Display. |
|
4734 |
"/ v label:'Debugger-Trace'. |
|
4735 |
"/ v icon:icon. |
|
4736 |
"/ |
|
4737 |
"/ b := Button label:'untrace' in:v. |
|
4738 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
4739 |
"/ b action:[ |
|
4740 |
"/ StepInterruptPending := nil. |
|
4741 |
"/ tracing := false. |
|
4742 |
"/ v unrealize. |
|
4743 |
"/ traceView := nil |
|
4744 |
"/ ]. |
|
4745 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
4746 |
"/ traceView origin:(0 @ (b height)) |
|
4747 |
"/ extent:[v width @ (v height - b height)] |
|
4748 |
"/ ]. |
|
4749 |
"/ v realize. |
|
4750 |
"/ |
|
4751 |
"/ tracing := true. |
|
4752 |
! |
|
4753 |
||
4754 |
doTraceStep |
|
4755 |
"tracestep - not implemented yet" |
|
4756 |
||
4757 |
canContinue ifTrue:[ |
|
11210 | 4758 |
tracing := true. |
4759 |
self doStep |
|
266 | 4760 |
] |
4761 |
! |
|
4762 |
||
4763 |
exit |
|
4764 |
"exit from menu: immediate exit from smalltalk" |
|
4765 |
||
4766 |
OperatingSystem exit |
|
4767 |
! |
|
4768 |
||
11595 | 4769 |
findHandlerFor |
4770 |
|exClass con currentContext| |
|
4771 |
||
4772 |
(con := self selectedContext) isNil ifTrue:[ |
|
4773 |
con := contextArray at:1 |
|
4774 |
]. |
|
4775 |
con sender isNil ifTrue:[ |
|
4776 |
self information:'Context has already returned'. |
|
4777 |
^ self |
|
4778 |
]. |
|
4779 |
||
4780 |
exClass := Dialog |
|
4781 |
choose:'Exception class:' |
|
4782 |
fromList:(GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name]) |
|
4783 |
lines:25 |
|
4784 |
title:'Choose Exception class'. |
|
4785 |
||
4786 |
currentContext := con findExceptional. |
|
4787 |
[currentContext notNil] whileTrue:[ |
|
4788 |
|r handler| |
|
4789 |
||
4790 |
r := currentContext receiver. "receiver of #handle:do: or #on:do:" |
|
4791 |
(r notNil and:[(handler := r handlerForSignal:exClass |
|
4792 |
context:currentContext |
|
4793 |
originator:nil) notNil] |
|
4794 |
) ifTrue:[ |
|
4795 |
self halt. |
|
4796 |
]. |
|
4797 |
currentContext := currentContext findSpecialHandle:true raise:true. "search starts at currentContext sender" |
|
4798 |
"/ Transcript showCR:currentContext. |
|
4799 |
]. |
|
4800 |
||
4801 |
"Created: / 17-07-2012 / 12:51:10 / cg" |
|
4802 |
! |
|
4803 |
||
266 | 4804 |
inspectContext |
4805 |
"launch an inspector on the currently selected context" |
|
4806 |
||
11595 | 4807 |
|con| |
4808 |
||
4809 |
(con := self selectedContext) notNil ifTrue:[ |
|
4810 |
con inspect. |
|
266 | 4811 |
] |
11595 | 4812 |
|
4813 |
"Modified: / 17-07-2012 / 12:52:34 / cg" |
|
266 | 4814 |
! |
4815 |
||
8142 | 4816 |
middleButtonMenu |
4817 |
<resource: #programMenu > |
|
4818 |
||
9488 | 4819 |
|items m nameOfExecutable| |
8142 | 4820 |
|
4821 |
exclusive ifTrue:[ |
|
11210 | 4822 |
items := #( |
4823 |
('Show More WalkBack' showMore ) |
|
4824 |
('-' ) |
|
4825 |
('Add Breakpoint' addBreakpoint ) |
|
4826 |
('Remove Breakpoint' removeBreakpoint ) |
|
11661 | 4827 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
11210 | 4828 |
('-' ) |
4829 |
). |
|
8142 | 4830 |
] ifFalse:[ |
11210 | 4831 |
items := #( |
4832 |
('Show More WalkBack' showMore ) |
|
4833 |
('-' ) |
|
4834 |
('Skip' skip ) |
|
4835 |
('Step Out' skipForReturn ) |
|
4836 |
('Skip until Entering...' skipUntilEntering ) |
|
4837 |
('-' ) |
|
8142 | 4838 |
" |
11210 | 4839 |
('Continue' doContinue ) |
4840 |
('Terminate' doTerminate ) |
|
4841 |
('Abort' doAbort ) |
|
4842 |
('-' ) |
|
4843 |
('Step' doStep ) |
|
4844 |
('Send' doSend ) |
|
4845 |
('-' ) |
|
4846 |
('Return' doReturn ) |
|
4847 |
('Restart' doRestart ) |
|
4848 |
('-' ) |
|
8142 | 4849 |
" |
11210 | 4850 |
('Add Breakpoint' addBreakpoint ) |
4851 |
('Remove Breakpoint' removeBreakpoint ) |
|
4852 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
|
4853 |
). |
|
4854 |
||
4855 |
self allowBreakPointsInDebugger ifFalse:[ |
|
4856 |
items := items , #( |
|
4857 |
('Allow Breakpoints && halt in Debugger' doNotIgnoreBreakpoints ) |
|
4858 |
). |
|
4859 |
] ifTrue:[ |
|
4860 |
items := items , #( |
|
4861 |
('Ignore Breakpoints && halt in Debugger' doIgnoreBreakpoints ) |
|
4862 |
). |
|
4863 |
]. |
|
4864 |
||
4865 |
items := items , #( |
|
4866 |
('-' ) |
|
4867 |
('Browse Implementing Class' browseImplementingClass ) |
|
4868 |
('Browse Receivers Class' browseReceiversClass ) |
|
11610 | 4869 |
"/ ('Browse Receivers Class Hierarchy' browseClassHierarchy ) |
4870 |
"/ ('Browse Receivers Full Protocol' browseFullClassProtocol ) |
|
11210 | 4871 |
('Implementors' browseImplementors ) |
4872 |
('Implementors Of...' browseImplementorsOf ) |
|
4873 |
('Senders' browseSenders ) |
|
4874 |
('Senders Of...' browseSendersOf ) |
|
4875 |
('-' ) |
|
4876 |
('Inspect Context' inspectContext ) |
|
4877 |
). |
|
8142 | 4878 |
]. |
4879 |
||
9488 | 4880 |
items := items , #( |
11210 | 4881 |
('Copy WalkBack Text' copyWalkbackText ) |
4882 |
('-' ) |
|
4883 |
('QuickTerminate' quickTerminate ) |
|
4884 |
('=' )). |
|
9488 | 4885 |
|
4886 |
nameOfExecutable := OperatingSystem nameOfSTXExecutable asFilename withoutSuffix baseName. |
|
4887 |
nameOfExecutable = 'stx' ifTrue:[ nameOfExecutable := 'Smalltalk' ]. |
|
4888 |
||
4889 |
items := items , { |
|
11210 | 4890 |
{ 'Exit %1 (No Confirmation)' bindWith:nameOfExecutable. #exit }}. |
10205 | 4891 |
|
4892 |
m := PopUpMenu |
|
11210 | 4893 |
itemList:items |
4894 |
resources:resources |
|
4895 |
receiver:self |
|
4896 |
for:contextView. |
|
8142 | 4897 |
|
4898 |
inspecting ifTrue:[ |
|
11210 | 4899 |
m notNil ifTrue:[ |
4900 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
|
4901 |
browseClassHierarchy browseFullClassProtocol |
|
4902 |
browseImplementors browseSenders inspectContext skip doStepOut). |
|
4903 |
]. |
|
8142 | 4904 |
]. |
4905 |
self updateMenuItems. |
|
4906 |
||
4907 |
^ m. |
|
9488 | 4908 |
|
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
4909 |
"Modified: / 27-07-2012 / 15:01:20 / cg" |
8142 | 4910 |
! |
4911 |
||
11573 | 4912 |
notShowingSupportCode |
4913 |
^ hideSupportCode == true. |
|
4914 |
||
4915 |
"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
|
4916 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4917 |
|
3447 | 4918 |
openAboutThisApplication |
4919 |
"opens an about box for this application." |
|
4920 |
||
7112 | 4921 |
Dialog aboutClass:self class. |
4922 |
||
4923 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 4924 |
! |
4925 |
||
8620 | 4926 |
openSettingsDialog |
4927 |
|settingsList settingsApp| |
|
4928 |
||
10205 | 4929 |
settingsList := |
11210 | 4930 |
#( |
4931 |
#('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
4932 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
4933 |
#('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
4934 |
#('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
4935 |
). |
|
8620 | 4936 |
|
4937 |
settingsApp := SettingsDialog new. |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
4938 |
"/ settingsApp requestor:self. |
8620 | 4939 |
settingsApp installSettingsEntries:settingsList. |
4940 |
settingsApp allButOpen. |
|
4941 |
settingsApp window label:('Debugger Settings'). |
|
4942 |
settingsApp openWindow. |
|
4943 |
! |
|
4944 |
||
266 | 4945 |
quickTerminate |
4946 |
"quick terminate - the process will get no chance for cleanup actions" |
|
4947 |
||
4948 |
inspecting ifTrue:[ |
|
11210 | 4949 |
self processPerform:#terminateNoSignal. |
4950 |
^ self |
|
266 | 4951 |
]. |
4952 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4953 |
steppedContext := wrapperContext := nil. |
266 | 4954 |
haveControl := false. |
4955 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4956 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4957 |
"exit private event-loop" |
6365 | 4958 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4959 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4960 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4961 |
inspecting ifFalse:[ |
11210 | 4962 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
4963 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
4964 |
Debugger newDebugger. |
|
4965 |
Processor activeProcess terminateNoSignal. |
|
4966 |
] |
|
266 | 4967 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4968 |
terminateButton turnOff. |
477 | 4969 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4970 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 4971 |
! |
4972 |
||
11391 | 4973 |
rememberCallchain |
4974 |
"remember the callchain in a classvar. |
|
4975 |
When entered the next time, highlight already entered contexts. |
|
4976 |
This makes it possible to identitfy the caller as the first common context |
|
4977 |
along the chain (i.e. the context which is responsible for the debugger to be entered)" |
|
4978 |
||
4979 |
RememberedCallChain := contextArray copy |
|
4980 |
||
4981 |
"Created: / 07-03-2012 / 23:07:07 / cg" |
|
4982 |
! |
|
4983 |
||
11595 | 4984 |
selectedContext |
4985 |
contextView selection notNil ifTrue:[ |
|
4986 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
|
4987 |
^ (contextArray at:(contextView selection)). |
|
4988 |
] |
|
4989 |
]. |
|
4990 |
^ nil |
|
4991 |
||
4992 |
"Created: / 17-07-2012 / 12:52:10 / cg" |
|
4993 |
! |
|
4994 |
||
11647 | 4995 |
showFullWalkback |
4996 |
"double the number of contexts shown" |
|
4997 |
||
4998 |
contextArray notNil ifTrue:[ |
|
4999 |
nChainShown := 9999. |
|
5000 |
self redisplayBacktrace. |
|
5001 |
] |
|
5002 |
||
5003 |
"Created: / 23-07-2012 / 12:24:02 / cg" |
|
5004 |
! |
|
5005 |
||
266 | 5006 |
showMore |
3447 | 5007 |
"double the number of contexts shown" |
266 | 5008 |
|
5009 |
contextArray notNil ifTrue:[ |
|
11210 | 5010 |
nChainShown := nChainShown * 2. |
5011 |
self redisplayBacktrace. |
|
266 | 5012 |
] |
563 | 5013 |
|
3447 | 5014 |
"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
|
5015 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
5016 |
|
11573 | 5017 |
showSupportCode |
5018 |
hideSupportCode := false. |
|
5019 |
self redisplayBacktrace. |
|
5020 |
||
5021 |
"Created: / 10-06-2012 / 21:27:53 / cg" |
|
5022 |
! |
|
5023 |
||
3447 | 5024 |
showingDenseWalkback |
5025 |
^ verboseBacktrace == false. |
|
5026 |
||
5027 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
5028 |
! |
|
5029 |
||
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5030 |
showingDenseWalkback:aBoolean |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5031 |
verboseBacktrace := aBoolean not. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5032 |
self redisplayBacktrace. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5033 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5034 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5035 |
! |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5036 |
|
11573 | 5037 |
showingSupportCode |
5038 |
^ hideSupportCode == false. |
|
5039 |
||
5040 |
"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
|
5041 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5042 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5043 |
showingSupportCode:aBoolean |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5044 |
hideSupportCode := aBoolean not. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5045 |
self redisplayBacktrace. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5046 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5047 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5048 |
! |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5049 |
|
3447 | 5050 |
showingVerboseWalkback |
5051 |
^ verboseBacktrace == true. |
|
5052 |
||
5053 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
5054 |
! |
|
5055 |
||
9626 | 5056 |
sizeChanged:how |
10205 | 5057 |
super sizeChanged:how. |
9626 | 5058 |
LastExtent := self extent. |
5059 |
||
5060 |
"Created: / 10-11-2010 / 09:08:41 / cg" |
|
5061 |
! |
|
5062 |
||
266 | 5063 |
skip |
5064 |
"skip for cursor line in selected method" |
|
5065 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5066 |
stepHow := #skip. |
266 | 5067 |
self doStep:codeView cursorLine. |
790 | 5068 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5069 |
"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
|
5070 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5071 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5072 |
skipForReturn |
2581 | 5073 |
"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
|
5074 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5075 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5076 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5077 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5078 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 5079 |
! |
5080 |
||
5081 |
skipUntilEntering |
|
5082 |
"skip until some particular method is invoked." |
|
5083 |
||
5084 |
|selector| |
|
5085 |
||
10205 | 5086 |
selector := Dialog |
11210 | 5087 |
request:'Skip until entering what (matchpattern):' |
5088 |
initialAnswer:self goodSkipUntilSelector. |
|
2581 | 5089 |
selector size == 0 ifTrue:[^ self]. |
5090 |
||
5091 |
stepUntilEntering := selector asSymbol. |
|
5092 |
stepHow := #send. |
|
5093 |
self doStep:-1. |
|
5094 |
||
5095 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 5096 |
! |
5097 |
||
11573 | 5098 |
toggleShowSupportCode |
5099 |
hideSupportCode ifTrue:[ |
|
5100 |
self showSupportCode |
|
11645
4f39a925956d
changed: #toggleShowSupportCode
Stefan Vogel <sv@exept.de>
parents:
11636
diff
changeset
|
5101 |
] ifFalse:[ |
11573 | 5102 |
self hideSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5103 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5104 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5105 |
"Modified: / 17-11-2001 / 20:07:45 / cg" |
11573 | 5106 |
"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
|
5107 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5108 |
|
3447 | 5109 |
toggleVerboseWalkback |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5110 |
self showingDenseWalkback:(self showingDenseWalkback not) |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5111 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5112 |
"Modified: / 27-07-2012 / 15:00:15 / cg" |
11610 | 5113 |
! |
5114 |
||
5115 |
updateMenuItems |
|
5116 |
|m mthd cls mCls rCls| |
|
5117 |
||
5118 |
" |
|
5119 |
enable/disable some menu items |
|
5120 |
" |
|
5121 |
m := contextView middleButtonMenu. |
|
5122 |
m notNil ifTrue:[ |
|
5123 |
m disable:#removeBreakpoint. |
|
5124 |
m disable:#addBreakpoint. |
|
5125 |
canShowMore ifFalse:[ |
|
5126 |
m disable:#showMore |
|
5127 |
]. |
|
5128 |
||
5129 |
selectedContext notNil ifTrue:[ |
|
5130 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
5131 |
||
5132 |
mthd := selectedContext method. |
|
5133 |
mthd notNil ifTrue:[ |
|
5134 |
cls := mCls := mthd containingClass. |
|
5135 |
mthd isBreakpointed ifTrue:[ |
|
5136 |
m enable:#removeBreakpoint. |
|
5137 |
] ifFalse:[ |
|
5138 |
m enable:#addBreakpoint. |
|
5139 |
] |
|
5140 |
]. |
|
5141 |
(selectedContext isBlockContext and:[selectedContext home isNil]) ifTrue:[ |
|
5142 |
"/ a cheap block's context |
|
5143 |
] ifFalse:[ |
|
5144 |
rCls := selectedContext receiver class. |
|
5145 |
cls isNil ifTrue:[ |
|
5146 |
cls := rCls |
|
5147 |
]. |
|
5148 |
]. |
|
5149 |
cls notNil ifTrue:[ |
|
5150 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5151 |
rCls == mCls ifTrue:[ |
|
5152 |
m disable:#browseReceiversClass |
|
5153 |
]. |
|
5154 |
mCls isNil ifTrue:[ |
|
5155 |
m disable:#browseImplementingClass |
|
5156 |
] |
|
5157 |
||
5158 |
] ifFalse:[ |
|
5159 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5160 |
]. |
|
5161 |
mthd notNil ifTrue:[ |
|
5162 |
m enableAll:#(browseImplementingClass). |
|
5163 |
]. |
|
5164 |
selectedContext isCheapBlockContext ifTrue:[ |
|
5165 |
m disableAll:#(browseReceiversClass). |
|
5166 |
]. |
|
5167 |
] ifFalse:[ |
|
5168 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5169 |
] |
|
5170 |
] |
|
5171 |
||
5172 |
"Modified: / 19-07-2012 / 11:53:30 / cg" |
|
266 | 5173 |
! ! |
5174 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5175 |
!DebugView methodsFor:'menu & button actions-breakpoints'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5176 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5177 |
addBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5178 |
"add a breakpoint on the selected contexts method - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5179 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5180 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5181 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5182 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5183 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5184 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5185 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5186 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5187 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5188 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5189 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5190 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5191 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5192 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5193 |
method setBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5194 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5195 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5196 |
contextView middleButtonMenu disable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5197 |
contextView middleButtonMenu enable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5198 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5199 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5200 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5201 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5202 |
allowBreakPointsInDebugger |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5203 |
^ ignoreBreakpoints not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5204 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5205 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5206 |
allowBreakPointsInDebugger:aBoolean |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5207 |
ignoreBreakpoints := aBoolean not. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5208 |
self initializeMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5209 |
self initializeContextViewsMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5210 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5211 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5212 |
doIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5213 |
self allowBreakPointsInDebugger:false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5214 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5215 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5216 |
doNotIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5217 |
self allowBreakPointsInDebugger:true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5218 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5219 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5220 |
ignoreAllHaltsForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5221 |
self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5222 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5223 |
"Created: / 08-05-2011 / 10:19:56 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5224 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5225 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5226 |
ignoreAllHaltsUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5227 |
self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5228 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5229 |
"Created: / 27-01-2012 / 11:32:14 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5230 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5231 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5232 |
ignoreBreakpointsWithThisParameterForever |
11370 | 5233 |
Object disableBreakPoint:breakPointParameter. |
5234 |
"/ self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
|
5235 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5236 |
"Created: / 06-03-2012 / 12:35:48 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5237 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5238 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5239 |
ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5240 |
self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5241 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5242 |
"Created: / 06-03-2012 / 12:35:22 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5243 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5244 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5245 |
ignoreHaltForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5246 |
self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5247 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5248 |
"Modified: / 27-01-2012 / 11:31:37 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5249 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5250 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5251 |
ignoreHaltUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5252 |
self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5253 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5254 |
"Created: / 27-01-2012 / 11:36:54 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5255 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5256 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5257 |
openBreakPointBrowser |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5258 |
Tools::BreakpointBrowser open |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5259 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5260 |
"Created: / 27-10-2010 / 12:52:49 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5261 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5262 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5263 |
openIgnoreAllHaltsUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5264 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5265 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5266 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5267 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5268 |
request:(resources string:'How long should all halts/breakpoints be ignored [smh] ?') |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5269 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5270 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5271 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5272 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5273 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5274 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5275 |
self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5276 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5277 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5278 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5279 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5280 |
"Created: / 08-05-2011 / 10:19:20 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5281 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5282 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5283 |
openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5284 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5285 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5286 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5287 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5288 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5289 |
string:'How often should breakpoints with parameter "%1" be ignored ?' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5290 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5291 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5292 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5293 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5294 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5295 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5296 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5297 |
self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5298 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5299 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5300 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5301 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5302 |
"Modified: / 27-01-2012 / 11:31:44 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5303 |
"Created: / 06-03-2012 / 12:28:51 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5304 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5305 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5306 |
openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5307 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5308 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5309 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5310 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5311 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5312 |
string:'How long should breakpoints with parameter "%1" be ignored (s/m/h) ?' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5313 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5314 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5315 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5316 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5317 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5318 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5319 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5320 |
self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5321 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5322 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5323 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5324 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5325 |
"Created: / 06-03-2012 / 12:03:36 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5326 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5327 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5328 |
openIgnoreHaltNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5329 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5330 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5331 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5332 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5333 |
request:(resources string:'How often should this halt be ignored ?') |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5334 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5335 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5336 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5337 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5338 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5339 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5340 |
self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5341 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5342 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5343 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5344 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5345 |
"Modified: / 27-01-2012 / 11:31:44 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5346 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5347 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5348 |
openIgnoreHaltUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5349 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5350 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5351 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5352 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5353 |
request:(resources string:'How long should this halt/breakpoint be ignored (s/m/h) ?') |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5354 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5355 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5356 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5357 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5358 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5359 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5360 |
self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5361 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5362 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5363 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5364 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5365 |
"Modified: / 27-01-2012 / 11:31:47 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5366 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5367 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5368 |
removeAllBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5369 |
"remove all trace & breakpoints - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5370 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5371 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5372 |
self withExecuteCursorDo:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5373 |
MessageTracer unwrapAllMethods |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5374 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5375 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5376 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5377 |
"Modified: / 21.5.1998 / 01:44:43 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5378 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5379 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5380 |
removeBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5381 |
"remove breakpoint on the selected contexts method - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5382 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5383 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5384 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5385 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5386 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5387 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5388 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5389 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5390 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5391 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5392 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5393 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5394 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5395 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5396 |
method clearBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5397 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5398 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5399 |
contextView middleButtonMenu disable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5400 |
contextView middleButtonMenu enable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5401 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5402 |
"Modified: / 13.1.1998 / 00:24:47 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5403 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5404 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5405 |
stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5406 |
self class stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5407 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5408 |
|
266 | 5409 |
!DebugView methodsFor:'private'! |
5410 |
||
6487 | 5411 |
abortAllIsHandled |
9750 | 5412 |
^ AbortAllOperationWantedQuery query |
5413 |
||
5414 |
"Modified: / 09-02-2011 / 13:53:13 / cg" |
|
6487 | 5415 |
! |
5416 |
||
266 | 5417 |
busy |
5418 |
^ busy |
|
5419 |
! |
|
5420 |
||
5421 |
exclusive:aBoolean |
|
5422 |
exclusive := aBoolean |
|
5423 |
! |
|
5424 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5425 |
explainSelection |
8212 | 5426 |
|interval crsrPos| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5427 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5428 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5429 |
interval isEmpty ifTrue:[ |
11210 | 5430 |
crsrPos := codeView characterPositionOfCursor. |
5431 |
codeView characterUnderCursor isSeparator ifTrue:[ |
|
5432 |
crsrPos := (crsrPos - 1) max:1 |
|
5433 |
]. |
|
5434 |
interval := crsrPos to:crsrPos. |
|
10205 | 5435 |
]. |
5436 |
self |
|
11210 | 5437 |
withNodeValueAtInterval:interval |
5438 |
do:[:value :description | |
|
5439 |
self showValue:value |
|
5440 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5441 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5442 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5443 |
findNodeForInterval:interval |
8212 | 5444 |
|source| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5445 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5446 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5447 |
|
8487
ddf59247960c
slow runArray (text) operations
Claus Gittinger <cg@exept.de>
parents:
8432
diff
changeset
|
5448 |
source := codeView contentsAsString string. |
10205 | 5449 |
"/ source := currentMethod notNil |
5450 |
"/ ifTrue:[ currentMethod source ] |
|
8396 | 5451 |
"/ ifFalse:[ codeView contents asString ]. |
8257
106d3fecbca0
findNodeForInterval: care for nonexisting source
Claus Gittinger <cg@exept.de>
parents:
8225
diff
changeset
|
5452 |
source isNil ifTrue:[^ nil]. |
8214 | 5453 |
|
8212 | 5454 |
^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string) allowErrors:true. |
5455 |
"/ ^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string). |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5456 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5457 |
|
7912 | 5458 |
findNodeIn:tree forInterval:interval |
5459 |
<resource: #obsolete> |
|
10205 | 5460 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5461 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5462 |
|
7912 | 5463 |
self obsoleteMethodWarning. |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5464 |
node := nil. |
10205 | 5465 |
tree nodesDo:[:each | |
11210 | 5466 |
(each intersectsInterval:interval) ifTrue:[ |
5467 |
(node isNil or:[node == each parent]) ifTrue:[ |
|
5468 |
node := each |
|
5469 |
] ifFalse:[ |
|
5470 |
(node parent notNil |
|
5471 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
|
5472 |
] |
|
5473 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5474 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5475 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5476 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5477 |
|
2581 | 5478 |
goodSkipUntilSelector |
5479 |
|current| |
|
5480 |
||
5481 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
5482 |
selectedContext isNil ifTrue:[^ nil]. |
|
5483 |
current := selectedContext selector. |
|
5484 |
current isNil ifTrue:[^ nil]. |
|
5485 |
('change:*' match:current) ifTrue:[ |
|
11210 | 5486 |
^ 'update:*' |
2581 | 5487 |
]. |
5488 |
^ nil |
|
5489 |
! |
|
5490 |
||
8179 | 5491 |
haltSelectors |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5492 |
^ #( #'halt' #'halt:' #'breakPoint:' #'breakPoint:info:' #'break'). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5493 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5494 |
"Modified (format): / 27-01-2012 / 11:10:00 / cg" |
8179 | 5495 |
! |
5496 |
||
10205 | 5497 |
inspectedProcess |
5498 |
^ inspectedProcess |
|
266 | 5499 |
! |
5500 |
||
5501 |
interruptProcessWith:aBlock |
|
5502 |
"let inspected process do something, then update the context list" |
|
5503 |
||
5504 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5505 |
self showTerminated. |
5506 |
^ self |
|
266 | 5507 |
]. |
5508 |
inspectedProcess interruptWith:aBlock. |
|
5509 |
" |
|
5510 |
give the process a chance to run, then update |
|
5511 |
" |
|
5512 |
(Delay forSeconds:0.2) wait. |
|
5513 |
self setContext:(inspectedProcess suspendedContext). |
|
5514 |
! |
|
5515 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5516 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5517 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5518 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5519 |
|
8194 | 5520 |
openHTMLDocument: anHTMLFilename |
5521 |
"open a HTMLDocumentView on anHTMLFilename" |
|
5522 |
||
5523 |
HTMLDocumentView openFullOnDocumentationFile: anHTMLFilename |
|
5524 |
! |
|
5525 |
||
266 | 5526 |
processPerform:aMessage |
5527 |
"do something, then update the context list" |
|
5528 |
||
5529 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5530 |
self showTerminated. |
5531 |
^ self |
|
266 | 5532 |
]. |
5533 |
inspectedProcess perform:aMessage. |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
5534 |
|
266 | 5535 |
" |
5536 |
give the process a chance to run, then update |
|
5537 |
" |
|
5538 |
(Delay forSeconds:0.2) wait. |
|
5539 |
self setContext:(inspectedProcess suspendedContext). |
|
5540 |
! |
|
5541 |
||
939 | 5542 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5543 |
"force redisplay of the walkBack list; invoked when the |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5544 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5545 |
|
939 | 5546 |
|oldSelection oldContext con idx| |
5547 |
||
5548 |
contextArray notNil ifTrue:[ |
|
11210 | 5549 |
self withExecuteCursorDo:[ |
5550 |
oldSelection := contextView selection. |
|
5551 |
oldSelection notNil ifTrue:[ |
|
5552 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
5553 |
]. |
|
5554 |
||
5555 |
con := firstContext. |
|
950 | 5556 |
"/ con := contextArray at:1. |
11210 | 5557 |
"/ force redeisplay, even if same by changing the first entry |
5558 |
contextArray size > 0 ifTrue:[ |
|
5559 |
contextArray at:1 put:nil. |
|
5560 |
]. |
|
5561 |
self setContext:con. |
|
5562 |
||
5563 |
oldContext isNil ifTrue:[ |
|
5564 |
idx := oldSelection |
|
5565 |
] ifFalse:[ |
|
5566 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
5567 |
]. |
|
5568 |
contextView setSelection:idx. |
|
5569 |
idx notNil ifTrue:[ |
|
5570 |
self showSelection:idx |
|
5571 |
] |
|
5572 |
] |
|
939 | 5573 |
] |
5574 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5575 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 5576 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 5577 |
! |
5578 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5579 |
selectedInterval |
7912 | 5580 |
^ codeView selectedInterval |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5581 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5582 |
|
7823 | 5583 |
showError:message |
5584 |
codeView contents:(resources string:message). |
|
5585 |
shown ifTrue:[ |
|
11210 | 5586 |
exclusive ifTrue:[ |
5587 |
"/ consider this a kludge: |
|
5588 |
"/ if exclusive, cannot use flash, since it suspends |
|
5589 |
"/ (but we cannot suspend here ...) |
|
5590 |
codeView redrawInverted. device flush. |
|
5591 |
OperatingSystem millisecondDelay:200. |
|
5592 |
codeView redraw |
|
5593 |
] ifFalse:[ |
|
5594 |
codeView flash |
|
5595 |
] |
|
7823 | 5596 |
] |
5597 |
||
5598 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
|
5599 |
! |
|
5600 |
||
5601 |
showTerminated |
|
5602 |
self showError:'** the process has terminated **' |
|
5603 |
! |
|
5604 |
||
5605 |
showValue:aValue |
|
5606 |
"/ TODO: show value in info field |
|
5607 |
"/ Transcript showCR:aValue printString |
|
5608 |
! |
|
5609 |
||
10205 | 5610 |
stepping |
5611 |
^ stepping |
|
5612 |
! |
|
5613 |
||
5614 |
unstep |
|
7823 | 5615 |
stepping := false. |
5616 |
bigStep := false. |
|
5617 |
steppedContext := wrapperContext := nil. |
|
5618 |
exitAction := nil |
|
5619 |
||
5620 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
|
5621 |
! |
|
5622 |
||
10203 | 5623 |
updateButtonsAndMenuItemsForContext:aContext |
5624 |
|m| |
|
5625 |
||
5626 |
m := contextView middleButtonMenu. |
|
5627 |
m notNil ifTrue:[ |
|
11210 | 5628 |
self updateMenuItems. |
5629 |
||
5630 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
|
5631 |
abortButton enable. |
|
5632 |
m enable:#doAbort. |
|
5633 |
] ifFalse:[ |
|
5634 |
abortButton disable. |
|
5635 |
m disable:#doAbort. |
|
5636 |
]. |
|
5637 |
exclusive ifTrue:[ |
|
5638 |
terminateButton disable. |
|
5639 |
m disable:#doTerminate. |
|
5640 |
] ifFalse:[ |
|
5641 |
terminateButton enable. |
|
5642 |
m enable:#doTerminate. |
|
5643 |
]. |
|
10203 | 5644 |
]. |
5645 |
||
5646 |
mayProceed == false ifTrue:[ |
|
11210 | 5647 |
continueButton disable. |
5648 |
m notNil ifTrue:[m disable:#doContinue]. |
|
10203 | 5649 |
] ifFalse:[ |
11210 | 5650 |
continueButton enable. |
5651 |
m notNil ifTrue:[m enable:#doContinue] |
|
10203 | 5652 |
]. |
5653 |
||
5654 |
"Created: / 06-07-2011 / 12:24:53 / cg" |
|
5655 |
! |
|
5656 |
||
7823 | 5657 |
updateContext |
5658 |
|oldContext idx| |
|
5659 |
||
5660 |
inspectedProcess state == #dead ifTrue:[ |
|
11210 | 5661 |
self showTerminated. |
5662 |
^ self |
|
7823 | 5663 |
]. |
5664 |
||
5665 |
oldContext := selectedContext. |
|
5666 |
[ |
|
11210 | 5667 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
5668 |
oldContext notNil ifTrue:[ |
|
5669 |
contextArray notNil ifTrue:[ |
|
5670 |
idx := contextArray identityIndexOf:oldContext. |
|
5671 |
idx ~~ 0 ifTrue:[ |
|
5672 |
self showSelection:idx |
|
5673 |
] ifFalse:[ |
|
5674 |
codeView contents:('** context returned **') |
|
5675 |
] |
|
5676 |
] |
|
5677 |
] |
|
5678 |
]. |
|
7823 | 5679 |
] valueUninterruptably. |
5680 |
||
5681 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
|
8212 | 5682 |
! |
5683 |
||
5684 |
withNodeValueAtInterval:interval do:aBlock |
|
9294
e19553d7e864
changed: #withNodeValueAtInterval:do:
Stefan Vogel <sv@exept.de>
parents:
9292
diff
changeset
|
5685 |
|node definingNode nm nmBold varIdx parentNode receiver con receiversNonMetaClass| |
8212 | 5686 |
|
5687 |
"/interval printCR. |
|
10205 | 5688 |
Error |
11210 | 5689 |
handle:[:ex | ] |
5690 |
do:[ |
|
5691 |
[ |
|
5692 |
node := self findNodeForInterval:interval |
|
5693 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:50. |
|
5694 |
]. |
|
9314
e58b9abd145a
comment/format in: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9308
diff
changeset
|
5695 |
|
8212 | 5696 |
node isNil ifTrue:[ ^ self ]. |
10205 | 5697 |
node isVariable ifFalse:[ |
11210 | 5698 |
"/ Transcript showCR:node. |
5699 |
^ self |
|
8592 | 5700 |
]. |
8212 | 5701 |
|
5702 |
nm := node name. |
|
8214 | 5703 |
nmBold := nm allBold. |
8600 | 5704 |
actualContext isNil ifTrue:[^ self ]. |
8636 | 5705 |
actualContext methodHome isNil ifTrue:[^ self ]. |
8214 | 5706 |
receiver := actualContext methodHome receiver. |
8212 | 5707 |
|
5708 |
(nm = 'self') ifTrue:[ |
|
11210 | 5709 |
aBlock value:receiver value:'receiver' allBold. |
5710 |
^ self |
|
8212 | 5711 |
]. |
5712 |
(nm = 'super') ifTrue:[ |
|
11210 | 5713 |
aBlock value:receiver value:'receiver' allBold. |
5714 |
^ self |
|
8212 | 5715 |
]. |
5716 |
(nm = 'thisContext') ifTrue:[ |
|
11210 | 5717 |
aBlock value:actualContext value:'context' allBold. |
5718 |
^ self |
|
8212 | 5719 |
]. |
5720 |
||
5721 |
definingNode := node whoDefines:nm. |
|
5722 |
definingNode isNil ifTrue:[ |
|
11210 | 5723 |
(receiver class allInstVarNames includes:nm) ifTrue:[ |
8214 | 5724 |
"/aBlock value:'xIII' value:'instVar'. |
11210 | 5725 |
receiver class isMetaclass ifTrue:[ |
5726 |
aBlock value:(receiver instVarNamed:nm) value:'classInstVar ',nmBold. |
|
5727 |
] ifFalse:[ |
|
5728 |
aBlock value:(receiver instVarNamed:nm) value:'instVar ',nmBold. |
|
5729 |
]. |
|
5730 |
^ self |
|
5731 |
]. |
|
5732 |
||
5733 |
receiversNonMetaClass := receiver class theNonMetaclass. |
|
5734 |
(receiversNonMetaClass privateClasses contains:[:cls | cls nameWithoutPrefix = nm]) ifTrue:[ |
|
5735 |
aBlock value:'' value:'private class ',nmBold. |
|
5736 |
^ self |
|
5737 |
]. |
|
5738 |
(receiversNonMetaClass classVarNames includes:nm) ifTrue:[ |
|
5739 |
aBlock value:((currentMethod mclass ? receiversNonMetaClass) theNonMetaclass classVarAt:nm) value:'classVar ',nmBold. |
|
5740 |
^ self |
|
5741 |
]. |
|
5742 |
receiversNonMetaClass sharedPoolNames do:[:eachPoolName | |
|
5743 |
|pool| |
|
5744 |
||
5745 |
pool := Smalltalk at:eachPoolName. |
|
5746 |
pool isNil ifTrue:[ pool := receiversNonMetaClass topNameSpace at:eachPoolName]. |
|
5747 |
(pool classVarNames includes:nm) ifTrue:[ |
|
5748 |
aBlock value:(pool classVarAt:nm) value:'poolVar ',nm allBold,' in ',eachPoolName allBold,' '. |
|
5749 |
^ self |
|
5750 |
]. |
|
5751 |
]. |
|
5752 |
(Smalltalk includesKey:nm asSymbol) ifTrue:[ |
|
5753 |
(Smalltalk at:nm asSymbol) isClass ifTrue:[ |
|
5754 |
aBlock value:'class: ',nmBold value:nil. |
|
5755 |
] ifFalse:[ |
|
5756 |
aBlock value:(Smalltalk at:nm asSymbol) value:'global ',nmBold. |
|
5757 |
]. |
|
5758 |
^ self |
|
5759 |
]. |
|
5760 |
aBlock value:'' value:'unknown'. |
|
5761 |
^ self |
|
8212 | 5762 |
]. |
5763 |
"/definingNode printCR. |
|
5764 |
||
5765 |
definingNode isMethod ifTrue:[ |
|
11210 | 5766 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5767 |
varIdx ~~ 0 ifTrue:[ |
|
5768 |
Error |
|
5769 |
handle:[:ex | ] |
|
5770 |
do:[ aBlock value:(actualContext methodHome argAt:varIdx) value:'methodArg ',nmBold ]. |
|
5771 |
^ self |
|
5772 |
]. |
|
5773 |
varIdx := definingNode temporaries findFirst:[:var | var name = nm]. |
|
5774 |
varIdx ~~ 0 ifTrue:[ |
|
5775 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5776 |
Error |
|
5777 |
handle:[:ex | ] |
|
5778 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5779 |
^ self |
|
5780 |
] |
|
5781 |
]. |
|
8212 | 5782 |
]. |
5783 |
||
5784 |
definingNode isBlock ifTrue:[ |
|
11210 | 5785 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5786 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
5787 |
varIdx ~~ 0 ifTrue:[ |
|
5788 |
"/ am I in this block ? |
|
5789 |
(actualContext lineNumber notNil |
|
5790 |
and:[ definingNode lastLineNumber notNil |
|
5791 |
and:[ (actualContext lineNumber |
|
5792 |
between:definingNode firstLineNumber |
|
5793 |
and:definingNode lastLineNumber) |
|
5794 |
and:[ varIdx <= actualContext numArgs ] ]]) |
|
5795 |
ifTrue:[ |
|
5796 |
aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold . |
|
5797 |
^ self |
|
5798 |
]. |
|
8214 | 5799 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
11210 | 5800 |
^ self |
5801 |
] |
|
5802 |
]. |
|
8212 | 5803 |
]. |
5804 |
||
5805 |
parentNode := definingNode parent. |
|
5806 |
||
5807 |
[parentNode notNil] whileTrue:[ |
|
5808 |
"/'isMethod ' print. parentNode isMethod printCR. |
|
11210 | 5809 |
parentNode isMethod ifTrue:[ |
5810 |
varIdx := parentNode temporaries findFirst:[:var | var name = nm]. |
|
5811 |
varIdx ~~ 0 ifTrue:[ |
|
5812 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5813 |
Error |
|
5814 |
handle:[:ex | ] |
|
5815 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5816 |
^ self |
|
5817 |
] |
|
5818 |
]. |
|
5819 |
]. |
|
8212 | 5820 |
"/'isBlock ' print. parentNode isBlock printCR. |
11210 | 5821 |
parentNode isBlock ifTrue:[ |
5822 |
"/ we dont have any information on the inlineability |
|
5823 |
"/ of this block here (RBParser does not know what |
|
5824 |
"/ the compiler does. |
|
5825 |
"/ therefore, it is questionable if we can use the |
|
5826 |
"/ contexts home context here. |
|
5827 |
"/ am I in this block ? |
|
5828 |
con := actualContext. |
|
5829 |
[con notNil |
|
5830 |
and:[ parentNode lastLineNumber notNil |
|
5831 |
and:[ con lineNumber notNil |
|
5832 |
and:[ con lineNumber |
|
5833 |
between:parentNode firstLineNumber |
|
5834 |
and:parentNode lastLineNumber ]]]] whileTrue:[ |
|
5835 |
con := con sender. |
|
5836 |
]. |
|
5837 |
con notNil ifTrue:[ |
|
5838 |
varIdx := parentNode arguments findFirst:[:arg | arg name = nm]. |
|
5839 |
varIdx ~~ 0 ifTrue:[ |
|
5840 |
Error |
|
5841 |
handle:[:ex | ] |
|
5842 |
do:[ aBlock value:(con argAt:varIdx) value:'blockArg ',nmBold ]. |
|
5843 |
^ self |
|
5844 |
]. |
|
5845 |
varIdx := parentNode body temporaries findFirst:[:var | var name = nm]. |
|
5846 |
varIdx ~~ 0 ifTrue:[ |
|
5847 |
Error |
|
5848 |
handle:[:ex | ] |
|
5849 |
do:[ aBlock value:(con varAt:varIdx) value:'blockVar ',nmBold ]. |
|
5850 |
^ self |
|
5851 |
]. |
|
5852 |
]. |
|
5853 |
]. |
|
5854 |
parentNode := parentNode parent. |
|
8212 | 5855 |
]. |
8214 | 5856 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
9446 | 5857 |
|
9688
805ea34ba3ef
changed: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9662
diff
changeset
|
5858 |
"Modified: / 18-01-2011 / 17:57:34 / cg" |
7823 | 5859 |
! ! |
5860 |
||
5861 |
!DebugView methodsFor:'private queries'! |
|
5862 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5863 |
canBrowseClassHierarchy |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5864 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5865 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5866 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5867 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5868 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5869 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5870 |
canBrowseFullClassProtocol |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5871 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5872 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5873 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5874 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5875 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5876 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5877 |
canBrowseImplementingClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5878 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5879 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5880 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5881 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5882 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5883 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5884 |
canBrowseProcessesApplication |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5885 |
|p| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5886 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5887 |
p := inspectedProcess ? Processor activeProcess. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5888 |
p isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5889 |
^ p isGUIProcess |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5890 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5891 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5892 |
canBrowseReceiversClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5893 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5894 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5895 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5896 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5897 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5898 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5899 |
canCloseAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5900 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5901 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5902 |
debugger busy ifTrue:[^ true]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5903 |
] |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5904 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5905 |
^ false |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5906 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5907 |
"Created: / 23-03-2012 / 12:40:18 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5908 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5909 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5910 |
canDefineMethod |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5911 |
^ defineButton isVisible |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5912 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5913 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5914 |
canRestart |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5915 |
^ restartButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5916 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5917 |
"Modified: / 17.11.2001 / 19:59:49 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5918 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5919 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5920 |
canReturn |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5921 |
^ returnButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5922 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5923 |
"Modified: / 17.11.2001 / 19:59:18 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5924 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5925 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5926 |
canSendEmail |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5927 |
^ SendMailTool notNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5928 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5929 |
"Created: / 15-10-2010 / 11:51:23 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5930 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5931 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5932 |
canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5933 |
^ canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5934 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5935 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5936 |
hasContextSelected |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5937 |
^ contextView hasSelection |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5938 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5939 |
"Created: / 17.11.2001 / 19:57:03 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5940 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5941 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5942 |
hasHaltsToIgnore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5943 |
^ IgnoredHalts notEmptyOrNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5944 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5945 |
|
7823 | 5946 |
isAborting |
5947 |
^ exitAction == #abort |
|
5948 |
! |
|
5949 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5950 |
isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5951 |
^ isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5952 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5953 |
"Created: / 06-03-2012 / 12:16:56 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5954 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5955 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5956 |
isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5957 |
^ isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5958 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5959 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5960 |
isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5961 |
^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5962 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5963 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5964 |
selectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5965 |
|con mthd| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5966 |
|
11595 | 5967 |
(con := self selectedContext) notNil ifTrue:[ |
11610 | 5968 |
mthd := con method. |
11595 | 5969 |
^ mthd notNil and:[mthd isWrapped] |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5970 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5971 |
^ false. |
11595 | 5972 |
|
11610 | 5973 |
"Modified: / 19-07-2012 / 11:36:28 / cg" |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5974 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5975 |
|
7823 | 5976 |
setOfHiddenCallingSelectors |
5977 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
|
5978 |
! |
|
5979 |
||
5980 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
|
5981 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
|
5982 |
! ! |
|
5983 |
||
9922 | 5984 |
!DebugView methodsFor:'private-breakpoints'! |
5985 |
||
11210 | 5986 |
addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey forAll:aBoolean |
9922 | 5987 |
|haltingContext haltingMethod lineNrOfHalt| |
5988 |
||
5989 |
aBoolean ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5990 |
haltingMethod := #all |
9922 | 5991 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5992 |
haltingContext := self findHaltingContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5993 |
haltingContext isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5994 |
Transcript showCR:'no halting context found'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5995 |
^ self |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5996 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5997 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5998 |
haltingMethod := haltingContext method. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5999 |
lineNrOfHalt := haltingContext lineNumber. |
9922 | 6000 |
]. |
6001 |
||
6002 |
self class |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6003 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
11210 | 6004 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
6005 |
||
6006 |
"Created: / 27-01-2012 / 11:31:12 / cg" |
|
9922 | 6007 |
! |
6008 |
||
6009 |
canAddBreakpoint |
|
6010 |
|m| |
|
6011 |
||
6012 |
m := contextView middleButtonMenu. |
|
6013 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
6014 |
! |
|
6015 |
||
6016 |
canRemoveBreakpoint |
|
6017 |
|m| |
|
6018 |
||
6019 |
m := contextView middleButtonMenu. |
|
6020 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
6021 |
! |
|
6022 |
||
6023 |
findHaltingContext |
|
6024 |
|haltSelectors| |
|
6025 |
||
6026 |
haltSelectors := self haltSelectors. |
|
6027 |
||
10205 | 6028 |
contextArray keysAndValuesDo:[:idx :con | |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6029 |
|sel con2 sel2 method| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6030 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6031 |
sel := con selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6032 |
(haltSelectors includes:sel) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6033 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6034 |
method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6035 |
con2 := contextArray at:idx+1. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6036 |
sel2 := con2 selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6037 |
(haltSelectors includes:sel2) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6038 |
con2 method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6039 |
^ contextArray at:idx+2. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6040 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6041 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6042 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6043 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6044 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6045 |
(contextArray at:idx+1) infoPrintCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6046 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6047 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6048 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6049 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6050 |
con method isWrapped ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6051 |
^ con |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6052 |
]. |
9922 | 6053 |
]. |
6054 |
^ nil |
|
6055 |
||
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6056 |
"Modified: / 27-01-2012 / 11:06:02 / cg" |
9922 | 6057 |
! |
6058 |
||
6059 |
ignoreBreakpoints |
|
6060 |
^ ignoreBreakpoints |
|
6061 |
||
6062 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
6063 |
! ! |
|
6064 |
||
7823 | 6065 |
!DebugView methodsFor:'private-cache handling'! |
6066 |
||
6067 |
cacheMyself |
|
6068 |
"remember myself for next debug session" |
|
6069 |
||
6070 |
"caching the last debugger will make the next debugger appear |
|
6071 |
faster, since no resources have to be allocated in the display. |
|
6072 |
We have to be careful to release all refs to the debuggee, though. |
|
6073 |
Otherwise, the GC will not be able to release it." |
|
6074 |
||
6075 |
windowGroup notNil ifTrue:[ |
|
11210 | 6076 |
windowGroup setProcess:nil. |
7823 | 6077 |
]. |
6078 |
||
6079 |
self releaseDebuggee. |
|
6080 |
||
6081 |
cachable ~~ true ifTrue:[^ self]. |
|
6082 |
||
6083 |
"/ |
|
6084 |
"/ only cache if I am on the Display |
|
6085 |
"/ |
|
6086 |
device == Display ifTrue:[ |
|
11210 | 6087 |
exclusive ifTrue:[ |
6088 |
CachedExclusive := self |
|
6089 |
] ifFalse:[ |
|
6090 |
CachedDebugger := self |
|
6091 |
]. |
|
7823 | 6092 |
]. |
6093 |
||
6094 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
11210 | 6095 |
ObjectMemory stepInterruptHandler:nil |
7823 | 6096 |
]. |
6097 |
||
6098 |
"Modified: 10.7.1997 / 15:50:46 / stefan" |
|
6099 |
"Modified: 31.7.1997 / 21:20:14 / cg" |
|
6100 |
! |
|
6101 |
||
6102 |
isCached |
|
6103 |
"tell wether we are a cached debugger" |
|
6104 |
||
6105 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6106 |
^ true. |
7823 | 6107 |
]. |
6108 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6109 |
^ true. |
7823 | 6110 |
]. |
6111 |
||
6112 |
^ false. |
|
6113 |
||
6114 |
"Created: 10.7.1997 / 15:22:43 / stefan" |
|
6115 |
! |
|
6116 |
||
6117 |
uncacheMyself |
|
6118 |
"do not remember myself any longer for next debug session" |
|
6119 |
||
6120 |
cachable := false. |
|
6121 |
||
6122 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6123 |
CachedExclusive := nil. |
7823 | 6124 |
]. |
6125 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6126 |
CachedDebugger := nil. |
7823 | 6127 |
]. |
6128 |
OpenDebuggers notNil ifTrue:[ |
|
11210 | 6129 |
OpenDebuggers remove:self ifAbsent:[]. |
7823 | 6130 |
]. |
6131 |
||
6132 |
"Modified: 31.7.1997 / 21:20:11 / cg" |
|
6133 |
! ! |
|
6134 |
||
10628 | 6135 |
!DebugView methodsFor:'private-code view'! |
6136 |
||
6137 |
codeAspect |
|
11704 | 6138 |
^ SyntaxHighlighter codeAspectMethod |
10628 | 6139 |
|
6140 |
"Created: / 27-07-2011 / 13:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11704 | 6141 |
"Modified: / 27-07-2012 / 22:20:27 / cg" |
10628 | 6142 |
! ! |
6143 |
||
7823 | 6144 |
!DebugView methodsFor:'private-context handling'! |
6145 |
||
11391 | 6146 |
contextListEntryFor:aContext |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6147 |
^ Error |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6148 |
handle:[:ex | '???' ] |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6149 |
do:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6150 |
|s| |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6151 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6152 |
aContext selector == #doIt ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6153 |
aContext receiver isNil ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6154 |
s := 'doIt' allBold |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6155 |
] |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6156 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6157 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6158 |
s := Text streamContents:[:s | aContext printOn:s ]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6159 |
RememberedCallChain notNil ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6160 |
(RememberedCallChain includesIdentical:aContext) ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6161 |
s := s colorizeAllWith:(Color red). |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6162 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6163 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6164 |
s |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6165 |
]. |
11391 | 6166 |
|
6167 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
6168 |
! |
|
6169 |
||
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6170 |
is:aHomeContext inCallingChainOf:aContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6171 |
|con| |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6172 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6173 |
con := aContext. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6174 |
[con notNil and:[con ~~ aHomeContext]] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6175 |
con := con sender |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6176 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6177 |
^ con notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6178 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6179 |
"Created: / 10-06-2012 / 18:46:29 / cg" |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6180 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6181 |
|
11890 | 6182 |
isEnteredDueToBreakpointOrHalt |
6183 |
"see if we came here due to a step interrupt" |
|
6184 |
||
6185 |
|c cReceiver| |
|
6186 |
||
6187 |
Transcript showCR:'1'. |
|
6188 |
"/ look for a breakpoint-wrapper's context |
|
6189 |
c := thisContext findNextContextWithSelector:#'raiseRequestWith:errorString:in:' or:nil or:nil. |
|
6190 |
c isNil ifTrue:[ |
|
6191 |
Transcript showCR:'2'. |
|
6192 |
^ true. |
|
6193 |
]. |
|
6194 |
Transcript showCR:c. |
|
6195 |
cReceiver := c receiver. |
|
6196 |
^ cReceiver == BreakPointInterrupt |
|
6197 |
! |
|
6198 |
||
6199 |
isHaltToBeIgnored |
|
6200 |
"see if the current halt (if any) is in the ignore-list" |
|
6201 |
||
6202 |
|c cReceiver sender haltingMethod lineNrInHaltingMethod breakpointParameter| |
|
6203 |
||
6204 |
"/ should a halt be ignored ? |
|
6205 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
6206 |
||
6207 |
"/ look for a breakpoint-wrapper's context |
|
6208 |
c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil. |
|
6209 |
c notNil ifTrue:[ |
|
6210 |
((cReceiver := c receiver) isKindOf:NoHandlerError) ifTrue:[ |
|
6211 |
c := c sender findNextContextWithSelector:#doRaise or:nil or:nil. |
|
6212 |
cReceiver := c receiver. |
|
6213 |
]. |
|
6214 |
(cReceiver isKindOf:BreakPointInterrupt) ifFalse:[ |
|
6215 |
c := nil |
|
6216 |
] ifTrue:[ |
|
6217 |
[ |
|
6218 |
sender := c sender. |
|
6219 |
(sender receiver isKindOf:BreakPointInterrupt) |
|
6220 |
or:[ sender receiver == BreakPointInterrupt ] |
|
6221 |
] whileTrue:[ |
|
6222 |
c := sender |
|
6223 |
]. |
|
6224 |
[ (sender := c sender) isBlockContext ] whileTrue:[ |
|
6225 |
c := sender |
|
6226 |
]. |
|
6227 |
sender := nil. "/ avoid keeping a reference to this context |
|
6228 |
]. |
|
6229 |
]. |
|
6230 |
||
6231 |
c isNil ifTrue:[ |
|
6232 |
"/ look for halts or explicit breakpoints |
|
6233 |
c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil. |
|
6234 |
c isNil ifTrue:[ |
|
6235 |
c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil. |
|
6236 |
c isNil ifTrue:[ |
|
6237 |
^ false |
|
6238 |
]. |
|
6239 |
breakpointParameter := c argAt:1. |
|
6240 |
(self class isBreakpointToBeIgnoredForParameter:breakpointParameter modifyEntryCount:true) ifTrue:[ |
|
6241 |
^ true. |
|
6242 |
]. |
|
6243 |
]. |
|
6244 |
]. |
|
6245 |
||
6246 |
c := c sender. |
|
6247 |
"/ a code-breakpoint ? |
|
6248 |
(c receiver isKindOf:Breakpoint) ifTrue:[ |
|
6249 |
c := c sender. |
|
6250 |
]. |
|
6251 |
haltingMethod := c method. |
|
6252 |
||
6253 |
haltingMethod isWrapped ifTrue:[ |
|
6254 |
lineNrInHaltingMethod := 1. |
|
6255 |
] ifFalse:[ |
|
6256 |
lineNrInHaltingMethod := c lineNumber. |
|
6257 |
"/ Transcript showCR:c. |
|
6258 |
]. |
|
6259 |
||
6260 |
^ self |
|
6261 |
isHaltToBeIgnoredIn:haltingMethod |
|
6262 |
atLineNr:lineNrInHaltingMethod |
|
6263 |
modifyEntryCount:true. |
|
6264 |
||
6265 |
"Created: / 22-10-2010 / 12:09:53 / cg" |
|
6266 |
"Modified: / 06-03-2012 / 12:54:09 / cg" |
|
6267 |
! |
|
6268 |
||
6269 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod modifyEntryCount:modifyCount |
|
6270 |
"should a halt be ignored ?" |
|
6271 |
||
6272 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
6273 |
||
6274 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
|
6275 |
IgnoredHalts do:[:ign | |
|
6276 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
|
6277 |
Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString. |
|
6278 |
Transcript show:' ('; show:ign; showCR:')'. |
|
6279 |
||
6280 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
|
6281 |
ign isHaltIgnored ifFalse:[ |
|
6282 |
Transcript showCR:'Debugger [info]: no longer ignore halt in ', haltingMethod whoString. |
|
6283 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
6284 |
]. |
|
6285 |
^ true. |
|
6286 |
]. |
|
6287 |
]. |
|
6288 |
||
6289 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not]. |
|
6290 |
IgnoredHalts isEmpty ifTrue:[ |
|
6291 |
IgnoredHalts := nil. |
|
6292 |
]. |
|
6293 |
||
6294 |
^ false. |
|
6295 |
||
6296 |
"Modified (comment): / 06-03-2012 / 12:51:43 / cg" |
|
6297 |
! |
|
6298 |
||
266 | 6299 |
setContext:aContext |
6300 |
"show calling chain from aContext in the walk-back listview" |
|
6301 |
||
641 | 6302 |
^ 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
|
6303 |
|
641 | 6304 |
"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
|
6305 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6306 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6307 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
6308 |
"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
|
6309 |
Most complications here arise from filtering less-interesting contexts |
11573 | 6310 |
if not in verbose-context mode or when hiding implementation contexts." |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6311 |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6312 |
|con text method caller caller2 called called2 m count c cc sndr |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6313 |
suspendContext calledBySuspendContext nm h calledContext show2| |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6314 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6315 |
"/ (contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6316 |
"/ "no change" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6317 |
"/ ^ false |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6318 |
"/ ]. |
266 | 6319 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6320 |
isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := false. |
939 | 6321 |
firstContext := aContext. |
6322 |
||
266 | 6323 |
m := contextView middleButtonMenu. |
6324 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6325 |
m disable:#showMore. |
266 | 6326 |
]. |
3269 | 6327 |
canShowMore := false. |
266 | 6328 |
|
6329 |
aContext isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6330 |
text := Array with:'** no context **'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6331 |
contextArray := nil. |
266 | 6332 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6333 |
text := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6334 |
contextArray := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6335 |
con := aContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6336 |
calledContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6337 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6338 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6339 |
"/ with dense backtrace, hide the ProcessorScheduler |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6340 |
"/ contexts at the top; look for a Process>>suspend* |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6341 |
"/ context within the first 10 contexts |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6342 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6343 |
suspendContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6344 |
c := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6345 |
1 to:10 do:[:i | |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6346 |
|sel| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6347 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6348 |
c notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6349 |
(sel := c selector) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6350 |
((sel isSymbol and:[sel startsWith:'suspend']) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6351 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6352 |
suspendContext := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6353 |
calledBySuspendContext := cc. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6354 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6355 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6356 |
cc := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6357 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6358 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6359 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6360 |
suspendContext notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6361 |
con := suspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6362 |
calledContext := calledBySuspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6363 |
suspendContext := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6364 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6365 |
]. |
12039 | 6366 |
"/ Transcript show:'1 '; showCR:con. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6367 |
con notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6368 |
"/ hide the halt implementation |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6369 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6370 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6371 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6372 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6373 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6374 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6375 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6376 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6377 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6378 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6379 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6380 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6381 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6382 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6383 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6384 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6385 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6386 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6387 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6388 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6389 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6390 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6391 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6392 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6393 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6394 |
get them all |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6395 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6396 |
count := 0. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6397 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6398 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6399 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6400 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6401 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6402 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6403 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6404 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6405 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6406 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6407 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6408 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6409 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6410 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6411 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6412 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6413 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6414 |
[ |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6415 |
|show1| |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6416 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6417 |
show1 := self showingContext1:con calling:calledContext. |
11636 | 6418 |
DebuggingDebugger3 == true ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6419 |
'showingContext1: (' print. con print. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6420 |
') --> ' print. show1 printCR. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6421 |
]. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6422 |
show1 |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6423 |
] whileFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6424 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6425 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6426 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6427 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6428 |
show2 := self showingContext2:con nesting:count. |
11636 | 6429 |
DebuggingDebugger3 == true ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6430 |
'showingContext2: (' print. con print. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6431 |
') --> ' print. show2 printCR. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6432 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6433 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6434 |
show2 ifTrue:[ |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6435 |
(self showingContext3:con nesting:count) ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6436 |
"/ ignore it, if its in the same |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6437 |
"/ method as the previous context |
3447 | 6438 |
"/ (verboseBacktrace ~~ true |
10205 | 6439 |
"/ and:[count > 0 |
3447 | 6440 |
"/ and:[contextArray last method == con method |
10205 | 6441 |
"/ and:[(contextArray last isBlockContext not |
3447 | 6442 |
"/ & con isBlockContext not) not ]]]) ifTrue:[ |
6443 |
"/ "/ skip it, if its in the same method |
|
6444 |
"/ "/ as the called context. |
|
6445 |
"/ ] ifFalse:[ |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6446 |
contextArray add:con. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6447 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6448 |
(MoreDebuggingDetail == true) ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6449 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6450 |
] ifFalse:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6451 |
nm := self contextListEntryFor:con. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6452 |
]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6453 |
text add:nm. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6454 |
count := count + 1. |
3447 | 6455 |
"/ ]. |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6456 |
] |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6457 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6458 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6459 |
"/ with hidden support code, skip over internals of exceptions |
11573 | 6460 |
hideSupportCode == true ifTrue:[ |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6461 |
(con isBlockContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6462 |
and:[ (h := con home) notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6463 |
and:[ (self is:h inCallingChainOf:con) ]]) ifTrue:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6464 |
|blocksReceiver| |
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6465 |
blocksReceiver := con receiver. |
11573 | 6466 |
c := con sender. |
6467 |
[ |
|
6468 |
c notNil |
|
6469 |
and:[ |
|
6470 |
sndr := c sender. |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6471 |
(sndr ~= h) |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6472 |
and:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6473 |
blocksReceiver isCollection "/ skip collection implementations |
11573 | 6474 |
or:[ ( #( #'handle:do:' "/ skip exception implementations |
6475 |
#'handleDo:' |
|
6476 |
#'answer:do:' |
|
6477 |
#'ensure:' ) includes: c selector ) |
|
6478 |
or:[ #'perform:*' "/ skip perform implementations |
|
6479 |
match: c selector ]] |
|
6480 |
] |
|
6481 |
] |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6482 |
] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6483 |
c := sndr |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6484 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6485 |
c notNil ifTrue:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6486 |
con := c "sender". |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6487 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6488 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6489 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6490 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6491 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6492 |
"/ kludge: if its a wrapped method, then hide the wrap-call |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6493 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6494 |
method := con method. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6495 |
method notNil ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6496 |
called := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6497 |
caller := con sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6498 |
(caller notNil and:[caller receiver == method]) ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6499 |
called2 := caller. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6500 |
caller2 := caller sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6501 |
caller2 notNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6502 |
(caller2 method isWrapped |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6503 |
and:[ caller2 method originalMethod == method ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6504 |
calledContext := called2. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6505 |
con := caller2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6506 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6507 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6508 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6509 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6510 |
caller := caller2 := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6511 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6512 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6513 |
"/ with dense backtrace, skip the doIt methods context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6514 |
"/ (its dummy anyway) and fake that contexts name |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6515 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6516 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6517 |
(con isBlockContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6518 |
and:[(h := con home) == con sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6519 |
and:[h notNil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6520 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6521 |
and:[h method who isNil]]]]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6522 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6523 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6524 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6525 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6526 |
text add:(self contextListEntryFor:con methodHome). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6527 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6528 |
h := nil. "/ never keep refs to contexts unless you really need them ... |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6529 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6530 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6531 |
"/ with dense backtrace, dont show below the doIt |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6532 |
( verboseBacktrace ~~ true |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6533 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6534 |
con := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6535 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6536 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6537 |
con := con sender |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6538 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6539 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6540 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6541 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6542 |
did we reach the end ? |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6543 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6544 |
(con isNil or:[con sender isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6545 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6546 |
"/ the very last one is the startup context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6547 |
"/ (in main) - it has nil as receiver and nil as selector |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6548 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6549 |
(contextArray notEmpty |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6550 |
and:[contextArray last selector isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6551 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6552 |
text removeLast |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6553 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6554 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6555 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6556 |
"/ in dense mode, remove the process startup |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6557 |
"/ contexts (if any) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6558 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6559 |
(contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6560 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6561 |
con selector == #start ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6562 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6563 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6564 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6565 |
[contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6566 |
and:[contextArray last methodHome == con]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6567 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6568 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6569 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6570 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6571 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6572 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6573 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6574 |
m notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6575 |
m enable:#showMore. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6576 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6577 |
canShowMore := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6578 |
text add:(resources string:'*** more walkback follows - click here to see them ***') |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6579 |
]. |
266 | 6580 |
]. |
6581 |
||
6582 |
contextView setList:text. |
|
944 | 6583 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6584 |
releaseInspectors ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6585 |
receiverInspector release. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6586 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6587 |
]. |
266 | 6588 |
|
6589 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6590 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 6591 |
]. |
3511 | 6592 |
self updateMenuItems. |
266 | 6593 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6594 |
|
7797 | 6595 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6596 |
"Modified: / 27-07-2012 / 15:10:53 / cg" |
266 | 6597 |
! |
6598 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6599 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6600 |
"show calling chain from aContext in the walk-back listview. |
1213 | 6601 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6602 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6603 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6604 |
|
8152 | 6605 |
con := aContext. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6606 |
verboseBacktrace ifFalse:[ |
11210 | 6607 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
6608 |
con := con sender. |
|
6609 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
|
6610 |
con := con sender. |
|
6611 |
]. |
|
6612 |
]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6613 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6614 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6615 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6616 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6617 |
"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
|
6618 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6619 |
|
3447 | 6620 |
showingContext1:aContext calling:calledContext |
7823 | 6621 |
"return false, if this (top) context is to be skipped. |
10205 | 6622 |
Here, we hide some well known methods, which are usually not too interesting; |
7823 | 6623 |
the set of methods which are suppressed is my (claus's) own choice." |
6624 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6625 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 6626 |
|
6627 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
6628 |
aContext isNil ifTrue:[ ^true ]. |
|
6629 |
||
6630 |
sel := aContext selector. |
|
6631 |
rec := aContext receiver. |
|
6632 |
mthd := aContext method. |
|
6633 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
6634 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6635 |
"/ to avoid firing/waiting the lazy or future |
10205 | 6636 |
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
|
6637 |
aContext sender notNil ifTrue:[ |
11210 | 6638 |
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
|
6639 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6640 |
|
11636 | 6641 |
DebuggingDebugger3 == true ifTrue:[ |
11210 | 6642 |
'showingContext1: (' print. aContext print. |
6643 |
') calling: (' print. calledContext print. |
|
6644 |
')' printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6645 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6646 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6647 |
(#(doCallHandler: doRaise |
3447 | 6648 |
) includes:sel) |
11210 | 6649 |
ifTrue:[ |
6650 |
recIsException ifTrue:[ ^ false]. |
|
6651 |
]. |
|
3447 | 6652 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6653 |
(#(raise raiseRequest |
3447 | 6654 |
) includes:sel) |
11210 | 6655 |
ifTrue:[ |
6656 |
recIsException ifTrue:[ |
|
6657 |
(senderRec isLazyValue not |
|
6658 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
|
6659 |
]. |
|
6660 |
]. |
|
3447 | 6661 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6662 |
(#(doWhile: |
3447 | 6663 |
) includes:sel) |
11210 | 6664 |
ifTrue:[ |
6665 |
rec isBlock ifTrue:[ |
|
6666 |
true "aContext sender isBlockContext" ifTrue:[^ false]. |
|
6667 |
]. |
|
6668 |
]. |
|
3447 | 6669 |
|
8620 | 6670 |
calledContext notNil ifTrue:[ |
11210 | 6671 |
calledSel := calledContext selector. |
6672 |
calledRec := calledContext receiver. |
|
6673 |
||
6674 |
calledRec isBlock ifTrue:[ |
|
6675 |
(calledSel == #ensure:) ifTrue:[^ false]. |
|
6676 |
(calledSel == #ifCurtailed:) ifTrue:[^ false]. |
|
6677 |
]. |
|
6678 |
(calledSel == #handle:do:) ifTrue:[^ false]. |
|
6679 |
(calledSel == #answer:do:) ifTrue:[^ false]. |
|
8620 | 6680 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6681 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6682 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6683 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6684 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6685 |
"/ |
10205 | 6686 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6687 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6688 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6689 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6690 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6691 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6692 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6693 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6694 |
"/ ]. |
8620 | 6695 |
]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6696 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6697 |
(#(handleDo:) includes:sel) |
11210 | 6698 |
ifTrue:[ |
6699 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
|
6700 |
]. |
|
10205 | 6701 |
(#( |
11210 | 6702 |
withCursor:do: |
6703 |
withWaitCursorDo: |
|
11696 | 6704 |
withReadCursorDo: |
6705 |
withWriteCursorDo: |
|
6706 |
withSearchCursorDo: |
|
3447 | 6707 |
) includes:sel) |
11210 | 6708 |
ifTrue:[ |
6709 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
6710 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
6711 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
6712 |
]. |
|
10205 | 6713 |
|
6714 |
(#( |
|
11210 | 6715 |
wait |
6716 |
waitWithTimeout: |
|
6717 |
waitWithTimeoutMs: |
|
3447 | 6718 |
) includes:sel) |
11210 | 6719 |
ifTrue:[ |
6720 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
6721 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
6722 |
]. |
|
3447 | 6723 |
|
6724 |
^ true |
|
6725 |
||
9662 | 6726 |
"Created: / 17-11-2001 / 22:24:06 / cg" |
11696 | 6727 |
"Modified: / 27-07-2012 / 17:30:18 / cg" |
3447 | 6728 |
! |
6729 |
||
6730 |
showingContext2:aContext nesting:nesting |
|
7823 | 6731 |
"return false, if this (intermediate) context is to be skipped. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6732 |
Here, we hide some well known methods, which are usually |
10205 | 6733 |
not too interesting; |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6734 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 6735 |
|
10205 | 6736 |
|sel rec mClass |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6737 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6738 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6739 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 6740 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6741 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6742 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6743 |
sel := aContext selector. |
939 | 6744 |
mClass := aContext methodClass. |
6745 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6746 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6747 |
sender notNil ifTrue:[ |
11210 | 6748 |
senderSelector := sender selector. |
6749 |
senderReceiver := sender receiver. |
|
6750 |
senderReceiverClass := senderReceiver class. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6751 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6752 |
|
939 | 6753 |
sel == #withCursor:do: ifTrue:[ |
11210 | 6754 |
(mClass == WindowGroup) ifTrue:[^ false]. |
6755 |
(mClass == TopView) ifTrue:[^ false]. |
|
939 | 6756 |
]. |
6757 |
(sel == #withExecuteCursorDo: |
|
6758 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
11210 | 6759 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 6760 |
]. |
6761 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
6762 |
(sel == #do: |
6600 | 6763 |
or:[sel == #from:to:do: |
6601 | 6764 |
or:[sel == #keysAndValuesDo: |
6765 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
11210 | 6766 |
mClass == Array ifTrue:[^ false]. |
6767 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
6768 |
mClass == Set ifTrue:[^ false]. |
|
6769 |
mClass == Dictionary ifTrue:[^ false]. |
|
6770 |
mClass == Interval ifTrue:[^ false]. |
|
10205 | 6771 |
]. |
6772 |
(sel == #perform: |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6773 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6774 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6775 |
or:[sel == #perform:with:with:with: |
11696 | 6776 |
or:[sel == #perform:with:with:with:with: |
6777 |
or:[sel == #perform:withArguments: |
|
6778 |
or:[sel == #perform:with:ifNotUnderstood: |
|
6779 |
or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]) |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6780 |
ifTrue:[ |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6781 |
hideSupportCode == true ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6782 |
'x' printCR. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6783 |
mClass == Object ifTrue:[^ false] |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6784 |
]. |
11210 | 6785 |
nesting == 0 ifTrue:[^ true]. |
6786 |
mClass == Array ifTrue:[^ false]. |
|
6787 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6788 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6789 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6790 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6791 |
|
939 | 6792 |
(mClass == Object) ifTrue:[ |
11210 | 6793 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 6794 |
]. |
6795 |
||
6796 |
(mClass == Method) ifTrue:[ |
|
11210 | 6797 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 6798 |
]. |
6799 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6800 |
(mClass == SmallInteger) ifTrue:[ |
11210 | 6801 |
(sel == #to:do:) ifTrue:[^ false]. |
6802 |
(sel == #to:by:do:) ifTrue:[^ false]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6803 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6804 |
|
939 | 6805 |
(mClass == Block) ifTrue:[ |
11210 | 6806 |
sel == #ensure: ifTrue:[^ false]. |
6807 |
sel == #ifCurtailed: ifTrue:[^ false]. |
|
6808 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
|
6809 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
|
6810 |
sel == #on:do: ifTrue:[^ false]. |
|
6811 |
||
6812 |
sel == #value ifTrue:[^ false]. |
|
6813 |
sel == #value: ifTrue:[^ false]. |
|
6814 |
sel == #value:value: ifTrue:[^ false]. |
|
6815 |
sel == #value:value:value: ifTrue:[^ false]. |
|
6816 |
sel == #value:value:value:value: ifTrue:[^ false]. |
|
6817 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
|
6818 |
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
|
6819 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6820 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6821 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6822 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6823 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6824 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6825 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6826 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6827 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6828 |
"/ 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
|
6829 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6830 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6831 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6832 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6833 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6834 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6835 |
|
11210 | 6836 |
aContext home notNil ifTrue:[ |
6837 |
aContext home receiver isLazyValue ifFalse:[ |
|
6838 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
|
6839 |
(aContext home selector == #wait) ifTrue:[^ false]. |
|
6840 |
(aContext home selector == #waitWithTimeoutMs:) ifTrue:[^ false]. |
|
6841 |
] |
|
6842 |
] |
|
6843 |
] |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6844 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6845 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6846 |
(rec isExceptionHandler) ifTrue:[ |
11210 | 6847 |
sel == #handle:do: ifTrue:[^ false]. |
6848 |
sel == #handleDo: ifTrue:[^ false]. |
|
6849 |
(sel startsWith:#raise) ifTrue:[^ false]. |
|
6850 |
sel == #answer:do: ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6851 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6852 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
11210 | 6853 |
sel == #doRaise ifTrue:[^ false]. |
6854 |
sel == #doCallHandler: ifTrue:[^ false]. |
|
6855 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
|
6856 |
senderReceiverClass == Signal ifTrue:[^ false]. |
|
6857 |
] |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6858 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6859 |
(mClass == Context) ifTrue:[ |
11210 | 6860 |
sel == #unwind ifTrue:[^ false]. |
6861 |
sel == #unwind: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6862 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6863 |
(mClass == ProcessorScheduler) ifTrue:[ |
11210 | 6864 |
sel == #interruptActive ifTrue:[^ false]. |
6865 |
sel == #threadSwitch: ifTrue:[^ false]. |
|
6866 |
sel == #suspend: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6867 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6868 |
mClass == Process ifTrue:[ |
11210 | 6869 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6870 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6871 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6872 |
|
9662 | 6873 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
11696 | 6874 |
"Modified: / 27-07-2012 / 17:26:54 / cg" |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6875 |
! |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6876 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6877 |
showingContext3:aContext nesting:nesting |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6878 |
"return false, if this (intermediate) context is to be skipped. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6879 |
Here, we hide some well known methods, which are usually |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6880 |
not too interesting; |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6881 |
the set of methods which are suppressed is my (claus's) own choice." |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6882 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6883 |
|sel rec mClass |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6884 |
sender senderReceiver senderSelector senderReceiverClass| |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6885 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6886 |
hideSupportCode ifFalse:[^ true]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6887 |
aContext isNil ifTrue:[^ true]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6888 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6889 |
rec := aContext receiver. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6890 |
sel := aContext selector. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6891 |
mClass := aContext methodClass. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6892 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6893 |
sender := aContext sender. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6894 |
sender notNil ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6895 |
senderSelector := sender selector. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6896 |
senderReceiver := sender receiver. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6897 |
senderReceiverClass := senderReceiver class. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6898 |
]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6899 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6900 |
(sel == #perform: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6901 |
or:[sel == #perform:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6902 |
or:[sel == #perform:with:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6903 |
or:[sel == #perform:with:with:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6904 |
or:[sel == #perform:with:with:with:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6905 |
or:[sel == #perform:withArguments: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6906 |
or:[sel == #perform:with:ifNotUnderstood: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6907 |
or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]) |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6908 |
ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6909 |
mClass == Object ifTrue:[^ false] |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6910 |
]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6911 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6912 |
^ true. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6913 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6914 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6915 |
"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
|
6916 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
6917 |
|
4859 | 6918 |
!DebugView methodsFor:'private-control loop'! |
266 | 6919 |
|
6920 |
controlLoop |
|
6921 |
"this is a kludge: |
|
11210 | 6922 |
start a dispatchloop which exits when |
6923 |
either continue, return or step is pressed |
|
266 | 6924 |
" |
6925 |
||
6926 |
haveControl := true. |
|
664 | 6927 |
[ |
11210 | 6928 |
[haveControl] whileTrue:[ |
6929 |
self controlLoopCatchingErrors |
|
6930 |
]. |
|
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
6931 |
] ensure:[ |
11210 | 6932 |
catchBlock := nil. |
6933 |
haveControl := false |
|
266 | 6934 |
]. |
664 | 6935 |
|
6936 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 6937 |
! |
6938 |
||
6939 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6940 |
"this is the debuggers own private event handling loop; |
1187 | 6941 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6942 |
|
266 | 6943 |
"setup a self removing catch-block" |
6944 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
6945 |
||
6946 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
11210 | 6947 |
"if we do not have multiple processes or its a system process |
6948 |
we start another dispatch loop, which exits when |
|
6949 |
either continue, return or step is pressed |
|
6950 |
or (via the catchBlock) if an error occurs. |
|
6951 |
Since our display is an extra exclusive one, |
|
6952 |
all processing for normal views stops here ... |
|
6953 |
" |
|
6954 |
||
6955 |
WindowGroup setActiveGroup:windowGroup. |
|
6956 |
SignalSet anySignal handle:[:ex | |
|
6957 |
|signal| |
|
6958 |
||
6959 |
signal := ex signal. |
|
11890 | 6960 |
(UserNotification accepts:signal) ifTrue:[ |
6961 |
Transcript showCR:'UserNotification'. |
|
6962 |
(signal ~~ ActivityNotificationSignal) ifTrue:[ |
|
6963 |
self showError:ex description. |
|
6964 |
]. |
|
6965 |
ex proceed. |
|
6966 |
]. |
|
6967 |
(HaltInterrupt accepts:signal) ifTrue:[ |
|
6968 |
Transcript showCR:'HaltInterrupt'. |
|
6969 |
Transcript showCR:'Halt/Break in debugger ignored'. |
|
6970 |
ex proceed. |
|
6971 |
]. |
|
11210 | 6972 |
|
6973 |
self showError:'*** Error in modal debugger: |
|
266 | 6974 |
|
334 | 6975 |
>>>> Signal: ' , signal printString , ' |
266 | 6976 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 6977 |
>>>> From: ' , ex suspendedContext sender printString , ' |
6978 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
6979 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
6980 |
>>>> : ' , 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
|
6981 |
>>>> : ' , 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
|
6982 |
>>>> : ' , 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
|
6983 |
>>>> : ' , 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
|
6984 |
>>>> : ' , 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
|
6985 |
>>>> : ' , 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
|
6986 |
>>>> : ' , 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
|
6987 |
>>>> : ' , 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
|
6988 |
>>>> : ' , 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
|
6989 |
>>>> : ' , 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
|
6990 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 6991 |
>>>> Message: ' , ex description , ' |
266 | 6992 |
|
1187 | 6993 |
caught & ignored.'. |
11210 | 6994 |
ex return. |
6995 |
] do:[ |
|
11890 | 6996 |
"/ UserNotification handle:[:ex | |
6997 |
"/ (ex signal == ActivityNotificationSignal) ifTrue:[ |
|
6998 |
"/ ex proceed |
|
6999 |
"/ ]. |
|
7000 |
"/ self showError:ex description. |
|
7001 |
"/ ex proceed. |
|
7002 |
"/ ] do:[ |
|
7003 |
device |
|
7004 |
dispatchModalWhile:[ |
|
7005 |
Processor activeProcess state:#debug. |
|
7006 |
haveControl]. |
|
7007 |
"/ ] |
|
11210 | 7008 |
]. |
7009 |
WindowGroup setActiveGroup:nil. |
|
266 | 7010 |
] ifFalse:[ |
11210 | 7011 |
"we do have multiple processes - |
7012 |
simply enter the DebugViews-Windowgroup event loop. |
|
7013 |
effectively suspending event processing for the currently |
|
7014 |
active group. |
|
7015 |
" |
|
7016 |
SignalSet anySignal handle:[:ex | |
|
7017 |
|answer signal eMsg| |
|
7018 |
||
7019 |
signal := ex signal. |
|
7020 |
||
7021 |
DebuggingDebugger ~~ true ifTrue:[ |
|
7022 |
(signal == ActivityNotification) ifTrue:[ |
|
7023 |
ex proceed |
|
7024 |
]. |
|
7025 |
"/ |
|
7026 |
"/ ignore exceptions which say they explicitly have to be ignored |
|
7027 |
"/ |
|
7028 |
ex catchInDebugger ifTrue:[ |
|
12333 | 7029 |
'DebugView [info]: ',signal printString,'-signal in debugger caught for close' infoPrintCR. |
11210 | 7030 |
self destroy. |
7031 |
ex reject |
|
7032 |
]. |
|
7033 |
||
7034 |
"/ |
|
7035 |
"/ ignore recursive breakpoints |
|
7036 |
"/ |
|
7037 |
(signal isControlInterrupt) ifTrue:[ |
|
7038 |
ignoreBreakpoints == true ifTrue:[ |
|
7039 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
|
7040 |
('DebugView [info]: ',ex suspendedContext printString) infoPrintCR. |
|
7041 |
ex proceed |
|
7042 |
]. |
|
7043 |
]. |
|
7044 |
(signal == TerminateProcessRequest) ifTrue:[ |
|
7045 |
"/ mhm - someone wants to shoot me down while debugging ... |
|
7046 |
answer := Dialog |
|
7047 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
|
7048 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
7049 |
values:#( #proceed #close ) |
|
7050 |
default:#close. |
|
7051 |
answer == #close ifTrue:[ |
|
7052 |
self destroy. |
|
7053 |
ex reject |
|
7054 |
]. |
|
7055 |
ex return. |
|
7056 |
]. |
|
7057 |
signal == RecursiveExceptionError ifTrue:[ |
|
7058 |
(ex parameter signal == BreakPointInterrupt) |
|
7059 |
ifTrue:[ |
|
7060 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
|
7061 |
ex proceed. |
|
7062 |
]. |
|
7063 |
||
7064 |
self showError:'*** Recursive error in debugger: |
|
266 | 7065 |
|
7066 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 7067 |
>>>> ' , ex parameter signal printString , ' |
266 | 7068 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 7069 |
>>>> From: ' , ex suspendedContext sender printString , ' |
7070 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
7071 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
7072 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 7073 |
>>>> Message: ' , ex description , ' |
266 | 7074 |
|
1187 | 7075 |
caught & ignored.'. |
11210 | 7076 |
ex return |
7077 |
]. |
|
7078 |
]. |
|
7079 |
||
7080 |
self topView raiseDeiconified. |
|
7081 |
||
7082 |
eMsg := ex description. |
|
7083 |
(ex signal isControlInterrupt) ifTrue:[ |
|
7084 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
|
7085 |
]. |
|
7086 |
Dialog aboutToOpenBoxNotificationSignal |
|
7087 |
handle:[:ex | ex proceed ] |
|
7088 |
do:[ |
|
7089 |
answer := Dialog |
|
7090 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
|
7091 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
7092 |
values:#( #proceed #cancel #debug ) |
|
7093 |
default:#cancel. |
|
7094 |
]. |
|
7095 |
answer == #debug ifTrue:[ |
|
12333 | 7096 |
'DebugView [info]: caught exception - debugging' infoPrintCR. |
11210 | 7097 |
Debugger |
7098 |
enterUnconditional:(ex suspendedContext) |
|
7099 |
withMessage:'Error in debugger: ' , eMsg |
|
7100 |
mayProceed:true. |
|
7101 |
ex proceed. |
|
7102 |
]. |
|
7103 |
answer == #proceed ifTrue:[ |
|
7104 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
|
7105 |
ex proceed. |
|
7106 |
]. |
|
12333 | 7107 |
'DebugView [info]: caught exception - returning' infoPrintCR. |
11210 | 7108 |
ex return. |
7109 |
] do:[ |
|
7110 |
"/ make certain that sub-debuggers, inspectors etc. |
|
7111 |
"/ come up on my device. |
|
7112 |
Screen currentScreenQuerySignal answer:device |
|
7113 |
do:[ |
|
7114 |
windowGroup |
|
7115 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
7116 |
true] |
|
7117 |
onLeave:[] |
|
7118 |
] |
|
7119 |
]. |
|
266 | 7120 |
]. |
7121 |
catchBlock := nil. |
|
7122 |
||
11818 | 7123 |
"Created: / 24-11-1995 / 20:33:45 / cg" |
7124 |
"Modified: / 26-09-2012 / 15:03:39 / cg" |
|
266 | 7125 |
! ! |
7126 |
||
0 | 7127 |
!DebugView methodsFor:'user interaction'! |
7128 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7129 |
checkIfCodeIsReallyModified |
6616 | 7130 |
|source| |
7131 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7132 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7133 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7134 |
currentMethod isNil ifTrue:[ |
11210 | 7135 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7136 |
]. |
6616 | 7137 |
source := currentMethod source. |
7138 |
source notNil ifTrue:[ |
|
11210 | 7139 |
source string = codeView contents string ifTrue:[ |
7140 |
^ false |
|
7141 |
]. |
|
7142 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
7143 |
^ false |
|
7144 |
]. |
|
6616 | 7145 |
]. |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7146 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7147 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7148 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7149 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7150 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7151 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7152 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7153 |
checkSelectionChangeAllowed:newSelection |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7154 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7155 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7156 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7157 |
and:[newSelection = contextView selection]) ifTrue:[ |
11210 | 7158 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7159 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7160 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7161 |
(self confirm:('Code modified - change selection anyway ?')) ifFalse:[ |
11210 | 7162 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7163 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7164 |
codeView modified:false. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7165 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7166 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7167 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7168 |
|
266 | 7169 |
codeAccept:someCode |
7170 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
7171 |
and including selected method cannot be continued." |
|
7172 |
||
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7173 |
^ self codeAccept:someCode unwind:false "true" category:nil onCancel:nil |
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7174 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7175 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 7176 |
! |
7177 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7178 |
codeAccept:someCode inClass:aClass unwind:doUnwind category:category onCancel:cancelAction |
3427 | 7179 |
"user wants some code to be recompiled - must unwind stack since everything above |
7180 |
and including selected method cannot be continued." |
|
7181 |
||
7182 |
" |
|
7183 |
actually, this is not true, since the active methods will still be |
|
7184 |
executed correctly - however, the code shown in the debugger is no |
|
7185 |
longer in sync (showing the new code) with the executed code. |
|
7186 |
Therefore, we hide those contexts to avoid confusion .... |
|
7187 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
7188 |
||
7189 |
"walk up context chain and find highest context which is either the selected context, |
|
7190 |
or - if its a block-context - whose home is the selected context" |
|
7191 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7192 |
|con top newMethod| |
3427 | 7193 |
|
7194 |
codeView withWaitCursorDo:[ |
|
11210 | 7195 |
" |
7196 |
find the method-home context for this one |
|
7197 |
" |
|
7198 |
doUnwind ifTrue:[ |
|
7199 |
con := selectedContext. |
|
7200 |
top := con. |
|
7201 |
[con notNil] whileTrue:[ |
|
7202 |
(con methodHome == selectedContext) ifTrue:[ |
|
7203 |
top := con |
|
7204 |
]. |
|
7205 |
con := con sender |
|
7206 |
]. |
|
7207 |
]. |
|
7208 |
||
7209 |
"/ |
|
7210 |
"/ provide the classes nameSpace on a query; |
|
7211 |
"/ in case we accept while in another nameSpace context, |
|
7212 |
"/ (but for a class which is somewhere else) |
|
7213 |
"/ |
|
7214 |
(Class updateChangeFileQuerySignal, |
|
7215 |
Class updateChangeListQuerySignal, |
|
7216 |
Class updateHistoryLineQuerySignal) answer:true |
|
7217 |
do:[ |
|
7218 |
Class nameSpaceQuerySignal |
|
7219 |
answer:(aClass nameSpace) |
|
7220 |
do:[ |
|
7221 |
Class packageQuerySignal |
|
7222 |
answer:(aClass package ? PackageId noProjectID) |
|
7223 |
do:[ |
|
7224 |
codeView contents:someCode. |
|
7225 |
newMethod := aClass compilerClass |
|
7226 |
compile:someCode |
|
7227 |
forClass:aClass |
|
7228 |
inCategory:category |
|
7229 |
notifying:codeView. |
|
7230 |
]. |
|
7231 |
]. |
|
7232 |
]. |
|
7233 |
||
7234 |
inspecting ifFalse:[ |
|
7235 |
" |
|
7236 |
if it worked, remove everything up to and including top |
|
7237 |
from context chain |
|
7238 |
" |
|
7239 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
7240 |
codeView modified:false. |
|
7241 |
||
7242 |
doUnwind ifTrue:[ |
|
7243 |
selectedContext canReturn ifTrue:[ |
|
7244 |
self setContext:(top "sender"). |
|
7245 |
exitAction := #restart. |
|
7246 |
selectedContext setLineNumber:1. |
|
7247 |
self doRestart. |
|
7248 |
] ifFalse:[ |
|
7249 |
self setContext:(top sender). |
|
7250 |
exitAction := #return. |
|
7251 |
]. |
|
7252 |
||
7253 |
" |
|
7254 |
continue/step is no longer possible |
|
7255 |
" |
|
7256 |
"/ continueButton disable. |
|
7257 |
"/ canContinue := false. |
|
7258 |
]. |
|
7259 |
||
7260 |
contextView selection:1. |
|
7261 |
"/ self showSelection:1. |
|
7262 |
"/ contextView makeSelectionVisible. "/ scrollToLine:(selection - 1) |
|
7263 |
] ifFalse:[ |
|
7264 |
^ cancelAction value |
|
7265 |
] |
|
7266 |
]. |
|
3427 | 7267 |
]. |
7268 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
7269 |
"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
|
7270 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
3427 | 7271 |
! |
7272 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7273 |
codeAccept:someCode unwind:doUnwind category:givenCategoryOrNil onCancel:cancelAction |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7274 |
"user wants some code to be recompiled - must unwind stack since everything above |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7275 |
and including selected method cannot be continued." |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7276 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7277 |
" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7278 |
actually, this is not true, since the active methods will still be |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7279 |
executed correctly - however, the code shown in the debugger is no |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7280 |
longer in sync (showing the new code) with the executed code. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7281 |
Therefore, we hide those contexts to avoid confusion .... |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7282 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7283 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7284 |
"walk up context chain and find highest context which is either the selected context, |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7285 |
or - if its a block-context - whose home is the selected context" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7286 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7287 |
|sel implementorClass method category| |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7288 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7289 |
codeView withWaitCursorDo:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7290 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7291 |
"/ 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
|
7292 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7293 |
"/ con := selectedContext. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7294 |
"/ top := con. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7295 |
"/ [con notNil] whileTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7296 |
"/ (con methodHome == selectedContext) ifTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7297 |
"/ top := con |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7298 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7299 |
"/ con := con sender |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7300 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7301 |
|
10628 | 7302 |
" |
7303 |
use class&selector to find the method for the compilation |
|
7304 |
and compile. |
|
7305 |
" |
|
7306 |
category := givenCategoryOrNil. |
|
7307 |
sel := selectedContext selector. |
|
7308 |
implementorClass := selectedContext methodClass. |
|
11898 | 7309 |
implementorClass isNil ifTrue:[ |
7310 |
method := selectedContext method. |
|
11943
10e162265c0e
changed: #codeAccept:unwind:category:onCancel:
Claus Gittinger <cg@exept.de>
parents:
11912
diff
changeset
|
7311 |
(method notNil and:[method mclass isNil]) ifTrue:[ |
11898 | 7312 |
method := method wrapper. |
7313 |
]. |
|
7314 |
method notNil ifTrue:[ |
|
7315 |
implementorClass := method mclass |
|
7316 |
]. |
|
7317 |
] ifFalse:[ |
|
7318 |
method := selectedContext method. |
|
7319 |
]. |
|
10628 | 7320 |
implementorClass notNil ifTrue:[ |
7321 |
category isNil ifTrue:[ |
|
7322 |
method isNil ifTrue:[ |
|
7323 |
method := implementorClass compiledMethodAt:sel. |
|
7324 |
]. |
|
7325 |
category := method category |
|
7326 |
] |
|
7327 |
] ifFalse:[ |
|
7328 |
implementorClass := selectedContext receiver class. |
|
7329 |
implementorClass ~~ Object ifTrue:[ |
|
7330 |
implementorClass := Dialog |
|
7331 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
|
7332 |
initialAnswer:implementorClass name |
|
7333 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
7334 |
implementorClass size == 0 ifTrue:[ |
|
7335 |
^ cancelAction value "/ cancelled |
|
7336 |
]. |
|
7337 |
implementorClass := Smalltalk classNamed:implementorClass. |
|
7338 |
implementorClass isNil ifTrue:[ |
|
7339 |
Dialog warn:'No such class'. |
|
7340 |
^ cancelAction value "/ cancelled |
|
7341 |
]. |
|
7342 |
]. |
|
7343 |
]. |
|
7344 |
||
7345 |
self |
|
7346 |
codeAccept:someCode |
|
7347 |
inClass:implementorClass |
|
7348 |
unwind:doUnwind |
|
7349 |
category:category |
|
7350 |
onCancel:cancelAction. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7351 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7352 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7353 |
"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
|
7354 |
"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
|
7355 |
! |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7356 |
|
7912 | 7357 |
codeCompletion |
7358 |
|cls| |
|
7359 |
||
8212 | 7360 |
currentMethod isNil ifTrue:[ ^ self ]. |
8338 | 7361 |
|
7912 | 7362 |
cls := currentMethod mclass. |
8212 | 7363 |
cls isNil ifTrue:[ ^ self ]. |
7364 |
||
7912 | 7365 |
UserInformation handle:[:ex | |
11210 | 7366 |
ex proceed. |
7912 | 7367 |
] do:[ |
11210 | 7368 |
DoWhatIMeanSupport codeCompletionForClass:cls context:selectedContext codeView:codeView. |
7912 | 7369 |
]. |
7370 |
! |
|
7371 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7372 |
confirm:aString |
6971 | 7373 |
"open a modal yes-no dialog. |
7374 |
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
|
7375 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7376 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
11210 | 7377 |
^ true |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7378 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7379 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7380 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7381 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
7382 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
7383 |
"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
|
7384 |
Also sent to autoselect an interesting context on entry." |
0 | 7385 |
|
9235 | 7386 |
HaltInterrupt handle:[:ex | |
11210 | 7387 |
ignoreBreakpoints ifFalse:[ex reject]. |
7388 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [doShowSelection.]' bindWith:ex suspendedContext) infoPrintCR. |
|
7389 |
ex proceed |
|
3447 | 7390 |
] do:[ |
11210 | 7391 |
self updateForContext:lineNr |
3269 | 7392 |
]. |
7393 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSĂgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
7394 |
|
3447 | 7395 |
"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
|
7396 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7397 |
|
10205 | 7398 |
hideStackInspector |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7399 |
stackInspector notNil ifTrue:[ |
11210 | 7400 |
stackInspector destroy. |
7401 |
stackInspector := nil. |
|
7402 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
|
7403 |
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
|
7404 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7405 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7406 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7407 |
methodCodeToggleChanged |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7408 |
|sel| |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7409 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7410 |
sel := contextView selection. |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7411 |
sel notNil ifTrue:[ |
11210 | 7412 |
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
|
7413 |
] |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7414 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7415 |
"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
|
7416 |
! |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7417 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7418 |
processEvent:anEvent |
6129 | 7419 |
"filter keyboard events for popUp variable value display. |
7420 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7421 |
|
12106 | 7422 |
<resource: #keyboard (#CodeCompletion )> |
7423 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7424 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7425 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7426 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7427 |
evView notNil ifTrue:[ |
11210 | 7428 |
focusView := evView windowGroup focusView. |
7429 |
focusView isNil ifTrue:[ |
|
7430 |
focusView := evView. |
|
7431 |
]. |
|
7432 |
||
7433 |
anEvent isKeyPressEvent ifTrue:[ |
|
7434 |
key := anEvent key. |
|
7435 |
rawKey := anEvent rawKey. |
|
7436 |
||
7437 |
inCodeView := (focusView == codeView |
|
7438 |
or:[focusView isComponentOf:codeView]). |
|
7439 |
inCodeView ifTrue:[ |
|
7440 |
key == #CodeCompletion ifTrue:[ |
|
7441 |
"/ complete the word before/under the cursor. |
|
7442 |
self sensor |
|
7443 |
pushUserEvent:#codeCompletion |
|
7444 |
for:self |
|
7445 |
withArguments:#(). |
|
7446 |
^ true |
|
7447 |
]. |
|
7448 |
]. |
|
7449 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7450 |
|
3602 | 7451 |
false ifTrue:[ |
11210 | 7452 |
anEvent isButtonReleaseEvent ifTrue:[ |
7453 |
anEvent view == codeView ifTrue:[ |
|
7454 |
(RBParser notNil and:[RBParser isLoaded]) |
|
7455 |
ifTrue:[ |
|
7456 |
self sensor |
|
7457 |
pushEvent:anEvent. "/ must be first in queue |
|
7458 |
||
7459 |
self sensor |
|
7460 |
pushUserEvent:#explainSelection |
|
7461 |
for:self |
|
7462 |
withArguments:nil. |
|
7463 |
^ true "/ eaten |
|
7464 |
] |
|
7465 |
] |
|
7466 |
]. |
|
3602 | 7467 |
]. |
7468 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7469 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7470 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7471 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7472 |
|
8212 | 7473 |
setCurrentMethod:aMethodOrNil |
7474 |
currentMethod := aMethodOrNil. |
|
7475 |
! |
|
7476 |
||
11610 | 7477 |
showSelection:lineNr |
1327 | 7478 |
"user clicked on a header line - show selected code in textView. |
7479 |
Also sent to autoselect an interesting context on entry." |
|
11610 | 7480 |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
7481 |
UserNotification |
11610 | 7482 |
handle:[:ex | |
7483 |
"/ ex suspendedContext fullPrintAll. |
|
7484 |
Transcript showCR:ex description. |
|
7485 |
"/ Transcript showCR:ex parameter. |
|
7486 |
ex proceed |
|
7487 |
] |
|
7488 |
do:[ |
|
7489 |
Error |
|
7490 |
handle:[:ex | |
|
7491 |
|s con| |
|
7492 |
||
7493 |
ex signal isControlInterrupt ifTrue:[ |
|
7494 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' |
|
7495 |
infoPrintCR. |
|
7496 |
ex proceed |
|
7497 |
]. |
|
7498 |
('DebugView [info]: error at %1 when showing selection in debugger ignored' |
|
7499 |
bindWith:ex suspendedContext) infoPrintCR. |
|
7500 |
s := '' writeStream. |
|
7501 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
7502 |
s nextPutLine:'****'. |
|
7503 |
s nextPutLine:'**** ',(ex description). |
|
7504 |
s nextPutLine:'****'. |
|
7505 |
con := ex suspendedContext. |
|
7506 |
s nextPutLine:'**** ',(con printString). |
|
7507 |
con := con sender. |
|
7508 |
HaltInterrupt ignoreIn:[ con fullPrintAllOn:s. ]. |
|
7509 |
||
5842 | 7510 |
"/ [con notNil] whileTrue:[ |
7511 |
"/ Error catch:[:ex | |
|
7512 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
7513 |
"/ ]. |
|
4947 | 7514 |
"/ |
5842 | 7515 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
7516 |
"/ con := nil |
|
7517 |
"/ ] ifFalse:[ |
|
7518 |
"/ con := con sender. |
|
7519 |
"/ ] |
|
7520 |
"/ ]. |
|
11610 | 7521 |
|
7522 |
codeView contents:(s contents). |
|
7523 |
ex return. |
|
7524 |
] |
|
7525 |
do:[ self doShowSelection:lineNr ] |
|
7526 |
] |
|
7527 |
||
7528 |
"Modified: / 19-07-2012 / 10:56:58 / cg" |
|
1327 | 7529 |
! |
7530 |
||
10205 | 7531 |
showStackInspectorFor:con |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7532 |
stackInspector isNil ifTrue:[ |
11210 | 7533 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
7534 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
|
7535 |
stackInspector := InspectorView |
|
7536 |
origin:(0.6 @ 0.0) |
|
7537 |
corner:(1.0 @ 1.0) |
|
7538 |
in:contextInspector superView. |
|
7539 |
stackInspector realize. |
|
7540 |
stackInspector fieldListLabel:'Stack'. |
|
7541 |
stackInspector hideReceiver:true |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7542 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7543 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7544 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7545 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7546 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7547 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7548 |
"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
|
7549 |
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
|
7550 |
|
56 | 7551 |
|con homeContext sel method code canAccept |
105 | 7552 |
implementorClass lineNrInMethod rec m line |
10205 | 7553 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 7554 |
codeSet highlighter evaluatorClass |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7555 |
canDefine callee searchClass originalMethod cannotAcceptDueToOutdatedClass| |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7556 |
|
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7557 |
canDefine := cannotAcceptDueToOutdatedClass := false. |
8212 | 7558 |
self setCurrentMethod:nil. |
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
7559 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7560 |
contextArray notNil ifTrue:[ |
10628 | 7561 |
lineNr <= contextArray size ifTrue:[ |
7562 |
con := contextArray at:lineNr. |
|
7563 |
callee := contextArray at:lineNr-1 ifAbsent:nil. |
|
7564 |
]. |
|
7565 |
" |
|
7566 |
clicking on the '** ...'-line shows more ... |
|
7567 |
" |
|
7568 |
con isNil ifTrue:[ |
|
7569 |
line := contextView list at:lineNr. |
|
7570 |
(line startsWith:'**') ifTrue:[ |
|
7571 |
self showMore. |
|
7572 |
lineNr >= contextArray size ifTrue:[ |
|
7573 |
contextView setSelection:lineNr. |
|
7574 |
con := contextArray at:lineNr ifAbsent:nil |
|
7575 |
] |
|
7576 |
]. |
|
7577 |
con isNil ifTrue:[ |
|
7578 |
codeView contents:nil. |
|
7579 |
^ self |
|
7580 |
]. |
|
7581 |
]. |
|
7582 |
||
7583 |
selectedContext := con. |
|
7584 |
m := contextView middleButtonMenu. |
|
7585 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
|
7586 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
|
7587 |
]. |
|
7588 |
||
7589 |
self withExecuteCursorDo:[ |
|
7590 |
codeSet := false. |
|
7591 |
||
7592 |
" |
|
7593 |
give it to the (lower right) inspector |
|
7594 |
" |
|
7595 |
Error handle:[:ex | |
|
11595 | 7596 |
'DebugView [warning]: error while accessing context: ' errorPrint. |
7597 |
ex description errorPrintCR. |
|
10628 | 7598 |
contextInspector inspect:nil. |
11595 | 7599 |
ex suspendedContext fullPrintAllOn: Transcript. |
9479 | 7600 |
"/ ex reject. |
10628 | 7601 |
] do:[ |
7602 |
contextInspector inspect:con. |
|
7603 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
|
7604 |
]. |
|
7605 |
||
7606 |
"/ show a stack inspector sometimes |
|
7607 |
||
7608 |
con hasStackToShow ifTrue:[ |
|
7609 |
self showStackInspectorFor:con |
|
7610 |
] ifFalse:[ |
|
7611 |
self hideStackInspector |
|
7612 |
]. |
|
7613 |
||
7614 |
homeContext := con methodHome. |
|
7615 |
con canReturn ifTrue:[ |
|
7616 |
returnButton enable. restartButton enable. |
|
7617 |
] ifFalse:[ |
|
7618 |
returnButton disable. restartButton disable. |
|
7619 |
]. |
|
7620 |
||
7621 |
lineNrInMethod := con lineNumber. |
|
7622 |
||
7623 |
canAccept := false. |
|
7624 |
||
7625 |
homeContext isNil ifTrue:[ |
|
7626 |
" |
|
7627 |
mhmh - an optimized block |
|
7628 |
should get the block here, and get the method from |
|
7629 |
that one ... |
|
7630 |
But in the current version, there is no easy way to get to the block |
|
7631 |
since that one is not in the context. |
|
7632 |
A future new block calling scheme will fix this |
|
7633 |
(passing the block instead of the home as block argument). |
|
7634 |
" |
|
11610 | 7635 |
(method := con method) isNil ifTrue:[ |
7636 |
"temporary kludge - peek into the sender context. |
|
7637 |
If its a do-like method and there is a single block variable |
|
7638 |
in the args or temporaries, that must be the one. |
|
7639 |
This helps in some cases. |
|
7640 |
" |
|
7641 |
(sender := con sender) notNil ifTrue:[ |
|
7642 |
tryVars := false. |
|
7643 |
(selSender := sender selector) notNil ifTrue:[ |
|
7644 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
|
7645 |
tryVars := true. |
|
7646 |
] |
|
7647 |
]. |
|
7648 |
tryVars ifTrue:[ |
|
7649 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
|
7650 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
|
7651 |
possibleBlocks size == 1 ifTrue:[ |
|
7652 |
method := possibleBlocks first method. |
|
7653 |
]. |
|
10628 | 7654 |
] |
7655 |
]. |
|
11610 | 7656 |
] |
10628 | 7657 |
] ifFalse:[ |
7658 |
"fetch rec here - so we won't need context in doItAction" |
|
7659 |
rec := homeContext receiver. |
|
7660 |
sel := homeContext selector. |
|
7661 |
sel notNil ifTrue:[ |
|
7662 |
canAccept := true. |
|
7663 |
||
7664 |
implementorClass := homeContext methodClass. |
|
7665 |
implementorClass isNil ifTrue:[ |
|
11898 | 7666 |
homeContext method notNil ifTrue:[ |
7667 |
WrappedMethod allInstancesDo:[:wrapped | |
|
7668 |
wrapped originalMethod == homeContext method ifTrue:[ |
|
7669 |
implementorClass := wrapped mclass |
|
7670 |
] |
|
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7671 |
]. |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7672 |
implementorClass isNil ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7673 |
(homeContext searchClass notNil |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7674 |
and:[homeContext searchClass isObsolete]) ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7675 |
cannotAcceptDueToOutdatedClass := true. |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7676 |
] |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7677 |
]. |
11898 | 7678 |
]. |
7679 |
]. |
|
7680 |
implementorClass isNil ifTrue:[ |
|
10628 | 7681 |
Error handle:[:ex | |
11890 | 7682 |
"/ not covered by Error, anyway |
7683 |
"/ ex signal == BreakPointInterrupt ifTrue:[ |
|
7684 |
"/ ex proceed. |
|
7685 |
"/ ]. |
|
10628 | 7686 |
code := 'error while asking method for its source'. |
7687 |
code := code , Character cr , ex signal printString. |
|
7688 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7689 |
||
7690 |
canAccept := false. |
|
7691 |
ex return. |
|
7692 |
] do:[ |
|
7693 |
" |
|
7694 |
special: look if this context was created by |
|
7695 |
valueWithReceiver kind of method invocation; |
|
7696 |
if so, grab the method from the sender and show it |
|
7697 |
" |
|
7698 |
((sender := homeContext sender) notNil |
|
7699 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
|
7700 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7701 |
method := sender receiver. |
|
7702 |
canAccept := false. |
|
7703 |
] ifFalse:[ |
|
7704 |
(method := con method) notNil ifTrue:[ |
|
7705 |
canAccept := false. |
|
7706 |
] |
|
7707 |
]. |
|
7708 |
] |
|
7709 |
] ifFalse:[ |
|
7710 |
method := implementorClass compiledMethodAt:sel. |
|
7711 |
]. |
|
7712 |
] |
|
7713 |
]. |
|
7714 |
||
7715 |
homeContext notNil ifTrue:[ |
|
7716 |
searchClass := homeContext searchClass ? rec class. |
|
7717 |
currentMethod := searchClass lookupMethodFor:sel. |
|
7718 |
]. |
|
7719 |
originalMethod := currentMethod. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7720 |
(currentMethod notNil |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7721 |
and:[currentMethod ~~ method |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7722 |
and:[ (currentMethod isWrapped and:[ method == currentMethod originalMethod]) not ]]) ifTrue:[ |
10628 | 7723 |
originalMethod := method. |
7724 |
methodCodeToggleSelectionHolder value = 1 ifTrue:[ |
|
7725 |
method := originalMethod. |
|
7726 |
] ifFalse:[ |
|
7727 |
method := currentMethod. |
|
7728 |
lineNrInMethod := nil. |
|
7729 |
canAccept := true. |
|
7730 |
]. |
|
7731 |
methodCodeToggle beVisible. |
|
7732 |
] ifFalse:[ |
|
7733 |
methodCodeToggle beInvisible. |
|
7734 |
]. |
|
7735 |
||
7736 |
code isNil ifTrue:[ |
|
7737 |
errMsg := nil. |
|
7738 |
method isNil ifTrue:[ |
|
7739 |
"/ fall back heuristics |
|
7740 |
con isBlockContext ifTrue:[ |
|
7741 |
((sender := con sender) notNil |
|
7742 |
and:[((sender selector ? '') startsWith:'value') |
|
7743 |
and:[sender receiver isBlock]]) ifTrue:[ |
|
7744 |
code := sender receiver source. |
|
7745 |
] |
|
7746 |
] ifFalse:[ |
|
7747 |
((sender := con sender) notNil |
|
7748 |
and:[((sender selector ? '') startsWith:'valueWith') |
|
7749 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7750 |
method := sender receiver. |
|
7751 |
] |
|
7752 |
] |
|
7753 |
]. |
|
7754 |
method notNil ifTrue:[ |
|
7755 |
Error handle:[:ex | |
|
11890 | 7756 |
"/ not covered by Error, anyway |
7757 |
"/ ex signal isControlInterrupt ifTrue:[ |
|
7758 |
"/ ex proceed. |
|
7759 |
"/ ]. |
|
10628 | 7760 |
code := 'error while asking method for its source'. |
7761 |
code := code , Character cr , ex signal printString. |
|
7762 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7763 |
||
7764 |
canAccept := false. |
|
7765 |
ex return. |
|
7766 |
] do:[ |
|
7767 |
self sensor shiftDown ifTrue:[ |
|
7768 |
code := method decompiledSource |
|
7769 |
] ifFalse:[ |
|
7770 |
code := method source. |
|
7771 |
]. |
|
7772 |
]. |
|
7773 |
code isNil ifTrue:[ |
|
7774 |
method sourceFilename notNil ifTrue:[ |
|
7775 |
codeView contents:(resources |
|
7776 |
string:'** no sourcefile: %1 **' |
|
7777 |
with:method sourceFilename). |
|
7778 |
codeView flash. |
|
7779 |
codeSet := true. |
|
7780 |
] ifFalse:[ |
|
7781 |
[ |
|
7782 |
|src| |
|
7783 |
||
7784 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
|
7785 |
codeView contents:src. |
|
7786 |
codeSet := true. |
|
7787 |
] on: Error do:[ |
|
7788 |
errMsg := '** no source **' |
|
7789 |
]. |
|
7790 |
] |
|
7791 |
]. |
|
7792 |
] ifFalse:[ |
|
7793 |
homeContext isNil ifTrue:[ |
|
7794 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
|
7795 |
] ifFalse:[ |
|
7796 |
errMsg := '** no method - no source **'. |
|
7797 |
canDefine := true. |
|
7798 |
] |
|
7799 |
]. |
|
7800 |
errMsg notNil ifTrue:[ |
|
7801 |
self showError:errMsg. |
|
7802 |
codeSet := true. |
|
7803 |
] |
|
7804 |
]. |
|
7805 |
||
7806 |
code isNil ifTrue:[ |
|
7807 |
"/ canAccept := false. |
|
7808 |
codeSet ifFalse:[ |
|
7809 |
codeView contents:nil. |
|
7810 |
] |
|
7811 |
] ifFalse:[ |
|
7812 |
lineNrInMethod notNil ifTrue:[ |
|
7813 |
lineNrInMethod == 0 ifTrue:[ |
|
7814 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
7815 |
lineNrInMethod := method lineNumber |
|
7816 |
]. |
|
7817 |
"/ guess lineNumber from sent-messages selector |
|
7818 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
|
7819 |
lineNrInMethod == 0 ifTrue:[ |
|
7820 |
|conIdx sentContext messages| |
|
7821 |
||
7822 |
conIdx := contextArray identityIndexOf:con. |
|
7823 |
conIdx > 1 ifTrue:[ |
|
7824 |
sentContext := contextArray at:conIdx-1. |
|
7825 |
sentContext isBlockContext ifFalse:[ |
|
7826 |
(method notNil and:[code notNil]) ifTrue:[ |
|
7827 |
messages := method messagesSent. |
|
7828 |
messages size == 1 ifTrue:[ |
|
7829 |
sentContext selector == messages first ifTrue:[ |
|
7830 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
|
7831 |
] |
|
7832 |
] |
|
7833 |
]. |
|
7834 |
]. |
|
7835 |
]. |
|
7836 |
]. |
|
7837 |
]. |
|
7838 |
]. |
|
7839 |
codeView isCodeView2 ifTrue:[ |
|
10649
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7840 |
codeView model setValue: code. |
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7841 |
codeView model changed. |
10628 | 7842 |
codeView methodHolder value: method. |
10752 | 7843 |
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class]) |
10628 | 7844 |
] ifFalse:[ |
7845 |
||
7846 |
UserPreferences current syntaxColoring ifTrue:[ |
|
7847 |
implementorClass isNil ifTrue:[ |
|
7848 |
(con isBlockContext |
|
7849 |
and:[con home isNil |
|
7850 |
and:[con guessedHome notNil]]) |
|
7851 |
ifTrue:[ |
|
7852 |
implementorClass := con guessedHome mclass |
|
7853 |
] |
|
7854 |
]. |
|
7855 |
implementorClass notNil ifTrue:[ |
|
7856 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
|
7857 |
code size < 100000 ifTrue:[ |
|
7858 |
Error handle:[:ex | |
|
7859 |
] do:[ |
|
7860 |
code := highlighter formatMethod:code in:implementorClass. |
|
7861 |
] |
|
7862 |
] |
|
7863 |
] |
|
7864 |
] |
|
7865 |
]. |
|
1555 | 7866 |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7867 |
"/ code ~= (codeView contents) ifTrue:[ |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7868 |
cannotAcceptDueToOutdatedClass ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7869 |
codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString). |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7870 |
] ifFalse:[ |
10628 | 7871 |
codeView setContents:code. |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7872 |
]. |
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7873 |
"/ ]. |
10628 | 7874 |
]. |
7875 |
(lineNrInMethod notNil |
|
7876 |
and:[lineNrInMethod ~~ 0 |
|
7877 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
|
7000 | 7878 |
lineNrInMethod == 255 ifFalse:[ |
10628 | 7879 |
(lineNrInMethod == 255 |
7880 |
and:[method notNil |
|
7881 |
and:[method hasCode not]]) ifTrue:[ |
|
7882 |
"/ means: do not really know in interpreted methods |
|
7883 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
|
7884 |
] ifFalse:[ |
|
7885 |
codeView selectLine:lineNrInMethod. |
|
7886 |
]. |
|
7887 |
codeView makeSelectionVisible |
|
7000 | 7888 |
]. |
10628 | 7889 |
] ifFalse:[ |
7890 |
codeView unselect. |
|
7891 |
codeView scrollToTop |
|
7892 |
] |
|
7893 |
]. |
|
7894 |
||
7895 |
codeView acceptEnabled:canAccept. |
|
7896 |
canAccept ifTrue:[ |
|
7897 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
7898 |
] ifFalse:[ |
|
7899 |
codeView acceptAction:[:code | self beep] |
|
7900 |
]. |
|
7901 |
||
7902 |
receiverInspector inspect:rec. |
|
7903 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
|
7904 |
||
7905 |
" |
|
7906 |
the one below is wrong: currently, the |
|
7907 |
evaluator cannot handle passed contexts. |
|
7908 |
Once it does, pass con as in:-arg |
|
7909 |
" |
|
7910 |
(rec isJavaObject |
|
7911 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
7912 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
7913 |
evaluatorClass := Parser |
|
7914 |
] ifFalse:[ |
|
7915 |
(method notNil and:[method mclass notNil]) ifTrue:[ |
|
7916 |
evaluatorClass := method mclass evaluatorClass. |
|
7917 |
] ifFalse:[ |
|
7918 |
evaluatorClass := rec class evaluatorClass. |
|
7919 |
]. |
|
7920 |
]. |
|
7921 |
||
7922 |
codeView doItAction:[:theCode | |
|
7923 |
evaluatorClass |
|
7924 |
evaluate:theCode |
|
7925 |
in:actualContext |
|
7926 |
receiver:rec |
|
7927 |
notifying:codeView |
|
7928 |
logged:true |
|
7929 |
ifFail:nil |
|
7930 |
]. |
|
7931 |
self setCurrentMethod:method. |
|
7932 |
||
11610 | 7933 |
selectedContext := homeContext ? con. |
10628 | 7934 |
actualContext := con |
7935 |
]. |
|
4122 | 7936 |
] ifFalse:[ |
10628 | 7937 |
codeView contents:nil. |
4122 | 7938 |
]. |
7939 |
codeView modified:false. |
|
7940 |
||
7941 |
con isContext ifFalse:[ |
|
10628 | 7942 |
sendButton disable. |
4122 | 7943 |
] ifTrue:[ |
10628 | 7944 |
sendButton enable. |
10205 | 7945 |
]. |
7946 |
||
7947 |
"clear out locals to prevent keeping around unneeded contexts |
|
4122 | 7948 |
(due to the block held in codeView). |
7949 |
(not really needed, since stuff gets collected away sooner or later ... |
|
7950 |
... but this makes it a bit sooner) |
|
7951 |
" |
|
7952 |
con := nil. |
|
7953 |
homeContext := nil. |
|
7954 |
||
10205 | 7955 |
(callee notNil |
7956 |
and:[callee method notNil |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7957 |
and:[callee method selector == #subclassResponsibility]] |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7958 |
) ifTrue:[ |
10628 | 7959 |
canDefine := true. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7960 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7961 |
|
4122 | 7962 |
canDefine ifTrue:[ |
10628 | 7963 |
defineButton beVisible. |
4122 | 7964 |
] ifFalse:[ |
10628 | 7965 |
defineButton beInvisible. |
4122 | 7966 |
]. |
7967 |
||
7968 |
" |
|
7969 |
enable/disable some menu items |
|
7970 |
" |
|
7971 |
self updateMenuItems |
|
7972 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
7973 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
10752 | 7974 |
"Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11647 | 7975 |
"Modified: / 23-07-2012 / 12:23:49 / cg" |
4122 | 7976 |
! ! |
7977 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7978 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'! |
8170 | 7979 |
|
7980 |
ignoreCount:something |
|
7981 |
ignoreCount := something. |
|
7982 |
! |
|
7983 |
||
7984 |
ignoreEndTime:something |
|
7985 |
ignoreEndTime := something. |
|
7986 |
! |
|
7987 |
||
11210 | 7988 |
ignoreUntilShiftKeyPressed:aBoolean |
7989 |
ignoreUntilShiftKeyPressed := aBoolean. |
|
7990 |
||
7991 |
"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
|
7992 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7993 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7994 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7995 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7996 |
decrementIgnoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7997 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7998 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7999 |
ignoreCount := ignoreCount - 1 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8000 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8001 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8002 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8003 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8004 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8005 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8006 |
printConditionOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8007 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8008 |
aStream nextPutAll:' until shiftKey pressed'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8009 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8010 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8011 |
aStream nextPutAll:' until '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8012 |
ignoreEndTime printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8013 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8014 |
(ignoreCount > 0) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8015 |
aStream nextPutAll:' for '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8016 |
ignoreCount printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8017 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8018 |
(ignoreCount < 0) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8019 |
aStream nextPutAll:' forEver'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8020 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8021 |
aStream nextPutAll:' no longer'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8022 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8023 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8024 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8025 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8026 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8027 |
"Modified: / 27-01-2012 / 11:43:10 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8028 |
"Created: / 06-03-2012 / 12:41:10 / cg" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8029 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8030 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8031 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8032 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8033 |
haltIgnoredInfoString |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8034 |
"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
|
8035 |
nil if not ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8036 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8037 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8038 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8039 |
^ '%1 more calls ignored' bindWith:ignoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8040 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8041 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8042 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8043 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8044 |
(ignoreEndTime > Timestamp now) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8045 |
^ 'ignored until %1' bindWith:ignoreEndTime |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8046 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8047 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8048 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8049 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8050 |
Display shiftDown ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8051 |
^ 'ignored until shiftKey is pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8052 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8053 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8054 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8055 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8056 |
^ 'ignored until reenabled' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8057 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8058 |
"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
|
8059 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8060 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8061 |
isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8062 |
"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
|
8063 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8064 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8065 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8066 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8067 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8068 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8069 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8070 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8071 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8072 |
"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
|
8073 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8074 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8075 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8076 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8077 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8078 |
"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
|
8079 |
"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
|
8080 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8081 |
|
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8082 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8083 |
^ false |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8084 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8085 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8086 |
"Created: / 06-03-2012 / 14:36:28 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8087 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8088 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8089 |
isHaltIgnored |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8090 |
"true if this halt should be ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8091 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8092 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8093 |
^ Display shiftDown not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8094 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8095 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8096 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8097 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8098 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8099 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8100 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8101 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8102 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8103 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8104 |
"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
|
8105 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8106 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8107 |
!DebugView::IgnoredHalt methodsFor:'accessing'! |
11210 | 8108 |
|
8170 | 8109 |
method |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8110 |
|m| |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8111 |
|
9922 | 8112 |
weakMethodHolder == #all ifTrue:[^ weakMethodHolder ]. |
8113 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8114 |
m := weakMethodHolder at:1. |
9796 | 8115 |
"/ wait until really gone (it could still be on the call stack |
8116 |
"/ |
|
8117 |
"/ m notNil ifTrue:[ |
|
8118 |
"/ m mclass isNil ifTrue:[ |
|
8119 |
"/ "/ no longer valid |
|
8120 |
"/ weakMethodHolder at:1 put:nil. |
|
8121 |
"/ ^ nil |
|
8122 |
"/ ]. |
|
8123 |
"/ ]. |
|
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8124 |
^ m |
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8125 |
|
9922 | 8126 |
"Modified: / 08-05-2011 / 10:28:10 / cg" |
8170 | 8127 |
! |
8128 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8129 |
method:methodArg lineNumber:lineNumberArg |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8130 |
"/ self assert:(methodArg mclass notNil). |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8131 |
|
9922 | 8132 |
methodArg == #all ifTrue:[ |
11210 | 8133 |
weakMethodHolder := methodArg |
9922 | 8134 |
] ifFalse:[ |
11210 | 8135 |
weakMethodHolder := WeakArray with:methodArg. |
9922 | 8136 |
]. |
8170 | 8137 |
lineNumber := lineNumberArg. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8138 |
|
9922 | 8139 |
"Modified: / 08-05-2011 / 10:28:41 / cg" |
8170 | 8140 |
! ! |
8141 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8142 |
!DebugView::IgnoredHalt methodsFor:'printing'! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8143 |
|
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8144 |
printOn:aStream |
9922 | 8145 |
|method| |
8146 |
||
8147 |
(method := self method) isNil ifTrue:[ |
|
11210 | 8148 |
aStream nextPutAll:'an obsolete IgnoredHalt'. |
8149 |
^ self |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8150 |
]. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8151 |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8152 |
aStream nextPutAll:'Ignore '. |
11704 | 8153 |
method isSymbol ifTrue:[ |
8154 |
method printOn:aStream. |
|
8155 |
] ifFalse:[ |
|
8156 |
method whoString printOn:aStream. |
|
8157 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8158 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8159 |
|
11704 | 8160 |
"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
|
8161 |
! ! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8162 |
|
8170 | 8163 |
!DebugView::IgnoredHalt methodsFor:'queries'! |
8164 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8165 |
isActive |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8166 |
"true if this ignore-entry is still active" |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8167 |
|
9796 | 8168 |
self method isNil ifTrue:[self halt. ^ false ]. "/ method no longer valid |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8169 |
^ super isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8170 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8171 |
"Modified: / 06-03-2012 / 12:40:20 / cg" |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8172 |
! |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8173 |
|
8170 | 8174 |
isForMethod:aMethod line:line |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8175 |
"/ check in this order - method has a flushing side-effect, which is useful here... |
9922 | 8176 |
weakMethodHolder == #all ifTrue:[^ true]. |
8177 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8178 |
^ (aMethod = self method) and:[ line = lineNumber ]. |
9922 | 8179 |
|
8180 |
"Modified: / 08-05-2011 / 10:27:31 / cg" |
|
8170 | 8181 |
! |
8182 |
||
8183 |
isHaltIgnoredInMethod:aMethod line:line |
|
9095 | 8184 |
"/ 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
|
8185 |
|
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8186 |
(self isForMethod:aMethod line:line) ifFalse:[^ false]. |
9095 | 8187 |
"/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored. |
8170 | 8188 |
|
8189 |
^ self isHaltIgnored |
|
8190 |
! ! |
|
8191 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8192 |
!DebugView::IgnoredBreakpoint methodsFor:'accessing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8193 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8194 |
parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8195 |
^ parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8196 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8197 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8198 |
parameter:something |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8199 |
parameter := something. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8200 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8201 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8202 |
!DebugView::IgnoredBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8203 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8204 |
printOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8205 |
aStream nextPutAll:'Ignore breakpoint:#', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8206 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8207 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8208 |
"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
|
8209 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8210 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8211 |
!DebugView::IgnoredBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8212 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8213 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8214 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8215 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8216 |
"Created: / 06-03-2012 / 12:54:35 / cg" |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8217 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8218 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8219 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8220 |
^ paramArg = parameter |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8221 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8222 |
"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
|
8223 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8224 |
|
4122 | 8225 |
!DebugView class methodsFor:'documentation'! |
8226 |
||
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8227 |
version |
12437 | 8228 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.572 2013-03-06 09:06:59 cg Exp $' |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8229 |
! |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8230 |
|
8952
7742c63ff6f5
catch halts in: #showSelection:
Claus Gittinger <cg@exept.de>
parents:
8745
diff
changeset
|
8231 |
version_CVS |
12437 | 8232 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.572 2013-03-06 09:06:59 cg Exp $' |
10628 | 8233 |
! |
8234 |
||
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
8235 |
version_HG |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
8236 |
|
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
8237 |
^ '$Changeset: <not expanded> $' |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
8238 |
! |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
8239 |
|
10628 | 8240 |
version_SVN |
8241 |
^ '§Id: DebugView.st 7818 2011-08-18 11:42:39Z vranyj1 §' |
|
4122 | 8242 |
! ! |
8243 |
||
12106 | 8244 |
|
4122 | 8245 |
DebugView initialize! |