author | Claus Gittinger <cg@exept.de> |
Sat, 30 Mar 2013 02:59:17 +0100 | |
changeset 12577 | 3ca47412263f |
parent 12562 | e05279313989 |
child 12626 | 7ae48abfedac |
child 12633 | 9f6eace86016 |
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 |
|
12529 | 32 |
hideSupportCode contextInfoLabel' |
11898 | 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 |
|
12562 | 346 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod modifyEntryCount:modifyCount |
347 |
"should a halt be ignored ?" |
|
348 |
||
349 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
350 |
||
351 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
|
352 |
IgnoredHalts do:[:ign | |
|
353 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
|
354 |
Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString. |
|
355 |
Transcript show:' ('; show:ign; showCR:')'. |
|
356 |
||
357 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
|
358 |
ign isHaltIgnored ifFalse:[ |
|
359 |
Transcript showCR:'Debugger [info]: no longer ignore halt in ', haltingMethod whoString. |
|
360 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
361 |
]. |
|
362 |
^ true. |
|
363 |
]. |
|
364 |
]. |
|
365 |
||
366 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not]. |
|
367 |
IgnoredHalts isEmpty ifTrue:[ |
|
368 |
IgnoredHalts := nil. |
|
369 |
]. |
|
370 |
||
371 |
^ false. |
|
372 |
||
373 |
"Modified (comment): / 06-03-2012 / 12:51:43 / cg" |
|
374 |
! |
|
375 |
||
10203 | 376 |
removeInactiveIgnores |
377 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 378 |
IgnoredHalts := IgnoredHalts select:[:i | i isActive]. |
10203 | 379 |
]. |
380 |
! |
|
381 |
||
382 |
stopIgnoringHalts |
|
383 |
"forget about all ignored halts" |
|
384 |
||
385 |
IgnoredHalts := nil. |
|
386 |
Smalltalk changed:#ignoredHalts. |
|
387 |
! ! |
|
388 |
||
389 |
!DebugView class methodsFor:'instance creation / entering'! |
|
0 | 390 |
|
2421 | 391 |
enter |
392 |
"enter a debugger" |
|
393 |
||
5455 | 394 |
<context: #return> |
395 |
||
10205 | 396 |
^ self |
11210 | 397 |
enter:thisContext sender |
398 |
withMessage:'debugger entered' |
|
399 |
mayProceed:true. |
|
10205 | 400 |
! |
401 |
||
402 |
enter:aContext withMessage:aString |
|
2355 | 403 |
"enter a debugger" |
404 |
||
5455 | 405 |
<context: #return> |
406 |
||
2355 | 407 |
^ self |
11210 | 408 |
enter:aContext |
409 |
withMessage:aString |
|
410 |
mayProceed:true |
|
2355 | 411 |
! |
412 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
413 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 414 |
"enter a debugger; if this is a recursive invocation, enter |
415 |
a MiniDebugger instead. |
|
416 |
This is the standard way of entering the debugger; |
|
417 |
sent from error- and halt messages." |
|
0 | 418 |
|
3447 | 419 |
<context: #return> |
420 |
||
3702 | 421 |
|active| |
93 | 422 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
423 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
424 |
'==> enter1: (' print. aContext print. ')' printCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
425 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
426 |
|
57 | 427 |
StepInterruptPending := nil. |
3998 | 428 |
ControlInterrupt handle:[:ex | |
11210 | 429 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
430 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
431 |
ex proceed |
|
3998 | 432 |
] do:[ |
11210 | 433 |
" |
434 |
well, it could be a stepping or sending debugger up there; |
|
435 |
in this case, return to it. This happens, when a stepping process |
|
436 |
runs into an error (for example, a halt). In this case, we want the |
|
437 |
stepping debugger to come up again instead of a new one. |
|
438 |
" |
|
439 |
OpenDebuggers notNil ifTrue:[ |
|
440 |
active := Processor activeProcess. |
|
441 |
OpenDebuggers do:[:aDebugger | |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
442 |
|debuggersProcess| |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
443 |
|
11210 | 444 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
445 |
debuggersProcess := aDebugger inspectedProcess. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
446 |
debuggersProcess == active ifTrue:[ |
11210 | 447 |
aDebugger device isOpen ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
448 |
DebuggingDebugger == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
449 |
'reusing cached debugger' errorPrintCR. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
450 |
]. |
11210 | 451 |
aDebugger unstep. |
452 |
aDebugger setLabelFor:aString in:active. |
|
453 |
aDebugger mayProceed:mayProceed. |
|
454 |
^ aDebugger enter:aContext select:nil. |
|
455 |
] |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
456 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
457 |
(debuggersProcess notNil and:[ debuggersProcess isDead ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
458 |
aDebugger destroy. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
459 |
]. |
11210 | 460 |
] |
461 |
] |
|
462 |
]. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
463 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
464 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 465 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
466 |
"Modified: / 17-07-2012 / 19:08:18 / cg" |
53 | 467 |
! |
468 |
||
8347 | 469 |
enterException:ex |
470 |
"enter a debugger; if this is a recursive invocation, enter |
|
471 |
a MiniDebugger instead. |
|
472 |
This is the standard way of entering the debugger; |
|
473 |
sent from error- and halt messages." |
|
474 |
||
475 |
^ self |
|
11210 | 476 |
enter:ex returnableSuspendedContext |
12529 | 477 |
withMessage:('[',ex originalSignal class name,']: ',ex descriptionForDebugger) |
11210 | 478 |
mayProceed:(ex mayProceed). |
8347 | 479 |
! |
480 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
481 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 482 |
"enter a debugger - do not check for recursive invocation" |
483 |
||
5455 | 484 |
<context: #return> |
485 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
486 |
|aDebugger| |
266 | 487 |
|
488 |
StepInterruptPending := nil. |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
489 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
490 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
491 |
"/ to avoid recursive debugging ... |
3447 | 492 |
ControlInterrupt handle:[:ex | |
11210 | 493 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
494 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
495 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
496 |
] do:[ |
11210 | 497 |
aDebugger := self new. |
3447 | 498 |
]. |
499 |
||
500 |
aDebugger isNil ifTrue:[ |
|
11210 | 501 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
502 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
503 |
mayProceed ifTrue:[ |
|
12333 | 504 |
(Dialog confirm:'Error/Breakpoint caught.\\Press Continue or Abort.' withCRs |
11210 | 505 |
yesLabel:'Continue' noLabel:'Abort') |
506 |
ifTrue:[ |
|
507 |
^ nil |
|
508 |
]. |
|
509 |
] ifFalse:[ |
|
12333 | 510 |
self information:'Error caught.\\Press OK to abort the operation.' withCRs. |
11210 | 511 |
]. |
512 |
AbortOperationRequest raise. |
|
513 |
"not reached" |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
514 |
]. |
3447 | 515 |
|
516 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
517 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 518 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
519 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
520 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
521 |
" |
11210 | 522 |
nil halt |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
523 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
524 |
|
3447 | 525 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 526 |
! |
527 |
||
6430 | 528 |
enterWithMessage:message |
529 |
"enter a debugger" |
|
530 |
||
531 |
<context: #return> |
|
532 |
||
10205 | 533 |
^ self |
11210 | 534 |
enter:(thisContext sender) |
535 |
withMessage:message |
|
536 |
mayProceed:true. |
|
6430 | 537 |
! |
538 |
||
266 | 539 |
new |
10205 | 540 |
"return a new DebugView. |
2358 | 541 |
- return a cached debugger if it already exists. |
542 |
Also, care for remote displays on which no debugger is wanted |
|
543 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
544 |
||
545 |
|debugger currentScreen debuggerDevice| |
|
546 |
||
547 |
currentScreen := Screen current. |
|
14 | 548 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
549 |
currentScreen notNil ifTrue:[ |
11210 | 550 |
(currentScreen suppressDebugger) ifTrue:[ |
551 |
"/ no debuggers with that device - show an alertBox which aborts... |
|
552 |
^ nil. |
|
553 |
]. |
|
554 |
(currentScreen mayOpenDebugger) ifFalse:[ |
|
555 |
"/ no debugger on that device - but on the main screen |
|
556 |
currentScreen := Screen default. |
|
557 |
]. |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
558 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
559 |
|
266 | 560 |
" |
10205 | 561 |
need a blocking debugger if no processes or |
562 |
or if its a timing/interrupt process |
|
266 | 563 |
(because otherwise we would not get any events here ... |
564 |
" |
|
565 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
11210 | 566 |
((debugger := CachedExclusive) isNil |
567 |
or:[debugger device ~~ currentScreen |
|
568 |
or:[currentScreen isNil |
|
569 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
|
570 |
debugger := self newExclusive |
|
571 |
]. |
|
572 |
CachedExclusive := nil. |
|
266 | 573 |
] ifFalse:[ |
11210 | 574 |
CachedDebugger notNil ifTrue:[ |
575 |
(CachedDebugger device ~~ currentScreen |
|
576 |
or:[currentScreen isNil |
|
577 |
or:[currentScreen isOpen not |
|
578 |
or:[CachedDebugger class ~~ self]]]) ifTrue:[ |
|
579 |
CachedDebugger := nil |
|
580 |
] |
|
581 |
]. |
|
582 |
||
583 |
(debugger := CachedDebugger) notNil ifTrue:[ |
|
584 |
CachedDebugger := nil. |
|
585 |
] ifFalse:[ |
|
586 |
debuggerDevice := currentScreen. |
|
587 |
debuggerDevice isNil ifTrue:[ |
|
588 |
"/ use the default display |
|
589 |
debuggerDevice := Screen default. |
|
590 |
]. |
|
591 |
(debuggerDevice isNil |
|
592 |
or:[debuggerDevice isOpen not |
|
593 |
"/ or:[debuggerDevice mayOpenDebugger not] |
|
594 |
]) ifTrue:[ |
|
595 |
"/ no debugger |
|
596 |
^ nil. |
|
597 |
]. |
|
598 |
||
599 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
600 |
do:[ |
|
601 |
debugger := super new. |
|
602 |
]. |
|
603 |
debugger label:'Debugger'. |
|
604 |
debugger icon:self defaultIcon. |
|
605 |
] |
|
266 | 606 |
]. |
73 | 607 |
^ debugger |
875 | 608 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
609 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 610 |
! |
0 | 611 |
|
266 | 612 |
newExclusive |
613 |
"return a debugger for exclusive display access" |
|
614 |
||
615 |
|debugger| |
|
105 | 616 |
|
266 | 617 |
debugger := super new. |
618 |
debugger label:'Debugger'. |
|
875 | 619 |
debugger icon:self defaultIcon. |
266 | 620 |
debugger exclusive:true. |
621 |
^ debugger |
|
875 | 622 |
|
623 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 624 |
! |
625 |
||
29 | 626 |
openOn:aProcess |
627 |
"start a debugger on aProcess |
|
628 |
(actually not more than a good-looking inspector)" |
|
15 | 629 |
|
52 | 630 |
|aDebugger label nm| |
15 | 631 |
|
632 |
aDebugger := super new. |
|
875 | 633 |
aDebugger icon:self defaultIcon. |
29 | 634 |
aProcess notNil ifTrue:[ |
11210 | 635 |
nm := aProcess name. |
636 |
nm notNil ifTrue:[ |
|
637 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
638 |
] ifFalse:[ |
|
639 |
nm := aProcess id printString |
|
640 |
]. |
|
641 |
label := 'Debugger [' , nm , ']'. |
|
29 | 642 |
] ifFalse:[ |
11210 | 643 |
label := 'no process' |
29 | 644 |
]. |
1114 | 645 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 646 |
aDebugger openOn:aProcess. |
647 |
^ nil |
|
875 | 648 |
|
1114 | 649 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 650 |
! ! |
651 |
||
3269 | 652 |
!DebugView class methodsFor:'menu specs'! |
653 |
||
12437 | 654 |
breakPointMenuSpec |
655 |
"This resource specification was automatically generated |
|
656 |
by the MenuEditor of ST/X." |
|
657 |
||
658 |
"Do not manually edit this!! If it is corrupted, |
|
659 |
the MenuEditor may not be able to read the specification." |
|
660 |
||
661 |
||
662 |
" |
|
663 |
MenuEditor new openOnClass:DebugView andSelector:#breakPointMenuSpec |
|
664 |
(Menu new fromLiteralArrayEncoding:(DebugView breakPointMenuSpec)) startUp |
|
665 |
" |
|
666 |
||
667 |
<resource: #menu> |
|
668 |
||
669 |
^ |
|
670 |
#(Menu |
|
671 |
( |
|
672 |
(MenuItem |
|
673 |
enabled: canRemoveBreakpoint |
|
674 |
label: 'Remove Breakpoint' |
|
675 |
itemValue: removeBreakpoint |
|
676 |
) |
|
677 |
(MenuItem |
|
678 |
label: 'Remove all Breakpoints' |
|
679 |
itemValue: removeAllBreakpoints |
|
680 |
) |
|
681 |
(MenuItem |
|
682 |
label: '-' |
|
683 |
) |
|
684 |
(MenuItem |
|
685 |
enabled: canAddBreakpoint |
|
686 |
label: 'Add Breakpoint' |
|
687 |
itemValue: addBreakpoint |
|
688 |
) |
|
689 |
(MenuItem |
|
690 |
label: '-' |
|
691 |
) |
|
692 |
(MenuItem |
|
693 |
label: 'Ignore this Halt/BreakPoint' |
|
694 |
submenu: |
|
695 |
(Menu |
|
696 |
( |
|
697 |
(MenuItem |
|
698 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
699 |
label: 'For Some Time...' |
|
700 |
itemValue: openIgnoreHaltUntilTimeElapsedDialog |
|
701 |
) |
|
702 |
(MenuItem |
|
703 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
704 |
label: 'For the Next N Times...' |
|
705 |
itemValue: openIgnoreHaltNTimesDialog |
|
706 |
) |
|
707 |
(MenuItem |
|
708 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
709 |
label: 'Until Shift-Key is Pressed' |
|
710 |
itemValue: ignoreHaltUntilShiftKeyIsPressed |
|
711 |
) |
|
712 |
(MenuItem |
|
713 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
714 |
label: 'Forever (Until Ignoring is Stopped)' |
|
715 |
itemValue: ignoreHaltForever |
|
716 |
) |
|
717 |
) |
|
718 |
nil |
|
719 |
nil |
|
720 |
) |
|
721 |
) |
|
722 |
(MenuItem |
|
723 |
enabled: isStoppedAtBreakPointWithParameter |
|
724 |
label: 'Ignore all BreakPoints with this Parameter' |
|
725 |
submenu: |
|
726 |
(Menu |
|
727 |
( |
|
728 |
(MenuItem |
|
729 |
enabled: isStoppedAtBreakPointWithParameter |
|
730 |
label: 'For Some Time...' |
|
731 |
itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
|
732 |
) |
|
733 |
(MenuItem |
|
734 |
enabled: isStoppedAtBreakPointWithParameter |
|
735 |
label: 'For the Next N Times...' |
|
736 |
itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog |
|
737 |
) |
|
738 |
(MenuItem |
|
739 |
enabled: isStoppedAtBreakPointWithParameter |
|
740 |
label: 'Until Shift-Key is Pressed' |
|
741 |
itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
|
742 |
) |
|
743 |
(MenuItem |
|
744 |
enabled: isStoppedAtBreakPointWithParameter |
|
745 |
label: 'Forever (Reenable in BreakPoint-Browser)' |
|
746 |
itemValue: ignoreBreakpointsWithThisParameterForever |
|
747 |
) |
|
748 |
) |
|
749 |
nil |
|
750 |
nil |
|
751 |
) |
|
752 |
) |
|
753 |
(MenuItem |
|
754 |
label: 'Ignore all Halts/BreakPoints' |
|
755 |
submenu: |
|
756 |
(Menu |
|
757 |
( |
|
758 |
(MenuItem |
|
759 |
label: 'For Some Time...' |
|
760 |
itemValue: openIgnoreAllHaltsUntilTimeElapsedDialog |
|
761 |
) |
|
762 |
(MenuItem |
|
763 |
label: 'Until Shift-Key is Pressed' |
|
764 |
itemValue: ignoreAllHaltsUntilShiftKeyIsPressed |
|
765 |
) |
|
766 |
(MenuItem |
|
767 |
label: 'Forever (Until Ignoring is Stopped)' |
|
768 |
itemValue: ignoreAllHaltsForever |
|
769 |
) |
|
770 |
) |
|
771 |
nil |
|
772 |
nil |
|
773 |
) |
|
774 |
) |
|
775 |
(MenuItem |
|
776 |
enabled: hasHaltsToIgnore |
|
777 |
label: 'Stop Ignoring' |
|
778 |
itemValue: stopIgnoringHalts |
|
779 |
) |
|
780 |
(MenuItem |
|
781 |
label: '-' |
|
782 |
) |
|
783 |
(MenuItem |
|
784 |
label: 'Manage Breakpoints' |
|
785 |
itemValue: openBreakPointBrowser |
|
786 |
) |
|
787 |
(MenuItem |
|
788 |
label: 'Allow Halt in Debugger' |
|
789 |
itemValue: allowBreakPointsInDebugger: |
|
790 |
indication: allowBreakPointsInDebugger |
|
791 |
) |
|
792 |
) |
|
793 |
nil |
|
794 |
nil |
|
795 |
) |
|
796 |
! |
|
797 |
||
798 |
classMenuSpec |
|
799 |
"This resource specification was automatically generated |
|
800 |
by the MenuEditor of ST/X." |
|
801 |
||
802 |
"Do not manually edit this!! If it is corrupted, |
|
803 |
the MenuEditor may not be able to read the specification." |
|
804 |
||
805 |
||
806 |
" |
|
807 |
MenuEditor new openOnClass:DebugView andSelector:#classMenuSpec |
|
808 |
(Menu new fromLiteralArrayEncoding:(DebugView classMenuSpec)) startUp |
|
809 |
" |
|
810 |
||
811 |
<resource: #menu> |
|
812 |
||
813 |
^ |
|
814 |
#(Menu |
|
815 |
( |
|
816 |
(MenuItem |
|
817 |
enabled: canBrowseImplementingClass |
|
818 |
label: 'Browse Implementing Class' |
|
819 |
itemValue: browseImplementingClass |
|
820 |
) |
|
821 |
(MenuItem |
|
822 |
enabled: canBrowseReceiversClass |
|
823 |
label: 'Browse Receivers Class' |
|
824 |
itemValue: browseReceiversClass |
|
825 |
) |
|
826 |
(MenuItem |
|
827 |
label: '-' |
|
828 |
) |
|
829 |
(MenuItem |
|
830 |
enabled: canBrowseClassHierarchy |
|
831 |
label: 'Browse Receivers Class Hierarchy' |
|
832 |
itemValue: browseClassHierarchy |
|
833 |
isVisible: false |
|
834 |
) |
|
835 |
(MenuItem |
|
836 |
enabled: canBrowseFullClassProtocol |
|
837 |
label: 'Browse Receivers Full Protocol' |
|
838 |
itemValue: browseFullClassProtocol |
|
839 |
isVisible: false |
|
840 |
) |
|
841 |
(MenuItem |
|
842 |
label: '-' |
|
843 |
isVisible: false |
|
844 |
) |
|
845 |
(MenuItem |
|
846 |
enabled: canBrowseProcessesApplication |
|
847 |
label: 'Browse Application Class' |
|
848 |
itemValue: browseProcessesApplication |
|
849 |
) |
|
850 |
) |
|
851 |
nil |
|
852 |
nil |
|
853 |
) |
|
854 |
! |
|
855 |
||
856 |
contextMenuSpec |
|
857 |
"This resource specification was automatically generated |
|
858 |
by the MenuEditor of ST/X." |
|
859 |
||
860 |
"Do not manually edit this!! If it is corrupted, |
|
861 |
the MenuEditor may not be able to read the specification." |
|
862 |
||
863 |
||
864 |
" |
|
865 |
MenuEditor new openOnClass:DebugView andSelector:#contextMenuSpec |
|
866 |
(Menu new fromLiteralArrayEncoding:(DebugView contextMenuSpec)) startUp |
|
867 |
" |
|
868 |
||
869 |
<resource: #menu> |
|
870 |
||
871 |
^ |
|
872 |
#(Menu |
|
873 |
( |
|
874 |
(MenuItem |
|
875 |
enabled: canReturn |
|
876 |
label: 'Return' |
|
877 |
itemValue: doReturn |
|
878 |
) |
|
879 |
(MenuItem |
|
880 |
enabled: canRestart |
|
881 |
label: 'Restart' |
|
882 |
itemValue: doRestart |
|
883 |
) |
|
884 |
(MenuItem |
|
885 |
label: '-' |
|
886 |
) |
|
887 |
(MenuItem |
|
888 |
enabled: hasContextSelected |
|
889 |
label: 'Inspect' |
|
890 |
itemValue: inspectContext |
|
891 |
) |
|
892 |
(MenuItem |
|
893 |
label: 'Copy WalkBack Text' |
|
894 |
itemValue: copyWalkbackText |
|
895 |
) |
|
896 |
(MenuItem |
|
897 |
label: 'Bookmark Method in SystemBrowser' |
|
898 |
itemValue: addBrowserBookmark |
|
899 |
) |
|
900 |
(MenuItem |
|
901 |
label: '-' |
|
902 |
isVisible: false |
|
903 |
) |
|
904 |
(MenuItem |
|
905 |
label: 'Find Handler For...' |
|
906 |
itemValue: findHandlerFor |
|
907 |
isVisible: false |
|
908 |
) |
|
909 |
(MenuItem |
|
910 |
label: '-' |
|
911 |
) |
|
912 |
(MenuItem |
|
913 |
label: 'Remember Callchain && Highlight on Next Entry' |
|
914 |
itemValue: rememberCallchain |
|
915 |
) |
|
916 |
(MenuItem |
|
917 |
label: 'Clear Remembered Callchain' |
|
918 |
itemValue: clearRememberedCallchain |
|
919 |
) |
|
920 |
) |
|
921 |
nil |
|
922 |
nil |
|
923 |
) |
|
924 |
! |
|
925 |
||
926 |
fileMenuSpec |
|
927 |
"This resource specification was automatically generated |
|
928 |
by the MenuEditor of ST/X." |
|
929 |
||
930 |
"Do not manually edit this!! If it is corrupted, |
|
931 |
the MenuEditor may not be able to read the specification." |
|
932 |
||
933 |
||
934 |
" |
|
935 |
MenuEditor new openOnClass:DebugView andSelector:#fileMenuSpec |
|
936 |
(Menu new fromLiteralArrayEncoding:(DebugView fileMenuSpec)) startUp |
|
937 |
" |
|
938 |
||
939 |
<resource: #menu> |
|
940 |
||
941 |
^ |
|
942 |
#(Menu |
|
943 |
( |
|
944 |
(MenuItem |
|
945 |
enabled: canSendEmail |
|
946 |
label: 'Report a Bug via eMail...' |
|
947 |
itemValue: doOpenReportMailApp |
|
948 |
) |
|
949 |
(MenuItem |
|
950 |
label: '-' |
|
951 |
) |
|
952 |
(MenuItem |
|
953 |
enabled: canCloseAllDebuggers |
|
954 |
label: 'Close all Debuggers...' |
|
955 |
itemValue: closeAllDebuggers |
|
956 |
isVisible: isNotInspecting |
|
957 |
) |
|
958 |
(MenuItem |
|
959 |
label: '-' |
|
960 |
) |
|
961 |
(MenuItem |
|
962 |
label: 'Exit' |
|
963 |
itemValue: closeRequest |
|
964 |
isVisible: isInspecting |
|
965 |
) |
|
966 |
(MenuItem |
|
967 |
label: 'Close Debugger and Abort' |
|
968 |
itemValue: closeRequest |
|
969 |
isVisible: isNotInspecting |
|
970 |
) |
|
971 |
) |
|
972 |
nil |
|
973 |
nil |
|
974 |
) |
|
975 |
! |
|
976 |
||
977 |
helpMenuSpec |
|
978 |
"This resource specification was automatically generated |
|
979 |
by the MenuEditor of ST/X." |
|
980 |
||
981 |
"Do not manually edit this!! If it is corrupted, |
|
982 |
the MenuEditor may not be able to read the specification." |
|
983 |
||
984 |
||
985 |
" |
|
986 |
MenuEditor new openOnClass:DebugView andSelector:#helpMenuSpec |
|
987 |
(Menu new fromLiteralArrayEncoding:(DebugView helpMenuSpec)) startUp |
|
988 |
" |
|
989 |
||
990 |
<resource: #menu> |
|
991 |
||
992 |
^ |
|
993 |
#(Menu |
|
994 |
( |
|
995 |
(MenuItem |
|
996 |
label: 'Debugger''s Documentation' |
|
997 |
itemValue: openHTMLDocument: |
|
998 |
argument: 'tools/debugger/TOP.html' |
|
999 |
) |
|
1000 |
(MenuItem |
|
1001 |
label: '-' |
|
1002 |
) |
|
1003 |
(MenuItem |
|
1004 |
label: 'About DebugView...' |
|
1005 |
itemValue: openAboutThisApplication |
|
1006 |
) |
|
1007 |
) |
|
1008 |
nil |
|
1009 |
nil |
|
1010 |
) |
|
1011 |
! |
|
1012 |
||
3269 | 1013 |
menuSpec |
1014 |
"This resource specification was automatically generated |
|
1015 |
by the MenuEditor of ST/X." |
|
1016 |
||
1017 |
"Do not manually edit this!! If it is corrupted, |
|
1018 |
the MenuEditor may not be able to read the specification." |
|
1019 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1020 |
|
3269 | 1021 |
" |
1022 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
1023 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
1024 |
" |
|
1025 |
||
1026 |
<resource: #menu> |
|
1027 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1028 |
^ |
5875 | 1029 |
#(Menu |
11210 | 1030 |
( |
1031 |
(MenuItem |
|
1032 |
label: 'File' |
|
12437 | 1033 |
submenuChannel: fileMenuSpec |
11210 | 1034 |
) |
1035 |
(MenuItem |
|
1036 |
label: 'View' |
|
12437 | 1037 |
submenuChannel: viewMenuSpec |
11210 | 1038 |
) |
1039 |
(MenuItem |
|
12534 | 1040 |
label: 'Process' |
1041 |
submenuChannel: processMenuSpec |
|
11210 | 1042 |
) |
1043 |
(MenuItem |
|
1044 |
label: 'Context' |
|
12437 | 1045 |
submenuChannel: contextMenuSpec |
11210 | 1046 |
) |
1047 |
(MenuItem |
|
1048 |
label: 'Class' |
|
12437 | 1049 |
submenuChannel: classMenuSpec |
11210 | 1050 |
) |
1051 |
(MenuItem |
|
1052 |
label: 'Selector' |
|
12437 | 1053 |
submenuChannel: selectorMenuSpec |
11210 | 1054 |
) |
1055 |
(MenuItem |
|
1056 |
label: 'Breakpoint' |
|
12437 | 1057 |
submenuChannel: breakPointMenuSpec |
11210 | 1058 |
) |
1059 |
(MenuItem |
|
1060 |
label: 'Help' |
|
12437 | 1061 |
startGroup: conditionalRight |
1062 |
submenuChannel: helpMenuSpec |
|
1063 |
) |
|
1064 |
) |
|
1065 |
nil |
|
1066 |
nil |
|
1067 |
) |
|
1068 |
! |
|
1069 |
||
1070 |
processMenuSpec |
|
1071 |
"This resource specification was automatically generated |
|
1072 |
by the MenuEditor of ST/X." |
|
1073 |
||
1074 |
"Do not manually edit this!! If it is corrupted, |
|
1075 |
the MenuEditor may not be able to read the specification." |
|
1076 |
||
1077 |
||
1078 |
" |
|
1079 |
MenuEditor new openOnClass:DebugView andSelector:#processMenuSpec |
|
1080 |
(Menu new fromLiteralArrayEncoding:(DebugView processMenuSpec)) startUp |
|
1081 |
" |
|
1082 |
||
1083 |
<resource: #menu> |
|
1084 |
||
1085 |
^ |
|
1086 |
#(Menu |
|
1087 |
( |
|
1088 |
(MenuItem |
|
1089 |
label: 'Continue' |
|
1090 |
itemValue: doContinue |
|
1091 |
) |
|
1092 |
(MenuItem |
|
1093 |
label: 'Next (Line-Step)' |
|
1094 |
itemValue: doNext |
|
1095 |
) |
|
1096 |
(MenuItem |
|
1097 |
label: 'Step' |
|
1098 |
itemValue: doStep |
|
1099 |
) |
|
1100 |
(MenuItem |
|
1101 |
label: '-' |
|
1102 |
) |
|
1103 |
(MenuItem |
|
1104 |
label: 'Change Priority...' |
|
1105 |
itemValue: doChangeProcessPriority |
|
1106 |
) |
|
1107 |
(MenuItem |
|
1108 |
label: '-' |
|
1109 |
) |
|
1110 |
(MenuItem |
|
1111 |
label: 'Abort' |
|
1112 |
itemValue: doAbort |
|
1113 |
) |
|
1114 |
(MenuItem |
|
1115 |
enabled: abortAllIsHandled |
|
1116 |
label: 'Abort All' |
|
1117 |
itemValue: doAbortAll |
|
1118 |
) |
|
1119 |
(MenuItem |
|
1120 |
label: '-' |
|
1121 |
) |
|
1122 |
(MenuItem |
|
1123 |
label: 'Terminate' |
|
1124 |
itemValue: doTerminate |
|
1125 |
) |
|
1126 |
) |
|
1127 |
nil |
|
1128 |
nil |
|
1129 |
) |
|
1130 |
! |
|
1131 |
||
1132 |
selectorMenuSpec |
|
1133 |
"This resource specification was automatically generated |
|
1134 |
by the MenuEditor of ST/X." |
|
1135 |
||
1136 |
"Do not manually edit this!! If it is corrupted, |
|
1137 |
the MenuEditor may not be able to read the specification." |
|
1138 |
||
1139 |
||
1140 |
" |
|
1141 |
MenuEditor new openOnClass:DebugView andSelector:#selectorMenuSpec |
|
1142 |
(Menu new fromLiteralArrayEncoding:(DebugView selectorMenuSpec)) startUp |
|
1143 |
" |
|
1144 |
||
1145 |
<resource: #menu> |
|
1146 |
||
1147 |
^ |
|
1148 |
#(Menu |
|
1149 |
( |
|
1150 |
(MenuItem |
|
1151 |
label: 'Browse Implementors...' |
|
1152 |
itemValue: browseImplementorsOf |
|
1153 |
) |
|
1154 |
(MenuItem |
|
1155 |
label: 'Browse Senders...' |
|
1156 |
itemValue: browseSendersOf |
|
1157 |
) |
|
1158 |
(MenuItem |
|
1159 |
label: '-' |
|
1160 |
) |
|
1161 |
(MenuItem |
|
1162 |
enabled: canDefineMethod |
|
1163 |
label: 'Define Missing Method' |
|
1164 |
itemValue: doDefineMethod |
|
1165 |
) |
|
1166 |
) |
|
1167 |
nil |
|
1168 |
nil |
|
1169 |
) |
|
1170 |
! |
|
1171 |
||
1172 |
viewMenuSpec |
|
1173 |
"This resource specification was automatically generated |
|
1174 |
by the MenuEditor of ST/X." |
|
1175 |
||
1176 |
"Do not manually edit this!! If it is corrupted, |
|
1177 |
the MenuEditor may not be able to read the specification." |
|
1178 |
||
1179 |
||
1180 |
" |
|
1181 |
MenuEditor new openOnClass:DebugView andSelector:#viewMenuSpec |
|
1182 |
(Menu new fromLiteralArrayEncoding:(DebugView viewMenuSpec)) startUp |
|
1183 |
" |
|
1184 |
||
1185 |
<resource: #menu> |
|
1186 |
||
1187 |
^ |
|
1188 |
#(Menu |
|
1189 |
( |
|
1190 |
(MenuItem |
|
1191 |
enabled: canShowMore |
|
1192 |
label: 'Show More WalkBack' |
|
1193 |
itemValue: showMoreWalkback |
|
1194 |
) |
|
1195 |
(MenuItem |
|
1196 |
enabled: canShowMore |
|
1197 |
label: 'Show Full WalkBack' |
|
1198 |
itemValue: showFullWalkback |
|
1199 |
) |
|
1200 |
(MenuItem |
|
1201 |
label: '-' |
|
1202 |
) |
|
1203 |
(MenuItem |
|
1204 |
label: 'Show Dense WalkBack' |
|
1205 |
itemValue: showingDenseWalkback: |
|
1206 |
hideMenuOnActivated: false |
|
1207 |
indication: showingDenseWalkback |
|
1208 |
) |
|
1209 |
(MenuItem |
|
1210 |
label: 'Show Support Code (Implementation of Enumerations, Exceptions etc.)' |
|
1211 |
itemValue: showingSupportCode: |
|
1212 |
hideMenuOnActivated: false |
|
1213 |
indication: showingSupportCode |
|
1214 |
) |
|
1215 |
(MenuItem |
|
1216 |
label: '-' |
|
1217 |
) |
|
1218 |
(MenuItem |
|
1219 |
label: 'Raise Debugger when Entering' |
|
1220 |
itemValue: autoRaiseView: |
|
1221 |
hideMenuOnActivated: false |
|
1222 |
indication: autoRaiseView |
|
1223 |
) |
|
1224 |
(MenuItem |
|
1225 |
label: '-' |
|
1226 |
) |
|
1227 |
(MenuItem |
|
1228 |
label: 'Settings...' |
|
1229 |
itemValue: openSettingsDialog |
|
11210 | 1230 |
) |
1231 |
) |
|
1232 |
nil |
|
1233 |
nil |
|
3269 | 1234 |
) |
1235 |
! ! |
|
1236 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1237 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1238 |
|
4121 | 1239 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1240 |
"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
|
1241 |
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
|
1242 |
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
|
1243 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1244 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1245 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1246 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1247 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1248 |
someContexts := Array new:25. |
2042 | 1249 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1250 |
idx := 1. |
10205 | 1251 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
11210 | 1252 |
someContexts at:idx put:con. |
1253 |
con := con sender. |
|
1254 |
idx := idx + 1. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1255 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1256 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1257 |
^ someContexts at:idx. |
3447 | 1258 |
! |
1259 |
||
10205 | 1260 |
interestingContextIndexIn:aContextArray |
12039 | 1261 |
"return an interesting context's index, or nil. |
1262 |
This is the context initially shown (selected) in the walkback. |
|
3447 | 1263 |
We move up the calling chain, skipping all intermediate Signal |
12039 | 1264 |
and Exception contexts, to present the context in which the error actually occured. |
3447 | 1265 |
Just for your convenience :-)" |
1266 |
||
8152 | 1267 |
|con found offset sel prev ex rcvr nMax idx| |
3447 | 1268 |
|
7713 | 1269 |
"/ Transcript showCR:aContextArray. |
7648 | 1270 |
|
3447 | 1271 |
nMax := aContextArray size. |
1272 |
nMax <= 1 ifTrue:[^ 1]. |
|
1273 |
con := aContextArray at:1. |
|
1274 |
con isBlockContext ifTrue:[^ 1]. |
|
12039 | 1275 |
(con method notNil and:[ con method isWrapped ]) ifTrue:[^ 1]. "/ we are already there |
3447 | 1276 |
|
1277 |
"/ somewhere, at the bottom, there must be a raise ... |
|
1278 |
"/ find the exception |
|
1279 |
1 to:5 do:[:i | |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1280 |
con := aContextArray at:i ifAbsent:nil. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1281 |
con notNil ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1282 |
sel := con selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1283 |
(sel startsWith:'raise') ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1284 |
rcvr := con receiver. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1285 |
(rcvr isLazyValue not and:[rcvr isException]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1286 |
ex := rcvr. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1287 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1288 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1289 |
] ifFalse:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1290 |
(rcvr isLazyValue not and:[rcvr isExceptionCreator]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1291 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1292 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1293 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1294 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1295 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1296 |
]. |
3447 | 1297 |
]. |
12039 | 1298 |
"/ Transcript showCR:con. |
3447 | 1299 |
" |
1300 |
if this is a noHandler exception, skip forward |
|
1301 |
to the erronous context |
|
1302 |
" |
|
1303 |
ex notNil ifTrue:[ |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1304 |
ex signal == Signal noHandlerSignal ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1305 |
found := ex suspendedContext |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1306 |
] |
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 |
"/ Transcript show:'1 '; showCR:found. |
3447 | 1309 |
found isNil ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1310 |
"/ this is a kludge, but convenient. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1311 |
"/ show the place where the error (divisionByZero...) happend, |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1312 |
"/ not where the signal was raised. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1313 |
con := (aContextArray at:1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1314 |
sel := con methodHome selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1315 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1316 |
"/ typically a DivisionByZero - show caller of division |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1317 |
(sel == #// |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1318 |
or:[sel == #/ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1319 |
or:[sel == #\\]]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1320 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1321 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1322 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1323 |
"/ 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
|
1324 |
(sel == #doesNotUnderstand:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1325 |
idx := 3. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1326 |
nMax > 2 ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1327 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1328 |
sel == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1329 |
idx := 4 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1330 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1331 |
nMax > idx ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1332 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1333 |
"/ 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
|
1334 |
((sel == #perform:) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1335 |
or:[sel startsWith:'perform:with']) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1336 |
idx := idx + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1337 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1338 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1339 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1340 |
^ idx min:nMax |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1341 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1342 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1343 |
"/ show the bad method; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1344 |
(sel == #noByteCode) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1345 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1346 |
]. |
3447 | 1347 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1348 |
"/ "/ 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
|
1349 |
"/ ((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1350 |
"/ ^ 2 |
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 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1353 |
"/ "/ 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
|
1354 |
"/ (sel == #shouldImplement) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1355 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1356 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1357 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1358 |
"/ "/ 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
|
1359 |
"/ ((sel == #error:mayProceed:) |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1360 |
"/ or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1361 |
"/ nMax > 2 ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1362 |
"/ sel := (aContextArray at:2) selector. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1363 |
"/ sel == #mustBeBoolean ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1364 |
"/ ^ 3 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1365 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1366 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1367 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1368 |
"/ ]. |
7862 | 1369 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1370 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1371 |
(sel == #signalInterrupt:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1372 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1373 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1374 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1375 |
"/ "/ 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
|
1376 |
"/ ((sel == #error) or:[sel == #error:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1377 |
"/ con method mclass == Object ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1378 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1379 |
"/ ] |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1380 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1381 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1382 |
"/ "/ 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
|
1383 |
"/ (sel == #subclassResponsibility) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1384 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1385 |
"/ ]. |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
1386 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1387 |
"/ 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
|
1388 |
( #(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1389 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1390 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1391 |
#elementBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1392 |
"/ #subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1393 |
) includes:sel) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1394 |
idx := 2. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1395 |
[ idx <= 3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1396 |
and:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1397 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1398 |
#(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1399 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1400 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1401 |
#elementBoundsError: ) includes:sel |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1402 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1403 |
] whileTrue:[ idx := idx + 1 ]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1404 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1405 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1406 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1407 |
sel := (aContextArray at:idx+1) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1408 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1409 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1410 |
sel := (aContextArray at:idx+2) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1411 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1412 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1413 |
^ idx+3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1414 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1415 |
^ idx+2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1416 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1417 |
^ idx+1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1418 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1419 |
^ idx |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1420 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1421 |
offset := 1. |
8152 | 1422 |
]. |
1423 |
||
1424 |
"/ the above is all too hard-coded; |
|
1425 |
"/ ask the method, if it thinks it should be skipped in the walkback. |
|
1426 |
"/ as more methods get flagged, remove code from above. |
|
1427 |
con := aContextArray at:offset ifAbsent:nil. |
|
1428 |
||
10205 | 1429 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1430 |
con notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1431 |
and:[ con methodHome notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1432 |
and:[ con methodHome method notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1433 |
and:[ con methodHome method shouldBeSkippedInDebuggersWalkBack ]]] |
8152 | 1434 |
] whileTrue:[ |
1435 |
"/ Transcript showCR:con methodHome method. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1436 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1437 |
con := aContextArray at:offset ifAbsent:nil. |
8152 | 1438 |
]. |
3447 | 1439 |
|
1440 |
" |
|
1441 |
got it; move up, skipping all intermediate Signal and |
|
1442 |
Exception contexts |
|
1443 |
" |
|
1444 |
prev := nil. |
|
1445 |
rcvr := con receiver. |
|
10205 | 1446 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1447 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 1448 |
] whileTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1449 |
prev := con. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1450 |
nMax > offset ifFalse:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1451 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1452 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1453 |
con := aContextArray at:offset. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1454 |
rcvr := con receiver. |
3447 | 1455 |
]. |
1456 |
||
1457 |
" |
|
1458 |
now, we are one above the raising context |
|
1459 |
" |
|
1460 |
||
1461 |
" |
|
1462 |
if the sender-method of the raise is one of objects error methods ... |
|
1463 |
" |
|
10205 | 1464 |
( #( halt halt: |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1465 |
error error: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1466 |
doesNotUnderstand: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1467 |
subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1468 |
primitiveFailed) includes:con selector) |
3447 | 1469 |
ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1470 |
con selector == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1471 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1472 |
one more up, to get to the originating context |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1473 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1474 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1475 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1476 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1477 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1478 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1479 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1480 |
offset := offset + 1. |
3447 | 1481 |
] ifFalse:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1482 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1483 |
ok, got the raise - if its a BreakPoint, look for the sender |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1484 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1485 |
(prev notNil and:[prev receiver == BreakPointInterrupt]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1486 |
offset := offset + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1487 |
]. |
3447 | 1488 |
]. |
1489 |
||
1490 |
^ offset |
|
1491 |
||
7713 | 1492 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1493 |
"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
|
1494 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1495 |
|
73 | 1496 |
!DebugView methodsFor:'basic'! |
1497 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1498 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1499 |
|m| |
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 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1502 |
m notNil ifTrue:[ |
11210 | 1503 |
self updateMenuItems. |
1504 |
||
1505 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
|
1506 |
abortButton enable. |
|
1507 |
m enable:#doAbort. |
|
1508 |
] ifFalse:[ |
|
1509 |
abortButton disable. |
|
1510 |
m disable:#doAbort. |
|
1511 |
]. |
|
1512 |
exclusive ifTrue:[ |
|
1513 |
terminateButton disable. |
|
1514 |
m disable:#doTerminate. |
|
1515 |
] ifFalse:[ |
|
1516 |
terminateButton enable. |
|
1517 |
m enable:#doTerminate. |
|
1518 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1519 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1520 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1521 |
mayProceed == false ifTrue:[ |
11210 | 1522 |
continueButton disable. |
1523 |
m notNil ifTrue:[m disable:#doContinue]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1524 |
] ifFalse:[ |
11210 | 1525 |
continueButton enable. |
1526 |
m notNil ifTrue:[m enable:#doContinue] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1527 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1528 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1529 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1530 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1531 |
|
1364 | 1532 |
enter:aContext select:initialSelectionOrNil |
73 | 1533 |
"enter the debugger - get and display the context, then start an |
1534 |
exclusive event loop on top of eveything else" |
|
1535 |
||
3447 | 1536 |
<context: #return> |
1537 |
||
9076 | 1538 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
3447 | 1539 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1540 |
DebuggingDebugger == true ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1541 |
'==> enter2: (' print. aContext print. |
11210 | 1542 |
') select: ' print. initialSelectionOrNil printCR. |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1543 |
]. |
3447 | 1544 |
thisContext isRecursive ifTrue:[ |
11210 | 1545 |
"/ care for the special case, were the Debugger was autoloaded. |
1546 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1547 |
"/ condition. |
|
1548 |
foundNoByteCodeContext := false. |
|
1549 |
foundExitContext := false. |
|
1550 |
||
1551 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1552 |
[ |
|
1553 |
foundNoByteCodeContext not |
|
1554 |
and:[ foundExitContext not |
|
1555 |
and:[c notNil |
|
1556 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
|
1557 |
]]]] |
|
1558 |
whileTrue:[ |
|
1559 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1560 |
foundExitContext := true |
|
1561 |
]. |
|
1562 |
c selector == #noByteCode ifTrue:[ |
|
1563 |
foundNoByteCodeContext := true |
|
1564 |
]. |
|
1565 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1566 |
]. |
|
1567 |
||
1568 |
(foundNoByteCodeContext not |
|
1569 |
and:[ foundExitContext not]) ifFalse:[ |
|
1570 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1571 |
||
1572 |
^ MiniDebugger |
|
1573 |
enter:aContext |
|
1574 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1575 |
mayProceed:mayProceed. |
|
1576 |
]. |
|
1577 |
foundExitContext ifTrue:[ |
|
1578 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1579 |
^ self. |
|
1580 |
]. |
|
3447 | 1581 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1582 |
|
10203 | 1583 |
"/'entering: ' print. aContext printCR. |
1584 |
"/'initial: ' print. initialSelectionOrNil printCR. |
|
8170 | 1585 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1586 |
||
11890 | 1587 |
(self isHaltToBeIgnored) ifTrue:[ |
11210 | 1588 |
^ self. |
8170 | 1589 |
]. |
11892 | 1590 |
"/ "/ does not work yet - but we should ignore any breakpoints while stepping |
1591 |
"/ (stepping and:[steppedContext notNil]) ifTrue:[ |
|
1592 |
"/ self isEnteredDueToBreakpointOrHalt ifTrue:[ |
|
1593 |
"/ 'DebugView [info]: ignored other interrupt while stepping' infoPrintCR. |
|
1594 |
"/ ^ self |
|
1595 |
"/ ]. |
|
1596 |
"/ ]. |
|
8170 | 1597 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1598 |
iAmNew := drawableId isNil. |
73 | 1599 |
|
8148 | 1600 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 1601 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1602 |
busy := cachable := true. |
73 | 1603 |
inspecting := false. |
1604 |
inspectedProcess := Processor activeProcess. |
|
1605 |
stepping := false. |
|
1606 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1607 |
stepHow := nil. |
8148 | 1608 |
nChainShown := InitialNChainShown. |
73 | 1609 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1610 |
"/ if debugger is entered while a box has grabbed the |
9076 | 1611 |
"/ 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
|
1612 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1613 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1614 |
"/ 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
|
1615 |
"/ 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
|
1616 |
"/ 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
|
1617 |
Screen allScreens do:[:aScreen | |
11210 | 1618 |
aScreen ungrabPointer. |
1619 |
aScreen ungrabKeyboard. |
|
10205 | 1620 |
]. |
1621 |
||
1622 |
("inspectedProcess suspendedContext isNil |
|
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1623 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
11210 | 1624 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1625 |
] ifFalse:[ |
11210 | 1626 |
terminateButton enable. |
1627 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1628 |
]. |
73 | 1629 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1630 |
iAmNew ifFalse:[ |
11210 | 1631 |
"/ not the first time - disable buttons & menus |
1632 |
"/ from the previous life |
|
1633 |
self turnOffAllButtons. |
|
1634 |
||
1635 |
m := contextView middleButtonMenu. |
|
1636 |
m notNil ifTrue:[ |
|
1637 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
|
1638 |
]. |
|
11697 | 1639 |
self showingDenseWalkback:(verboseBacktrace not). |
132 | 1640 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1641 |
self iconLabel:'Debugger'. |
132 | 1642 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1643 |
windowGroup isNil ifTrue:[ |
11210 | 1644 |
self windowGroup: WindowGroup new. |
1645 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1646 |
]. |
132 | 1647 |
exclusive ifFalse:[ |
11210 | 1648 |
"/ create a (modal) windowGroup for myself |
1649 |
||
1650 |
windowGroup setModal:true. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1651 |
] ifTrue:[ |
11210 | 1652 |
"/ create a windowGroup with a synchronous sensor for me |
1653 |
||
1654 |
windowGroup beSynchronous. |
|
73 | 1655 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1656 |
windowGroup setProcess:Processor activeProcess. |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1657 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1658 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1659 |
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
|
1660 |
" |
12039 | 1661 |
"/Transcript show:'0 '; showCR:aContext. |
1662 |
"/Transcript show:'0 '; showCR:thisContext sender. |
|
1663 |
"/Transcript show:'0 '; showCR:thisContext sender sender. |
|
1664 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender. |
|
1665 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender. |
|
1666 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender. |
|
1667 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender. |
|
1668 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender. |
|
1669 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender . |
|
1670 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender. |
|
1671 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender. |
|
1672 |
"/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender sender. |
|
1673 |
"/Transcript showCR:initialSelectionOrNil. |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1674 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1675 |
"/'after setContext; first is ' print. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1676 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1677 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1678 |
|
12039 | 1679 |
IsDebuggingQuery answer:true do:[ |
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1680 |
self updateButtonsAndMenuItemsForContext:aContext. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1681 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1682 |
" |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1683 |
If this is a new debugger, do a realize. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1684 |
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
|
1685 |
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
|
1686 |
position again |
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 |
iAmNew ifFalse:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1689 |
self remap. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1690 |
] ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1691 |
self realize. |
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 |
self setForegroundWindow. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1694 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1695 |
exclusive ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1696 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1697 |
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
|
1698 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1699 |
This is a modal debugger - all event processing is stopped.. |
10205 | 1700 |
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
|
1701 |
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
|
1702 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1703 |
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
|
1704 |
]. |
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 |
self autoRaiseView ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1707 |
"/ self raise. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1708 |
self raiseDeiconified. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1709 |
self topView activate; setForegroundWindow; activate. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1710 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1711 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1712 |
canContinue := true. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1713 |
exitAction := nil. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1714 |
|
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1715 |
"/ 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
|
1716 |
"/ 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
|
1717 |
"/ closedown of the debugger. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1718 |
[self controlLoop] ifCurtailed:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1719 |
windowGroup notNil ifTrue:[ |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1720 |
windowGroup setProcess:nil. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1721 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1722 |
self destroy |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1723 |
]. |
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
1724 |
]. |
10203 | 1725 |
"/ here after my own control loop is finished. |
1726 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1727 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1728 |
"/ 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
|
1729 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1730 |
contextView contents:nil. |
1731 |
||
73 | 1732 |
codeView acceptAction:nil. |
942 | 1733 |
codeView doItAction:nil. |
73 | 1734 |
|
4892 | 1735 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
11210 | 1736 |
ObjectMemory stepInterruptHandler:nil. |
4892 | 1737 |
]. |
1738 |
||
11911 | 1739 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
1740 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
|
1741 |
||
73 | 1742 |
(exitAction ~~ #step) ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1743 |
"/ not stepping or continue - close window |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
1744 |
self cacheMyself. |
11210 | 1745 |
receiverInspector release. |
1746 |
contextInspector release. |
|
1747 |
||
1748 |
self unmap. |
|
1749 |
device flush. |
|
1750 |
||
1751 |
(exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
|
1752 |
(exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
|
1753 |
(exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
|
1754 |
(exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
|
1755 |
(exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
|
1756 |
(exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
|
1757 |
exitAction isBlock ifTrue:[ |
|
1758 |
self exit_unwindThenDo:exitAction. |
|
1759 |
"does not return" |
|
1760 |
]. |
|
1761 |
"not reached" |
|
1762 |
^ self |
|
73 | 1763 |
]. |
1764 |
||
3447 | 1765 |
"/ stepping - window stays open |
940 | 1766 |
selectedContext := actualContext := firstContext := nil. |
73 | 1767 |
|
2472 | 1768 |
"/ restore the previous pointer grab |
73 | 1769 |
grabber notNil ifTrue:[ |
11210 | 1770 |
device grabPointerInView:grabber. |
1771 |
grabber := nil. |
|
61 | 1772 |
]. |
73 | 1773 |
|
1774 |
(exitAction == #step) ifTrue:[ |
|
11210 | 1775 |
" |
1776 |
schedule another stepInterrupt |
|
1777 |
- must enter myself into the collection of open debuggers, |
|
1778 |
in case the stepping process comes back again via a halt or signal |
|
1779 |
before the step is finished. In this case, the stepping debugger should |
|
1780 |
come up (instead of a new one) |
|
1781 |
- must flush caches since optimized methods not always |
|
1782 |
look for pending interrupts |
|
1783 |
" |
|
1784 |
||
1785 |
"/ |
|
1786 |
"/ also must care for stepping into a return |
|
1787 |
"/ |
|
1788 |
steppedContext notNil ifTrue:[ |
|
1789 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
|
1790 |
]. |
|
1791 |
||
1792 |
OpenDebuggers isNil ifTrue:[ |
|
1793 |
OpenDebuggers := WeakIdentitySet new. |
|
1794 |
]. |
|
1795 |
OpenDebuggers add:self. |
|
1796 |
||
1797 |
self label:'single stepping - please wait ...'. |
|
1798 |
stepping := true. |
|
1799 |
||
1800 |
ObjectMemory stepInterruptHandler:self. |
|
1801 |
Processor activeProcess stepInterruptHandler:self. |
|
1802 |
ObjectMemory flushCaches. |
|
1803 |
||
1804 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
|
1805 |
Context singleStepInterruptRequest |
|
1806 |
raiseWith: |
|
1807 |
(("bigStep" steppedContextLineno notNil) |
|
1808 |
ifTrue:[#next] |
|
1809 |
ifFalse:[#step]) |
|
1810 |
] ifFalse:[ |
|
1811 |
"/ see if we came here through an interrupt-action |
|
1812 |
"/ (i.e. aProcess interruptWith:...) |
|
1813 |
||
1814 |
enteredByInterrupt := false. |
|
1815 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1816 |
[enteredByInterrupt not |
|
1817 |
and:[con notNil |
|
1818 |
and:[con ~~ aContext]]] whileTrue:[ |
|
1819 |
((sel := con selector) == #timerInterrupt |
|
1820 |
or:[sel == #ioInterrupt]) ifTrue:[ |
|
1821 |
enteredByInterrupt := true. |
|
1822 |
] ifFalse:[ |
|
1823 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1824 |
]. |
|
1825 |
]. |
|
1826 |
||
1827 |
ObjectMemory flushInlineCaches. |
|
1828 |
||
1829 |
DebuggingDebugger == true ifTrue:[ |
|
1830 |
enteredByInterrupt printCR. |
|
1831 |
]. |
|
1832 |
enteredByInterrupt ifTrue:[ |
|
11890 | 1833 |
"/ don't want to step through all intermediate |
11210 | 1834 |
"/ (scheduler-) contexts; place a return-trap on the |
1835 |
"/ one right below the interesting one |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1836 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1837 |
"/ 'special unwind return' printCR. |
11210 | 1838 |
con unwindThenDo:[ |
1839 |
Processor activeProcess stepInterruptHandler:self. |
|
1840 |
ObjectMemory stepInterruptHandler:self. |
|
1841 |
InStepInterrupt := nil. |
|
1842 |
StepInterruptPending := 1. |
|
1843 |
InterruptPending := 1]. |
|
1844 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1845 |
"/ 'normal step return' printCR. |
11210 | 1846 |
skipLineNr ~~ #return ifTrue:[ |
1847 |
StepInterruptPending := 1. |
|
1848 |
InterruptPending := 1. |
|
1849 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1850 |
"/ 'step for return' printCR. |
11210 | 1851 |
] |
1852 |
]. |
|
1853 |
InStepInterrupt := nil |
|
1854 |
] |
|
73 | 1855 |
] ifFalse:[ |
11210 | 1856 |
OpenDebuggers notNil ifTrue:[ |
1857 |
OpenDebuggers remove:self ifAbsent:[]. |
|
1858 |
]. |
|
1859 |
self cacheMyself. |
|
73 | 1860 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1861 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1862 |
"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
|
1863 |
"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
|
1864 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
11697 | 1865 |
"Modified: / 27-07-2012 / 17:35:56 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1866 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1867 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1868 |
exit_abort |
5455 | 1869 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
1870 |
"/ that one would run on top of this context. |
|
1871 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1872 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1873 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1874 |
"/ done in the #enter:select method. |
5455 | 1875 |
"/ You are not expected to understand this. |
1876 |
||
6487 | 1877 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
1878 |
! |
|
1879 |
||
1880 |
exit_abortAll |
|
1881 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1882 |
"/ that one would run on top of this context. |
|
1883 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1884 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1885 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1886 |
"/ done in the #enter:select method. |
6487 | 1887 |
"/ You are not expected to understand this. |
1888 |
||
1889 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1890 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1891 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1892 |
exit_quickTerminate |
3447 | 1893 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1894 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1895 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1896 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 1897 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1898 |
! |
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 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1901 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1902 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1903 |
selectedContext notNil ifTrue:[ |
11210 | 1904 |
con := selectedContext. |
1905 |
self cacheMyself. |
|
1906 |
" |
|
1907 |
have to catch errors occuring in unwind-blocks |
|
1908 |
" |
|
1909 |
Error handle:[:ex | |
|
1910 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1911 |
ex description infoPrintCR. |
|
1912 |
ex proceed |
|
1913 |
] do:[ |
|
1914 |
con unwindAndRestart. |
|
1915 |
]. |
|
1916 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1917 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1918 |
|
11818 | 1919 |
"Created: / 16-11-2001 / 17:23:17 / cg" |
11819 | 1920 |
"Modified: / 26-09-2012 / 15:09:52 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1921 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1922 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1923 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1924 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1925 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1926 |
selectedContext notNil ifTrue:[ |
11210 | 1927 |
" |
1928 |
if there is a selection in the codeView, |
|
1929 |
evaluate it and use the result as return value |
|
1930 |
" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1931 |
"/ 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
|
1932 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1933 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1934 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1935 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1936 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1937 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1938 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1939 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1940 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1941 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1942 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1943 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1944 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1945 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1946 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1947 |
|
11210 | 1948 |
con := selectedContext. |
1949 |
self cacheMyself. |
|
1950 |
" |
|
1951 |
have to catch errors occuring in unwind-blocks |
|
1952 |
" |
|
1953 |
Error handle:[:ex | |
|
1954 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1955 |
ex description infoPrintCR. |
|
1956 |
ex proceed |
|
1957 |
] do:[ |
|
1958 |
con unwind:retVal. |
|
1959 |
]. |
|
1960 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
|
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 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1963 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 1964 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1965 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1966 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1967 |
exit_terminate |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1968 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1969 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1970 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1971 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1972 |
Error handle:[:ex | |
11210 | 1973 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1974 |
ex description infoPrintCR. |
|
1975 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1976 |
] do:[ |
11210 | 1977 |
self cacheMyself. |
1978 |
Processor activeProcess terminate. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1979 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1980 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1981 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1982 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 1983 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
1984 |
! |
|
1985 |
||
6487 | 1986 |
exit_unwindThenDo:aBlock |
1987 |
|con| |
|
1988 |
||
1989 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1990 |
"/ that one would run on top of this context. |
|
1991 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1992 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1993 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1994 |
"/ done in the #enter:select method. |
6487 | 1995 |
"/ You are not expected to understand this. |
1996 |
||
1997 |
" |
|
1998 |
have to catch errors occuring in unwind-blocks |
|
1999 |
" |
|
2000 |
self cacheMyself. |
|
2001 |
||
2002 |
Error handle:[:ex | |
|
11210 | 2003 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
2004 |
ex description infoPrintCR. |
|
2005 |
||
2006 |
ex proceed |
|
6487 | 2007 |
] do:[ |
11210 | 2008 |
"/ find the enter:select context. |
2009 |
con := thisContext sender. |
|
2010 |
[ |
|
2011 |
(con selector == #enter:select:) |
|
2012 |
and:[con receiver == self] |
|
2013 |
] |
|
2014 |
whileFalse:[ con := con sender ]. |
|
2015 |
||
2016 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
2017 |
con sender receiver == self class ifTrue:[ |
|
2018 |
con := con sender. |
|
2019 |
con sender receiver == self class ifTrue:[ |
|
2020 |
con := con sender. |
|
2021 |
con isBlockContext ifTrue:[ |
|
2022 |
con := con methodHome. |
|
2023 |
] |
|
2024 |
]. |
|
2025 |
]. |
|
2026 |
||
2027 |
con unwindThenDo:aBlock. |
|
6487 | 2028 |
]. |
2029 |
'DebugView [warning]: abort failed' errorPrintCR |
|
2030 |
||
2031 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
2032 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
2033 |
! |
|
2034 |
||
3447 | 2035 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
2036 |
|selection con1 con2 h| |
|
2037 |
||
2038 |
initialSelectionOrNil notNil ifTrue:[ |
|
11210 | 2039 |
^ initialSelectionOrNil |
3447 | 2040 |
]. |
2041 |
||
2042 |
" |
|
2043 |
and find the one context to show initially |
|
2044 |
- if we came here by a send (single step), its the top context; |
|
2045 |
- if we came here by a step (i.e. bigStep), its the top context |
|
2046 |
(for ifs and whiles) or the sender (for regular sends). |
|
2047 |
- otherwise, we came here by some signal raise, and we are interested |
|
2048 |
in the context where the raise actually occured. |
|
2049 |
" |
|
2050 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
2051 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
12039 | 2052 |
"/ Transcript show:'x '; showCR:exitAction. |
2053 |
||
2054 |
"/ came here via a step? |
|
3447 | 2055 |
exitAction == #step ifTrue:[ |
11210 | 2056 |
selection := 1. |
2057 |
steppedContext notNil ifTrue:[ |
|
2058 |
||
2059 |
" |
|
2060 |
if we came here by a big-step, show the method where we are |
|
2061 |
" |
|
2062 |
con1 == steppedContext ifTrue:[ |
|
2063 |
selection := 1 |
|
2064 |
] ifFalse:[ |
|
2065 |
con2 == steppedContext ifTrue:[ |
|
2066 |
selection := 2 |
|
2067 |
] |
|
2068 |
]. |
|
2069 |
" |
|
2070 |
for bigStep, we could also be in a block below the actual method ... |
|
2071 |
" |
|
2072 |
((h := con1 home) notNil |
|
2073 |
and:[h == steppedContext]) ifTrue:[ |
|
2074 |
selection := 1 |
|
2075 |
] ifFalse:[ |
|
2076 |
(con2 notNil |
|
2077 |
and:[(h := con2 home) notNil |
|
2078 |
and:[h == steppedContext]]) ifTrue:[ |
|
2079 |
selection := 2 |
|
2080 |
] |
|
2081 |
]. |
|
2082 |
h := nil. |
|
2083 |
] |
|
3447 | 2084 |
] ifFalse:[ |
11210 | 2085 |
steppedContext isNil ifTrue:[ |
2086 |
" |
|
2087 |
preselect a more interesting context, (where halt/raise was ...) |
|
2088 |
" |
|
2089 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
2090 |
selection := self class interestingContextIndexIn:contextArray. |
|
12039 | 2091 |
"/ Transcript show:'x '; showCR:selection. |
11210 | 2092 |
selection := selection min:(contextArray size). |
2093 |
] ifFalse:[ |
|
2094 |
" |
|
2095 |
if we came here by a big-step, show the method where we are |
|
2096 |
" |
|
2097 |
con1 == steppedContext ifTrue:[ |
|
2098 |
selection := 1 |
|
2099 |
] ifFalse:[ |
|
2100 |
con2 == steppedContext ifTrue:[ |
|
2101 |
selection := 2. |
|
2102 |
] |
|
2103 |
] |
|
2104 |
] |
|
3447 | 2105 |
]. |
2106 |
^ selection |
|
2107 |
||
2108 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
2109 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 2110 |
! |
2111 |
||
5110 | 2112 |
isInspecting |
2113 |
^ inspecting |
|
2114 |
! |
|
2115 |
||
2116 |
isNotInspecting |
|
2117 |
^ inspecting not |
|
2118 |
! |
|
2119 |
||
73 | 2120 |
openOn:aProcess |
10205 | 2121 |
"enter the debugger on a process - |
73 | 2122 |
in this case, we are just inspecting the context chain of the process, |
2123 |
not running on top of the debugged process, but as a separate |
|
2124 |
one. (think of it as an inspector showing more detail, and offering |
|
2125 |
some more control operations)" |
|
2126 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2127 |
|bpanel dummy w| |
73 | 2128 |
|
8148 | 2129 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 2130 |
|
73 | 2131 |
busy := true. |
2132 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2133 |
stepHow := nil. |
73 | 2134 |
inspecting := true. |
2135 |
inspectedProcess := aProcess. |
|
8148 | 2136 |
nChainShown := InitialNChainShown. |
73 | 2137 |
|
2138 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2139 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2140 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2141 |
"/ get the max size & freeze button |
6647 | 2142 |
continueButton label:(resources string:'Continue'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2143 |
w := continueButton preferredWidth. |
6647 | 2144 |
continueButton label:(resources string:'Stop'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2145 |
w := w max:(continueButton preferredWidth). |
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2146 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2147 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2148 |
aProcess state == #run ifTrue:[ |
11210 | 2149 |
device hasColors ifTrue:[ |
2150 |
continueButton foregroundColor:Color red darkened. |
|
2151 |
]. |
|
2152 |
continueButton label:(resources string:'Stop'). |
|
2153 |
continueButton action:[self doStop]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2154 |
] ifFalse:[ |
11210 | 2155 |
device hasColors ifTrue:[ |
2156 |
continueButton foregroundColor:Color green darkened darkened. |
|
2157 |
]. |
|
2158 |
continueButton label:(resources string:'Continue'). |
|
2159 |
continueButton action:[self doContinue]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2160 |
]. |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2161 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
73 | 2162 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2163 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2164 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2165 |
|
92 | 2166 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 2167 |
dummy borderWidth:0; level:0. |
61 | 2168 |
|
73 | 2169 |
"/ stepButton destroy. |
2170 |
"/ sendButton destroy. |
|
2171 |
||
2172 |
updateButton := Button |
|
11210 | 2173 |
label:(resources string:'Update') |
2174 |
action:[self updateContext] |
|
2175 |
in:bpanel. |
|
73 | 2176 |
monitorToggle := Toggle in:bpanel. |
6647 | 2177 |
monitorToggle label:(resources string:'Monitor'). |
73 | 2178 |
monitorToggle pressAction:[self autoUpdateOn]. |
2179 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
2180 |
||
2181 |
"can only look into process - context chain is not active" |
|
2182 |
canContinue := true. |
|
2183 |
||
2184 |
terminateButton enable. |
|
2185 |
abortButton enable. |
|
2186 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2187 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2188 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2189 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2190 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2191 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 2192 |
|
2193 |
aProcess isNil ifTrue:[ |
|
11210 | 2194 |
terminateButton disable. |
2195 |
abortButton disable. |
|
2196 |
continueButton disable. |
|
2197 |
returnButton disable. |
|
2198 |
restartButton disable. |
|
73 | 2199 |
] ifFalse:[ |
11210 | 2200 |
(aProcess suspendedContext isNil |
2201 |
or:[aProcess isSystemProcess]) ifTrue:[ |
|
2202 |
terminateButton disable. |
|
2203 |
]. |
|
2204 |
||
2205 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
|
2206 |
||
2207 |
catchBlock := [ |
|
2208 |
catchBlock := nil. |
|
2209 |
contextArray := nil. |
|
2210 |
selectedContext := actualContext := firstContext := nil. |
|
2211 |
steppedContext := wrapperContext := nil. |
|
2212 |
||
2213 |
(exitAction == #terminate) ifTrue:[ |
|
2214 |
aProcess terminate. |
|
2215 |
]. |
|
2216 |
(exitAction == #quickTerminate) ifTrue:[ |
|
2217 |
aProcess terminateNoSignal. |
|
2218 |
]. |
|
2219 |
super destroy |
|
2220 |
]. |
|
73 | 2221 |
]. |
2222 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
2223 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2224 |
"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
|
2225 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2226 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2227 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2228 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 2229 |
|selection| |
2230 |
||
2231 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2232 |
selection notNil ifTrue:[ |
11210 | 2233 |
self showSelection:selection. |
2234 |
contextView setSelection:selection. |
|
2235 |
selection > 1 ifTrue:[ |
|
2236 |
contextView scrollToLine:(selection - 1) |
|
2237 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2238 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2239 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2240 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 2241 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2242 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2243 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2244 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2245 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2246 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2247 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2248 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2249 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2250 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2251 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2252 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2253 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2254 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 2255 |
! ! |
2256 |
||
2257 |
!DebugView methodsFor:'help'! |
|
2258 |
||
8212 | 2259 |
flyByHelpDependsOnPositionIn:aView |
2260 |
"subclasses where the help-text depends upon the pointer position might |
|
2261 |
want to redefine this" |
|
2262 |
||
2263 |
^ aView == codeView |
|
2264 |
! |
|
2265 |
||
3510 | 2266 |
flyByHelpTextFor:aComponent |
2267 |
|s| |
|
2268 |
||
2269 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2270 |
s := 'Abort (unwind to eventLoop)' |
3510 | 2271 |
]. |
2272 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2273 |
s := 'Terminate process (close view)' |
3510 | 2274 |
]. |
2275 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2276 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2277 |
s := 'Stop' |
|
2278 |
] ifFalse:[ |
|
2279 |
s := 'Continue execution' |
|
2280 |
] |
|
3510 | 2281 |
]. |
2282 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2283 |
s := 'Step to next send (don''t enter into called methods)' |
3510 | 2284 |
]. |
2285 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2286 |
s := 'Step to next line (don''t enter into called methods)' |
3510 | 2287 |
]. |
2288 |
aComponent == nextOverButton ifTrue:[ |
|
11210 | 2289 |
s := 'Step over to cursor-line' |
3510 | 2290 |
]. |
2291 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2292 |
s := 'Step out to caller' |
3510 | 2293 |
]. |
2294 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2295 |
s := 'Send next message (enter into called methods)' |
3510 | 2296 |
]. |
2297 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2298 |
s := 'Return from selected method' |
3510 | 2299 |
]. |
2300 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2301 |
s := 'Restart selected method' |
3510 | 2302 |
]. |
2303 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2304 |
s := 'Toggle monitoring' |
3510 | 2305 |
]. |
2306 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2307 |
s := 'Update' |
3510 | 2308 |
]. |
8656 | 2309 |
aComponent == reportButton ifTrue:[ |
11210 | 2310 |
s := 'Send a defect report via eMail' |
8656 | 2311 |
]. |
3510 | 2312 |
s notNil ifTrue:[ |
11210 | 2313 |
^ resources string:s |
3510 | 2314 |
]. |
2315 |
^ nil |
|
2316 |
||
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2317 |
"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
|
2318 |
"Modified: / 18-06-2010 / 11:34:51 / cg" |
3510 | 2319 |
! |
2320 |
||
8212 | 2321 |
flyByHelpTextFor:aComponent at:aPointOrNil |
8396 | 2322 |
|s vline line col pos interval| |
8212 | 2323 |
|
2324 |
aComponent == codeView ifFalse:[^ nil]. |
|
2325 |
aPointOrNil isNil ifTrue:[^ nil]. |
|
9446 | 2326 |
self sensor motionEventPending ifTrue:[^ nil]. |
8212 | 2327 |
|
8396 | 2328 |
vline := codeView visibleLineOfY:aPointOrNil y. |
2329 |
col := codeView colOfX:aPointOrNil x inVisibleLine:vline. |
|
2330 |
line := codeView visibleLineToAbsoluteLine:vline. |
|
8212 | 2331 |
|
2332 |
pos := codeView characterPositionOfLine:line col:col. |
|
2333 |
interval := pos to:pos. |
|
2334 |
||
10205 | 2335 |
self |
11210 | 2336 |
withNodeValueAtInterval:interval |
2337 |
do:[:value :description | |
|
2338 |
|valueClassOrSizeString valueString| |
|
2339 |
||
2340 |
valueClassOrSizeString := valueString := ''. |
|
2341 |
||
2342 |
"/ some heuristics as when to show the class name (a purely subjective preference) |
|
2343 |
value isString ifTrue:[ |
|
2344 |
value isText ifTrue:[ |
|
2345 |
valueString := '"',(value contractTo:80),'"'. |
|
2346 |
] ifFalse:[ |
|
2347 |
valueString := value storeString contractTo:80. |
|
2348 |
]. |
|
2349 |
] ifFalse:[ |
|
2350 |
(value isBoolean |
|
2351 |
or:[ value isInteger |
|
2352 |
or:[ value isSymbol ]]) ifTrue:[ |
|
2353 |
valueString := value printString. |
|
2354 |
] ifFalse:[ |
|
2355 |
valueClassOrSizeString := ' (',value class name,')'. |
|
2356 |
||
2357 |
(value isArray |
|
2358 |
or:[ value isOrderedCollection ]) ifTrue:[ |
|
2359 |
valueClassOrSizeString := ' (size=',value size printString,')'. |
|
2360 |
]. |
|
2361 |
||
2362 |
Error handle:[:ex | |
|
2363 |
valueString := '??? (',ex description,')' |
|
2364 |
] do:[ |
|
2365 |
[ |
|
2366 |
valueString := value printString contractTo:80. |
|
2367 |
] valueWithWatchDog:[ valueString := value classNameWithArticle ] afterMilliseconds:30. |
|
2368 |
] |
|
2369 |
] |
|
2370 |
]. |
|
2371 |
description isEmptyOrNil ifTrue:[ |
|
2372 |
s := valueString , valueClassOrSizeString |
|
2373 |
] ifFalse:[ |
|
2374 |
s := description , ': ', valueString, valueClassOrSizeString |
|
2375 |
]. |
|
2376 |
]. |
|
8592 | 2377 |
"/ Transcript showCR:s. |
2378 |
^ s |
|
9446 | 2379 |
|
2380 |
"Modified: / 27-04-2010 / 17:51:53 / cg" |
|
8212 | 2381 |
! |
2382 |
||
266 | 2383 |
helpTextFor:aComponent |
2384 |
|s| |
|
2385 |
||
2386 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2387 |
s := 'HELP_ABORT' |
266 | 2388 |
]. |
2389 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2390 |
s := 'HELP_TERMINATE' |
266 | 2391 |
]. |
2392 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2393 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2394 |
s := 'HELP_STOP' |
|
2395 |
] ifFalse:[ |
|
2396 |
s := 'HELP_CONTINUE' |
|
2397 |
] |
|
266 | 2398 |
]. |
2399 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2400 |
s := 'HELP_STEP' |
266 | 2401 |
]. |
2402 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2403 |
s := 'HELP_NEXT' |
266 | 2404 |
]. |
1065 | 2405 |
aComponent == nextOverButton ifTrue:[ |
11210 | 2406 |
s := 'HELP_NEXTOVER' |
1065 | 2407 |
]. |
2408 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2409 |
s := 'HELP_NEXTOUT' |
1065 | 2410 |
]. |
266 | 2411 |
aComponent == stepButton ifTrue:[ |
11210 | 2412 |
s := 'HELP_STEP' |
266 | 2413 |
]. |
2414 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2415 |
s := 'HELP_SEND' |
266 | 2416 |
]. |
2417 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2418 |
s := 'HELP_RETURN' |
266 | 2419 |
]. |
2420 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2421 |
s := 'HELP_RESTART' |
266 | 2422 |
]. |
2423 |
aComponent == contextView ifTrue:[ |
|
11210 | 2424 |
s := 'HELP_WALKBACK' |
266 | 2425 |
]. |
2426 |
aComponent == codeView ifTrue:[ |
|
11210 | 2427 |
s := 'HELP_CODEVIEW' |
266 | 2428 |
]. |
2429 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2430 |
s := 'HELP_MONITOR' |
266 | 2431 |
]. |
2432 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2433 |
s := 'HELP_UPDATE' |
266 | 2434 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2435 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2436 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2437 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2438 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
11210 | 2439 |
s := 'HELP_REC_INSP' |
266 | 2440 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2441 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
11210 | 2442 |
s := 'HELP_CON_INSP' |
266 | 2443 |
]. |
2444 |
||
2445 |
s notNil ifTrue:[ |
|
11210 | 2446 |
^ resources string:s |
266 | 2447 |
]. |
2448 |
^ nil |
|
2449 |
||
2450 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 2451 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 2452 |
! ! |
2453 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2454 |
!DebugView methodsFor:'initialization & release'! |
266 | 2455 |
|
2456 |
addToCurrentProject |
|
2457 |
"ignored here" |
|
2458 |
||
2459 |
^ self |
|
2460 |
! |
|
2461 |
||
2115 | 2462 |
destroy |
2463 |
"closing the debugger implies an abort or continue" |
|
2464 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2465 |
self destroyWithConfirmation:true |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2466 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2467 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2468 |
"Modified: / 23-03-2012 / 12:50:01 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2469 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2470 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2471 |
destroyWithConfirmation:withConfirmation |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2472 |
"closing the debugger implies an abort or continue" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2473 |
|
2404 | 2474 |
|m| |
2475 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2476 |
withConfirmation ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2477 |
self checkIfCodeIsReallyModified ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2478 |
(self confirm:('Code modified - exit anyway ?')) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2479 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2480 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2481 |
] |
11210 | 2482 |
] |
2115 | 2483 |
]. |
2484 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2485 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2486 |
|
2404 | 2487 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 2488 |
inspecting ifFalse:[ |
11210 | 2489 |
"I am running on top of a process, abort or continue it" |
2490 |
||
2491 |
windowGroup notNil ifTrue:[ |
|
2492 |
windowGroup setProcess:nil. |
|
2493 |
]. |
|
2494 |
self uncacheMyself. |
|
2495 |
||
2496 |
"/ |
|
2497 |
"/ catch invalid return; |
|
2498 |
"/ this happens, when my process has somehow died (quickterminate) |
|
2499 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
2500 |
"/ #destroy-window function. |
|
2501 |
"/ |
|
2502 |
Context cannotReturnSignal handle:[:ex | |
|
2503 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
|
2504 |
self uncacheMyself. |
|
2505 |
Debugger newDebugger. |
|
2506 |
ex return. |
|
2507 |
] do:[ |
|
2508 |
AbortOperationRequest isHandled ifTrue:[ |
|
2509 |
self doAbort. |
|
2510 |
] ifFalse:[ |
|
2511 |
self doContinue |
|
2512 |
] |
|
2513 |
]. |
|
2514 |
"/ We don't reach this point normally |
|
2515 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
2115 | 2516 |
]. |
2517 |
||
2299 | 2518 |
Debugger newDebugger. |
2115 | 2519 |
"/ since I am going to be destroyed, remove me from the cache |
2520 |
self uncacheMyself. |
|
2521 |
super destroy. |
|
2522 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2523 |
"Modified: / 10-07-1997 / 17:15:41 / stefan" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
2524 |
"Created: / 23-03-2012 / 12:49:50 / cg" |
2115 | 2525 |
! |
2526 |
||
266 | 2527 |
initialize |
10205 | 2528 |
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel |
12529 | 2529 |
newLayout v exceptionAndTogglePanel codeToggleLabels userPrefs| |
266 | 2530 |
|
2531 |
super initialize. |
|
2532 |
||
2340 | 2533 |
font := font onDevice:device. |
12529 | 2534 |
userPrefs := UserPreferences current. |
2535 |
||
2536 |
verboseBacktrace := userPrefs verboseBacktraceInDebugger ? false. |
|
2537 |
hideSupportCode := userPrefs hideSupportCodeInDebugger ? false. |
|
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
2538 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
11210 | 2539 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2540 |
|
266 | 2541 |
busy := false. |
2542 |
exclusive := false. |
|
2543 |
inspecting := false. |
|
2544 |
exitAction := nil. |
|
2545 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2546 |
stepHow := nil. |
266 | 2547 |
canContinue := false. |
2548 |
||
3269 | 2549 |
mH := 0. |
2550 |
||
3447 | 2551 |
menuPanel := MenuPanel in:self. |
8131 | 2552 |
menuPanel receiver:self. |
3447 | 2553 |
menuPanel verticalLayout:false. |
8131 | 2554 |
menu := self class menuSpec decodeAsLiteralArray. |
2555 |
menu findGuiResourcesIn:self. |
|
2556 |
menuPanel menu:menu. |
|
3447 | 2557 |
|
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2558 |
mH := menuPanel preferredHeight. |
3447 | 2559 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
2560 |
||
12529 | 2561 |
newLayout := userPrefs useNewLayoutInDebugger. |
8148 | 2562 |
newLayout ifFalse:[ |
11210 | 2563 |
bpanel := HorizontalPanelView in:self. |
2564 |
||
2565 |
self initializeButtonsIn:bpanel. |
|
2566 |
||
2567 |
bH := bpanel preferredHeight + 5. |
|
2568 |
bpanel origin:(0.0 @ mH) |
|
2569 |
extent:(1.0 @ bH). |
|
2570 |
panel := VariableVerticalPanel |
|
2571 |
origin:(0.0 @ (mH + bH)) |
|
2572 |
corner:(1.0 @ 1.0) |
|
2573 |
in:self. |
|
2574 |
||
2575 |
v := self initializeContextListViewIn:panel. |
|
2576 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2577 |
||
2578 |
codePanel := View in:panel. |
|
2579 |
v := self initializeCodeViewIn:codePanel. |
|
2580 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
2581 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2582 |
||
2583 |
v := self initializeInspectorViewsIn:panel. |
|
2584 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2585 |
|
8148 | 2586 |
] ifTrue:[ |
11210 | 2587 |
bpanel1 := HorizontalPanelView in:self. |
2588 |
self initializeButtons1In:bpanel1. |
|
2589 |
||
12529 | 2590 |
contextInfoLabel := Label label:''. |
2591 |
contextInfoLabel adjust:#left. |
|
2592 |
bpanel1 add:contextInfoLabel. |
|
2593 |
||
11210 | 2594 |
bH1 := bpanel1 preferredHeight + 5. |
2595 |
bpanel1 origin:(0.0 @ mH) |
|
2596 |
extent:(1.0 @ bH1). |
|
2597 |
panel := VariableVerticalPanel |
|
2598 |
origin:(0.0 @ (mH + bH1)) |
|
2599 |
corner:(1.0 @ 1.0) |
|
2600 |
in:self. |
|
2601 |
"/ panel showHandle:true. |
|
2602 |
"/ panel handlePosition:#left. |
|
2603 |
||
2604 |
v := self initializeContextListViewIn:panel. |
|
2605 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2606 |
||
2607 |
codePanel := View in:panel. |
|
2608 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
2609 |
self initializeButtons2In:bpanel2. |
|
2610 |
||
2611 |
bH2 := bpanel2 preferredHeight + 5. |
|
2612 |
bpanel2 origin:(0.0 @ 0.0) |
|
2613 |
extent:(1.0 @ bH2). |
|
2614 |
||
2615 |
exceptionInfoLabel := Label label:''. |
|
2616 |
exceptionInfoLabel adjust:#left. |
|
2617 |
||
2618 |
exceptionAndTogglePanel := HorizontalPanelView in:codePanel. |
|
2619 |
exceptionAndTogglePanel horizontalLayout:#left. |
|
2620 |
exceptionAndTogglePanel |
|
2621 |
geometryLayout: |
|
2622 |
((LayoutFrame |
|
2623 |
origin:(0.0 @ 0.0) |
|
2624 |
corner:(1.0 @ 0.0)) |
|
2625 |
topOffset:bH2; |
|
2626 |
bottomOffset:(bH2 + exceptionInfoLabel preferredHeight + 6); |
|
2627 |
rightOffset:-2). |
|
2628 |
||
2629 |
methodCodeToggleSelectionHolder := 1 asValue. |
|
2630 |
methodCodeToggleSelectionHolder onChangeSend:#methodCodeToggleChanged to:self. |
|
11305 | 2631 |
codeToggleLabels := resources array:{ |
2632 |
'Showing Original Code (being executed, but obsolete)' asText backgroundColorizeAllWith:Color red lightened . |
|
2633 |
'Showing Current Code' asText backgroundColorizeAllWith:Color green lightened . |
|
2634 |
}. |
|
2635 |
methodCodeToggle := PopUpList label:codeToggleLabels first in:exceptionAndTogglePanel. |
|
2636 |
methodCodeToggle list:codeToggleLabels. |
|
11210 | 2637 |
methodCodeToggle useIndex:true. |
2638 |
methodCodeToggle model:methodCodeToggleSelectionHolder. |
|
2639 |
methodCodeToggle beInvisible. |
|
2640 |
||
2641 |
exceptionAndTogglePanel add:exceptionInfoLabel. |
|
2642 |
||
2643 |
v := self initializeCodeViewIn:codePanel. |
|
2644 |
v origin:(0.0 @ (bH2+exceptionInfoLabel preferredHeight+6)) corner:(1.0 @ 1.0). |
|
2645 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2646 |
||
2647 |
v := self initializeInspectorViewsIn:panel. |
|
2648 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2649 |
]. |
2650 |
||
3387 | 2651 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
11210 | 2652 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2653 |
]. |
9626 | 2654 |
LastExtent notNil ifTrue:[ |
11210 | 2655 |
self extent:LastExtent. |
9626 | 2656 |
]. |
2657 |
LastOrigin notNil ifTrue:[ |
|
11210 | 2658 |
self origin:LastOrigin. |
9626 | 2659 |
]. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2660 |
|
3269 | 2661 |
" |
2662 |
Debugger newDebugger |
|
2663 |
" |
|
3447 | 2664 |
|
11693 | 2665 |
"Modified: / 27-07-2012 / 14:46:07 / cg" |
3269 | 2666 |
! |
2667 |
||
10205 | 2668 |
initializeAbortButtonIn:bpanel |
2669 |
abortButton := Button |
|
11210 | 2670 |
label:(resources string:'Abort') |
2671 |
action:[ |
|
2672 |
abortButton turnOffWithoutRedraw. |
|
2673 |
self doAbort |
|
2674 |
] |
|
2675 |
in:bpanel. |
|
3447 | 2676 |
|
2677 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2678 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2679 |
! |
|
2680 |
||
10205 | 2681 |
initializeButtons1In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2682 |
"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
|
2683 |
|
3447 | 2684 |
|separator| |
2685 |
||
10205 | 2686 |
bpanel horizontalLayout:#left. |
3447 | 2687 |
bpanel verticalLayout:#centerMax. |
2688 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2689 |
||
8194 | 2690 |
self initializeContinueButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2691 |
continueButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2692 |
|
9131 | 2693 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
2694 |
"/ separator borderWidth:0; level:0. |
|
3447 | 2695 |
self initializeAbortButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2696 |
abortButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2697 |
|
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2698 |
separator := View extent:(100 @ 5) in:bpanel. |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2699 |
separator borderWidth:0; level:0. |
3269 | 2700 |
|
3447 | 2701 |
self initializeTerminateButtonIn:bpanel. |
2702 |
||
9131 | 2703 |
separator := View extent:(50 @ 5) in:bpanel. |
3447 | 2704 |
separator borderWidth:0; level:0. |
2705 |
||
2706 |
self initializeDefineButtonIn:bpanel. |
|
4356 | 2707 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2708 |
separator := View extent:(10 @ 5) in:bpanel. |
2709 |
separator borderWidth:0; level:0. |
|
2710 |
self initializeReportButtonIn:bpanel. |
|
4356 | 2711 |
]. |
3447 | 2712 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2713 |
! |
2714 |
||
10205 | 2715 |
initializeButtons2In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2716 |
"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
|
2717 |
|
3269 | 2718 |
|separator| |
2719 |
||
9131 | 2720 |
bpanel horizontalLayout:#left. |
3269 | 2721 |
bpanel verticalLayout:#centerMax. |
2722 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2723 |
||
3447 | 2724 |
self initializeNextButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2725 |
nextButton width:100. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2726 |
|
3447 | 2727 |
self initializeStepButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2728 |
stepButton width:100. |
3447 | 2729 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2730 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2731 |
"/ 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
|
2732 |
"/ 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
|
2733 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2734 |
|
3269 | 2735 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2736 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2737 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2738 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2739 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2740 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2741 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2742 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2743 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2744 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2745 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2746 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2747 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2748 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2749 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2750 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2751 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2752 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2753 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2754 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2755 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2756 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2757 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2758 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2759 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2760 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2761 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2762 |
|
3447 | 2763 |
self initializeSendButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2764 |
sendButton width:100. |
3447 | 2765 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2766 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2767 |
separator borderWidth:0; level:0. |
3269 | 2768 |
|
3447 | 2769 |
self initializeReturnButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2770 |
returnButton width:100. |
3447 | 2771 |
self initializeRestartButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2772 |
restartButton width:100. |
3447 | 2773 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2774 |
"Modified: / 18-06-2010 / 08:32:05 / cg" |
3269 | 2775 |
! |
2776 |
||
10205 | 2777 |
initializeButtonsIn:bpanel |
3269 | 2778 |
|separator| |
2779 |
||
2780 |
bpanel horizontalLayout:#left. |
|
2781 |
bpanel verticalLayout:#centerMax. |
|
2782 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2783 |
||
3447 | 2784 |
self initializeAbortButtonIn:bpanel. |
2785 |
||
3269 | 2786 |
separator := View extent:(10 @ 5) in:bpanel. |
2787 |
separator borderWidth:0; level:0. |
|
2788 |
||
3447 | 2789 |
self initializeContinueButtonIn:bpanel. |
3269 | 2790 |
|
2791 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2792 |
separator borderWidth:0; level:0. |
|
2793 |
||
10205 | 2794 |
self initializeReturnButtonIn:bpanel. |
2795 |
self initializeRestartButtonIn:bpanel. |
|
3269 | 2796 |
|
2797 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2798 |
separator borderWidth:0; level:0. |
|
2799 |
||
3447 | 2800 |
self initializeNextButtonIn:bpanel. |
2801 |
self initializeStepButtonIn:bpanel. |
|
2802 |
||
3269 | 2803 |
"/ cg: |
2804 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2805 |
"/ they do not work relyable with inlined blocks yet. |
|
2806 |
"/ |
|
2807 |
||
2808 |
||
2809 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
2810 |
"/ img isNil ifTrue:[ |
|
2811 |
"/ img := (resources at:'next') |
|
2812 |
"/ ]. |
|
2813 |
"/ nextButton := Button |
|
2814 |
"/ label:img |
|
2815 |
"/ action:[stepButton turnOff. self doNext] |
|
2816 |
"/ in:bpanel. |
|
2817 |
"/ |
|
2818 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
2819 |
"/ img isNil ifTrue:[ |
|
2820 |
"/ img := (resources at:'over') |
|
2821 |
"/ ]. |
|
2822 |
"/ nextOverButton := Button |
|
2823 |
"/ label:img |
|
2824 |
"/ action:[stepButton turnOff. self doNextOver] |
|
2825 |
"/ in:bpanel. |
|
2826 |
"/ |
|
2827 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
2828 |
"/ img isNil ifTrue:[ |
|
2829 |
"/ img := (resources at:'out') |
|
2830 |
"/ ]. |
|
2831 |
"/ nextOutButton := Button |
|
2832 |
"/ label:img |
|
2833 |
"/ action:[stepButton turnOff. self doNextOut] |
|
2834 |
"/ in:bpanel. |
|
2835 |
||
3447 | 2836 |
self initializeSendButtonIn:bpanel. |
2837 |
||
3187 | 2838 |
separator := View extent:(30 @ 5) in:bpanel. |
2839 |
separator borderWidth:0; level:0. |
|
3269 | 2840 |
|
3447 | 2841 |
self initializeTerminateButtonIn:bpanel. |
2842 |
||
3269 | 2843 |
separator := View extent:(30 @ 5) in:bpanel. |
2844 |
separator borderWidth:0; level:0. |
|
2845 |
||
3447 | 2846 |
self initializeDefineButtonIn:bpanel. |
4356 | 2847 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2848 |
self initializeReportButtonIn:bpanel. |
4356 | 2849 |
]. |
2850 |
||
3447 | 2851 |
|
2852 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
2853 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 2854 |
! |
2855 |
||
2856 |
initializeCodeViewIn:panel |
|
2857 |
|v| |
|
2858 |
||
10628 | 2859 |
(UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
2860 |
v := codeView := Tools::CodeView2 in: panel. |
|
2861 |
codeView model: ValueHolder new. |
|
2862 |
codeView methodHolder: ValueHolder new. |
|
2863 |
codeView classHolder: ValueHolder new. |
|
2864 |
] ifFalse:[ |
|
2865 |
v := HVScrollableView |
|
2866 |
for:CodeView |
|
2867 |
miniScrollerH:true |
|
2868 |
miniScrollerV:false |
|
2869 |
in:panel. |
|
2870 |
||
2871 |
"/ v autoHideScrollBars:true. |
|
2872 |
codeView := v scrolledView. |
|
2873 |
codeView enableMotionEvents. "/ for active help |
|
2874 |
]. |
|
3269 | 2875 |
|
2876 |
^ v |
|
10628 | 2877 |
|
2878 |
"Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3269 | 2879 |
! |
2880 |
||
2881 |
initializeContextListViewIn:panel |
|
2882 |
|v| |
|
266 | 2883 |
|
10205 | 2884 |
v := HVScrollableView |
11210 | 2885 |
for:SelectionInListView |
2886 |
miniScrollerH:true |
|
2887 |
miniScrollerV:false |
|
2888 |
in:panel. |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2889 |
v autoHideHorizontalScrollBar:true. |
266 | 2890 |
|
2891 |
contextView := v scrolledView. |
|
2892 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 2893 |
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
|
2894 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 2895 |
|
10205 | 2896 |
contextView middleButtonMenu:(self middleButtonMenu). |
5453 | 2897 |
|
3269 | 2898 |
^ v |
2899 |
! |
|
2900 |
||
5453 | 2901 |
initializeContextViewsMiddleButtonMenu |
2902 |
<resource: #programMenu > |
|
2903 |
||
10205 | 2904 |
contextView middleButtonMenu:(self middleButtonMenu). |
2905 |
! |
|
2906 |
||
2907 |
initializeContinueButtonIn:bpanel |
|
2908 |
continueButton := Button |
|
11210 | 2909 |
label:(resources string:'Continue') |
2910 |
action:[ |
|
2911 |
continueButton turnOffWithoutRedraw. |
|
2912 |
self doContinue |
|
2913 |
] |
|
2914 |
in:bpanel. |
|
3447 | 2915 |
|
2916 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
2917 |
! |
|
2918 |
||
10205 | 2919 |
initializeDefineButtonIn:bpanel |
2920 |
defineButton := Button |
|
11210 | 2921 |
label:(resources string:'Define') |
2922 |
action:[ |
|
2923 |
defineButton turnOffWithoutRedraw. |
|
2924 |
self doDefine |
|
2925 |
] |
|
2926 |
in:bpanel. |
|
3447 | 2927 |
defineButton beInvisible |
2928 |
||
2929 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
2930 |
! |
|
2931 |
||
3269 | 2932 |
initializeInspectorViewsIn:panel |
2933 |
|hpanel| |
|
266 | 2934 |
|
2935 |
hpanel := VariableHorizontalPanel in:panel. |
|
2936 |
||
2937 |
receiverInspector := InspectorView |
|
11210 | 2938 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
2939 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2940 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 2941 |
|
2942 |
contextInspector := ContextInspectorView |
|
11210 | 2943 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
2944 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2945 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2946 |
|
3269 | 2947 |
^ hpanel |
266 | 2948 |
! |
2949 |
||
10205 | 2950 |
initializeNextButtonIn:bpanel |
2951 |
nextButton := Button |
|
11210 | 2952 |
label:(resources string:'Debug_Next') |
2953 |
action:[ |
|
2954 |
stepButton turnOff. |
|
2955 |
self doNext |
|
2956 |
] |
|
2957 |
in:bpanel. |
|
3447 | 2958 |
|
2959 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
2960 |
! |
|
2961 |
||
10205 | 2962 |
initializeReportButtonIn:bpanel |
2963 |
reportButton := Button |
|
11210 | 2964 |
label:(resources string:'Report by Mail...') |
2965 |
action:[ |
|
2966 |
reportButton turnOffWithoutRedraw. |
|
2967 |
self doOpenReportMailApp. |
|
2968 |
] |
|
2969 |
in:bpanel. |
|
4356 | 2970 |
|
2971 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
2972 |
! |
|
2973 |
||
10205 | 2974 |
initializeRestartButtonIn:bpanel |
2975 |
restartButton := Button |
|
11210 | 2976 |
label:(resources string:'Restart') |
2977 |
action:[ |
|
2978 |
restartButton turnOff. |
|
2979 |
self doRestart |
|
2980 |
] |
|
2981 |
in:bpanel. |
|
3447 | 2982 |
|
2983 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
2984 |
! |
|
2985 |
||
10205 | 2986 |
initializeReturnButtonIn:bpanel |
2987 |
returnButton := Button |
|
11210 | 2988 |
label:(resources string:'Return') |
2989 |
action:[ |
|
2990 |
returnButton turnOff. |
|
2991 |
self doReturn |
|
2992 |
] |
|
2993 |
in:bpanel. |
|
3447 | 2994 |
|
2995 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
2996 |
! |
|
2997 |
||
10205 | 2998 |
initializeSendButtonIn:bpanel |
2999 |
sendButton := Button |
|
11210 | 3000 |
label:(resources string:'Send') |
3001 |
action:[ |
|
3002 |
sendButton turnOff. |
|
3003 |
self doSend |
|
3004 |
] |
|
3005 |
in:bpanel. |
|
3447 | 3006 |
|
3007 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
3008 |
! |
|
3009 |
||
10205 | 3010 |
initializeStepButtonIn:bpanel |
3011 |
stepButton := Button |
|
11210 | 3012 |
label:(resources string:'Debug_Step') |
3013 |
action:[ |
|
3014 |
stepButton turnOff. |
|
3015 |
self doStep |
|
3016 |
] |
|
3017 |
in:bpanel. |
|
3447 | 3018 |
|
3019 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
3020 |
! |
|
3021 |
||
10205 | 3022 |
initializeTerminateButtonIn:bpanel |
3023 |
terminateButton := Button |
|
11210 | 3024 |
label:(resources string:'Debug_Terminate') |
3025 |
action:[ |
|
3026 |
terminateButton turnOffWithoutRedraw. |
|
3027 |
self doTerminate |
|
3028 |
] |
|
3029 |
in:bpanel. |
|
3447 | 3030 |
|
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3031 |
terminateButton backgroundColor:Color red lightened. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3032 |
"/ terminateButton foregroundColor:Color red. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
3033 |
|
3447 | 3034 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
266 | 3035 |
! |
3036 |
||
1249 | 3037 |
postRealize |
3038 |
super postRealize. |
|
266 | 3039 |
|
3040 |
inspecting ifTrue:[ |
|
11210 | 3041 |
inspectedProcess notNil ifTrue:[ |
3042 |
" |
|
3043 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
3044 |
to run between mine and the debugged processes prio) |
|
3045 |
" |
|
3046 |
Processor activeProcess |
|
3047 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
|
3048 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3049 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3050 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
3051 |
self sensor addEventListener:self. |
1249 | 3052 |
|
3053 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 3054 |
! |
3055 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3056 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3057 |
"/ 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
|
3058 |
"/ 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
|
3059 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3060 |
drawableId notNil ifTrue:[ |
11210 | 3061 |
^ self |
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3062 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3063 |
"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
|
3064 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3065 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3066 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
3067 |
|
11818 | 3068 |
releaseDebuggee |
3069 |
"We have to be careful to release all refs to the debuggee, |
|
3070 |
because we may be in the cache. |
|
3071 |
Otherwise, the GC will not be able to release it" |
|
3072 |
||
3073 |
busy := false. |
|
3074 |
||
3075 |
codeView acceptAction:nil. |
|
3076 |
codeView doItAction:nil. |
|
3077 |
codeView contents:nil. |
|
3078 |
||
3079 |
receiverInspector release. |
|
3080 |
contextInspector release. |
|
3081 |
inspectedProcess := nil. |
|
3082 |
contextArray := nil. |
|
3083 |
((exitAction == #restart) or:[exitAction == #return]) ifFalse:[ |
|
3084 |
selectedContext := nil. |
|
3085 |
]. |
|
3086 |
actualContext := firstContext := nil. |
|
3087 |
steppedContext := wrapperContext := nil. |
|
3088 |
catchBlock := nil. |
|
3089 |
grabber := nil. |
|
3090 |
self autoUpdateOff. |
|
3091 |
||
3092 |
"Created: / 10-07-1997 / 14:57:51 / stefan" |
|
3093 |
"Modified: / 26-09-2012 / 15:08:21 / cg" |
|
3094 |
! |
|
3095 |
||
266 | 3096 |
setLabelFor:aMessage in:aProcess |
9403 | 3097 |
|l lines processNameOrNil pidOrNil osPidString| |
6821 | 3098 |
|
3099 |
lines := aMessage asStringCollection. |
|
3100 |
lines size > 1 ifTrue:[ |
|
11210 | 3101 |
l := lines first |
6821 | 3102 |
] ifFalse:[ |
11210 | 3103 |
l := aMessage. |
6821 | 3104 |
]. |
3105 |
||
3106 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
3107 |
Error handle:[:ex | |
11210 | 3108 |
l := l , '???' |
1030 | 3109 |
] do:[ |
11210 | 3110 |
processNameOrNil := aProcess name. |
3111 |
processNameOrNil notNil ifTrue:[ |
|
3112 |
l := l , (processNameOrNil contractTo:20) , ''. |
|
3113 |
]. |
|
3114 |
pidOrNil := aProcess id printString. |
|
3115 |
l := l , '[' , pidOrNil , ']'. |
|
73 | 3116 |
]. |
1030 | 3117 |
l := l , ')'. |
266 | 3118 |
self label:l. |
6821 | 3119 |
|
10205 | 3120 |
((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
11210 | 3121 |
osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
9403 | 3122 |
]. |
3123 |
||
8305 | 3124 |
exceptionInfoLabel notNil ifTrue:[ |
11210 | 3125 |
exceptionInfoLabel |
3126 |
label:(resources |
|
12529 | 3127 |
string:'%1 in process %2 [%3]%4' |
11210 | 3128 |
with:(lines first colorizeAllWith:Color red) |
3129 |
with:(processNameOrNil ? '') |
|
3130 |
with:(pidOrNil ? '') |
|
3131 |
with:(osPidString ? '')) |
|
8305 | 3132 |
]. |
3133 |
||
6821 | 3134 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
0 | 3135 |
! ! |
3136 |
||
3137 |
!DebugView methodsFor:'interrupt handling'! |
|
3138 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3139 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3140 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3141 |
'contextIRQ' printCR. |
3142 |
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
|
3143 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3144 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3145 |
|
1364 | 3146 |
"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
|
3147 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3148 |
|
0 | 3149 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3150 |
DebuggingDebugger == true ifTrue:[ |
11636 | 3151 |
'stepIRQ' print. |
3152 |
"/ ' in ' print. thisContext sender fullPrint. |
|
3153 |
'' printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3154 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3155 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3156 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3157 |
|
11636 | 3158 |
"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
|
3159 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3160 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3161 |
stepOrNext |
11636 | 3162 |
|where here con s isWrap method wrappedMethod |
3163 |
originalMethodOfWrappedMethod originalMethodsContext |
|
3164 |
inBlock subBlockLeft ignore contextBelow wrapContext |
|
10205 | 3165 |
leftWrap enteredWrap anyStepBlocks |
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3166 |
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
|
3167 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3168 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3169 |
"/ DebuggingDebugger := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3170 |
"/ DebuggingDebugger2 := true |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3171 |
"/ DebuggingDebugger2 := false |
11636 | 3172 |
"/ DebuggingDebugger3 := false |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3173 |
"/ '' printCR |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3174 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3175 |
processName := (Processor activeProcess nameOrId),' [',Processor activeProcess id printString,']'. |
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3176 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3177 |
skipLineNr == #return ifTrue:[ |
11210 | 3178 |
self label:('stepping context returned ' , ' (process: ' , processName , ')'). |
3179 |
here := thisContext sender sender. |
|
3180 |
here setLineNumber:nil. |
|
3181 |
here := nil. |
|
3182 |
con := thisContext sender sender sender. |
|
3183 |
||
3184 |
HaltInterrupt handle:[:ex | |
|
3185 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [stepOrNext]' bindWith:ex suspendedContext) infoPrintCR. |
|
3186 |
ex proceed |
|
3187 |
] do:[ |
|
3188 |
self enter:con select:nil. |
|
3189 |
]. |
|
3190 |
con := nil. |
|
3191 |
^ self |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3192 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3193 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3194 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3195 |
"/ "/ 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
|
3196 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3197 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3198 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3199 |
"/ 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
|
3200 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3201 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3202 |
|
52 | 3203 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
11210 | 3204 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
3205 |
^ self |
|
52 | 3206 |
]. |
3207 |
||
29 | 3208 |
here := thisContext. "stepInterrupt" |
10205 | 3209 |
here := here sender. "the caller; step- or contextIRQ" |
3210 |
here := here sender. "the interrupted context" |
|
29 | 3211 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3212 |
DebuggingDebugger2 == true ifTrue:[ |
11636 | 3213 |
'***************************' printCR. |
11210 | 3214 |
'here in ' print. |
3215 |
inWrap ifTrue:['(wrap) ' print.]. |
|
3216 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
|
3217 |
here selector printCR. |
|
11636 | 3218 |
'stepping in ' print. |
3219 |
steppedContext notNil ifTrue:[ |
|
3220 |
((ObjectMemory addressOf:steppedContext) printStringRadix:16) print. ' ' print. |
|
3221 |
]. |
|
3222 |
steppedContext printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3223 |
]. |
10 | 3224 |
|
2581 | 3225 |
"/ kludge an bug-workaround; |
3226 |
"/ I should not see those ... |
|
3227 |
||
3228 |
here selector == #ioInterrupt ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3229 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3230 |
'oops - should not get that one' printCR. |
3231 |
]. |
|
3232 |
Processor ioInterrupt. |
|
3233 |
StepInterruptPending := 1. |
|
3234 |
InterruptPending := 1. |
|
3235 |
where := nil. here := nil. |
|
3236 |
InStepInterrupt := nil. |
|
3237 |
^ self |
|
2581 | 3238 |
]. |
3239 |
||
3240 |
stepUntilEntering notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3241 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3242 |
'check if entering ' print. stepUntilEntering printCR. |
3243 |
]. |
|
3244 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3245 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3246 |
'entering...' printCR. |
3247 |
]. |
|
3248 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , processName , ')'). |
|
3249 |
||
3250 |
lastStepUntilEntering := stepUntilEntering. |
|
3251 |
stepUntilEntering := nil. |
|
3252 |
self enter:here select:nil. |
|
3253 |
con := nil. |
|
3254 |
^ self |
|
3255 |
]. |
|
3256 |
"/ see if stepping context is still active ... |
|
3257 |
||
3258 |
con := here. |
|
3259 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3260 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3261 |
'start searching at: ' print. |
3262 |
con fullPrint. |
|
3263 |
]. |
|
3264 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
3265 |
con := con sender |
|
3266 |
]. |
|
3267 |
con notNil ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3268 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3269 |
'steppingContext still active - continue stepping' printCR. |
3270 |
]. |
|
3271 |
con := nil. |
|
3272 |
where := nil. here := nil. |
|
3273 |
StepInterruptPending := 1. |
|
3274 |
InterruptPending := 1. |
|
3275 |
InStepInterrupt := nil. |
|
3276 |
^ self |
|
3277 |
]. |
|
3278 |
stepUntilEntering := nil. |
|
2581 | 3279 |
]. |
3280 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3281 |
" |
11636 | 3282 |
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
|
3283 |
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
|
3284 |
if so, ignore the interrupt and continue single sending. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3285 |
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
|
3286 |
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
|
3287 |
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
|
3288 |
" |
29 | 3289 |
isWrap := false. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3290 |
subBlockLeft := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3291 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3292 |
|
57 | 3293 |
inWrap ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3294 |
"/ situation1: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3295 |
"/ valueWithReceiver or other |
11636 | 3296 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3297 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3298 |
"/ situation2: |
11636 | 3299 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3300 |
"/ valueWithReceiver |
11636 | 3301 |
"/ foo (wrapped) <- wrapContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3302 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3303 |
"/ situation3: |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3304 |
"/ other |
11636 | 3305 |
"/ foo (original) <- originalMethodsContext |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3306 |
"/ valueWithReceiver |
11636 | 3307 |
"/ foo (wrapped) <- wrapContext |
3308 |
"/ |
|
3309 |
"/ situation4: |
|
3310 |
"/ ... many-contexts ... (more than 8) |
|
3311 |
"/ possibly foo (original) |
|
3312 |
"/ valueWithReceiver or other |
|
3313 |
"/ foo (wrapped) |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3314 |
"/ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3315 |
|
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3316 |
"/ 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
|
3317 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3318 |
8 timesRepeat:[ |
11636 | 3319 |
wrapContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3320 |
where notNil ifTrue:[ |
11636 | 3321 |
DebuggingDebugger2 ifTrue:[ |
3322 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3323 |
where printCR |
|
3324 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3325 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3326 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3327 |
(method notNil and:[method isWrapped]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3328 |
originalMethodOfWrappedMethod := method originalMethod. |
11636 | 3329 |
wrappedMethod := method. |
3330 |
wrapContext := where. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3331 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3332 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3333 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3334 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3335 |
] |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3336 |
]. |
11636 | 3337 |
DebuggingDebugger2 ifTrue:[ |
3338 |
'wrap-context is: ' print. |
|
3339 |
wrapContext notNil ifTrue:[ |
|
3340 |
((ObjectMemory addressOf:wrapContext) printStringRadix:16) print. ' ' print. |
|
3341 |
]. |
|
3342 |
wrapContext printCR |
|
3343 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3344 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3345 |
'oops no wrap?' errorPrintCR. |
11636 | 3346 |
]. |
3347 |
]. |
|
3348 |
||
3349 |
(inWrap and:[ originalMethodOfWrappedMethod notNil ]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3350 |
isWrap := false. |
11636 | 3351 |
"/ DebuggingDebugger2 ifTrue:[ '----------->' print. originalMethodOfWrappedMethod printCR ]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3352 |
where := here. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3353 |
8 timesRepeat:[ |
11636 | 3354 |
originalMethodsContext isNil ifTrue:[ |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3355 |
where notNil ifTrue:[ |
11636 | 3356 |
DebuggingDebugger2 ifTrue:[ |
3357 |
((ObjectMemory addressOf:where) printStringRadix:16) print. ' ' print. |
|
3358 |
where printCR |
|
3359 |
]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3360 |
where isBlockContext ifFalse:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3361 |
method := where method. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3362 |
method == originalMethodOfWrappedMethod ifTrue:[ |
11636 | 3363 |
originalMethodsContext := here. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3364 |
where == here ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3365 |
"/ situation2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3366 |
DebuggingDebugger2 ifTrue:[ 's2' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3367 |
isWrap := true. |
11636 | 3368 |
"/ here setSender:(wrapContext sender). --- leads to a crash |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3369 |
] ifFalse: [ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3370 |
"/ situation3 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3371 |
DebuggingDebugger2 ifTrue:[ 's3' printCR ]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3372 |
inWrap := false. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3373 |
isWrap := false. |
11210 | 3374 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3375 |
steppedContext := where |
11636 | 3376 |
"/ ] ifFalse:[ |
3377 |
"/ where selector == wrapContext selector ifTrue:[ |
|
3378 |
"/ where receiver == wrapContext receiver ifTrue:[ |
|
3379 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3380 |
"/ method printCR. |
|
3381 |
"/ method originalMethod printCR. |
|
3382 |
"/ originalMethodOfWrappedMethod printCR. |
|
3383 |
"/ '!!!!!!!!!!!!!!!!!!!!!!!!' printCR. |
|
3384 |
"/ ]. |
|
3385 |
"/ ]. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3386 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3387 |
where := where sender |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3388 |
]. |
11210 | 3389 |
]. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3390 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3391 |
]. |
11636 | 3392 |
DebuggingDebugger2 ifTrue:[ |
3393 |
'original method-context is: ' print. |
|
3394 |
originalMethodsContext notNil ifTrue:[ |
|
3395 |
((ObjectMemory addressOf:originalMethodsContext) printStringRadix:16) print. ' ' print. |
|
3396 |
]. |
|
3397 |
originalMethodsContext printCR |
|
3398 |
]. |
|
3399 |
originalMethodsContext isNil ifTrue:[ |
|
3400 |
originalMethodOfWrappedMethod isNil ifTrue:[ |
|
3401 |
"/ situation4 |
|
3402 |
DebuggingDebugger2 ifTrue:[ 's4' printCR ]. |
|
3403 |
DebuggingDebugger2 ifTrue:[ steppedContext printCR ]. |
|
3404 |
isWrap := false. |
|
3405 |
] ifFalse:[ |
|
3406 |
"/ situation1 |
|
3407 |
DebuggingDebugger2 ifTrue:[ 's1' printCR ]. |
|
3408 |
isWrap := true. |
|
3409 |
"/ steppedContext := wrapContext |
|
3410 |
]. |
|
11210 | 3411 |
]. |
29 | 3412 |
]. |
3413 |
||
3414 |
isWrap ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3415 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3416 |
'ignore wrap' printCR. |
3417 |
]. |
|
3418 |
||
3419 |
"/ |
|
3420 |
"/ ignore, while in wrappers hidden setup |
|
3421 |
"/ |
|
3422 |
where := nil. here := nil. |
|
3423 |
ObjectMemory flushInlineCaches. |
|
3424 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3425 |
DebuggingDebugger2 == true ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3426 |
skipLineNr == #return ifTrue:[ |
11210 | 3427 |
'skipRet in wrap' printCR. |
3428 |
] |
|
3429 |
]. |
|
3430 |
||
3431 |
StepInterruptPending := 1. |
|
3432 |
InterruptPending := 1. |
|
3433 |
InStepInterrupt := nil. |
|
3434 |
^ self |
|
29 | 3435 |
]. |
3436 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3437 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 3438 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3439 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3440 |
'bigStep is: ' print. bigStep printCR. |
3441 |
'steppedContext is: ' print. steppedContext printCR. |
|
2581 | 3442 |
]. |
3443 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3444 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3445 |
"/ 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
|
3446 |
"/ |
10205 | 3447 |
(bigStep |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
3448 |
and:[steppedContext notNil]) ifTrue:[ |
11210 | 3449 |
" |
3450 |
a step or next - ignore all contexts below the interesting one |
|
3451 |
" |
|
3452 |
where := here. "the interrupted context" |
|
3453 |
contextBelow := nil. |
|
3454 |
||
3455 |
where home notNil ifTrue:[ |
|
3456 |
"/ |
|
3457 |
"/ in a block called by 'our' context ? |
|
3458 |
"/ |
|
3459 |
where home == steppedContext ifTrue:[ |
|
3055 | 3460 |
"/ '*block*' printCR. |
11210 | 3461 |
inBlock := true |
3462 |
] |
|
3463 |
]. |
|
3464 |
||
3465 |
where == steppedContext ifFalse:[ |
|
3466 |
where := where sender. |
|
3467 |
||
3468 |
where notNil ifTrue:[ |
|
3469 |
where home == steppedContext ifTrue:[ |
|
3055 | 3470 |
"/ '*block*' printCR. |
11210 | 3471 |
inBlock := true. |
3472 |
] |
|
3473 |
]. |
|
57 | 3474 |
|
3475 |
"/ 'looking for ' print. |
|
3055 | 3476 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 3477 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3478 |
"/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
|
3479 |
"/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
|
3480 |
|
11210 | 3481 |
where == steppedContext ifFalse:[ |
3482 |
||
3483 |
"/ check if we are in a context below steppedContext |
|
3484 |
"/ (i.e. if steppedContext can be reached from |
|
3485 |
"/ interrupted context. Not using context-ref but its |
|
3486 |
"/ address to avoid creation of many useless contexts.) |
|
3487 |
||
3488 |
inBlock ifFalse:[ |
|
3489 |
[where notNil] whileTrue:[ |
|
3490 |
||
3491 |
"/ if either the receiver or any arg of this context |
|
3492 |
"/ is a block of the steppedContext, we must really |
|
3493 |
"/ do a single step. Otherwise, stepping through a |
|
3494 |
"/ do:-loop would be very difficult. |
|
3495 |
receiver := where receiver. |
|
3496 |
(receiver isBlock |
|
3497 |
and:[(receiver isKindOf:Block) |
|
3498 |
and:[receiver home == steppedContext]]) |
|
3499 |
ifTrue:[ |
|
3500 |
anyStepBlocks := true. |
|
3501 |
] ifFalse:[ |
|
3502 |
where args do:[:arg | |
|
3503 |
(arg isBlock |
|
3504 |
and:[(arg isKindOf:Block) |
|
3505 |
and:[arg home == steppedContext]]) |
|
3506 |
ifTrue:[ |
|
3507 |
anyStepBlocks := true. |
|
3508 |
] |
|
3509 |
] |
|
3510 |
]. |
|
3511 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3512 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3513 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
3514 |
where selector printCR. |
|
3515 |
]. |
|
3516 |
||
3517 |
where == steppedContext ifTrue:[ |
|
3055 | 3518 |
"/ 'found it - below; ignore' printCR. |
11210 | 3519 |
" |
3520 |
found the interesting context somwehere up in the |
|
3521 |
chain. We seem to be still below the interesting one ... |
|
3522 |
" |
|
3523 |
tracing == true ifTrue:[ |
|
3524 |
here printString printCR |
|
3525 |
]. |
|
3526 |
" |
|
3527 |
yes, a context below |
|
3528 |
- continue and schedule another stepInterrupt. |
|
3529 |
Must flush caches since optimized methods not always |
|
3530 |
look for pending interrupts |
|
3531 |
" |
|
3532 |
||
3533 |
contextBelow notNil ifTrue:[ |
|
3055 | 3534 |
"/ '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
|
3535 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3536 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3537 |
"/ 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
|
3538 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3539 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3540 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3541 |
'below stepCon; continue until unwind of: ' print. |
3542 |
contextBelow printCR. |
|
3543 |
]. |
|
3544 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
|
3545 |
StepInterruptPending := nil. |
|
3546 |
] ifFalse:[ |
|
3547 |
ObjectMemory flushInlineCaches. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3548 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3549 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3550 |
"/ 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
|
3551 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3552 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3553 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3554 |
'in stepCon; continue single stepping' printCR. |
3555 |
]. |
|
3556 |
StepInterruptPending := 1. |
|
3557 |
InterruptPending := 1. |
|
3558 |
]. |
|
3559 |
where := nil. here := nil. |
|
3560 |
InStepInterrupt := nil. |
|
3561 |
||
3562 |
^ self |
|
3563 |
]. |
|
3564 |
||
3565 |
(steppedContext notNil and:[ |
|
3566 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
3567 |
inBlockBelow := true. |
|
3568 |
]. |
|
3569 |
||
3570 |
anyStepBlocks ifFalse:[ |
|
3571 |
inBlock ifFalse:[ |
|
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3572 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3573 |
"/ 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
|
3574 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3575 |
where isBlockContext ifFalse:[ |
11210 | 3576 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3577 |
]. |
11210 | 3578 |
] |
3579 |
]. |
|
3580 |
where := where sender |
|
3581 |
]. |
|
3582 |
s := 'context returned'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3583 |
subBlockLeft := true. |
11210 | 3584 |
]. |
3585 |
] ifTrue:[ |
|
3055 | 3586 |
"/ 'found it right in sender' printCR. |
11210 | 3587 |
s := 'after step' |
3588 |
]. |
|
3589 |
] ifTrue:[ |
|
3055 | 3590 |
"/ 'found it right away' printCR. |
11210 | 3591 |
s := 'after step' |
3592 |
]. |
|
0 | 3593 |
] ifFalse:[ |
3055 | 3594 |
"/ ' send' printCR. |
11210 | 3595 |
" |
3596 |
a send |
|
3597 |
" |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3598 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3599 |
'clear steppedContext' printCR. |
3600 |
]. |
|
3601 |
steppedContext := nil. |
|
3602 |
s := 'after send' |
|
0 | 3603 |
]. |
7 | 3604 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3605 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3606 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
11210 | 3607 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3608 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3609 |
|
790 | 3610 |
"/ handle the case, when a subBlock leaves; |
3611 |
"/ continue stepping in the home context. |
|
3612 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3613 |
subBlockLeft ifTrue:[ |
11210 | 3614 |
steppedContext home notNil ifTrue:[ |
3615 |
steppedContext := steppedContext home. |
|
3616 |
s := 'after step'. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3617 |
subBlockLeft := false. |
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3618 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3619 |
|
11210 | 3620 |
] |
790 | 3621 |
]. |
3622 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3623 |
" |
10205 | 3624 |
kludge to hide breakpoint wrappers in the context list: |
11210 | 3625 |
check if we are in a wrapper methods hidden exit-sequence |
3626 |
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
|
3627 |
" |
10205 | 3628 |
(where isNil |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3629 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3630 |
ifTrue:[ |
11210 | 3631 |
"/ did not find our steppedContext along the chain; |
3632 |
"/ could be in a wrappedMethods exitBlock ... |
|
3633 |
||
3634 |
leftWrap ifFalse:[ |
|
3635 |
where := here. |
|
3636 |
wrappedMethod := nil. |
|
3637 |
5 timesRepeat:[ |
|
3638 |
where notNil ifTrue:[ |
|
3639 |
where isBlockContext ifFalse:[ |
|
3640 |
method := where method. |
|
3641 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3642 |
where == wrapperContext ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3643 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3644 |
'change stepCon fromWrapped: ' print. |
3645 |
steppedContext print. |
|
3646 |
' to: ' print. |
|
3647 |
wrapperContext printCR. |
|
3648 |
]. |
|
3649 |
||
3650 |
inWrap := true. |
|
3651 |
enteredWrap := true. |
|
3652 |
steppedContext := wrapperContext. |
|
3653 |
wrapperContext := nil. |
|
3654 |
] |
|
3655 |
]. |
|
3656 |
]. |
|
3657 |
where := where sender |
|
3658 |
] |
|
3659 |
]. |
|
3660 |
]. |
|
3661 |
enteredWrap ifTrue:[ |
|
3662 |
ignore := true |
|
3663 |
] |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3664 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3665 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3666 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3667 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3668 |
subBlockLeft ifTrue:[ |
11210 | 3669 |
"/ special care for stepInterrupt in send, |
3670 |
"/ when created a dummy context (lineNr == 1) |
|
3671 |
||
3672 |
steppedContext lineNumber isNil ifTrue:[ |
|
3673 |
steppedContext selector == here sender selector ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3674 |
subBlockLeft := false. |
11210 | 3675 |
s := 'after step'. |
3676 |
steppedContext := here sender. |
|
3677 |
]. |
|
3678 |
]. |
|
3679 |
oneMore := true |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3680 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3681 |
|
57 | 3682 |
inBlock ifTrue:[ |
3055 | 3683 |
"/ 'inBlock' printCR. |
11210 | 3684 |
s := 'in block'. |
57 | 3685 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3686 |
inBlockBelow ifTrue:[ |
11210 | 3687 |
ignore := true |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3688 |
]. |
57 | 3689 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3690 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3691 |
where notNil ifTrue:[ |
3692 |
'(' print. steppedContextLineno print. ') ' print. |
|
3693 |
where printCR. |
|
3694 |
]. |
|
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
3695 |
]. |
57 | 3696 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3697 |
ignore ifFalse:[ |
11210 | 3698 |
(bigStep |
3699 |
and:[steppedContextLineno notNil |
|
3700 |
and:[where notNil |
|
3701 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
|
3702 |
(here isBlockContext |
|
3703 |
and:[(here methodHome == steppedContext) |
|
3704 |
or:[here home == steppedContext]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3705 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3706 |
'same line but in block' printCR. |
3707 |
]. |
|
3708 |
||
3709 |
steppedContext := actualContext := here. |
|
3710 |
steppedContextLineno := here lineNumber. |
|
3711 |
] ifFalse:[ |
|
3712 |
"/ kludge - I only have the info for up to 255 lines |
|
3713 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3714 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3715 |
'same line - ignored' printCR. |
3716 |
]. |
|
3717 |
ignore := true |
|
3718 |
]. |
|
3719 |
]. |
|
3720 |
]. |
|
3721 |
||
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3722 |
(subBlockLeft not |
11210 | 3723 |
and:[skipLineNr notNil |
3724 |
and:[where notNil |
|
3725 |
and:[where lineNumber notNil |
|
3726 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3727 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3728 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
3729 |
]. |
|
3730 |
ignore := true |
|
3731 |
]. |
|
3732 |
||
3733 |
(steppedContextLineno isNil |
|
3734 |
and:[skipLineNr isNil |
|
3735 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3736 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3737 |
'same line2 (after conIRQ) - ignored' printCR. |
3738 |
]. |
|
3739 |
ignore := true |
|
3740 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3741 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3742 |
|
57 | 3743 |
ignore ifTrue:[ |
3055 | 3744 |
"/' ' printCR. |
11210 | 3745 |
where := nil. here := nil. |
3746 |
" |
|
3747 |
yes, a context below |
|
3748 |
- continue and schedule another stepInterrupt. |
|
3749 |
Must flush caches since optimized methods not always |
|
3750 |
look for pending interrupts |
|
3751 |
" |
|
3752 |
ObjectMemory flushInlineCaches. |
|
3753 |
StepInterruptPending := 1. |
|
3754 |
InterruptPending := 1. |
|
3755 |
InStepInterrupt := nil. |
|
3756 |
^ self |
|
57 | 3757 |
]. |
3758 |
||
3055 | 3759 |
"/ ' ' printCR. |
57 | 3760 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3761 |
self label:(s , ' (process: ' , processName , ')'). |
7 | 3762 |
|
57 | 3763 |
tracing := false. |
3764 |
bigStep := false. |
|
3765 |
||
0 | 3766 |
"release refs to context" |
3767 |
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
|
3768 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3769 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3770 |
DebuggingDebugger2 == true ifTrue:[ |
11210 | 3771 |
'==> 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
|
3772 |
]. |
1364 | 3773 |
|
3774 |
initiallyShown := nil. |
|
3775 |
(oneMore == true) ifTrue:[ |
|
11210 | 3776 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
3777 |
initiallyShown := 2 |
|
3778 |
] ifFalse:[ |
|
3779 |
initiallyShown := 1 |
|
3780 |
] |
|
1364 | 3781 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3782 |
con := thisContext sender sender. |
3435 | 3783 |
|
9235 | 3784 |
HaltInterrupt handle:[:ex | |
11210 | 3785 |
'DebugView [info]: halt/breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
3786 |
ex proceed |
|
3435 | 3787 |
] do:[ |
11210 | 3788 |
self enter:con select:initiallyShown |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3789 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3790 |
con := nil |
1364 | 3791 |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
3792 |
"Created: / 14-10-1996 / 12:53:39 / cg" |
11636 | 3793 |
"Modified: / 20-07-2012 / 15:26:26 / cg" |
0 | 3794 |
! ! |
3795 |
||
4867 | 3796 |
!DebugView methodsFor:'menu & button actions'! |
266 | 3797 |
|
5875 | 3798 |
addBrowserBookmark |
3799 |
"add a browser-bookmark for the selected contexts method" |
|
3800 |
||
3801 |
|cls sel| |
|
3802 |
||
3803 |
selectedContext isNil ifTrue:[^ self]. |
|
3804 |
||
3805 |
cls := selectedContext receiver class. |
|
3806 |
sel := selectedContext selector. |
|
3807 |
(cls includesSelector:sel) ifFalse:[ |
|
11210 | 3808 |
sel := nil |
5875 | 3809 |
]. |
3810 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
3811 |
! |
|
3812 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3813 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3814 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3815 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3816 |
"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
|
3817 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3818 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3819 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3820 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3821 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3822 |
"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
|
3823 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3824 |
|
266 | 3825 |
autoUpdateOff |
3826 |
"stop the update process" |
|
3827 |
||
3828 |
updateProcess notNil ifTrue:[ |
|
11210 | 3829 |
monitorToggle lampColor:(Color yellow). |
3830 |
updateProcess terminate. |
|
3831 |
updateProcess := nil |
|
266 | 3832 |
] |
3833 |
! |
|
3834 |
||
3835 |
autoUpdateOn |
|
3836 |
"fork a subprocess which updates the contextList in regular intervals" |
|
3837 |
||
3838 |
updateProcess isNil ifTrue:[ |
|
11210 | 3839 |
updateProcess := |
3840 |
[ |
|
3841 |
[true] whileTrue:[ |
|
3842 |
monitorToggle showLamp ifTrue:[ |
|
3843 |
monitorToggle lampColor:(Color yellow). |
|
3844 |
] ifFalse:[ |
|
3845 |
monitorToggle activeForegroundColor:Color black. |
|
3846 |
]. |
|
3847 |
(Delay forSeconds:0.25) wait. |
|
3848 |
self updateContext. |
|
3849 |
monitorToggle showLamp ifTrue:[ |
|
3850 |
monitorToggle lampColor:(Color red). |
|
3851 |
] ifFalse:[ |
|
3852 |
monitorToggle activeForegroundColor:Color red. |
|
3853 |
]. |
|
3854 |
(Delay forSeconds:0.25) wait. |
|
3855 |
self updateContext. |
|
3856 |
] |
|
3857 |
] forkAt:(Processor activePriority - 1) |
|
266 | 3858 |
] |
3859 |
||
3860 |
! |
|
3861 |
||
3269 | 3862 |
browseClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3863 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3864 |
|
3865 |
|cls sel| |
|
3866 |
||
3867 |
selectedContext isNil ifTrue:[^ self]. |
|
3868 |
||
3869 |
cls := selectedContext receiver class. |
|
3870 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3871 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 3872 |
sel := nil |
3269 | 3873 |
]. |
3874 |
cls browserClass openInClass:cls selector:sel. |
|
3875 |
||
3876 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3877 |
! |
|
3878 |
||
3879 |
browseClassHierarchy |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3880 |
"browse the receiver's classHierarchy (of the selected context's message)" |
3269 | 3881 |
|
3882 |
|cls mthd| |
|
3883 |
||
3884 |
selectedContext isNil ifTrue:[^ self]. |
|
3885 |
||
3886 |
mthd := selectedContext method. |
|
3447 | 3887 |
mthd notNil ifTrue:[ |
11210 | 3888 |
cls := mthd containingClass. |
3889 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3890 |
]. |
3891 |
cls isNil ifTrue:[ |
|
11210 | 3892 |
cls := selectedContext receiver class |
3269 | 3893 |
]. |
3894 |
cls browserClass browseClassHierarchy:cls. |
|
3895 |
||
3447 | 3896 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 3897 |
! |
3898 |
||
3899 |
browseFullClassProtocol |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3900 |
"browse the receiver's full protocol (of the selected context's message)" |
3269 | 3901 |
|
3902 |
|cls mthd| |
|
3903 |
||
3904 |
selectedContext isNil ifTrue:[^ self]. |
|
3905 |
||
3906 |
mthd := selectedContext method. |
|
3447 | 3907 |
mthd notNil ifTrue:[ |
11210 | 3908 |
cls := mthd containingClass. |
3909 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3910 |
]. |
3911 |
cls isNil ifTrue:[ |
|
11210 | 3912 |
cls := selectedContext receiver class |
3269 | 3913 |
]. |
3914 |
cls browserClass browseFullClassProtocol:cls. |
|
3915 |
||
3447 | 3916 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 3917 |
! |
3918 |
||
3919 |
browseImplementingClass |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3920 |
"browse the implementing class (of the selected context's message)" |
3269 | 3921 |
|
11610 | 3922 |
|con mthd who sel cls home| |
3923 |
||
3924 |
con := selectedContext ? actualContext. |
|
3925 |
con isNil ifTrue:[^ self]. |
|
3926 |
||
3927 |
mthd := con method. |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3928 |
mthd notNil ifTrue:[ |
11610 | 3929 |
who := mthd who. |
11210 | 3930 |
who notNil ifTrue:[ |
3931 |
cls := who methodClass. |
|
3932 |
sel := who methodSelector. |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3933 |
] ifFalse:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3934 |
"might have been re-accepted" |
11610 | 3935 |
(home := con methodHome) notNil ifTrue:[ |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3936 |
(sel := home selector) notNil ifTrue:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3937 |
cls := home receiver class |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3938 |
whichClassImplements:selectedContext selector. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3939 |
cls notNil ifTrue:[ |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3940 |
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
|
3941 |
]. |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3942 |
] |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3943 |
]. |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3944 |
]. |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3945 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3946 |
cls isNil ifTrue:[ |
11210 | 3947 |
"/ class not found - try receiver |
11610 | 3948 |
cls := con receiver class |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3949 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3950 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3951 |
cls browserClass openInClass:cls selector:sel. |
266 | 3952 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3953 |
"Created: / 22-11-1995 / 21:27:01 / cg" |
11610 | 3954 |
"Modified: / 19-07-2012 / 11:27:32 / cg" |
266 | 3955 |
! |
3956 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3957 |
browseImplementors |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3958 |
"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
|
3959 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3960 |
selectedContext isNil ifTrue:[ |
11210 | 3961 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3962 |
]. |
4153 | 3963 |
"/ selectedContext receiver class browserClass |
11610 | 3964 |
self withWaitCursorDo:[ |
3965 |
UserPreferences systemBrowserClass |
|
3966 |
browseImplementorsOf:selectedContext selector. |
|
3967 |
] |
|
3968 |
||
3969 |
"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
|
3970 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3971 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3972 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3973 |
"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
|
3974 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3975 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3976 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3977 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 3978 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3979 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3980 |
initial isNil ifTrue:[ |
11210 | 3981 |
initial := selectedContext isNil |
3982 |
ifTrue:[nil] |
|
3983 |
ifFalse:[selectedContext selector]. |
|
10205 | 3984 |
]. |
3985 |
selector := Dialog |
|
11210 | 3986 |
requestSelector:'Selector to browse implementors of:' |
3987 |
initialAnswer:initial. |
|
11610 | 3988 |
|
3989 |
selector notEmptyOrNil ifTrue:[ |
|
3990 |
self withWaitCursorDo:[ |
|
3991 |
UserPreferences systemBrowserClass |
|
3992 |
browseImplementorsMatching:selector. |
|
3993 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3994 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3995 |
|
11610 | 3996 |
"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
|
3997 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3998 |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3999 |
browseProcessesApplication |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4000 |
"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
|
4001 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4002 |
|p appClass| |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4003 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4004 |
p := inspectedProcess ? Processor activeProcess. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4005 |
(p notNil and:[p isGUIProcess]) ifTrue:[ |
11210 | 4006 |
WindowGroup scheduledWindowGroups do:[:wg | |
4007 |
wg process == p ifTrue:[ |
|
4008 |
appClass := wg application class. |
|
4009 |
appClass browserClass openInClass:appClass selector:nil. |
|
4010 |
^ self |
|
4011 |
] |
|
4012 |
] |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4013 |
]. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4014 |
! |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4015 |
|
3269 | 4016 |
browseReceiversClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4017 |
"browse the receiver's class (of the selected context's message)" |
3269 | 4018 |
|
4019 |
|cls sel| |
|
4020 |
||
4021 |
selectedContext isNil ifTrue:[^ self]. |
|
4022 |
||
11610 | 4023 |
selectedContext isCheapBlockContext ifTrue:[ |
4024 |
cls := selectedContext method mclass. |
|
4025 |
sel := selectedContext method selector. |
|
4026 |
] ifFalse:[ |
|
4027 |
cls := selectedContext receiver class. |
|
4028 |
sel := selectedContext selector. |
|
4029 |
]. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
4030 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 4031 |
sel := nil |
3269 | 4032 |
]. |
4033 |
cls browserClass openInClass:cls selector:sel. |
|
4034 |
||
11610 | 4035 |
"Modified: / 19-07-2012 / 11:29:48 / cg" |
3269 | 4036 |
! |
4037 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4038 |
browseSenders |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
4039 |
"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
|
4040 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4041 |
selectedContext isNil ifTrue:[ |
11210 | 4042 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4043 |
]. |
11610 | 4044 |
self withWaitCursorDo:[ |
4045 |
UserPreferences systemBrowserClass |
|
4046 |
browseAllCallsOn:selectedContext selector. |
|
4047 |
] |
|
4048 |
||
4049 |
"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
|
4050 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4051 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4052 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4053 |
"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
|
4054 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4055 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4056 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4057 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 4058 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4059 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4060 |
initial isNil ifTrue:[ |
11210 | 4061 |
initial := selectedContext isNil |
4062 |
ifTrue:[nil] |
|
4063 |
ifFalse:[selectedContext selector]. |
|
10205 | 4064 |
]. |
4065 |
selector := Dialog |
|
11210 | 4066 |
requestSelector:'Selector to browse senders of:' |
4067 |
initialAnswer:initial. |
|
11610 | 4068 |
|
4069 |
selector notEmptyOrNil ifTrue:[ |
|
4070 |
self withWaitCursorDo:[ |
|
4071 |
UserPreferences systemBrowserClass |
|
4072 |
browseAllCallsOn:selector asSymbol. |
|
4073 |
] |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4074 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
4075 |
|
11610 | 4076 |
"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
|
4077 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
4078 |
|
11391 | 4079 |
clearRememberedCallchain |
4080 |
"clear the remembered callchain." |
|
4081 |
||
4082 |
RememberedCallChain := nil |
|
4083 |
||
4084 |
"Created: / 08-03-2012 / 01:29:46 / cg" |
|
4085 |
! |
|
4086 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4087 |
closeAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4088 |
(Dialog confirm:'Close all Debuggers (without confirmation if code was changed)?') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4089 |
ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4090 |
^ self |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4091 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4092 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4093 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4094 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4095 |
debugger busy ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4096 |
debugger destroyWithConfirmation:true. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4097 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4098 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4099 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4100 |
self closeRequest. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4101 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4102 |
"Created: / 23-03-2012 / 12:40:22 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4103 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4104 |
|
9626 | 4105 |
configureX:x y:y width:newWidth height:newHeight |
10205 | 4106 |
super configureX:x y:y width:newWidth height:newHeight. |
9626 | 4107 |
LastExtent := self extent. |
4108 |
LastOrigin := self origin. |
|
4109 |
||
4110 |
"Created: / 10-11-2010 / 10:09:11 / cg" |
|
4111 |
! |
|
4112 |
||
266 | 4113 |
copyWalkbackText |
4114 |
"place the contents of the walkback view into the copy-paste buffer. |
|
4115 |
This allows pasting it into some other view for printing ..." |
|
4116 |
||
10760 | 4117 |
|infoText| |
4118 |
||
4119 |
contextArray isEmptyOrNil ifTrue:[ |
|
4120 |
infoText := 'No context, no walkback'. |
|
4121 |
] ifFalse:[ |
|
4122 |
infoText := (contextArray collect:[:con | con fullPrintString]) asStringCollection. |
|
4123 |
]. |
|
4124 |
||
4125 |
self setClipboardText:infoText |
|
266 | 4126 |
|
4127 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
4128 |
! |
|
4129 |
||
4130 |
doAbort |
|
1187 | 4131 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 4132 |
at save places (for example: in the event loop) and returns back |
4133 |
from whatever the process is doing, but does not terminate it." |
|
4134 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4135 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4136 |
(self confirm:('Code modified - abort anyway ?')) |
4137 |
ifFalse:[ |
|
4138 |
^ self |
|
4139 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4140 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4141 |
|
266 | 4142 |
inspecting ifTrue:[ |
11210 | 4143 |
inspectedProcess isDead ifTrue:[ |
4144 |
self showTerminated. |
|
4145 |
^ self |
|
4146 |
]. |
|
4147 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4148 |
self showError:'** the process does not handle the abort signal **' |
|
4149 |
] ifTrue:[ |
|
4150 |
self interruptProcessWith:[AbortOperationRequest raise]. |
|
4151 |
]. |
|
4152 |
^ self |
|
266 | 4153 |
]. |
4154 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4155 |
steppedContext := wrapperContext := nil. |
266 | 4156 |
haveControl := false. |
4157 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4158 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4159 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4160 |
catchBlock notNil ifTrue:[ |
11210 | 4161 |
abortButton turnOff. |
4162 |
catchBlock value. |
|
4163 |
||
4164 |
"/ not reached |
|
4165 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
266 | 4166 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4167 |
|
266 | 4168 |
^ self. |
4169 |
||
3447 | 4170 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 4171 |
! |
4172 |
||
6487 | 4173 |
doAbortAll |
4174 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
4175 |
at save places (for example: in the event loop) and returns back |
|
4176 |
from whatever the process is doing, but does not terminate it." |
|
4177 |
||
4178 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
11210 | 4179 |
(self confirm:('Code modified - abort anyway ?')) |
4180 |
ifFalse:[ |
|
4181 |
^ self |
|
4182 |
] |
|
6487 | 4183 |
]. |
4184 |
||
4185 |
inspecting ifTrue:[ |
|
11210 | 4186 |
inspectedProcess isDead ifTrue:[ |
4187 |
self showTerminated. |
|
4188 |
^ self |
|
4189 |
]. |
|
4190 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
4191 |
self showError:'** the process does not handle the abort signal **' |
|
4192 |
] ifTrue:[ |
|
4193 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
4194 |
]. |
|
4195 |
^ self |
|
6487 | 4196 |
]. |
4197 |
||
4198 |
steppedContext := wrapperContext := nil. |
|
4199 |
haveControl := false. |
|
4200 |
exitAction := #abortAll. |
|
4201 |
||
4202 |
"exit private event-loop" |
|
4203 |
catchBlock notNil ifTrue:[ |
|
11210 | 4204 |
abortButton turnOff. |
4205 |
catchBlock value. |
|
4206 |
||
4207 |
"/ not reached |
|
4208 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
6487 | 4209 |
]. |
4210 |
||
4211 |
^ self. |
|
4212 |
||
4213 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
4214 |
! |
|
4215 |
||
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4216 |
doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4217 |
"ask for and change the process's priority" |
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 |
|oldPrio newPrio s| |
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 |
oldPrio := (inspectedProcess ? Processor activeProcess) priority. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4222 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4223 |
[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4224 |
s := Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4225 |
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
|
4226 |
initialAnswer:oldPrio printString. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4227 |
s isEmptyOrNil ifTrue:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4228 |
newPrio := Integer readFrom:s onError:nil. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4229 |
newPrio isNil |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4230 |
] whileTrue. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4231 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4232 |
newPrio := newPrio max:(Processor lowestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4233 |
newPrio := newPrio min:(Processor highestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4234 |
newPrio >= Processor highIOPriority ifTrue:[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4235 |
(Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4236 |
confirm:(resources |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4237 |
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
|
4238 |
ifFalse:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4239 |
]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4240 |
(inspectedProcess ? Processor activeProcess) priority:newPrio. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4241 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4242 |
"Created: / 07-03-2012 / 14:15:09 / cg" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4243 |
! |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
4244 |
|
266 | 4245 |
doContinue |
4246 |
"continue from menu" |
|
4247 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4248 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
4249 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4250 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4251 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
4252 |
^ self |
|
4253 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4254 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4255 |
|
266 | 4256 |
inspecting ifTrue:[ |
11210 | 4257 |
device hasColors ifTrue:[ |
4258 |
continueButton foregroundColor:Color red darkened. |
|
4259 |
]. |
|
4260 |
continueButton label:(resources string:'Stop'). |
|
4261 |
continueButton action:[self doStop]. |
|
4262 |
||
4263 |
self processPerform:#resume. |
|
4264 |
||
4265 |
^ self |
|
266 | 4266 |
]. |
4267 |
canContinue ifTrue:[ |
|
11210 | 4268 |
exContext := thisContext findSpecialHandle:false raise:true. |
4269 |
||
4270 |
(exContext notNil |
|
4271 |
and:[ (ex := exContext receiver) isLazyValue not |
|
4272 |
and:[ ex isException |
|
4273 |
and:[ ex signal == NoHandlerError |
|
4274 |
and:[ ex parameter signal == RecursionError]]]]) |
|
4275 |
ifTrue:[ |
|
4276 |
"/ debug due to unhandled recursionInterrupt. |
|
4277 |
"/ ask if we should proceed with more stack. |
|
4278 |
||
4279 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
|
4280 |
answer == true ifTrue:[ |
|
4281 |
proc := Processor activeProcess. |
|
4282 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
|
4283 |
]. |
|
4284 |
]. |
|
4285 |
||
4286 |
steppedContext := wrapperContext := nil. |
|
4287 |
tracing := false. |
|
4288 |
haveControl := false. |
|
4289 |
exitAction := #continue. |
|
4290 |
||
4291 |
"exit private event-loop" |
|
4292 |
catchBlock value. |
|
4293 |
||
4294 |
"/ not reached. |
|
4295 |
'DebugView [warning]: continue failed' errorPrintCR. |
|
4296 |
continueButton turnOff. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4297 |
|
266 | 4298 |
] ifFalse:[ |
11210 | 4299 |
inspecting ifFalse:[ |
4300 |
'DebugView [info]: resuming top context' infoPrintCR. |
|
4301 |
self showSelection:1. |
|
4302 |
self doReturn |
|
4303 |
] |
|
266 | 4304 |
] |
477 | 4305 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
4306 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 4307 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 4308 |
! |
4309 |
||
3187 | 4310 |
doDefine |
5955 | 4311 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4312 |
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
|
4313 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4314 |
selectionIndex := contextView selection. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4315 |
restart := true. |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4316 |
|
3283 | 4317 |
selector := actualContext selector. |
8963 | 4318 |
implClass := actualContext receiver class whichClassIncludesSelector:selector. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4319 |
implClass notNil ifTrue:[ |
11210 | 4320 |
"/ must be a subclassResponsibility |
4321 |
||
4322 |
idx := contextArray identityIndexOf:actualContext. |
|
4323 |
idx > 1 ifTrue:[ |
|
4324 |
callee := contextArray at:idx-1. |
|
4325 |
||
4326 |
callee selector == #subclassResponsibility ifTrue:[ |
|
4327 |
restart := false. |
|
4328 |
] |
|
4329 |
]. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4330 |
]. |
5955 | 4331 |
|
4332 |
"generate nice argument names" |
|
4333 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
4334 |
bagOfUsedClassNames := Bag new. |
|
10205 | 4335 |
argNames := actualContext args |
11210 | 4336 |
collect: |
4337 |
[:eachArg | |
|
4338 |
|nm| |
|
4339 |
||
12080 | 4340 |
nm := eachArg class nameWithoutPrefix. |
11210 | 4341 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
4342 |
nm article , nm |
|
4343 |
] ifFalse:[ |
|
4344 |
bagOfUsedClassNames add:nm. |
|
4345 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
4346 |
]. |
|
4347 |
]. |
|
5955 | 4348 |
|
4349 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 4350 |
|
3447 | 4351 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
4352 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
4353 |
||
4354 |
actualContext receiver isNil ifTrue:[ |
|
11210 | 4355 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
4356 |
ifFalse:[ |
|
4357 |
^ self |
|
4358 |
] |
|
3447 | 4359 |
]. |
4360 |
||
4361 |
receiversClass := actualContext receiver class. |
|
4362 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4363 |
"/ code for a getter |
3447 | 4364 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
11210 | 4365 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
4366 |
cat := 'accessing'. |
|
3447 | 4367 |
]. |
11457
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 |
"/ code for a setter |
3447 | 4370 |
(selector numArgs == 1 |
4371 |
and:[(selector endsWith:':') |
|
10205 | 4372 |
and:[receiversClass instVarNames includes:(selector copyWithoutLast:1)]]) |
3447 | 4373 |
ifTrue:[ |
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4374 |
varName := selector copyWithoutLast:1. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4375 |
argName := argNames first. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4376 |
code := '%1\' , haltStmtFix , '\ %3 := %4.'. |
11210 | 4377 |
cat := 'accessing'. |
3447 | 4378 |
]. |
4379 |
||
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4380 |
"/ code for a tester |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4381 |
(selector numArgs == 0 |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4382 |
and:[(selector startsWith:'is') |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4383 |
and:[(Smalltalk classNamed:(selector copyFrom:3)) notNil ]]) |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4384 |
ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4385 |
(receiversClass nameWithoutPrefix = (selector copyFrom:3)) ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4386 |
code := '%1\' , haltStmtFix , '\ ^ true.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4387 |
] ifFalse:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4388 |
code := '%1\' , haltStmtFix , '\ ^ false.'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4389 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4390 |
cat := 'testing'. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4391 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4392 |
|
3447 | 4393 |
"/ actualContext receiver isClass ifTrue:[ |
4394 |
"/ selector == #new ifTrue:[ |
|
4395 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
4396 |
"/ ]. |
|
4397 |
"/ selector == #'new:' ifTrue:[ |
|
4398 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
4399 |
"/ ]. |
|
4400 |
"/ ]. |
|
4401 |
code isNil ifTrue:[ |
|
11210 | 4402 |
code := '%1\' , haltStmtDef |
10205 | 4403 |
]. |
4404 |
||
4405 |
self |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4406 |
codeAccept:(code bindWith:proto with:selector with:varName with:argName) withCRs |
11210 | 4407 |
inClass:receiversClass |
4408 |
unwind:false |
|
4409 |
category:cat |
|
4410 |
onCancel:[^ self]. |
|
3269 | 4411 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4412 |
self doShowSelection:selectionIndex. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4413 |
restart ifTrue:[ |
11210 | 4414 |
self doRestart |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4415 |
] |
3427 | 4416 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
4417 |
"Modified: / 23-03-2012 / 09:49:31 / cg" |
3187 | 4418 |
! |
4419 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4420 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4421 |
"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
|
4422 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4423 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4424 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4425 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4426 |
(self confirm:('Code modified - step anyway ?')) |
4427 |
ifFalse:[ |
|
4428 |
^ self |
|
4429 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4430 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4431 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4432 |
canContinue ifTrue:[ |
11210 | 4433 |
steppedContext := wrapperContext := nil. |
4434 |
haveControl := false. |
|
4435 |
exitAction := #step. |
|
4436 |
||
4437 |
"exit private event-loop" |
|
4438 |
catchBlock value. |
|
4439 |
||
4440 |
"/ not reached |
|
4441 |
'DebugView [warning]: send failed' errorPrintCR. |
|
4442 |
sendButton turnOff. |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4443 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4444 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4445 |
"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
|
4446 |
"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
|
4447 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4448 |
|
266 | 4449 |
doNext |
1072 | 4450 |
"skip for next source-code line; entering blocks" |
266 | 4451 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4452 |
stepHow := #nextIn. |
266 | 4453 |
self doStep:nil |
790 | 4454 |
|
1072 | 4455 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4456 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4457 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4458 |
doNextOut |
1072 | 4459 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4460 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4461 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4462 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4463 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4464 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 4465 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4466 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4467 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4468 |
doNextOver |
1072 | 4469 |
"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
|
4470 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4471 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4472 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4473 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4474 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 4475 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 4476 |
! |
4477 |
||
4478 |
doNoTrace |
|
4479 |
traceView notNil ifTrue:[ |
|
11210 | 4480 |
traceView topView destroy. |
4481 |
traceView := nil. |
|
266 | 4482 |
]. |
4483 |
tracing := false |
|
4484 |
! |
|
4485 |
||
4356 | 4486 |
doOpenReportMailApp |
4487 |
"open a mail report tool" |
|
4488 |
||
4489 |
| str | |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4490 |
|
4356 | 4491 |
str := '' writeStream. |
4492 |
||
4493 |
str nextPutLine:('Error notification from ' |
|
11210 | 4494 |
, OperatingSystem getLoginName |
4495 |
, '@' |
|
4496 |
, OperatingSystem getHostName). |
|
4356 | 4497 |
str cr. |
4498 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
4499 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 4500 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
4501 |
str nextPutLine:('Description: ' , self label). |
|
4502 |
"/ str nextPutLine:('Error: ', printedException description). |
|
4503 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
4504 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
4505 |
str nextPutLine:'Backtrace:'. |
|
4506 |
str cr. |
|
4507 |
||
4508 |
firstContext notNil ifTrue:[ |
|
11210 | 4509 |
firstContext fullPrintAllOn:str. |
4356 | 4510 |
]. |
4511 |
str cr;cr. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4512 |
|
10205 | 4513 |
SendMailTool |
11210 | 4514 |
openForMessage:(str contents) |
4515 |
withSubject:('STX Error:[', self label, ']') |
|
4516 |
preOpenBlock:[:inst| |
|
4517 |
inst recipientEntryField value:'error@exept.de' |
|
4518 |
]. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4519 |
|
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4520 |
"Modified: / 20-09-2007 / 12:40:40 / cg" |
4356 | 4521 |
! |
4522 |
||
266 | 4523 |
doRestart |
4524 |
"restart - the selected context will be restarted" |
|
10205 | 4525 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4526 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4527 |
(self confirm:('Code modified - restart anyway ?')) ifFalse:[ |
4528 |
^ self |
|
4529 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4530 |
]. |
266 | 4531 |
inspecting ifTrue:[ |
11210 | 4532 |
selectedContext isNil ifTrue:[ |
4533 |
^ self showError:'** select a context first **' |
|
4534 |
]. |
|
4535 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
|
4536 |
^ self |
|
266 | 4537 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4538 |
steppedContext := wrapperContext := nil. |
266 | 4539 |
haveControl := false. |
6365 | 4540 |
exitAction := #restart. "exit private event-loop" |
4541 |
||
4542 |
catchBlock value. |
|
4543 |
||
4544 |
"/ normally not reached |
|
10205 | 4545 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4546 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4547 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4548 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4549 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 4550 |
! |
4551 |
||
4552 |
doReturn |
|
4553 |
"return - the selected context will do a ^nil" |
|
4554 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4555 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4556 |
(self confirm:('Code modified - return anyway ?')) |
4557 |
ifFalse:[ |
|
4558 |
^ self |
|
4559 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4560 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4561 |
|
266 | 4562 |
inspecting ifTrue:[ |
11210 | 4563 |
selectedContext isNil ifTrue:[ |
4564 |
^ self showError:'** select a context first **' |
|
4565 |
]. |
|
4566 |
self interruptProcessWith:[selectedContext unwind:nil]. |
|
4567 |
^ self |
|
266 | 4568 |
]. |
4569 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4570 |
steppedContext := wrapperContext := nil. |
266 | 4571 |
haveControl := false. |
4572 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4573 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4574 |
"exit private event-loop" |
6365 | 4575 |
catchBlock value. |
477 | 4576 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4577 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4578 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4579 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4580 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4581 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 4582 |
! |
4583 |
||
4584 |
doSend |
|
4585 |
"single send; reenter with next message send" |
|
4586 |
||
1072 | 4587 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4588 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4589 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4590 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4591 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4592 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4593 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4594 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4595 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4596 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4597 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4598 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4599 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4600 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4601 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4602 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4603 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4604 |
|
1072 | 4605 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 4606 |
! |
4607 |
||
4608 |
doStep |
|
4609 |
"skip for next send in selected method" |
|
4610 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4611 |
stepHow := #step. |
790 | 4612 |
self doStep:-1 |
4613 |
||
1072 | 4614 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 4615 |
! |
4616 |
||
4617 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4618 |
"common helper for step, skip & next. |
10205 | 4619 |
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
|
4620 |
or to next line (if nil) or to next send (if -1)" |
266 | 4621 |
|
4622 |
|con method| |
|
4623 |
||
4624 |
inspecting ifTrue:[^ self]. |
|
4625 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4626 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4627 |
(self confirm:('Code modified - step anyway ?')) |
4628 |
ifFalse:[ |
|
4629 |
^ self |
|
4630 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4631 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4632 |
|
266 | 4633 |
canContinue ifTrue:[ |
11210 | 4634 |
selectedContext notNil ifTrue:[ |
4635 |
con := actualContext. "/ selectedContext. |
|
4636 |
steppedContextLineno := actualContext lineNumber. |
|
4637 |
] ifFalse:[ |
|
4638 |
con := contextArray at:2. |
|
4639 |
steppedContextLineno := con lineNumber. |
|
4640 |
]. |
|
4641 |
||
4642 |
skipLineNr := lineNr. |
|
4643 |
||
4644 |
lineNr == -1 ifTrue:[ |
|
4645 |
steppedContextLineno := skipLineNr := nil. |
|
4646 |
]. |
|
4647 |
||
4648 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
|
4649 |
steppedContext := contextArray at:1. |
|
4650 |
stepHow := #nextIn. |
|
4651 |
] ifFalse:[ |
|
4652 |
stepHow == #nextOut ifTrue:[ |
|
4653 |
steppedContext := con home. |
|
4654 |
] ifFalse:[ |
|
4655 |
steppedContext := con. |
|
4656 |
]. |
|
4657 |
]. |
|
4658 |
wrapperContext := nil. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4659 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
4660 |
"/ ' 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
|
4661 |
|
11210 | 4662 |
" |
4663 |
if we step in a wrapped method, |
|
4664 |
prepare to skip the prolog ... |
|
4665 |
" |
|
4666 |
||
4667 |
inWrap := false. |
|
4668 |
method := con method. |
|
4669 |
(method notNil |
|
4670 |
and:[method isWrapped |
|
4671 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
|
4672 |
inWrap := true |
|
4673 |
]. |
|
4674 |
||
4675 |
lineNr == #return ifTrue:[ |
|
4676 |
Processor activeProcess forceInterruptOnReturnOf:con. |
|
4677 |
]. |
|
4678 |
||
4679 |
con := nil. |
|
4680 |
bigStep := true. |
|
4681 |
haveControl := false. |
|
4682 |
exitAction := #step. |
|
4683 |
||
4684 |
"exit private event-loop" |
|
4685 |
catchBlock value. |
|
4686 |
||
4687 |
"/ not reached |
|
4688 |
'DebugView [warning]: step failed' errorPrintCR. |
|
4689 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
|
266 | 4690 |
] |
477 | 4691 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4692 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 4693 |
! |
4694 |
||
4695 |
doStop |
|
4696 |
"stop the process (if its running, otherwise this is a no-op)" |
|
4697 |
||
4698 |
inspecting ifTrue:[ |
|
11210 | 4699 |
device hasColors ifTrue:[ |
4700 |
continueButton foregroundColor:Color green darkened darkened. |
|
4701 |
]. |
|
4702 |
continueButton label:(resources string:'Continue'). |
|
4703 |
continueButton action:[self doContinue]. |
|
4704 |
||
4705 |
self processPerform:#stop. |
|
4706 |
||
4707 |
^ self |
|
266 | 4708 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4709 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4710 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 4711 |
! |
4712 |
||
4713 |
doTerminate |
|
4714 |
"terminate - the process has a chance for cleanup" |
|
4715 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4716 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4717 |
(self confirm:('Code modified - terminate anyway ?')) |
4718 |
ifFalse:[ |
|
4719 |
^ self |
|
4720 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4721 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4722 |
|
266 | 4723 |
inspecting ifTrue:[ |
11210 | 4724 |
self processPerform:#terminate. |
4725 |
^ self |
|
266 | 4726 |
]. |
4727 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4728 |
steppedContext := wrapperContext := nil. |
266 | 4729 |
haveControl := false. |
10205 | 4730 |
exitAction := #terminate. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4731 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4732 |
"exit private event-loop" |
6365 | 4733 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4734 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4735 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4736 |
inspecting ifFalse:[ |
11210 | 4737 |
'DebugView [warning]: terminate failed' errorPrintCR. |
4738 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
|
4739 |
Debugger newDebugger. |
|
4740 |
Processor activeProcess terminate. |
|
4741 |
] |
|
266 | 4742 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4743 |
terminateButton turnOff. |
477 | 4744 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4745 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 4746 |
! |
4747 |
||
4748 |
doTrace |
|
4749 |
"tracing - not really implemented ..." |
|
4750 |
||
4751 |
self warn:'this function is not yet implemented'. |
|
4752 |
||
4753 |
"/ |v b| |
|
4754 |
"/ |
|
4755 |
"/ traceView isNil ifTrue:[ |
|
4756 |
"/ v := StandardSystemView on:Display. |
|
4757 |
"/ v label:'Debugger-Trace'. |
|
4758 |
"/ v icon:icon. |
|
4759 |
"/ |
|
4760 |
"/ b := Button label:'untrace' in:v. |
|
4761 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
4762 |
"/ b action:[ |
|
4763 |
"/ StepInterruptPending := nil. |
|
4764 |
"/ tracing := false. |
|
4765 |
"/ v unrealize. |
|
4766 |
"/ traceView := nil |
|
4767 |
"/ ]. |
|
4768 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
4769 |
"/ traceView origin:(0 @ (b height)) |
|
4770 |
"/ extent:[v width @ (v height - b height)] |
|
4771 |
"/ ]. |
|
4772 |
"/ v realize. |
|
4773 |
"/ |
|
4774 |
"/ tracing := true. |
|
4775 |
! |
|
4776 |
||
4777 |
doTraceStep |
|
4778 |
"tracestep - not implemented yet" |
|
4779 |
||
4780 |
canContinue ifTrue:[ |
|
11210 | 4781 |
tracing := true. |
4782 |
self doStep |
|
266 | 4783 |
] |
4784 |
! |
|
4785 |
||
4786 |
exit |
|
4787 |
"exit from menu: immediate exit from smalltalk" |
|
4788 |
||
4789 |
OperatingSystem exit |
|
4790 |
! |
|
4791 |
||
11595 | 4792 |
findHandlerFor |
4793 |
|exClass con currentContext| |
|
4794 |
||
4795 |
(con := self selectedContext) isNil ifTrue:[ |
|
4796 |
con := contextArray at:1 |
|
4797 |
]. |
|
4798 |
con sender isNil ifTrue:[ |
|
4799 |
self information:'Context has already returned'. |
|
4800 |
^ self |
|
4801 |
]. |
|
4802 |
||
4803 |
exClass := Dialog |
|
4804 |
choose:'Exception class:' |
|
4805 |
fromList:(GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name]) |
|
4806 |
lines:25 |
|
4807 |
title:'Choose Exception class'. |
|
4808 |
||
4809 |
currentContext := con findExceptional. |
|
4810 |
[currentContext notNil] whileTrue:[ |
|
4811 |
|r handler| |
|
4812 |
||
4813 |
r := currentContext receiver. "receiver of #handle:do: or #on:do:" |
|
4814 |
(r notNil and:[(handler := r handlerForSignal:exClass |
|
4815 |
context:currentContext |
|
4816 |
originator:nil) notNil] |
|
4817 |
) ifTrue:[ |
|
4818 |
self halt. |
|
4819 |
]. |
|
4820 |
currentContext := currentContext findSpecialHandle:true raise:true. "search starts at currentContext sender" |
|
4821 |
"/ Transcript showCR:currentContext. |
|
4822 |
]. |
|
4823 |
||
4824 |
"Created: / 17-07-2012 / 12:51:10 / cg" |
|
4825 |
! |
|
4826 |
||
266 | 4827 |
inspectContext |
4828 |
"launch an inspector on the currently selected context" |
|
4829 |
||
11595 | 4830 |
|con| |
4831 |
||
4832 |
(con := self selectedContext) notNil ifTrue:[ |
|
4833 |
con inspect. |
|
266 | 4834 |
] |
11595 | 4835 |
|
4836 |
"Modified: / 17-07-2012 / 12:52:34 / cg" |
|
266 | 4837 |
! |
4838 |
||
8142 | 4839 |
middleButtonMenu |
4840 |
<resource: #programMenu > |
|
4841 |
||
9488 | 4842 |
|items m nameOfExecutable| |
8142 | 4843 |
|
4844 |
exclusive ifTrue:[ |
|
11210 | 4845 |
items := #( |
4846 |
('Show More WalkBack' showMore ) |
|
4847 |
('-' ) |
|
4848 |
('Add Breakpoint' addBreakpoint ) |
|
4849 |
('Remove Breakpoint' removeBreakpoint ) |
|
11661 | 4850 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
11210 | 4851 |
('-' ) |
4852 |
). |
|
8142 | 4853 |
] ifFalse:[ |
11210 | 4854 |
items := #( |
4855 |
('Show More WalkBack' showMore ) |
|
4856 |
('-' ) |
|
4857 |
('Skip' skip ) |
|
4858 |
('Step Out' skipForReturn ) |
|
4859 |
('Skip until Entering...' skipUntilEntering ) |
|
4860 |
('-' ) |
|
8142 | 4861 |
" |
11210 | 4862 |
('Continue' doContinue ) |
4863 |
('Terminate' doTerminate ) |
|
4864 |
('Abort' doAbort ) |
|
4865 |
('-' ) |
|
4866 |
('Step' doStep ) |
|
4867 |
('Send' doSend ) |
|
4868 |
('-' ) |
|
4869 |
('Return' doReturn ) |
|
4870 |
('Restart' doRestart ) |
|
4871 |
('-' ) |
|
8142 | 4872 |
" |
11210 | 4873 |
('Add Breakpoint' addBreakpoint ) |
4874 |
('Remove Breakpoint' removeBreakpoint ) |
|
4875 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
|
4876 |
). |
|
4877 |
||
4878 |
self allowBreakPointsInDebugger ifFalse:[ |
|
4879 |
items := items , #( |
|
4880 |
('Allow Breakpoints && halt in Debugger' doNotIgnoreBreakpoints ) |
|
4881 |
). |
|
4882 |
] ifTrue:[ |
|
4883 |
items := items , #( |
|
4884 |
('Ignore Breakpoints && halt in Debugger' doIgnoreBreakpoints ) |
|
4885 |
). |
|
4886 |
]. |
|
4887 |
||
4888 |
items := items , #( |
|
4889 |
('-' ) |
|
4890 |
('Browse Implementing Class' browseImplementingClass ) |
|
4891 |
('Browse Receivers Class' browseReceiversClass ) |
|
11610 | 4892 |
"/ ('Browse Receivers Class Hierarchy' browseClassHierarchy ) |
4893 |
"/ ('Browse Receivers Full Protocol' browseFullClassProtocol ) |
|
11210 | 4894 |
('Implementors' browseImplementors ) |
4895 |
('Implementors Of...' browseImplementorsOf ) |
|
4896 |
('Senders' browseSenders ) |
|
4897 |
('Senders Of...' browseSendersOf ) |
|
4898 |
('-' ) |
|
4899 |
('Inspect Context' inspectContext ) |
|
4900 |
). |
|
8142 | 4901 |
]. |
4902 |
||
9488 | 4903 |
items := items , #( |
11210 | 4904 |
('Copy WalkBack Text' copyWalkbackText ) |
4905 |
('-' ) |
|
4906 |
('QuickTerminate' quickTerminate ) |
|
4907 |
('=' )). |
|
9488 | 4908 |
|
4909 |
nameOfExecutable := OperatingSystem nameOfSTXExecutable asFilename withoutSuffix baseName. |
|
4910 |
nameOfExecutable = 'stx' ifTrue:[ nameOfExecutable := 'Smalltalk' ]. |
|
4911 |
||
4912 |
items := items , { |
|
11210 | 4913 |
{ 'Exit %1 (No Confirmation)' bindWith:nameOfExecutable. #exit }}. |
10205 | 4914 |
|
4915 |
m := PopUpMenu |
|
11210 | 4916 |
itemList:items |
4917 |
resources:resources |
|
4918 |
receiver:self |
|
4919 |
for:contextView. |
|
8142 | 4920 |
|
4921 |
inspecting ifTrue:[ |
|
11210 | 4922 |
m notNil ifTrue:[ |
4923 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
|
4924 |
browseClassHierarchy browseFullClassProtocol |
|
4925 |
browseImplementors browseSenders inspectContext skip doStepOut). |
|
4926 |
]. |
|
8142 | 4927 |
]. |
4928 |
self updateMenuItems. |
|
4929 |
||
4930 |
^ m. |
|
9488 | 4931 |
|
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
4932 |
"Modified: / 27-07-2012 / 15:01:20 / cg" |
8142 | 4933 |
! |
4934 |
||
11573 | 4935 |
notShowingSupportCode |
4936 |
^ hideSupportCode == true. |
|
4937 |
||
4938 |
"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
|
4939 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
4940 |
|
3447 | 4941 |
openAboutThisApplication |
4942 |
"opens an about box for this application." |
|
4943 |
||
7112 | 4944 |
Dialog aboutClass:self class. |
4945 |
||
4946 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 4947 |
! |
4948 |
||
8620 | 4949 |
openSettingsDialog |
4950 |
|settingsList settingsApp| |
|
4951 |
||
10205 | 4952 |
settingsList := |
11210 | 4953 |
#( |
4954 |
#('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
4955 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
4956 |
#('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
4957 |
#('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
4958 |
). |
|
8620 | 4959 |
|
4960 |
settingsApp := SettingsDialog new. |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
4961 |
"/ settingsApp requestor:self. |
8620 | 4962 |
settingsApp installSettingsEntries:settingsList. |
4963 |
settingsApp allButOpen. |
|
4964 |
settingsApp window label:('Debugger Settings'). |
|
4965 |
settingsApp openWindow. |
|
4966 |
! |
|
4967 |
||
266 | 4968 |
quickTerminate |
4969 |
"quick terminate - the process will get no chance for cleanup actions" |
|
4970 |
||
4971 |
inspecting ifTrue:[ |
|
11210 | 4972 |
self processPerform:#terminateNoSignal. |
4973 |
^ self |
|
266 | 4974 |
]. |
4975 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4976 |
steppedContext := wrapperContext := nil. |
266 | 4977 |
haveControl := false. |
4978 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4979 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4980 |
"exit private event-loop" |
6365 | 4981 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4982 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4983 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4984 |
inspecting ifFalse:[ |
11210 | 4985 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
4986 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
4987 |
Debugger newDebugger. |
|
4988 |
Processor activeProcess terminateNoSignal. |
|
4989 |
] |
|
266 | 4990 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4991 |
terminateButton turnOff. |
477 | 4992 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4993 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 4994 |
! |
4995 |
||
11391 | 4996 |
rememberCallchain |
4997 |
"remember the callchain in a classvar. |
|
4998 |
When entered the next time, highlight already entered contexts. |
|
4999 |
This makes it possible to identitfy the caller as the first common context |
|
5000 |
along the chain (i.e. the context which is responsible for the debugger to be entered)" |
|
5001 |
||
5002 |
RememberedCallChain := contextArray copy |
|
5003 |
||
5004 |
"Created: / 07-03-2012 / 23:07:07 / cg" |
|
5005 |
! |
|
5006 |
||
11595 | 5007 |
selectedContext |
5008 |
contextView selection notNil ifTrue:[ |
|
5009 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
|
5010 |
^ (contextArray at:(contextView selection)). |
|
5011 |
] |
|
5012 |
]. |
|
5013 |
^ nil |
|
5014 |
||
5015 |
"Created: / 17-07-2012 / 12:52:10 / cg" |
|
5016 |
! |
|
5017 |
||
11647 | 5018 |
showFullWalkback |
5019 |
"double the number of contexts shown" |
|
5020 |
||
5021 |
contextArray notNil ifTrue:[ |
|
5022 |
nChainShown := 9999. |
|
5023 |
self redisplayBacktrace. |
|
5024 |
] |
|
5025 |
||
5026 |
"Created: / 23-07-2012 / 12:24:02 / cg" |
|
5027 |
! |
|
5028 |
||
266 | 5029 |
showMore |
3447 | 5030 |
"double the number of contexts shown" |
266 | 5031 |
|
5032 |
contextArray notNil ifTrue:[ |
|
11210 | 5033 |
nChainShown := nChainShown * 2. |
5034 |
self redisplayBacktrace. |
|
266 | 5035 |
] |
563 | 5036 |
|
3447 | 5037 |
"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
|
5038 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
5039 |
|
11573 | 5040 |
showSupportCode |
5041 |
hideSupportCode := false. |
|
5042 |
self redisplayBacktrace. |
|
5043 |
||
5044 |
"Created: / 10-06-2012 / 21:27:53 / cg" |
|
5045 |
! |
|
5046 |
||
3447 | 5047 |
showingDenseWalkback |
5048 |
^ verboseBacktrace == false. |
|
5049 |
||
5050 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
5051 |
! |
|
5052 |
||
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5053 |
showingDenseWalkback:aBoolean |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5054 |
verboseBacktrace := aBoolean not. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5055 |
self redisplayBacktrace. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5056 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5057 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5058 |
! |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5059 |
|
11573 | 5060 |
showingSupportCode |
5061 |
^ hideSupportCode == false. |
|
5062 |
||
5063 |
"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
|
5064 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5065 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5066 |
showingSupportCode:aBoolean |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5067 |
hideSupportCode := aBoolean not. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5068 |
self redisplayBacktrace. |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5069 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5070 |
"Created: / 27-07-2012 / 14:58:00 / cg" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5071 |
! |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
5072 |
|
3447 | 5073 |
showingVerboseWalkback |
5074 |
^ verboseBacktrace == true. |
|
5075 |
||
5076 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
5077 |
! |
|
5078 |
||
9626 | 5079 |
sizeChanged:how |
10205 | 5080 |
super sizeChanged:how. |
9626 | 5081 |
LastExtent := self extent. |
5082 |
||
5083 |
"Created: / 10-11-2010 / 09:08:41 / cg" |
|
5084 |
! |
|
5085 |
||
266 | 5086 |
skip |
5087 |
"skip for cursor line in selected method" |
|
5088 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5089 |
stepHow := #skip. |
266 | 5090 |
self doStep:codeView cursorLine. |
790 | 5091 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5092 |
"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
|
5093 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5094 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5095 |
skipForReturn |
2581 | 5096 |
"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
|
5097 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5098 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5099 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
5100 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
5101 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 5102 |
! |
5103 |
||
5104 |
skipUntilEntering |
|
5105 |
"skip until some particular method is invoked." |
|
5106 |
||
5107 |
|selector| |
|
5108 |
||
10205 | 5109 |
selector := Dialog |
11210 | 5110 |
request:'Skip until entering what (matchpattern):' |
5111 |
initialAnswer:self goodSkipUntilSelector. |
|
2581 | 5112 |
selector size == 0 ifTrue:[^ self]. |
5113 |
||
5114 |
stepUntilEntering := selector asSymbol. |
|
5115 |
stepHow := #send. |
|
5116 |
self doStep:-1. |
|
5117 |
||
5118 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 5119 |
! |
5120 |
||
11573 | 5121 |
toggleShowSupportCode |
5122 |
hideSupportCode ifTrue:[ |
|
5123 |
self showSupportCode |
|
11645
4f39a925956d
changed: #toggleShowSupportCode
Stefan Vogel <sv@exept.de>
parents:
11636
diff
changeset
|
5124 |
] ifFalse:[ |
11573 | 5125 |
self hideSupportCode |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5126 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5127 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5128 |
"Modified: / 17-11-2001 / 20:07:45 / cg" |
11573 | 5129 |
"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
|
5130 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
5131 |
|
3447 | 5132 |
toggleVerboseWalkback |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5133 |
self showingDenseWalkback:(self showingDenseWalkback not) |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5134 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
5135 |
"Modified: / 27-07-2012 / 15:00:15 / cg" |
11610 | 5136 |
! |
5137 |
||
5138 |
updateMenuItems |
|
5139 |
|m mthd cls mCls rCls| |
|
5140 |
||
5141 |
" |
|
5142 |
enable/disable some menu items |
|
5143 |
" |
|
5144 |
m := contextView middleButtonMenu. |
|
5145 |
m notNil ifTrue:[ |
|
5146 |
m disable:#removeBreakpoint. |
|
5147 |
m disable:#addBreakpoint. |
|
5148 |
canShowMore ifFalse:[ |
|
5149 |
m disable:#showMore |
|
5150 |
]. |
|
5151 |
||
5152 |
selectedContext notNil ifTrue:[ |
|
5153 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
5154 |
||
5155 |
mthd := selectedContext method. |
|
5156 |
mthd notNil ifTrue:[ |
|
5157 |
cls := mCls := mthd containingClass. |
|
5158 |
mthd isBreakpointed ifTrue:[ |
|
5159 |
m enable:#removeBreakpoint. |
|
5160 |
] ifFalse:[ |
|
5161 |
m enable:#addBreakpoint. |
|
5162 |
] |
|
5163 |
]. |
|
5164 |
(selectedContext isBlockContext and:[selectedContext home isNil]) ifTrue:[ |
|
5165 |
"/ a cheap block's context |
|
5166 |
] ifFalse:[ |
|
5167 |
rCls := selectedContext receiver class. |
|
5168 |
cls isNil ifTrue:[ |
|
5169 |
cls := rCls |
|
5170 |
]. |
|
5171 |
]. |
|
5172 |
cls notNil ifTrue:[ |
|
5173 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5174 |
rCls == mCls ifTrue:[ |
|
5175 |
m disable:#browseReceiversClass |
|
5176 |
]. |
|
5177 |
mCls isNil ifTrue:[ |
|
5178 |
m disable:#browseImplementingClass |
|
5179 |
] |
|
5180 |
||
5181 |
] ifFalse:[ |
|
5182 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5183 |
]. |
|
5184 |
mthd notNil ifTrue:[ |
|
5185 |
m enableAll:#(browseImplementingClass). |
|
5186 |
]. |
|
5187 |
selectedContext isCheapBlockContext ifTrue:[ |
|
5188 |
m disableAll:#(browseReceiversClass). |
|
5189 |
]. |
|
5190 |
] ifFalse:[ |
|
5191 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5192 |
] |
|
5193 |
] |
|
5194 |
||
5195 |
"Modified: / 19-07-2012 / 11:53:30 / cg" |
|
266 | 5196 |
! ! |
5197 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5198 |
!DebugView methodsFor:'menu & button actions-breakpoints'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5199 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5200 |
addBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5201 |
"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
|
5202 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5203 |
|implementorClass method| |
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 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5206 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5207 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5208 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5209 |
^ self |
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 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5213 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5214 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5215 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5216 |
method setBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5217 |
] |
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 |
contextView middleButtonMenu disable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5220 |
contextView middleButtonMenu enable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5221 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5222 |
"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
|
5223 |
! |
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 |
allowBreakPointsInDebugger |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5226 |
^ ignoreBreakpoints not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5227 |
! |
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 |
allowBreakPointsInDebugger:aBoolean |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5230 |
ignoreBreakpoints := aBoolean not. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5231 |
self initializeMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5232 |
self initializeContextViewsMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5233 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5234 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5235 |
doIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5236 |
self allowBreakPointsInDebugger:false |
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 |
doNotIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5240 |
self allowBreakPointsInDebugger:true |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5243 |
ignoreAllHaltsForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5244 |
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
|
5245 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5246 |
"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
|
5247 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5248 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5249 |
ignoreAllHaltsUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5250 |
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
|
5251 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5252 |
"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
|
5253 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5254 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5255 |
ignoreBreakpointsWithThisParameterForever |
11370 | 5256 |
Object disableBreakPoint:breakPointParameter. |
5257 |
"/ self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
|
5258 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5259 |
"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
|
5260 |
! |
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 |
ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5263 |
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
|
5264 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5265 |
"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
|
5266 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5267 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5268 |
ignoreHaltForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5269 |
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
|
5270 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5271 |
"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
|
5272 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5273 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5274 |
ignoreHaltUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5275 |
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
|
5276 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5277 |
"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
|
5278 |
! |
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 |
openBreakPointBrowser |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5281 |
Tools::BreakpointBrowser open |
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 |
"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
|
5284 |
! |
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 |
openIgnoreAllHaltsUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5287 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5288 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5289 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5290 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5291 |
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
|
5292 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5293 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5294 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5295 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5296 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5297 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5298 |
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
|
5299 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5300 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5301 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5302 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5303 |
"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
|
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 |
openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5307 |
|answer n| |
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 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
|
5313 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5314 |
initialAnswer:(LastIgnoreHaltNTimes ? '') 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 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5318 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5319 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5320 |
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
|
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 |
"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
|
5326 |
"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
|
5327 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5328 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5329 |
openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5330 |
|answer dT| |
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 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5333 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5334 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5335 |
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
|
5336 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5337 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5338 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5339 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5340 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5341 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5342 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5343 |
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
|
5344 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5345 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5346 |
] loop |
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 |
"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
|
5349 |
! |
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 |
openIgnoreHaltNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5352 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5353 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5354 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5355 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5356 |
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
|
5357 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5358 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5359 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5360 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5361 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5362 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5363 |
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
|
5364 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5365 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5366 |
] loop. |
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 |
"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
|
5369 |
! |
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 |
openIgnoreHaltUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5372 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5373 |
|
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 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5376 |
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
|
5377 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5378 |
answer isEmptyOrNil ifTrue:[^ self]. |
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 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5381 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5382 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5383 |
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
|
5384 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5385 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5386 |
] loop |
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 |
"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
|
5389 |
! |
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 |
removeAllBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5392 |
"remove all trace & breakpoints - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5393 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5394 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5395 |
self withExecuteCursorDo:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5396 |
MessageTracer unwrapAllMethods |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5400 |
"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
|
5401 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5402 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5403 |
removeBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5404 |
"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
|
5405 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5406 |
|implementorClass method| |
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 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5409 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5410 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5411 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5412 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5413 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5414 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5415 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5416 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5417 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5418 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5419 |
method clearBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5420 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5421 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5422 |
contextView middleButtonMenu disable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5423 |
contextView middleButtonMenu enable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5424 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5425 |
"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
|
5426 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5427 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5428 |
stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5429 |
self class stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5430 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5431 |
|
266 | 5432 |
!DebugView methodsFor:'private'! |
5433 |
||
6487 | 5434 |
abortAllIsHandled |
9750 | 5435 |
^ AbortAllOperationWantedQuery query |
5436 |
||
5437 |
"Modified: / 09-02-2011 / 13:53:13 / cg" |
|
6487 | 5438 |
! |
5439 |
||
266 | 5440 |
busy |
5441 |
^ busy |
|
5442 |
! |
|
5443 |
||
5444 |
exclusive:aBoolean |
|
5445 |
exclusive := aBoolean |
|
5446 |
! |
|
5447 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5448 |
explainSelection |
8212 | 5449 |
|interval crsrPos| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5450 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5451 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5452 |
interval isEmpty ifTrue:[ |
11210 | 5453 |
crsrPos := codeView characterPositionOfCursor. |
5454 |
codeView characterUnderCursor isSeparator ifTrue:[ |
|
5455 |
crsrPos := (crsrPos - 1) max:1 |
|
5456 |
]. |
|
5457 |
interval := crsrPos to:crsrPos. |
|
10205 | 5458 |
]. |
5459 |
self |
|
11210 | 5460 |
withNodeValueAtInterval:interval |
5461 |
do:[:value :description | |
|
5462 |
self showValue:value |
|
5463 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5464 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5465 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5466 |
findNodeForInterval:interval |
8212 | 5467 |
|source| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5468 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5469 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5470 |
|
8487
ddf59247960c
slow runArray (text) operations
Claus Gittinger <cg@exept.de>
parents:
8432
diff
changeset
|
5471 |
source := codeView contentsAsString string. |
10205 | 5472 |
"/ source := currentMethod notNil |
5473 |
"/ ifTrue:[ currentMethod source ] |
|
8396 | 5474 |
"/ ifFalse:[ codeView contents asString ]. |
8257
106d3fecbca0
findNodeForInterval: care for nonexisting source
Claus Gittinger <cg@exept.de>
parents:
8225
diff
changeset
|
5475 |
source isNil ifTrue:[^ nil]. |
8214 | 5476 |
|
8212 | 5477 |
^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string) allowErrors:true. |
5478 |
"/ ^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string). |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5479 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5480 |
|
7912 | 5481 |
findNodeIn:tree forInterval:interval |
5482 |
<resource: #obsolete> |
|
10205 | 5483 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5484 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5485 |
|
7912 | 5486 |
self obsoleteMethodWarning. |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5487 |
node := nil. |
10205 | 5488 |
tree nodesDo:[:each | |
11210 | 5489 |
(each intersectsInterval:interval) ifTrue:[ |
5490 |
(node isNil or:[node == each parent]) ifTrue:[ |
|
5491 |
node := each |
|
5492 |
] ifFalse:[ |
|
5493 |
(node parent notNil |
|
5494 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
|
5495 |
] |
|
5496 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5497 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5498 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5499 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5500 |
|
2581 | 5501 |
goodSkipUntilSelector |
5502 |
|current| |
|
5503 |
||
5504 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
5505 |
selectedContext isNil ifTrue:[^ nil]. |
|
5506 |
current := selectedContext selector. |
|
5507 |
current isNil ifTrue:[^ nil]. |
|
5508 |
('change:*' match:current) ifTrue:[ |
|
11210 | 5509 |
^ 'update:*' |
2581 | 5510 |
]. |
5511 |
^ nil |
|
5512 |
! |
|
5513 |
||
8179 | 5514 |
haltSelectors |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5515 |
^ #( #'halt' #'halt:' #'breakPoint:' #'breakPoint:info:' #'break'). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5516 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5517 |
"Modified (format): / 27-01-2012 / 11:10:00 / cg" |
8179 | 5518 |
! |
5519 |
||
10205 | 5520 |
inspectedProcess |
5521 |
^ inspectedProcess |
|
266 | 5522 |
! |
5523 |
||
5524 |
interruptProcessWith:aBlock |
|
5525 |
"let inspected process do something, then update the context list" |
|
5526 |
||
5527 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5528 |
self showTerminated. |
5529 |
^ self |
|
266 | 5530 |
]. |
5531 |
inspectedProcess interruptWith:aBlock. |
|
5532 |
" |
|
5533 |
give the process a chance to run, then update |
|
5534 |
" |
|
5535 |
(Delay forSeconds:0.2) wait. |
|
5536 |
self setContext:(inspectedProcess suspendedContext). |
|
5537 |
! |
|
5538 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5539 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5540 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5541 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5542 |
|
8194 | 5543 |
openHTMLDocument: anHTMLFilename |
5544 |
"open a HTMLDocumentView on anHTMLFilename" |
|
5545 |
||
5546 |
HTMLDocumentView openFullOnDocumentationFile: anHTMLFilename |
|
5547 |
! |
|
5548 |
||
266 | 5549 |
processPerform:aMessage |
5550 |
"do something, then update the context list" |
|
5551 |
||
5552 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5553 |
self showTerminated. |
5554 |
^ self |
|
266 | 5555 |
]. |
5556 |
inspectedProcess perform:aMessage. |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
5557 |
|
266 | 5558 |
" |
5559 |
give the process a chance to run, then update |
|
5560 |
" |
|
5561 |
(Delay forSeconds:0.2) wait. |
|
5562 |
self setContext:(inspectedProcess suspendedContext). |
|
5563 |
! |
|
5564 |
||
939 | 5565 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5566 |
"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
|
5567 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5568 |
|
939 | 5569 |
|oldSelection oldContext con idx| |
5570 |
||
5571 |
contextArray notNil ifTrue:[ |
|
11210 | 5572 |
self withExecuteCursorDo:[ |
5573 |
oldSelection := contextView selection. |
|
5574 |
oldSelection notNil ifTrue:[ |
|
5575 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
5576 |
]. |
|
5577 |
||
5578 |
con := firstContext. |
|
950 | 5579 |
"/ con := contextArray at:1. |
11210 | 5580 |
"/ force redeisplay, even if same by changing the first entry |
5581 |
contextArray size > 0 ifTrue:[ |
|
5582 |
contextArray at:1 put:nil. |
|
5583 |
]. |
|
5584 |
self setContext:con. |
|
5585 |
||
5586 |
oldContext isNil ifTrue:[ |
|
5587 |
idx := oldSelection |
|
5588 |
] ifFalse:[ |
|
5589 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
5590 |
]. |
|
5591 |
contextView setSelection:idx. |
|
5592 |
idx notNil ifTrue:[ |
|
5593 |
self showSelection:idx |
|
5594 |
] |
|
5595 |
] |
|
939 | 5596 |
] |
5597 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5598 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 5599 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 5600 |
! |
5601 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5602 |
selectedInterval |
7912 | 5603 |
^ codeView selectedInterval |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5604 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5605 |
|
7823 | 5606 |
showError:message |
5607 |
codeView contents:(resources string:message). |
|
5608 |
shown ifTrue:[ |
|
11210 | 5609 |
exclusive ifTrue:[ |
5610 |
"/ consider this a kludge: |
|
5611 |
"/ if exclusive, cannot use flash, since it suspends |
|
5612 |
"/ (but we cannot suspend here ...) |
|
5613 |
codeView redrawInverted. device flush. |
|
5614 |
OperatingSystem millisecondDelay:200. |
|
5615 |
codeView redraw |
|
5616 |
] ifFalse:[ |
|
5617 |
codeView flash |
|
5618 |
] |
|
7823 | 5619 |
] |
5620 |
||
5621 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
|
5622 |
! |
|
5623 |
||
5624 |
showTerminated |
|
5625 |
self showError:'** the process has terminated **' |
|
5626 |
! |
|
5627 |
||
5628 |
showValue:aValue |
|
5629 |
"/ TODO: show value in info field |
|
5630 |
"/ Transcript showCR:aValue printString |
|
5631 |
! |
|
5632 |
||
10205 | 5633 |
stepping |
5634 |
^ stepping |
|
5635 |
! |
|
5636 |
||
5637 |
unstep |
|
7823 | 5638 |
stepping := false. |
5639 |
bigStep := false. |
|
5640 |
steppedContext := wrapperContext := nil. |
|
5641 |
exitAction := nil |
|
5642 |
||
5643 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
|
5644 |
! |
|
5645 |
||
10203 | 5646 |
updateButtonsAndMenuItemsForContext:aContext |
5647 |
|m| |
|
5648 |
||
5649 |
m := contextView middleButtonMenu. |
|
5650 |
m notNil ifTrue:[ |
|
11210 | 5651 |
self updateMenuItems. |
5652 |
||
5653 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
|
5654 |
abortButton enable. |
|
5655 |
m enable:#doAbort. |
|
5656 |
] ifFalse:[ |
|
5657 |
abortButton disable. |
|
5658 |
m disable:#doAbort. |
|
5659 |
]. |
|
5660 |
exclusive ifTrue:[ |
|
5661 |
terminateButton disable. |
|
5662 |
m disable:#doTerminate. |
|
5663 |
] ifFalse:[ |
|
5664 |
terminateButton enable. |
|
5665 |
m enable:#doTerminate. |
|
5666 |
]. |
|
10203 | 5667 |
]. |
5668 |
||
5669 |
mayProceed == false ifTrue:[ |
|
11210 | 5670 |
continueButton disable. |
5671 |
m notNil ifTrue:[m disable:#doContinue]. |
|
10203 | 5672 |
] ifFalse:[ |
11210 | 5673 |
continueButton enable. |
5674 |
m notNil ifTrue:[m enable:#doContinue] |
|
10203 | 5675 |
]. |
5676 |
||
5677 |
"Created: / 06-07-2011 / 12:24:53 / cg" |
|
5678 |
! |
|
5679 |
||
7823 | 5680 |
updateContext |
5681 |
|oldContext idx| |
|
5682 |
||
5683 |
inspectedProcess state == #dead ifTrue:[ |
|
11210 | 5684 |
self showTerminated. |
5685 |
^ self |
|
7823 | 5686 |
]. |
5687 |
||
5688 |
oldContext := selectedContext. |
|
5689 |
[ |
|
11210 | 5690 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
5691 |
oldContext notNil ifTrue:[ |
|
5692 |
contextArray notNil ifTrue:[ |
|
5693 |
idx := contextArray identityIndexOf:oldContext. |
|
5694 |
idx ~~ 0 ifTrue:[ |
|
5695 |
self showSelection:idx |
|
5696 |
] ifFalse:[ |
|
5697 |
codeView contents:('** context returned **') |
|
5698 |
] |
|
5699 |
] |
|
5700 |
] |
|
5701 |
]. |
|
7823 | 5702 |
] valueUninterruptably. |
5703 |
||
5704 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
|
8212 | 5705 |
! |
5706 |
||
5707 |
withNodeValueAtInterval:interval do:aBlock |
|
9294
e19553d7e864
changed: #withNodeValueAtInterval:do:
Stefan Vogel <sv@exept.de>
parents:
9292
diff
changeset
|
5708 |
|node definingNode nm nmBold varIdx parentNode receiver con receiversNonMetaClass| |
8212 | 5709 |
|
5710 |
"/interval printCR. |
|
10205 | 5711 |
Error |
11210 | 5712 |
handle:[:ex | ] |
5713 |
do:[ |
|
5714 |
[ |
|
5715 |
node := self findNodeForInterval:interval |
|
5716 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:50. |
|
5717 |
]. |
|
9314
e58b9abd145a
comment/format in: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9308
diff
changeset
|
5718 |
|
8212 | 5719 |
node isNil ifTrue:[ ^ self ]. |
10205 | 5720 |
node isVariable ifFalse:[ |
11210 | 5721 |
"/ Transcript showCR:node. |
5722 |
^ self |
|
8592 | 5723 |
]. |
8212 | 5724 |
|
5725 |
nm := node name. |
|
8214 | 5726 |
nmBold := nm allBold. |
8600 | 5727 |
actualContext isNil ifTrue:[^ self ]. |
8636 | 5728 |
actualContext methodHome isNil ifTrue:[^ self ]. |
8214 | 5729 |
receiver := actualContext methodHome receiver. |
8212 | 5730 |
|
5731 |
(nm = 'self') ifTrue:[ |
|
11210 | 5732 |
aBlock value:receiver value:'receiver' allBold. |
5733 |
^ self |
|
8212 | 5734 |
]. |
5735 |
(nm = 'super') ifTrue:[ |
|
11210 | 5736 |
aBlock value:receiver value:'receiver' allBold. |
5737 |
^ self |
|
8212 | 5738 |
]. |
5739 |
(nm = 'thisContext') ifTrue:[ |
|
11210 | 5740 |
aBlock value:actualContext value:'context' allBold. |
5741 |
^ self |
|
8212 | 5742 |
]. |
5743 |
||
5744 |
definingNode := node whoDefines:nm. |
|
5745 |
definingNode isNil ifTrue:[ |
|
11210 | 5746 |
(receiver class allInstVarNames includes:nm) ifTrue:[ |
8214 | 5747 |
"/aBlock value:'xIII' value:'instVar'. |
11210 | 5748 |
receiver class isMetaclass ifTrue:[ |
5749 |
aBlock value:(receiver instVarNamed:nm) value:'classInstVar ',nmBold. |
|
5750 |
] ifFalse:[ |
|
5751 |
aBlock value:(receiver instVarNamed:nm) value:'instVar ',nmBold. |
|
5752 |
]. |
|
5753 |
^ self |
|
5754 |
]. |
|
5755 |
||
5756 |
receiversNonMetaClass := receiver class theNonMetaclass. |
|
5757 |
(receiversNonMetaClass privateClasses contains:[:cls | cls nameWithoutPrefix = nm]) ifTrue:[ |
|
5758 |
aBlock value:'' value:'private class ',nmBold. |
|
5759 |
^ self |
|
5760 |
]. |
|
5761 |
(receiversNonMetaClass classVarNames includes:nm) ifTrue:[ |
|
5762 |
aBlock value:((currentMethod mclass ? receiversNonMetaClass) theNonMetaclass classVarAt:nm) value:'classVar ',nmBold. |
|
5763 |
^ self |
|
5764 |
]. |
|
5765 |
receiversNonMetaClass sharedPoolNames do:[:eachPoolName | |
|
5766 |
|pool| |
|
5767 |
||
5768 |
pool := Smalltalk at:eachPoolName. |
|
5769 |
pool isNil ifTrue:[ pool := receiversNonMetaClass topNameSpace at:eachPoolName]. |
|
5770 |
(pool classVarNames includes:nm) ifTrue:[ |
|
5771 |
aBlock value:(pool classVarAt:nm) value:'poolVar ',nm allBold,' in ',eachPoolName allBold,' '. |
|
5772 |
^ self |
|
5773 |
]. |
|
5774 |
]. |
|
5775 |
(Smalltalk includesKey:nm asSymbol) ifTrue:[ |
|
5776 |
(Smalltalk at:nm asSymbol) isClass ifTrue:[ |
|
5777 |
aBlock value:'class: ',nmBold value:nil. |
|
5778 |
] ifFalse:[ |
|
5779 |
aBlock value:(Smalltalk at:nm asSymbol) value:'global ',nmBold. |
|
5780 |
]. |
|
5781 |
^ self |
|
5782 |
]. |
|
5783 |
aBlock value:'' value:'unknown'. |
|
5784 |
^ self |
|
8212 | 5785 |
]. |
5786 |
"/definingNode printCR. |
|
5787 |
||
5788 |
definingNode isMethod ifTrue:[ |
|
11210 | 5789 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5790 |
varIdx ~~ 0 ifTrue:[ |
|
5791 |
Error |
|
5792 |
handle:[:ex | ] |
|
5793 |
do:[ aBlock value:(actualContext methodHome argAt:varIdx) value:'methodArg ',nmBold ]. |
|
5794 |
^ self |
|
5795 |
]. |
|
5796 |
varIdx := definingNode temporaries findFirst:[:var | var name = nm]. |
|
5797 |
varIdx ~~ 0 ifTrue:[ |
|
5798 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5799 |
Error |
|
5800 |
handle:[:ex | ] |
|
5801 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5802 |
^ self |
|
5803 |
] |
|
5804 |
]. |
|
8212 | 5805 |
]. |
5806 |
||
5807 |
definingNode isBlock ifTrue:[ |
|
11210 | 5808 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5809 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
5810 |
varIdx ~~ 0 ifTrue:[ |
|
5811 |
"/ am I in this block ? |
|
5812 |
(actualContext lineNumber notNil |
|
5813 |
and:[ definingNode lastLineNumber notNil |
|
5814 |
and:[ (actualContext lineNumber |
|
5815 |
between:definingNode firstLineNumber |
|
5816 |
and:definingNode lastLineNumber) |
|
5817 |
and:[ varIdx <= actualContext numArgs ] ]]) |
|
5818 |
ifTrue:[ |
|
5819 |
aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold . |
|
5820 |
^ self |
|
5821 |
]. |
|
8214 | 5822 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
11210 | 5823 |
^ self |
5824 |
] |
|
5825 |
]. |
|
8212 | 5826 |
]. |
5827 |
||
5828 |
parentNode := definingNode parent. |
|
5829 |
||
5830 |
[parentNode notNil] whileTrue:[ |
|
5831 |
"/'isMethod ' print. parentNode isMethod printCR. |
|
11210 | 5832 |
parentNode isMethod ifTrue:[ |
5833 |
varIdx := parentNode temporaries findFirst:[:var | var name = nm]. |
|
5834 |
varIdx ~~ 0 ifTrue:[ |
|
5835 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5836 |
Error |
|
5837 |
handle:[:ex | ] |
|
5838 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5839 |
^ self |
|
5840 |
] |
|
5841 |
]. |
|
5842 |
]. |
|
8212 | 5843 |
"/'isBlock ' print. parentNode isBlock printCR. |
11210 | 5844 |
parentNode isBlock ifTrue:[ |
5845 |
"/ we dont have any information on the inlineability |
|
5846 |
"/ of this block here (RBParser does not know what |
|
5847 |
"/ the compiler does. |
|
5848 |
"/ therefore, it is questionable if we can use the |
|
5849 |
"/ contexts home context here. |
|
5850 |
"/ am I in this block ? |
|
5851 |
con := actualContext. |
|
5852 |
[con notNil |
|
5853 |
and:[ parentNode lastLineNumber notNil |
|
5854 |
and:[ con lineNumber notNil |
|
5855 |
and:[ con lineNumber |
|
5856 |
between:parentNode firstLineNumber |
|
5857 |
and:parentNode lastLineNumber ]]]] whileTrue:[ |
|
5858 |
con := con sender. |
|
5859 |
]. |
|
5860 |
con notNil ifTrue:[ |
|
5861 |
varIdx := parentNode arguments findFirst:[:arg | arg name = nm]. |
|
5862 |
varIdx ~~ 0 ifTrue:[ |
|
5863 |
Error |
|
5864 |
handle:[:ex | ] |
|
5865 |
do:[ aBlock value:(con argAt:varIdx) value:'blockArg ',nmBold ]. |
|
5866 |
^ self |
|
5867 |
]. |
|
5868 |
varIdx := parentNode body temporaries findFirst:[:var | var name = nm]. |
|
5869 |
varIdx ~~ 0 ifTrue:[ |
|
5870 |
Error |
|
5871 |
handle:[:ex | ] |
|
5872 |
do:[ aBlock value:(con varAt:varIdx) value:'blockVar ',nmBold ]. |
|
5873 |
^ self |
|
5874 |
]. |
|
5875 |
]. |
|
5876 |
]. |
|
5877 |
parentNode := parentNode parent. |
|
8212 | 5878 |
]. |
8214 | 5879 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
9446 | 5880 |
|
9688
805ea34ba3ef
changed: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9662
diff
changeset
|
5881 |
"Modified: / 18-01-2011 / 17:57:34 / cg" |
7823 | 5882 |
! ! |
5883 |
||
5884 |
!DebugView methodsFor:'private queries'! |
|
5885 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5886 |
canBrowseClassHierarchy |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5887 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5888 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5889 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5890 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5893 |
canBrowseFullClassProtocol |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5894 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5895 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5896 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5897 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5898 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5899 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5900 |
canBrowseImplementingClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5901 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5902 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5903 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5904 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5905 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5906 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5907 |
canBrowseProcessesApplication |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5908 |
|p| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5909 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5910 |
p := inspectedProcess ? Processor activeProcess. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5911 |
p isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5912 |
^ p isGUIProcess |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5915 |
canBrowseReceiversClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5916 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5917 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5918 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5919 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5920 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5921 |
|
11457
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5922 |
canCloseAllDebuggers |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5923 |
self class allInstancesDo:[:debugger | |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5924 |
debugger ~~ self ifTrue:[ |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5925 |
debugger busy ifTrue:[^ true]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5926 |
] |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5927 |
]. |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5928 |
^ false |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5929 |
|
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5930 |
"Created: / 23-03-2012 / 12:40:18 / cg" |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5931 |
! |
b304a867b5e0
added: closeAllDebuggers functions
Claus Gittinger <cg@exept.de>
parents:
11443
diff
changeset
|
5932 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5933 |
canDefineMethod |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5934 |
^ defineButton isVisible |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5937 |
canRestart |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5938 |
^ restartButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5939 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5940 |
"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
|
5941 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5942 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5943 |
canReturn |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5944 |
^ returnButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5945 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5946 |
"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
|
5947 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5948 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5949 |
canSendEmail |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5950 |
^ SendMailTool notNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5951 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5952 |
"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
|
5953 |
! |
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 |
canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5956 |
^ canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5957 |
! |
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 |
hasContextSelected |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5960 |
^ contextView hasSelection |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5961 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5962 |
"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
|
5963 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5964 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5965 |
hasHaltsToIgnore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5966 |
^ IgnoredHalts notEmptyOrNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5967 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5968 |
|
7823 | 5969 |
isAborting |
5970 |
^ exitAction == #abort |
|
5971 |
! |
|
5972 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5973 |
isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5974 |
^ isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5975 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5976 |
"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
|
5977 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5978 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5979 |
isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5980 |
^ isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5981 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5982 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5983 |
isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5984 |
^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5985 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5986 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5987 |
selectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5988 |
|con mthd| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5989 |
|
11595 | 5990 |
(con := self selectedContext) notNil ifTrue:[ |
11610 | 5991 |
mthd := con method. |
11595 | 5992 |
^ mthd notNil and:[mthd isWrapped] |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5993 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5994 |
^ false. |
11595 | 5995 |
|
11610 | 5996 |
"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
|
5997 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5998 |
|
7823 | 5999 |
setOfHiddenCallingSelectors |
6000 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
|
6001 |
! |
|
6002 |
||
6003 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
|
6004 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
|
6005 |
! ! |
|
6006 |
||
9922 | 6007 |
!DebugView methodsFor:'private-breakpoints'! |
6008 |
||
11210 | 6009 |
addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey forAll:aBoolean |
9922 | 6010 |
|haltingContext haltingMethod lineNrOfHalt| |
6011 |
||
6012 |
aBoolean ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6013 |
haltingMethod := #all |
9922 | 6014 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6015 |
haltingContext := self findHaltingContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6016 |
haltingContext isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6017 |
Transcript showCR:'no halting context found'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6018 |
^ self |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6019 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6020 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6021 |
haltingMethod := haltingContext method. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6022 |
lineNrOfHalt := haltingContext lineNumber. |
12562 | 6023 |
(lineNrOfHalt isNil or:[lineNrOfHalt <= 0]) ifTrue:[ |
6024 |
Transcript showCR:'no halt lineNr found'. |
|
6025 |
^ self |
|
6026 |
]. |
|
9922 | 6027 |
]. |
6028 |
||
6029 |
self class |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6030 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
11210 | 6031 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
6032 |
||
6033 |
"Created: / 27-01-2012 / 11:31:12 / cg" |
|
9922 | 6034 |
! |
6035 |
||
6036 |
canAddBreakpoint |
|
6037 |
|m| |
|
6038 |
||
6039 |
m := contextView middleButtonMenu. |
|
6040 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
6041 |
! |
|
6042 |
||
6043 |
canRemoveBreakpoint |
|
6044 |
|m| |
|
6045 |
||
6046 |
m := contextView middleButtonMenu. |
|
6047 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
6048 |
! |
|
6049 |
||
6050 |
findHaltingContext |
|
6051 |
|haltSelectors| |
|
6052 |
||
6053 |
haltSelectors := self haltSelectors. |
|
6054 |
||
10205 | 6055 |
contextArray keysAndValuesDo:[:idx :con | |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6056 |
|sel con2 sel2 method| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6057 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6058 |
sel := con selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6059 |
(haltSelectors includes:sel) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6060 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6061 |
method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6062 |
con2 := contextArray at:idx+1. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6063 |
sel2 := con2 selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6064 |
(haltSelectors includes:sel2) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6065 |
con2 method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6066 |
^ contextArray at:idx+2. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6067 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6068 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6069 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6070 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6071 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6072 |
(contextArray at:idx+1) infoPrintCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6073 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6074 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6075 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6076 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6077 |
con method isWrapped ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6078 |
^ con |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6079 |
]. |
9922 | 6080 |
]. |
6081 |
^ nil |
|
6082 |
||
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6083 |
"Modified: / 27-01-2012 / 11:06:02 / cg" |
9922 | 6084 |
! |
6085 |
||
6086 |
ignoreBreakpoints |
|
6087 |
^ ignoreBreakpoints |
|
6088 |
||
6089 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
6090 |
! ! |
|
6091 |
||
7823 | 6092 |
!DebugView methodsFor:'private-cache handling'! |
6093 |
||
6094 |
cacheMyself |
|
6095 |
"remember myself for next debug session" |
|
6096 |
||
6097 |
"caching the last debugger will make the next debugger appear |
|
6098 |
faster, since no resources have to be allocated in the display. |
|
6099 |
We have to be careful to release all refs to the debuggee, though. |
|
6100 |
Otherwise, the GC will not be able to release it." |
|
6101 |
||
6102 |
windowGroup notNil ifTrue:[ |
|
11210 | 6103 |
windowGroup setProcess:nil. |
7823 | 6104 |
]. |
6105 |
||
6106 |
self releaseDebuggee. |
|
6107 |
||
6108 |
cachable ~~ true ifTrue:[^ self]. |
|
6109 |
||
6110 |
"/ |
|
6111 |
"/ only cache if I am on the Display |
|
6112 |
"/ |
|
6113 |
device == Display ifTrue:[ |
|
11210 | 6114 |
exclusive ifTrue:[ |
6115 |
CachedExclusive := self |
|
6116 |
] ifFalse:[ |
|
6117 |
CachedDebugger := self |
|
6118 |
]. |
|
7823 | 6119 |
]. |
6120 |
||
6121 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
11210 | 6122 |
ObjectMemory stepInterruptHandler:nil |
7823 | 6123 |
]. |
6124 |
||
6125 |
"Modified: 10.7.1997 / 15:50:46 / stefan" |
|
6126 |
"Modified: 31.7.1997 / 21:20:14 / cg" |
|
6127 |
! |
|
6128 |
||
6129 |
isCached |
|
6130 |
"tell wether we are a cached debugger" |
|
6131 |
||
6132 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6133 |
^ true. |
7823 | 6134 |
]. |
6135 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6136 |
^ true. |
7823 | 6137 |
]. |
6138 |
||
6139 |
^ false. |
|
6140 |
||
6141 |
"Created: 10.7.1997 / 15:22:43 / stefan" |
|
6142 |
! |
|
6143 |
||
6144 |
uncacheMyself |
|
6145 |
"do not remember myself any longer for next debug session" |
|
6146 |
||
6147 |
cachable := false. |
|
6148 |
||
6149 |
CachedExclusive == self ifTrue:[ |
|
11210 | 6150 |
CachedExclusive := nil. |
7823 | 6151 |
]. |
6152 |
CachedDebugger == self ifTrue:[ |
|
11210 | 6153 |
CachedDebugger := nil. |
7823 | 6154 |
]. |
6155 |
OpenDebuggers notNil ifTrue:[ |
|
11210 | 6156 |
OpenDebuggers remove:self ifAbsent:[]. |
7823 | 6157 |
]. |
6158 |
||
6159 |
"Modified: 31.7.1997 / 21:20:11 / cg" |
|
6160 |
! ! |
|
6161 |
||
10628 | 6162 |
!DebugView methodsFor:'private-code view'! |
6163 |
||
6164 |
codeAspect |
|
11704 | 6165 |
^ SyntaxHighlighter codeAspectMethod |
10628 | 6166 |
|
6167 |
"Created: / 27-07-2011 / 13:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11704 | 6168 |
"Modified: / 27-07-2012 / 22:20:27 / cg" |
10628 | 6169 |
! ! |
6170 |
||
7823 | 6171 |
!DebugView methodsFor:'private-context handling'! |
6172 |
||
11391 | 6173 |
contextListEntryFor:aContext |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6174 |
^ Error |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6175 |
handle:[:ex | '???' ] |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6176 |
do:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6177 |
|s| |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6178 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6179 |
aContext selector == #doIt ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6180 |
aContext receiver isNil ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6181 |
s := 'doIt' allBold |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6182 |
] |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6183 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6184 |
|
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6185 |
s := Text streamContents:[:s | aContext printOn:s ]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6186 |
RememberedCallChain notNil ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6187 |
(RememberedCallChain includesIdentical:aContext) ifTrue:[ |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6188 |
s := s colorizeAllWith:(Color red). |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6189 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6190 |
]. |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6191 |
s |
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6192 |
]. |
11391 | 6193 |
|
6194 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
6195 |
! |
|
6196 |
||
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6197 |
is:aHomeContext inCallingChainOf:aContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6198 |
|con| |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6199 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6200 |
con := aContext. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6201 |
[con notNil and:[con ~~ aHomeContext]] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6202 |
con := con sender |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6203 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6204 |
^ con notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6205 |
|
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6206 |
"Created: / 10-06-2012 / 18:46:29 / cg" |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6207 |
! |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6208 |
|
11890 | 6209 |
isEnteredDueToBreakpointOrHalt |
6210 |
"see if we came here due to a step interrupt" |
|
6211 |
||
6212 |
|c cReceiver| |
|
6213 |
||
6214 |
Transcript showCR:'1'. |
|
6215 |
"/ look for a breakpoint-wrapper's context |
|
6216 |
c := thisContext findNextContextWithSelector:#'raiseRequestWith:errorString:in:' or:nil or:nil. |
|
6217 |
c isNil ifTrue:[ |
|
6218 |
Transcript showCR:'2'. |
|
6219 |
^ true. |
|
6220 |
]. |
|
6221 |
Transcript showCR:c. |
|
6222 |
cReceiver := c receiver. |
|
6223 |
^ cReceiver == BreakPointInterrupt |
|
6224 |
! |
|
6225 |
||
6226 |
isHaltToBeIgnored |
|
6227 |
"see if the current halt (if any) is in the ignore-list" |
|
6228 |
||
6229 |
|c cReceiver sender haltingMethod lineNrInHaltingMethod breakpointParameter| |
|
6230 |
||
6231 |
"/ should a halt be ignored ? |
|
6232 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
6233 |
||
6234 |
"/ look for a breakpoint-wrapper's context |
|
6235 |
c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil. |
|
6236 |
c notNil ifTrue:[ |
|
6237 |
((cReceiver := c receiver) isKindOf:NoHandlerError) ifTrue:[ |
|
6238 |
c := c sender findNextContextWithSelector:#doRaise or:nil or:nil. |
|
6239 |
cReceiver := c receiver. |
|
6240 |
]. |
|
6241 |
(cReceiver isKindOf:BreakPointInterrupt) ifFalse:[ |
|
6242 |
c := nil |
|
6243 |
] ifTrue:[ |
|
6244 |
[ |
|
6245 |
sender := c sender. |
|
6246 |
(sender receiver isKindOf:BreakPointInterrupt) |
|
6247 |
or:[ sender receiver == BreakPointInterrupt ] |
|
6248 |
] whileTrue:[ |
|
6249 |
c := sender |
|
6250 |
]. |
|
6251 |
[ (sender := c sender) isBlockContext ] whileTrue:[ |
|
6252 |
c := sender |
|
6253 |
]. |
|
6254 |
sender := nil. "/ avoid keeping a reference to this context |
|
6255 |
]. |
|
6256 |
]. |
|
6257 |
||
6258 |
c isNil ifTrue:[ |
|
6259 |
"/ look for halts or explicit breakpoints |
|
6260 |
c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil. |
|
6261 |
c isNil ifTrue:[ |
|
6262 |
c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil. |
|
6263 |
c isNil ifTrue:[ |
|
6264 |
^ false |
|
6265 |
]. |
|
6266 |
breakpointParameter := c argAt:1. |
|
6267 |
(self class isBreakpointToBeIgnoredForParameter:breakpointParameter modifyEntryCount:true) ifTrue:[ |
|
6268 |
^ true. |
|
6269 |
]. |
|
6270 |
]. |
|
6271 |
]. |
|
6272 |
||
6273 |
c := c sender. |
|
6274 |
"/ a code-breakpoint ? |
|
6275 |
(c receiver isKindOf:Breakpoint) ifTrue:[ |
|
6276 |
c := c sender. |
|
6277 |
]. |
|
6278 |
haltingMethod := c method. |
|
6279 |
||
6280 |
haltingMethod isWrapped ifTrue:[ |
|
6281 |
lineNrInHaltingMethod := 1. |
|
6282 |
] ifFalse:[ |
|
6283 |
lineNrInHaltingMethod := c lineNumber. |
|
6284 |
"/ Transcript showCR:c. |
|
6285 |
]. |
|
6286 |
||
12562 | 6287 |
^ self class |
11890 | 6288 |
isHaltToBeIgnoredIn:haltingMethod |
6289 |
atLineNr:lineNrInHaltingMethod |
|
6290 |
modifyEntryCount:true. |
|
6291 |
||
6292 |
"Created: / 22-10-2010 / 12:09:53 / cg" |
|
6293 |
"Modified: / 06-03-2012 / 12:54:09 / cg" |
|
6294 |
! |
|
6295 |
||
266 | 6296 |
setContext:aContext |
6297 |
"show calling chain from aContext in the walk-back listview" |
|
6298 |
||
641 | 6299 |
^ 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
|
6300 |
|
641 | 6301 |
"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
|
6302 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6303 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6304 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
6305 |
"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
|
6306 |
Most complications here arise from filtering less-interesting contexts |
11573 | 6307 |
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
|
6308 |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6309 |
|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
|
6310 |
suspendContext calledBySuspendContext nm h calledContext show2| |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6311 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6312 |
"/ (contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6313 |
"/ "no change" |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6314 |
"/ ^ false |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6315 |
"/ ]. |
266 | 6316 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6317 |
isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := false. |
939 | 6318 |
firstContext := aContext. |
6319 |
||
266 | 6320 |
m := contextView middleButtonMenu. |
6321 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6322 |
m disable:#showMore. |
266 | 6323 |
]. |
3269 | 6324 |
canShowMore := false. |
266 | 6325 |
|
6326 |
aContext isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6327 |
text := Array with:'** no context **'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6328 |
contextArray := nil. |
266 | 6329 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6330 |
text := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6331 |
contextArray := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6332 |
con := aContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6333 |
calledContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6334 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6335 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6336 |
"/ with dense backtrace, hide the ProcessorScheduler |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6337 |
"/ 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
|
6338 |
"/ context within the first 10 contexts |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6339 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6340 |
suspendContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6341 |
c := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6342 |
1 to:10 do:[:i | |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6343 |
|sel| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6344 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6345 |
c notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6346 |
(sel := c selector) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6347 |
((sel isSymbol and:[sel startsWith:'suspend']) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6348 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6349 |
suspendContext := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6350 |
calledBySuspendContext := cc. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6351 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6352 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6353 |
cc := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6354 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6355 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6356 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6357 |
suspendContext notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6358 |
con := suspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6359 |
calledContext := calledBySuspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6360 |
suspendContext := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6361 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6362 |
]. |
12039 | 6363 |
"/ Transcript show:'1 '; showCR:con. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6364 |
con notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6365 |
"/ hide the halt implementation |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6366 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6367 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6368 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6369 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6370 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6371 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6372 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6373 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6374 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6375 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6376 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6377 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6378 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6379 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6380 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6381 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6382 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6383 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6384 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6385 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6386 |
]. |
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 |
get them all |
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 |
count := 0. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6394 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6395 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6396 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6397 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6398 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6399 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6400 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6401 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6402 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6403 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6404 |
method mclass == Breakpoint ifTrue:[ |
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 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6407 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6408 |
] |
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 |
[ |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6412 |
|show1| |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6413 |
|
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6414 |
show1 := self showingContext1:con calling:calledContext. |
11636 | 6415 |
DebuggingDebugger3 == true ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6416 |
'showingContext1: (' print. con print. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6417 |
') --> ' print. show1 printCR. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6418 |
]. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6419 |
show1 |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6420 |
] whileFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6421 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6422 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6423 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6424 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6425 |
show2 := self showingContext2:con nesting:count. |
11636 | 6426 |
DebuggingDebugger3 == true ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6427 |
'showingContext2: (' print. con print. |
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6428 |
') --> ' print. show2 printCR. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6429 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6430 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6431 |
show2 ifTrue:[ |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6432 |
(self showingContext3:con nesting:count) ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6433 |
"/ ignore it, if its in the same |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6434 |
"/ method as the previous context |
3447 | 6435 |
"/ (verboseBacktrace ~~ true |
10205 | 6436 |
"/ and:[count > 0 |
3447 | 6437 |
"/ and:[contextArray last method == con method |
10205 | 6438 |
"/ and:[(contextArray last isBlockContext not |
3447 | 6439 |
"/ & con isBlockContext not) not ]]]) ifTrue:[ |
6440 |
"/ "/ skip it, if its in the same method |
|
6441 |
"/ "/ as the called context. |
|
6442 |
"/ ] ifFalse:[ |
|
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6443 |
contextArray add:con. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6444 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6445 |
(MoreDebuggingDetail == true) ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6446 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6447 |
] ifFalse:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6448 |
nm := self contextListEntryFor:con. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6449 |
]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6450 |
text add:nm. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6451 |
count := count + 1. |
3447 | 6452 |
"/ ]. |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6453 |
] |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6454 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6455 |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6456 |
"/ with hidden support code, skip over internals of exceptions |
11573 | 6457 |
hideSupportCode == true ifTrue:[ |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6458 |
(con isBlockContext |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6459 |
and:[ (h := con home) notNil |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6460 |
and:[ (self is:h inCallingChainOf:con) ]]) ifTrue:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6461 |
|blocksReceiver| |
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6462 |
blocksReceiver := con receiver. |
11573 | 6463 |
c := con sender. |
6464 |
[ |
|
6465 |
c notNil |
|
6466 |
and:[ |
|
6467 |
sndr := c sender. |
|
11836
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6468 |
(sndr ~= h) |
224a4d109673
added: #showingSupportCode:
Claus Gittinger <cg@exept.de>
parents:
11828
diff
changeset
|
6469 |
and:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6470 |
blocksReceiver isCollection "/ skip collection implementations |
11573 | 6471 |
or:[ ( #( #'handle:do:' "/ skip exception implementations |
6472 |
#'handleDo:' |
|
6473 |
#'answer:do:' |
|
6474 |
#'ensure:' ) includes: c selector ) |
|
6475 |
or:[ #'perform:*' "/ skip perform implementations |
|
6476 |
match: c selector ]] |
|
6477 |
] |
|
6478 |
] |
|
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6479 |
] whileTrue:[ |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6480 |
c := sndr |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6481 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6482 |
c notNil ifTrue:[ |
11887
dffcf2e6e4fa
changed: #setContext:releaseInspectors:
Claus Gittinger <cg@exept.de>
parents:
11857
diff
changeset
|
6483 |
con := c "sender". |
11571
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 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6486 |
]. |
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6487 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6488 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6489 |
"/ 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
|
6490 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6491 |
method := con method. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6492 |
method notNil ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6493 |
called := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6494 |
caller := con sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6495 |
(caller notNil and:[caller receiver == method]) ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6496 |
called2 := caller. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6497 |
caller2 := caller sender. |
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6498 |
caller2 notNil ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6499 |
(caller2 method isWrapped |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6500 |
and:[ caller2 method originalMethod == method ]) ifTrue:[ |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6501 |
calledContext := called2. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6502 |
con := caller2 |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6503 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6504 |
]. |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
6505 |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6506 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6507 |
caller := caller2 := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6508 |
]. |
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 |
"/ with dense backtrace, skip the doIt methods context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6511 |
"/ (its dummy anyway) and fake that contexts name |
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 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6514 |
(con isBlockContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6515 |
and:[(h := con home) == con sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6516 |
and:[h notNil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6517 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6518 |
and:[h method who isNil]]]]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6519 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6520 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6521 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6522 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6523 |
text add:(self contextListEntryFor:con methodHome). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6524 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6525 |
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
|
6526 |
]. |
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 |
"/ with dense backtrace, dont show below the doIt |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6529 |
( verboseBacktrace ~~ true |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6530 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6531 |
con := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6532 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6533 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6534 |
con := con sender |
11571
797d5fa9c634
option to hide enumeration code impl.
Claus Gittinger <cg@exept.de>
parents:
11457
diff
changeset
|
6535 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6536 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6537 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6538 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6539 |
did we reach the end ? |
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 |
(con isNil or:[con sender isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6542 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6543 |
"/ the very last one is the startup context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6544 |
"/ (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
|
6545 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6546 |
(contextArray notEmpty |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6547 |
and:[contextArray last selector isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6548 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6549 |
text removeLast |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6550 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6551 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6552 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6553 |
"/ in dense mode, remove the process startup |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6554 |
"/ contexts (if any) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6555 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6556 |
(contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6557 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6558 |
con selector == #start ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6559 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6560 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6561 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6562 |
[contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6563 |
and:[contextArray last methodHome == con]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6564 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6565 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6566 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6567 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6568 |
] |
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 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6571 |
m notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6572 |
m enable:#showMore. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6573 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6574 |
canShowMore := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6575 |
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
|
6576 |
]. |
266 | 6577 |
]. |
6578 |
||
6579 |
contextView setList:text. |
|
944 | 6580 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6581 |
releaseInspectors ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6582 |
receiverInspector release. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6583 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6584 |
]. |
266 | 6585 |
|
6586 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6587 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 6588 |
]. |
3511 | 6589 |
self updateMenuItems. |
266 | 6590 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6591 |
|
7797 | 6592 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
11694
464f62536f09
menu changed to use checkboxes
Claus Gittinger <cg@exept.de>
parents:
11693
diff
changeset
|
6593 |
"Modified: / 27-07-2012 / 15:10:53 / cg" |
266 | 6594 |
! |
6595 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6596 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6597 |
"show calling chain from aContext in the walk-back listview. |
1213 | 6598 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6599 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6600 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6601 |
|
8152 | 6602 |
con := aContext. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6603 |
verboseBacktrace ifFalse:[ |
11210 | 6604 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
6605 |
con := con sender. |
|
6606 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
|
6607 |
con := con sender. |
|
6608 |
]. |
|
6609 |
]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6610 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6611 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6612 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6613 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6614 |
"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
|
6615 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6616 |
|
3447 | 6617 |
showingContext1:aContext calling:calledContext |
7823 | 6618 |
"return false, if this (top) context is to be skipped. |
10205 | 6619 |
Here, we hide some well known methods, which are usually not too interesting; |
7823 | 6620 |
the set of methods which are suppressed is my (claus's) own choice." |
6621 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6622 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 6623 |
|
6624 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
6625 |
aContext isNil ifTrue:[ ^true ]. |
|
6626 |
||
6627 |
sel := aContext selector. |
|
6628 |
rec := aContext receiver. |
|
6629 |
mthd := aContext method. |
|
6630 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
6631 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6632 |
"/ to avoid firing/waiting the lazy or future |
10205 | 6633 |
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
|
6634 |
aContext sender notNil ifTrue:[ |
11210 | 6635 |
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
|
6636 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6637 |
|
11636 | 6638 |
DebuggingDebugger3 == true ifTrue:[ |
11210 | 6639 |
'showingContext1: (' print. aContext print. |
6640 |
') calling: (' print. calledContext print. |
|
6641 |
')' printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6642 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6643 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6644 |
(#(doCallHandler: doRaise |
3447 | 6645 |
) includes:sel) |
11210 | 6646 |
ifTrue:[ |
6647 |
recIsException ifTrue:[ ^ false]. |
|
6648 |
]. |
|
3447 | 6649 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6650 |
(#(raise raiseRequest |
3447 | 6651 |
) includes:sel) |
11210 | 6652 |
ifTrue:[ |
6653 |
recIsException ifTrue:[ |
|
6654 |
(senderRec isLazyValue not |
|
6655 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
|
6656 |
]. |
|
6657 |
]. |
|
3447 | 6658 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6659 |
(#(doWhile: |
3447 | 6660 |
) includes:sel) |
11210 | 6661 |
ifTrue:[ |
6662 |
rec isBlock ifTrue:[ |
|
6663 |
true "aContext sender isBlockContext" ifTrue:[^ false]. |
|
6664 |
]. |
|
6665 |
]. |
|
3447 | 6666 |
|
8620 | 6667 |
calledContext notNil ifTrue:[ |
11210 | 6668 |
calledSel := calledContext selector. |
6669 |
calledRec := calledContext receiver. |
|
6670 |
||
6671 |
calledRec isBlock ifTrue:[ |
|
6672 |
(calledSel == #ensure:) ifTrue:[^ false]. |
|
6673 |
(calledSel == #ifCurtailed:) ifTrue:[^ false]. |
|
6674 |
]. |
|
6675 |
(calledSel == #handle:do:) ifTrue:[^ false]. |
|
6676 |
(calledSel == #answer:do:) ifTrue:[^ false]. |
|
8620 | 6677 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6678 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6679 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6680 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6681 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6682 |
"/ |
10205 | 6683 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6684 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6685 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6686 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6687 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6688 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6689 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6690 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6691 |
"/ ]. |
8620 | 6692 |
]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6693 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6694 |
(#(handleDo:) includes:sel) |
11210 | 6695 |
ifTrue:[ |
6696 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
|
6697 |
]. |
|
10205 | 6698 |
(#( |
11210 | 6699 |
withCursor:do: |
6700 |
withWaitCursorDo: |
|
11696 | 6701 |
withReadCursorDo: |
6702 |
withWriteCursorDo: |
|
6703 |
withSearchCursorDo: |
|
3447 | 6704 |
) includes:sel) |
11210 | 6705 |
ifTrue:[ |
6706 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
6707 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
6708 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
6709 |
]. |
|
10205 | 6710 |
|
6711 |
(#( |
|
11210 | 6712 |
wait |
6713 |
waitWithTimeout: |
|
6714 |
waitWithTimeoutMs: |
|
3447 | 6715 |
) includes:sel) |
11210 | 6716 |
ifTrue:[ |
6717 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
6718 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
6719 |
]. |
|
3447 | 6720 |
|
6721 |
^ true |
|
6722 |
||
9662 | 6723 |
"Created: / 17-11-2001 / 22:24:06 / cg" |
11696 | 6724 |
"Modified: / 27-07-2012 / 17:30:18 / cg" |
3447 | 6725 |
! |
6726 |
||
6727 |
showingContext2:aContext nesting:nesting |
|
7823 | 6728 |
"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
|
6729 |
Here, we hide some well known methods, which are usually |
10205 | 6730 |
not too interesting; |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6731 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 6732 |
|
10205 | 6733 |
|sel rec mClass |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6734 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6735 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6736 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 6737 |
aContext isNil ifTrue:[^ true]. |
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 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6740 |
sel := aContext selector. |
939 | 6741 |
mClass := aContext methodClass. |
6742 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6743 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6744 |
sender notNil ifTrue:[ |
11210 | 6745 |
senderSelector := sender selector. |
6746 |
senderReceiver := sender receiver. |
|
6747 |
senderReceiverClass := senderReceiver class. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6748 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6749 |
|
939 | 6750 |
sel == #withCursor:do: ifTrue:[ |
11210 | 6751 |
(mClass == WindowGroup) ifTrue:[^ false]. |
6752 |
(mClass == TopView) ifTrue:[^ false]. |
|
939 | 6753 |
]. |
6754 |
(sel == #withExecuteCursorDo: |
|
6755 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
11210 | 6756 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 6757 |
]. |
6758 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
6759 |
(sel == #do: |
6600 | 6760 |
or:[sel == #from:to:do: |
6601 | 6761 |
or:[sel == #keysAndValuesDo: |
6762 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
11210 | 6763 |
mClass == Array ifTrue:[^ false]. |
6764 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
6765 |
mClass == Set ifTrue:[^ false]. |
|
6766 |
mClass == Dictionary ifTrue:[^ false]. |
|
6767 |
mClass == Interval ifTrue:[^ false]. |
|
10205 | 6768 |
]. |
6769 |
(sel == #perform: |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6770 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6771 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6772 |
or:[sel == #perform:with:with:with: |
11696 | 6773 |
or:[sel == #perform:with:with:with:with: |
6774 |
or:[sel == #perform:withArguments: |
|
6775 |
or:[sel == #perform:with:ifNotUnderstood: |
|
6776 |
or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]) |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6777 |
ifTrue:[ |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6778 |
hideSupportCode == true ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6779 |
'x' printCR. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6780 |
mClass == Object ifTrue:[^ false] |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6781 |
]. |
11210 | 6782 |
nesting == 0 ifTrue:[^ true]. |
6783 |
mClass == Array ifTrue:[^ false]. |
|
6784 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6785 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6786 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6787 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6788 |
|
939 | 6789 |
(mClass == Object) ifTrue:[ |
11210 | 6790 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 6791 |
]. |
6792 |
||
6793 |
(mClass == Method) ifTrue:[ |
|
11210 | 6794 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 6795 |
]. |
6796 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6797 |
(mClass == SmallInteger) ifTrue:[ |
11210 | 6798 |
(sel == #to:do:) ifTrue:[^ false]. |
6799 |
(sel == #to:by:do:) ifTrue:[^ false]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6800 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6801 |
|
939 | 6802 |
(mClass == Block) ifTrue:[ |
11210 | 6803 |
sel == #ensure: ifTrue:[^ false]. |
6804 |
sel == #ifCurtailed: ifTrue:[^ false]. |
|
6805 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
|
6806 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
|
6807 |
sel == #on:do: ifTrue:[^ false]. |
|
6808 |
||
6809 |
sel == #value ifTrue:[^ false]. |
|
6810 |
sel == #value: ifTrue:[^ false]. |
|
6811 |
sel == #value:value: ifTrue:[^ false]. |
|
6812 |
sel == #value:value:value: ifTrue:[^ false]. |
|
6813 |
sel == #value:value:value:value: ifTrue:[^ false]. |
|
6814 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
|
6815 |
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
|
6816 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6817 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6818 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6819 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6820 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6821 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6822 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6823 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6824 |
"/ sel == #value:value:value: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:value:value:value: ifTrue:[^ false]. |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6826 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6827 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6828 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6829 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6830 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6831 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6832 |
|
11210 | 6833 |
aContext home notNil ifTrue:[ |
6834 |
aContext home receiver isLazyValue ifFalse:[ |
|
6835 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
|
6836 |
(aContext home selector == #wait) ifTrue:[^ false]. |
|
6837 |
(aContext home selector == #waitWithTimeoutMs:) ifTrue:[^ false]. |
|
6838 |
] |
|
6839 |
] |
|
6840 |
] |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6841 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6842 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6843 |
(rec isExceptionHandler) ifTrue:[ |
11210 | 6844 |
sel == #handle:do: ifTrue:[^ false]. |
6845 |
sel == #handleDo: ifTrue:[^ false]. |
|
6846 |
(sel startsWith:#raise) ifTrue:[^ false]. |
|
6847 |
sel == #answer:do: ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6848 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6849 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
11210 | 6850 |
sel == #doRaise ifTrue:[^ false]. |
6851 |
sel == #doCallHandler: ifTrue:[^ false]. |
|
6852 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
|
6853 |
senderReceiverClass == Signal ifTrue:[^ false]. |
|
6854 |
] |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6855 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6856 |
(mClass == Context) ifTrue:[ |
11210 | 6857 |
sel == #unwind ifTrue:[^ false]. |
6858 |
sel == #unwind: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6859 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6860 |
(mClass == ProcessorScheduler) ifTrue:[ |
11210 | 6861 |
sel == #interruptActive ifTrue:[^ false]. |
6862 |
sel == #threadSwitch: ifTrue:[^ false]. |
|
6863 |
sel == #suspend: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6864 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6865 |
mClass == Process ifTrue:[ |
11210 | 6866 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6867 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6868 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6869 |
|
9662 | 6870 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
11696 | 6871 |
"Modified: / 27-07-2012 / 17:26:54 / cg" |
11837
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6872 |
! |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6873 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6874 |
showingContext3:aContext nesting:nesting |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6875 |
"return false, if this (intermediate) context is to be skipped. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6876 |
Here, we hide some well known methods, which are usually |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6877 |
not too interesting; |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6878 |
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
|
6879 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6880 |
|sel rec mClass |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6881 |
sender senderReceiver senderSelector senderReceiverClass| |
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 |
hideSupportCode ifFalse:[^ true]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6884 |
aContext isNil ifTrue:[^ true]. |
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 |
rec := aContext receiver. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6887 |
sel := aContext selector. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6888 |
mClass := aContext methodClass. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6889 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6890 |
sender := aContext sender. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6891 |
sender notNil ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6892 |
senderSelector := sender selector. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6893 |
senderReceiver := sender receiver. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6894 |
senderReceiverClass := senderReceiver class. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6895 |
]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6896 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6897 |
(sel == #perform: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6898 |
or:[sel == #perform:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6899 |
or:[sel == #perform:with:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6900 |
or:[sel == #perform:with:with:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6901 |
or:[sel == #perform:with:with:with:with: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6902 |
or:[sel == #perform:withArguments: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6903 |
or:[sel == #perform:with:ifNotUnderstood: |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6904 |
or:[sel == #perform:withArguments:ifNotUnderstood:]]]]]]]) |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6905 |
ifTrue:[ |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6906 |
mClass == Object ifTrue:[^ false] |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6907 |
]. |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6908 |
|
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6909 |
^ true. |
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 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
d3c4bfa00b18
added: #showingContext3:nesting:
Claus Gittinger <cg@exept.de>
parents:
11836
diff
changeset
|
6912 |
"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
|
6913 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
6914 |
|
4859 | 6915 |
!DebugView methodsFor:'private-control loop'! |
266 | 6916 |
|
6917 |
controlLoop |
|
6918 |
"this is a kludge: |
|
11210 | 6919 |
start a dispatchloop which exits when |
6920 |
either continue, return or step is pressed |
|
266 | 6921 |
" |
6922 |
||
6923 |
haveControl := true. |
|
664 | 6924 |
[ |
11210 | 6925 |
[haveControl] whileTrue:[ |
6926 |
self controlLoopCatchingErrors |
|
6927 |
]. |
|
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
6928 |
] ensure:[ |
11210 | 6929 |
catchBlock := nil. |
6930 |
haveControl := false |
|
266 | 6931 |
]. |
664 | 6932 |
|
6933 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 6934 |
! |
6935 |
||
6936 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6937 |
"this is the debuggers own private event handling loop; |
1187 | 6938 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6939 |
|
266 | 6940 |
"setup a self removing catch-block" |
6941 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
6942 |
||
6943 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
11210 | 6944 |
"if we do not have multiple processes or its a system process |
6945 |
we start another dispatch loop, which exits when |
|
6946 |
either continue, return or step is pressed |
|
6947 |
or (via the catchBlock) if an error occurs. |
|
6948 |
Since our display is an extra exclusive one, |
|
6949 |
all processing for normal views stops here ... |
|
6950 |
" |
|
6951 |
||
6952 |
WindowGroup setActiveGroup:windowGroup. |
|
6953 |
SignalSet anySignal handle:[:ex | |
|
6954 |
|signal| |
|
6955 |
||
6956 |
signal := ex signal. |
|
11890 | 6957 |
(UserNotification accepts:signal) ifTrue:[ |
6958 |
Transcript showCR:'UserNotification'. |
|
6959 |
(signal ~~ ActivityNotificationSignal) ifTrue:[ |
|
6960 |
self showError:ex description. |
|
6961 |
]. |
|
6962 |
ex proceed. |
|
6963 |
]. |
|
6964 |
(HaltInterrupt accepts:signal) ifTrue:[ |
|
6965 |
Transcript showCR:'HaltInterrupt'. |
|
6966 |
Transcript showCR:'Halt/Break in debugger ignored'. |
|
6967 |
ex proceed. |
|
6968 |
]. |
|
11210 | 6969 |
|
6970 |
self showError:'*** Error in modal debugger: |
|
266 | 6971 |
|
334 | 6972 |
>>>> Signal: ' , signal printString , ' |
266 | 6973 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 6974 |
>>>> From: ' , ex suspendedContext sender printString , ' |
6975 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
6976 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
6977 |
>>>> : ' , 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
|
6978 |
>>>> : ' , 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
|
6979 |
>>>> : ' , 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
|
6980 |
>>>> : ' , 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
|
6981 |
>>>> : ' , 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
|
6982 |
>>>> : ' , 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
|
6983 |
>>>> : ' , 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
|
6984 |
>>>> : ' , 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
|
6985 |
>>>> : ' , 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
|
6986 |
>>>> : ' , 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
|
6987 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 6988 |
>>>> Message: ' , ex description , ' |
266 | 6989 |
|
1187 | 6990 |
caught & ignored.'. |
11210 | 6991 |
ex return. |
6992 |
] do:[ |
|
11890 | 6993 |
"/ UserNotification handle:[:ex | |
6994 |
"/ (ex signal == ActivityNotificationSignal) ifTrue:[ |
|
6995 |
"/ ex proceed |
|
6996 |
"/ ]. |
|
6997 |
"/ self showError:ex description. |
|
6998 |
"/ ex proceed. |
|
6999 |
"/ ] do:[ |
|
7000 |
device |
|
7001 |
dispatchModalWhile:[ |
|
7002 |
Processor activeProcess state:#debug. |
|
7003 |
haveControl]. |
|
7004 |
"/ ] |
|
11210 | 7005 |
]. |
7006 |
WindowGroup setActiveGroup:nil. |
|
266 | 7007 |
] ifFalse:[ |
11210 | 7008 |
"we do have multiple processes - |
7009 |
simply enter the DebugViews-Windowgroup event loop. |
|
7010 |
effectively suspending event processing for the currently |
|
7011 |
active group. |
|
7012 |
" |
|
7013 |
SignalSet anySignal handle:[:ex | |
|
7014 |
|answer signal eMsg| |
|
7015 |
||
7016 |
signal := ex signal. |
|
7017 |
||
7018 |
DebuggingDebugger ~~ true ifTrue:[ |
|
7019 |
(signal == ActivityNotification) ifTrue:[ |
|
7020 |
ex proceed |
|
7021 |
]. |
|
7022 |
"/ |
|
7023 |
"/ ignore exceptions which say they explicitly have to be ignored |
|
7024 |
"/ |
|
7025 |
ex catchInDebugger ifTrue:[ |
|
12333 | 7026 |
'DebugView [info]: ',signal printString,'-signal in debugger caught for close' infoPrintCR. |
11210 | 7027 |
self destroy. |
7028 |
ex reject |
|
7029 |
]. |
|
7030 |
||
7031 |
"/ |
|
7032 |
"/ ignore recursive breakpoints |
|
7033 |
"/ |
|
7034 |
(signal isControlInterrupt) ifTrue:[ |
|
7035 |
ignoreBreakpoints == true ifTrue:[ |
|
7036 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
|
7037 |
('DebugView [info]: ',ex suspendedContext printString) infoPrintCR. |
|
7038 |
ex proceed |
|
7039 |
]. |
|
7040 |
]. |
|
7041 |
(signal == TerminateProcessRequest) ifTrue:[ |
|
7042 |
"/ mhm - someone wants to shoot me down while debugging ... |
|
7043 |
answer := Dialog |
|
7044 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
|
7045 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
7046 |
values:#( #proceed #close ) |
|
7047 |
default:#close. |
|
7048 |
answer == #close ifTrue:[ |
|
7049 |
self destroy. |
|
7050 |
ex reject |
|
7051 |
]. |
|
7052 |
ex return. |
|
7053 |
]. |
|
7054 |
signal == RecursiveExceptionError ifTrue:[ |
|
7055 |
(ex parameter signal == BreakPointInterrupt) |
|
7056 |
ifTrue:[ |
|
7057 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
|
7058 |
ex proceed. |
|
7059 |
]. |
|
7060 |
||
7061 |
self showError:'*** Recursive error in debugger: |
|
266 | 7062 |
|
7063 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 7064 |
>>>> ' , ex parameter signal printString , ' |
266 | 7065 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 7066 |
>>>> From: ' , ex suspendedContext sender printString , ' |
7067 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
7068 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
7069 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 7070 |
>>>> Message: ' , ex description , ' |
266 | 7071 |
|
1187 | 7072 |
caught & ignored.'. |
11210 | 7073 |
ex return |
7074 |
]. |
|
7075 |
]. |
|
7076 |
||
7077 |
self topView raiseDeiconified. |
|
7078 |
||
7079 |
eMsg := ex description. |
|
7080 |
(ex signal isControlInterrupt) ifTrue:[ |
|
7081 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
|
7082 |
]. |
|
7083 |
Dialog aboutToOpenBoxNotificationSignal |
|
7084 |
handle:[:ex | ex proceed ] |
|
7085 |
do:[ |
|
7086 |
answer := Dialog |
|
7087 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
|
7088 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
7089 |
values:#( #proceed #cancel #debug ) |
|
7090 |
default:#cancel. |
|
7091 |
]. |
|
7092 |
answer == #debug ifTrue:[ |
|
12333 | 7093 |
'DebugView [info]: caught exception - debugging' infoPrintCR. |
11210 | 7094 |
Debugger |
7095 |
enterUnconditional:(ex suspendedContext) |
|
7096 |
withMessage:'Error in debugger: ' , eMsg |
|
7097 |
mayProceed:true. |
|
7098 |
ex proceed. |
|
7099 |
]. |
|
7100 |
answer == #proceed ifTrue:[ |
|
7101 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
|
7102 |
ex proceed. |
|
7103 |
]. |
|
12333 | 7104 |
'DebugView [info]: caught exception - returning' infoPrintCR. |
11210 | 7105 |
ex return. |
7106 |
] do:[ |
|
7107 |
"/ make certain that sub-debuggers, inspectors etc. |
|
7108 |
"/ come up on my device. |
|
7109 |
Screen currentScreenQuerySignal answer:device |
|
7110 |
do:[ |
|
7111 |
windowGroup |
|
7112 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
7113 |
true] |
|
7114 |
onLeave:[] |
|
7115 |
] |
|
7116 |
]. |
|
266 | 7117 |
]. |
7118 |
catchBlock := nil. |
|
7119 |
||
11818 | 7120 |
"Created: / 24-11-1995 / 20:33:45 / cg" |
7121 |
"Modified: / 26-09-2012 / 15:03:39 / cg" |
|
266 | 7122 |
! ! |
7123 |
||
0 | 7124 |
!DebugView methodsFor:'user interaction'! |
7125 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7126 |
checkIfCodeIsReallyModified |
6616 | 7127 |
|source| |
7128 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7129 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7130 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7131 |
currentMethod isNil ifTrue:[ |
11210 | 7132 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7133 |
]. |
6616 | 7134 |
source := currentMethod source. |
7135 |
source notNil ifTrue:[ |
|
11210 | 7136 |
source string = codeView contents string ifTrue:[ |
7137 |
^ false |
|
7138 |
]. |
|
7139 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
7140 |
^ false |
|
7141 |
]. |
|
6616 | 7142 |
]. |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7143 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7144 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7145 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7146 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7147 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7148 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7149 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
7150 |
checkSelectionChangeAllowed:newSelection |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7151 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7152 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7153 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7154 |
and:[newSelection = contextView selection]) ifTrue:[ |
11210 | 7155 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7156 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7157 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7158 |
(self confirm:('Code modified - change selection anyway ?')) ifFalse:[ |
11210 | 7159 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7160 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7161 |
codeView modified:false. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
7162 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7163 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7164 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
7165 |
|
266 | 7166 |
codeAccept:someCode |
7167 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
7168 |
and including selected method cannot be continued." |
|
7169 |
||
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7170 |
^ 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
|
7171 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
7172 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 7173 |
! |
7174 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7175 |
codeAccept:someCode inClass:aClass unwind:doUnwind category:category onCancel:cancelAction |
3427 | 7176 |
"user wants some code to be recompiled - must unwind stack since everything above |
7177 |
and including selected method cannot be continued." |
|
7178 |
||
7179 |
" |
|
7180 |
actually, this is not true, since the active methods will still be |
|
7181 |
executed correctly - however, the code shown in the debugger is no |
|
7182 |
longer in sync (showing the new code) with the executed code. |
|
7183 |
Therefore, we hide those contexts to avoid confusion .... |
|
7184 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
7185 |
||
7186 |
"walk up context chain and find highest context which is either the selected context, |
|
7187 |
or - if its a block-context - whose home is the selected context" |
|
7188 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7189 |
|con top newMethod| |
3427 | 7190 |
|
7191 |
codeView withWaitCursorDo:[ |
|
11210 | 7192 |
" |
7193 |
find the method-home context for this one |
|
7194 |
" |
|
7195 |
doUnwind ifTrue:[ |
|
7196 |
con := selectedContext. |
|
7197 |
top := con. |
|
7198 |
[con notNil] whileTrue:[ |
|
7199 |
(con methodHome == selectedContext) ifTrue:[ |
|
7200 |
top := con |
|
7201 |
]. |
|
7202 |
con := con sender |
|
7203 |
]. |
|
7204 |
]. |
|
7205 |
||
7206 |
"/ |
|
7207 |
"/ provide the classes nameSpace on a query; |
|
7208 |
"/ in case we accept while in another nameSpace context, |
|
7209 |
"/ (but for a class which is somewhere else) |
|
7210 |
"/ |
|
7211 |
(Class updateChangeFileQuerySignal, |
|
7212 |
Class updateChangeListQuerySignal, |
|
7213 |
Class updateHistoryLineQuerySignal) answer:true |
|
7214 |
do:[ |
|
7215 |
Class nameSpaceQuerySignal |
|
7216 |
answer:(aClass nameSpace) |
|
7217 |
do:[ |
|
12540 | 7218 |
"/ the compiler already cares for the package... |
7219 |
||
7220 |
"/ Class packageQuerySignal |
|
7221 |
"/ answer:(aClass package ? PackageId noProjectID) |
|
7222 |
"/ do:[ |
|
11210 | 7223 |
codeView contents:someCode. |
12555 | 7224 |
Class methodRedefinitionNotification |
7225 |
answer:#keep |
|
7226 |
do:[ |
|
7227 |
newMethod := aClass compilerClass |
|
7228 |
compile:someCode |
|
7229 |
forClass:aClass |
|
7230 |
inCategory:category |
|
7231 |
notifying:codeView. |
|
7232 |
]. |
|
12540 | 7233 |
"/ ]. |
11210 | 7234 |
]. |
7235 |
]. |
|
7236 |
||
12540 | 7237 |
methodCodeToggleSelectionHolder value:2. "/ showing current code |
7238 |
methodCodeToggle beVisible. |
|
7239 |
||
11210 | 7240 |
inspecting ifFalse:[ |
7241 |
" |
|
7242 |
if it worked, remove everything up to and including top |
|
7243 |
from context chain |
|
7244 |
" |
|
7245 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
7246 |
codeView modified:false. |
|
7247 |
||
7248 |
doUnwind ifTrue:[ |
|
7249 |
selectedContext canReturn ifTrue:[ |
|
7250 |
self setContext:(top "sender"). |
|
7251 |
exitAction := #restart. |
|
7252 |
selectedContext setLineNumber:1. |
|
7253 |
self doRestart. |
|
7254 |
] ifFalse:[ |
|
7255 |
self setContext:(top sender). |
|
7256 |
exitAction := #return. |
|
7257 |
]. |
|
7258 |
||
7259 |
" |
|
7260 |
continue/step is no longer possible |
|
7261 |
" |
|
7262 |
"/ continueButton disable. |
|
7263 |
"/ canContinue := false. |
|
7264 |
]. |
|
7265 |
||
12551 | 7266 |
"/ contextView selection:1. |
7267 |
||
11210 | 7268 |
"/ self showSelection:1. |
7269 |
"/ contextView makeSelectionVisible. "/ scrollToLine:(selection - 1) |
|
7270 |
] ifFalse:[ |
|
7271 |
^ cancelAction value |
|
7272 |
] |
|
7273 |
]. |
|
3427 | 7274 |
]. |
7275 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
7276 |
"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
|
7277 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
3427 | 7278 |
! |
7279 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7280 |
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
|
7281 |
"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
|
7282 |
and including selected method cannot be continued." |
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 |
" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7285 |
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
|
7286 |
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
|
7287 |
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
|
7288 |
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
|
7289 |
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
|
7290 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7291 |
"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
|
7292 |
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
|
7293 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7294 |
|sel implementorClass method category| |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7295 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7296 |
codeView withWaitCursorDo:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7297 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7298 |
"/ 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
|
7299 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7300 |
"/ con := selectedContext. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7301 |
"/ top := con. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7302 |
"/ [con notNil] whileTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7303 |
"/ (con methodHome == selectedContext) ifTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7304 |
"/ top := con |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7305 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7306 |
"/ con := con sender |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7307 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7308 |
|
10628 | 7309 |
" |
7310 |
use class&selector to find the method for the compilation |
|
7311 |
and compile. |
|
7312 |
" |
|
7313 |
category := givenCategoryOrNil. |
|
7314 |
sel := selectedContext selector. |
|
7315 |
implementorClass := selectedContext methodClass. |
|
11898 | 7316 |
implementorClass isNil ifTrue:[ |
7317 |
method := selectedContext method. |
|
11943
10e162265c0e
changed: #codeAccept:unwind:category:onCancel:
Claus Gittinger <cg@exept.de>
parents:
11912
diff
changeset
|
7318 |
(method notNil and:[method mclass isNil]) ifTrue:[ |
11898 | 7319 |
method := method wrapper. |
7320 |
]. |
|
7321 |
method notNil ifTrue:[ |
|
7322 |
implementorClass := method mclass |
|
7323 |
]. |
|
7324 |
] ifFalse:[ |
|
7325 |
method := selectedContext method. |
|
7326 |
]. |
|
10628 | 7327 |
implementorClass notNil ifTrue:[ |
7328 |
category isNil ifTrue:[ |
|
7329 |
method isNil ifTrue:[ |
|
7330 |
method := implementorClass compiledMethodAt:sel. |
|
7331 |
]. |
|
7332 |
category := method category |
|
7333 |
] |
|
7334 |
] ifFalse:[ |
|
7335 |
implementorClass := selectedContext receiver class. |
|
12540 | 7336 |
implementorClass := implementorClass whichClassImplements:sel. |
7337 |
||
10628 | 7338 |
implementorClass ~~ Object ifTrue:[ |
7339 |
implementorClass := Dialog |
|
7340 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
|
7341 |
initialAnswer:implementorClass name |
|
7342 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
7343 |
implementorClass size == 0 ifTrue:[ |
|
7344 |
^ cancelAction value "/ cancelled |
|
7345 |
]. |
|
7346 |
implementorClass := Smalltalk classNamed:implementorClass. |
|
7347 |
implementorClass isNil ifTrue:[ |
|
7348 |
Dialog warn:'No such class'. |
|
7349 |
^ cancelAction value "/ cancelled |
|
7350 |
]. |
|
7351 |
]. |
|
7352 |
]. |
|
7353 |
||
7354 |
self |
|
7355 |
codeAccept:someCode |
|
7356 |
inClass:implementorClass |
|
7357 |
unwind:doUnwind |
|
7358 |
category:category |
|
7359 |
onCancel:cancelAction. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7360 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7361 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7362 |
"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
|
7363 |
"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
|
7364 |
! |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7365 |
|
7912 | 7366 |
codeCompletion |
7367 |
|cls| |
|
7368 |
||
8212 | 7369 |
currentMethod isNil ifTrue:[ ^ self ]. |
8338 | 7370 |
|
7912 | 7371 |
cls := currentMethod mclass. |
8212 | 7372 |
cls isNil ifTrue:[ ^ self ]. |
7373 |
||
7912 | 7374 |
UserInformation handle:[:ex | |
11210 | 7375 |
ex proceed. |
7912 | 7376 |
] do:[ |
11210 | 7377 |
DoWhatIMeanSupport codeCompletionForClass:cls context:selectedContext codeView:codeView. |
7912 | 7378 |
]. |
7379 |
! |
|
7380 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7381 |
confirm:aString |
6971 | 7382 |
"open a modal yes-no dialog. |
7383 |
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
|
7384 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7385 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
11210 | 7386 |
^ true |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7387 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7388 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7389 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
7390 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
7391 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
7392 |
"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
|
7393 |
Also sent to autoselect an interesting context on entry." |
0 | 7394 |
|
9235 | 7395 |
HaltInterrupt handle:[:ex | |
11210 | 7396 |
ignoreBreakpoints ifFalse:[ex reject]. |
7397 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [doShowSelection.]' bindWith:ex suspendedContext) infoPrintCR. |
|
7398 |
ex proceed |
|
3447 | 7399 |
] do:[ |
11210 | 7400 |
self updateForContext:lineNr |
3269 | 7401 |
]. |
7402 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSĂgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
7403 |
|
3447 | 7404 |
"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
|
7405 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7406 |
|
10205 | 7407 |
hideStackInspector |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7408 |
stackInspector notNil ifTrue:[ |
11210 | 7409 |
stackInspector destroy. |
7410 |
stackInspector := nil. |
|
7411 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
|
7412 |
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
|
7413 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7414 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7415 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7416 |
methodCodeToggleChanged |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7417 |
|sel| |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7418 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7419 |
sel := contextView selection. |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7420 |
sel notNil ifTrue:[ |
11210 | 7421 |
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
|
7422 |
] |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7423 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7424 |
"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
|
7425 |
! |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7426 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7427 |
processEvent:anEvent |
6129 | 7428 |
"filter keyboard events for popUp variable value display. |
7429 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7430 |
|
12106 | 7431 |
<resource: #keyboard (#CodeCompletion )> |
7432 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7433 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7434 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7435 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7436 |
evView notNil ifTrue:[ |
11210 | 7437 |
focusView := evView windowGroup focusView. |
7438 |
focusView isNil ifTrue:[ |
|
7439 |
focusView := evView. |
|
7440 |
]. |
|
7441 |
||
7442 |
anEvent isKeyPressEvent ifTrue:[ |
|
7443 |
key := anEvent key. |
|
7444 |
rawKey := anEvent rawKey. |
|
7445 |
||
7446 |
inCodeView := (focusView == codeView |
|
7447 |
or:[focusView isComponentOf:codeView]). |
|
7448 |
inCodeView ifTrue:[ |
|
7449 |
key == #CodeCompletion ifTrue:[ |
|
7450 |
"/ complete the word before/under the cursor. |
|
7451 |
self sensor |
|
7452 |
pushUserEvent:#codeCompletion |
|
7453 |
for:self |
|
7454 |
withArguments:#(). |
|
7455 |
^ true |
|
7456 |
]. |
|
7457 |
]. |
|
7458 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7459 |
|
3602 | 7460 |
false ifTrue:[ |
11210 | 7461 |
anEvent isButtonReleaseEvent ifTrue:[ |
7462 |
anEvent view == codeView ifTrue:[ |
|
7463 |
(RBParser notNil and:[RBParser isLoaded]) |
|
7464 |
ifTrue:[ |
|
7465 |
self sensor |
|
7466 |
pushEvent:anEvent. "/ must be first in queue |
|
7467 |
||
7468 |
self sensor |
|
7469 |
pushUserEvent:#explainSelection |
|
7470 |
for:self |
|
7471 |
withArguments:nil. |
|
7472 |
^ true "/ eaten |
|
7473 |
] |
|
7474 |
] |
|
7475 |
]. |
|
3602 | 7476 |
]. |
7477 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7478 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7479 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7480 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
7481 |
|
8212 | 7482 |
setCurrentMethod:aMethodOrNil |
7483 |
currentMethod := aMethodOrNil. |
|
7484 |
! |
|
7485 |
||
11610 | 7486 |
showSelection:lineNr |
1327 | 7487 |
"user clicked on a header line - show selected code in textView. |
7488 |
Also sent to autoselect an interesting context on entry." |
|
11610 | 7489 |
|
11857
e561b4e978d0
Answer IsDebuggingQuery (with true).
Stefan Vogel <sv@exept.de>
parents:
11837
diff
changeset
|
7490 |
UserNotification |
11610 | 7491 |
handle:[:ex | |
7492 |
"/ ex suspendedContext fullPrintAll. |
|
7493 |
Transcript showCR:ex description. |
|
7494 |
"/ Transcript showCR:ex parameter. |
|
7495 |
ex proceed |
|
7496 |
] |
|
7497 |
do:[ |
|
7498 |
Error |
|
7499 |
handle:[:ex | |
|
7500 |
|s con| |
|
7501 |
||
7502 |
ex signal isControlInterrupt ifTrue:[ |
|
7503 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' |
|
7504 |
infoPrintCR. |
|
7505 |
ex proceed |
|
7506 |
]. |
|
7507 |
('DebugView [info]: error at %1 when showing selection in debugger ignored' |
|
7508 |
bindWith:ex suspendedContext) infoPrintCR. |
|
7509 |
s := '' writeStream. |
|
7510 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
7511 |
s nextPutLine:'****'. |
|
7512 |
s nextPutLine:'**** ',(ex description). |
|
7513 |
s nextPutLine:'****'. |
|
7514 |
con := ex suspendedContext. |
|
7515 |
s nextPutLine:'**** ',(con printString). |
|
7516 |
con := con sender. |
|
7517 |
HaltInterrupt ignoreIn:[ con fullPrintAllOn:s. ]. |
|
7518 |
||
5842 | 7519 |
"/ [con notNil] whileTrue:[ |
7520 |
"/ Error catch:[:ex | |
|
7521 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
7522 |
"/ ]. |
|
4947 | 7523 |
"/ |
5842 | 7524 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
7525 |
"/ con := nil |
|
7526 |
"/ ] ifFalse:[ |
|
7527 |
"/ con := con sender. |
|
7528 |
"/ ] |
|
7529 |
"/ ]. |
|
11610 | 7530 |
|
7531 |
codeView contents:(s contents). |
|
7532 |
ex return. |
|
7533 |
] |
|
7534 |
do:[ self doShowSelection:lineNr ] |
|
7535 |
] |
|
7536 |
||
7537 |
"Modified: / 19-07-2012 / 10:56:58 / cg" |
|
1327 | 7538 |
! |
7539 |
||
10205 | 7540 |
showStackInspectorFor:con |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7541 |
stackInspector isNil ifTrue:[ |
11210 | 7542 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
7543 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
|
7544 |
stackInspector := InspectorView |
|
7545 |
origin:(0.6 @ 0.0) |
|
7546 |
corner:(1.0 @ 1.0) |
|
7547 |
in:contextInspector superView. |
|
7548 |
stackInspector realize. |
|
7549 |
stackInspector fieldListLabel:'Stack'. |
|
7550 |
stackInspector hideReceiver:true |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7551 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7552 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7553 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7554 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
7555 |
|
12529 | 7556 |
updateContextInfoFor:aContext |
7557 |
"additional info as-per selected context; |
|
7558 |
for now: |
|
7559 |
update:with:from: - show who was responsible |
|
7560 |
" |
|
7561 |
||
12552 | 7562 |
|whatChanged changedObject receiver| |
12529 | 7563 |
|
7564 |
aContext selector == #'update:with:from:' ifTrue:[ |
|
7565 |
receiver := aContext receiver. |
|
12552 | 7566 |
whatChanged := aContext argAt:1. |
12529 | 7567 |
changedObject := aContext argAt:3. |
12552 | 7568 |
|
7569 |
changedObject isBehavior ifTrue:[ |
|
7570 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject name allBold). |
|
7571 |
^ self |
|
7572 |
]. |
|
7573 |
||
12529 | 7574 |
receiver class allInstanceVariableNames keysAndValuesDo:[:i :nm | |
7575 |
(receiver instVarAt:i) == changedObject ifTrue:[ |
|
12552 | 7576 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',nm allBold). |
12529 | 7577 |
^ self |
7578 |
] |
|
7579 |
]. |
|
7580 |
||
7581 |
(receiver isKindOf:ApplicationModel) ifTrue:[ |
|
7582 |
receiver builder notNil ifTrue:[ |
|
7583 |
(receiver builder bindings ? #()) keysAndValuesDo:[:eachAspect :eachValue | |
|
7584 |
eachValue == changedObject ifTrue:[ |
|
12552 | 7585 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by aspect ',eachAspect allBold). |
12529 | 7586 |
^ self |
7587 |
] |
|
7588 |
] |
|
7589 |
] |
|
7590 |
]. |
|
12552 | 7591 |
|
7592 |
contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject classNameWithArticle allBold). |
|
7593 |
^self. |
|
12529 | 7594 |
]. |
7595 |
contextInfoLabel label:nil. |
|
7596 |
! |
|
7597 |
||
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7598 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7599 |
"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
|
7600 |
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
|
7601 |
|
56 | 7602 |
|con homeContext sel method code canAccept |
105 | 7603 |
implementorClass lineNrInMethod rec m line |
10205 | 7604 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 7605 |
codeSet highlighter evaluatorClass |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7606 |
canDefine callee searchClass originalMethod cannotAcceptDueToOutdatedClass| |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7607 |
|
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7608 |
canDefine := cannotAcceptDueToOutdatedClass := false. |
8212 | 7609 |
self setCurrentMethod:nil. |
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
7610 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7611 |
contextArray notNil ifTrue:[ |
10628 | 7612 |
lineNr <= contextArray size ifTrue:[ |
7613 |
con := contextArray at:lineNr. |
|
7614 |
callee := contextArray at:lineNr-1 ifAbsent:nil. |
|
7615 |
]. |
|
7616 |
" |
|
7617 |
clicking on the '** ...'-line shows more ... |
|
7618 |
" |
|
7619 |
con isNil ifTrue:[ |
|
7620 |
line := contextView list at:lineNr. |
|
7621 |
(line startsWith:'**') ifTrue:[ |
|
7622 |
self showMore. |
|
7623 |
lineNr >= contextArray size ifTrue:[ |
|
7624 |
contextView setSelection:lineNr. |
|
7625 |
con := contextArray at:lineNr ifAbsent:nil |
|
7626 |
] |
|
7627 |
]. |
|
7628 |
con isNil ifTrue:[ |
|
7629 |
codeView contents:nil. |
|
7630 |
^ self |
|
7631 |
]. |
|
7632 |
]. |
|
7633 |
||
7634 |
selectedContext := con. |
|
7635 |
m := contextView middleButtonMenu. |
|
7636 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
|
7637 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
|
7638 |
]. |
|
7639 |
||
7640 |
self withExecuteCursorDo:[ |
|
7641 |
codeSet := false. |
|
7642 |
||
7643 |
" |
|
7644 |
give it to the (lower right) inspector |
|
7645 |
" |
|
7646 |
Error handle:[:ex | |
|
11595 | 7647 |
'DebugView [warning]: error while accessing context: ' errorPrint. |
7648 |
ex description errorPrintCR. |
|
10628 | 7649 |
contextInspector inspect:nil. |
11595 | 7650 |
ex suspendedContext fullPrintAllOn: Transcript. |
9479 | 7651 |
"/ ex reject. |
10628 | 7652 |
] do:[ |
7653 |
contextInspector inspect:con. |
|
7654 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
|
7655 |
]. |
|
7656 |
||
7657 |
"/ show a stack inspector sometimes |
|
7658 |
||
7659 |
con hasStackToShow ifTrue:[ |
|
7660 |
self showStackInspectorFor:con |
|
7661 |
] ifFalse:[ |
|
7662 |
self hideStackInspector |
|
7663 |
]. |
|
7664 |
||
7665 |
homeContext := con methodHome. |
|
7666 |
con canReturn ifTrue:[ |
|
7667 |
returnButton enable. restartButton enable. |
|
7668 |
] ifFalse:[ |
|
7669 |
returnButton disable. restartButton disable. |
|
7670 |
]. |
|
7671 |
||
7672 |
lineNrInMethod := con lineNumber. |
|
7673 |
||
7674 |
canAccept := false. |
|
7675 |
||
7676 |
homeContext isNil ifTrue:[ |
|
7677 |
" |
|
7678 |
mhmh - an optimized block |
|
7679 |
should get the block here, and get the method from |
|
7680 |
that one ... |
|
7681 |
But in the current version, there is no easy way to get to the block |
|
7682 |
since that one is not in the context. |
|
7683 |
A future new block calling scheme will fix this |
|
7684 |
(passing the block instead of the home as block argument). |
|
7685 |
" |
|
11610 | 7686 |
(method := con method) isNil ifTrue:[ |
7687 |
"temporary kludge - peek into the sender context. |
|
7688 |
If its a do-like method and there is a single block variable |
|
7689 |
in the args or temporaries, that must be the one. |
|
7690 |
This helps in some cases. |
|
7691 |
" |
|
7692 |
(sender := con sender) notNil ifTrue:[ |
|
7693 |
tryVars := false. |
|
7694 |
(selSender := sender selector) notNil ifTrue:[ |
|
7695 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
|
7696 |
tryVars := true. |
|
7697 |
] |
|
7698 |
]. |
|
7699 |
tryVars ifTrue:[ |
|
7700 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
|
7701 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
|
7702 |
possibleBlocks size == 1 ifTrue:[ |
|
7703 |
method := possibleBlocks first method. |
|
7704 |
]. |
|
10628 | 7705 |
] |
7706 |
]. |
|
11610 | 7707 |
] |
10628 | 7708 |
] ifFalse:[ |
7709 |
"fetch rec here - so we won't need context in doItAction" |
|
7710 |
rec := homeContext receiver. |
|
7711 |
sel := homeContext selector. |
|
7712 |
sel notNil ifTrue:[ |
|
7713 |
canAccept := true. |
|
7714 |
||
7715 |
implementorClass := homeContext methodClass. |
|
7716 |
implementorClass isNil ifTrue:[ |
|
11898 | 7717 |
homeContext method notNil ifTrue:[ |
7718 |
WrappedMethod allInstancesDo:[:wrapped | |
|
7719 |
wrapped originalMethod == homeContext method ifTrue:[ |
|
7720 |
implementorClass := wrapped mclass |
|
7721 |
] |
|
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7722 |
]. |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7723 |
implementorClass isNil ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7724 |
(homeContext searchClass notNil |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7725 |
and:[homeContext searchClass isObsolete]) ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7726 |
cannotAcceptDueToOutdatedClass := true. |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7727 |
] |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7728 |
]. |
11898 | 7729 |
]. |
7730 |
]. |
|
7731 |
implementorClass isNil ifTrue:[ |
|
10628 | 7732 |
Error handle:[:ex | |
11890 | 7733 |
"/ not covered by Error, anyway |
7734 |
"/ ex signal == BreakPointInterrupt ifTrue:[ |
|
7735 |
"/ ex proceed. |
|
7736 |
"/ ]. |
|
10628 | 7737 |
code := 'error while asking method for its source'. |
7738 |
code := code , Character cr , ex signal printString. |
|
7739 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7740 |
||
7741 |
canAccept := false. |
|
7742 |
ex return. |
|
7743 |
] do:[ |
|
7744 |
" |
|
7745 |
special: look if this context was created by |
|
7746 |
valueWithReceiver kind of method invocation; |
|
7747 |
if so, grab the method from the sender and show it |
|
7748 |
" |
|
7749 |
((sender := homeContext sender) notNil |
|
7750 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
|
7751 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7752 |
method := sender receiver. |
|
7753 |
canAccept := false. |
|
7754 |
] ifFalse:[ |
|
7755 |
(method := con method) notNil ifTrue:[ |
|
7756 |
canAccept := false. |
|
7757 |
] |
|
7758 |
]. |
|
7759 |
] |
|
7760 |
] ifFalse:[ |
|
7761 |
method := implementorClass compiledMethodAt:sel. |
|
7762 |
]. |
|
7763 |
] |
|
7764 |
]. |
|
7765 |
||
7766 |
homeContext notNil ifTrue:[ |
|
7767 |
searchClass := homeContext searchClass ? rec class. |
|
7768 |
currentMethod := searchClass lookupMethodFor:sel. |
|
7769 |
]. |
|
7770 |
originalMethod := currentMethod. |
|
11602
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7771 |
(currentMethod notNil |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7772 |
and:[currentMethod ~~ method |
b04d5d5e02c7
single stepping in wrapped methods
Claus Gittinger <cg@exept.de>
parents:
11595
diff
changeset
|
7773 |
and:[ (currentMethod isWrapped and:[ method == currentMethod originalMethod]) not ]]) ifTrue:[ |
10628 | 7774 |
originalMethod := method. |
7775 |
methodCodeToggleSelectionHolder value = 1 ifTrue:[ |
|
7776 |
method := originalMethod. |
|
7777 |
] ifFalse:[ |
|
7778 |
method := currentMethod. |
|
7779 |
lineNrInMethod := nil. |
|
7780 |
canAccept := true. |
|
7781 |
]. |
|
7782 |
methodCodeToggle beVisible. |
|
7783 |
] ifFalse:[ |
|
7784 |
methodCodeToggle beInvisible. |
|
7785 |
]. |
|
7786 |
||
7787 |
code isNil ifTrue:[ |
|
7788 |
errMsg := nil. |
|
7789 |
method isNil ifTrue:[ |
|
7790 |
"/ fall back heuristics |
|
7791 |
con isBlockContext ifTrue:[ |
|
7792 |
((sender := con sender) notNil |
|
7793 |
and:[((sender selector ? '') startsWith:'value') |
|
7794 |
and:[sender receiver isBlock]]) ifTrue:[ |
|
7795 |
code := sender receiver source. |
|
7796 |
] |
|
7797 |
] ifFalse:[ |
|
7798 |
((sender := con sender) notNil |
|
7799 |
and:[((sender selector ? '') startsWith:'valueWith') |
|
7800 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7801 |
method := sender receiver. |
|
7802 |
] |
|
7803 |
] |
|
7804 |
]. |
|
7805 |
method notNil ifTrue:[ |
|
7806 |
Error handle:[:ex | |
|
11890 | 7807 |
"/ not covered by Error, anyway |
7808 |
"/ ex signal isControlInterrupt ifTrue:[ |
|
7809 |
"/ ex proceed. |
|
7810 |
"/ ]. |
|
10628 | 7811 |
code := 'error while asking method for its source'. |
7812 |
code := code , Character cr , ex signal printString. |
|
7813 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7814 |
||
7815 |
canAccept := false. |
|
7816 |
ex return. |
|
7817 |
] do:[ |
|
7818 |
self sensor shiftDown ifTrue:[ |
|
7819 |
code := method decompiledSource |
|
7820 |
] ifFalse:[ |
|
7821 |
code := method source. |
|
7822 |
]. |
|
7823 |
]. |
|
7824 |
code isNil ifTrue:[ |
|
7825 |
method sourceFilename notNil ifTrue:[ |
|
7826 |
codeView contents:(resources |
|
7827 |
string:'** no sourcefile: %1 **' |
|
7828 |
with:method sourceFilename). |
|
7829 |
codeView flash. |
|
7830 |
codeSet := true. |
|
7831 |
] ifFalse:[ |
|
7832 |
[ |
|
7833 |
|src| |
|
7834 |
||
7835 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
|
7836 |
codeView contents:src. |
|
7837 |
codeSet := true. |
|
7838 |
] on: Error do:[ |
|
7839 |
errMsg := '** no source **' |
|
7840 |
]. |
|
7841 |
] |
|
7842 |
]. |
|
7843 |
] ifFalse:[ |
|
7844 |
homeContext isNil ifTrue:[ |
|
7845 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
|
7846 |
] ifFalse:[ |
|
7847 |
errMsg := '** no method - no source **'. |
|
7848 |
canDefine := true. |
|
7849 |
] |
|
7850 |
]. |
|
7851 |
errMsg notNil ifTrue:[ |
|
7852 |
self showError:errMsg. |
|
7853 |
codeSet := true. |
|
7854 |
] |
|
7855 |
]. |
|
7856 |
||
7857 |
code isNil ifTrue:[ |
|
7858 |
"/ canAccept := false. |
|
7859 |
codeSet ifFalse:[ |
|
7860 |
codeView contents:nil. |
|
7861 |
] |
|
7862 |
] ifFalse:[ |
|
7863 |
lineNrInMethod notNil ifTrue:[ |
|
7864 |
lineNrInMethod == 0 ifTrue:[ |
|
7865 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
7866 |
lineNrInMethod := method lineNumber |
|
7867 |
]. |
|
7868 |
"/ guess lineNumber from sent-messages selector |
|
7869 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
|
7870 |
lineNrInMethod == 0 ifTrue:[ |
|
7871 |
|conIdx sentContext messages| |
|
7872 |
||
7873 |
conIdx := contextArray identityIndexOf:con. |
|
7874 |
conIdx > 1 ifTrue:[ |
|
7875 |
sentContext := contextArray at:conIdx-1. |
|
7876 |
sentContext isBlockContext ifFalse:[ |
|
7877 |
(method notNil and:[code notNil]) ifTrue:[ |
|
7878 |
messages := method messagesSent. |
|
7879 |
messages size == 1 ifTrue:[ |
|
7880 |
sentContext selector == messages first ifTrue:[ |
|
7881 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
|
7882 |
] |
|
7883 |
] |
|
7884 |
]. |
|
7885 |
]. |
|
7886 |
]. |
|
7887 |
]. |
|
7888 |
]. |
|
7889 |
]. |
|
7890 |
codeView isCodeView2 ifTrue:[ |
|
10649
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7891 |
codeView model setValue: code. |
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7892 |
codeView model changed. |
10628 | 7893 |
codeView methodHolder value: method. |
10752 | 7894 |
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class]) |
10628 | 7895 |
] ifFalse:[ |
7896 |
||
7897 |
UserPreferences current syntaxColoring ifTrue:[ |
|
7898 |
implementorClass isNil ifTrue:[ |
|
7899 |
(con isBlockContext |
|
7900 |
and:[con home isNil |
|
7901 |
and:[con guessedHome notNil]]) |
|
7902 |
ifTrue:[ |
|
7903 |
implementorClass := con guessedHome mclass |
|
7904 |
] |
|
7905 |
]. |
|
7906 |
implementorClass notNil ifTrue:[ |
|
7907 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
|
7908 |
code size < 100000 ifTrue:[ |
|
7909 |
Error handle:[:ex | |
|
7910 |
] do:[ |
|
7911 |
code := highlighter formatMethod:code in:implementorClass. |
|
7912 |
] |
|
7913 |
] |
|
7914 |
] |
|
7915 |
] |
|
7916 |
]. |
|
1555 | 7917 |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7918 |
"/ code ~= (codeView contents) ifTrue:[ |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7919 |
cannotAcceptDueToOutdatedClass ifTrue:[ |
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7920 |
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
|
7921 |
] ifFalse:[ |
10628 | 7922 |
codeView setContents:code. |
11912
9bcd2727c37e
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
11911
diff
changeset
|
7923 |
]. |
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7924 |
"/ ]. |
10628 | 7925 |
]. |
7926 |
(lineNrInMethod notNil |
|
7927 |
and:[lineNrInMethod ~~ 0 |
|
7928 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
|
7000 | 7929 |
lineNrInMethod == 255 ifFalse:[ |
10628 | 7930 |
(lineNrInMethod == 255 |
7931 |
and:[method notNil |
|
7932 |
and:[method hasCode not]]) ifTrue:[ |
|
7933 |
"/ means: do not really know in interpreted methods |
|
7934 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
|
7935 |
] ifFalse:[ |
|
7936 |
codeView selectLine:lineNrInMethod. |
|
7937 |
]. |
|
7938 |
codeView makeSelectionVisible |
|
7000 | 7939 |
]. |
10628 | 7940 |
] ifFalse:[ |
7941 |
codeView unselect. |
|
7942 |
codeView scrollToTop |
|
7943 |
] |
|
7944 |
]. |
|
7945 |
||
7946 |
codeView acceptEnabled:canAccept. |
|
7947 |
canAccept ifTrue:[ |
|
7948 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
7949 |
] ifFalse:[ |
|
7950 |
codeView acceptAction:[:code | self beep] |
|
7951 |
]. |
|
7952 |
||
7953 |
receiverInspector inspect:rec. |
|
7954 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
|
7955 |
||
7956 |
" |
|
7957 |
the one below is wrong: currently, the |
|
7958 |
evaluator cannot handle passed contexts. |
|
7959 |
Once it does, pass con as in:-arg |
|
7960 |
" |
|
7961 |
(rec isJavaObject |
|
7962 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
7963 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
7964 |
evaluatorClass := Parser |
|
7965 |
] ifFalse:[ |
|
7966 |
(method notNil and:[method mclass notNil]) ifTrue:[ |
|
7967 |
evaluatorClass := method mclass evaluatorClass. |
|
7968 |
] ifFalse:[ |
|
7969 |
evaluatorClass := rec class evaluatorClass. |
|
7970 |
]. |
|
7971 |
]. |
|
7972 |
||
7973 |
codeView doItAction:[:theCode | |
|
7974 |
evaluatorClass |
|
7975 |
evaluate:theCode |
|
7976 |
in:actualContext |
|
7977 |
receiver:rec |
|
7978 |
notifying:codeView |
|
7979 |
logged:true |
|
7980 |
ifFail:nil |
|
7981 |
]. |
|
7982 |
self setCurrentMethod:method. |
|
7983 |
||
11610 | 7984 |
selectedContext := homeContext ? con. |
10628 | 7985 |
actualContext := con |
7986 |
]. |
|
4122 | 7987 |
] ifFalse:[ |
10628 | 7988 |
codeView contents:nil. |
4122 | 7989 |
]. |
7990 |
codeView modified:false. |
|
7991 |
||
7992 |
con isContext ifFalse:[ |
|
10628 | 7993 |
sendButton disable. |
4122 | 7994 |
] ifTrue:[ |
10628 | 7995 |
sendButton enable. |
10205 | 7996 |
]. |
12529 | 7997 |
self updateContextInfoFor:con. |
10205 | 7998 |
|
7999 |
"clear out locals to prevent keeping around unneeded contexts |
|
4122 | 8000 |
(due to the block held in codeView). |
8001 |
(not really needed, since stuff gets collected away sooner or later ... |
|
8002 |
... but this makes it a bit sooner) |
|
8003 |
" |
|
8004 |
con := nil. |
|
8005 |
homeContext := nil. |
|
8006 |
||
10205 | 8007 |
(callee notNil |
8008 |
and:[callee method notNil |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8009 |
and:[callee method selector == #subclassResponsibility]] |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8010 |
) ifTrue:[ |
10628 | 8011 |
canDefine := true. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8012 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
8013 |
|
4122 | 8014 |
canDefine ifTrue:[ |
10628 | 8015 |
defineButton beVisible. |
4122 | 8016 |
] ifFalse:[ |
10628 | 8017 |
defineButton beInvisible. |
4122 | 8018 |
]. |
8019 |
||
12529 | 8020 |
"/ enable/disable some menu items |
4122 | 8021 |
self updateMenuItems |
8022 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
8023 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
10752 | 8024 |
"Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11647 | 8025 |
"Modified: / 23-07-2012 / 12:23:49 / cg" |
4122 | 8026 |
! ! |
8027 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8028 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'! |
8170 | 8029 |
|
8030 |
ignoreCount:something |
|
8031 |
ignoreCount := something. |
|
8032 |
! |
|
8033 |
||
8034 |
ignoreEndTime:something |
|
8035 |
ignoreEndTime := something. |
|
8036 |
! |
|
8037 |
||
11210 | 8038 |
ignoreUntilShiftKeyPressed:aBoolean |
8039 |
ignoreUntilShiftKeyPressed := aBoolean. |
|
8040 |
||
8041 |
"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
|
8042 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8043 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8044 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8045 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8046 |
decrementIgnoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8047 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8048 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8049 |
ignoreCount := ignoreCount - 1 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8050 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8051 |
] |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8054 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'! |
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 |
printConditionOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8057 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8058 |
aStream nextPutAll:' until shiftKey pressed'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8059 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8060 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8061 |
aStream nextPutAll:' until '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8062 |
ignoreEndTime printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8063 |
] ifFalse:[ |
12562 | 8064 |
(ignoreCount notNil) ifTrue:[ |
8065 |
(ignoreCount > 0) ifTrue:[ |
|
8066 |
aStream nextPutAll:' for '. |
|
8067 |
ignoreCount printOn:aStream. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8068 |
] ifFalse:[ |
12562 | 8069 |
(ignoreCount < 0) ifTrue:[ |
8070 |
aStream nextPutAll:' forEver'. |
|
8071 |
] ifFalse:[ |
|
8072 |
aStream nextPutAll:' no longer'. |
|
8073 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8074 |
]. |
12562 | 8075 |
] |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8076 |
]. |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8079 |
"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
|
8080 |
"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
|
8081 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8082 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8083 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8084 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8085 |
haltIgnoredInfoString |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8086 |
"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
|
8087 |
nil if not ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8088 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8089 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8090 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8091 |
^ '%1 more calls ignored' bindWith:ignoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8092 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8093 |
^ nil |
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 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8096 |
(ignoreEndTime > Timestamp now) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8097 |
^ 'ignored until %1' bindWith:ignoreEndTime |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8098 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8099 |
^ nil |
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 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8102 |
Display shiftDown ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8103 |
^ 'ignored until shiftKey is pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8104 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8105 |
^ nil |
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 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8108 |
^ 'ignored until reenabled' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8109 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8110 |
"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
|
8111 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8112 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8113 |
isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8114 |
"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
|
8115 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8116 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8117 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8118 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8119 |
ignoreCount notNil ifTrue:[ |
12562 | 8120 |
^ ignoreCount == -1 or:[ ignoreCount > 0 ] |
8121 |
]. |
|
8122 |
^ true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8123 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8124 |
"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
|
8125 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8126 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8127 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8128 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8129 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8130 |
"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
|
8131 |
"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
|
8132 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8133 |
|
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8134 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8135 |
^ false |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8136 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8137 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8138 |
"Created: / 06-03-2012 / 14:36:28 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8139 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8140 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8141 |
isHaltIgnored |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8142 |
"true if this halt should be ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8143 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8144 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8145 |
^ Display shiftDown not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8146 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8147 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8148 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8149 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8150 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8151 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8152 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8153 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8154 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8155 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8156 |
"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
|
8157 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8158 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8159 |
!DebugView::IgnoredHalt methodsFor:'accessing'! |
11210 | 8160 |
|
8170 | 8161 |
method |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8162 |
|m| |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8163 |
|
9922 | 8164 |
weakMethodHolder == #all ifTrue:[^ weakMethodHolder ]. |
8165 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8166 |
m := weakMethodHolder at:1. |
9796 | 8167 |
"/ wait until really gone (it could still be on the call stack |
8168 |
"/ |
|
8169 |
"/ m notNil ifTrue:[ |
|
8170 |
"/ m mclass isNil ifTrue:[ |
|
8171 |
"/ "/ no longer valid |
|
8172 |
"/ weakMethodHolder at:1 put:nil. |
|
8173 |
"/ ^ nil |
|
8174 |
"/ ]. |
|
8175 |
"/ ]. |
|
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8176 |
^ m |
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8177 |
|
9922 | 8178 |
"Modified: / 08-05-2011 / 10:28:10 / cg" |
8170 | 8179 |
! |
8180 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8181 |
method:methodArg lineNumber:lineNumberArg |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8182 |
"/ self assert:(methodArg mclass notNil). |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8183 |
|
9922 | 8184 |
methodArg == #all ifTrue:[ |
11210 | 8185 |
weakMethodHolder := methodArg |
9922 | 8186 |
] ifFalse:[ |
11210 | 8187 |
weakMethodHolder := WeakArray with:methodArg. |
9922 | 8188 |
]. |
8170 | 8189 |
lineNumber := lineNumberArg. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8190 |
|
9922 | 8191 |
"Modified: / 08-05-2011 / 10:28:41 / cg" |
8170 | 8192 |
! ! |
8193 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8194 |
!DebugView::IgnoredHalt methodsFor:'printing'! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8195 |
|
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8196 |
printOn:aStream |
9922 | 8197 |
|method| |
8198 |
||
8199 |
(method := self method) isNil ifTrue:[ |
|
11210 | 8200 |
aStream nextPutAll:'an obsolete IgnoredHalt'. |
8201 |
^ self |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8202 |
]. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
8203 |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8204 |
aStream nextPutAll:'Ignore '. |
11704 | 8205 |
method isSymbol ifTrue:[ |
8206 |
method printOn:aStream. |
|
8207 |
] ifFalse:[ |
|
8208 |
method whoString printOn:aStream. |
|
8209 |
]. |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8210 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8211 |
|
11704 | 8212 |
"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
|
8213 |
! ! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
8214 |
|
8170 | 8215 |
!DebugView::IgnoredHalt methodsFor:'queries'! |
8216 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8217 |
isActive |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8218 |
"true if this ignore-entry is still active" |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8219 |
|
9796 | 8220 |
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
|
8221 |
^ super isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8222 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8223 |
"Modified: / 06-03-2012 / 12:40:20 / cg" |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8224 |
! |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8225 |
|
8170 | 8226 |
isForMethod:aMethod line:line |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8227 |
"/ check in this order - method has a flushing side-effect, which is useful here... |
9922 | 8228 |
weakMethodHolder == #all ifTrue:[^ true]. |
8229 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8230 |
^ (aMethod = self method) and:[ line = lineNumber ]. |
9922 | 8231 |
|
8232 |
"Modified: / 08-05-2011 / 10:27:31 / cg" |
|
8170 | 8233 |
! |
8234 |
||
8235 |
isHaltIgnoredInMethod:aMethod line:line |
|
9095 | 8236 |
"/ 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
|
8237 |
|
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
8238 |
(self isForMethod:aMethod line:line) ifFalse:[^ false]. |
9095 | 8239 |
"/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored. |
8170 | 8240 |
|
8241 |
^ self isHaltIgnored |
|
8242 |
! ! |
|
8243 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8244 |
!DebugView::IgnoredBreakpoint methodsFor:'accessing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8245 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8246 |
parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8247 |
^ parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8248 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8249 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8250 |
parameter:something |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8251 |
parameter := something. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8252 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8253 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8254 |
!DebugView::IgnoredBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8255 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8256 |
printOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8257 |
aStream nextPutAll:'Ignore breakpoint:#', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8258 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8259 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8260 |
"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
|
8261 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8262 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8263 |
!DebugView::IgnoredBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8264 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8265 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8266 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8267 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8268 |
"Created: / 06-03-2012 / 12:54:35 / cg" |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8269 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8270 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8271 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8272 |
^ paramArg = parameter |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8273 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
8274 |
"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
|
8275 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
8276 |
|
4122 | 8277 |
!DebugView class methodsFor:'documentation'! |
8278 |
||
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8279 |
version |
12562 | 8280 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.579 2013-03-28 15:04:49 cg Exp $' |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8281 |
! |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
8282 |
|
8952
7742c63ff6f5
catch halts in: #showSelection:
Claus Gittinger <cg@exept.de>
parents:
8745
diff
changeset
|
8283 |
version_CVS |
12562 | 8284 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.579 2013-03-28 15:04:49 cg Exp $' |
10628 | 8285 |
! |
8286 |
||
8287 |
version_SVN |
|
8288 |
^ '§Id: DebugView.st 7818 2011-08-18 11:42:39Z vranyj1 §' |
|
4122 | 8289 |
! ! |
8290 |
||
12106 | 8291 |
|
4122 | 8292 |
DebugView initialize! |