author | Claus Gittinger <cg@exept.de> |
Mon, 19 Mar 2012 17:41:24 +0100 | |
changeset 11443 | 6e83697ab8c9 |
parent 11391 | 730b258a005f |
child 11457 | b304a867b5e0 |
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 |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
15 |
instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
16 |
receiverInspector contextInspector contextArray selectedContext |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
17 |
catchBlock grabber mayProceed traceView tracing bigStep |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
18 |
skipLineNr steppedContextAddress abortButton terminateButton |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
19 |
continueButton stepButton nextButton nextOverButton nextOutButton |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
20 |
sendButton returnButton restartButton exclusive inspecting |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
21 |
nChainShown inspectedProcess updateProcess stopButton |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
22 |
updateButton defineButton monitorToggle stepping |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
23 |
steppedContextLineno stepForReturn actualContext inWrap |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
24 |
stackInspector steppedContext wrapperContext verboseBacktrace |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
25 |
firstContext stepHow cachable currentMethod ignoreBreakpoints |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
26 |
stepUntilEntering lastStepUntilEntering |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
27 |
lastSelectionInReceiverInspector lastSelectionInContextInspector |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
28 |
canShowMore exitAbort reportButton setOfHiddenCallingSelectors |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
29 |
isStoppedAtHaltOrBreakPoint exceptionInfoLabel methodCodeToggle |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
30 |
methodCodeToggleSelectionHolder |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
31 |
isStoppedAtBreakPointWithParameter breakPointParameter' |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
32 |
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
33 |
DebuggingDebugger DefaultDebuggerBackgroundColor |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
34 |
InitialNChainShown IgnoredHalts ShowThreadID LastIgnoreHaltNTimes |
11391 | 35 |
LastIgnoreHaltDuration LastExtent LastOrigin RememberedCallChain' |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
36 |
poolDictionaries:'' |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
37 |
category:'Interface-Debugger' |
0 | 38 |
! |
39 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
40 |
Object subclass:#IgnoredHaltOrBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
41 |
instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
42 |
classVariableNames:'' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
43 |
poolDictionaries:'' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
44 |
privateIn:DebugView |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
45 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
46 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
47 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredHalt |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
48 |
instanceVariableNames:'weakMethodHolder lineNumber' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
49 |
classVariableNames:'' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
50 |
poolDictionaries:'' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
51 |
privateIn:DebugView |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
52 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
53 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
54 |
DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
55 |
instanceVariableNames:'parameter' |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
56 |
classVariableNames:'' |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
57 |
poolDictionaries:'' |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
58 |
privateIn:DebugView |
8170 | 59 |
! |
60 |
||
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
61 |
!DebugView class methodsFor:'documentation'! |
29 | 62 |
|
63 |
copyright |
|
64 |
" |
|
65 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
11210 | 66 |
All Rights Reserved |
29 | 67 |
|
68 |
This software is furnished under a license and may be used |
|
69 |
only in accordance with the terms of that license and with the |
|
70 |
inclusion of the above copyright notice. This software may not |
|
71 |
be provided or otherwise made available to, or used by, any |
|
72 |
other person. No title to or ownership of the software is |
|
73 |
hereby transferred. |
|
74 |
" |
|
75 |
! |
|
0 | 76 |
|
29 | 77 |
documentation |
78 |
" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
79 |
This class implements a graphical debugger interface. |
29 | 80 |
The debugger usually sits on top of the faulting process, |
10205 | 81 |
taking over its event processing. |
2358 | 82 |
(this is different from other Smalltalk debuggers, which control |
83 |
the debuggee as a separate process. Consider this an historic |
|
84 |
leftover - the debugger was one of the first applications written for |
|
85 |
ST/X; however, why should we change it without a particular need ...). |
|
86 |
||
87 |
Only the 'stopped' debugged process is affected; |
|
29 | 88 |
other processes continue to respond to events. |
89 |
||
90 |
The one exception is when an error occurs within the dispatcher process |
|
91 |
or in one of the eventhandler processes - in this case, the debugger |
|
92 |
will sit on an exclusive display connection. |
|
93 |
||
94 |
The whole debugging will be changed, once the required process primitives |
|
95 |
are available, which allow control of another processes execution |
|
96 |
(i.e. single-step, restart & return). The setup will be changed then, |
|
97 |
to have the debugger control the debuggee (i.e. two processes) |
|
35 | 98 |
|
99 |
See additional information in 'doc/misc/debugger.doc'. |
|
53 | 100 |
|
10205 | 101 |
Notice: |
11210 | 102 |
the DebugView class caches the last used debugger in a class |
103 |
variable. It may happen, that a malfunctioning debugger (for example, |
|
104 |
a halfway destroyed one) is kept there. You will notice this, if a |
|
105 |
debugger comes up without showing any contents. In this case, close |
|
106 |
(or destroy) the broken debugView, and execute |
|
107 |
Debugger newDebugger |
|
108 |
which removes the cached debugger and forces creation of a new one the |
|
109 |
next time. This is a temporary workaround - the debugger will be fixed to |
|
110 |
avoid this problem. |
|
111 |
You also have to remove the cached debugger, if you change the debugger's |
|
112 |
initialization code (buttons, menu, etc.) and you want the new code to become |
|
113 |
effective. |
|
508 | 114 |
|
115 |
[author:] |
|
11210 | 116 |
Claus Gittinger |
508 | 117 |
|
118 |
[see also:] |
|
11210 | 119 |
Exception Signal |
120 |
Process |
|
29 | 121 |
" |
122 |
! ! |
|
0 | 123 |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
124 |
!DebugView class methodsFor:'initialization'! |
243 | 125 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
126 |
initialize |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
127 |
InitialNChainShown := 50. |
8148 | 128 |
"/ DefaultDebuggerBackgroundColor := nil. |
3387 | 129 |
"/ DefaultDebuggerBackgroundColor := Color red lightened. |
130 |
"/ DefaultDebuggerBackgroundColor := Color blue lightened lightened. |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
131 |
|
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
132 |
"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
|
133 |
"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
|
134 |
! |
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
135 |
|
243 | 136 |
reinitialize |
7822 | 137 |
"reinitialize after an image-restart" |
138 |
||
243 | 139 |
self newDebugger |
140 |
! ! |
|
141 |
||
10203 | 142 |
!DebugView class methodsFor:'cleanup'! |
143 |
||
10205 | 144 |
lowSpaceCleanup |
10203 | 145 |
"in low memory situations, give up cached debuggers" |
146 |
||
147 |
CachedDebugger := nil. |
|
148 |
CachedExclusive := nil. |
|
149 |
OpenDebuggers := nil. |
|
11391 | 150 |
RememberedCallChain := nil. |
10203 | 151 |
|
152 |
" |
|
153 |
DebugView lowSpaceCleanup |
|
154 |
" |
|
155 |
||
11391 | 156 |
"Modified: / 08-03-2012 / 01:30:21 / cg" |
10203 | 157 |
! |
158 |
||
159 |
newDebugger |
|
160 |
"force creation of a new debugger (give up cached debuggers)" |
|
161 |
||
162 |
CachedDebugger := nil. |
|
163 |
CachedExclusive := nil. |
|
164 |
OpenDebuggers := nil. |
|
165 |
||
166 |
(Debugger isBehavior and:[Debugger name = #DebugView]) ifTrue:[ |
|
11210 | 167 |
Debugger := self |
10203 | 168 |
]. |
169 |
||
170 |
" |
|
171 |
DebugView newDebugger |
|
172 |
" |
|
173 |
! ! |
|
174 |
||
175 |
!DebugView class methodsFor:'defaults'! |
|
176 |
||
177 |
defaultIcon |
|
178 |
"return the browsers default window icon" |
|
179 |
||
180 |
<resource: #programImage> |
|
181 |
||
10205 | 182 |
^ ToolbarIconLibrary debug22x22Icon |
10203 | 183 |
"/ ^ ToolbarIconLibrary debugIt20x20Icon |
184 |
||
185 |
"Modified: / 11-02-2007 / 11:47:20 / cg" |
|
186 |
! |
|
187 |
||
188 |
defaultIconForAboutBox |
|
189 |
<resource: #programImage> |
|
190 |
||
10205 | 191 |
^ ToolbarIconLibrary debug22x22IconForBlackBackgound |
10203 | 192 |
! |
193 |
||
194 |
defaultVerboseBacktrace |
|
195 |
<resource: #obsolete> |
|
196 |
self obsoleteMethodWarning. |
|
197 |
^ UserPreferences current verboseBacktraceInDebugger |
|
198 |
||
199 |
"Created: 11.1.1997 / 12:14:35 / cg" |
|
200 |
! |
|
201 |
||
202 |
defaultVerboseBacktrace:aBoolean |
|
203 |
<resource: #obsolete> |
|
204 |
self obsoleteMethodWarning. |
|
205 |
UserPreferences current verboseBacktraceInDebugger:aBoolean |
|
206 |
! |
|
207 |
||
208 |
updateStyleCache |
|
209 |
"extract values from the styleSheet and cache them in class variables" |
|
210 |
||
211 |
<resource: #style (#'debugView.viewBackgroundColor')> |
|
212 |
||
213 |
DefaultDebuggerBackgroundColor := StyleSheet at:#'debugView.viewBackgroundColor' |
|
214 |
||
215 |
"Modified: / 17.11.2001 / 17:31:42 / cg" |
|
216 |
! ! |
|
217 |
||
218 |
!DebugView class methodsFor:'ignoring halts'! |
|
219 |
||
220 |
haltIgnoreInformationFor:haltingMethod atLineNr:lineNrInHaltingMethod |
|
221 |
"the information (if any) about the ignore-state of a halt" |
|
222 |
||
223 |
IgnoredHalts isNil ifTrue:[^ nil]. |
|
224 |
||
10205 | 225 |
IgnoredHalts do:[:ign | |
11210 | 226 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
227 |
^ ign |
|
228 |
]. |
|
10203 | 229 |
]. |
230 |
^ nil. |
|
231 |
! |
|
232 |
||
233 |
hasIgnoredHalts |
|
234 |
self removeInactiveIgnores. |
|
235 |
^ IgnoredHalts notEmptyOrNil |
|
236 |
! |
|
237 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
238 |
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
|
239 |
"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
|
240 |
or until some time has elapsed. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
241 |
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
|
242 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
243 |
|oldEntry ign| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
244 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
245 |
IgnoredHalts notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
246 |
self removeInactiveIgnores. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
247 |
oldEntry := IgnoredHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
248 |
detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
249 |
ifNone:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
250 |
oldEntry notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
251 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
252 |
] |
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 |
(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
|
256 |
IgnoredHalts isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
257 |
IgnoredHalts := OrderedCollection new. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
258 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
259 |
ign := IgnoredHalt new breakpointWithParameter:parameterOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
260 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
261 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
262 |
ign ignoreCount:countOrNil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
263 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
264 |
(dTOrNil notNil) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
265 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
266 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
267 |
untilShiftKey == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
268 |
ign ignoreUntilShiftKeyPressed:true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
269 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
270 |
IgnoredHalts add:ign. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
271 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
272 |
Smalltalk changed:#ignoredHalts. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
273 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
274 |
"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
|
275 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
276 |
|
11210 | 277 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
10203 | 278 |
"remember to ignore a halt in some method for some number of invocations |
279 |
or until some time has elapsed. |
|
280 |
With nil count and time arguments, such an ignored halt is reactivated" |
|
281 |
||
282 |
|oldEntry ign| |
|
283 |
||
284 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 285 |
self removeInactiveIgnores. |
286 |
oldEntry := IgnoredHalts |
|
287 |
detect:[:ign | ign isForMethod:haltingMethod line:lineNrOfHalt] |
|
288 |
ifNone:nil. |
|
289 |
oldEntry notNil ifTrue:[ |
|
290 |
IgnoredHalts remove:oldEntry ifAbsent:[]. |
|
291 |
] |
|
292 |
]. |
|
293 |
||
294 |
(countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[ |
|
295 |
IgnoredHalts isNil ifTrue:[ |
|
296 |
IgnoredHalts := OrderedCollection new. |
|
297 |
]. |
|
298 |
ign := IgnoredHalt new method:haltingMethod lineNumber:lineNrOfHalt. |
|
299 |
||
300 |
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[ |
|
301 |
ign ignoreCount:countOrNil. |
|
302 |
]. |
|
303 |
(dTOrNil notNil) ifTrue:[ |
|
304 |
ign ignoreEndTime:(Timestamp now + dTOrNil). |
|
305 |
]. |
|
306 |
untilShiftKey == true ifTrue:[ |
|
307 |
ign ignoreUntilShiftKeyPressed:true. |
|
308 |
]. |
|
309 |
IgnoredHalts add:ign. |
|
10203 | 310 |
]. |
311 |
Smalltalk changed:#ignoredHalts. |
|
312 |
||
11210 | 313 |
"Created: / 27-01-2012 / 11:33:38 / cg" |
10203 | 314 |
! |
315 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
316 |
isBreakpointToBeIgnoredForParameter:parameter modifyEntryCount:modifyCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
317 |
"/ should a breakpoint be ignored ? |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
318 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
319 |
IgnoredHalts isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
320 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
321 |
"/ 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
|
322 |
IgnoredHalts do:[:ign | |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
323 |
(ign isForBreakpointWithParameter:parameter) ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
324 |
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
|
325 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
326 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
327 |
ign isHaltIgnored ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
328 |
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
|
329 |
IgnoredHalts remove:ign ifAbsent:[]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
330 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
331 |
^ true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
332 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
333 |
]. |
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 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
336 |
IgnoredHalts isEmpty ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
337 |
IgnoredHalts := nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
338 |
]. |
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 |
^ false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
341 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
342 |
"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
|
343 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
344 |
|
10203 | 345 |
isHaltToBeIgnored |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
346 |
|c sender haltingMethod lineNrInHaltingMethod breakpointParameter| |
10203 | 347 |
|
348 |
"/ should a halt be ignored ? |
|
349 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
350 |
||
351 |
"/ look for a breakpoint-wrapper's context |
|
352 |
c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil. |
|
353 |
c notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
354 |
(c receiver isKindOf:NoHandlerError) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
355 |
c := c sender findNextContextWithSelector:#doRaise or:nil or:nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
356 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
357 |
(c receiver isKindOf:BreakPointInterrupt) ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
358 |
c := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
359 |
] ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
360 |
[ ((sender := c sender) receiver isKindOf:BreakPointInterrupt) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
361 |
or:[ sender receiver == BreakPointInterrupt ]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
362 |
c := sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
363 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
364 |
[ (sender := c sender) isBlockContext ] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
365 |
c := sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
366 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
367 |
sender := nil. "/ avoid keeping a reference to this context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
368 |
]. |
10203 | 369 |
]. |
370 |
||
371 |
c isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
372 |
"/ look for halts or explicit breakpoints |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
373 |
c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
374 |
c isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
375 |
c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
376 |
c isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
377 |
^ false |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
378 |
]. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
379 |
breakpointParameter := c argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
380 |
(self isBreakpointToBeIgnoredForParameter:breakpointParameter modifyEntryCount:true) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
381 |
^ true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
382 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
383 |
]. |
10203 | 384 |
]. |
385 |
||
386 |
c := c sender. |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
387 |
"/ a code-breakpoint ? |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
388 |
(c receiver isKindOf:Breakpoint) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
389 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
390 |
]. |
10203 | 391 |
haltingMethod := c method. |
392 |
||
393 |
haltingMethod isWrapped ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
394 |
lineNrInHaltingMethod := 1. |
10203 | 395 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
396 |
lineNrInHaltingMethod := c lineNumber. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
397 |
"/ Transcript showCR:c. |
10205 | 398 |
]. |
399 |
||
400 |
^ self |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
401 |
isHaltToBeIgnoredIn:haltingMethod |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
402 |
atLineNr:lineNrInHaltingMethod |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
403 |
modifyEntryCount:true. |
10203 | 404 |
|
405 |
"Created: / 22-10-2010 / 12:09:53 / cg" |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
406 |
"Modified: / 06-03-2012 / 12:54:09 / cg" |
10203 | 407 |
! |
408 |
||
409 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod |
|
410 |
^ self |
|
11210 | 411 |
isHaltToBeIgnoredIn:haltingMethod |
412 |
atLineNr:lineNrInHaltingMethod |
|
413 |
modifyEntryCount:false |
|
10203 | 414 |
! |
415 |
||
416 |
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod modifyEntryCount:modifyCount |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
417 |
"should a halt be ignored ?" |
10203 | 418 |
|
419 |
IgnoredHalts isNil ifTrue:[^ false]. |
|
420 |
||
421 |
"/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString. |
|
10205 | 422 |
IgnoredHalts do:[:ign | |
11210 | 423 |
(ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[ |
11364
af95026ebbda
changed: #isHaltToBeIgnoredIn:atLineNr:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11305
diff
changeset
|
424 |
Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString. |
11210 | 425 |
Transcript show:' ('; show:ign; showCR:')'. |
11364
af95026ebbda
changed: #isHaltToBeIgnoredIn:atLineNr:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11305
diff
changeset
|
426 |
|
11210 | 427 |
modifyCount ifTrue:[ ign decrementIgnoreCount ]. |
428 |
ign isHaltIgnored ifFalse:[ |
|
429 |
Transcript showCR:'Debugger [info]: no longer ignore halt in ', haltingMethod whoString. |
|
430 |
IgnoredHalts remove:ign ifAbsent:[]. |
|
431 |
]. |
|
432 |
^ true. |
|
433 |
]. |
|
10205 | 434 |
]. |
435 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
436 |
IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not]. |
10203 | 437 |
IgnoredHalts isEmpty ifTrue:[ |
11210 | 438 |
IgnoredHalts := nil. |
10203 | 439 |
]. |
440 |
||
441 |
^ false. |
|
442 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
443 |
"Modified (comment): / 06-03-2012 / 12:51:43 / cg" |
10203 | 444 |
! |
445 |
||
446 |
removeInactiveIgnores |
|
447 |
IgnoredHalts notNil ifTrue:[ |
|
11210 | 448 |
IgnoredHalts := IgnoredHalts select:[:i | i isActive]. |
10203 | 449 |
]. |
450 |
! |
|
451 |
||
452 |
stopIgnoringHalts |
|
453 |
"forget about all ignored halts" |
|
454 |
||
455 |
IgnoredHalts := nil. |
|
456 |
Smalltalk changed:#ignoredHalts. |
|
457 |
! ! |
|
458 |
||
459 |
!DebugView class methodsFor:'instance creation / entering'! |
|
0 | 460 |
|
2421 | 461 |
enter |
462 |
"enter a debugger" |
|
463 |
||
5455 | 464 |
<context: #return> |
465 |
||
10205 | 466 |
^ self |
11210 | 467 |
enter:thisContext sender |
468 |
withMessage:'debugger entered' |
|
469 |
mayProceed:true. |
|
10205 | 470 |
! |
471 |
||
472 |
enter:aContext withMessage:aString |
|
2355 | 473 |
"enter a debugger" |
474 |
||
5455 | 475 |
<context: #return> |
476 |
||
2355 | 477 |
^ self |
11210 | 478 |
enter:aContext |
479 |
withMessage:aString |
|
480 |
mayProceed:true |
|
2355 | 481 |
! |
482 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
483 |
enter:aContext withMessage:aString mayProceed:mayProceed |
53 | 484 |
"enter a debugger; if this is a recursive invocation, enter |
485 |
a MiniDebugger instead. |
|
486 |
This is the standard way of entering the debugger; |
|
487 |
sent from error- and halt messages." |
|
0 | 488 |
|
3447 | 489 |
<context: #return> |
490 |
||
3702 | 491 |
|active| |
93 | 492 |
|
57 | 493 |
StepInterruptPending := nil. |
3998 | 494 |
ControlInterrupt handle:[:ex | |
11210 | 495 |
'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR. |
496 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
497 |
ex proceed |
|
3998 | 498 |
] do:[ |
11210 | 499 |
" |
500 |
well, it could be a stepping or sending debugger up there; |
|
501 |
in this case, return to it. This happens, when a stepping process |
|
502 |
runs into an error (for example, a halt). In this case, we want the |
|
503 |
stepping debugger to come up again instead of a new one. |
|
504 |
" |
|
505 |
OpenDebuggers notNil ifTrue:[ |
|
506 |
active := Processor activeProcess. |
|
507 |
OpenDebuggers do:[:aDebugger | |
|
508 |
(aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[ |
|
509 |
(aDebugger inspectedProcess == active) ifTrue:[ |
|
510 |
aDebugger device isOpen ifTrue:[ |
|
511 |
"/ 'entering stepping debugger again' printNL. |
|
512 |
aDebugger unstep. |
|
513 |
aDebugger setLabelFor:aString in:active. |
|
514 |
aDebugger mayProceed:mayProceed. |
|
515 |
^ aDebugger enter:aContext select:nil. |
|
516 |
] |
|
517 |
] |
|
518 |
] |
|
519 |
] |
|
520 |
]. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
521 |
]. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
522 |
^ self enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
526 | 523 |
|
3447 | 524 |
"Modified: / 18.11.2001 / 00:48:03 / cg" |
53 | 525 |
! |
526 |
||
8347 | 527 |
enterException:ex |
528 |
"enter a debugger; if this is a recursive invocation, enter |
|
529 |
a MiniDebugger instead. |
|
530 |
This is the standard way of entering the debugger; |
|
531 |
sent from error- and halt messages." |
|
532 |
||
533 |
^ self |
|
11210 | 534 |
enter:ex returnableSuspendedContext |
535 |
withMessage:ex descriptionForDebugger |
|
536 |
mayProceed:(ex mayProceed). |
|
8347 | 537 |
! |
538 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
539 |
enterUnconditional:aContext withMessage:aString mayProceed:mayProceed |
266 | 540 |
"enter a debugger - do not check for recursive invocation" |
541 |
||
5455 | 542 |
<context: #return> |
543 |
||
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
544 |
|aDebugger| |
266 | 545 |
|
546 |
StepInterruptPending := nil. |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
547 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
548 |
"/ ignore halts & breakpoints while setting up the debugger |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
549 |
"/ to avoid recursive debugging ... |
3447 | 550 |
ControlInterrupt handle:[:ex | |
11210 | 551 |
'DebugView [info]: breakpoint in debugger setup ignored [enterUncond.]' infoPrintCR. |
552 |
('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR. |
|
553 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
554 |
] do:[ |
11210 | 555 |
aDebugger := self new. |
3447 | 556 |
]. |
557 |
||
558 |
aDebugger isNil ifTrue:[ |
|
11210 | 559 |
'DebugView [error]: cannot open debugger' errorPrintCR. |
560 |
'DebugView [error]: Exception: ' errorPrint. aString errorPrintCR. |
|
561 |
mayProceed ifTrue:[ |
|
562 |
(Dialog confirm:'Error/Breakpoint cought.\\Press Continue or Abort.' withCRs |
|
563 |
yesLabel:'Continue' noLabel:'Abort') |
|
564 |
ifTrue:[ |
|
565 |
^ nil |
|
566 |
]. |
|
567 |
] ifFalse:[ |
|
568 |
self information:'Error cought.\\Press OK to abort the operation.' withCRs. |
|
569 |
]. |
|
570 |
AbortOperationRequest raise. |
|
571 |
"not reached" |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
572 |
]. |
3447 | 573 |
|
574 |
aDebugger mayProceed:mayProceed. |
|
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
575 |
aDebugger setLabelFor:aString in:Processor activeProcess. |
3447 | 576 |
aDebugger enter:aContext select:nil. |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
577 |
^ nil. |
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
578 |
|
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
579 |
" |
11210 | 580 |
nil halt |
5911
a1444e8c5061
#enter:... returns the value for proceed
Stefan Vogel <sv@exept.de>
parents:
5904
diff
changeset
|
581 |
" |
1244
413709b30fd2
more care for breakpoints in debugger
Claus Gittinger <cg@exept.de>
parents:
1240
diff
changeset
|
582 |
|
3447 | 583 |
"Modified: / 18.11.2001 / 00:29:23 / cg" |
266 | 584 |
! |
585 |
||
6430 | 586 |
enterWithMessage:message |
587 |
"enter a debugger" |
|
588 |
||
589 |
<context: #return> |
|
590 |
||
10205 | 591 |
^ self |
11210 | 592 |
enter:(thisContext sender) |
593 |
withMessage:message |
|
594 |
mayProceed:true. |
|
6430 | 595 |
! |
596 |
||
266 | 597 |
new |
10205 | 598 |
"return a new DebugView. |
2358 | 599 |
- return a cached debugger if it already exists. |
600 |
Also, care for remote displays on which no debugger is wanted |
|
601 |
(ask with mayOpenDebugger) - if so, open on the default screen." |
|
602 |
||
603 |
|debugger currentScreen debuggerDevice| |
|
604 |
||
605 |
currentScreen := Screen current. |
|
14 | 606 |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
607 |
currentScreen notNil ifTrue:[ |
11210 | 608 |
(currentScreen suppressDebugger) ifTrue:[ |
609 |
"/ no debuggers with that device - show an alertBox which aborts... |
|
610 |
^ nil. |
|
611 |
]. |
|
612 |
(currentScreen mayOpenDebugger) ifFalse:[ |
|
613 |
"/ no debugger on that device - but on the main screen |
|
614 |
currentScreen := Screen default. |
|
615 |
]. |
|
3030
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
616 |
]. |
5adb33d5111d
fixed devices mayOpenDebugger / suppressDebugger handling.
Michael Beyl <mb@exept.de>
parents:
2963
diff
changeset
|
617 |
|
266 | 618 |
" |
10205 | 619 |
need a blocking debugger if no processes or |
620 |
or if its a timing/interrupt process |
|
266 | 621 |
(because otherwise we would not get any events here ... |
622 |
" |
|
623 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
11210 | 624 |
((debugger := CachedExclusive) isNil |
625 |
or:[debugger device ~~ currentScreen |
|
626 |
or:[currentScreen isNil |
|
627 |
or:[currentScreen isOpen not]]]) ifTrue:[ |
|
628 |
debugger := self newExclusive |
|
629 |
]. |
|
630 |
CachedExclusive := nil. |
|
266 | 631 |
] ifFalse:[ |
11210 | 632 |
CachedDebugger notNil ifTrue:[ |
633 |
(CachedDebugger device ~~ currentScreen |
|
634 |
or:[currentScreen isNil |
|
635 |
or:[currentScreen isOpen not |
|
636 |
or:[CachedDebugger class ~~ self]]]) ifTrue:[ |
|
637 |
CachedDebugger := nil |
|
638 |
] |
|
639 |
]. |
|
640 |
||
641 |
(debugger := CachedDebugger) notNil ifTrue:[ |
|
642 |
CachedDebugger := nil. |
|
643 |
] ifFalse:[ |
|
644 |
debuggerDevice := currentScreen. |
|
645 |
debuggerDevice isNil ifTrue:[ |
|
646 |
"/ use the default display |
|
647 |
debuggerDevice := Screen default. |
|
648 |
]. |
|
649 |
(debuggerDevice isNil |
|
650 |
or:[debuggerDevice isOpen not |
|
651 |
"/ or:[debuggerDevice mayOpenDebugger not] |
|
652 |
]) ifTrue:[ |
|
653 |
"/ no debugger |
|
654 |
^ nil. |
|
655 |
]. |
|
656 |
||
657 |
Screen currentScreenQuerySignal answer:debuggerDevice |
|
658 |
do:[ |
|
659 |
debugger := super new. |
|
660 |
]. |
|
661 |
debugger label:'Debugger'. |
|
662 |
debugger icon:self defaultIcon. |
|
663 |
] |
|
266 | 664 |
]. |
73 | 665 |
^ debugger |
875 | 666 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
667 |
"Modified: 31.7.1997 / 21:20:27 / cg" |
73 | 668 |
! |
0 | 669 |
|
266 | 670 |
newExclusive |
671 |
"return a debugger for exclusive display access" |
|
672 |
||
673 |
|debugger| |
|
105 | 674 |
|
266 | 675 |
debugger := super new. |
676 |
debugger label:'Debugger'. |
|
875 | 677 |
debugger icon:self defaultIcon. |
266 | 678 |
debugger exclusive:true. |
679 |
^ debugger |
|
875 | 680 |
|
681 |
"Modified: 1.1.1970 / 23:27:06 / cg" |
|
105 | 682 |
! |
683 |
||
29 | 684 |
openOn:aProcess |
685 |
"start a debugger on aProcess |
|
686 |
(actually not more than a good-looking inspector)" |
|
15 | 687 |
|
52 | 688 |
|aDebugger label nm| |
15 | 689 |
|
690 |
aDebugger := super new. |
|
875 | 691 |
aDebugger icon:self defaultIcon. |
29 | 692 |
aProcess notNil ifTrue:[ |
11210 | 693 |
nm := aProcess name. |
694 |
nm notNil ifTrue:[ |
|
695 |
nm := (nm contractTo:17) , '-' , aProcess id printString |
|
696 |
] ifFalse:[ |
|
697 |
nm := aProcess id printString |
|
698 |
]. |
|
699 |
label := 'Debugger [' , nm , ']'. |
|
29 | 700 |
] ifFalse:[ |
11210 | 701 |
label := 'no process' |
29 | 702 |
]. |
1114 | 703 |
aDebugger label:label iconLabel:'Debugger'. |
15 | 704 |
aDebugger openOn:aProcess. |
705 |
^ nil |
|
875 | 706 |
|
1114 | 707 |
"Modified: 4.4.1997 / 16:22:36 / cg" |
126 | 708 |
! ! |
709 |
||
3269 | 710 |
!DebugView class methodsFor:'menu specs'! |
711 |
||
712 |
menuSpec |
|
713 |
"This resource specification was automatically generated |
|
714 |
by the MenuEditor of ST/X." |
|
715 |
||
716 |
"Do not manually edit this!! If it is corrupted, |
|
717 |
the MenuEditor may not be able to read the specification." |
|
718 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
719 |
|
3269 | 720 |
" |
721 |
MenuEditor new openOnClass:DebugView andSelector:#menuSpec |
|
722 |
(Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp |
|
723 |
" |
|
724 |
||
725 |
<resource: #menu> |
|
726 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
727 |
^ |
5875 | 728 |
#(Menu |
11210 | 729 |
( |
730 |
(MenuItem |
|
731 |
label: 'File' |
|
732 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
733 |
submenu: |
11210 | 734 |
(Menu |
735 |
( |
|
736 |
(MenuItem |
|
737 |
enabled: canSendEmail |
|
738 |
label: 'Report a Bug via eMail...' |
|
739 |
itemValue: doOpenReportMailApp |
|
740 |
translateLabel: true |
|
741 |
) |
|
742 |
(MenuItem |
|
743 |
label: '-' |
|
744 |
) |
|
745 |
(MenuItem |
|
746 |
label: 'Exit' |
|
747 |
itemValue: closeRequest |
|
748 |
translateLabel: true |
|
749 |
isVisible: isInspecting |
|
750 |
) |
|
751 |
(MenuItem |
|
752 |
label: 'Close Debugger and Abort' |
|
753 |
itemValue: closeRequest |
|
754 |
translateLabel: true |
|
755 |
isVisible: isNotInspecting |
|
756 |
) |
|
757 |
) |
|
758 |
nil |
|
759 |
nil |
|
760 |
) |
|
761 |
) |
|
762 |
(MenuItem |
|
763 |
label: 'View' |
|
764 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
765 |
submenu: |
11210 | 766 |
(Menu |
767 |
( |
|
768 |
(MenuItem |
|
769 |
enabled: canShowMore |
|
770 |
label: 'Show More WalkBack' |
|
771 |
itemValue: showMore |
|
772 |
translateLabel: true |
|
773 |
) |
|
774 |
(MenuItem |
|
775 |
label: 'Show Verbose WalkBack' |
|
776 |
itemValue: toggleVerboseWalkback |
|
777 |
translateLabel: true |
|
778 |
isVisible: showingDenseWalkback |
|
779 |
) |
|
780 |
(MenuItem |
|
781 |
label: 'Show Dense WalkBack' |
|
782 |
itemValue: toggleVerboseWalkback |
|
783 |
translateLabel: true |
|
784 |
isVisible: showingVerboseWalkback |
|
785 |
) |
|
786 |
(MenuItem |
|
787 |
label: '-' |
|
788 |
) |
|
789 |
(MenuItem |
|
790 |
label: 'Raise Debugger when Entering' |
|
791 |
itemValue: autoRaiseView: |
|
792 |
translateLabel: true |
|
793 |
indication: autoRaiseView |
|
794 |
) |
|
795 |
(MenuItem |
|
796 |
label: '-' |
|
797 |
) |
|
798 |
(MenuItem |
|
799 |
label: 'Settings...' |
|
800 |
itemValue: openSettingsDialog |
|
801 |
translateLabel: true |
|
802 |
) |
|
803 |
) |
|
804 |
nil |
|
805 |
nil |
|
806 |
) |
|
807 |
) |
|
808 |
(MenuItem |
|
809 |
label: 'Process' |
|
810 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
811 |
submenu: |
11210 | 812 |
(Menu |
813 |
( |
|
814 |
(MenuItem |
|
815 |
label: 'Continue' |
|
816 |
itemValue: doContinue |
|
817 |
translateLabel: true |
|
818 |
) |
|
819 |
(MenuItem |
|
820 |
label: 'Next (Line-Step)' |
|
821 |
itemValue: doNext |
|
822 |
translateLabel: true |
|
823 |
) |
|
824 |
(MenuItem |
|
825 |
label: 'Step' |
|
826 |
itemValue: doStep |
|
827 |
translateLabel: true |
|
828 |
) |
|
829 |
(MenuItem |
|
830 |
label: '-' |
|
831 |
) |
|
832 |
(MenuItem |
|
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
833 |
label: 'Change Priority...' |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
834 |
itemValue: doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
835 |
translateLabel: true |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
836 |
) |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
837 |
(MenuItem |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
838 |
label: '-' |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
839 |
) |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
840 |
(MenuItem |
11210 | 841 |
label: 'Abort' |
842 |
itemValue: doAbort |
|
843 |
translateLabel: true |
|
844 |
) |
|
845 |
(MenuItem |
|
846 |
enabled: abortAllIsHandled |
|
847 |
label: 'Abort All' |
|
848 |
itemValue: doAbortAll |
|
849 |
translateLabel: true |
|
850 |
) |
|
851 |
(MenuItem |
|
852 |
label: '-' |
|
853 |
) |
|
854 |
(MenuItem |
|
855 |
label: 'Terminate' |
|
856 |
itemValue: doTerminate |
|
857 |
translateLabel: true |
|
858 |
) |
|
859 |
) |
|
860 |
nil |
|
861 |
nil |
|
862 |
) |
|
863 |
) |
|
864 |
(MenuItem |
|
865 |
label: 'Context' |
|
866 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
867 |
submenu: |
11210 | 868 |
(Menu |
869 |
( |
|
870 |
(MenuItem |
|
871 |
enabled: canReturn |
|
872 |
label: 'Return' |
|
873 |
itemValue: doReturn |
|
874 |
translateLabel: true |
|
875 |
) |
|
876 |
(MenuItem |
|
877 |
enabled: canRestart |
|
878 |
label: 'Restart' |
|
879 |
itemValue: doRestart |
|
880 |
translateLabel: true |
|
881 |
) |
|
882 |
(MenuItem |
|
883 |
label: '-' |
|
884 |
) |
|
885 |
(MenuItem |
|
886 |
enabled: hasContextSelected |
|
887 |
label: 'Inspect' |
|
888 |
itemValue: inspectContext |
|
889 |
translateLabel: true |
|
890 |
) |
|
891 |
(MenuItem |
|
892 |
label: 'Copy WalkBack Text' |
|
893 |
itemValue: copyWalkbackText |
|
894 |
translateLabel: true |
|
895 |
) |
|
896 |
(MenuItem |
|
897 |
label: 'Bookmark Method in SystemBrowser' |
|
898 |
itemValue: addBrowserBookmark |
|
899 |
translateLabel: true |
|
900 |
) |
|
11391 | 901 |
(MenuItem |
902 |
label: '-' |
|
903 |
) |
|
904 |
(MenuItem |
|
905 |
label: 'Remember Callchain & Highlight on Next Entry' |
|
906 |
itemValue: rememberCallchain |
|
907 |
translateLabel: true |
|
908 |
) |
|
909 |
(MenuItem |
|
910 |
label: 'Clear Remembered Callchain' |
|
911 |
itemValue: clearRememberedCallchain |
|
912 |
translateLabel: true |
|
913 |
) |
|
11210 | 914 |
) |
915 |
nil |
|
916 |
nil |
|
917 |
) |
|
918 |
) |
|
919 |
(MenuItem |
|
920 |
label: 'Class' |
|
921 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
922 |
submenu: |
11210 | 923 |
(Menu |
924 |
( |
|
925 |
(MenuItem |
|
926 |
enabled: canBrowseImplementingClass |
|
927 |
label: 'Browse Implementing Class' |
|
928 |
itemValue: browseImplementingClass |
|
929 |
translateLabel: true |
|
930 |
) |
|
931 |
(MenuItem |
|
932 |
enabled: canBrowseReceiversClass |
|
933 |
label: 'Browse Receivers Class' |
|
934 |
itemValue: browseReceiversClass |
|
935 |
translateLabel: true |
|
936 |
) |
|
937 |
(MenuItem |
|
938 |
label: '-' |
|
939 |
) |
|
940 |
(MenuItem |
|
941 |
enabled: canBrowseClassHierarchy |
|
942 |
label: 'Browse Receivers Class Hierarchy' |
|
943 |
itemValue: browseClassHierarchy |
|
944 |
translateLabel: true |
|
945 |
) |
|
946 |
(MenuItem |
|
947 |
enabled: canBrowseFullClassProtocol |
|
948 |
label: 'Browse Receivers Full Protocol' |
|
949 |
itemValue: browseFullClassProtocol |
|
950 |
translateLabel: true |
|
951 |
) |
|
952 |
(MenuItem |
|
953 |
label: '-' |
|
954 |
) |
|
955 |
(MenuItem |
|
956 |
enabled: canBrowseProcessesApplication |
|
957 |
label: 'Browse Application Class' |
|
958 |
itemValue: browseProcessesApplication |
|
959 |
translateLabel: true |
|
960 |
) |
|
961 |
) |
|
962 |
nil |
|
963 |
nil |
|
964 |
) |
|
965 |
) |
|
966 |
(MenuItem |
|
967 |
label: 'Selector' |
|
968 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
969 |
submenu: |
11210 | 970 |
(Menu |
971 |
( |
|
972 |
(MenuItem |
|
973 |
label: 'Browse Implementors...' |
|
974 |
itemValue: browseImplementorsOf |
|
975 |
translateLabel: true |
|
976 |
) |
|
977 |
(MenuItem |
|
978 |
label: 'Browse Senders...' |
|
979 |
itemValue: browseSendersOf |
|
980 |
translateLabel: true |
|
981 |
) |
|
982 |
(MenuItem |
|
983 |
label: '-' |
|
984 |
) |
|
985 |
(MenuItem |
|
986 |
enabled: canDefineMethod |
|
987 |
label: 'Define Missing Method' |
|
988 |
itemValue: doDefineMethod |
|
989 |
translateLabel: true |
|
990 |
) |
|
991 |
) |
|
992 |
nil |
|
993 |
nil |
|
994 |
) |
|
995 |
) |
|
996 |
(MenuItem |
|
997 |
label: 'Breakpoint' |
|
998 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
999 |
submenu: |
11210 | 1000 |
(Menu |
1001 |
( |
|
1002 |
(MenuItem |
|
1003 |
enabled: canRemoveBreakpoint |
|
1004 |
label: 'Remove Breakpoint' |
|
1005 |
itemValue: removeBreakpoint |
|
1006 |
translateLabel: true |
|
1007 |
) |
|
1008 |
(MenuItem |
|
1009 |
label: 'Remove all Breakpoints' |
|
1010 |
itemValue: removeAllBreakpoints |
|
1011 |
translateLabel: true |
|
1012 |
) |
|
1013 |
(MenuItem |
|
1014 |
label: '-' |
|
1015 |
) |
|
1016 |
(MenuItem |
|
1017 |
enabled: canAddBreakpoint |
|
1018 |
label: 'Add Breakpoint' |
|
1019 |
itemValue: addBreakpoint |
|
1020 |
translateLabel: true |
|
1021 |
) |
|
1022 |
(MenuItem |
|
1023 |
label: '-' |
|
1024 |
) |
|
1025 |
(MenuItem |
|
1026 |
label: 'Ignore this Halt/BreakPoint' |
|
1027 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1028 |
submenu: |
11210 | 1029 |
(Menu |
1030 |
( |
|
1031 |
(MenuItem |
|
1032 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
1033 |
label: 'For Some Time...' |
|
1034 |
itemValue: openIgnoreHaltUntilTimeElapsedDialog |
|
1035 |
translateLabel: true |
|
1036 |
) |
|
1037 |
(MenuItem |
|
1038 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
1039 |
label: 'For the Next N Times...' |
|
1040 |
itemValue: openIgnoreHaltNTimesDialog |
|
1041 |
translateLabel: true |
|
1042 |
) |
|
1043 |
(MenuItem |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1044 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
11210 | 1045 |
label: 'Until Shift-Key is Pressed' |
1046 |
itemValue: ignoreHaltUntilShiftKeyIsPressed |
|
1047 |
translateLabel: true |
|
1048 |
) |
|
1049 |
(MenuItem |
|
1050 |
enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
|
1051 |
label: 'Forever (Until Ignoring is Stopped)' |
|
1052 |
itemValue: ignoreHaltForever |
|
1053 |
translateLabel: true |
|
1054 |
) |
|
1055 |
) |
|
1056 |
nil |
|
1057 |
nil |
|
1058 |
) |
|
1059 |
) |
|
1060 |
(MenuItem |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1061 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1062 |
label: 'Ignore all BreakPoints with this Parameter' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1063 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1064 |
submenu: |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1065 |
(Menu |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1066 |
( |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1067 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1068 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1069 |
label: 'For Some Time...' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1070 |
itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1071 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1072 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1073 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1074 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1075 |
label: 'For the Next N Times...' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1076 |
itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1077 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1078 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1079 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1080 |
enabled: isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1081 |
label: 'Until Shift-Key is Pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1082 |
itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1083 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1084 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1085 |
(MenuItem |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1086 |
enabled: isStoppedAtBreakPointWithParameter |
11370 | 1087 |
label: 'Forever (Reenable in BreakPoint-Browser)' |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1088 |
itemValue: ignoreBreakpointsWithThisParameterForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1089 |
translateLabel: true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1090 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1091 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1092 |
nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1093 |
nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1094 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1095 |
) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1096 |
(MenuItem |
11210 | 1097 |
label: 'Ignore all Halts/BreakPoints' |
1098 |
translateLabel: true |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1099 |
submenu: |
11210 | 1100 |
(Menu |
1101 |
( |
|
1102 |
(MenuItem |
|
1103 |
label: 'For Some Time...' |
|
1104 |
itemValue: openIgnoreAllHaltsUntilTimeElapsedDialog |
|
1105 |
translateLabel: true |
|
1106 |
) |
|
1107 |
(MenuItem |
|
1108 |
label: 'Until Shift-Key is Pressed' |
|
1109 |
itemValue: ignoreAllHaltsUntilShiftKeyIsPressed |
|
1110 |
translateLabel: true |
|
1111 |
) |
|
1112 |
(MenuItem |
|
1113 |
label: 'Forever (Until Ignoring is Stopped)' |
|
1114 |
itemValue: ignoreAllHaltsForever |
|
1115 |
translateLabel: true |
|
1116 |
) |
|
1117 |
) |
|
1118 |
nil |
|
1119 |
nil |
|
1120 |
) |
|
1121 |
) |
|
1122 |
(MenuItem |
|
1123 |
enabled: hasHaltsToIgnore |
|
1124 |
label: 'Stop Ignoring' |
|
1125 |
itemValue: stopIgnoringHalts |
|
1126 |
translateLabel: true |
|
1127 |
) |
|
1128 |
(MenuItem |
|
1129 |
label: '-' |
|
1130 |
) |
|
1131 |
(MenuItem |
|
1132 |
label: 'Manage Breakpoints' |
|
1133 |
itemValue: openBreakPointBrowser |
|
1134 |
translateLabel: true |
|
1135 |
) |
|
1136 |
(MenuItem |
|
11443 | 1137 |
label: 'Allow Halt in Debugger' |
11210 | 1138 |
itemValue: allowBreakPointsInDebugger: |
1139 |
translateLabel: true |
|
1140 |
indication: allowBreakPointsInDebugger |
|
1141 |
) |
|
1142 |
) |
|
1143 |
nil |
|
1144 |
nil |
|
1145 |
) |
|
1146 |
) |
|
1147 |
(MenuItem |
|
1148 |
label: 'Help' |
|
1149 |
translateLabel: true |
|
1150 |
startGroup: right |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
1151 |
submenu: |
11210 | 1152 |
(Menu |
1153 |
( |
|
1154 |
(MenuItem |
|
1155 |
label: 'Debuggers Documentation' |
|
1156 |
itemValue: openHTMLDocument: |
|
1157 |
translateLabel: true |
|
1158 |
argument: 'tools/debugger/TOP.html' |
|
1159 |
) |
|
1160 |
(MenuItem |
|
1161 |
label: '-' |
|
1162 |
) |
|
1163 |
(MenuItem |
|
1164 |
label: 'About DebugView...' |
|
1165 |
itemValue: openAboutThisApplication |
|
1166 |
translateLabel: true |
|
1167 |
) |
|
1168 |
) |
|
1169 |
nil |
|
1170 |
nil |
|
1171 |
) |
|
1172 |
) |
|
1173 |
) |
|
1174 |
nil |
|
1175 |
nil |
|
3269 | 1176 |
) |
11443 | 1177 |
|
1178 |
"Modified: / 19-03-2012 / 16:37:36 / cg" |
|
3269 | 1179 |
! ! |
1180 |
||
913
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1181 |
!DebugView class methodsFor:'misc'! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1182 |
|
4121 | 1183 |
interestingContextFrom:aContext |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1184 |
"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
|
1185 |
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
|
1186 |
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
|
1187 |
actually occured. |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1188 |
Just for your convenience :-)" |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1189 |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1190 |
|someContexts con idx| |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1191 |
|
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1192 |
someContexts := Array new:25. |
2042 | 1193 |
con := aContext. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1194 |
idx := 1. |
10205 | 1195 |
[(idx <= someContexts size) and:[con notNil]] whileTrue:[ |
11210 | 1196 |
someContexts at:idx put:con. |
1197 |
con := con sender. |
|
1198 |
idx := idx + 1. |
|
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1199 |
]. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1200 |
idx := self interestingContextIndexIn:someContexts. |
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1201 |
^ someContexts at:idx. |
3447 | 1202 |
! |
1203 |
||
10205 | 1204 |
interestingContextIndexIn:aContextArray |
3447 | 1205 |
"return an interesting contexts offset, or nil. |
1206 |
This is the context initially shown in the walkback. |
|
1207 |
We move up the calling chain, skipping all intermediate Signal |
|
1208 |
and Exception contexts, to present the context in which the error |
|
1209 |
actually occured. |
|
1210 |
Just for your convenience :-)" |
|
1211 |
||
8152 | 1212 |
|con found offset sel prev ex rcvr nMax idx| |
3447 | 1213 |
|
7713 | 1214 |
"/ Transcript showCR:aContextArray. |
7648 | 1215 |
|
3447 | 1216 |
nMax := aContextArray size. |
1217 |
nMax <= 1 ifTrue:[^ 1]. |
|
1218 |
con := aContextArray at:1. |
|
1219 |
con isBlockContext ifTrue:[^ 1]. |
|
1220 |
||
1221 |
"/ somewhere, at the bottom, there must be a raise ... |
|
1222 |
"/ find the exception |
|
1223 |
||
1224 |
1 to:5 do:[:i | |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1225 |
con := aContextArray at:i ifAbsent:nil. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1226 |
con notNil ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1227 |
sel := con selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1228 |
(sel startsWith:'raise') ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1229 |
rcvr := con receiver. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1230 |
(rcvr isLazyValue not and:[rcvr isException]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1231 |
ex := rcvr. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1232 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1233 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1234 |
] ifFalse:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1235 |
(rcvr isLazyValue not and:[rcvr isExceptionCreator]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1236 |
offset := i. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1237 |
found := con |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1238 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1239 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1240 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1241 |
]. |
3447 | 1242 |
]. |
1243 |
||
1244 |
" |
|
1245 |
if this is a noHandler exception, skip forward |
|
1246 |
to the erronous context |
|
1247 |
" |
|
1248 |
ex notNil ifTrue:[ |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1249 |
ex signal == Signal noHandlerSignal ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1250 |
found := ex suspendedContext |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1251 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1252 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1253 |
"/ Transcript show:'1 '; showCR:found. |
3447 | 1254 |
found isNil ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1255 |
"/ this is a kludge, but convenient. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1256 |
"/ show the place where the error (divisionByZero...) happend, |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1257 |
"/ not where the signal was raised. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1258 |
con := (aContextArray at:1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1259 |
sel := con methodHome selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1260 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1261 |
"/ typically a DivisionByZero - show caller of division |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1262 |
(sel == #// |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1263 |
or:[sel == #/ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1264 |
or:[sel == #\\]]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1265 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1266 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1267 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1268 |
"/ 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
|
1269 |
(sel == #doesNotUnderstand:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1270 |
idx := 3. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1271 |
nMax > 2 ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1272 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1273 |
sel == #doesNotUnderstand: ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1274 |
idx := 4 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1275 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1276 |
nMax > idx ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1277 |
sel := (aContextArray at:idx) selector ? ''. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1278 |
"/ 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
|
1279 |
((sel == #perform:) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1280 |
or:[sel startsWith:'perform:with']) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1281 |
idx := idx + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1282 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1283 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1284 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1285 |
^ idx min:nMax |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1286 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1287 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1288 |
"/ show the bad method; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1289 |
(sel == #noByteCode) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1290 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1291 |
]. |
3447 | 1292 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1293 |
"/ "/ 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
|
1294 |
"/ ((sel == #halt) or:[sel == #halt:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1295 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1296 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1297 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1298 |
"/ "/ 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
|
1299 |
"/ (sel == #shouldImplement) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1300 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1301 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1302 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1303 |
"/ "/ 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
|
1304 |
"/ ((sel == #error:mayProceed:) |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1305 |
"/ or:[ sel == #signalFailure:resumable:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1306 |
"/ nMax > 2 ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1307 |
"/ sel := (aContextArray at:2) selector. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1308 |
"/ sel == #mustBeBoolean ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1309 |
"/ ^ 3 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1310 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1311 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1312 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1313 |
"/ ]. |
7862 | 1314 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1315 |
"/ show the place of signalInterrupt-call; not where the Signal was raised... |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1316 |
(sel == #signalInterrupt:) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1317 |
^ 2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1318 |
]. |
5117
038af0448624
interrestingContextFrom - duplicated code removed
Claus Gittinger <cg@exept.de>
parents:
5114
diff
changeset
|
1319 |
|
8143
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1320 |
"/ "/ 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
|
1321 |
"/ ((sel == #error) or:[sel == #error:]) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1322 |
"/ con method mclass == Object ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1323 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1324 |
"/ ] |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1325 |
"/ ]. |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1326 |
|
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1327 |
"/ "/ 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
|
1328 |
"/ (sel == #subclassResponsibility) ifTrue:[ |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1329 |
"/ ^ 2 |
539df8f4f32e
interresting context search generalized
Claus Gittinger <cg@exept.de>
parents:
8142
diff
changeset
|
1330 |
"/ ]. |
6132
ca1f04f5232b
lineNumber display of shared subclassResponsibilityMethods
Claus Gittinger <cg@exept.de>
parents:
6129
diff
changeset
|
1331 |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1332 |
"/ 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
|
1333 |
( #(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1334 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1335 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1336 |
#elementBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1337 |
"/ #subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1338 |
) includes:sel) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1339 |
idx := 2. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1340 |
[ idx <= 3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1341 |
and:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1342 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1343 |
#(#notIndexed |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1344 |
#indexNotIntegerOrOutOfBounds: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1345 |
#subscriptBoundsError: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1346 |
#elementBoundsError: ) includes:sel |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1347 |
] |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1348 |
] whileTrue:[ idx := idx + 1 ]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1349 |
sel := (aContextArray at:idx) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1350 |
(nMax > idx and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1351 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1352 |
sel := (aContextArray at:idx+1) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1353 |
(nMax > (idx+1) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1354 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1355 |
sel := (aContextArray at:idx+2) selector. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1356 |
(nMax > (idx+2) and:[ #(#basicAt: #basicAt:put: #at: #at:put: ) includes:sel]) |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1357 |
ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1358 |
^ idx+3 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1359 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1360 |
^ idx+2 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1361 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1362 |
^ idx+1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1363 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1364 |
^ idx |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1365 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1366 |
offset := 1. |
8152 | 1367 |
]. |
1368 |
||
1369 |
"/ the above is all too hard-coded; |
|
1370 |
"/ ask the method, if it thinks it should be skipped in the walkback. |
|
1371 |
"/ as more methods get flagged, remove code from above. |
|
1372 |
con := aContextArray at:offset ifAbsent:nil. |
|
1373 |
||
10205 | 1374 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1375 |
con notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1376 |
and:[ con methodHome notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1377 |
and:[ con methodHome method notNil |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1378 |
and:[ con methodHome method shouldBeSkippedInDebuggersWalkBack ]]] |
8152 | 1379 |
] whileTrue:[ |
1380 |
"/ Transcript showCR:con methodHome method. |
|
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1381 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1382 |
con := aContextArray at:offset ifAbsent:nil. |
8152 | 1383 |
]. |
3447 | 1384 |
|
1385 |
" |
|
1386 |
got it; move up, skipping all intermediate Signal and |
|
1387 |
Exception contexts |
|
1388 |
" |
|
1389 |
prev := nil. |
|
1390 |
rcvr := con receiver. |
|
10205 | 1391 |
[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1392 |
rcvr isLazyValue not and:[(rcvr isExceptionHandler) or:[(rcvr isException)]] |
3447 | 1393 |
] whileTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1394 |
prev := con. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1395 |
nMax > offset ifFalse:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1396 |
|
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1397 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1398 |
con := aContextArray at:offset. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1399 |
rcvr := con receiver. |
3447 | 1400 |
]. |
1401 |
||
1402 |
" |
|
1403 |
now, we are one above the raising context |
|
1404 |
" |
|
1405 |
||
1406 |
" |
|
1407 |
if the sender-method of the raise is one of objects error methods ... |
|
1408 |
" |
|
10205 | 1409 |
( #( halt halt: |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1410 |
error error: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1411 |
doesNotUnderstand: |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1412 |
subclassResponsibility |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1413 |
primitiveFailed) includes:con selector) |
3447 | 1414 |
ifTrue:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1415 |
con selector == #doesNotUnderstand: ifTrue:[ |
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 |
one more up, to get to the originating context |
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 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1420 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1421 |
offset := offset + 1. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1422 |
]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1423 |
con := aContextArray at:(offset + 1). |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1424 |
con isNil ifTrue:[^ offset]. |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1425 |
offset := offset + 1. |
3447 | 1426 |
] ifFalse:[ |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1427 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1428 |
ok, got the raise - if its a BreakPoint, look for the sender |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1429 |
" |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1430 |
(prev notNil and:[prev receiver == BreakPointInterrupt]) ifTrue:[ |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1431 |
offset := offset + 1 |
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1432 |
]. |
3447 | 1433 |
]. |
1434 |
||
1435 |
^ offset |
|
1436 |
||
7713 | 1437 |
"Created: / 17-11-2001 / 20:37:49 / cg" |
10289
cb1f8bda978e
changed: #interestingContextIndexIn:
Claus Gittinger <cg@exept.de>
parents:
10205
diff
changeset
|
1438 |
"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
|
1439 |
! ! |
6460993f73a3
made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1440 |
|
73 | 1441 |
!DebugView methodsFor:'basic'! |
1442 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1443 |
enableDisableActions |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1444 |
|m| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1445 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1446 |
m := contextView middleButtonMenu. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1447 |
m notNil ifTrue:[ |
11210 | 1448 |
self updateMenuItems. |
1449 |
||
1450 |
(inspecting or:[AbortOperationRequest isHandled]) ifTrue:[ |
|
1451 |
abortButton enable. |
|
1452 |
m enable:#doAbort. |
|
1453 |
] ifFalse:[ |
|
1454 |
abortButton disable. |
|
1455 |
m disable:#doAbort. |
|
1456 |
]. |
|
1457 |
exclusive ifTrue:[ |
|
1458 |
terminateButton disable. |
|
1459 |
m disable:#doTerminate. |
|
1460 |
] ifFalse:[ |
|
1461 |
terminateButton enable. |
|
1462 |
m enable:#doTerminate. |
|
1463 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1464 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1465 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1466 |
mayProceed == false ifTrue:[ |
11210 | 1467 |
continueButton disable. |
1468 |
m notNil ifTrue:[m disable:#doContinue]. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1469 |
] ifFalse:[ |
11210 | 1470 |
continueButton enable. |
1471 |
m notNil ifTrue:[m enable:#doContinue] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1472 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1473 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1474 |
"Created: / 16.11.2001 / 17:40:51 / cg" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1475 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1476 |
|
1364 | 1477 |
enter:aContext select:initialSelectionOrNil |
73 | 1478 |
"enter the debugger - get and display the context, then start an |
1479 |
exclusive event loop on top of eveything else" |
|
1480 |
||
3447 | 1481 |
<context: #return> |
1482 |
||
9076 | 1483 |
|con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
3447 | 1484 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1485 |
DebuggingDebugger == true ifTrue:[ |
11210 | 1486 |
'==> enter: (' print. aContext print. |
1487 |
') select: ' print. initialSelectionOrNil printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
1488 |
]. |
3447 | 1489 |
thisContext isRecursive ifTrue:[ |
11210 | 1490 |
"/ care for the special case, were the Debugger was autoloaded. |
1491 |
"/ in this case, thisContext IS recursive, but thats no error |
|
1492 |
"/ condition. |
|
1493 |
foundNoByteCodeContext := false. |
|
1494 |
foundExitContext := false. |
|
1495 |
||
1496 |
c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1497 |
[ |
|
1498 |
foundNoByteCodeContext not |
|
1499 |
and:[ foundExitContext not |
|
1500 |
and:[c notNil |
|
1501 |
and:[c selector ~~ #enter:withMessage:mayProceed: |
|
1502 |
]]]] |
|
1503 |
whileTrue:[ |
|
1504 |
c selector == #exit_unwindThenDo: ifTrue:[ |
|
1505 |
foundExitContext := true |
|
1506 |
]. |
|
1507 |
c selector == #noByteCode ifTrue:[ |
|
1508 |
foundNoByteCodeContext := true |
|
1509 |
]. |
|
1510 |
c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
|
1511 |
]. |
|
1512 |
||
1513 |
(foundNoByteCodeContext not |
|
1514 |
and:[ foundExitContext not]) ifFalse:[ |
|
1515 |
('DebugView [warning]: reentered') errorPrintCR. |
|
1516 |
||
1517 |
^ MiniDebugger |
|
1518 |
enter:aContext |
|
1519 |
withMessage:'DebugView [error]: recursive error (in debugger)' |
|
1520 |
mayProceed:mayProceed. |
|
1521 |
]. |
|
1522 |
foundExitContext ifTrue:[ |
|
1523 |
'DebugView [error]: recursive error (in debugger) ignored' printCR. |
|
1524 |
^ self. |
|
1525 |
]. |
|
3447 | 1526 |
]. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1527 |
|
10203 | 1528 |
"/'entering: ' print. aContext printCR. |
1529 |
"/'initial: ' print. initialSelectionOrNil printCR. |
|
8170 | 1530 |
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1531 |
||
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
1532 |
self class isHaltToBeIgnored ifTrue:[ |
11210 | 1533 |
^ self. |
8170 | 1534 |
]. |
1535 |
||
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1536 |
iAmNew := drawableId isNil. |
73 | 1537 |
|
8148 | 1538 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 1539 |
|
1265
3db375412f5d
avoid caching a debugger which got destroyed
Claus Gittinger <cg@exept.de>
parents:
1263
diff
changeset
|
1540 |
busy := cachable := true. |
73 | 1541 |
inspecting := false. |
1542 |
inspectedProcess := Processor activeProcess. |
|
1543 |
stepping := false. |
|
1544 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
1545 |
stepHow := nil. |
8148 | 1546 |
nChainShown := InitialNChainShown. |
73 | 1547 |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1548 |
"/ if debugger is entered while a box has grabbed the |
9076 | 1549 |
"/ 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
|
1550 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1551 |
"/ On a multiUser system, ungrab all of them ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1552 |
"/ 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
|
1553 |
"/ 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
|
1554 |
"/ 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
|
1555 |
Screen allScreens do:[:aScreen | |
11210 | 1556 |
aScreen ungrabPointer. |
1557 |
aScreen ungrabKeyboard. |
|
10205 | 1558 |
]. |
1559 |
||
1560 |
("inspectedProcess suspendedContext isNil |
|
1179
e927f0c09298
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1148
diff
changeset
|
1561 |
or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
11210 | 1562 |
terminateButton disable. |
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1563 |
] ifFalse:[ |
11210 | 1564 |
terminateButton enable. |
1565 |
abortButton enable. |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
1566 |
]. |
73 | 1567 |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1568 |
iAmNew ifFalse:[ |
11210 | 1569 |
"/ not the first time - disable buttons & menus |
1570 |
"/ from the previous life |
|
1571 |
self turnOffAllButtons. |
|
1572 |
||
1573 |
m := contextView middleButtonMenu. |
|
1574 |
m notNil ifTrue:[ |
|
1575 |
m disableAll:#(showMore "skip skipForReturn" inspectContext). |
|
1576 |
]. |
|
1577 |
verboseBacktrace |
|
1578 |
ifTrue:[self showVerboseWalkback] |
|
1579 |
ifFalse:[self showDenseWalkback]. |
|
132 | 1580 |
]. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1581 |
self iconLabel:'Debugger'. |
132 | 1582 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1583 |
windowGroup isNil ifTrue:[ |
11210 | 1584 |
self windowGroup: WindowGroup new. |
1585 |
windowGroup addTopView:self. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1586 |
]. |
132 | 1587 |
exclusive ifFalse:[ |
11210 | 1588 |
"/ create a (modal) windowGroup for myself |
1589 |
||
1590 |
windowGroup setModal:true. |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1591 |
] ifTrue:[ |
11210 | 1592 |
"/ create a windowGroup with a synchronous sensor for me |
1593 |
||
1594 |
windowGroup beSynchronous. |
|
73 | 1595 |
]. |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1596 |
windowGroup setProcess:Processor activeProcess. |
73 | 1597 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1598 |
get the walkback list; clear inspectors if we did not come here by single stepping) |
73 | 1599 |
" |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
1600 |
self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
10203 | 1601 |
"/'after setContext; first is ' print. |
1602 |
"/(contextArray at:1 ifAbsent:nil) printCR. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1603 |
self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
73 | 1604 |
|
10203 | 1605 |
self updateButtonsAndMenuItemsForContext:aContext. |
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
1606 |
|
73 | 1607 |
" |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1608 |
If this is a new debugger, do a realize. |
528
a5ba1a3d0b45
Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents:
527
diff
changeset
|
1609 |
Otherwise, its probably better to do a map, which shows the |
73 | 1610 |
view at the previous position, without a need for the user to set the |
1611 |
position again |
|
1612 |
" |
|
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1613 |
iAmNew ifFalse:[ |
11210 | 1614 |
self remap. |
2360
cef61dce4358
avoid empty debugger if some subcomponent forces creation
Claus Gittinger <cg@exept.de>
parents:
2358
diff
changeset
|
1615 |
] ifTrue:[ |
11210 | 1616 |
self realize. |
73 | 1617 |
]. |
8193
9a4febdd8202
Raise debugger to the very top when entering
Stefan Vogel <sv@exept.de>
parents:
8181
diff
changeset
|
1618 |
self setForegroundWindow. |
73 | 1619 |
|
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1620 |
exclusive ifTrue:[ |
11210 | 1621 |
self showError:' |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1622 |
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
|
1623 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1624 |
This is a modal debugger - all event processing is stopped.. |
10205 | 1625 |
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
|
1626 |
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
|
1627 |
|
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1628 |
Also, there is no event processing (redraw) for other views.' |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1629 |
]. |
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1630 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1631 |
self autoRaiseView ifTrue:[ |
11210 | 1632 |
"/ self raise. |
1633 |
self raiseDeiconified. |
|
1634 |
self topView activate; setForegroundWindow; activate. |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1635 |
]. |
1486
6ae442626f20
wait until visible before starting to draw
Claus Gittinger <cg@exept.de>
parents:
1484
diff
changeset
|
1636 |
|
73 | 1637 |
canContinue := true. |
1638 |
exitAction := nil. |
|
1639 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1640 |
"/ enter private event handling loop. This is left (and we come back here again) |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1641 |
"/ when any button was pressed which requires continuation of the debuggee or |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1642 |
"/ closedown of the debugger. |
3701
ef73aac8e8d5
Use #ifCurtailed: instead of #valueOnUnwindDo:
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
1643 |
[self controlLoop] ifCurtailed:[ |
11210 | 1644 |
windowGroup notNil ifTrue:[ |
1645 |
windowGroup setProcess:nil. |
|
1646 |
]. |
|
1647 |
self destroy |
|
132 | 1648 |
]. |
73 | 1649 |
|
10203 | 1650 |
"/ here after my own control loop is finished. |
1651 |
||
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1652 |
"/ release all context stuff. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1653 |
"/ 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
|
1654 |
"/ forever. (since the debugger is reused for faster startup next time) |
942 | 1655 |
contextView contents:nil. |
1656 |
||
73 | 1657 |
codeView acceptAction:nil. |
942 | 1658 |
codeView doItAction:nil. |
73 | 1659 |
|
4892 | 1660 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
11210 | 1661 |
ObjectMemory stepInterruptHandler:nil. |
4892 | 1662 |
]. |
1663 |
||
73 | 1664 |
(exitAction ~~ #step) ifTrue:[ |
11210 | 1665 |
"/ not stepping - close window |
1666 |
lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
|
1667 |
lastSelectionInContextInspector := contextInspector selectedKeyName. |
|
1668 |
receiverInspector release. |
|
1669 |
contextInspector release. |
|
1670 |
||
1671 |
self unmap. |
|
1672 |
device flush. |
|
1673 |
||
1674 |
(exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
|
1675 |
(exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
|
1676 |
(exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
|
1677 |
(exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
|
1678 |
(exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
|
1679 |
(exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
|
1680 |
exitAction isBlock ifTrue:[ |
|
1681 |
self exit_unwindThenDo:exitAction. |
|
1682 |
"does not return" |
|
1683 |
]. |
|
1684 |
"not reached" |
|
1685 |
^ self |
|
73 | 1686 |
]. |
1687 |
||
3447 | 1688 |
"/ stepping - window stays open |
940 | 1689 |
selectedContext := actualContext := firstContext := nil. |
73 | 1690 |
|
2472 | 1691 |
"/ restore the previous pointer grab |
73 | 1692 |
grabber notNil ifTrue:[ |
11210 | 1693 |
device grabPointerInView:grabber. |
1694 |
grabber := nil. |
|
61 | 1695 |
]. |
73 | 1696 |
|
1697 |
(exitAction == #step) ifTrue:[ |
|
11210 | 1698 |
" |
1699 |
schedule another stepInterrupt |
|
1700 |
- must enter myself into the collection of open debuggers, |
|
1701 |
in case the stepping process comes back again via a halt or signal |
|
1702 |
before the step is finished. In this case, the stepping debugger should |
|
1703 |
come up (instead of a new one) |
|
1704 |
- must flush caches since optimized methods not always |
|
1705 |
look for pending interrupts |
|
1706 |
" |
|
1707 |
||
1708 |
"/ |
|
1709 |
"/ also must care for stepping into a return |
|
1710 |
"/ |
|
1711 |
steppedContext notNil ifTrue:[ |
|
1712 |
Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
|
1713 |
]. |
|
1714 |
||
1715 |
OpenDebuggers isNil ifTrue:[ |
|
1716 |
OpenDebuggers := WeakIdentitySet new. |
|
1717 |
]. |
|
1718 |
OpenDebuggers add:self. |
|
1719 |
||
1720 |
self label:'single stepping - please wait ...'. |
|
1721 |
stepping := true. |
|
1722 |
||
1723 |
ObjectMemory stepInterruptHandler:self. |
|
1724 |
Processor activeProcess stepInterruptHandler:self. |
|
1725 |
ObjectMemory flushCaches. |
|
1726 |
||
1727 |
Context singleStepInterruptRequest isHandled ifTrue:[ |
|
1728 |
Context singleStepInterruptRequest |
|
1729 |
raiseWith: |
|
1730 |
(("bigStep" steppedContextLineno notNil) |
|
1731 |
ifTrue:[#next] |
|
1732 |
ifFalse:[#step]) |
|
1733 |
] ifFalse:[ |
|
1734 |
"/ see if we came here through an interrupt-action |
|
1735 |
"/ (i.e. aProcess interruptWith:...) |
|
1736 |
||
1737 |
enteredByInterrupt := false. |
|
1738 |
con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1739 |
[enteredByInterrupt not |
|
1740 |
and:[con notNil |
|
1741 |
and:[con ~~ aContext]]] whileTrue:[ |
|
1742 |
((sel := con selector) == #timerInterrupt |
|
1743 |
or:[sel == #ioInterrupt]) ifTrue:[ |
|
1744 |
enteredByInterrupt := true. |
|
1745 |
] ifFalse:[ |
|
1746 |
con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
|
1747 |
]. |
|
1748 |
]. |
|
1749 |
||
1750 |
ObjectMemory flushInlineCaches. |
|
1751 |
||
1752 |
DebuggingDebugger == true ifTrue:[ |
|
1753 |
enteredByInterrupt printCR. |
|
1754 |
]. |
|
1755 |
enteredByInterrupt ifTrue:[ |
|
1756 |
"/ dont want to step through all intermediate |
|
1757 |
"/ (scheduler-) contexts; place a return-trap on the |
|
1758 |
"/ one right below the interesting one |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1759 |
|
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1760 |
"/ 'special unwind return' printCR. |
11210 | 1761 |
con unwindThenDo:[ |
1762 |
Processor activeProcess stepInterruptHandler:self. |
|
1763 |
ObjectMemory stepInterruptHandler:self. |
|
1764 |
InStepInterrupt := nil. |
|
1765 |
StepInterruptPending := 1. |
|
1766 |
InterruptPending := 1]. |
|
1767 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1768 |
"/ 'normal step return' printCR. |
11210 | 1769 |
skipLineNr ~~ #return ifTrue:[ |
1770 |
StepInterruptPending := 1. |
|
1771 |
InterruptPending := 1. |
|
1772 |
] ifFalse:[ |
|
778
e0f6238c9dd5
better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1773 |
"/ 'step for return' printCR. |
11210 | 1774 |
] |
1775 |
]. |
|
1776 |
InStepInterrupt := nil |
|
1777 |
] |
|
73 | 1778 |
] ifFalse:[ |
11210 | 1779 |
OpenDebuggers notNil ifTrue:[ |
1780 |
OpenDebuggers remove:self ifAbsent:[]. |
|
1781 |
]. |
|
1782 |
self cacheMyself. |
|
73 | 1783 |
] |
210
947f9a23b06a
better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
1784 |
|
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
1785 |
"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
|
1786 |
"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
|
1787 |
"Modified: / 13-10-1998 / 19:56:59 / ps" |
10203 | 1788 |
"Modified (comment): / 06-07-2011 / 12:29:28 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1789 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1790 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1791 |
exit_abort |
5455 | 1792 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
1793 |
"/ that one would run on top of this context. |
|
1794 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1795 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1796 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1797 |
"/ done in the #enter:select method. |
5455 | 1798 |
"/ You are not expected to understand this. |
1799 |
||
6487 | 1800 |
self exit_unwindThenDo:[ AbortOperationRequest raise ] |
1801 |
! |
|
1802 |
||
1803 |
exit_abortAll |
|
1804 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1805 |
"/ that one would run on top of this context. |
|
1806 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1807 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1808 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1809 |
"/ done in the #enter:select method. |
6487 | 1810 |
"/ You are not expected to understand this. |
1811 |
||
1812 |
self exit_unwindThenDo:[ AbortAllOperationRequest raise ] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1813 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1814 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1815 |
exit_quickTerminate |
3447 | 1816 |
self cacheMyself. |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1817 |
Processor activeProcess terminateNoSignal |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1818 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1819 |
"Created: / 16.11.2001 / 17:23:51 / cg" |
3447 | 1820 |
"Modified: / 17.11.2001 / 23:20:07 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1821 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1822 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1823 |
exit_restart |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1824 |
|con| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1825 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1826 |
selectedContext notNil ifTrue:[ |
11210 | 1827 |
con := selectedContext. |
1828 |
self cacheMyself. |
|
1829 |
" |
|
1830 |
have to catch errors occuring in unwind-blocks |
|
1831 |
" |
|
1832 |
Error handle:[:ex | |
|
1833 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1834 |
ex description infoPrintCR. |
|
1835 |
ex proceed |
|
1836 |
] do:[ |
|
1837 |
con unwindAndRestart. |
|
1838 |
]. |
|
1839 |
'DebugView [warning]: cannot restart selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1840 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1841 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1842 |
"Created: / 16.11.2001 / 17:23:17 / cg" |
3447 | 1843 |
"Modified: / 17.11.2001 / 23:37:09 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1844 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1845 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1846 |
exit_return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1847 |
|con retVal| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1848 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1849 |
selectedContext notNil ifTrue:[ |
11210 | 1850 |
" |
1851 |
if there is a selection in the codeView, |
|
1852 |
evaluate it and use the result as return value |
|
1853 |
" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1854 |
"/ 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
|
1855 |
"/ and that is syntactically incorrect ... |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1856 |
"/ ... leading to a popup warning from the codeView |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1857 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1858 |
"/ codeView hasSelection ifTrue:[ |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1859 |
"/ Error handle:[:ex | |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1860 |
"/ 'DebugView [warning]: error - returning nil' errorPrintCR. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1861 |
"/ retVal := nil. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1862 |
"/ ex return |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1863 |
"/ ] do:[ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1864 |
"/ |s| |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1865 |
"/ |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1866 |
"/ s := codeView selection asString. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1867 |
"/ retVal := codeView doItAction value:s. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1868 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1869 |
"/ ]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1870 |
|
11210 | 1871 |
con := selectedContext. |
1872 |
self cacheMyself. |
|
1873 |
" |
|
1874 |
have to catch errors occuring in unwind-blocks |
|
1875 |
" |
|
1876 |
Error handle:[:ex | |
|
1877 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
|
1878 |
ex description infoPrintCR. |
|
1879 |
ex proceed |
|
1880 |
] do:[ |
|
1881 |
con unwind:retVal. |
|
1882 |
]. |
|
1883 |
'DebugView [warning]: cannot return from selected context' errorPrintCR |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1884 |
] |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1885 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1886 |
"Created: / 16.11.2001 / 17:22:24 / cg" |
3447 | 1887 |
"Modified: / 17.11.2001 / 23:20:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1888 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1889 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1890 |
exit_terminate |
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 |
" |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1893 |
have to catch errors occuring in unwind-blocks |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1894 |
" |
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
1895 |
Error handle:[:ex | |
11210 | 1896 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1897 |
ex description infoPrintCR. |
|
1898 |
ex proceed |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1899 |
] do:[ |
11210 | 1900 |
self cacheMyself. |
1901 |
Processor activeProcess terminate. |
|
3434
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 |
'DebugView [warning]: cannot terminate process' errorPrintCR |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1904 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
1905 |
"Created: / 16.11.2001 / 17:24:20 / cg" |
3447 | 1906 |
"Modified: / 17.11.2001 / 23:20:27 / cg" |
1907 |
! |
|
1908 |
||
6487 | 1909 |
exit_unwindThenDo:aBlock |
1910 |
|con| |
|
1911 |
||
1912 |
"/ cannot simply raise an abort here, because if there is an abortHandler somewhere, |
|
1913 |
"/ that one would run on top of this context. |
|
1914 |
"/ Therefore, any controlInterrupt(i.e. halt) or reentering of the debugger from that handler |
|
1915 |
"/ would be interpreted as a recursive invocation (in #enter:select). |
|
1916 |
"/ To avoid this, we unwind all contexts and simulate the raise as if it was |
|
10205 | 1917 |
"/ done in the #enter:select method. |
6487 | 1918 |
"/ You are not expected to understand this. |
1919 |
||
1920 |
" |
|
1921 |
have to catch errors occuring in unwind-blocks |
|
1922 |
" |
|
1923 |
self cacheMyself. |
|
1924 |
||
1925 |
Error handle:[:ex | |
|
11210 | 1926 |
'DebugView [info]: ignored error while unwinding: ' infoPrint. |
1927 |
ex description infoPrintCR. |
|
1928 |
||
1929 |
ex proceed |
|
6487 | 1930 |
] do:[ |
11210 | 1931 |
"/ find the enter:select context. |
1932 |
con := thisContext sender. |
|
1933 |
[ |
|
1934 |
(con selector == #enter:select:) |
|
1935 |
and:[con receiver == self] |
|
1936 |
] |
|
1937 |
whileFalse:[ con := con sender ]. |
|
1938 |
||
1939 |
"/ must skip over its caller (because this one has a ControlInterrupt handler too) |
|
1940 |
con sender receiver == self class ifTrue:[ |
|
1941 |
con := con sender. |
|
1942 |
con sender receiver == self class ifTrue:[ |
|
1943 |
con := con sender. |
|
1944 |
con isBlockContext ifTrue:[ |
|
1945 |
con := con methodHome. |
|
1946 |
] |
|
1947 |
]. |
|
1948 |
]. |
|
1949 |
||
1950 |
con unwindThenDo:aBlock. |
|
6487 | 1951 |
]. |
1952 |
'DebugView [warning]: abort failed' errorPrintCR |
|
1953 |
||
1954 |
"Created: / 16.11.2001 / 17:20:45 / cg" |
|
1955 |
"Modified: / 18.11.2001 / 00:58:14 / cg" |
|
1956 |
! |
|
1957 |
||
3447 | 1958 |
initialSelectionOnEntry:initialSelectionOrNil context:aContext |
1959 |
|selection con1 con2 h| |
|
1960 |
||
1961 |
initialSelectionOrNil notNil ifTrue:[ |
|
11210 | 1962 |
^ initialSelectionOrNil |
3447 | 1963 |
]. |
1964 |
||
1965 |
" |
|
1966 |
and find the one context to show initially |
|
1967 |
- if we came here by a send (single step), its the top context; |
|
1968 |
- if we came here by a step (i.e. bigStep), its the top context |
|
1969 |
(for ifs and whiles) or the sender (for regular sends). |
|
1970 |
- otherwise, we came here by some signal raise, and we are interested |
|
1971 |
in the context where the raise actually occured. |
|
1972 |
" |
|
1973 |
con1 := (contextArray at:1 ifAbsent:nil). |
|
1974 |
con2 := (contextArray at:2 ifAbsent:nil). |
|
1975 |
||
1976 |
exitAction == #step ifTrue:[ |
|
11210 | 1977 |
selection := 1. |
1978 |
steppedContext notNil ifTrue:[ |
|
1979 |
||
1980 |
" |
|
1981 |
if we came here by a big-step, show the method where we are |
|
1982 |
" |
|
1983 |
con1 == steppedContext ifTrue:[ |
|
1984 |
selection := 1 |
|
1985 |
] ifFalse:[ |
|
1986 |
con2 == steppedContext ifTrue:[ |
|
1987 |
selection := 2 |
|
1988 |
] |
|
1989 |
]. |
|
1990 |
" |
|
1991 |
for bigStep, we could also be in a block below the actual method ... |
|
1992 |
" |
|
1993 |
((h := con1 home) notNil |
|
1994 |
and:[h == steppedContext]) ifTrue:[ |
|
1995 |
selection := 1 |
|
1996 |
] ifFalse:[ |
|
1997 |
(con2 notNil |
|
1998 |
and:[(h := con2 home) notNil |
|
1999 |
and:[h == steppedContext]]) ifTrue:[ |
|
2000 |
selection := 2 |
|
2001 |
] |
|
2002 |
]. |
|
2003 |
h := nil. |
|
2004 |
] |
|
3447 | 2005 |
] ifFalse:[ |
11210 | 2006 |
steppedContext isNil ifTrue:[ |
2007 |
" |
|
2008 |
preselect a more interesting context, (where halt/raise was ...) |
|
2009 |
" |
|
2010 |
"/ selection := self class interestingContextIndexFrom:aContext. |
|
2011 |
selection := self class interestingContextIndexIn:contextArray. |
|
2012 |
selection := selection min:(contextArray size). |
|
2013 |
] ifFalse:[ |
|
2014 |
" |
|
2015 |
if we came here by a big-step, show the method where we are |
|
2016 |
" |
|
2017 |
con1 == steppedContext ifTrue:[ |
|
2018 |
selection := 1 |
|
2019 |
] ifFalse:[ |
|
2020 |
con2 == steppedContext ifTrue:[ |
|
2021 |
selection := 2. |
|
2022 |
] |
|
2023 |
] |
|
2024 |
] |
|
3447 | 2025 |
]. |
2026 |
^ selection |
|
2027 |
||
2028 |
"Created: / 17.11.2001 / 20:26:26 / cg" |
|
2029 |
"Modified: / 17.11.2001 / 22:51:46 / cg" |
|
73 | 2030 |
! |
2031 |
||
5110 | 2032 |
isInspecting |
2033 |
^ inspecting |
|
2034 |
! |
|
2035 |
||
2036 |
isNotInspecting |
|
2037 |
^ inspecting not |
|
2038 |
! |
|
2039 |
||
73 | 2040 |
openOn:aProcess |
10205 | 2041 |
"enter the debugger on a process - |
73 | 2042 |
in this case, we are just inspecting the context chain of the process, |
2043 |
not running on top of the debugged process, but as a separate |
|
2044 |
one. (think of it as an inspector showing more detail, and offering |
|
2045 |
some more control operations)" |
|
2046 |
||
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2047 |
|bpanel dummy w| |
73 | 2048 |
|
8148 | 2049 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
939 | 2050 |
|
73 | 2051 |
busy := true. |
2052 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2053 |
stepHow := nil. |
73 | 2054 |
inspecting := true. |
2055 |
inspectedProcess := aProcess. |
|
8148 | 2056 |
nChainShown := InitialNChainShown. |
73 | 2057 |
|
2058 |
bpanel := abortButton superView. |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2059 |
bpanel ignoreInvisibleComponents:true. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2060 |
|
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2061 |
"/ get the max size & freeze button |
6647 | 2062 |
continueButton label:(resources string:'Continue'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2063 |
w := continueButton preferredWidth. |
6647 | 2064 |
continueButton label:(resources string:'Stop'). |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2065 |
w := w max:(continueButton preferredWidth). |
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2066 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2067 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2068 |
aProcess state == #run ifTrue:[ |
11210 | 2069 |
device hasColors ifTrue:[ |
2070 |
continueButton foregroundColor:Color red darkened. |
|
2071 |
]. |
|
2072 |
continueButton label:(resources string:'Stop'). |
|
2073 |
continueButton action:[self doStop]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2074 |
] ifFalse:[ |
11210 | 2075 |
device hasColors ifTrue:[ |
2076 |
continueButton foregroundColor:Color green darkened darkened. |
|
2077 |
]. |
|
2078 |
continueButton label:(resources string:'Continue'). |
|
2079 |
continueButton action:[self doContinue]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2080 |
]. |
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2081 |
continueButton preferredExtent:(w @ continueButton preferredHeight). |
73 | 2082 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2083 |
returnButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2084 |
restartButton disable. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2085 |
|
92 | 2086 |
dummy := View extent:(10 @ 5) in:bpanel. |
73 | 2087 |
dummy borderWidth:0; level:0. |
61 | 2088 |
|
73 | 2089 |
"/ stepButton destroy. |
2090 |
"/ sendButton destroy. |
|
2091 |
||
2092 |
updateButton := Button |
|
11210 | 2093 |
label:(resources string:'Update') |
2094 |
action:[self updateContext] |
|
2095 |
in:bpanel. |
|
73 | 2096 |
monitorToggle := Toggle in:bpanel. |
6647 | 2097 |
monitorToggle label:(resources string:'Monitor'). |
73 | 2098 |
monitorToggle pressAction:[self autoUpdateOn]. |
2099 |
monitorToggle releaseAction:[self autoUpdateOff]. |
|
2100 |
||
2101 |
"can only look into process - context chain is not active" |
|
2102 |
canContinue := true. |
|
2103 |
||
2104 |
terminateButton enable. |
|
2105 |
abortButton enable. |
|
2106 |
||
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2107 |
sendButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2108 |
stepButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2109 |
nextButton disable; beInvisible. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2110 |
nextOverButton notNil ifTrue:[nextOverButton disable; beInvisible]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2111 |
nextOutButton notNil ifTrue:[nextOutButton disable; beInvisible]. |
73 | 2112 |
|
2113 |
aProcess isNil ifTrue:[ |
|
11210 | 2114 |
terminateButton disable. |
2115 |
abortButton disable. |
|
2116 |
continueButton disable. |
|
2117 |
returnButton disable. |
|
2118 |
restartButton disable. |
|
73 | 2119 |
] ifFalse:[ |
11210 | 2120 |
(aProcess suspendedContext isNil |
2121 |
or:[aProcess isSystemProcess]) ifTrue:[ |
|
2122 |
terminateButton disable. |
|
2123 |
]. |
|
2124 |
||
2125 |
self setContextSkippingInterruptContexts:aProcess suspendedContext. |
|
2126 |
||
2127 |
catchBlock := [ |
|
2128 |
catchBlock := nil. |
|
2129 |
contextArray := nil. |
|
2130 |
selectedContext := actualContext := firstContext := nil. |
|
2131 |
steppedContext := wrapperContext := nil. |
|
2132 |
||
2133 |
(exitAction == #terminate) ifTrue:[ |
|
2134 |
aProcess terminate. |
|
2135 |
]. |
|
2136 |
(exitAction == #quickTerminate) ifTrue:[ |
|
2137 |
aProcess terminateNoSignal. |
|
2138 |
]. |
|
2139 |
super destroy |
|
2140 |
]. |
|
73 | 2141 |
]. |
2142 |
self open |
|
316
7d529dfe8a99
disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents:
303
diff
changeset
|
2143 |
|
1092
059c29fac604
made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
2144 |
"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
|
2145 |
"Modified: 17.4.1997 / 13:01:57 / stefan" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2146 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2147 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2148 |
setInitialSelectionOnEntry:initialSelectionOrNil context:aContext |
3447 | 2149 |
|selection| |
2150 |
||
2151 |
selection := self initialSelectionOnEntry:initialSelectionOrNil context:aContext. |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2152 |
selection notNil ifTrue:[ |
11210 | 2153 |
self showSelection:selection. |
2154 |
contextView setSelection:selection. |
|
2155 |
selection > 1 ifTrue:[ |
|
2156 |
contextView scrollToLine:(selection - 1) |
|
2157 |
] |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2158 |
]. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2159 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2160 |
"Created: / 16.11.2001 / 17:28:07 / cg" |
3447 | 2161 |
"Modified: / 17.11.2001 / 20:27:21 / cg" |
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2162 |
! |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2163 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2164 |
turnOffAllButtons |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2165 |
terminateButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2166 |
continueButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2167 |
returnButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2168 |
restartButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2169 |
abortButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2170 |
nextButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2171 |
stepButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2172 |
sendButton turnOffWithoutRedraw. |
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2173 |
|
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2174 |
"Created: / 16.11.2001 / 17:36:18 / cg" |
266 | 2175 |
! ! |
2176 |
||
2177 |
!DebugView methodsFor:'help'! |
|
2178 |
||
8212 | 2179 |
flyByHelpDependsOnPositionIn:aView |
2180 |
"subclasses where the help-text depends upon the pointer position might |
|
2181 |
want to redefine this" |
|
2182 |
||
2183 |
^ aView == codeView |
|
2184 |
! |
|
2185 |
||
3510 | 2186 |
flyByHelpTextFor:aComponent |
2187 |
|s| |
|
2188 |
||
2189 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2190 |
s := 'Abort (unwind to eventLoop)' |
3510 | 2191 |
]. |
2192 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2193 |
s := 'Terminate process (close view)' |
3510 | 2194 |
]. |
2195 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2196 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2197 |
s := 'Stop' |
|
2198 |
] ifFalse:[ |
|
2199 |
s := 'Continue execution' |
|
2200 |
] |
|
3510 | 2201 |
]. |
2202 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2203 |
s := 'Step to next send (don''t enter into called methods)' |
3510 | 2204 |
]. |
2205 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2206 |
s := 'Step to next line (don''t enter into called methods)' |
3510 | 2207 |
]. |
2208 |
aComponent == nextOverButton ifTrue:[ |
|
11210 | 2209 |
s := 'Step over to cursor-line' |
3510 | 2210 |
]. |
2211 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2212 |
s := 'Step out to caller' |
3510 | 2213 |
]. |
2214 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2215 |
s := 'Send next message (enter into called methods)' |
3510 | 2216 |
]. |
2217 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2218 |
s := 'Return from selected method' |
3510 | 2219 |
]. |
2220 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2221 |
s := 'Restart selected method' |
3510 | 2222 |
]. |
2223 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2224 |
s := 'Toggle monitoring' |
3510 | 2225 |
]. |
2226 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2227 |
s := 'Update' |
3510 | 2228 |
]. |
8656 | 2229 |
aComponent == reportButton ifTrue:[ |
11210 | 2230 |
s := 'Send a defect report via eMail' |
8656 | 2231 |
]. |
3510 | 2232 |
s notNil ifTrue:[ |
11210 | 2233 |
^ resources string:s |
3510 | 2234 |
]. |
2235 |
^ nil |
|
2236 |
||
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2237 |
"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
|
2238 |
"Modified: / 18-06-2010 / 11:34:51 / cg" |
3510 | 2239 |
! |
2240 |
||
8212 | 2241 |
flyByHelpTextFor:aComponent at:aPointOrNil |
8396 | 2242 |
|s vline line col pos interval| |
8212 | 2243 |
|
2244 |
aComponent == codeView ifFalse:[^ nil]. |
|
2245 |
aPointOrNil isNil ifTrue:[^ nil]. |
|
9446 | 2246 |
self sensor motionEventPending ifTrue:[^ nil]. |
8212 | 2247 |
|
8396 | 2248 |
vline := codeView visibleLineOfY:aPointOrNil y. |
2249 |
col := codeView colOfX:aPointOrNil x inVisibleLine:vline. |
|
2250 |
line := codeView visibleLineToAbsoluteLine:vline. |
|
8212 | 2251 |
|
2252 |
pos := codeView characterPositionOfLine:line col:col. |
|
2253 |
interval := pos to:pos. |
|
2254 |
||
10205 | 2255 |
self |
11210 | 2256 |
withNodeValueAtInterval:interval |
2257 |
do:[:value :description | |
|
2258 |
|valueClassOrSizeString valueString| |
|
2259 |
||
2260 |
valueClassOrSizeString := valueString := ''. |
|
2261 |
||
2262 |
"/ some heuristics as when to show the class name (a purely subjective preference) |
|
2263 |
value isString ifTrue:[ |
|
2264 |
value isText ifTrue:[ |
|
2265 |
valueString := '"',(value contractTo:80),'"'. |
|
2266 |
] ifFalse:[ |
|
2267 |
valueString := value storeString contractTo:80. |
|
2268 |
]. |
|
2269 |
] ifFalse:[ |
|
2270 |
(value isBoolean |
|
2271 |
or:[ value isInteger |
|
2272 |
or:[ value isSymbol ]]) ifTrue:[ |
|
2273 |
valueString := value printString. |
|
2274 |
] ifFalse:[ |
|
2275 |
valueClassOrSizeString := ' (',value class name,')'. |
|
2276 |
||
2277 |
(value isArray |
|
2278 |
or:[ value isOrderedCollection ]) ifTrue:[ |
|
2279 |
valueClassOrSizeString := ' (size=',value size printString,')'. |
|
2280 |
]. |
|
2281 |
||
2282 |
Error handle:[:ex | |
|
2283 |
valueString := '??? (',ex description,')' |
|
2284 |
] do:[ |
|
2285 |
[ |
|
2286 |
valueString := value printString contractTo:80. |
|
2287 |
] valueWithWatchDog:[ valueString := value classNameWithArticle ] afterMilliseconds:30. |
|
2288 |
] |
|
2289 |
] |
|
2290 |
]. |
|
2291 |
description isEmptyOrNil ifTrue:[ |
|
2292 |
s := valueString , valueClassOrSizeString |
|
2293 |
] ifFalse:[ |
|
2294 |
s := description , ': ', valueString, valueClassOrSizeString |
|
2295 |
]. |
|
2296 |
]. |
|
8592 | 2297 |
"/ Transcript showCR:s. |
2298 |
^ s |
|
9446 | 2299 |
|
2300 |
"Modified: / 27-04-2010 / 17:51:53 / cg" |
|
8212 | 2301 |
! |
2302 |
||
266 | 2303 |
helpTextFor:aComponent |
2304 |
|s| |
|
2305 |
||
2306 |
aComponent == abortButton ifTrue:[ |
|
11210 | 2307 |
s := 'HELP_ABORT' |
266 | 2308 |
]. |
2309 |
aComponent == terminateButton ifTrue:[ |
|
11210 | 2310 |
s := 'HELP_TERMINATE' |
266 | 2311 |
]. |
2312 |
aComponent == continueButton ifTrue:[ |
|
11210 | 2313 |
continueButton label = (resources string:'Stop') ifTrue:[ |
2314 |
s := 'HELP_STOP' |
|
2315 |
] ifFalse:[ |
|
2316 |
s := 'HELP_CONTINUE' |
|
2317 |
] |
|
266 | 2318 |
]. |
2319 |
aComponent == stepButton ifTrue:[ |
|
11210 | 2320 |
s := 'HELP_STEP' |
266 | 2321 |
]. |
2322 |
aComponent == nextButton ifTrue:[ |
|
11210 | 2323 |
s := 'HELP_NEXT' |
266 | 2324 |
]. |
1065 | 2325 |
aComponent == nextOverButton ifTrue:[ |
11210 | 2326 |
s := 'HELP_NEXTOVER' |
1065 | 2327 |
]. |
2328 |
aComponent == nextOutButton ifTrue:[ |
|
11210 | 2329 |
s := 'HELP_NEXTOUT' |
1065 | 2330 |
]. |
266 | 2331 |
aComponent == stepButton ifTrue:[ |
11210 | 2332 |
s := 'HELP_STEP' |
266 | 2333 |
]. |
2334 |
aComponent == sendButton ifTrue:[ |
|
11210 | 2335 |
s := 'HELP_SEND' |
266 | 2336 |
]. |
2337 |
aComponent == returnButton ifTrue:[ |
|
11210 | 2338 |
s := 'HELP_RETURN' |
266 | 2339 |
]. |
2340 |
aComponent == restartButton ifTrue:[ |
|
11210 | 2341 |
s := 'HELP_RESTART' |
266 | 2342 |
]. |
2343 |
aComponent == contextView ifTrue:[ |
|
11210 | 2344 |
s := 'HELP_WALKBACK' |
266 | 2345 |
]. |
2346 |
aComponent == codeView ifTrue:[ |
|
11210 | 2347 |
s := 'HELP_CODEVIEW' |
266 | 2348 |
]. |
2349 |
aComponent == monitorToggle ifTrue:[ |
|
11210 | 2350 |
s := 'HELP_MONITOR' |
266 | 2351 |
]. |
2352 |
aComponent == updateButton ifTrue:[ |
|
11210 | 2353 |
s := 'HELP_UPDATE' |
266 | 2354 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2355 |
"/ aComponent == stopButton ifTrue:[ |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2356 |
"/ s := 'HELP_STOP' |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
2357 |
"/ ]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2358 |
(aComponent isComponentOf:receiverInspector) ifTrue:[ |
11210 | 2359 |
s := 'HELP_REC_INSP' |
266 | 2360 |
]. |
612
986e371232a2
isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents:
583
diff
changeset
|
2361 |
(aComponent isComponentOf:contextInspector) ifTrue:[ |
11210 | 2362 |
s := 'HELP_CON_INSP' |
266 | 2363 |
]. |
2364 |
||
2365 |
s notNil ifTrue:[ |
|
11210 | 2366 |
^ resources string:s |
266 | 2367 |
]. |
2368 |
^ nil |
|
2369 |
||
2370 |
"Modified: 29.8.1995 / 23:38:54 / claus" |
|
1065 | 2371 |
"Modified: 4.3.1997 / 01:54:03 / cg" |
266 | 2372 |
! ! |
2373 |
||
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
2374 |
!DebugView methodsFor:'initialization & release'! |
266 | 2375 |
|
2376 |
addToCurrentProject |
|
2377 |
"ignored here" |
|
2378 |
||
2379 |
^ self |
|
2380 |
! |
|
2381 |
||
2115 | 2382 |
destroy |
2383 |
"closing the debugger implies an abort or continue" |
|
2384 |
||
2404 | 2385 |
|m| |
2386 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
2387 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 2388 |
(self confirm:('Code modified - exit anyway ?')) |
2389 |
ifFalse:[ |
|
2390 |
^ self |
|
2391 |
] |
|
2115 | 2392 |
]. |
2393 |
||
2172
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2394 |
self autoUpdateOff. |
dc9b1ed43f64
turn off autoUpdate when destroyed
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
2395 |
|
2404 | 2396 |
(m := contextView middleButtonMenu) notNil ifTrue:[m hide]. |
2115 | 2397 |
inspecting ifFalse:[ |
11210 | 2398 |
"I am running on top of a process, abort or continue it" |
2399 |
||
2400 |
windowGroup notNil ifTrue:[ |
|
2401 |
windowGroup setProcess:nil. |
|
2402 |
]. |
|
2403 |
self uncacheMyself. |
|
2404 |
||
2405 |
"/ |
|
2406 |
"/ catch invalid return; |
|
2407 |
"/ this happens, when my process has somehow died (quickterminate) |
|
2408 |
"/ and I am a leftOver view, which gets terminated via the launchers |
|
2409 |
"/ #destroy-window function. |
|
2410 |
"/ |
|
2411 |
Context cannotReturnSignal handle:[:ex | |
|
2412 |
'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR. |
|
2413 |
self uncacheMyself. |
|
2414 |
Debugger newDebugger. |
|
2415 |
ex return. |
|
2416 |
] do:[ |
|
2417 |
AbortOperationRequest isHandled ifTrue:[ |
|
2418 |
self doAbort. |
|
2419 |
] ifFalse:[ |
|
2420 |
self doContinue |
|
2421 |
] |
|
2422 |
]. |
|
2423 |
"/ We don't reach this point normally |
|
2424 |
'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR. |
|
2425 |
Debugger newDebugger. |
|
2426 |
self uncacheMyself. |
|
2115 | 2427 |
]. |
2428 |
||
2299 | 2429 |
Debugger newDebugger. |
2115 | 2430 |
"/ since I am going to be destroyed, remove me from the cache |
2431 |
self uncacheMyself. |
|
2432 |
super destroy. |
|
2433 |
||
2434 |
"Modified: / 10.7.1997 / 17:15:41 / stefan" |
|
3434
05bfb9406e06
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3432
diff
changeset
|
2435 |
"Modified: / 16.11.2001 / 17:38:15 / cg" |
2115 | 2436 |
! |
2437 |
||
266 | 2438 |
initialize |
10205 | 2439 |
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel |
11305 | 2440 |
newLayout v exceptionAndTogglePanel codeToggleLabels| |
266 | 2441 |
|
2442 |
super initialize. |
|
2443 |
||
2340 | 2444 |
font := font onDevice:device. |
266 | 2445 |
|
8148 | 2446 |
verboseBacktrace := UserPreferences current verboseBacktraceInDebugger. |
2445
acd747458906
allow for breaks/halts in doIts to be optionally
Claus Gittinger <cg@exept.de>
parents:
2433
diff
changeset
|
2447 |
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of |
11210 | 2448 |
"/ the debugger |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
2449 |
|
266 | 2450 |
busy := false. |
2451 |
exclusive := false. |
|
2452 |
inspecting := false. |
|
2453 |
exitAction := nil. |
|
2454 |
bigStep := false. |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2455 |
stepHow := nil. |
266 | 2456 |
canContinue := false. |
2457 |
||
3269 | 2458 |
mH := 0. |
2459 |
||
3447 | 2460 |
menuPanel := MenuPanel in:self. |
8131 | 2461 |
menuPanel receiver:self. |
3447 | 2462 |
menuPanel verticalLayout:false. |
8131 | 2463 |
menu := self class menuSpec decodeAsLiteralArray. |
2464 |
menu findGuiResourcesIn:self. |
|
2465 |
menuPanel menu:menu. |
|
3447 | 2466 |
|
8161
c3a91c963a35
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8154
diff
changeset
|
2467 |
mH := menuPanel preferredHeight. |
3447 | 2468 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
2469 |
||
8148 | 2470 |
newLayout := UserPreferences current useNewLayoutInDebugger. |
2471 |
newLayout ifFalse:[ |
|
11210 | 2472 |
bpanel := HorizontalPanelView in:self. |
2473 |
||
2474 |
self initializeButtonsIn:bpanel. |
|
2475 |
||
2476 |
bH := bpanel preferredHeight + 5. |
|
2477 |
bpanel origin:(0.0 @ mH) |
|
2478 |
extent:(1.0 @ bH). |
|
2479 |
panel := VariableVerticalPanel |
|
2480 |
origin:(0.0 @ (mH + bH)) |
|
2481 |
corner:(1.0 @ 1.0) |
|
2482 |
in:self. |
|
2483 |
||
2484 |
v := self initializeContextListViewIn:panel. |
|
2485 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2486 |
||
2487 |
codePanel := View in:panel. |
|
2488 |
v := self initializeCodeViewIn:codePanel. |
|
2489 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
2490 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2491 |
||
2492 |
v := self initializeInspectorViewsIn:panel. |
|
2493 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2494 |
|
8148 | 2495 |
] ifTrue:[ |
11210 | 2496 |
bpanel1 := HorizontalPanelView in:self. |
2497 |
self initializeButtons1In:bpanel1. |
|
2498 |
||
2499 |
bH1 := bpanel1 preferredHeight + 5. |
|
2500 |
bpanel1 origin:(0.0 @ mH) |
|
2501 |
extent:(1.0 @ bH1). |
|
2502 |
panel := VariableVerticalPanel |
|
2503 |
origin:(0.0 @ (mH + bH1)) |
|
2504 |
corner:(1.0 @ 1.0) |
|
2505 |
in:self. |
|
2506 |
"/ panel showHandle:true. |
|
2507 |
"/ panel handlePosition:#left. |
|
2508 |
||
2509 |
v := self initializeContextListViewIn:panel. |
|
2510 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25). |
|
2511 |
||
2512 |
codePanel := View in:panel. |
|
2513 |
bpanel2 := HorizontalPanelView in:codePanel. |
|
2514 |
self initializeButtons2In:bpanel2. |
|
2515 |
||
2516 |
bH2 := bpanel2 preferredHeight + 5. |
|
2517 |
bpanel2 origin:(0.0 @ 0.0) |
|
2518 |
extent:(1.0 @ bH2). |
|
2519 |
||
2520 |
exceptionInfoLabel := Label label:''. |
|
2521 |
exceptionInfoLabel adjust:#left. |
|
2522 |
||
2523 |
exceptionAndTogglePanel := HorizontalPanelView in:codePanel. |
|
2524 |
exceptionAndTogglePanel horizontalLayout:#left. |
|
2525 |
exceptionAndTogglePanel |
|
2526 |
geometryLayout: |
|
2527 |
((LayoutFrame |
|
2528 |
origin:(0.0 @ 0.0) |
|
2529 |
corner:(1.0 @ 0.0)) |
|
2530 |
topOffset:bH2; |
|
2531 |
bottomOffset:(bH2 + exceptionInfoLabel preferredHeight + 6); |
|
2532 |
rightOffset:-2). |
|
2533 |
||
2534 |
methodCodeToggleSelectionHolder := 1 asValue. |
|
2535 |
methodCodeToggleSelectionHolder onChangeSend:#methodCodeToggleChanged to:self. |
|
11305 | 2536 |
codeToggleLabels := resources array:{ |
2537 |
'Showing Original Code (being executed, but obsolete)' asText backgroundColorizeAllWith:Color red lightened . |
|
2538 |
'Showing Current Code' asText backgroundColorizeAllWith:Color green lightened . |
|
2539 |
}. |
|
2540 |
methodCodeToggle := PopUpList label:codeToggleLabels first in:exceptionAndTogglePanel. |
|
2541 |
methodCodeToggle list:codeToggleLabels. |
|
11210 | 2542 |
methodCodeToggle useIndex:true. |
2543 |
methodCodeToggle model:methodCodeToggleSelectionHolder. |
|
2544 |
methodCodeToggle beInvisible. |
|
2545 |
||
2546 |
exceptionAndTogglePanel add:exceptionInfoLabel. |
|
2547 |
||
2548 |
v := self initializeCodeViewIn:codePanel. |
|
2549 |
v origin:(0.0 @ (bH2+exceptionInfoLabel preferredHeight+6)) corner:(1.0 @ 1.0). |
|
2550 |
codePanel origin:(0.0 @ 0.25) corner:(1.0 @ 0.75). |
|
2551 |
||
2552 |
v := self initializeInspectorViewsIn:panel. |
|
2553 |
v origin:(0.0 @ 0.75) corner:(1.0 @ 1.0). |
|
3269 | 2554 |
]. |
2555 |
||
3387 | 2556 |
DefaultDebuggerBackgroundColor notNil ifTrue:[ |
11210 | 2557 |
self allViewBackground:DefaultDebuggerBackgroundColor. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2558 |
]. |
9626 | 2559 |
LastExtent notNil ifTrue:[ |
11210 | 2560 |
self extent:LastExtent. |
9626 | 2561 |
]. |
2562 |
LastOrigin notNil ifTrue:[ |
|
11210 | 2563 |
self origin:LastOrigin. |
9626 | 2564 |
]. |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
2565 |
|
3269 | 2566 |
" |
2567 |
Debugger newDebugger |
|
2568 |
" |
|
3447 | 2569 |
|
11305 | 2570 |
"Modified: / 01-03-2012 / 14:28:38 / cg" |
3269 | 2571 |
! |
2572 |
||
10205 | 2573 |
initializeAbortButtonIn:bpanel |
2574 |
abortButton := Button |
|
11210 | 2575 |
label:(resources string:'Abort') |
2576 |
action:[ |
|
2577 |
abortButton turnOffWithoutRedraw. |
|
2578 |
self doAbort |
|
2579 |
] |
|
2580 |
in:bpanel. |
|
3447 | 2581 |
|
2582 |
"Created: / 17.11.2001 / 20:56:47 / cg" |
|
2583 |
"Modified: / 17.11.2001 / 20:57:17 / cg" |
|
2584 |
! |
|
2585 |
||
10205 | 2586 |
initializeButtons1In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2587 |
"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
|
2588 |
|
3447 | 2589 |
|separator| |
2590 |
||
10205 | 2591 |
bpanel horizontalLayout:#left. |
3447 | 2592 |
bpanel verticalLayout:#centerMax. |
2593 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2594 |
||
8194 | 2595 |
self initializeContinueButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2596 |
continueButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2597 |
|
9131 | 2598 |
"/ separator := View extent:(10 @ 5) in:bpanel. |
2599 |
"/ separator borderWidth:0; level:0. |
|
3447 | 2600 |
self initializeAbortButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2601 |
abortButton width:150. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2602 |
|
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2603 |
separator := View extent:(100 @ 5) in:bpanel. |
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2604 |
separator borderWidth:0; level:0. |
3269 | 2605 |
|
3447 | 2606 |
self initializeTerminateButtonIn:bpanel. |
2607 |
||
9131 | 2608 |
separator := View extent:(50 @ 5) in:bpanel. |
3447 | 2609 |
separator borderWidth:0; level:0. |
2610 |
||
2611 |
self initializeDefineButtonIn:bpanel. |
|
4356 | 2612 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2613 |
separator := View extent:(10 @ 5) in:bpanel. |
2614 |
separator borderWidth:0; level:0. |
|
2615 |
self initializeReportButtonIn:bpanel. |
|
4356 | 2616 |
]. |
3447 | 2617 |
"Modified: / 17.11.2001 / 21:02:59 / cg" |
3269 | 2618 |
! |
2619 |
||
10205 | 2620 |
initializeButtons2In:bpanel |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
2621 |
"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
|
2622 |
|
3269 | 2623 |
|separator| |
2624 |
||
9131 | 2625 |
bpanel horizontalLayout:#left. |
3269 | 2626 |
bpanel verticalLayout:#centerMax. |
2627 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2628 |
||
3447 | 2629 |
self initializeNextButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2630 |
nextButton width:100. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2631 |
|
3447 | 2632 |
self initializeStepButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2633 |
stepButton width:100. |
3447 | 2634 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2635 |
"/ cg: |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2636 |
"/ 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
|
2637 |
"/ 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
|
2638 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2639 |
|
3269 | 2640 |
|
2305
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2641 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2642 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2643 |
"/ img := (resources at:'next') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2644 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2645 |
"/ nextButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2646 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2647 |
"/ action:[stepButton turnOff. self doNext] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2648 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2649 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2650 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2651 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2652 |
"/ img := (resources at:'over') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2653 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2654 |
"/ nextOverButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2655 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2656 |
"/ action:[stepButton turnOff. self doNextOver] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2657 |
"/ in:bpanel. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2658 |
"/ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2659 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2660 |
"/ img isNil ifTrue:[ |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2661 |
"/ img := (resources at:'out') |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2662 |
"/ ]. |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2663 |
"/ nextOutButton := Button |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2664 |
"/ label:img |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2665 |
"/ action:[stepButton turnOff. self doNextOut] |
4df4dcd30c13
disabled the stepIn / stepOut buttons - for now
Claus Gittinger <cg@exept.de>
parents:
2299
diff
changeset
|
2666 |
"/ in:bpanel. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2667 |
|
3447 | 2668 |
self initializeSendButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2669 |
sendButton width:100. |
3447 | 2670 |
|
1398
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2671 |
separator := View extent:(30 @ 5) in:bpanel. |
d3f02207f847
rearranged buttons (terminate was too exposed);
Claus Gittinger <cg@exept.de>
parents:
1394
diff
changeset
|
2672 |
separator borderWidth:0; level:0. |
3269 | 2673 |
|
3447 | 2674 |
self initializeReturnButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2675 |
returnButton width:100. |
3447 | 2676 |
self initializeRestartButtonIn:bpanel. |
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2677 |
restartButton width:100. |
3447 | 2678 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
2679 |
"Modified: / 18-06-2010 / 08:32:05 / cg" |
3269 | 2680 |
! |
2681 |
||
10205 | 2682 |
initializeButtonsIn:bpanel |
3269 | 2683 |
|separator| |
2684 |
||
2685 |
bpanel horizontalLayout:#left. |
|
2686 |
bpanel verticalLayout:#centerMax. |
|
2687 |
bpanel verticalSpace:ViewSpacing // 2. |
|
2688 |
||
3447 | 2689 |
self initializeAbortButtonIn:bpanel. |
2690 |
||
3269 | 2691 |
separator := View extent:(10 @ 5) in:bpanel. |
2692 |
separator borderWidth:0; level:0. |
|
2693 |
||
3447 | 2694 |
self initializeContinueButtonIn:bpanel. |
3269 | 2695 |
|
2696 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2697 |
separator borderWidth:0; level:0. |
|
2698 |
||
10205 | 2699 |
self initializeReturnButtonIn:bpanel. |
2700 |
self initializeRestartButtonIn:bpanel. |
|
3269 | 2701 |
|
2702 |
separator := View extent:(10 @ 5) in:bpanel. |
|
2703 |
separator borderWidth:0; level:0. |
|
2704 |
||
3447 | 2705 |
self initializeNextButtonIn:bpanel. |
2706 |
self initializeStepButtonIn:bpanel. |
|
2707 |
||
3269 | 2708 |
"/ cg: |
2709 |
"/ I disabled the stepIn / stepOut buttons - for now. |
|
2710 |
"/ they do not work relyable with inlined blocks yet. |
|
2711 |
"/ |
|
2712 |
||
2713 |
||
2714 |
"/ img := Image fromFile:'bitmaps/stepIn.xpm'. |
|
2715 |
"/ img isNil ifTrue:[ |
|
2716 |
"/ img := (resources at:'next') |
|
2717 |
"/ ]. |
|
2718 |
"/ nextButton := Button |
|
2719 |
"/ label:img |
|
2720 |
"/ action:[stepButton turnOff. self doNext] |
|
2721 |
"/ in:bpanel. |
|
2722 |
"/ |
|
2723 |
"/ img := Image fromFile:'bitmaps/stepOver.xpm'. |
|
2724 |
"/ img isNil ifTrue:[ |
|
2725 |
"/ img := (resources at:'over') |
|
2726 |
"/ ]. |
|
2727 |
"/ nextOverButton := Button |
|
2728 |
"/ label:img |
|
2729 |
"/ action:[stepButton turnOff. self doNextOver] |
|
2730 |
"/ in:bpanel. |
|
2731 |
"/ |
|
2732 |
"/ img := Image fromFile:'bitmaps/stepOut.xpm'. |
|
2733 |
"/ img isNil ifTrue:[ |
|
2734 |
"/ img := (resources at:'out') |
|
2735 |
"/ ]. |
|
2736 |
"/ nextOutButton := Button |
|
2737 |
"/ label:img |
|
2738 |
"/ action:[stepButton turnOff. self doNextOut] |
|
2739 |
"/ in:bpanel. |
|
2740 |
||
3447 | 2741 |
self initializeSendButtonIn:bpanel. |
2742 |
||
3187 | 2743 |
separator := View extent:(30 @ 5) in:bpanel. |
2744 |
separator borderWidth:0; level:0. |
|
3269 | 2745 |
|
3447 | 2746 |
self initializeTerminateButtonIn:bpanel. |
2747 |
||
3269 | 2748 |
separator := View extent:(30 @ 5) in:bpanel. |
2749 |
separator borderWidth:0; level:0. |
|
2750 |
||
3447 | 2751 |
self initializeDefineButtonIn:bpanel. |
4356 | 2752 |
(UserPreferences current allowSendMailFromDebugger and:[SendMailTool notNil]) ifTrue:[ |
11210 | 2753 |
self initializeReportButtonIn:bpanel. |
4356 | 2754 |
]. |
2755 |
||
3447 | 2756 |
|
2757 |
"Created: / 17.11.2001 / 20:56:20 / cg" |
|
2758 |
"Modified: / 17.11.2001 / 21:03:18 / cg" |
|
3269 | 2759 |
! |
2760 |
||
2761 |
initializeCodeViewIn:panel |
|
2762 |
|v| |
|
2763 |
||
10628 | 2764 |
(UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
2765 |
v := codeView := Tools::CodeView2 in: panel. |
|
2766 |
codeView model: ValueHolder new. |
|
2767 |
codeView methodHolder: ValueHolder new. |
|
2768 |
codeView classHolder: ValueHolder new. |
|
2769 |
] ifFalse:[ |
|
2770 |
v := HVScrollableView |
|
2771 |
for:CodeView |
|
2772 |
miniScrollerH:true |
|
2773 |
miniScrollerV:false |
|
2774 |
in:panel. |
|
2775 |
||
2776 |
"/ v autoHideScrollBars:true. |
|
2777 |
codeView := v scrolledView. |
|
2778 |
codeView enableMotionEvents. "/ for active help |
|
2779 |
]. |
|
3269 | 2780 |
|
2781 |
^ v |
|
10628 | 2782 |
|
2783 |
"Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3269 | 2784 |
! |
2785 |
||
2786 |
initializeContextListViewIn:panel |
|
2787 |
|v| |
|
266 | 2788 |
|
10205 | 2789 |
v := HVScrollableView |
11210 | 2790 |
for:SelectionInListView |
2791 |
miniScrollerH:true |
|
2792 |
miniScrollerV:false |
|
2793 |
in:panel. |
|
3034
fad21a9a02bd
context-list is horizontal scrollable
Claus Gittinger <cg@exept.de>
parents:
3033
diff
changeset
|
2794 |
v autoHideHorizontalScrollBar:true. |
266 | 2795 |
|
2796 |
contextView := v scrolledView. |
|
2797 |
contextView action:[:lineNr | self showSelection:lineNr]. |
|
3269 | 2798 |
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
|
2799 |
contextView selectConditionBlock:[:line | self checkSelectionChangeAllowed:line]. |
266 | 2800 |
|
10205 | 2801 |
contextView middleButtonMenu:(self middleButtonMenu). |
5453 | 2802 |
|
3269 | 2803 |
^ v |
2804 |
! |
|
2805 |
||
5453 | 2806 |
initializeContextViewsMiddleButtonMenu |
2807 |
<resource: #programMenu > |
|
2808 |
||
10205 | 2809 |
contextView middleButtonMenu:(self middleButtonMenu). |
2810 |
! |
|
2811 |
||
2812 |
initializeContinueButtonIn:bpanel |
|
2813 |
continueButton := Button |
|
11210 | 2814 |
label:(resources string:'Continue') |
2815 |
action:[ |
|
2816 |
continueButton turnOffWithoutRedraw. |
|
2817 |
self doContinue |
|
2818 |
] |
|
2819 |
in:bpanel. |
|
3447 | 2820 |
|
2821 |
"Created: / 17.11.2001 / 20:57:34 / cg" |
|
2822 |
! |
|
2823 |
||
10205 | 2824 |
initializeDefineButtonIn:bpanel |
2825 |
defineButton := Button |
|
11210 | 2826 |
label:(resources string:'Define') |
2827 |
action:[ |
|
2828 |
defineButton turnOffWithoutRedraw. |
|
2829 |
self doDefine |
|
2830 |
] |
|
2831 |
in:bpanel. |
|
3447 | 2832 |
defineButton beInvisible |
2833 |
||
2834 |
"Created: / 17.11.2001 / 21:02:48 / cg" |
|
2835 |
! |
|
2836 |
||
3269 | 2837 |
initializeInspectorViewsIn:panel |
2838 |
|hpanel| |
|
266 | 2839 |
|
2840 |
hpanel := VariableHorizontalPanel in:panel. |
|
2841 |
||
2842 |
receiverInspector := InspectorView |
|
11210 | 2843 |
origin:(0.0 @ 0.0) corner:(0.5 @ 1.0) |
2844 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2845 |
receiverInspector fieldListLabel:'Receiver'. |
266 | 2846 |
|
2847 |
contextInspector := ContextInspectorView |
|
11210 | 2848 |
origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
2849 |
in:hpanel. |
|
4103
6c0eb2985cee
label: -> fieldListLabel: in inspector
Claus Gittinger <cg@exept.de>
parents:
3998
diff
changeset
|
2850 |
contextInspector fieldListLabel:'Context'. |
646
04dafb2560bf
added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2851 |
|
3269 | 2852 |
^ hpanel |
266 | 2853 |
! |
2854 |
||
10205 | 2855 |
initializeNextButtonIn:bpanel |
2856 |
nextButton := Button |
|
11210 | 2857 |
label:(resources string:'Debug_Next') |
2858 |
action:[ |
|
2859 |
stepButton turnOff. |
|
2860 |
self doNext |
|
2861 |
] |
|
2862 |
in:bpanel. |
|
3447 | 2863 |
|
2864 |
"Created: / 17.11.2001 / 20:59:38 / cg" |
|
2865 |
! |
|
2866 |
||
10205 | 2867 |
initializeReportButtonIn:bpanel |
2868 |
reportButton := Button |
|
11210 | 2869 |
label:(resources string:'Report by Mail...') |
2870 |
action:[ |
|
2871 |
reportButton turnOffWithoutRedraw. |
|
2872 |
self doOpenReportMailApp. |
|
2873 |
] |
|
2874 |
in:bpanel. |
|
4356 | 2875 |
|
2876 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
|
2877 |
! |
|
2878 |
||
10205 | 2879 |
initializeRestartButtonIn:bpanel |
2880 |
restartButton := Button |
|
11210 | 2881 |
label:(resources string:'Restart') |
2882 |
action:[ |
|
2883 |
restartButton turnOff. |
|
2884 |
self doRestart |
|
2885 |
] |
|
2886 |
in:bpanel. |
|
3447 | 2887 |
|
2888 |
"Created: / 17.11.2001 / 20:58:52 / cg" |
|
2889 |
! |
|
2890 |
||
10205 | 2891 |
initializeReturnButtonIn:bpanel |
2892 |
returnButton := Button |
|
11210 | 2893 |
label:(resources string:'Return') |
2894 |
action:[ |
|
2895 |
returnButton turnOff. |
|
2896 |
self doReturn |
|
2897 |
] |
|
2898 |
in:bpanel. |
|
3447 | 2899 |
|
2900 |
"Created: / 17.11.2001 / 20:58:22 / cg" |
|
2901 |
! |
|
2902 |
||
10205 | 2903 |
initializeSendButtonIn:bpanel |
2904 |
sendButton := Button |
|
11210 | 2905 |
label:(resources string:'Send') |
2906 |
action:[ |
|
2907 |
sendButton turnOff. |
|
2908 |
self doSend |
|
2909 |
] |
|
2910 |
in:bpanel. |
|
3447 | 2911 |
|
2912 |
"Created: / 17.11.2001 / 21:01:20 / cg" |
|
2913 |
! |
|
2914 |
||
10205 | 2915 |
initializeStepButtonIn:bpanel |
2916 |
stepButton := Button |
|
11210 | 2917 |
label:(resources string:'Debug_Step') |
2918 |
action:[ |
|
2919 |
stepButton turnOff. |
|
2920 |
self doStep |
|
2921 |
] |
|
2922 |
in:bpanel. |
|
3447 | 2923 |
|
2924 |
"Created: / 17.11.2001 / 21:00:13 / cg" |
|
2925 |
! |
|
2926 |
||
10205 | 2927 |
initializeTerminateButtonIn:bpanel |
2928 |
terminateButton := Button |
|
11210 | 2929 |
label:(resources string:'Debug_Terminate') |
2930 |
action:[ |
|
2931 |
terminateButton turnOffWithoutRedraw. |
|
2932 |
self doTerminate |
|
2933 |
] |
|
2934 |
in:bpanel. |
|
3447 | 2935 |
|
9135
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2936 |
terminateButton backgroundColor:Color red lightened. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2937 |
"/ terminateButton foregroundColor:Color red. |
b686c004104c
comment/format in: #initializeStepButtonIn:
Claus Gittinger <cg@exept.de>
parents:
9133
diff
changeset
|
2938 |
|
3447 | 2939 |
"Created: / 17.11.2001 / 21:02:20 / cg" |
266 | 2940 |
! |
2941 |
||
1249 | 2942 |
postRealize |
2943 |
super postRealize. |
|
266 | 2944 |
|
2945 |
inspecting ifTrue:[ |
|
11210 | 2946 |
inspectedProcess notNil ifTrue:[ |
2947 |
" |
|
2948 |
set prio somewhat higher (by 2, to allow walkBack-update process |
|
2949 |
to run between mine and the debugged processes prio) |
|
2950 |
" |
|
2951 |
Processor activeProcess |
|
2952 |
priority:(((inspectedProcess priority + 2) min:(Processor highIOPriority)) max:(Processor userSchedulingPriority+1)). |
|
2953 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2954 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2955 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
2956 |
self sensor addEventListener:self. |
1249 | 2957 |
|
2958 |
"Created: 24.7.1997 / 18:17:44 / cg" |
|
266 | 2959 |
! |
2960 |
||
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2961 |
reinitialize |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2962 |
"/ 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
|
2963 |
"/ 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
|
2964 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2965 |
drawableId notNil ifTrue:[ |
11210 | 2966 |
^ self |
2150
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2967 |
]. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2968 |
"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
|
2969 |
self recreate. |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2970 |
|
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2971 |
! |
a3148483962e
do not re-realize a debugView after a snapshot-restart
Claus Gittinger <cg@exept.de>
parents:
2115
diff
changeset
|
2972 |
|
266 | 2973 |
setLabelFor:aMessage in:aProcess |
9403 | 2974 |
|l lines processNameOrNil pidOrNil osPidString| |
6821 | 2975 |
|
2976 |
lines := aMessage asStringCollection. |
|
2977 |
lines size > 1 ifTrue:[ |
|
11210 | 2978 |
l := lines first |
6821 | 2979 |
] ifFalse:[ |
11210 | 2980 |
l := aMessage. |
6821 | 2981 |
]. |
2982 |
||
2983 |
l := l , ' ('. |
|
4644
e6dd5c21b9c0
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4356
diff
changeset
|
2984 |
Error handle:[:ex | |
11210 | 2985 |
l := l , '???' |
1030 | 2986 |
] do:[ |
11210 | 2987 |
processNameOrNil := aProcess name. |
2988 |
processNameOrNil notNil ifTrue:[ |
|
2989 |
l := l , (processNameOrNil contractTo:20) , ''. |
|
2990 |
]. |
|
2991 |
pidOrNil := aProcess id printString. |
|
2992 |
l := l , '[' , pidOrNil , ']'. |
|
73 | 2993 |
]. |
1030 | 2994 |
l := l , ')'. |
266 | 2995 |
self label:l. |
6821 | 2996 |
|
10205 | 2997 |
((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
11210 | 2998 |
osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
9403 | 2999 |
]. |
3000 |
||
8305 | 3001 |
exceptionInfoLabel notNil ifTrue:[ |
11210 | 3002 |
exceptionInfoLabel |
3003 |
label:(resources |
|
3004 |
string:'Exception: %1 in process %2 [%3]%4' |
|
3005 |
with:(lines first colorizeAllWith:Color red) |
|
3006 |
with:(processNameOrNil ? '') |
|
3007 |
with:(pidOrNil ? '') |
|
3008 |
with:(osPidString ? '')) |
|
8305 | 3009 |
]. |
3010 |
||
6821 | 3011 |
"Modified: / 06-07-2006 / 12:43:19 / cg" |
0 | 3012 |
! ! |
3013 |
||
3014 |
!DebugView methodsFor:'interrupt handling'! |
|
3015 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3016 |
contextInterrupt |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3017 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3018 |
'contextIRQ' printCR. |
3019 |
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
|
3020 |
]. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3021 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3022 |
|
1364 | 3023 |
"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
|
3024 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3025 |
|
0 | 3026 |
stepInterrupt |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3027 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3028 |
'stepIRQ' printCR. |
3029 |
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
|
3030 |
]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3031 |
Processor yield. |
5340
8e2526806312
return value of stepInterrupt, contextInterrupt and stepOrNext
Claus Gittinger <cg@exept.de>
parents:
5271
diff
changeset
|
3032 |
self stepOrNext |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3033 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
3034 |
"Modified: / 13.1.1998 / 21:14:11 / cg" |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3035 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3036 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3037 |
stepOrNext |
10205 | 3038 |
|where here con s isWrap method wrappedMethod |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3039 |
inBlock left ignore contextBelow lastWrappedContext |
10205 | 3040 |
leftWrap enteredWrap anyStepBlocks |
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3041 |
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
|
3042 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3043 |
"/ DebuggingDebugger := true |
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3044 |
"/ DebuggingDebugger := false |
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
3045 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3046 |
processName := (Processor activeProcess nameOrId),' [',Processor activeProcess id printString,']'. |
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3047 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3048 |
skipLineNr == #return ifTrue:[ |
11210 | 3049 |
self label:('stepping context returned ' , ' (process: ' , processName , ')'). |
3050 |
here := thisContext sender sender. |
|
3051 |
here setLineNumber:nil. |
|
3052 |
here := nil. |
|
3053 |
con := thisContext sender sender sender. |
|
3054 |
||
3055 |
HaltInterrupt handle:[:ex | |
|
3056 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [stepOrNext]' bindWith:ex suspendedContext) infoPrintCR. |
|
3057 |
ex proceed |
|
3058 |
] do:[ |
|
3059 |
self enter:con select:nil. |
|
3060 |
]. |
|
3061 |
con := nil. |
|
3062 |
^ self |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3063 |
]. |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
3064 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3065 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3066 |
"/ "/ 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
|
3067 |
"/ "/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3068 |
"/ stepForReturn == true ifTrue:[ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3069 |
"/"/'stepForreturn' printCR. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3070 |
"/ 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
|
3071 |
"/ ^ self |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3072 |
"/ ]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3073 |
|
52 | 3074 |
Processor activeProcess ~~ inspectedProcess ifTrue:[ |
11210 | 3075 |
'DebugView [info]: stray step interrupt' infoPrintCR. |
3076 |
^ self |
|
52 | 3077 |
]. |
3078 |
||
29 | 3079 |
here := thisContext. "stepInterrupt" |
10205 | 3080 |
here := here sender. "the caller; step- or contextIRQ" |
3081 |
here := here sender. "the interrupted context" |
|
29 | 3082 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3083 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3084 |
'*******' printCR. |
3085 |
'here in ' print. |
|
3086 |
inWrap ifTrue:['(wrap) ' print.]. |
|
3087 |
((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print. |
|
3088 |
here selector printCR. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3089 |
]. |
10 | 3090 |
|
2581 | 3091 |
"/ kludge an bug-workaround; |
3092 |
"/ I should not see those ... |
|
3093 |
||
3094 |
here selector == #ioInterrupt ifTrue:[ |
|
11210 | 3095 |
DebuggingDebugger == true ifTrue:[ |
3096 |
'oops - should not get that one' printCR. |
|
3097 |
]. |
|
3098 |
Processor ioInterrupt. |
|
3099 |
StepInterruptPending := 1. |
|
3100 |
InterruptPending := 1. |
|
3101 |
where := nil. here := nil. |
|
3102 |
InStepInterrupt := nil. |
|
3103 |
^ self |
|
2581 | 3104 |
]. |
3105 |
||
3106 |
stepUntilEntering notNil ifTrue:[ |
|
11210 | 3107 |
DebuggingDebugger == true ifTrue:[ |
3108 |
'check if entering ' print. stepUntilEntering printCR. |
|
3109 |
]. |
|
3110 |
(stepUntilEntering match:here selector) ifTrue:[ |
|
3111 |
DebuggingDebugger == true ifTrue:[ |
|
3112 |
'entering...' printCR. |
|
3113 |
]. |
|
3114 |
self label:('arrived at ' , stepUntilEntering , ' (process: ' , processName , ')'). |
|
3115 |
||
3116 |
lastStepUntilEntering := stepUntilEntering. |
|
3117 |
stepUntilEntering := nil. |
|
3118 |
self enter:here select:nil. |
|
3119 |
con := nil. |
|
3120 |
^ self |
|
3121 |
]. |
|
3122 |
"/ see if stepping context is still active ... |
|
3123 |
||
3124 |
con := here. |
|
3125 |
||
3126 |
DebuggingDebugger == true ifTrue:[ |
|
3127 |
'start searching at: ' print. |
|
3128 |
con fullPrint. |
|
3129 |
]. |
|
3130 |
[con notNil and:[con ~~ steppedContext]] whileTrue:[ |
|
3131 |
con := con sender |
|
3132 |
]. |
|
3133 |
con notNil ifTrue:[ |
|
3134 |
DebuggingDebugger == true ifTrue:[ |
|
3135 |
'steppingContext still active - continue stepping' printCR. |
|
3136 |
]. |
|
3137 |
con := nil. |
|
3138 |
where := nil. here := nil. |
|
3139 |
StepInterruptPending := 1. |
|
3140 |
InterruptPending := 1. |
|
3141 |
InStepInterrupt := nil. |
|
3142 |
^ self |
|
3143 |
]. |
|
3144 |
stepUntilEntering := nil. |
|
2581 | 3145 |
]. |
3146 |
||
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3147 |
" |
10205 | 3148 |
kludge to hide breakpoint wrappers in the context list: |
11210 | 3149 |
check if we are in a wrapper methods hidden setup-sequence |
3150 |
if so, ignore the interrupt and continue single sending |
|
781
33e4d40fddbe
better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
3151 |
" |
29 | 3152 |
isWrap := false. |
57 | 3153 |
left := false. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3154 |
leftWrap := enteredWrap := false. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3155 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3156 |
where := here. |
57 | 3157 |
inWrap ifTrue:[ |
11210 | 3158 |
wrappedMethod := nil. |
3159 |
5 timesRepeat:[ |
|
3160 |
(where notNil and:[where isBlockContext not]) ifTrue:[ |
|
3161 |
method := where method. |
|
3162 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3163 |
" |
|
3164 |
in a wrapper method |
|
3165 |
" |
|
3166 |
wrappedMethod ~~ method ifTrue:[ |
|
3167 |
wrappedMethod := method. |
|
3168 |
lastWrappedContext := where. |
|
3169 |
where sender receiver == method originalMethod ifFalse:[ |
|
3170 |
isWrap := true. |
|
3171 |
] |
|
3172 |
] ifFalse:[ |
|
3173 |
where == steppedContext ifTrue:[ |
|
3174 |
||
3175 |
DebuggingDebugger == true ifTrue:[ |
|
3176 |
'change stepCon from: ' print. |
|
3177 |
steppedContext print. |
|
3178 |
' to lastWrapped: ' print. |
|
3179 |
lastWrappedContext printCR. |
|
3180 |
]. |
|
3181 |
||
3182 |
inWrap := false. |
|
3183 |
leftWrap := true. |
|
3184 |
wrapperContext := steppedContext. |
|
3185 |
steppedContext := lastWrappedContext |
|
3186 |
] |
|
3187 |
] |
|
3188 |
]. |
|
3189 |
where := where sender |
|
3190 |
] |
|
3191 |
]. |
|
29 | 3192 |
]. |
3193 |
||
3194 |
isWrap ifTrue:[ |
|
11210 | 3195 |
DebuggingDebugger == true ifTrue:[ |
3196 |
'ignore wrap' printCR. |
|
3197 |
]. |
|
3198 |
||
3199 |
"/ |
|
3200 |
"/ ignore, while in wrappers hidden setup |
|
3201 |
"/ |
|
3202 |
where := nil. here := nil. |
|
3203 |
ObjectMemory flushInlineCaches. |
|
3204 |
||
3205 |
skipLineNr == #return ifTrue:[ |
|
3206 |
DebuggingDebugger == true ifTrue:[ |
|
3207 |
'skipRet in wrap' printCR. |
|
3208 |
] |
|
3209 |
]. |
|
3210 |
||
3211 |
StepInterruptPending := 1. |
|
3212 |
InterruptPending := 1. |
|
3213 |
InStepInterrupt := nil. |
|
3214 |
^ self |
|
29 | 3215 |
]. |
3216 |
||
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3217 |
inBlock := inBlockBelow := anyStepBlocks := false. |
57 | 3218 |
|
2581 | 3219 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3220 |
'bigStep is: ' print. bigStep printCR. |
3221 |
'steppedContext is: ' print. steppedContext printCR. |
|
2581 | 3222 |
]. |
3223 |
||
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3224 |
"/ |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3225 |
"/ 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
|
3226 |
"/ |
10205 | 3227 |
(bigStep |
787
dab2fdc4a811
care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents:
786
diff
changeset
|
3228 |
and:[steppedContext notNil]) ifTrue:[ |
11210 | 3229 |
" |
3230 |
a step or next - ignore all contexts below the interesting one |
|
3231 |
" |
|
3232 |
where := here. "the interrupted context" |
|
3233 |
contextBelow := nil. |
|
3234 |
||
3235 |
where home notNil ifTrue:[ |
|
3236 |
"/ |
|
3237 |
"/ in a block called by 'our' context ? |
|
3238 |
"/ |
|
3239 |
where home == steppedContext ifTrue:[ |
|
3055 | 3240 |
"/ '*block*' printCR. |
11210 | 3241 |
inBlock := true |
3242 |
] |
|
3243 |
]. |
|
3244 |
||
3245 |
where == steppedContext ifFalse:[ |
|
3246 |
where := where sender. |
|
3247 |
||
3248 |
where notNil ifTrue:[ |
|
3249 |
where home == steppedContext ifTrue:[ |
|
3055 | 3250 |
"/ '*block*' printCR. |
11210 | 3251 |
inBlock := true. |
3252 |
] |
|
3253 |
]. |
|
57 | 3254 |
|
3255 |
"/ 'looking for ' print. |
|
3055 | 3256 |
"/ (steppedContextAddress printStringRadix:16)print. '' printCR. |
57 | 3257 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3258 |
"/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
|
3259 |
"/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
|
3260 |
|
11210 | 3261 |
where == steppedContext ifFalse:[ |
3262 |
||
3263 |
"/ check if we are in a context below steppedContext |
|
3264 |
"/ (i.e. if steppedContext can be reached from |
|
3265 |
"/ interrupted context. Not using context-ref but its |
|
3266 |
"/ address to avoid creation of many useless contexts.) |
|
3267 |
||
3268 |
inBlock ifFalse:[ |
|
3269 |
[where notNil] whileTrue:[ |
|
3270 |
||
3271 |
"/ if either the receiver or any arg of this context |
|
3272 |
"/ is a block of the steppedContext, we must really |
|
3273 |
"/ do a single step. Otherwise, stepping through a |
|
3274 |
"/ do:-loop would be very difficult. |
|
3275 |
receiver := where receiver. |
|
3276 |
(receiver isBlock |
|
3277 |
and:[(receiver isKindOf:Block) |
|
3278 |
and:[receiver home == steppedContext]]) |
|
3279 |
ifTrue:[ |
|
3280 |
anyStepBlocks := true. |
|
3281 |
] ifFalse:[ |
|
3282 |
where args do:[:arg | |
|
3283 |
(arg isBlock |
|
3284 |
and:[(arg isKindOf:Block) |
|
3285 |
and:[arg home == steppedContext]]) |
|
3286 |
ifTrue:[ |
|
3287 |
anyStepBlocks := true. |
|
3288 |
] |
|
3289 |
] |
|
3290 |
]. |
|
3291 |
||
3292 |
DebuggingDebugger == true ifTrue:[ |
|
3293 |
((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
|
3294 |
where selector printCR. |
|
3295 |
]. |
|
3296 |
||
3297 |
where == steppedContext ifTrue:[ |
|
3055 | 3298 |
"/ 'found it - below; ignore' printCR. |
11210 | 3299 |
" |
3300 |
found the interesting context somwehere up in the |
|
3301 |
chain. We seem to be still below the interesting one ... |
|
3302 |
" |
|
3303 |
tracing == true ifTrue:[ |
|
3304 |
here printString printCR |
|
3305 |
]. |
|
3306 |
" |
|
3307 |
yes, a context below |
|
3308 |
- continue and schedule another stepInterrupt. |
|
3309 |
Must flush caches since optimized methods not always |
|
3310 |
look for pending interrupts |
|
3311 |
" |
|
3312 |
||
3313 |
contextBelow notNil ifTrue:[ |
|
3055 | 3314 |
"/ '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
|
3315 |
"/ 'con= ' print. contextBelow printCR. |
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3316 |
"/ contextBelow selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3317 |
"/ 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
|
3318 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3319 |
|
11210 | 3320 |
DebuggingDebugger == true ifTrue:[ |
3321 |
'below stepCon; continue until unwind of: ' print. |
|
3322 |
contextBelow printCR. |
|
3323 |
]. |
|
3324 |
Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
|
3325 |
StepInterruptPending := nil. |
|
3326 |
] ifFalse:[ |
|
3327 |
ObjectMemory flushInlineCaches. |
|
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3328 |
|
1613
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3329 |
"/ here selector notNil ifTrue:[ |
3590eeac968f
dont change the windowTitle while stepping (its too slow)
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
3330 |
"/ 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
|
3331 |
"/ ]. |
1399
35674d7ac5bc
handle contextVars in codeViews doIt.
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
3332 |
|
11210 | 3333 |
DebuggingDebugger == true ifTrue:[ |
3334 |
'in stepCon; continue single stepping' printCR. |
|
3335 |
]. |
|
3336 |
StepInterruptPending := 1. |
|
3337 |
InterruptPending := 1. |
|
3338 |
]. |
|
3339 |
where := nil. here := nil. |
|
3340 |
InStepInterrupt := nil. |
|
3341 |
||
3342 |
^ self |
|
3343 |
]. |
|
3344 |
||
3345 |
(steppedContext notNil and:[ |
|
3346 |
where methodHome == steppedContext methodHome]) ifTrue:[ |
|
3347 |
inBlockBelow := true. |
|
3348 |
]. |
|
3349 |
||
3350 |
anyStepBlocks ifFalse:[ |
|
3351 |
inBlock ifFalse:[ |
|
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3352 |
"/ workaround a VM bug, |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3353 |
"/ 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
|
3354 |
"/ sigh |
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3355 |
where isBlockContext ifFalse:[ |
11210 | 3356 |
contextBelow := where |
2633
41bd35e18e4e
line-stepping into blocks fixed.
Claus Gittinger <cg@exept.de>
parents:
2591
diff
changeset
|
3357 |
]. |
11210 | 3358 |
] |
3359 |
]. |
|
3360 |
where := where sender |
|
3361 |
]. |
|
3362 |
s := 'context returned'. |
|
3363 |
left := true. |
|
3364 |
]. |
|
3365 |
] ifTrue:[ |
|
3055 | 3366 |
"/ 'found it right in sender' printCR. |
11210 | 3367 |
s := 'after step' |
3368 |
]. |
|
3369 |
] ifTrue:[ |
|
3055 | 3370 |
"/ 'found it right away' printCR. |
11210 | 3371 |
s := 'after step' |
3372 |
]. |
|
0 | 3373 |
] ifFalse:[ |
3055 | 3374 |
"/ ' send' printCR. |
11210 | 3375 |
" |
3376 |
a send |
|
3377 |
" |
|
3378 |
DebuggingDebugger == true ifTrue:[ |
|
3379 |
'clear steppedContext' printCR. |
|
3380 |
]. |
|
3381 |
steppedContext := nil. |
|
3382 |
s := 'after send' |
|
0 | 3383 |
]. |
7 | 3384 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3385 |
ignore := false. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3386 |
(inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[ |
11210 | 3387 |
ignore := true. |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
3388 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3389 |
|
790 | 3390 |
"/ handle the case, when a subBlock leaves; |
3391 |
"/ continue stepping in the home context. |
|
3392 |
||
3393 |
left ifTrue:[ |
|
11210 | 3394 |
steppedContext home notNil ifTrue:[ |
3395 |
steppedContext := steppedContext home. |
|
3396 |
s := 'after step'. |
|
3397 |
left := false. |
|
803
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3398 |
"/ DebugView enterUnconditional:thisContext withMessage:'debug'. |
f8371812c789
fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents:
801
diff
changeset
|
3399 |
|
11210 | 3400 |
] |
790 | 3401 |
]. |
3402 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3403 |
" |
10205 | 3404 |
kludge to hide breakpoint wrappers in the context list: |
11210 | 3405 |
check if we are in a wrapper methods hidden exit-sequence |
3406 |
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
|
3407 |
" |
10205 | 3408 |
(where isNil |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3409 |
and:[wrapperContext notNil]) |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3410 |
ifTrue:[ |
11210 | 3411 |
"/ did not find our steppedContext along the chain; |
3412 |
"/ could be in a wrappedMethods exitBlock ... |
|
3413 |
||
3414 |
leftWrap ifFalse:[ |
|
3415 |
where := here. |
|
3416 |
wrappedMethod := nil. |
|
3417 |
5 timesRepeat:[ |
|
3418 |
where notNil ifTrue:[ |
|
3419 |
where isBlockContext ifFalse:[ |
|
3420 |
method := where method. |
|
3421 |
(method notNil and:[method isWrapped]) ifTrue:[ |
|
3422 |
where == wrapperContext ifTrue:[ |
|
3423 |
DebuggingDebugger == true ifTrue:[ |
|
3424 |
'change stepCon fromWrapped: ' print. |
|
3425 |
steppedContext print. |
|
3426 |
' to: ' print. |
|
3427 |
wrapperContext printCR. |
|
3428 |
]. |
|
3429 |
||
3430 |
inWrap := true. |
|
3431 |
enteredWrap := true. |
|
3432 |
steppedContext := wrapperContext. |
|
3433 |
wrapperContext := nil. |
|
3434 |
] |
|
3435 |
]. |
|
3436 |
]. |
|
3437 |
where := where sender |
|
3438 |
] |
|
3439 |
]. |
|
3440 |
]. |
|
3441 |
enteredWrap ifTrue:[ |
|
3442 |
ignore := true |
|
3443 |
] |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3444 |
]. |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3445 |
|
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3446 |
"/ |
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3447 |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3448 |
left ifTrue:[ |
11210 | 3449 |
"/ special care for stepInterrupt in send, |
3450 |
"/ when created a dummy context (lineNr == 1) |
|
3451 |
||
3452 |
steppedContext lineNumber isNil ifTrue:[ |
|
3453 |
steppedContext selector == here sender selector ifTrue:[ |
|
3454 |
left := false. |
|
3455 |
s := 'after step'. |
|
3456 |
steppedContext := here sender. |
|
3457 |
]. |
|
3458 |
]. |
|
3459 |
oneMore := true |
|
786
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3460 |
]. |
429c3146c03d
better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents:
781
diff
changeset
|
3461 |
|
57 | 3462 |
inBlock ifTrue:[ |
3055 | 3463 |
"/ 'inBlock' printCR. |
11210 | 3464 |
s := 'in block'. |
57 | 3465 |
]. |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3466 |
inBlockBelow ifTrue:[ |
11210 | 3467 |
ignore := true |
3593
eb71fcdf0cfa
single stepping in blocks of a method (fixed - I hope)
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3468 |
]. |
57 | 3469 |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3470 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3471 |
where notNil ifTrue:[ |
3472 |
'(' print. steppedContextLineno print. ') ' print. |
|
3473 |
where printCR. |
|
3474 |
]. |
|
654
dac2634ce5ec
better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents:
651
diff
changeset
|
3475 |
]. |
57 | 3476 |
|
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3477 |
ignore ifFalse:[ |
11210 | 3478 |
(bigStep |
3479 |
and:[steppedContextLineno notNil |
|
3480 |
and:[where notNil |
|
3481 |
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ |
|
3482 |
(here isBlockContext |
|
3483 |
and:[(here methodHome == steppedContext) |
|
3484 |
or:[here home == steppedContext]]) ifTrue:[ |
|
3485 |
DebuggingDebugger == true ifTrue:[ |
|
3486 |
'same line but in block' printCR. |
|
3487 |
]. |
|
3488 |
||
3489 |
steppedContext := actualContext := here. |
|
3490 |
steppedContextLineno := here lineNumber. |
|
3491 |
] ifFalse:[ |
|
3492 |
"/ kludge - I only have the info for up to 255 lines |
|
3493 |
steppedContextLineno ~~ 255 ifTrue:[ |
|
3494 |
DebuggingDebugger == true ifTrue:[ |
|
3495 |
'same line - ignored' printCR. |
|
3496 |
]. |
|
3497 |
ignore := true |
|
3498 |
]. |
|
3499 |
]. |
|
3500 |
]. |
|
3501 |
||
3502 |
(left not |
|
3503 |
and:[skipLineNr notNil |
|
3504 |
and:[where notNil |
|
3505 |
and:[where lineNumber notNil |
|
3506 |
and:[where lineNumber < skipLineNr]]]]) ifTrue:[ |
|
3507 |
DebuggingDebugger == true ifTrue:[ |
|
3508 |
'skip (' print. skipLineNr print. ' unreached - ignored' printCR. |
|
3509 |
]. |
|
3510 |
ignore := true |
|
3511 |
]. |
|
3512 |
||
3513 |
(steppedContextLineno isNil |
|
3514 |
and:[skipLineNr isNil |
|
3515 |
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ |
|
3516 |
DebuggingDebugger == true ifTrue:[ |
|
3517 |
'same line2 (after conIRQ) - ignored' printCR. |
|
3518 |
]. |
|
3519 |
ignore := true |
|
3520 |
]. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3521 |
]. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
3522 |
|
57 | 3523 |
ignore ifTrue:[ |
3055 | 3524 |
"/' ' printCR. |
11210 | 3525 |
where := nil. here := nil. |
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 |
ObjectMemory flushInlineCaches. |
|
3533 |
StepInterruptPending := 1. |
|
3534 |
InterruptPending := 1. |
|
3535 |
InStepInterrupt := nil. |
|
3536 |
^ self |
|
57 | 3537 |
]. |
3538 |
||
3055 | 3539 |
"/ ' ' printCR. |
57 | 3540 |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
3541 |
self label:(s , ' (process: ' , processName , ')'). |
7 | 3542 |
|
57 | 3543 |
tracing := false. |
3544 |
bigStep := false. |
|
3545 |
||
0 | 3546 |
"release refs to context" |
3547 |
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
|
3548 |
"/'enter' printCR. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3549 |
|
1049
3223853742a4
fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents:
1030
diff
changeset
|
3550 |
DebuggingDebugger == true ifTrue:[ |
11210 | 3551 |
'==> 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
|
3552 |
]. |
1364 | 3553 |
|
3554 |
initiallyShown := nil. |
|
3555 |
(oneMore == true) ifTrue:[ |
|
11210 | 3556 |
(thisContext sender sender lineNumber ? 0) <= 1 ifTrue:[ |
3557 |
initiallyShown := 2 |
|
3558 |
] ifFalse:[ |
|
3559 |
initiallyShown := 1 |
|
3560 |
] |
|
1364 | 3561 |
]. |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3562 |
con := thisContext sender sender. |
3435 | 3563 |
|
9235 | 3564 |
HaltInterrupt handle:[:ex | |
11210 | 3565 |
'DebugView [info]: halt/breakpoint in debugger ignored [stepOpNext 2]' infoPrintCR. |
3566 |
ex proceed |
|
3435 | 3567 |
] do:[ |
11210 | 3568 |
self enter:con select:initiallyShown |
2060
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3569 |
]. |
0b1b4269aa75
care for breakPoints while entering debugger
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3570 |
con := nil |
1364 | 3571 |
|
3572 |
"Created: / 14.10.1996 / 12:53:39 / cg" |
|
3447 | 3573 |
"Modified: / 18.11.2001 / 01:00:55 / cg" |
0 | 3574 |
! ! |
3575 |
||
4867 | 3576 |
!DebugView methodsFor:'menu & button actions'! |
266 | 3577 |
|
5875 | 3578 |
addBrowserBookmark |
3579 |
"add a browser-bookmark for the selected contexts method" |
|
3580 |
||
3581 |
|cls sel| |
|
3582 |
||
3583 |
selectedContext isNil ifTrue:[^ self]. |
|
3584 |
||
3585 |
cls := selectedContext receiver class. |
|
3586 |
sel := selectedContext selector. |
|
3587 |
(cls includesSelector:sel) ifFalse:[ |
|
11210 | 3588 |
sel := nil |
5875 | 3589 |
]. |
3590 |
Tools::NewSystemBrowser addToBookMarks:cls selector:sel |
|
3591 |
! |
|
3592 |
||
7796
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3593 |
autoRaiseView |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3594 |
^ UserPreferences current autoRaiseDebugger |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3595 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3596 |
"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
|
3597 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3598 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3599 |
autoRaiseView:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3600 |
UserPreferences current autoRaiseDebugger:aBoolean |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3601 |
|
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3602 |
"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
|
3603 |
! |
fe6f3d31c52a
autoRaise (above) other views (an option in the view-menu)
Claus Gittinger <cg@exept.de>
parents:
7713
diff
changeset
|
3604 |
|
266 | 3605 |
autoUpdateOff |
3606 |
"stop the update process" |
|
3607 |
||
3608 |
updateProcess notNil ifTrue:[ |
|
11210 | 3609 |
monitorToggle lampColor:(Color yellow). |
3610 |
updateProcess terminate. |
|
3611 |
updateProcess := nil |
|
266 | 3612 |
] |
3613 |
! |
|
3614 |
||
3615 |
autoUpdateOn |
|
3616 |
"fork a subprocess which updates the contextList in regular intervals" |
|
3617 |
||
3618 |
updateProcess isNil ifTrue:[ |
|
11210 | 3619 |
updateProcess := |
3620 |
[ |
|
3621 |
[true] whileTrue:[ |
|
3622 |
monitorToggle showLamp ifTrue:[ |
|
3623 |
monitorToggle lampColor:(Color yellow). |
|
3624 |
] ifFalse:[ |
|
3625 |
monitorToggle activeForegroundColor:Color black. |
|
3626 |
]. |
|
3627 |
(Delay forSeconds:0.25) wait. |
|
3628 |
self updateContext. |
|
3629 |
monitorToggle showLamp ifTrue:[ |
|
3630 |
monitorToggle lampColor:(Color red). |
|
3631 |
] ifFalse:[ |
|
3632 |
monitorToggle activeForegroundColor:Color red. |
|
3633 |
]. |
|
3634 |
(Delay forSeconds:0.25) wait. |
|
3635 |
self updateContext. |
|
3636 |
] |
|
3637 |
] forkAt:(Processor activePriority - 1) |
|
266 | 3638 |
] |
3639 |
||
3640 |
! |
|
3641 |
||
3269 | 3642 |
browseClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3643 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3644 |
|
3645 |
|cls sel| |
|
3646 |
||
3647 |
selectedContext isNil ifTrue:[^ self]. |
|
3648 |
||
3649 |
cls := selectedContext receiver class. |
|
3650 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3651 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 3652 |
sel := nil |
3269 | 3653 |
]. |
3654 |
cls browserClass openInClass:cls selector:sel. |
|
3655 |
||
3656 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3657 |
! |
|
3658 |
||
3659 |
browseClassHierarchy |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3660 |
"browse the receiver's classHierarchy (of the selected context's message)" |
3269 | 3661 |
|
3662 |
|cls mthd| |
|
3663 |
||
3664 |
selectedContext isNil ifTrue:[^ self]. |
|
3665 |
||
3666 |
mthd := selectedContext method. |
|
3447 | 3667 |
mthd notNil ifTrue:[ |
11210 | 3668 |
cls := mthd containingClass. |
3669 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3670 |
]. |
3671 |
cls isNil ifTrue:[ |
|
11210 | 3672 |
cls := selectedContext receiver class |
3269 | 3673 |
]. |
3674 |
cls browserClass browseClassHierarchy:cls. |
|
3675 |
||
3447 | 3676 |
"Modified: / 17.11.2001 / 19:43:06 / cg" |
3269 | 3677 |
! |
3678 |
||
3679 |
browseFullClassProtocol |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3680 |
"browse the receiver's full protocol (of the selected context's message)" |
3269 | 3681 |
|
3682 |
|cls mthd| |
|
3683 |
||
3684 |
selectedContext isNil ifTrue:[^ self]. |
|
3685 |
||
3686 |
mthd := selectedContext method. |
|
3447 | 3687 |
mthd notNil ifTrue:[ |
11210 | 3688 |
cls := mthd containingClass. |
3689 |
"/ still nil if unbound - then use receivers class |
|
3447 | 3690 |
]. |
3691 |
cls isNil ifTrue:[ |
|
11210 | 3692 |
cls := selectedContext receiver class |
3269 | 3693 |
]. |
3694 |
cls browserClass browseFullClassProtocol:cls. |
|
3695 |
||
3447 | 3696 |
"Modified: / 17.11.2001 / 19:43:43 / cg" |
3269 | 3697 |
! |
3698 |
||
3699 |
browseImplementingClass |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3700 |
"browse the implementing class (of the selected context's message)" |
3269 | 3701 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3702 |
|mthd who sel cls home| |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3703 |
|
1452 | 3704 |
selectedContext isNil ifTrue:[^ self]. |
3705 |
||
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3706 |
mthd := selectedContext method. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3707 |
mthd notNil ifTrue:[ |
11210 | 3708 |
who := selectedContext method who. |
3709 |
who notNil ifTrue:[ |
|
3710 |
cls := who methodClass. |
|
3711 |
sel := who methodSelector. |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3712 |
] ifFalse:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3713 |
"might have been re-accepted" |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3714 |
(home := selectedContext methodHome) notNil ifTrue:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3715 |
(sel := home selector) notNil ifTrue:[ |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3716 |
cls := home receiver class |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3717 |
whichClassImplements:selectedContext selector. |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3718 |
cls notNil ifTrue:[ |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3719 |
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
|
3720 |
]. |
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3721 |
] |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3722 |
]. |
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3723 |
]. |
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3724 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3725 |
cls isNil ifTrue:[ |
11210 | 3726 |
"/ class not found - try receiver |
3727 |
cls := selectedContext receiver class |
|
651
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3728 |
]. |
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3729 |
|
b8a14e281c24
fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents:
646
diff
changeset
|
3730 |
cls browserClass openInClass:cls selector:sel. |
266 | 3731 |
|
11303
28e758994349
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11210
diff
changeset
|
3732 |
"Created: / 22-11-1995 / 21:27:01 / cg" |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
3733 |
"Modified: / 01-03-2012 / 14:21:11 / cg" |
266 | 3734 |
! |
3735 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3736 |
browseImplementors |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3737 |
"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
|
3738 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3739 |
selectedContext isNil ifTrue:[ |
11210 | 3740 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3741 |
]. |
4153 | 3742 |
"/ selectedContext receiver class browserClass |
3743 |
UserPreferences systemBrowserClass |
|
11210 | 3744 |
browseImplementorsOf:selectedContext selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3745 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3746 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3747 |
browseImplementorsOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3748 |
"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
|
3749 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3750 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3751 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3752 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 3753 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3754 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3755 |
initial isNil ifTrue:[ |
11210 | 3756 |
initial := selectedContext isNil |
3757 |
ifTrue:[nil] |
|
3758 |
ifFalse:[selectedContext selector]. |
|
10205 | 3759 |
]. |
3760 |
selector := Dialog |
|
11210 | 3761 |
requestSelector:'Selector to browse implementors of:' |
3762 |
initialAnswer:initial. |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3763 |
selector size == 0 ifFalse:[ |
11210 | 3764 |
UserPreferences systemBrowserClass |
3765 |
browseImplementorsMatching:selector. |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3766 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3767 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3768 |
"Modified: / 6.2.2000 / 01:05:14 / cg" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3769 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3770 |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3771 |
browseProcessesApplication |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3772 |
"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
|
3773 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3774 |
|p appClass| |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3775 |
|
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3776 |
p := inspectedProcess ? Processor activeProcess. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3777 |
(p notNil and:[p isGUIProcess]) ifTrue:[ |
11210 | 3778 |
WindowGroup scheduledWindowGroups do:[:wg | |
3779 |
wg process == p ifTrue:[ |
|
3780 |
appClass := wg application class. |
|
3781 |
appClass browserClass openInClass:appClass selector:nil. |
|
3782 |
^ self |
|
3783 |
] |
|
3784 |
] |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3785 |
]. |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3786 |
! |
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3787 |
|
3269 | 3788 |
browseReceiversClass |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3789 |
"browse the receiver's class (of the selected context's message)" |
3269 | 3790 |
|
3791 |
|cls sel| |
|
3792 |
||
3793 |
selectedContext isNil ifTrue:[^ self]. |
|
3794 |
||
3795 |
cls := selectedContext receiver class. |
|
3796 |
sel := selectedContext selector. |
|
3591
754970803c0f
#implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents:
3580
diff
changeset
|
3797 |
(cls includesSelector:sel) ifFalse:[ |
11210 | 3798 |
sel := nil |
3269 | 3799 |
]. |
3800 |
cls browserClass openInClass:cls selector:sel. |
|
3801 |
||
3802 |
"Modified: / 3.2.1998 / 20:23:36 / cg" |
|
3803 |
! |
|
3804 |
||
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3805 |
browseSenders |
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
3806 |
"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
|
3807 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3808 |
selectedContext isNil ifTrue:[ |
11210 | 3809 |
^ self showError:'** select a context first **' |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3810 |
]. |
3140 | 3811 |
UserPreferences systemBrowserClass |
11210 | 3812 |
browseAllCallsOn:selectedContext selector. |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3813 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3814 |
|
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3815 |
browseSendersOf |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3816 |
"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
|
3817 |
|
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3818 |
|initial selector sel| |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3819 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3820 |
(sel := codeView selection) notNil ifTrue:[ |
11210 | 3821 |
initial := SystemBrowser extractSelectorFrom:sel |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3822 |
]. |
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3823 |
initial isNil ifTrue:[ |
11210 | 3824 |
initial := selectedContext isNil |
3825 |
ifTrue:[nil] |
|
3826 |
ifFalse:[selectedContext selector]. |
|
10205 | 3827 |
]. |
3828 |
selector := Dialog |
|
11210 | 3829 |
requestSelector:'Selector to browse senders of:' |
3830 |
initialAnswer:initial. |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3831 |
selector size == 0 ifFalse:[ |
11210 | 3832 |
UserPreferences systemBrowserClass |
3833 |
browseAllCallsOn:selector asSymbol. |
|
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3834 |
] |
2589
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3835 |
|
2342403139a7
extract selector from selection (as in browser)
Claus Gittinger <cg@exept.de>
parents:
2581
diff
changeset
|
3836 |
"Modified: / 6.2.2000 / 01:05:29 / cg" |
2577
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3837 |
! |
14b7cc070a6b
added implementorsOf and sendersOf menu functions
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
3838 |
|
11391 | 3839 |
clearRememberedCallchain |
3840 |
"clear the remembered callchain." |
|
3841 |
||
3842 |
RememberedCallChain := nil |
|
3843 |
||
3844 |
"Created: / 08-03-2012 / 01:29:46 / cg" |
|
3845 |
! |
|
3846 |
||
9626 | 3847 |
configureX:x y:y width:newWidth height:newHeight |
10205 | 3848 |
super configureX:x y:y width:newWidth height:newHeight. |
9626 | 3849 |
LastExtent := self extent. |
3850 |
LastOrigin := self origin. |
|
3851 |
||
3852 |
"Created: / 10-11-2010 / 10:09:11 / cg" |
|
3853 |
! |
|
3854 |
||
266 | 3855 |
copyWalkbackText |
3856 |
"place the contents of the walkback view into the copy-paste buffer. |
|
3857 |
This allows pasting it into some other view for printing ..." |
|
3858 |
||
10760 | 3859 |
|infoText| |
3860 |
||
3861 |
contextArray isEmptyOrNil ifTrue:[ |
|
3862 |
infoText := 'No context, no walkback'. |
|
3863 |
] ifFalse:[ |
|
3864 |
infoText := (contextArray collect:[:con | con fullPrintString]) asStringCollection. |
|
3865 |
]. |
|
3866 |
||
3867 |
self setClipboardText:infoText |
|
266 | 3868 |
|
3869 |
"Modified: 28.8.1995 / 15:31:59 / claus" |
|
3870 |
! |
|
3871 |
||
3872 |
doAbort |
|
1187 | 3873 |
"abort - send Object>>abortSignal, which is usually caught |
266 | 3874 |
at save places (for example: in the event loop) and returns back |
3875 |
from whatever the process is doing, but does not terminate it." |
|
3876 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3877 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 3878 |
(self confirm:('Code modified - abort anyway ?')) |
3879 |
ifFalse:[ |
|
3880 |
^ self |
|
3881 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3882 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3883 |
|
266 | 3884 |
inspecting ifTrue:[ |
11210 | 3885 |
inspectedProcess isDead ifTrue:[ |
3886 |
self showTerminated. |
|
3887 |
^ self |
|
3888 |
]. |
|
3889 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
3890 |
self showError:'** the process does not handle the abort signal **' |
|
3891 |
] ifTrue:[ |
|
3892 |
self interruptProcessWith:[AbortOperationRequest raise]. |
|
3893 |
]. |
|
3894 |
^ self |
|
266 | 3895 |
]. |
3896 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
3897 |
steppedContext := wrapperContext := nil. |
266 | 3898 |
haveControl := false. |
3899 |
exitAction := #abort. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3900 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3901 |
"exit private event-loop" |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3902 |
catchBlock notNil ifTrue:[ |
11210 | 3903 |
abortButton turnOff. |
3904 |
catchBlock value. |
|
3905 |
||
3906 |
"/ not reached |
|
3907 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
266 | 3908 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
3909 |
|
266 | 3910 |
^ self. |
3911 |
||
3447 | 3912 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
266 | 3913 |
! |
3914 |
||
6487 | 3915 |
doAbortAll |
3916 |
"abortAll - send Object>>abortAllSignal, which is usually caught |
|
3917 |
at save places (for example: in the event loop) and returns back |
|
3918 |
from whatever the process is doing, but does not terminate it." |
|
3919 |
||
3920 |
self checkIfCodeIsReallyModified ifTrue:[ |
|
11210 | 3921 |
(self confirm:('Code modified - abort anyway ?')) |
3922 |
ifFalse:[ |
|
3923 |
^ self |
|
3924 |
] |
|
6487 | 3925 |
]. |
3926 |
||
3927 |
inspecting ifTrue:[ |
|
11210 | 3928 |
inspectedProcess isDead ifTrue:[ |
3929 |
self showTerminated. |
|
3930 |
^ self |
|
3931 |
]. |
|
3932 |
(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[ |
|
3933 |
self showError:'** the process does not handle the abort signal **' |
|
3934 |
] ifTrue:[ |
|
3935 |
self interruptProcessWith:[AbortAllOperationRequest raise]. |
|
3936 |
]. |
|
3937 |
^ self |
|
6487 | 3938 |
]. |
3939 |
||
3940 |
steppedContext := wrapperContext := nil. |
|
3941 |
haveControl := false. |
|
3942 |
exitAction := #abortAll. |
|
3943 |
||
3944 |
"exit private event-loop" |
|
3945 |
catchBlock notNil ifTrue:[ |
|
11210 | 3946 |
abortButton turnOff. |
3947 |
catchBlock value. |
|
3948 |
||
3949 |
"/ not reached |
|
3950 |
'DebugView [warning]: abort failed' errorPrintCR. |
|
6487 | 3951 |
]. |
3952 |
||
3953 |
^ self. |
|
3954 |
||
3955 |
"Modified: / 17.11.2001 / 22:53:22 / cg" |
|
3956 |
! |
|
3957 |
||
11378
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3958 |
doChangeProcessPriority |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3959 |
"ask for and change the process's priority" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3960 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3961 |
|oldPrio newPrio s| |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3962 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3963 |
oldPrio := (inspectedProcess ? Processor activeProcess) priority. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3964 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3965 |
[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3966 |
s := Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3967 |
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
|
3968 |
initialAnswer:oldPrio printString. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3969 |
s isEmptyOrNil ifTrue:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3970 |
newPrio := Integer readFrom:s onError:nil. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3971 |
newPrio isNil |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3972 |
] whileTrue. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3973 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3974 |
newPrio := newPrio max:(Processor lowestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3975 |
newPrio := newPrio min:(Processor highestPriority). |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3976 |
newPrio >= Processor highIOPriority ifTrue:[ |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3977 |
(Dialog |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3978 |
confirm:(resources |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3979 |
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
|
3980 |
ifFalse:[^ self]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3981 |
]. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3982 |
(inspectedProcess ? Processor activeProcess) priority:newPrio. |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3983 |
|
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3984 |
"Created: / 07-03-2012 / 14:15:09 / cg" |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3985 |
! |
d7e8d0227a78
added: #doChangeProcessPriority
Claus Gittinger <cg@exept.de>
parents:
11372
diff
changeset
|
3986 |
|
266 | 3987 |
doContinue |
3988 |
"continue from menu" |
|
3989 |
||
1719
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3990 |
|proc exContext ex answer| |
4f99e8100bb5
when continuing after a stack-overflow,
Claus Gittinger <cg@exept.de>
parents:
1699
diff
changeset
|
3991 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
3992 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 3993 |
(self confirm:('Code modified - continue anyway ?')) ifFalse:[ |
3994 |
^ self |
|
3995 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3996 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3997 |
|
266 | 3998 |
inspecting ifTrue:[ |
11210 | 3999 |
device hasColors ifTrue:[ |
4000 |
continueButton foregroundColor:Color red darkened. |
|
4001 |
]. |
|
4002 |
continueButton label:(resources string:'Stop'). |
|
4003 |
continueButton action:[self doStop]. |
|
4004 |
||
4005 |
self processPerform:#resume. |
|
4006 |
||
4007 |
^ self |
|
266 | 4008 |
]. |
4009 |
canContinue ifTrue:[ |
|
11210 | 4010 |
exContext := thisContext findSpecialHandle:false raise:true. |
4011 |
||
4012 |
(exContext notNil |
|
4013 |
and:[ (ex := exContext receiver) isLazyValue not |
|
4014 |
and:[ ex isException |
|
4015 |
and:[ ex signal == NoHandlerError |
|
4016 |
and:[ ex parameter signal == RecursionError]]]]) |
|
4017 |
ifTrue:[ |
|
4018 |
"/ debug due to unhandled recursionInterrupt. |
|
4019 |
"/ ask if we should proceed with more stack. |
|
4020 |
||
4021 |
answer := self confirm:'Debugger entered due to a stack overflow.\\Continue with more stack ?' withCRs. |
|
4022 |
answer == true ifTrue:[ |
|
4023 |
proc := Processor activeProcess. |
|
4024 |
proc setMaximumStackSize:(proc maximumStackSize * 2). |
|
4025 |
]. |
|
4026 |
]. |
|
4027 |
||
4028 |
steppedContext := wrapperContext := nil. |
|
4029 |
tracing := false. |
|
4030 |
haveControl := false. |
|
4031 |
exitAction := #continue. |
|
4032 |
||
4033 |
"exit private event-loop" |
|
4034 |
catchBlock value. |
|
4035 |
||
4036 |
"/ not reached. |
|
4037 |
'DebugView [warning]: continue failed' errorPrintCR. |
|
4038 |
continueButton turnOff. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4039 |
|
266 | 4040 |
] ifFalse:[ |
11210 | 4041 |
inspecting ifFalse:[ |
4042 |
'DebugView [info]: resuming top context' infoPrintCR. |
|
4043 |
self showSelection:1. |
|
4044 |
self doReturn |
|
4045 |
] |
|
266 | 4046 |
] |
477 | 4047 |
|
1917
200617958f79
continue with more stack fixed
Claus Gittinger <cg@exept.de>
parents:
1906
diff
changeset
|
4048 |
"Modified: / 5.10.1998 / 13:03:47 / cg" |
2308 | 4049 |
"Modified: / 26.7.1999 / 15:38:45 / stefan" |
266 | 4050 |
! |
4051 |
||
3187 | 4052 |
doDefine |
5955 | 4053 |
|selectionIndex selector argNames receiversClass proto haltStmtDef haltStmtFix code cat |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4054 |
bagOfClassNames bagOfUsedClassNames implClass idx callee restart| |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4055 |
|
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4056 |
selectionIndex := contextView selection. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4057 |
restart := true. |
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4058 |
|
3283 | 4059 |
selector := actualContext selector. |
8963 | 4060 |
implClass := actualContext receiver class whichClassIncludesSelector:selector. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4061 |
implClass notNil ifTrue:[ |
11210 | 4062 |
"/ must be a subclassResponsibility |
4063 |
||
4064 |
idx := contextArray identityIndexOf:actualContext. |
|
4065 |
idx > 1 ifTrue:[ |
|
4066 |
callee := contextArray at:idx-1. |
|
4067 |
||
4068 |
callee selector == #subclassResponsibility ifTrue:[ |
|
4069 |
restart := false. |
|
4070 |
] |
|
4071 |
]. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4072 |
]. |
5955 | 4073 |
|
4074 |
"generate nice argument names" |
|
4075 |
bagOfClassNames := (actualContext args collect:[:eachArg | eachArg class name]) asBag. |
|
4076 |
bagOfUsedClassNames := Bag new. |
|
10205 | 4077 |
argNames := actualContext args |
11210 | 4078 |
collect: |
4079 |
[:eachArg | |
|
4080 |
|nm| |
|
4081 |
||
4082 |
nm := eachArg class name. |
|
4083 |
(bagOfClassNames occurrencesOf:nm) == 1 ifTrue:[ |
|
4084 |
nm article , nm |
|
4085 |
] ifFalse:[ |
|
4086 |
bagOfUsedClassNames add:nm. |
|
4087 |
nm asLowercaseFirst , (bagOfUsedClassNames occurrencesOf:nm) printString |
|
4088 |
]. |
|
4089 |
]. |
|
5955 | 4090 |
|
4091 |
proto := Method methodDefinitionTemplateForSelector:selector andArgumentNames:argNames. |
|
3269 | 4092 |
|
3447 | 4093 |
haltStmtDef := ' self halt:''please define %2 here''.'. |
4094 |
haltStmtFix := ' self halt:''please change %2 as required''.'. |
|
4095 |
||
4096 |
actualContext receiver isNil ifTrue:[ |
|
11210 | 4097 |
(self confirm:'Are you sure you want to add this method (to UndefinedObject) ?') |
4098 |
ifFalse:[ |
|
4099 |
^ self |
|
4100 |
] |
|
3447 | 4101 |
]. |
4102 |
||
4103 |
receiversClass := actualContext receiver class. |
|
4104 |
||
4105 |
(receiversClass instVarNames includes:selector) ifTrue:[ |
|
11210 | 4106 |
code := '%1\' , haltStmtFix , '\ ^ %2'. |
4107 |
cat := 'accessing'. |
|
3447 | 4108 |
]. |
4109 |
(selector numArgs == 1 |
|
4110 |
and:[(selector endsWith:':') |
|
10205 | 4111 |
and:[receiversClass instVarNames includes:(selector copyWithoutLast:1)]]) |
3447 | 4112 |
ifTrue:[ |
11210 | 4113 |
code := '%1\' , haltStmtFix , '\ %2 := arg.'. |
4114 |
cat := 'accessing'. |
|
3447 | 4115 |
]. |
4116 |
||
4117 |
"/ actualContext receiver isClass ifTrue:[ |
|
4118 |
"/ selector == #new ifTrue:[ |
|
4119 |
"/ code := '%1\' , haltStmt , '\ ^ self basicNew initialize' |
|
4120 |
"/ ]. |
|
4121 |
"/ selector == #'new:' ifTrue:[ |
|
4122 |
"/ code := '%1\' , haltStmt , '\ ^ (self basicNew:arg) initialize' |
|
4123 |
"/ ]. |
|
4124 |
"/ ]. |
|
4125 |
code isNil ifTrue:[ |
|
11210 | 4126 |
code := '%1\' , haltStmtDef |
10205 | 4127 |
]. |
4128 |
||
4129 |
self |
|
11210 | 4130 |
codeAccept:(code bindWith:proto with:selector) withCRs |
4131 |
inClass:receiversClass |
|
4132 |
unwind:false |
|
4133 |
category:cat |
|
4134 |
onCancel:[^ self]. |
|
3269 | 4135 |
|
3270
cd3562cffc61
fixed define-method for numArgs>0
Claus Gittinger <cg@exept.de>
parents:
3269
diff
changeset
|
4136 |
self doShowSelection:selectionIndex. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4137 |
restart ifTrue:[ |
11210 | 4138 |
self doRestart |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
4139 |
] |
3427 | 4140 |
|
3447 | 4141 |
"Modified: / 17.11.2001 / 23:43:54 / cg" |
3187 | 4142 |
! |
4143 |
||
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4144 |
doMicroSend |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4145 |
"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
|
4146 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4147 |
inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4148 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4149 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4150 |
(self confirm:('Code modified - step anyway ?')) |
4151 |
ifFalse:[ |
|
4152 |
^ self |
|
4153 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4154 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4155 |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4156 |
canContinue ifTrue:[ |
11210 | 4157 |
steppedContext := wrapperContext := nil. |
4158 |
haveControl := false. |
|
4159 |
exitAction := #step. |
|
4160 |
||
4161 |
"exit private event-loop" |
|
4162 |
catchBlock value. |
|
4163 |
||
4164 |
"/ not reached |
|
4165 |
'DebugView [warning]: send failed' errorPrintCR. |
|
4166 |
sendButton turnOff. |
|
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4167 |
] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4168 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4169 |
"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
|
4170 |
"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
|
4171 |
! |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4172 |
|
266 | 4173 |
doNext |
1072 | 4174 |
"skip for next source-code line; entering blocks" |
266 | 4175 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4176 |
stepHow := #nextIn. |
266 | 4177 |
self doStep:nil |
790 | 4178 |
|
1072 | 4179 |
"Modified: 7.3.1997 / 18:38:41 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4180 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4181 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4182 |
doNextOut |
1072 | 4183 |
"skip for next source-code line; leaving blocks" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4184 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4185 |
stepHow := #nextOut. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4186 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4187 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4188 |
"Created: 3.3.1997 / 21:31:22 / cg" |
1072 | 4189 |
"Modified: 7.3.1997 / 18:38:49 / cg" |
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4190 |
! |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4191 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4192 |
doNextOver |
1072 | 4193 |
"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
|
4194 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4195 |
stepHow := #nextOver. |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4196 |
self doStep:nil |
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4197 |
|
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4198 |
"Created: 3.3.1997 / 20:50:38 / cg" |
1072 | 4199 |
"Modified: 7.3.1997 / 18:39:00 / cg" |
266 | 4200 |
! |
4201 |
||
4202 |
doNoTrace |
|
4203 |
traceView notNil ifTrue:[ |
|
11210 | 4204 |
traceView topView destroy. |
4205 |
traceView := nil. |
|
266 | 4206 |
]. |
4207 |
tracing := false |
|
4208 |
! |
|
4209 |
||
4356 | 4210 |
doOpenReportMailApp |
4211 |
"open a mail report tool" |
|
4212 |
||
4213 |
| str | |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4214 |
|
4356 | 4215 |
str := '' writeStream. |
4216 |
||
4217 |
str nextPutLine:('Error notification from ' |
|
11210 | 4218 |
, OperatingSystem getLoginName |
4219 |
, '@' |
|
4220 |
, OperatingSystem getHostName). |
|
4356 | 4221 |
str cr. |
4222 |
||
5779
f2f987342b81
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5664
diff
changeset
|
4223 |
str nextPutLine:('Time: ' , Timestamp now printString). |
4356 | 4224 |
str nextPutLine:('STX Version: ' , Smalltalk versionString). |
4225 |
str nextPutLine:('Description: ' , self label). |
|
4226 |
"/ str nextPutLine:('Error: ', printedException description). |
|
4227 |
"/ str nextPutLine:('Signal: ', printedException signal printString). |
|
4228 |
"/ str nextPutLine:('Parameter: ', printedException parameter printString). |
|
4229 |
str nextPutLine:'Backtrace:'. |
|
4230 |
str cr. |
|
4231 |
||
4232 |
firstContext notNil ifTrue:[ |
|
11210 | 4233 |
firstContext fullPrintAllOn:str. |
4356 | 4234 |
]. |
4235 |
str cr;cr. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4236 |
|
10205 | 4237 |
SendMailTool |
11210 | 4238 |
openForMessage:(str contents) |
4239 |
withSubject:('STX Error:[', self label, ']') |
|
4240 |
preOpenBlock:[:inst| |
|
4241 |
inst recipientEntryField value:'error@exept.de' |
|
4242 |
]. |
|
7844
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4243 |
|
cf6ca4e657fb
changed #doOpenReportMailApp
Claus Gittinger <cg@exept.de>
parents:
7843
diff
changeset
|
4244 |
"Modified: / 20-09-2007 / 12:40:40 / cg" |
4356 | 4245 |
! |
4246 |
||
266 | 4247 |
doRestart |
4248 |
"restart - the selected context will be restarted" |
|
10205 | 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 - restart 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 |
]. |
266 | 4255 |
inspecting ifTrue:[ |
11210 | 4256 |
selectedContext isNil ifTrue:[ |
4257 |
^ self showError:'** select a context first **' |
|
4258 |
]. |
|
4259 |
self interruptProcessWith:[ selectedContext unwindAndRestart ]. |
|
4260 |
^ self |
|
266 | 4261 |
]. |
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4262 |
steppedContext := wrapperContext := nil. |
266 | 4263 |
haveControl := false. |
6365 | 4264 |
exitAction := #restart. "exit private event-loop" |
4265 |
||
4266 |
catchBlock value. |
|
4267 |
||
4268 |
"/ normally not reached |
|
10205 | 4269 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4270 |
'DebugView [warning]: restart failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4271 |
restartButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4272 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4273 |
"Modified: / 29.7.1998 / 21:49:53 / cg" |
266 | 4274 |
! |
4275 |
||
4276 |
doReturn |
|
4277 |
"return - the selected context will do a ^nil" |
|
4278 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4279 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4280 |
(self confirm:('Code modified - return anyway ?')) |
4281 |
ifFalse:[ |
|
4282 |
^ self |
|
4283 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4284 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4285 |
|
266 | 4286 |
inspecting ifTrue:[ |
11210 | 4287 |
selectedContext isNil ifTrue:[ |
4288 |
^ self showError:'** select a context first **' |
|
4289 |
]. |
|
4290 |
self interruptProcessWith:[selectedContext unwind:nil]. |
|
4291 |
^ self |
|
266 | 4292 |
]. |
4293 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4294 |
steppedContext := wrapperContext := nil. |
266 | 4295 |
haveControl := false. |
4296 |
exitAction := #return. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4297 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4298 |
"exit private event-loop" |
6365 | 4299 |
catchBlock value. |
477 | 4300 |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4301 |
"/ not reached |
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4302 |
'DebugView [warning]: return failed' errorPrintCR. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4303 |
returnButton turnOff. |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4304 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4305 |
"Modified: / 29.7.1998 / 21:50:03 / cg" |
266 | 4306 |
! |
4307 |
||
4308 |
doSend |
|
4309 |
"single send; reenter with next message send" |
|
4310 |
||
1072 | 4311 |
stepHow := #send. |
1067
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4312 |
self doStep:-1 |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4313 |
|
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4314 |
"/ inspecting ifTrue:[^ self]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4315 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4316 |
"/ canContinue ifTrue:[ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4317 |
"/ steppedContext := wrapperContext := nil. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4318 |
"/ haveControl := false. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4319 |
"/ exitAction := #step. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4320 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4321 |
"/ "exit private event-loop" |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4322 |
"/ catchBlock notNil ifTrue:[catchBlock value]. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4323 |
"/ |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4324 |
"/ "/ not reached |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4325 |
"/ 'DebugView [warning]: send failed' errorPrintCR. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4326 |
"/ sendButton turnOff. |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4327 |
"/ ] |
e6d52091b3af
old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents:
1065
diff
changeset
|
4328 |
|
1072 | 4329 |
"Modified: 7.3.1997 / 18:41:26 / cg" |
266 | 4330 |
! |
4331 |
||
4332 |
doStep |
|
4333 |
"skip for next send in selected method" |
|
4334 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4335 |
stepHow := #step. |
790 | 4336 |
self doStep:-1 |
4337 |
||
1072 | 4338 |
"Modified: 7.3.1997 / 18:46:49 / cg" |
266 | 4339 |
! |
4340 |
||
4341 |
doStep:lineNr |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4342 |
"common helper for step, skip & next. |
10205 | 4343 |
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
|
4344 |
or to next line (if nil) or to next send (if -1)" |
266 | 4345 |
|
4346 |
|con method| |
|
4347 |
||
4348 |
inspecting ifTrue:[^ self]. |
|
4349 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4350 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4351 |
(self confirm:('Code modified - step anyway ?')) |
4352 |
ifFalse:[ |
|
4353 |
^ self |
|
4354 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4355 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4356 |
|
266 | 4357 |
canContinue ifTrue:[ |
11210 | 4358 |
selectedContext notNil ifTrue:[ |
4359 |
con := actualContext. "/ selectedContext. |
|
4360 |
steppedContextLineno := actualContext lineNumber. |
|
4361 |
] ifFalse:[ |
|
4362 |
con := contextArray at:2. |
|
4363 |
steppedContextLineno := con lineNumber. |
|
4364 |
]. |
|
4365 |
||
4366 |
skipLineNr := lineNr. |
|
4367 |
||
4368 |
lineNr == -1 ifTrue:[ |
|
4369 |
steppedContextLineno := skipLineNr := nil. |
|
4370 |
]. |
|
4371 |
||
4372 |
(stepUntilEntering isNil and:[stepHow == #send]) ifTrue:[ |
|
4373 |
steppedContext := contextArray at:1. |
|
4374 |
stepHow := #nextIn. |
|
4375 |
] ifFalse:[ |
|
4376 |
stepHow == #nextOut ifTrue:[ |
|
4377 |
steppedContext := con home. |
|
4378 |
] ifFalse:[ |
|
4379 |
steppedContext := con. |
|
4380 |
]. |
|
4381 |
]. |
|
4382 |
wrapperContext := nil. |
|
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4383 |
|
789
a9595b71a8fa
improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents:
788
diff
changeset
|
4384 |
"/ ' 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
|
4385 |
|
11210 | 4386 |
" |
4387 |
if we step in a wrapped method, |
|
4388 |
prepare to skip the prolog ... |
|
4389 |
" |
|
4390 |
||
4391 |
inWrap := false. |
|
4392 |
method := con method. |
|
4393 |
(method notNil |
|
4394 |
and:[method isWrapped |
|
4395 |
and:[method originalMethod ~~ method]]) ifTrue:[ |
|
4396 |
inWrap := true |
|
4397 |
]. |
|
4398 |
||
4399 |
lineNr == #return ifTrue:[ |
|
4400 |
Processor activeProcess forceInterruptOnReturnOf:con. |
|
4401 |
]. |
|
4402 |
||
4403 |
con := nil. |
|
4404 |
bigStep := true. |
|
4405 |
haveControl := false. |
|
4406 |
exitAction := #step. |
|
4407 |
||
4408 |
"exit private event-loop" |
|
4409 |
catchBlock value. |
|
4410 |
||
4411 |
"/ not reached |
|
4412 |
'DebugView [warning]: step failed' errorPrintCR. |
|
4413 |
stepButton turnOff. nextButton turnOff. sendButton turnOff. |
|
266 | 4414 |
] |
477 | 4415 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4416 |
"Modified: / 29.7.1998 / 21:50:16 / cg" |
266 | 4417 |
! |
4418 |
||
4419 |
doStop |
|
4420 |
"stop the process (if its running, otherwise this is a no-op)" |
|
4421 |
||
4422 |
inspecting ifTrue:[ |
|
11210 | 4423 |
device hasColors ifTrue:[ |
4424 |
continueButton foregroundColor:Color green darkened darkened. |
|
4425 |
]. |
|
4426 |
continueButton label:(resources string:'Continue'). |
|
4427 |
continueButton action:[self doContinue]. |
|
4428 |
||
4429 |
self processPerform:#stop. |
|
4430 |
||
4431 |
^ self |
|
266 | 4432 |
]. |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4433 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
4434 |
"Modified: 20.10.1996 / 18:30:48 / cg" |
266 | 4435 |
! |
4436 |
||
4437 |
doTerminate |
|
4438 |
"terminate - the process has a chance for cleanup" |
|
4439 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
4440 |
self checkIfCodeIsReallyModified ifTrue:[ |
11210 | 4441 |
(self confirm:('Code modified - terminate anyway ?')) |
4442 |
ifFalse:[ |
|
4443 |
^ self |
|
4444 |
] |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4445 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4446 |
|
266 | 4447 |
inspecting ifTrue:[ |
11210 | 4448 |
self processPerform:#terminate. |
4449 |
^ self |
|
266 | 4450 |
]. |
4451 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4452 |
steppedContext := wrapperContext := nil. |
266 | 4453 |
haveControl := false. |
10205 | 4454 |
exitAction := #terminate. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4455 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4456 |
"exit private event-loop" |
6365 | 4457 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4458 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4459 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4460 |
inspecting ifFalse:[ |
11210 | 4461 |
'DebugView [warning]: terminate failed' errorPrintCR. |
4462 |
(self confirm:'Regular terminate failed - do it the hard way ?') ifTrue:[ |
|
4463 |
Debugger newDebugger. |
|
4464 |
Processor activeProcess terminate. |
|
4465 |
] |
|
266 | 4466 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4467 |
terminateButton turnOff. |
477 | 4468 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
4469 |
"Modified: / 29.7.1998 / 21:50:35 / cg" |
266 | 4470 |
! |
4471 |
||
4472 |
doTrace |
|
4473 |
"tracing - not really implemented ..." |
|
4474 |
||
4475 |
self warn:'this function is not yet implemented'. |
|
4476 |
||
4477 |
"/ |v b| |
|
4478 |
"/ |
|
4479 |
"/ traceView isNil ifTrue:[ |
|
4480 |
"/ v := StandardSystemView on:Display. |
|
4481 |
"/ v label:'Debugger-Trace'. |
|
4482 |
"/ v icon:icon. |
|
4483 |
"/ |
|
4484 |
"/ b := Button label:'untrace' in:v. |
|
4485 |
"/ b origin:(0 @ 0) extent:(1.0 @ (b height)). |
|
4486 |
"/ b action:[ |
|
4487 |
"/ StepInterruptPending := nil. |
|
4488 |
"/ tracing := false. |
|
4489 |
"/ v unrealize. |
|
4490 |
"/ traceView := nil |
|
4491 |
"/ ]. |
|
4492 |
"/ traceView := ScrollableView for:TextCollector in:v. |
|
4493 |
"/ traceView origin:(0 @ (b height)) |
|
4494 |
"/ extent:[v width @ (v height - b height)] |
|
4495 |
"/ ]. |
|
4496 |
"/ v realize. |
|
4497 |
"/ |
|
4498 |
"/ tracing := true. |
|
4499 |
! |
|
4500 |
||
4501 |
doTraceStep |
|
4502 |
"tracestep - not implemented yet" |
|
4503 |
||
4504 |
canContinue ifTrue:[ |
|
11210 | 4505 |
tracing := true. |
4506 |
self doStep |
|
266 | 4507 |
] |
4508 |
! |
|
4509 |
||
4510 |
exit |
|
4511 |
"exit from menu: immediate exit from smalltalk" |
|
4512 |
||
4513 |
OperatingSystem exit |
|
4514 |
! |
|
4515 |
||
4516 |
inspectContext |
|
4517 |
"launch an inspector on the currently selected context" |
|
4518 |
||
4519 |
contextView selection notNil ifTrue:[ |
|
11210 | 4520 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
4521 |
(contextArray at:(contextView selection)) inspect. |
|
4522 |
] |
|
266 | 4523 |
] |
4524 |
! |
|
4525 |
||
8142 | 4526 |
middleButtonMenu |
4527 |
<resource: #programMenu > |
|
4528 |
||
9488 | 4529 |
|items m nameOfExecutable| |
8142 | 4530 |
|
4531 |
exclusive ifTrue:[ |
|
11210 | 4532 |
items := #( |
4533 |
('Show More WalkBack' showMore ) |
|
4534 |
('Show Verbose WalkBack' showVerboseWalkback ) |
|
4535 |
('-' ) |
|
4536 |
('Add Breakpoint' addBreakpoint ) |
|
4537 |
('Remove Breakpoint' removeBreakpoint ) |
|
4538 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
|
4539 |
('-' ) |
|
4540 |
). |
|
8142 | 4541 |
] ifFalse:[ |
11210 | 4542 |
items := #( |
4543 |
('Show More WalkBack' showMore ) |
|
4544 |
('Show Verbose WalkBack' showVerboseWalkback ) |
|
4545 |
('-' ) |
|
4546 |
('Skip' skip ) |
|
4547 |
('Step Out' skipForReturn ) |
|
4548 |
('Skip until Entering...' skipUntilEntering ) |
|
4549 |
('-' ) |
|
8142 | 4550 |
" |
11210 | 4551 |
('Continue' doContinue ) |
4552 |
('Terminate' doTerminate ) |
|
4553 |
('Abort' doAbort ) |
|
4554 |
('-' ) |
|
4555 |
('Step' doStep ) |
|
4556 |
('Send' doSend ) |
|
4557 |
('-' ) |
|
4558 |
('Return' doReturn ) |
|
4559 |
('Restart' doRestart ) |
|
4560 |
('-' ) |
|
8142 | 4561 |
" |
11210 | 4562 |
('Add Breakpoint' addBreakpoint ) |
4563 |
('Remove Breakpoint' removeBreakpoint ) |
|
4564 |
('Remove all Break- && Tracepoints' removeAllBreakpoints ) |
|
4565 |
). |
|
4566 |
||
4567 |
self allowBreakPointsInDebugger ifFalse:[ |
|
4568 |
items := items , #( |
|
4569 |
('Allow Breakpoints && halt in Debugger' doNotIgnoreBreakpoints ) |
|
4570 |
). |
|
4571 |
] ifTrue:[ |
|
4572 |
items := items , #( |
|
4573 |
('Ignore Breakpoints && halt in Debugger' doIgnoreBreakpoints ) |
|
4574 |
). |
|
4575 |
]. |
|
4576 |
||
4577 |
items := items , #( |
|
4578 |
('-' ) |
|
4579 |
('Browse Implementing Class' browseImplementingClass ) |
|
4580 |
('Browse Receivers Class' browseReceiversClass ) |
|
4581 |
('Browse Receivers Class Hierarchy' browseClassHierarchy ) |
|
4582 |
('Browse Receivers Full Protocol' browseFullClassProtocol ) |
|
4583 |
('Implementors' browseImplementors ) |
|
4584 |
('Implementors Of...' browseImplementorsOf ) |
|
4585 |
('Senders' browseSenders ) |
|
4586 |
('Senders Of...' browseSendersOf ) |
|
4587 |
('-' ) |
|
4588 |
('Inspect Context' inspectContext ) |
|
4589 |
). |
|
8142 | 4590 |
]. |
4591 |
||
9488 | 4592 |
items := items , #( |
11210 | 4593 |
('Copy WalkBack Text' copyWalkbackText ) |
4594 |
('-' ) |
|
4595 |
('QuickTerminate' quickTerminate ) |
|
4596 |
('=' )). |
|
9488 | 4597 |
|
4598 |
nameOfExecutable := OperatingSystem nameOfSTXExecutable asFilename withoutSuffix baseName. |
|
4599 |
nameOfExecutable = 'stx' ifTrue:[ nameOfExecutable := 'Smalltalk' ]. |
|
4600 |
||
4601 |
items := items , { |
|
11210 | 4602 |
{ 'Exit %1 (No Confirmation)' bindWith:nameOfExecutable. #exit }}. |
10205 | 4603 |
|
4604 |
m := PopUpMenu |
|
11210 | 4605 |
itemList:items |
4606 |
resources:resources |
|
4607 |
receiver:self |
|
4608 |
for:contextView. |
|
8142 | 4609 |
|
4610 |
verboseBacktrace ifTrue:[ |
|
11210 | 4611 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
4612 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback |
|
8142 | 4613 |
]. |
4614 |
||
4615 |
inspecting ifTrue:[ |
|
11210 | 4616 |
m notNil ifTrue:[ |
4617 |
m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass |
|
4618 |
browseClassHierarchy browseFullClassProtocol |
|
4619 |
browseImplementors browseSenders inspectContext skip doStepOut). |
|
4620 |
]. |
|
8142 | 4621 |
]. |
4622 |
self updateMenuItems. |
|
4623 |
||
4624 |
^ m. |
|
9488 | 4625 |
|
4626 |
"Modified: / 19-05-2010 / 11:49:56 / cg" |
|
8142 | 4627 |
! |
4628 |
||
3447 | 4629 |
openAboutThisApplication |
4630 |
"opens an about box for this application." |
|
4631 |
||
7112 | 4632 |
Dialog aboutClass:self class. |
4633 |
||
4634 |
"Modified: / 12-09-2006 / 17:20:38 / cg" |
|
3447 | 4635 |
! |
4636 |
||
8620 | 4637 |
openSettingsDialog |
4638 |
|settingsList settingsApp| |
|
4639 |
||
10205 | 4640 |
settingsList := |
11210 | 4641 |
#( |
4642 |
#('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
4643 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
4644 |
#('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
4645 |
#('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
4646 |
). |
|
8620 | 4647 |
|
4648 |
settingsApp := SettingsDialog new. |
|
9024
fb4eebb44e21
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
8967
diff
changeset
|
4649 |
"/ settingsApp requestor:self. |
8620 | 4650 |
settingsApp installSettingsEntries:settingsList. |
4651 |
settingsApp allButOpen. |
|
4652 |
settingsApp window label:('Debugger Settings'). |
|
4653 |
settingsApp openWindow. |
|
4654 |
! |
|
4655 |
||
266 | 4656 |
quickTerminate |
4657 |
"quick terminate - the process will get no chance for cleanup actions" |
|
4658 |
||
4659 |
inspecting ifTrue:[ |
|
11210 | 4660 |
self processPerform:#terminateNoSignal. |
4661 |
^ self |
|
266 | 4662 |
]. |
4663 |
||
788
26d452e40e52
care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents:
787
diff
changeset
|
4664 |
steppedContext := wrapperContext := nil. |
266 | 4665 |
haveControl := false. |
4666 |
exitAction := #quickTerminate. |
|
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4667 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4668 |
"exit private event-loop" |
6365 | 4669 |
catchBlock value. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4670 |
|
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4671 |
"/ not reached (normally) |
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4672 |
inspecting ifFalse:[ |
11210 | 4673 |
'DebugView [warning]: quick terminate failed' errorPrintCR. |
4674 |
(self confirm:'Regular quick terminate failed - do it the hard way ?') ifTrue:[ |
|
4675 |
Debugger newDebugger. |
|
4676 |
Processor activeProcess terminateNoSignal. |
|
4677 |
] |
|
266 | 4678 |
]. |
581
d1a1ae9d49e4
removed old non-thread support
Claus Gittinger <cg@exept.de>
parents:
579
diff
changeset
|
4679 |
terminateButton turnOff. |
477 | 4680 |
|
935
7c75379de9ec
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
4681 |
"Modified: 10.1.1997 / 17:42:10 / cg" |
266 | 4682 |
! |
4683 |
||
11391 | 4684 |
rememberCallchain |
4685 |
"remember the callchain in a classvar. |
|
4686 |
When entered the next time, highlight already entered contexts. |
|
4687 |
This makes it possible to identitfy the caller as the first common context |
|
4688 |
along the chain (i.e. the context which is responsible for the debugger to be entered)" |
|
4689 |
||
4690 |
RememberedCallChain := contextArray copy |
|
4691 |
||
4692 |
"Created: / 07-03-2012 / 23:07:07 / cg" |
|
4693 |
! |
|
4694 |
||
3447 | 4695 |
showDenseWalkback |
3427 | 4696 |
|m| |
4697 |
||
4698 |
m := contextView middleButtonMenu. |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4699 |
verboseBacktrace := false. |
3694 | 4700 |
m labelAt:#showDenseWalkback put:(resources string:'Show Verbose WalkBack'). |
3447 | 4701 |
m selectorAt:#showDenseWalkback put:#showVerboseWalkback. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4702 |
self redisplayBacktrace. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4703 |
|
3447 | 4704 |
"Created: / 17.11.2001 / 20:08:08 / cg" |
4705 |
"Modified: / 17.11.2001 / 22:39:48 / cg" |
|
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4706 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4707 |
|
266 | 4708 |
showMore |
3447 | 4709 |
"double the number of contexts shown" |
266 | 4710 |
|
4711 |
contextArray notNil ifTrue:[ |
|
11210 | 4712 |
nChainShown := nChainShown * 2. |
4713 |
self redisplayBacktrace. |
|
266 | 4714 |
] |
563 | 4715 |
|
3447 | 4716 |
"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
|
4717 |
! |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
4718 |
|
3447 | 4719 |
showVerboseWalkback |
4720 |
|m| |
|
4721 |
||
4722 |
verboseBacktrace := true. |
|
4723 |
m := contextView middleButtonMenu. |
|
3694 | 4724 |
m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack'). |
3447 | 4725 |
m selectorAt:#showVerboseWalkback put:#showDenseWalkback. |
4726 |
||
4727 |
self redisplayBacktrace. |
|
4728 |
||
4729 |
"Created: / 17.11.2001 / 20:07:57 / cg" |
|
4730 |
"Modified: / 17.11.2001 / 22:39:41 / cg" |
|
4731 |
! |
|
4732 |
||
4733 |
showingDenseWalkback |
|
4734 |
^ verboseBacktrace == false. |
|
4735 |
||
4736 |
"Created: / 17.11.2001 / 20:13:53 / cg" |
|
4737 |
! |
|
4738 |
||
4739 |
showingVerboseWalkback |
|
4740 |
^ verboseBacktrace == true. |
|
4741 |
||
4742 |
"Created: / 17.11.2001 / 20:13:46 / cg" |
|
4743 |
! |
|
4744 |
||
9626 | 4745 |
sizeChanged:how |
10205 | 4746 |
super sizeChanged:how. |
9626 | 4747 |
LastExtent := self extent. |
4748 |
||
4749 |
"Created: / 10-11-2010 / 09:08:41 / cg" |
|
4750 |
! |
|
4751 |
||
266 | 4752 |
skip |
4753 |
"skip for cursor line in selected method" |
|
4754 |
||
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4755 |
stepHow := #skip. |
266 | 4756 |
self doStep:codeView cursorLine. |
790 | 4757 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4758 |
"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
|
4759 |
! |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4760 |
|
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4761 |
skipForReturn |
2581 | 4762 |
"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
|
4763 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4764 |
stepHow := #skipReturn. |
754
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4765 |
self doStep:#return. |
1848d4e89bc4
much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents:
745
diff
changeset
|
4766 |
|
1063
cc4f9a5d49ac
added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
4767 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
2581 | 4768 |
! |
4769 |
||
4770 |
skipUntilEntering |
|
4771 |
"skip until some particular method is invoked." |
|
4772 |
||
4773 |
|selector| |
|
4774 |
||
10205 | 4775 |
selector := Dialog |
11210 | 4776 |
request:'Skip until entering what (matchpattern):' |
4777 |
initialAnswer:self goodSkipUntilSelector. |
|
2581 | 4778 |
selector size == 0 ifTrue:[^ self]. |
4779 |
||
4780 |
stepUntilEntering := selector asSymbol. |
|
4781 |
stepHow := #send. |
|
4782 |
self doStep:-1. |
|
4783 |
||
4784 |
"Modified: 3.3.1997 / 20:56:32 / cg" |
|
3447 | 4785 |
! |
4786 |
||
4787 |
toggleVerboseWalkback |
|
4788 |
verboseBacktrace ifFalse:[ |
|
11210 | 4789 |
self showVerboseWalkback |
3447 | 4790 |
] ifTrue:[ |
11210 | 4791 |
self showDenseWalkback |
3447 | 4792 |
]. |
4793 |
||
4794 |
"Modified: / 17.11.2001 / 20:07:45 / cg" |
|
266 | 4795 |
! ! |
4796 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4797 |
!DebugView methodsFor:'menu & button actions-breakpoints'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4798 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4799 |
addBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4800 |
"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
|
4801 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4802 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4803 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4804 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4805 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4806 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4807 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4808 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4809 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4810 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4811 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4812 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4813 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4814 |
(method notNil and:[method isBreakpointed not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4815 |
method setBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4816 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4817 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4818 |
contextView middleButtonMenu disable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4819 |
contextView middleButtonMenu enable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4820 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4821 |
"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
|
4822 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4823 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4824 |
allowBreakPointsInDebugger |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4825 |
^ ignoreBreakpoints not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4826 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4827 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4828 |
allowBreakPointsInDebugger:aBoolean |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4829 |
ignoreBreakpoints := aBoolean not. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4830 |
self initializeMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4831 |
self initializeContextViewsMiddleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4832 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4833 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4834 |
doIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4835 |
self allowBreakPointsInDebugger:false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4836 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4837 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4838 |
doNotIgnoreBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4839 |
self allowBreakPointsInDebugger:true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4840 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4841 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4842 |
ignoreAllHaltsForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4843 |
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
|
4844 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4845 |
"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
|
4846 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4847 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4848 |
ignoreAllHaltsUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4849 |
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
|
4850 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4851 |
"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
|
4852 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4853 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4854 |
ignoreBreakpointsWithThisParameterForever |
11370 | 4855 |
Object disableBreakPoint:breakPointParameter. |
4856 |
"/ self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false. |
|
4857 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4858 |
"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
|
4859 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4860 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4861 |
ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4862 |
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
|
4863 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4864 |
"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
|
4865 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4866 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4867 |
ignoreHaltForever |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4868 |
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
|
4869 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4870 |
"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
|
4871 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4872 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4873 |
ignoreHaltUntilShiftKeyIsPressed |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4874 |
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
|
4875 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4876 |
"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
|
4877 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4878 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4879 |
openBreakPointBrowser |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4880 |
Tools::BreakpointBrowser open |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4881 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4882 |
"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
|
4883 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4884 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4885 |
openIgnoreAllHaltsUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4886 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4887 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4888 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4889 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4890 |
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
|
4891 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4892 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4893 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4894 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4895 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4896 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4897 |
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
|
4898 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4899 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4900 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4901 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4902 |
"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
|
4903 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4904 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4905 |
openIgnoreBreakpointsWithThisParameterNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4906 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4907 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4908 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4909 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4910 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4911 |
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
|
4912 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4913 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4914 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4915 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4916 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4917 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4918 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4919 |
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
|
4920 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4921 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4922 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4923 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4924 |
"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
|
4925 |
"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
|
4926 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4927 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4928 |
openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4929 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4930 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4931 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4932 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4933 |
request:(resources |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4934 |
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
|
4935 |
with:breakPointParameter) |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4936 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4937 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4938 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4939 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4940 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4941 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4942 |
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
|
4943 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4944 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4945 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4946 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4947 |
"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
|
4948 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4949 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4950 |
openIgnoreHaltNTimesDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4951 |
|answer n| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4952 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4953 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4954 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4955 |
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
|
4956 |
initialAnswer:(LastIgnoreHaltNTimes ? '') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4957 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4958 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4959 |
n := Integer readFrom:answer onError:nil. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4960 |
n notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4961 |
LastIgnoreHaltNTimes := n. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4962 |
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
|
4963 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4964 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4965 |
] loop. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4966 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4967 |
"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
|
4968 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4969 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4970 |
openIgnoreHaltUntilTimeElapsedDialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4971 |
|answer dT| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4972 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4973 |
[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4974 |
answer := Dialog |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4975 |
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
|
4976 |
initialAnswer:(LastIgnoreHaltDuration ? '30s') printString. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4977 |
answer isEmptyOrNil ifTrue:[^ self]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4978 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4979 |
dT := TimeDuration readFrom:answer onError:[ nil ]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4980 |
dT notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4981 |
LastIgnoreHaltDuration := dT. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4982 |
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
|
4983 |
^ self. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4984 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4985 |
] loop |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4986 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4987 |
"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
|
4988 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4989 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4990 |
removeAllBreakpoints |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4991 |
"remove all trace & breakpoints - if any" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4992 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4993 |
(MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4994 |
self withExecuteCursorDo:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4995 |
MessageTracer unwrapAllMethods |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4996 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4997 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4998 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
4999 |
"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
|
5000 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5001 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5002 |
removeBreakpoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5003 |
"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
|
5004 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5005 |
|implementorClass method| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5006 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5007 |
selectedContext isNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5008 |
^ self showError:'** select a context first **' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5009 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5010 |
(MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5011 |
^ self |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5012 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5013 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5014 |
implementorClass := selectedContext methodClass. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5015 |
implementorClass notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5016 |
method := implementorClass compiledMethodAt:selectedContext selector. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5017 |
(method notNil and:[method isBreakpointed]) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5018 |
method clearBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5019 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5020 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5021 |
contextView middleButtonMenu disable:#removeBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5022 |
contextView middleButtonMenu enable:#addBreakpoint. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5023 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5024 |
"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
|
5025 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5026 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5027 |
stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5028 |
self class stopIgnoringHalts |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5029 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5030 |
|
266 | 5031 |
!DebugView methodsFor:'private'! |
5032 |
||
6487 | 5033 |
abortAllIsHandled |
9750 | 5034 |
^ AbortAllOperationWantedQuery query |
5035 |
||
5036 |
"Modified: / 09-02-2011 / 13:53:13 / cg" |
|
6487 | 5037 |
! |
5038 |
||
266 | 5039 |
busy |
5040 |
^ busy |
|
5041 |
! |
|
5042 |
||
5043 |
exclusive:aBoolean |
|
5044 |
exclusive := aBoolean |
|
5045 |
! |
|
5046 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5047 |
explainSelection |
8212 | 5048 |
|interval crsrPos| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5049 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5050 |
interval := self selectedInterval. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5051 |
interval isEmpty ifTrue:[ |
11210 | 5052 |
crsrPos := codeView characterPositionOfCursor. |
5053 |
codeView characterUnderCursor isSeparator ifTrue:[ |
|
5054 |
crsrPos := (crsrPos - 1) max:1 |
|
5055 |
]. |
|
5056 |
interval := crsrPos to:crsrPos. |
|
10205 | 5057 |
]. |
5058 |
self |
|
11210 | 5059 |
withNodeValueAtInterval:interval |
5060 |
do:[:value :description | |
|
5061 |
self showValue:value |
|
5062 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5063 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5064 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5065 |
findNodeForInterval:interval |
8212 | 5066 |
|source| |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5067 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5068 |
interval isEmpty ifTrue: [^ nil]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5069 |
|
8487
ddf59247960c
slow runArray (text) operations
Claus Gittinger <cg@exept.de>
parents:
8432
diff
changeset
|
5070 |
source := codeView contentsAsString string. |
10205 | 5071 |
"/ source := currentMethod notNil |
5072 |
"/ ifTrue:[ currentMethod source ] |
|
8396 | 5073 |
"/ ifFalse:[ codeView contents asString ]. |
8257
106d3fecbca0
findNodeForInterval: care for nonexisting source
Claus Gittinger <cg@exept.de>
parents:
8225
diff
changeset
|
5074 |
source isNil ifTrue:[^ nil]. |
8214 | 5075 |
|
8212 | 5076 |
^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string) allowErrors:true. |
5077 |
"/ ^ DoWhatIMeanSupport findNodeForInterval:interval in:(source string). |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5078 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5079 |
|
7912 | 5080 |
findNodeIn:tree forInterval:interval |
5081 |
<resource: #obsolete> |
|
10205 | 5082 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5083 |
|node| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5084 |
|
7912 | 5085 |
self obsoleteMethodWarning. |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5086 |
node := nil. |
10205 | 5087 |
tree nodesDo:[:each | |
11210 | 5088 |
(each intersectsInterval:interval) ifTrue:[ |
5089 |
(node isNil or:[node == each parent]) ifTrue:[ |
|
5090 |
node := each |
|
5091 |
] ifFalse:[ |
|
5092 |
(node parent notNil |
|
5093 |
and:[node parent isCascade and:[each parent isCascade]]) ifFalse:[^ nil] |
|
5094 |
] |
|
5095 |
] |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5096 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5097 |
^ node |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5098 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5099 |
|
2581 | 5100 |
goodSkipUntilSelector |
5101 |
|current| |
|
5102 |
||
5103 |
lastStepUntilEntering notNil ifTrue:[^ lastStepUntilEntering]. |
|
5104 |
selectedContext isNil ifTrue:[^ nil]. |
|
5105 |
current := selectedContext selector. |
|
5106 |
current isNil ifTrue:[^ nil]. |
|
5107 |
('change:*' match:current) ifTrue:[ |
|
11210 | 5108 |
^ 'update:*' |
2581 | 5109 |
]. |
5110 |
^ nil |
|
5111 |
! |
|
5112 |
||
8179 | 5113 |
haltSelectors |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5114 |
^ #( #'halt' #'halt:' #'breakPoint:' #'breakPoint:info:' #'break'). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5115 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5116 |
"Modified (format): / 27-01-2012 / 11:10:00 / cg" |
8179 | 5117 |
! |
5118 |
||
10205 | 5119 |
inspectedProcess |
5120 |
^ inspectedProcess |
|
266 | 5121 |
! |
5122 |
||
5123 |
interruptProcessWith:aBlock |
|
5124 |
"let inspected process do something, then update the context list" |
|
5125 |
||
5126 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5127 |
self showTerminated. |
5128 |
^ self |
|
266 | 5129 |
]. |
5130 |
inspectedProcess interruptWith:aBlock. |
|
5131 |
" |
|
5132 |
give the process a chance to run, then update |
|
5133 |
" |
|
5134 |
(Delay forSeconds:0.2) wait. |
|
5135 |
self setContext:(inspectedProcess suspendedContext). |
|
5136 |
! |
|
5137 |
||
2317
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5138 |
mayProceed:aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5139 |
mayProceed := aBoolean |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5140 |
! |
c2000833c86d
care mayProceed information.
Claus Gittinger <cg@exept.de>
parents:
2313
diff
changeset
|
5141 |
|
8194 | 5142 |
openHTMLDocument: anHTMLFilename |
5143 |
"open a HTMLDocumentView on anHTMLFilename" |
|
5144 |
||
5145 |
HTMLDocumentView openFullOnDocumentationFile: anHTMLFilename |
|
5146 |
! |
|
5147 |
||
266 | 5148 |
processPerform:aMessage |
5149 |
"do something, then update the context list" |
|
5150 |
||
5151 |
inspectedProcess isDead ifTrue:[ |
|
11210 | 5152 |
self showTerminated. |
5153 |
^ self |
|
266 | 5154 |
]. |
5155 |
inspectedProcess perform:aMessage. |
|
9348
df88a9a5ef36
added: browseProcessesApplication
Claus Gittinger <cg@exept.de>
parents:
9337
diff
changeset
|
5156 |
|
266 | 5157 |
" |
5158 |
give the process a chance to run, then update |
|
5159 |
" |
|
5160 |
(Delay forSeconds:0.2) wait. |
|
5161 |
self setContext:(inspectedProcess suspendedContext). |
|
5162 |
! |
|
5163 |
||
939 | 5164 |
redisplayBacktrace |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5165 |
"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
|
5166 |
verbose-flag setting is changed" |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5167 |
|
939 | 5168 |
|oldSelection oldContext con idx| |
5169 |
||
5170 |
contextArray notNil ifTrue:[ |
|
11210 | 5171 |
self withExecuteCursorDo:[ |
5172 |
oldSelection := contextView selection. |
|
5173 |
oldSelection notNil ifTrue:[ |
|
5174 |
oldContext := contextArray at:oldSelection ifAbsent:nil. |
|
5175 |
]. |
|
5176 |
||
5177 |
con := firstContext. |
|
950 | 5178 |
"/ con := contextArray at:1. |
11210 | 5179 |
"/ force redeisplay, even if same by changing the first entry |
5180 |
contextArray size > 0 ifTrue:[ |
|
5181 |
contextArray at:1 put:nil. |
|
5182 |
]. |
|
5183 |
self setContext:con. |
|
5184 |
||
5185 |
oldContext isNil ifTrue:[ |
|
5186 |
idx := oldSelection |
|
5187 |
] ifFalse:[ |
|
5188 |
idx := contextArray identityIndexOf:oldContext ifAbsent:nil. |
|
5189 |
]. |
|
5190 |
contextView setSelection:idx. |
|
5191 |
idx notNil ifTrue:[ |
|
5192 |
self showSelection:idx |
|
5193 |
] |
|
5194 |
] |
|
939 | 5195 |
] |
5196 |
||
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5197 |
"Created: / 10.1.1997 / 21:36:46 / cg" |
1661 | 5198 |
"Modified: / 21.5.1998 / 01:47:07 / cg" |
939 | 5199 |
! |
5200 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5201 |
selectedInterval |
7912 | 5202 |
^ codeView selectedInterval |
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5203 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
5204 |
|
7823 | 5205 |
showError:message |
5206 |
codeView contents:(resources string:message). |
|
5207 |
shown ifTrue:[ |
|
11210 | 5208 |
exclusive ifTrue:[ |
5209 |
"/ consider this a kludge: |
|
5210 |
"/ if exclusive, cannot use flash, since it suspends |
|
5211 |
"/ (but we cannot suspend here ...) |
|
5212 |
codeView redrawInverted. device flush. |
|
5213 |
OperatingSystem millisecondDelay:200. |
|
5214 |
codeView redraw |
|
5215 |
] ifFalse:[ |
|
5216 |
codeView flash |
|
5217 |
] |
|
7823 | 5218 |
] |
5219 |
||
5220 |
"Modified: / 18.11.2001 / 00:01:13 / cg" |
|
5221 |
! |
|
5222 |
||
5223 |
showTerminated |
|
5224 |
self showError:'** the process has terminated **' |
|
5225 |
! |
|
5226 |
||
5227 |
showValue:aValue |
|
5228 |
"/ TODO: show value in info field |
|
5229 |
"/ Transcript showCR:aValue printString |
|
5230 |
! |
|
5231 |
||
10205 | 5232 |
stepping |
5233 |
^ stepping |
|
5234 |
! |
|
5235 |
||
5236 |
unstep |
|
7823 | 5237 |
stepping := false. |
5238 |
bigStep := false. |
|
5239 |
steppedContext := wrapperContext := nil. |
|
5240 |
exitAction := nil |
|
5241 |
||
5242 |
"Modified: 22.10.1996 / 11:59:57 / cg" |
|
5243 |
! |
|
5244 |
||
10203 | 5245 |
updateButtonsAndMenuItemsForContext:aContext |
5246 |
|m| |
|
5247 |
||
5248 |
m := contextView middleButtonMenu. |
|
5249 |
m notNil ifTrue:[ |
|
11210 | 5250 |
self updateMenuItems. |
5251 |
||
5252 |
(inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[ |
|
5253 |
abortButton enable. |
|
5254 |
m enable:#doAbort. |
|
5255 |
] ifFalse:[ |
|
5256 |
abortButton disable. |
|
5257 |
m disable:#doAbort. |
|
5258 |
]. |
|
5259 |
exclusive ifTrue:[ |
|
5260 |
terminateButton disable. |
|
5261 |
m disable:#doTerminate. |
|
5262 |
] ifFalse:[ |
|
5263 |
terminateButton enable. |
|
5264 |
m enable:#doTerminate. |
|
5265 |
]. |
|
10203 | 5266 |
]. |
5267 |
||
5268 |
mayProceed == false ifTrue:[ |
|
11210 | 5269 |
continueButton disable. |
5270 |
m notNil ifTrue:[m disable:#doContinue]. |
|
10203 | 5271 |
] ifFalse:[ |
11210 | 5272 |
continueButton enable. |
5273 |
m notNil ifTrue:[m enable:#doContinue] |
|
10203 | 5274 |
]. |
5275 |
||
5276 |
"Created: / 06-07-2011 / 12:24:53 / cg" |
|
5277 |
! |
|
5278 |
||
7823 | 5279 |
updateContext |
5280 |
|oldContext idx| |
|
5281 |
||
5282 |
inspectedProcess state == #dead ifTrue:[ |
|
11210 | 5283 |
self showTerminated. |
5284 |
^ self |
|
7823 | 5285 |
]. |
5286 |
||
5287 |
oldContext := selectedContext. |
|
5288 |
[ |
|
11210 | 5289 |
(self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[ |
5290 |
oldContext notNil ifTrue:[ |
|
5291 |
contextArray notNil ifTrue:[ |
|
5292 |
idx := contextArray identityIndexOf:oldContext. |
|
5293 |
idx ~~ 0 ifTrue:[ |
|
5294 |
self showSelection:idx |
|
5295 |
] ifFalse:[ |
|
5296 |
codeView contents:('** context returned **') |
|
5297 |
] |
|
5298 |
] |
|
5299 |
] |
|
5300 |
]. |
|
7823 | 5301 |
] valueUninterruptably. |
5302 |
||
5303 |
"Modified: 20.10.1996 / 18:11:24 / cg" |
|
8212 | 5304 |
! |
5305 |
||
10203 | 5306 |
updateMenuItems |
5307 |
|m mthd cls mCls rCls| |
|
5308 |
||
5309 |
" |
|
5310 |
enable/disable some menu items |
|
5311 |
" |
|
5312 |
m := contextView middleButtonMenu. |
|
5313 |
m notNil ifTrue:[ |
|
11210 | 5314 |
m disable:#removeBreakpoint. |
5315 |
m disable:#addBreakpoint. |
|
5316 |
canShowMore ifFalse:[ |
|
5317 |
m disable:#showMore |
|
5318 |
]. |
|
5319 |
||
5320 |
selectedContext notNil ifTrue:[ |
|
5321 |
m enableAll:#(browseImplementors browseSenders inspectContext skip skipForReturn). |
|
5322 |
||
5323 |
mthd := selectedContext method. |
|
5324 |
mthd notNil ifTrue:[ |
|
5325 |
cls := mCls := mthd containingClass. |
|
5326 |
mthd isBreakpointed ifTrue:[ |
|
5327 |
m enable:#removeBreakpoint. |
|
5328 |
] ifFalse:[ |
|
5329 |
m enable:#addBreakpoint. |
|
5330 |
] |
|
5331 |
]. |
|
5332 |
rCls := selectedContext receiver class. |
|
5333 |
cls isNil ifTrue:[ |
|
5334 |
cls := rCls |
|
5335 |
]. |
|
5336 |
cls notNil ifTrue:[ |
|
5337 |
m enableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5338 |
rCls == mCls ifTrue:[ |
|
5339 |
m disable:#browseReceiversClass |
|
5340 |
]. |
|
5341 |
mCls isNil ifTrue:[ |
|
5342 |
m disable:#browseImplementingClass |
|
5343 |
] |
|
5344 |
||
5345 |
] ifFalse:[ |
|
5346 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5347 |
]. |
|
5348 |
] ifFalse:[ |
|
5349 |
m disableAll:#(browseImplementingClass browseReceiversClass browseClassHierarchy browseFullClassProtocol). |
|
5350 |
] |
|
10203 | 5351 |
] |
5352 |
! |
|
5353 |
||
8212 | 5354 |
withNodeValueAtInterval:interval do:aBlock |
9294
e19553d7e864
changed: #withNodeValueAtInterval:do:
Stefan Vogel <sv@exept.de>
parents:
9292
diff
changeset
|
5355 |
|node definingNode nm nmBold varIdx parentNode receiver con receiversNonMetaClass| |
8212 | 5356 |
|
5357 |
"/interval printCR. |
|
10205 | 5358 |
Error |
11210 | 5359 |
handle:[:ex | ] |
5360 |
do:[ |
|
5361 |
[ |
|
5362 |
node := self findNodeForInterval:interval |
|
5363 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:50. |
|
5364 |
]. |
|
9314
e58b9abd145a
comment/format in: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9308
diff
changeset
|
5365 |
|
8212 | 5366 |
node isNil ifTrue:[ ^ self ]. |
10205 | 5367 |
node isVariable ifFalse:[ |
11210 | 5368 |
"/ Transcript showCR:node. |
5369 |
^ self |
|
8592 | 5370 |
]. |
8212 | 5371 |
|
5372 |
nm := node name. |
|
8214 | 5373 |
nmBold := nm allBold. |
8600 | 5374 |
actualContext isNil ifTrue:[^ self ]. |
8636 | 5375 |
actualContext methodHome isNil ifTrue:[^ self ]. |
8214 | 5376 |
receiver := actualContext methodHome receiver. |
8212 | 5377 |
|
5378 |
(nm = 'self') ifTrue:[ |
|
11210 | 5379 |
aBlock value:receiver value:'receiver' allBold. |
5380 |
^ self |
|
8212 | 5381 |
]. |
5382 |
(nm = 'super') ifTrue:[ |
|
11210 | 5383 |
aBlock value:receiver value:'receiver' allBold. |
5384 |
^ self |
|
8212 | 5385 |
]. |
5386 |
(nm = 'thisContext') ifTrue:[ |
|
11210 | 5387 |
aBlock value:actualContext value:'context' allBold. |
5388 |
^ self |
|
8212 | 5389 |
]. |
5390 |
||
5391 |
definingNode := node whoDefines:nm. |
|
5392 |
definingNode isNil ifTrue:[ |
|
11210 | 5393 |
(receiver class allInstVarNames includes:nm) ifTrue:[ |
8214 | 5394 |
"/aBlock value:'xIII' value:'instVar'. |
11210 | 5395 |
receiver class isMetaclass ifTrue:[ |
5396 |
aBlock value:(receiver instVarNamed:nm) value:'classInstVar ',nmBold. |
|
5397 |
] ifFalse:[ |
|
5398 |
aBlock value:(receiver instVarNamed:nm) value:'instVar ',nmBold. |
|
5399 |
]. |
|
5400 |
^ self |
|
5401 |
]. |
|
5402 |
||
5403 |
receiversNonMetaClass := receiver class theNonMetaclass. |
|
5404 |
(receiversNonMetaClass privateClasses contains:[:cls | cls nameWithoutPrefix = nm]) ifTrue:[ |
|
5405 |
aBlock value:'' value:'private class ',nmBold. |
|
5406 |
^ self |
|
5407 |
]. |
|
5408 |
(receiversNonMetaClass classVarNames includes:nm) ifTrue:[ |
|
5409 |
aBlock value:((currentMethod mclass ? receiversNonMetaClass) theNonMetaclass classVarAt:nm) value:'classVar ',nmBold. |
|
5410 |
^ self |
|
5411 |
]. |
|
5412 |
receiversNonMetaClass sharedPoolNames do:[:eachPoolName | |
|
5413 |
|pool| |
|
5414 |
||
5415 |
pool := Smalltalk at:eachPoolName. |
|
5416 |
pool isNil ifTrue:[ pool := receiversNonMetaClass topNameSpace at:eachPoolName]. |
|
5417 |
(pool classVarNames includes:nm) ifTrue:[ |
|
5418 |
aBlock value:(pool classVarAt:nm) value:'poolVar ',nm allBold,' in ',eachPoolName allBold,' '. |
|
5419 |
^ self |
|
5420 |
]. |
|
5421 |
]. |
|
5422 |
(Smalltalk includesKey:nm asSymbol) ifTrue:[ |
|
5423 |
(Smalltalk at:nm asSymbol) isClass ifTrue:[ |
|
5424 |
aBlock value:'class: ',nmBold value:nil. |
|
5425 |
] ifFalse:[ |
|
5426 |
aBlock value:(Smalltalk at:nm asSymbol) value:'global ',nmBold. |
|
5427 |
]. |
|
5428 |
^ self |
|
5429 |
]. |
|
5430 |
aBlock value:'' value:'unknown'. |
|
5431 |
^ self |
|
8212 | 5432 |
]. |
5433 |
"/definingNode printCR. |
|
5434 |
||
5435 |
definingNode isMethod ifTrue:[ |
|
11210 | 5436 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5437 |
varIdx ~~ 0 ifTrue:[ |
|
5438 |
Error |
|
5439 |
handle:[:ex | ] |
|
5440 |
do:[ aBlock value:(actualContext methodHome argAt:varIdx) value:'methodArg ',nmBold ]. |
|
5441 |
^ self |
|
5442 |
]. |
|
5443 |
varIdx := definingNode temporaries findFirst:[:var | var name = nm]. |
|
5444 |
varIdx ~~ 0 ifTrue:[ |
|
5445 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5446 |
Error |
|
5447 |
handle:[:ex | ] |
|
5448 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5449 |
^ self |
|
5450 |
] |
|
5451 |
]. |
|
8212 | 5452 |
]. |
5453 |
||
5454 |
definingNode isBlock ifTrue:[ |
|
11210 | 5455 |
varIdx := definingNode arguments findFirst:[:arg | arg name = nm]. |
5456 |
(definingNode arguments contains:[:arg | arg name = nm]) ifTrue:[ |
|
5457 |
varIdx ~~ 0 ifTrue:[ |
|
5458 |
"/ am I in this block ? |
|
5459 |
(actualContext lineNumber notNil |
|
5460 |
and:[ definingNode lastLineNumber notNil |
|
5461 |
and:[ (actualContext lineNumber |
|
5462 |
between:definingNode firstLineNumber |
|
5463 |
and:definingNode lastLineNumber) |
|
5464 |
and:[ varIdx <= actualContext numArgs ] ]]) |
|
5465 |
ifTrue:[ |
|
5466 |
aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold . |
|
5467 |
^ self |
|
5468 |
]. |
|
8214 | 5469 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
11210 | 5470 |
^ self |
5471 |
] |
|
5472 |
]. |
|
8212 | 5473 |
]. |
5474 |
||
5475 |
parentNode := definingNode parent. |
|
5476 |
||
5477 |
[parentNode notNil] whileTrue:[ |
|
5478 |
"/'isMethod ' print. parentNode isMethod printCR. |
|
11210 | 5479 |
parentNode isMethod ifTrue:[ |
5480 |
varIdx := parentNode temporaries findFirst:[:var | var name = nm]. |
|
5481 |
varIdx ~~ 0 ifTrue:[ |
|
5482 |
actualContext methodHome numVars >= varIdx ifTrue:[ |
|
5483 |
Error |
|
5484 |
handle:[:ex | ] |
|
5485 |
do:[ aBlock value:(actualContext methodHome varAt:varIdx) value:'methodVar ',nmBold ]. |
|
5486 |
^ self |
|
5487 |
] |
|
5488 |
]. |
|
5489 |
]. |
|
8212 | 5490 |
"/'isBlock ' print. parentNode isBlock printCR. |
11210 | 5491 |
parentNode isBlock ifTrue:[ |
5492 |
"/ we dont have any information on the inlineability |
|
5493 |
"/ of this block here (RBParser does not know what |
|
5494 |
"/ the compiler does. |
|
5495 |
"/ therefore, it is questionable if we can use the |
|
5496 |
"/ contexts home context here. |
|
5497 |
"/ am I in this block ? |
|
5498 |
con := actualContext. |
|
5499 |
[con notNil |
|
5500 |
and:[ parentNode lastLineNumber notNil |
|
5501 |
and:[ con lineNumber notNil |
|
5502 |
and:[ con lineNumber |
|
5503 |
between:parentNode firstLineNumber |
|
5504 |
and:parentNode lastLineNumber ]]]] whileTrue:[ |
|
5505 |
con := con sender. |
|
5506 |
]. |
|
5507 |
con notNil ifTrue:[ |
|
5508 |
varIdx := parentNode arguments findFirst:[:arg | arg name = nm]. |
|
5509 |
varIdx ~~ 0 ifTrue:[ |
|
5510 |
Error |
|
5511 |
handle:[:ex | ] |
|
5512 |
do:[ aBlock value:(con argAt:varIdx) value:'blockArg ',nmBold ]. |
|
5513 |
^ self |
|
5514 |
]. |
|
5515 |
varIdx := parentNode body temporaries findFirst:[:var | var name = nm]. |
|
5516 |
varIdx ~~ 0 ifTrue:[ |
|
5517 |
Error |
|
5518 |
handle:[:ex | ] |
|
5519 |
do:[ aBlock value:(con varAt:varIdx) value:'blockVar ',nmBold ]. |
|
5520 |
^ self |
|
5521 |
]. |
|
5522 |
]. |
|
5523 |
]. |
|
5524 |
parentNode := parentNode parent. |
|
8212 | 5525 |
]. |
8214 | 5526 |
aBlock value:nmBold , ' is not in scope of selected context' value:nil. |
9446 | 5527 |
|
9688
805ea34ba3ef
changed: #withNodeValueAtInterval:do:
Claus Gittinger <cg@exept.de>
parents:
9662
diff
changeset
|
5528 |
"Modified: / 18-01-2011 / 17:57:34 / cg" |
7823 | 5529 |
! ! |
5530 |
||
5531 |
!DebugView methodsFor:'private queries'! |
|
5532 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5533 |
canBrowseClassHierarchy |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5534 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5535 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5536 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5537 |
^ m notNil and:[m isEnabled:#browseClassHierarchy] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5538 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5539 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5540 |
canBrowseFullClassProtocol |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5541 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5542 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5543 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5544 |
^ m notNil and:[m isEnabled:#browseFullClassProtocol] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5545 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5546 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5547 |
canBrowseImplementingClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5548 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5549 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5550 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5551 |
^ m notNil and:[m isEnabled:#browseImplementingClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5552 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5553 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5554 |
canBrowseProcessesApplication |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5555 |
|p| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5556 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5557 |
p := inspectedProcess ? Processor activeProcess. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5558 |
p isNil ifTrue:[^ false]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5559 |
^ p isGUIProcess |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5560 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5561 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5562 |
canBrowseReceiversClass |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5563 |
|m| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5564 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5565 |
m := contextView middleButtonMenu. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5566 |
^ m notNil and:[m isEnabled:#browseReceiversClass] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5567 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5568 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5569 |
canDefineMethod |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5570 |
^ defineButton isVisible |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5571 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5572 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5573 |
canRestart |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5574 |
^ restartButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5575 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5576 |
"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
|
5577 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5578 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5579 |
canReturn |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5580 |
^ returnButton isEnabled |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5581 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5582 |
"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
|
5583 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5584 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5585 |
canSendEmail |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5586 |
^ SendMailTool notNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5587 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5588 |
"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
|
5589 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5590 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5591 |
canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5592 |
^ canShowMore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5593 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5594 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5595 |
hasContextSelected |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5596 |
^ contextView hasSelection |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5597 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5598 |
"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
|
5599 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5600 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5601 |
hasHaltsToIgnore |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5602 |
^ IgnoredHalts notEmptyOrNil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5603 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5604 |
|
7823 | 5605 |
isAborting |
5606 |
^ exitAction == #abort |
|
5607 |
! |
|
5608 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5609 |
isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5610 |
^ isStoppedAtBreakPointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5611 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5612 |
"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
|
5613 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5614 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5615 |
isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5616 |
^ isStoppedAtHaltOrBreakPoint |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5617 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5618 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5619 |
isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5620 |
^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5621 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5622 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5623 |
selectedContextIsWrapped |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5624 |
|con mthd| |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5625 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5626 |
contextView selection notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5627 |
(contextView selectionValue startsWith:'**') ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5628 |
con := contextArray at:(contextView selection). |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5629 |
mthd := con methodHome method. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5630 |
^ mthd notNil and:[mthd isWrapped] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5631 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5632 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5633 |
^ false. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5634 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5635 |
|
7823 | 5636 |
setOfHiddenCallingSelectors |
5637 |
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' ) |
|
5638 |
! |
|
5639 |
||
5640 |
setOfHiddenCallingSelectors:aCollectionOfSymbols |
|
5641 |
setOfHiddenCallingSelectors := aCollectionOfSymbols |
|
5642 |
! ! |
|
5643 |
||
9922 | 5644 |
!DebugView methodsFor:'private-breakpoints'! |
5645 |
||
11210 | 5646 |
addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey forAll:aBoolean |
9922 | 5647 |
|haltingContext haltingMethod lineNrOfHalt| |
5648 |
||
5649 |
aBoolean ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5650 |
haltingMethod := #all |
9922 | 5651 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5652 |
haltingContext := self findHaltingContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5653 |
haltingContext isNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5654 |
Transcript showCR:'no halting context found'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5655 |
^ self |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5656 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5657 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5658 |
haltingMethod := haltingContext method. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5659 |
lineNrOfHalt := haltingContext lineNumber. |
9922 | 5660 |
]. |
5661 |
||
5662 |
self class |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5663 |
ignoreHaltIn:haltingMethod at:lineNrOfHalt |
11210 | 5664 |
forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey |
5665 |
||
5666 |
"Created: / 27-01-2012 / 11:31:12 / cg" |
|
9922 | 5667 |
! |
5668 |
||
5669 |
canAddBreakpoint |
|
5670 |
|m| |
|
5671 |
||
5672 |
m := contextView middleButtonMenu. |
|
5673 |
^ m notNil and:[m isEnabled:#addBreakpoint] |
|
5674 |
! |
|
5675 |
||
5676 |
canRemoveBreakpoint |
|
5677 |
|m| |
|
5678 |
||
5679 |
m := contextView middleButtonMenu. |
|
5680 |
^ m notNil and:[m isEnabled:#removeBreakpoint] |
|
5681 |
! |
|
5682 |
||
5683 |
findHaltingContext |
|
5684 |
|haltSelectors| |
|
5685 |
||
5686 |
haltSelectors := self haltSelectors. |
|
5687 |
||
10205 | 5688 |
contextArray keysAndValuesDo:[:idx :con | |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5689 |
|sel con2 sel2 method| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5690 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5691 |
sel := con selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5692 |
(haltSelectors includes:sel) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5693 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5694 |
method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5695 |
con2 := contextArray at:idx+1. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5696 |
sel2 := con2 selector. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5697 |
(haltSelectors includes:sel2) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5698 |
con2 method mclass == Object ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5699 |
^ contextArray at:idx+2. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5700 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5701 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5702 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5703 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5704 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5705 |
(contextArray at:idx+1) infoPrintCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5706 |
^ contextArray at:idx+1 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5707 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5708 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5709 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5710 |
con method isWrapped ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5711 |
^ con |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5712 |
]. |
9922 | 5713 |
]. |
5714 |
^ nil |
|
5715 |
||
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5716 |
"Modified: / 27-01-2012 / 11:06:02 / cg" |
9922 | 5717 |
! |
5718 |
||
5719 |
ignoreBreakpoints |
|
5720 |
^ ignoreBreakpoints |
|
5721 |
||
5722 |
"Created: / 17.11.2001 / 18:20:16 / cg" |
|
5723 |
! ! |
|
5724 |
||
7823 | 5725 |
!DebugView methodsFor:'private-cache handling'! |
5726 |
||
5727 |
cacheMyself |
|
5728 |
"remember myself for next debug session" |
|
5729 |
||
5730 |
"caching the last debugger will make the next debugger appear |
|
5731 |
faster, since no resources have to be allocated in the display. |
|
5732 |
We have to be careful to release all refs to the debuggee, though. |
|
5733 |
Otherwise, the GC will not be able to release it." |
|
5734 |
||
5735 |
windowGroup notNil ifTrue:[ |
|
11210 | 5736 |
windowGroup setProcess:nil. |
7823 | 5737 |
]. |
5738 |
||
5739 |
self releaseDebuggee. |
|
5740 |
||
5741 |
cachable ~~ true ifTrue:[^ self]. |
|
5742 |
||
5743 |
"/ |
|
5744 |
"/ only cache if I am on the Display |
|
5745 |
"/ |
|
5746 |
device == Display ifTrue:[ |
|
11210 | 5747 |
exclusive ifTrue:[ |
5748 |
CachedExclusive := self |
|
5749 |
] ifFalse:[ |
|
5750 |
CachedDebugger := self |
|
5751 |
]. |
|
7823 | 5752 |
]. |
5753 |
||
5754 |
ObjectMemory stepInterruptHandler == self ifTrue:[ |
|
11210 | 5755 |
ObjectMemory stepInterruptHandler:nil |
7823 | 5756 |
]. |
5757 |
||
5758 |
"Modified: 10.7.1997 / 15:50:46 / stefan" |
|
5759 |
"Modified: 31.7.1997 / 21:20:14 / cg" |
|
5760 |
! |
|
5761 |
||
5762 |
isCached |
|
5763 |
"tell wether we are a cached debugger" |
|
5764 |
||
5765 |
CachedExclusive == self ifTrue:[ |
|
11210 | 5766 |
^ true. |
7823 | 5767 |
]. |
5768 |
CachedDebugger == self ifTrue:[ |
|
11210 | 5769 |
^ true. |
7823 | 5770 |
]. |
5771 |
||
5772 |
^ false. |
|
5773 |
||
5774 |
"Created: 10.7.1997 / 15:22:43 / stefan" |
|
5775 |
! |
|
5776 |
||
5777 |
releaseDebuggee |
|
5778 |
"We have to be careful to release all refs to the debuggee, |
|
5779 |
because we may be in the cache. |
|
5780 |
Otherwise, the GC will not be able to release it" |
|
5781 |
||
5782 |
busy := false. |
|
5783 |
||
5784 |
codeView acceptAction:nil. |
|
5785 |
codeView doItAction:nil. |
|
5786 |
codeView contents:nil. |
|
5787 |
||
5788 |
receiverInspector release. |
|
5789 |
contextInspector release. |
|
5790 |
inspectedProcess := nil. |
|
5791 |
contextArray := nil. |
|
5792 |
selectedContext := actualContext := firstContext := nil. |
|
5793 |
steppedContext := wrapperContext := nil. |
|
5794 |
catchBlock := nil. |
|
5795 |
grabber := nil. |
|
5796 |
self autoUpdateOff. |
|
5797 |
||
5798 |
"Created: / 10.7.1997 / 14:57:51 / stefan" |
|
5799 |
"Modified: / 10.7.1997 / 15:50:38 / stefan" |
|
5800 |
"Modified: / 17.11.2001 / 22:58:17 / cg" |
|
5801 |
! |
|
5802 |
||
5803 |
uncacheMyself |
|
5804 |
"do not remember myself any longer for next debug session" |
|
5805 |
||
5806 |
cachable := false. |
|
5807 |
||
5808 |
CachedExclusive == self ifTrue:[ |
|
11210 | 5809 |
CachedExclusive := nil. |
7823 | 5810 |
]. |
5811 |
CachedDebugger == self ifTrue:[ |
|
11210 | 5812 |
CachedDebugger := nil. |
7823 | 5813 |
]. |
5814 |
OpenDebuggers notNil ifTrue:[ |
|
11210 | 5815 |
OpenDebuggers remove:self ifAbsent:[]. |
7823 | 5816 |
]. |
5817 |
||
5818 |
"Modified: 31.7.1997 / 21:20:11 / cg" |
|
5819 |
! ! |
|
5820 |
||
10628 | 5821 |
!DebugView methodsFor:'private-code view'! |
5822 |
||
5823 |
codeAspect |
|
5824 |
||
5825 |
^#method |
|
5826 |
||
5827 |
"Created: / 27-07-2011 / 13:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5828 |
! ! |
|
5829 |
||
7823 | 5830 |
!DebugView methodsFor:'private-context handling'! |
5831 |
||
11391 | 5832 |
contextListEntryFor:aContext |
5833 |
|s| |
|
5834 |
||
5835 |
aContext selector == #doIt ifTrue:[ |
|
5836 |
aContext receiver isNil ifTrue:[ |
|
5837 |
^ 'doIt' allBold |
|
5838 |
] |
|
5839 |
]. |
|
5840 |
||
5841 |
s := Text streamContents:[:s | aContext printOn:s ]. |
|
5842 |
RememberedCallChain notNil ifTrue:[ |
|
5843 |
(RememberedCallChain includesIdentical:aContext) ifTrue:[ |
|
5844 |
s := s colorizeAllWith:(Color red). |
|
5845 |
]. |
|
5846 |
]. |
|
5847 |
^ s |
|
5848 |
||
5849 |
"Created: / 21-05-2007 / 13:30:24 / cg" |
|
5850 |
! |
|
5851 |
||
266 | 5852 |
setContext:aContext |
5853 |
"show calling chain from aContext in the walk-back listview" |
|
5854 |
||
641 | 5855 |
^ 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
|
5856 |
|
641 | 5857 |
"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
|
5858 |
! |
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
5859 |
|
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
5860 |
setContext:aContext releaseInspectors:releaseInspectors |
2720
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
5861 |
"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
|
5862 |
Most complications here arise from filtering less-interesting contexts |
a756bd875d02
more filtering of uninteresting contexts
Claus Gittinger <cg@exept.de>
parents:
2709
diff
changeset
|
5863 |
if not in verbose-context mode." |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
5864 |
|
3702 | 5865 |
|con text method caller caller2 called called2 m count c cc |
3447 | 5866 |
suspendContext calledBySuspendContext nm h calledContext| |
266 | 5867 |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
5868 |
(contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5869 |
"no change" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5870 |
^ false |
266 | 5871 |
]. |
5872 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5873 |
isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := false. |
939 | 5874 |
firstContext := aContext. |
5875 |
||
266 | 5876 |
m := contextView middleButtonMenu. |
5877 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5878 |
m disable:#showMore. |
266 | 5879 |
]. |
3269 | 5880 |
canShowMore := false. |
266 | 5881 |
|
5882 |
aContext isNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5883 |
text := Array with:'** no context **'. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5884 |
contextArray := nil. |
266 | 5885 |
] ifFalse:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5886 |
text := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5887 |
contextArray := OrderedCollection new:nChainShown. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5888 |
con := aContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5889 |
calledContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5890 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5891 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5892 |
"/ with dense backtrace, hide the ProcessorScheduler |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5893 |
"/ 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
|
5894 |
"/ context within the first 10 contexts |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5895 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5896 |
suspendContext := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5897 |
c := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5898 |
1 to:10 do:[:i | |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5899 |
|sel| |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5900 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5901 |
c notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5902 |
(sel := c selector) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5903 |
((sel isSymbol and:[sel startsWith:'suspend']) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5904 |
and:[c receiver isMemberOf:Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5905 |
suspendContext := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5906 |
calledBySuspendContext := cc. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5907 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5908 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5909 |
cc := c. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5910 |
c := c sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5911 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5912 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5913 |
suspendContext notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5914 |
con := suspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5915 |
calledContext := calledBySuspendContext. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5916 |
suspendContext := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5917 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5918 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5919 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5920 |
con notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5921 |
"/ hide the halt implementation |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5922 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5923 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5924 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5925 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5926 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5927 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5928 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5929 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5930 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5931 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5932 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5933 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5934 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5935 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5936 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5937 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5938 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5939 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5940 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5941 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5942 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5943 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5944 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5945 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5946 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5947 |
get them all |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5948 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5949 |
count := 0. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5950 |
[con notNil and:[count <= nChainShown]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5951 |
(self haltSelectors includes:con selector) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5952 |
(method := con method) notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5953 |
method mclass == Object ifTrue:[ |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5954 |
(con selector startsWith:'breakPoint:') ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5955 |
isStoppedAtBreakPointWithParameter := true. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5956 |
breakPointParameter := con argAt:1. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
5957 |
]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5958 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5959 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5960 |
method mclass == Breakpoint ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5961 |
isStoppedAtHaltOrBreakPoint := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5962 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5963 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5964 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5965 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5966 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5967 |
[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5968 |
DebuggingDebugger == true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5969 |
'showingContext1: (' print. con print. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5970 |
') --> ' print. (self showingContext1:con calling:calledContext) printCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5971 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5972 |
self showingContext1:con calling:calledContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5973 |
] whileFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5974 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5975 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5976 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5977 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5978 |
DebuggingDebugger == true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5979 |
'showingContext2: (' print. con print. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5980 |
') --> ' print. (self showingContext2:con nesting:count) printCR. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5981 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5982 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5983 |
(self showingContext2:con nesting:count) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5984 |
"/ ignore it, if its in the same |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5985 |
"/ method as the previous context |
3447 | 5986 |
"/ (verboseBacktrace ~~ true |
10205 | 5987 |
"/ and:[count > 0 |
3447 | 5988 |
"/ and:[contextArray last method == con method |
10205 | 5989 |
"/ and:[(contextArray last isBlockContext not |
3447 | 5990 |
"/ & con isBlockContext not) not ]]]) ifTrue:[ |
5991 |
"/ "/ skip it, if its in the same method |
|
5992 |
"/ "/ as the called context. |
|
5993 |
"/ ] ifFalse:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5994 |
contextArray add:con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5995 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5996 |
(MoreDebuggingDetail == true) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5997 |
nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5998 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
5999 |
Error |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6000 |
handle:[:ex | nm := '???' ] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6001 |
do:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6002 |
nm := self contextListEntryFor:con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6003 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6004 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6005 |
text add:nm. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6006 |
count := count + 1. |
3447 | 6007 |
"/ ]. |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6008 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6009 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6010 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6011 |
"/ 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
|
6012 |
"/ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6013 |
method := con method. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6014 |
(method notNil and:[method isWrapped]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6015 |
called := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6016 |
caller := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6017 |
(caller notNil and:[caller receiver == method originalMethod]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6018 |
called2 := caller. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6019 |
caller2 := caller sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6020 |
(caller2 notNil and:[caller2 method == method]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6021 |
calledContext := called2. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6022 |
con := caller2 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6023 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6024 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6025 |
caller := caller2 := nil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6026 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6027 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6028 |
"/ with dense backtrace, skip the doIt methods context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6029 |
"/ (its dummy anyway) and fake that contexts name |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6030 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6031 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6032 |
(con isBlockContext |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6033 |
and:[(h := con home) == con sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6034 |
and:[h notNil |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6035 |
and:[(self setOfHiddenCallingSelectors includes:h selector) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6036 |
and:[h method who isNil]]]]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6037 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6038 |
con := con sender. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6039 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6040 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6041 |
text add:(self contextListEntryFor:con methodHome). |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6042 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6043 |
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
|
6044 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6045 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6046 |
"/ with dense backtrace, dont show below the doIt |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6047 |
( verboseBacktrace ~~ true |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6048 |
and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6049 |
con := nil. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6050 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6051 |
calledContext := con. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6052 |
con := con sender |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6053 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6054 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6055 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6056 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6057 |
did we reach the end ? |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6058 |
" |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6059 |
(con isNil or:[con sender isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6060 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6061 |
"/ the very last one is the startup context |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6062 |
"/ (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
|
6063 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6064 |
(contextArray notEmpty |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6065 |
and:[contextArray last selector isNil]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6066 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6067 |
text removeLast |
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 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6070 |
verboseBacktrace ~~ true ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6071 |
"/ in dense mode, remove the process startup |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6072 |
"/ contexts (if any) |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6073 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6074 |
(contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6075 |
and:[(con := contextArray last) methodClass == Process]) ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6076 |
con selector == #start ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6077 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6078 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6079 |
|
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6080 |
[contextArray size > 0 |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6081 |
and:[contextArray last methodHome == con]] whileTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6082 |
contextArray removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6083 |
text removeLast. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6084 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6085 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6086 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6087 |
] |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6088 |
] ifFalse:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6089 |
m notNil ifTrue:[ |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6090 |
m enable:#showMore. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6091 |
]. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6092 |
canShowMore := true. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6093 |
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
|
6094 |
]. |
266 | 6095 |
]. |
6096 |
||
6097 |
contextView setList:text. |
|
944 | 6098 |
|
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6099 |
releaseInspectors ifTrue:[ |
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6100 |
receiverInspector release. |
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6101 |
contextInspector release. |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6102 |
]. |
266 | 6103 |
|
6104 |
m notNil ifTrue:[ |
|
11209
202af72b0a90
comment/format in: #addIgnoredHaltForCount:orTimeDuration:forAll:
Claus Gittinger <cg@exept.de>
parents:
10760
diff
changeset
|
6105 |
m disableAll:#(addBreakpoint removeBreakpoint browseImplementors browseSenders browseReceiversClass). |
266 | 6106 |
]. |
3511 | 6107 |
self updateMenuItems. |
266 | 6108 |
^ true |
300
027ffcadd12d
keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents:
299
diff
changeset
|
6109 |
|
7797 | 6110 |
"Created: / 14-12-1995 / 19:10:31 / cg" |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
6111 |
"Modified: / 06-03-2012 / 12:23:46 / cg" |
266 | 6112 |
! |
6113 |
||
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6114 |
setContextSkippingInterruptContexts:aContext |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6115 |
"show calling chain from aContext in the walk-back listview. |
1213 | 6116 |
Ignore any non-interesting interrupt-context." |
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6117 |
|
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6118 |
|con| |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6119 |
|
8152 | 6120 |
con := aContext. |
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6121 |
verboseBacktrace ifFalse:[ |
11210 | 6122 |
(con notNil and:[con selector == #threadSwitch:]) ifTrue:[ |
6123 |
con := con sender. |
|
6124 |
(con notNil and:[con selector == #timerInterrupt]) ifTrue:[ |
|
6125 |
con := con sender. |
|
6126 |
]. |
|
6127 |
]. |
|
779
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6128 |
]. |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6129 |
^ self setContext:con releaseInspectors:true |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6130 |
|
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6131 |
"Created: / 20.10.1996 / 18:10:21 / cg" |
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6132 |
"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
|
6133 |
! |
0486301b79a1
use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
6134 |
|
3447 | 6135 |
showingContext1:aContext calling:calledContext |
7823 | 6136 |
"return false, if this (top) context is to be skipped. |
10205 | 6137 |
Here, we hide some well known methods, which are usually not too interesting; |
7823 | 6138 |
the set of methods which are suppressed is my (claus's) own choice." |
6139 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6140 |
|recIsException sel rec senderRec mthd mthdClass calledSel calledRec| |
3447 | 6141 |
|
6142 |
verboseBacktrace == true ifTrue:[ ^true ]. |
|
6143 |
aContext isNil ifTrue:[ ^true ]. |
|
6144 |
||
6145 |
sel := aContext selector. |
|
6146 |
rec := aContext receiver. |
|
6147 |
mthd := aContext method. |
|
6148 |
mthd notNil ifTrue:[ mthdClass := mthd mclass ]. |
|
6149 |
||
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6150 |
"/ to avoid firing/waiting the lazy or future |
10205 | 6151 |
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
|
6152 |
aContext sender notNil ifTrue:[ |
11210 | 6153 |
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
|
6154 |
]. |
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6155 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6156 |
DebuggingDebugger == true ifTrue:[ |
11210 | 6157 |
'showingContext1: (' print. aContext print. |
6158 |
') calling: (' print. calledContext print. |
|
6159 |
')' printCR. |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6160 |
]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6161 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6162 |
(#(doCallHandler: doRaise |
3447 | 6163 |
) includes:sel) |
11210 | 6164 |
ifTrue:[ |
6165 |
recIsException ifTrue:[ ^ false]. |
|
6166 |
]. |
|
3447 | 6167 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6168 |
(#(raise raiseRequest |
3447 | 6169 |
) includes:sel) |
11210 | 6170 |
ifTrue:[ |
6171 |
recIsException ifTrue:[ |
|
6172 |
(senderRec isLazyValue not |
|
6173 |
and:[ senderRec isExceptionCreator]) ifTrue:[^ false]. |
|
6174 |
]. |
|
6175 |
]. |
|
3447 | 6176 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6177 |
(#(doWhile: |
3447 | 6178 |
) includes:sel) |
11210 | 6179 |
ifTrue:[ |
6180 |
rec isBlock ifTrue:[ |
|
6181 |
true "aContext sender isBlockContext" ifTrue:[^ false]. |
|
6182 |
]. |
|
6183 |
]. |
|
3447 | 6184 |
|
8620 | 6185 |
calledContext notNil ifTrue:[ |
11210 | 6186 |
calledSel := calledContext selector. |
6187 |
calledRec := calledContext receiver. |
|
6188 |
||
6189 |
calledRec isBlock ifTrue:[ |
|
6190 |
(calledSel == #ensure:) ifTrue:[^ false]. |
|
6191 |
(calledSel == #ifCurtailed:) ifTrue:[^ false]. |
|
6192 |
]. |
|
6193 |
(calledSel == #handle:do:) ifTrue:[^ false]. |
|
6194 |
(calledSel == #answer:do:) ifTrue:[^ false]. |
|
8620 | 6195 |
|
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6196 |
"/ calledRec isLazyValue ifFalse:[ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6197 |
"/ ((calledSel == #doWhile:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6198 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6199 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6200 |
"/ |
10205 | 6201 |
"/ ((#(ensure: ifCurtailed: valueNowOrOnUnwindDo: valueOnUnwindDo: |
5349
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6202 |
"/ ) includes:calledSel) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6203 |
"/ and:[calledRec isBlock]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6204 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6205 |
"/ |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6206 |
"/ ((calledSel == #handle:do:) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6207 |
"/ and:[calledRec isExceptionHandler]) |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6208 |
"/ ifTrue:[^ false]. |
64e779c7b08b
fixed stepping through ensure: blocks
Claus Gittinger <cg@exept.de>
parents:
5340
diff
changeset
|
6209 |
"/ ]. |
8620 | 6210 |
]. |
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6211 |
|
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6212 |
(#(handleDo:) includes:sel) |
11210 | 6213 |
ifTrue:[ |
6214 |
(calledRec isLazyValue not and:[calledRec isExceptionHandler]) ifTrue:[^ false]. |
|
6215 |
]. |
|
10205 | 6216 |
(#( |
11210 | 6217 |
withCursor:do: |
6218 |
withWaitCursorDo: |
|
3447 | 6219 |
) includes:sel) |
11210 | 6220 |
ifTrue:[ |
6221 |
(mthdClass == TopView) ifTrue:[^ false]. |
|
6222 |
(mthdClass == ApplicationModel) ifTrue:[^ false]. |
|
6223 |
(mthdClass == WindowGroup) ifTrue:[^ false]. |
|
6224 |
]. |
|
10205 | 6225 |
|
6226 |
(#( |
|
11210 | 6227 |
wait |
6228 |
waitWithTimeout: |
|
6229 |
waitWithTimeoutMs: |
|
3447 | 6230 |
) includes:sel) |
11210 | 6231 |
ifTrue:[ |
6232 |
(mthdClass == Semaphore) ifTrue:[^ false]. |
|
6233 |
(mthdClass == SemaphoreSet) ifTrue:[^ false]. |
|
6234 |
]. |
|
3447 | 6235 |
|
6236 |
^ true |
|
6237 |
||
9662 | 6238 |
"Created: / 17-11-2001 / 22:24:06 / cg" |
6239 |
"Modified: / 08-12-2010 / 18:21:02 / cg" |
|
3447 | 6240 |
! |
6241 |
||
6242 |
showingContext2:aContext nesting:nesting |
|
7823 | 6243 |
"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
|
6244 |
Here, we hide some well known methods, which are usually |
10205 | 6245 |
not too interesting; |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6246 |
the set of methods which are suppressed is my (claus's) own choice." |
939 | 6247 |
|
10205 | 6248 |
|sel rec mClass |
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6249 |
sender senderReceiver senderSelector senderReceiverClass| |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6250 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6251 |
verboseBacktrace ifTrue:[^ true]. |
3447 | 6252 |
aContext isNil ifTrue:[^ true]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6253 |
|
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6254 |
rec := aContext receiver. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6255 |
sel := aContext selector. |
939 | 6256 |
mClass := aContext methodClass. |
6257 |
||
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6258 |
sender := aContext sender. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6259 |
sender notNil ifTrue:[ |
11210 | 6260 |
senderSelector := sender selector. |
6261 |
senderReceiver := sender receiver. |
|
6262 |
senderReceiverClass := senderReceiver class. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6263 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6264 |
|
939 | 6265 |
sel == #withCursor:do: ifTrue:[ |
11210 | 6266 |
(mClass == WindowGroup) ifTrue:[^ false]. |
6267 |
(mClass == TopView) ifTrue:[^ false]. |
|
939 | 6268 |
]. |
6269 |
(sel == #withExecuteCursorDo: |
|
6270 |
or:[sel == #withWaitCursorDo:]) ifTrue:[ |
|
11210 | 6271 |
(mClass == DisplaySurface) ifTrue:[^ false]. |
939 | 6272 |
]. |
6273 |
||
1484
1e1e56b84b11
in compact-stack-mode, also hide from:to:do: contexts.
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
6274 |
(sel == #do: |
6600 | 6275 |
or:[sel == #from:to:do: |
6601 | 6276 |
or:[sel == #keysAndValuesDo: |
6277 |
or:[sel == #doWithIndex:]]]) ifTrue:[ |
|
11210 | 6278 |
mClass == Array ifTrue:[^ false]. |
6279 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
6280 |
mClass == Set ifTrue:[^ false]. |
|
6281 |
mClass == Dictionary ifTrue:[^ false]. |
|
6282 |
mClass == Interval ifTrue:[^ false]. |
|
10205 | 6283 |
]. |
6284 |
(sel == #perform: |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6285 |
or:[sel == #perform:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6286 |
or:[sel == #perform:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6287 |
or:[sel == #perform:with:with:with: |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6288 |
or:[sel == #perform:with:with:with:with:]]]]) |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6289 |
ifTrue:[ |
11210 | 6290 |
nesting == 0 ifTrue:[^ true]. |
6291 |
mClass == Array ifTrue:[^ false]. |
|
6292 |
mClass == OrderedCollection ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6293 |
]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6294 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6295 |
sel == #valueWithReceiver:arguments:selector:search:sender: ifTrue:[^ false]. |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6296 |
|
939 | 6297 |
(mClass == Object) ifTrue:[ |
11210 | 6298 |
(sel startsWith:'perform:') ifTrue:[^ false] |
939 | 6299 |
]. |
6300 |
||
6301 |
(mClass == Method) ifTrue:[ |
|
11210 | 6302 |
(sel startsWith:'valueWithReceiver:') ifTrue:[^ false] |
939 | 6303 |
]. |
6304 |
||
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6305 |
(mClass == SmallInteger) ifTrue:[ |
11210 | 6306 |
(sel == #to:do:) ifTrue:[^ false]. |
6307 |
(sel == #to:by:do:) ifTrue:[^ false]. |
|
952
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6308 |
]. |
9f203aab32a4
skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents:
950
diff
changeset
|
6309 |
|
939 | 6310 |
(mClass == Block) ifTrue:[ |
11210 | 6311 |
sel == #ensure: ifTrue:[^ false]. |
6312 |
sel == #ifCurtailed: ifTrue:[^ false]. |
|
6313 |
sel == #valueNowOrOnUnwindDo: ifTrue:[^ false]. |
|
6314 |
sel == #valueOnUnwindDo: ifTrue:[^ false]. |
|
6315 |
sel == #on:do: ifTrue:[^ false]. |
|
6316 |
||
6317 |
sel == #value ifTrue:[^ false]. |
|
6318 |
sel == #value: ifTrue:[^ false]. |
|
6319 |
sel == #value:value: ifTrue:[^ false]. |
|
6320 |
sel == #value:value:value: ifTrue:[^ false]. |
|
6321 |
sel == #value:value:value:value: ifTrue:[^ false]. |
|
6322 |
sel == #value:value:value:value:Value: ifTrue:[^ false]. |
|
6323 |
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
|
6324 |
]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6325 |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6326 |
aContext isBlockContext ifTrue:[ |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6327 |
"/ sel == #value ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6328 |
"/ sel == #value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6329 |
"/ sel == #value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6330 |
"/ sel == #value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6331 |
"/ sel == #value:value:value:value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6332 |
"/ sel == #value:value:value:value:Value: ifTrue:[^ false]. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6333 |
"/ 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
|
6334 |
|
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6335 |
"/ (senderSelector == #answer:do:) ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6336 |
"/ senderReceiverClass == QuerySignal ifTrue:[ |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6337 |
"/ ^ false |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6338 |
"/ ] |
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6339 |
"/ ] |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6340 |
|
11210 | 6341 |
aContext home notNil ifTrue:[ |
6342 |
aContext home receiver isLazyValue ifFalse:[ |
|
6343 |
(aContext home receiver isMemberOf:Semaphore) ifTrue:[ |
|
6344 |
(aContext home selector == #wait) ifTrue:[^ false]. |
|
6345 |
(aContext home selector == #waitWithTimeoutMs:) ifTrue:[^ false]. |
|
6346 |
] |
|
6347 |
] |
|
6348 |
] |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6349 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6350 |
|
3723
250da8f1a968
Treat new #ensure, #ifCurtailed, #on:do:
Stefan Vogel <sv@exept.de>
parents:
3702
diff
changeset
|
6351 |
(rec isExceptionHandler) ifTrue:[ |
11210 | 6352 |
sel == #handle:do: ifTrue:[^ false]. |
6353 |
sel == #handleDo: ifTrue:[^ false]. |
|
6354 |
(sel startsWith:#raise) ifTrue:[^ false]. |
|
6355 |
sel == #answer:do: ifTrue:[^ false]. |
|
1388
d127d4379a60
more contexts suppressed in dense-backtrace
Claus Gittinger <cg@exept.de>
parents:
1386
diff
changeset
|
6356 |
]. |
5269
a8be1af4cd35
avoid triggering lazy and future values when showing the context.
Claus Gittinger <cg@exept.de>
parents:
5195
diff
changeset
|
6357 |
(rec isLazyValue not and:[ rec isException] ) ifTrue:[ |
11210 | 6358 |
sel == #doRaise ifTrue:[^ false]. |
6359 |
sel == #doCallHandler: ifTrue:[^ false]. |
|
6360 |
(sel == #raise or:[sel == #raiseRequest]) ifTrue:[ |
|
6361 |
senderReceiverClass == Signal ifTrue:[^ false]. |
|
6362 |
] |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6363 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6364 |
(mClass == Context) ifTrue:[ |
11210 | 6365 |
sel == #unwind ifTrue:[^ false]. |
6366 |
sel == #unwind: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6367 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6368 |
(mClass == ProcessorScheduler) ifTrue:[ |
11210 | 6369 |
sel == #interruptActive ifTrue:[^ false]. |
6370 |
sel == #threadSwitch: ifTrue:[^ false]. |
|
6371 |
sel == #suspend: ifTrue:[^ false]. |
|
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6372 |
]. |
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6373 |
mClass == Process ifTrue:[ |
11210 | 6374 |
sel == #suspendWithState: ifTrue:[^ false]. |
1394
7765db9114ff
more context hiding in dense-walkback mode
Claus Gittinger <cg@exept.de>
parents:
1388
diff
changeset
|
6375 |
]. |
936
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6376 |
^ true. |
34f8d67c4932
allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents:
935
diff
changeset
|
6377 |
|
9662 | 6378 |
"Created: / 17-11-2001 / 19:34:20 / cg" |
6379 |
"Modified: / 08-12-2010 / 18:21:45 / cg" |
|
1240
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
6380 |
! ! |
ff3fdaa72df6
In #destroy CodeView>>contents: has been called and caused a
Stefan Vogel <sv@exept.de>
parents:
1213
diff
changeset
|
6381 |
|
4859 | 6382 |
!DebugView methodsFor:'private-control loop'! |
266 | 6383 |
|
6384 |
controlLoop |
|
6385 |
"this is a kludge: |
|
11210 | 6386 |
start a dispatchloop which exits when |
6387 |
either continue, return or step is pressed |
|
266 | 6388 |
" |
6389 |
||
6390 |
haveControl := true. |
|
664 | 6391 |
[ |
11210 | 6392 |
[haveControl] whileTrue:[ |
6393 |
self controlLoopCatchingErrors |
|
6394 |
]. |
|
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3593
diff
changeset
|
6395 |
] ensure:[ |
11210 | 6396 |
catchBlock := nil. |
6397 |
haveControl := false |
|
266 | 6398 |
]. |
664 | 6399 |
|
6400 |
"Modified: 9.7.1996 / 18:29:09 / cg" |
|
266 | 6401 |
! |
6402 |
||
6403 |
controlLoopCatchingErrors |
|
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6404 |
"this is the debuggers own private event handling loop; |
1187 | 6405 |
errors are caught, to prevent recursive debugger-invocations." |
328
bdfe5bbd376d
ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents:
317
diff
changeset
|
6406 |
|
266 | 6407 |
"setup a self removing catch-block" |
6408 |
catchBlock := [catchBlock := nil. ^ nil]. |
|
6409 |
||
6410 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
|
11210 | 6411 |
"if we do not have multiple processes or its a system process |
6412 |
we start another dispatch loop, which exits when |
|
6413 |
either continue, return or step is pressed |
|
6414 |
or (via the catchBlock) if an error occurs. |
|
6415 |
Since our display is an extra exclusive one, |
|
6416 |
all processing for normal views stops here ... |
|
6417 |
" |
|
6418 |
||
6419 |
WindowGroup setActiveGroup:windowGroup. |
|
6420 |
SignalSet anySignal handle:[:ex | |
|
6421 |
|signal| |
|
6422 |
||
6423 |
signal := ex signal. |
|
6424 |
||
6425 |
self showError:'*** Error in modal debugger: |
|
266 | 6426 |
|
334 | 6427 |
>>>> Signal: ' , signal printString , ' |
266 | 6428 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 6429 |
>>>> From: ' , ex suspendedContext sender printString , ' |
6430 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
6431 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
6432 |
>>>> : ' , 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
|
6433 |
>>>> : ' , 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
|
6434 |
>>>> : ' , 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
|
6435 |
>>>> : ' , 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
|
6436 |
>>>> : ' , 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
|
6437 |
>>>> : ' , 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
|
6438 |
>>>> : ' , 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
|
6439 |
>>>> : ' , 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
|
6440 |
>>>> : ' , 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
|
6441 |
>>>> : ' , 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
|
6442 |
>>>> : ' , ex suspendedContext sender sender sender sender sender sender sender sender sender sender sender sender sender sender printString , ' |
4816 | 6443 |
>>>> Message: ' , ex description , ' |
266 | 6444 |
|
1187 | 6445 |
caught & ignored.'. |
11210 | 6446 |
ex return. |
6447 |
] do:[ |
|
6448 |
UserNotification handle:[:ex | |
|
6449 |
(ex signal == ActivityNotificationSignal) ifTrue:[ |
|
6450 |
ex proceed |
|
6451 |
]. |
|
6452 |
self showError:ex description. |
|
6453 |
ex proceed. |
|
6454 |
] do:[ |
|
6455 |
device dispatchModalWhile:[Processor activeProcess state:#debug. |
|
6456 |
haveControl]. |
|
6457 |
] |
|
6458 |
]. |
|
6459 |
WindowGroup setActiveGroup:nil. |
|
266 | 6460 |
] ifFalse:[ |
11210 | 6461 |
"we do have multiple processes - |
6462 |
simply enter the DebugViews-Windowgroup event loop. |
|
6463 |
effectively suspending event processing for the currently |
|
6464 |
active group. |
|
6465 |
" |
|
6466 |
SignalSet anySignal handle:[:ex | |
|
6467 |
|answer signal eMsg| |
|
6468 |
||
6469 |
signal := ex signal. |
|
6470 |
||
6471 |
DebuggingDebugger ~~ true ifTrue:[ |
|
6472 |
(signal == ActivityNotification) ifTrue:[ |
|
6473 |
ex proceed |
|
6474 |
]. |
|
6475 |
"/ |
|
6476 |
"/ ignore exceptions which say they explicitly have to be ignored |
|
6477 |
"/ |
|
6478 |
ex catchInDebugger ifTrue:[ |
|
6479 |
'DebugView [info]: ',signal printString,'-signal in debugger cought for close' infoPrintCR. |
|
6480 |
self destroy. |
|
6481 |
ex reject |
|
6482 |
]. |
|
6483 |
||
6484 |
"/ |
|
6485 |
"/ ignore recursive breakpoints |
|
6486 |
"/ |
|
6487 |
(signal isControlInterrupt) ifTrue:[ |
|
6488 |
ignoreBreakpoints == true ifTrue:[ |
|
6489 |
'DebugView [info]: halt/break in debugger ignored 1' infoPrintCR. |
|
6490 |
('DebugView [info]: ',ex suspendedContext printString) infoPrintCR. |
|
6491 |
ex proceed |
|
6492 |
]. |
|
6493 |
]. |
|
6494 |
(signal == TerminateProcessRequest) ifTrue:[ |
|
6495 |
"/ mhm - someone wants to shoot me down while debugging ... |
|
6496 |
answer := Dialog |
|
6497 |
choose:('Process termination signal arrived while debugging\\close debugger ?') withCRs |
|
6498 |
labels:#( 'Ignore' 'Close & terminate' ) |
|
6499 |
values:#( #proceed #close ) |
|
6500 |
default:#close. |
|
6501 |
answer == #close ifTrue:[ |
|
6502 |
self destroy. |
|
6503 |
ex reject |
|
6504 |
]. |
|
6505 |
ex return. |
|
6506 |
]. |
|
6507 |
signal == RecursiveExceptionError ifTrue:[ |
|
6508 |
(ex parameter signal == BreakPointInterrupt) |
|
6509 |
ifTrue:[ |
|
6510 |
'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR. |
|
6511 |
ex proceed. |
|
6512 |
]. |
|
6513 |
||
6514 |
self showError:'*** Recursive error in debugger: |
|
266 | 6515 |
|
6516 |
>>>> Signal: ' , ex signal printString , ' |
|
448 | 6517 |
>>>> ' , ex parameter signal printString , ' |
266 | 6518 |
>>>> In: ' , ex suspendedContext printString , ' |
1016 | 6519 |
>>>> From: ' , ex suspendedContext sender printString , ' |
6520 |
>>>> : ' , ex suspendedContext sender sender printString , ' |
|
6521 |
>>>> : ' , ex suspendedContext sender sender sender printString , ' |
|
6522 |
>>>> : ' , ex suspendedContext sender sender sender sender printString , ' |
|
4816 | 6523 |
>>>> Message: ' , ex description , ' |
266 | 6524 |
|
1187 | 6525 |
caught & ignored.'. |
11210 | 6526 |
ex return |
6527 |
]. |
|
6528 |
]. |
|
6529 |
||
6530 |
self topView raiseDeiconified. |
|
6531 |
||
6532 |
eMsg := ex description. |
|
6533 |
(ex signal isControlInterrupt) ifTrue:[ |
|
6534 |
eMsg := eMsg , Character cr asString , 'in ' , ex suspendedContext printString |
|
6535 |
]. |
|
6536 |
Dialog aboutToOpenBoxNotificationSignal |
|
6537 |
handle:[:ex | ex proceed ] |
|
6538 |
do:[ |
|
6539 |
answer := Dialog |
|
6540 |
choose:('Error in debugger:\' withCRs , eMsg , '\\debug again ?' withCRs) |
|
6541 |
labels:#( 'Proceed' 'Cancel' 'Debug' ) |
|
6542 |
values:#( #proceed #cancel #debug ) |
|
6543 |
default:#cancel. |
|
6544 |
]. |
|
6545 |
answer == #debug ifTrue:[ |
|
6546 |
'DebugView [info]: cought exception - debugging' infoPrintCR. |
|
6547 |
Debugger |
|
6548 |
enterUnconditional:(ex suspendedContext) |
|
6549 |
withMessage:'Error in debugger: ' , eMsg |
|
6550 |
mayProceed:true. |
|
6551 |
ex proceed. |
|
6552 |
]. |
|
6553 |
answer == #proceed ifTrue:[ |
|
6554 |
'DebugView [info]: ignored exception - proceeding' infoPrintCR. |
|
6555 |
ex proceed. |
|
6556 |
]. |
|
6557 |
'DebugView [info]: cought exception - returning' infoPrintCR. |
|
6558 |
ex return. |
|
6559 |
] do:[ |
|
6560 |
"/ make certain that sub-debuggers, inspectors etc. |
|
6561 |
"/ come up on my device. |
|
6562 |
Screen currentScreenQuerySignal answer:device |
|
6563 |
do:[ |
|
6564 |
windowGroup |
|
6565 |
eventLoopWhile:[Processor activeProcess state:#debug. |
|
6566 |
true] |
|
6567 |
onLeave:[] |
|
6568 |
] |
|
6569 |
]. |
|
266 | 6570 |
]. |
6571 |
catchBlock := nil. |
|
6572 |
||
1409
2ea39caf7f00
handle process termination gracefully
Claus Gittinger <cg@exept.de>
parents:
1408
diff
changeset
|
6573 |
"Created: / 24.11.1995 / 20:33:45 / cg" |
3447 | 6574 |
"Modified: / 18.11.2001 / 01:04:17 / cg" |
266 | 6575 |
! ! |
6576 |
||
0 | 6577 |
!DebugView methodsFor:'user interaction'! |
6578 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6579 |
checkIfCodeIsReallyModified |
6616 | 6580 |
|source| |
6581 |
||
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6582 |
codeView modified ifFalse:[^ false]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6583 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6584 |
currentMethod isNil ifTrue:[ |
11210 | 6585 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6586 |
]. |
6616 | 6587 |
source := currentMethod source. |
6588 |
source notNil ifTrue:[ |
|
11210 | 6589 |
source string = codeView contents string ifTrue:[ |
6590 |
^ false |
|
6591 |
]. |
|
6592 |
(source string withTabsExpanded:8) = (codeView contents string withTabsExpanded:8) ifTrue:[ |
|
6593 |
^ false |
|
6594 |
]. |
|
6616 | 6595 |
]. |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6596 |
^ true |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6597 |
! |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6598 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6599 |
checkSelectionChangeAllowed |
2678
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6600 |
^ self checkSelectionChangeAllowed:nil |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6601 |
! |
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6602 |
|
90eb8be47ac4
avoid annoying modified-code dialog when reselecting the same
Claus Gittinger <cg@exept.de>
parents:
2633
diff
changeset
|
6603 |
checkSelectionChangeAllowed:newSelection |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6604 |
self checkIfCodeIsReallyModified ifFalse:[^ true]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6605 |
|
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6606 |
(newSelection notNil |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6607 |
and:[newSelection = contextView selection]) ifTrue:[ |
11210 | 6608 |
^ true |
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6609 |
]. |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6610 |
|
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6611 |
(self confirm:('Code modified - change selection anyway ?')) ifFalse:[ |
11210 | 6612 |
^ false |
3097
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6613 |
]. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6614 |
codeView modified:false. |
dada585e916d
really modfified test (in step, ...)
Claus Gittinger <cg@exept.de>
parents:
3094
diff
changeset
|
6615 |
|
1765
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6616 |
^ true |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6617 |
! |
a704122c92dc
confirm close/selection change if codeView was modified without
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
6618 |
|
266 | 6619 |
codeAccept:someCode |
6620 |
"user wants some code to be recompiled - must unwind stack since everything above |
|
6621 |
and including selected method cannot be continued." |
|
6622 |
||
7553
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
6623 |
^ 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
|
6624 |
|
83cbd8707d1e
do not unwind after an accept.
Claus Gittinger <cg@exept.de>
parents:
7481
diff
changeset
|
6625 |
"Modified: / 28-11-2006 / 19:49:04 / cg" |
266 | 6626 |
! |
6627 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6628 |
codeAccept:someCode inClass:aClass unwind:doUnwind category:category onCancel:cancelAction |
3427 | 6629 |
"user wants some code to be recompiled - must unwind stack since everything above |
6630 |
and including selected method cannot be continued." |
|
6631 |
||
6632 |
" |
|
6633 |
actually, this is not true, since the active methods will still be |
|
6634 |
executed correctly - however, the code shown in the debugger is no |
|
6635 |
longer in sync (showing the new code) with the executed code. |
|
6636 |
Therefore, we hide those contexts to avoid confusion .... |
|
6637 |
If you dont like this behavior, remove the 'inspecting ifFalse:' check below" |
|
6638 |
||
6639 |
"walk up context chain and find highest context which is either the selected context, |
|
6640 |
or - if its a block-context - whose home is the selected context" |
|
6641 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6642 |
|con top newMethod| |
3427 | 6643 |
|
6644 |
codeView withWaitCursorDo:[ |
|
11210 | 6645 |
" |
6646 |
find the method-home context for this one |
|
6647 |
" |
|
6648 |
doUnwind ifTrue:[ |
|
6649 |
con := selectedContext. |
|
6650 |
top := con. |
|
6651 |
[con notNil] whileTrue:[ |
|
6652 |
(con methodHome == selectedContext) ifTrue:[ |
|
6653 |
top := con |
|
6654 |
]. |
|
6655 |
con := con sender |
|
6656 |
]. |
|
6657 |
]. |
|
6658 |
||
6659 |
"/ |
|
6660 |
"/ provide the classes nameSpace on a query; |
|
6661 |
"/ in case we accept while in another nameSpace context, |
|
6662 |
"/ (but for a class which is somewhere else) |
|
6663 |
"/ |
|
6664 |
(Class updateChangeFileQuerySignal, |
|
6665 |
Class updateChangeListQuerySignal, |
|
6666 |
Class updateHistoryLineQuerySignal) answer:true |
|
6667 |
do:[ |
|
6668 |
Class nameSpaceQuerySignal |
|
6669 |
answer:(aClass nameSpace) |
|
6670 |
do:[ |
|
6671 |
Class packageQuerySignal |
|
6672 |
answer:(aClass package ? PackageId noProjectID) |
|
6673 |
do:[ |
|
6674 |
codeView contents:someCode. |
|
6675 |
newMethod := aClass compilerClass |
|
6676 |
compile:someCode |
|
6677 |
forClass:aClass |
|
6678 |
inCategory:category |
|
6679 |
notifying:codeView. |
|
6680 |
]. |
|
6681 |
]. |
|
6682 |
]. |
|
6683 |
||
6684 |
inspecting ifFalse:[ |
|
6685 |
" |
|
6686 |
if it worked, remove everything up to and including top |
|
6687 |
from context chain |
|
6688 |
" |
|
6689 |
(newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[ |
|
6690 |
codeView modified:false. |
|
6691 |
||
6692 |
doUnwind ifTrue:[ |
|
6693 |
selectedContext canReturn ifTrue:[ |
|
6694 |
self setContext:(top "sender"). |
|
6695 |
exitAction := #restart. |
|
6696 |
selectedContext setLineNumber:1. |
|
6697 |
self doRestart. |
|
6698 |
] ifFalse:[ |
|
6699 |
self setContext:(top sender). |
|
6700 |
exitAction := #return. |
|
6701 |
]. |
|
6702 |
||
6703 |
" |
|
6704 |
continue/step is no longer possible |
|
6705 |
" |
|
6706 |
"/ continueButton disable. |
|
6707 |
"/ canContinue := false. |
|
6708 |
]. |
|
6709 |
||
6710 |
contextView selection:1. |
|
6711 |
"/ self showSelection:1. |
|
6712 |
"/ contextView makeSelectionVisible. "/ scrollToLine:(selection - 1) |
|
6713 |
] ifFalse:[ |
|
6714 |
^ cancelAction value |
|
6715 |
] |
|
6716 |
]. |
|
3427 | 6717 |
]. |
6718 |
||
7065
a6e34a47f7fb
accept in the debugger always assignes the classes'
Claus Gittinger <cg@exept.de>
parents:
7000
diff
changeset
|
6719 |
"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
|
6720 |
"Modified: / 29-08-2006 / 14:22:22 / cg" |
3427 | 6721 |
! |
6722 |
||
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6723 |
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
|
6724 |
"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
|
6725 |
and including selected method cannot be continued." |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6726 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6727 |
" |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6728 |
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
|
6729 |
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
|
6730 |
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
|
6731 |
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
|
6732 |
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
|
6733 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6734 |
"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
|
6735 |
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
|
6736 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6737 |
|sel implementorClass method category| |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6738 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6739 |
codeView withWaitCursorDo:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6740 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6741 |
"/ 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
|
6742 |
"/ " |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6743 |
"/ con := selectedContext. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6744 |
"/ top := con. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6745 |
"/ [con notNil] whileTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6746 |
"/ (con methodHome == selectedContext) ifTrue:[ |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6747 |
"/ top := con |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6748 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6749 |
"/ con := con sender |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6750 |
"/ ]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6751 |
|
10628 | 6752 |
" |
6753 |
use class&selector to find the method for the compilation |
|
6754 |
and compile. |
|
6755 |
" |
|
6756 |
category := givenCategoryOrNil. |
|
6757 |
sel := selectedContext selector. |
|
6758 |
implementorClass := selectedContext methodClass. |
|
6759 |
implementorClass notNil ifTrue:[ |
|
6760 |
category isNil ifTrue:[ |
|
6761 |
method := selectedContext method. |
|
6762 |
method isNil ifTrue:[ |
|
6763 |
method := implementorClass compiledMethodAt:sel. |
|
6764 |
]. |
|
6765 |
category := method category |
|
6766 |
] |
|
6767 |
] ifFalse:[ |
|
6768 |
implementorClass := selectedContext receiver class. |
|
6769 |
implementorClass ~~ Object ifTrue:[ |
|
6770 |
implementorClass := Dialog |
|
6771 |
request:('Define ''%1'' in class:' bindWith:sel allBold) |
|
6772 |
initialAnswer:implementorClass name |
|
6773 |
list:(implementorClass withAllSuperclasses collect:[:each| each name]). |
|
6774 |
implementorClass size == 0 ifTrue:[ |
|
6775 |
^ cancelAction value "/ cancelled |
|
6776 |
]. |
|
6777 |
implementorClass := Smalltalk classNamed:implementorClass. |
|
6778 |
implementorClass isNil ifTrue:[ |
|
6779 |
Dialog warn:'No such class'. |
|
6780 |
^ cancelAction value "/ cancelled |
|
6781 |
]. |
|
6782 |
]. |
|
6783 |
]. |
|
6784 |
||
6785 |
self |
|
6786 |
codeAccept:someCode |
|
6787 |
inClass:implementorClass |
|
6788 |
unwind:doUnwind |
|
6789 |
category:category |
|
6790 |
onCancel:cancelAction. |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6791 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6792 |
|
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6793 |
"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
|
6794 |
"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
|
6795 |
! |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
6796 |
|
7912 | 6797 |
codeCompletion |
6798 |
|cls| |
|
6799 |
||
8212 | 6800 |
currentMethod isNil ifTrue:[ ^ self ]. |
8338 | 6801 |
|
7912 | 6802 |
cls := currentMethod mclass. |
8212 | 6803 |
cls isNil ifTrue:[ ^ self ]. |
6804 |
||
7912 | 6805 |
UserInformation handle:[:ex | |
11210 | 6806 |
ex proceed. |
7912 | 6807 |
] do:[ |
11210 | 6808 |
DoWhatIMeanSupport codeCompletionForClass:cls context:selectedContext codeView:codeView. |
7912 | 6809 |
]. |
6810 |
! |
|
6811 |
||
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
6812 |
confirm:aString |
6971 | 6813 |
"open a modal yes-no dialog. |
6814 |
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
|
6815 |
|
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
6816 |
(exclusive or:[windowGroup isNil]) ifTrue:[ |
11210 | 6817 |
^ true |
3570
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
6818 |
]. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
6819 |
^ super confirm:aString. |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
6820 |
! |
da6d661593d8
Exclusive debugger (on top of scheduler process) is working again.
Stefan Vogel <sv@exept.de>
parents:
3542
diff
changeset
|
6821 |
|
1284
091454814297
try to catch more errors when showing sourceCode
Claus Gittinger <cg@exept.de>
parents:
1281
diff
changeset
|
6822 |
doShowSelection:lineNr |
301
cd15cb77e4b6
show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
6823 |
"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
|
6824 |
Also sent to autoselect an interesting context on entry." |
0 | 6825 |
|
9235 | 6826 |
HaltInterrupt handle:[:ex | |
11210 | 6827 |
ignoreBreakpoints ifFalse:[ex reject]. |
6828 |
('DebugView [info]: halt/breakpoint in debugger at %1 ignored [doShowSelection.]' bindWith:ex suspendedContext) infoPrintCR. |
|
6829 |
ex proceed |
|
3447 | 6830 |
] do:[ |
11210 | 6831 |
self updateForContext:lineNr |
3269 | 6832 |
]. |
6833 |
self updateMenuItems |
|
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSĂgnal
Claus Gittinger <cg@exept.de>
parents:
3431
diff
changeset
|
6834 |
|
3447 | 6835 |
"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
|
6836 |
! |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
6837 |
|
10205 | 6838 |
hideStackInspector |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6839 |
stackInspector notNil ifTrue:[ |
11210 | 6840 |
stackInspector destroy. |
6841 |
stackInspector := nil. |
|
6842 |
receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0. |
|
6843 |
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
|
6844 |
] |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6845 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6846 |
|
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6847 |
methodCodeToggleChanged |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6848 |
|sel| |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6849 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6850 |
sel := contextView selection. |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6851 |
sel notNil ifTrue:[ |
11210 | 6852 |
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
|
6853 |
] |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6854 |
|
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6855 |
"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
|
6856 |
! |
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
6857 |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6858 |
processEvent:anEvent |
6129 | 6859 |
"filter keyboard events for popUp variable value display. |
6860 |
Return true, if I have eaten the event" |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6861 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6862 |
|evView focusView key rawKey inCodeView| |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6863 |
|
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6864 |
evView := anEvent view. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6865 |
evView notNil ifTrue:[ |
11210 | 6866 |
focusView := evView windowGroup focusView. |
6867 |
focusView isNil ifTrue:[ |
|
6868 |
focusView := evView. |
|
6869 |
]. |
|
6870 |
||
6871 |
anEvent isKeyPressEvent ifTrue:[ |
|
6872 |
key := anEvent key. |
|
6873 |
rawKey := anEvent rawKey. |
|
6874 |
||
6875 |
inCodeView := (focusView == codeView |
|
6876 |
or:[focusView isComponentOf:codeView]). |
|
6877 |
inCodeView ifTrue:[ |
|
6878 |
key == #CodeCompletion ifTrue:[ |
|
6879 |
"/ complete the word before/under the cursor. |
|
6880 |
self sensor |
|
6881 |
pushUserEvent:#codeCompletion |
|
6882 |
for:self |
|
6883 |
withArguments:#(). |
|
6884 |
^ true |
|
6885 |
]. |
|
6886 |
]. |
|
6887 |
]. |
|
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6888 |
|
3602 | 6889 |
false ifTrue:[ |
11210 | 6890 |
anEvent isButtonReleaseEvent ifTrue:[ |
6891 |
anEvent view == codeView ifTrue:[ |
|
6892 |
(RBParser notNil and:[RBParser isLoaded]) |
|
6893 |
ifTrue:[ |
|
6894 |
self sensor |
|
6895 |
pushEvent:anEvent. "/ must be first in queue |
|
6896 |
||
6897 |
self sensor |
|
6898 |
pushUserEvent:#explainSelection |
|
6899 |
for:self |
|
6900 |
withArguments:nil. |
|
6901 |
^ true "/ eaten |
|
6902 |
] |
|
6903 |
] |
|
6904 |
]. |
|
3602 | 6905 |
]. |
6906 |
||
3517
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6907 |
]. |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6908 |
^ false |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6909 |
! |
df36801b26b7
preps for flyBy-value-display
Claus Gittinger <cg@exept.de>
parents:
3511
diff
changeset
|
6910 |
|
8212 | 6911 |
setCurrentMethod:aMethodOrNil |
6912 |
currentMethod := aMethodOrNil. |
|
6913 |
! |
|
6914 |
||
1327 | 6915 |
showSelection:lineNr |
6916 |
"user clicked on a header line - show selected code in textView. |
|
6917 |
Also sent to autoselect an interesting context on entry." |
|
6918 |
||
10205 | 6919 |
Notification |
11210 | 6920 |
handle: |
6921 |
[:ex | |
|
6922 |
"/ ex suspendedContext fullPrintAll. |
|
6923 |
Transcript showCR:ex description. |
|
6924 |
"/ Transcript showCR:ex parameter. |
|
6925 |
ex proceed |
|
6926 |
] |
|
6927 |
do: |
|
6928 |
[ |
|
6929 |
Error |
|
6930 |
handle: |
|
6931 |
[:ex | |
|
6932 |
|s con| |
|
6933 |
||
6934 |
ex signal isControlInterrupt |
|
6935 |
ifTrue:[ |
|
6936 |
'DebugView [info]: halt/break ignored - while showing selection in debugger' infoPrintCR. |
|
6937 |
ex proceed |
|
6938 |
]. |
|
6939 |
||
6940 |
('DebugView [info]: error at %1 when showing selection in debugger ignored' bindWith:ex suspendedContext) infoPrintCR. |
|
6941 |
||
6942 |
s := '' writeStream. |
|
6943 |
s nextPutLine:'**** error in debugger, while extracting source'. |
|
6944 |
s nextPutLine:'****'. |
|
6945 |
s nextPutAll: '**** '; nextPutLine:(ex description "withCRs"). |
|
6946 |
s nextPutLine:'****'. |
|
6947 |
con := ex suspendedContext. |
|
6948 |
s nextPutAll: '**** '; nextPutLine:(con printString). |
|
6949 |
con := con sender. |
|
6950 |
HaltInterrupt ignoreIn:[ |
|
6951 |
con fullPrintAllOn:s. |
|
6952 |
]. |
|
5842 | 6953 |
"/ [con notNil] whileTrue:[ |
6954 |
"/ Error catch:[:ex | |
|
6955 |
"/ s nextPutAll: '**** '; nextPutLine:(con printString). |
|
6956 |
"/ ]. |
|
4947 | 6957 |
"/ |
5842 | 6958 |
"/ (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[ |
6959 |
"/ con := nil |
|
6960 |
"/ ] ifFalse:[ |
|
6961 |
"/ con := con sender. |
|
6962 |
"/ ] |
|
6963 |
"/ ]. |
|
11210 | 6964 |
codeView contents:(s contents). |
6965 |
ex return. |
|
6966 |
] |
|
6967 |
do: |
|
6968 |
[ |
|
6969 |
self doShowSelection:lineNr |
|
6970 |
] |
|
6971 |
] |
|
1327 | 6972 |
|
6815 | 6973 |
"Modified: / 04-07-2006 / 14:50:06 / cg" |
1327 | 6974 |
! |
6975 |
||
10205 | 6976 |
showStackInspectorFor:con |
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6977 |
stackInspector isNil ifTrue:[ |
11210 | 6978 |
receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0. |
6979 |
contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0). |
|
6980 |
stackInspector := InspectorView |
|
6981 |
origin:(0.6 @ 0.0) |
|
6982 |
corner:(1.0 @ 1.0) |
|
6983 |
in:contextInspector superView. |
|
6984 |
stackInspector realize. |
|
6985 |
stackInspector fieldListLabel:'Stack'. |
|
6986 |
stackInspector hideReceiver:true |
|
4932
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6987 |
]. |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6988 |
stackInspector inspect:(con stackFrame asArray). |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6989 |
stackInspector showLast |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6990 |
! |
0758cd0b8ce9
show source of blocks if possible
Claus Gittinger <cg@exept.de>
parents:
4892
diff
changeset
|
6991 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
6992 |
updateForContext:lineNr |
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
6993 |
"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
|
6994 |
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
|
6995 |
|
56 | 6996 |
|con homeContext sel method code canAccept |
105 | 6997 |
implementorClass lineNrInMethod rec m line |
10205 | 6998 |
sender selSender tryVars possibleBlocks errMsg |
3269 | 6999 |
codeSet highlighter evaluatorClass |
9500
76bc64543166
care for original vs. current methods code (if it was changed)
Claus Gittinger <cg@exept.de>
parents:
9488
diff
changeset
|
7000 |
canDefine callee searchClass originalMethod| |
3187 | 7001 |
|
7002 |
canDefine := false. |
|
8212 | 7003 |
self setCurrentMethod:nil. |
1804
dcb4f893ce7d
remember current method - only ask for modification
Claus Gittinger <cg@exept.de>
parents:
1776
diff
changeset
|
7004 |
|
1309
f13dd58a3943
dont break if MessageTracer is not present
Claus Gittinger <cg@exept.de>
parents:
1302
diff
changeset
|
7005 |
contextArray notNil ifTrue:[ |
10628 | 7006 |
lineNr <= contextArray size ifTrue:[ |
7007 |
con := contextArray at:lineNr. |
|
7008 |
callee := contextArray at:lineNr-1 ifAbsent:nil. |
|
7009 |
]. |
|
7010 |
" |
|
7011 |
clicking on the '** ...'-line shows more ... |
|
7012 |
" |
|
7013 |
con isNil ifTrue:[ |
|
7014 |
line := contextView list at:lineNr. |
|
7015 |
(line startsWith:'**') ifTrue:[ |
|
7016 |
self showMore. |
|
7017 |
lineNr >= contextArray size ifTrue:[ |
|
7018 |
contextView setSelection:lineNr. |
|
7019 |
con := contextArray at:lineNr ifAbsent:nil |
|
7020 |
] |
|
7021 |
]. |
|
7022 |
con isNil ifTrue:[ |
|
7023 |
codeView contents:nil. |
|
7024 |
^ self |
|
7025 |
]. |
|
7026 |
]. |
|
7027 |
||
7028 |
selectedContext := con. |
|
7029 |
m := contextView middleButtonMenu. |
|
7030 |
(m notNil and:[selectedContext notNil]) ifTrue:[ |
|
7031 |
m enableAll:#(browseImplementors browseSenders inspectContext) |
|
7032 |
]. |
|
7033 |
||
7034 |
self withExecuteCursorDo:[ |
|
7035 |
codeSet := false. |
|
7036 |
||
7037 |
" |
|
7038 |
give it to the (lower right) inspector |
|
7039 |
" |
|
7040 |
Error handle:[:ex | |
|
7041 |
'DebugView [warning]: error while accessing context' errorPrintCR. |
|
7042 |
contextInspector inspect:nil. |
|
9479 | 7043 |
"/ ex reject. |
10628 | 7044 |
] do:[ |
7045 |
contextInspector inspect:con. |
|
7046 |
contextInspector tryToSelectKeyNamed:lastSelectionInContextInspector. |
|
7047 |
]. |
|
7048 |
||
7049 |
"/ show a stack inspector sometimes |
|
7050 |
||
7051 |
con hasStackToShow ifTrue:[ |
|
7052 |
self showStackInspectorFor:con |
|
7053 |
] ifFalse:[ |
|
7054 |
self hideStackInspector |
|
7055 |
]. |
|
7056 |
||
7057 |
homeContext := con methodHome. |
|
7058 |
con canReturn ifTrue:[ |
|
7059 |
returnButton enable. restartButton enable. |
|
7060 |
] ifFalse:[ |
|
7061 |
returnButton disable. restartButton disable. |
|
7062 |
]. |
|
7063 |
||
7064 |
lineNrInMethod := con lineNumber. |
|
7065 |
||
7066 |
canAccept := false. |
|
7067 |
||
7068 |
homeContext isNil ifTrue:[ |
|
7069 |
" |
|
7070 |
mhmh - an optimized block |
|
7071 |
should get the block here, and get the method from |
|
7072 |
that one ... |
|
7073 |
But in the current version, there is no easy way to get to the block |
|
7074 |
since that one is not in the context. |
|
7075 |
A future new block calling scheme will fix this |
|
7076 |
(passing the block instead of the home as block argument). |
|
7077 |
" |
|
7078 |
||
7079 |
"temporary kludge - peek into the sender context. |
|
7080 |
If its a do-like method and there is a single block variable |
|
7081 |
in the args or temporaries, that must be the one. |
|
7082 |
This helps in some cases. |
|
7083 |
" |
|
7084 |
(sender := con sender) notNil ifTrue:[ |
|
7085 |
tryVars := false. |
|
7086 |
(selSender := sender selector) notNil ifTrue:[ |
|
7087 |
((selSender endsWith:'do:') or:[selSender endsWith:'Do:']) ifTrue:[ |
|
7088 |
tryVars := true. |
|
7089 |
] |
|
7090 |
]. |
|
7091 |
tryVars ifTrue:[ |
|
7092 |
possibleBlocks := sender argsAndVars select:[:v | v isBlock]. |
|
7093 |
possibleBlocks := possibleBlocks select:[:b | b home isNil]. |
|
7094 |
possibleBlocks size == 1 ifTrue:[ |
|
7095 |
method := possibleBlocks first method. |
|
7096 |
]. |
|
7097 |
] |
|
7098 |
]. |
|
7099 |
] ifFalse:[ |
|
7100 |
"fetch rec here - so we won't need context in doItAction" |
|
7101 |
rec := homeContext receiver. |
|
7102 |
sel := homeContext selector. |
|
7103 |
sel notNil ifTrue:[ |
|
7104 |
canAccept := true. |
|
7105 |
||
7106 |
implementorClass := homeContext methodClass. |
|
7107 |
implementorClass isNil ifTrue:[ |
|
7108 |
Error handle:[:ex | |
|
7109 |
ex signal == BreakPointInterrupt ifTrue:[ |
|
7110 |
ex proceed. |
|
7111 |
]. |
|
7112 |
code := 'error while asking method for its source'. |
|
7113 |
code := code , Character cr , ex signal printString. |
|
7114 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7115 |
||
7116 |
canAccept := false. |
|
7117 |
ex return. |
|
7118 |
] do:[ |
|
7119 |
" |
|
7120 |
special: look if this context was created by |
|
7121 |
valueWithReceiver kind of method invocation; |
|
7122 |
if so, grab the method from the sender and show it |
|
7123 |
" |
|
7124 |
((sender := homeContext sender) notNil |
|
7125 |
and:[((sender selector ? '') startsWith:'valueWithReceiver:') |
|
7126 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7127 |
method := sender receiver. |
|
7128 |
canAccept := false. |
|
7129 |
] ifFalse:[ |
|
7130 |
(method := con method) notNil ifTrue:[ |
|
7131 |
canAccept := false. |
|
7132 |
] |
|
7133 |
]. |
|
7134 |
] |
|
7135 |
] ifFalse:[ |
|
7136 |
method := implementorClass compiledMethodAt:sel. |
|
7137 |
]. |
|
7138 |
] |
|
7139 |
]. |
|
7140 |
||
7141 |
homeContext notNil ifTrue:[ |
|
7142 |
searchClass := homeContext searchClass ? rec class. |
|
7143 |
currentMethod := searchClass lookupMethodFor:sel. |
|
7144 |
]. |
|
7145 |
originalMethod := currentMethod. |
|
7146 |
(currentMethod notNil and:[currentMethod ~~ method]) ifTrue:[ |
|
7147 |
originalMethod := method. |
|
7148 |
methodCodeToggleSelectionHolder value = 1 ifTrue:[ |
|
7149 |
method := originalMethod. |
|
7150 |
] ifFalse:[ |
|
7151 |
method := currentMethod. |
|
7152 |
lineNrInMethod := nil. |
|
7153 |
canAccept := true. |
|
7154 |
]. |
|
7155 |
methodCodeToggle beVisible. |
|
7156 |
] ifFalse:[ |
|
7157 |
methodCodeToggle beInvisible. |
|
7158 |
]. |
|
7159 |
||
7160 |
code isNil ifTrue:[ |
|
7161 |
errMsg := nil. |
|
7162 |
method isNil ifTrue:[ |
|
7163 |
"/ fall back heuristics |
|
7164 |
con isBlockContext ifTrue:[ |
|
7165 |
((sender := con sender) notNil |
|
7166 |
and:[((sender selector ? '') startsWith:'value') |
|
7167 |
and:[sender receiver isBlock]]) ifTrue:[ |
|
7168 |
code := sender receiver source. |
|
7169 |
] |
|
7170 |
] ifFalse:[ |
|
7171 |
((sender := con sender) notNil |
|
7172 |
and:[((sender selector ? '') startsWith:'valueWith') |
|
7173 |
and:[sender receiver isMethod]]) ifTrue:[ |
|
7174 |
method := sender receiver. |
|
7175 |
] |
|
7176 |
] |
|
7177 |
]. |
|
7178 |
method notNil ifTrue:[ |
|
7179 |
Error handle:[:ex | |
|
7180 |
ex signal isControlInterrupt ifTrue:[ |
|
7181 |
ex proceed. |
|
7182 |
]. |
|
7183 |
code := 'error while asking method for its source'. |
|
7184 |
code := code , Character cr , ex signal printString. |
|
7185 |
code := code , Character cr , 'in: ' , ex suspendedContext printString. |
|
7186 |
||
7187 |
canAccept := false. |
|
7188 |
ex return. |
|
7189 |
] do:[ |
|
7190 |
self sensor shiftDown ifTrue:[ |
|
7191 |
code := method decompiledSource |
|
7192 |
] ifFalse:[ |
|
7193 |
code := method source. |
|
7194 |
]. |
|
7195 |
]. |
|
7196 |
code isNil ifTrue:[ |
|
7197 |
method sourceFilename notNil ifTrue:[ |
|
7198 |
codeView contents:(resources |
|
7199 |
string:'** no sourcefile: %1 **' |
|
7200 |
with:method sourceFilename). |
|
7201 |
codeView flash. |
|
7202 |
codeSet := true. |
|
7203 |
] ifFalse:[ |
|
7204 |
[ |
|
7205 |
|src| |
|
7206 |
||
7207 |
src := String streamContents:[:s | Decompiler decompile:method to:s]. |
|
7208 |
codeView contents:src. |
|
7209 |
codeSet := true. |
|
7210 |
] on: Error do:[ |
|
7211 |
errMsg := '** no source **' |
|
7212 |
]. |
|
7213 |
] |
|
7214 |
]. |
|
7215 |
] ifFalse:[ |
|
7216 |
homeContext isNil ifTrue:[ |
|
7217 |
errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'. |
|
7218 |
] ifFalse:[ |
|
7219 |
errMsg := '** no method - no source **'. |
|
7220 |
canDefine := true. |
|
7221 |
] |
|
7222 |
]. |
|
7223 |
errMsg notNil ifTrue:[ |
|
7224 |
self showError:errMsg. |
|
7225 |
codeSet := true. |
|
7226 |
] |
|
7227 |
]. |
|
7228 |
||
7229 |
code isNil ifTrue:[ |
|
7230 |
"/ canAccept := false. |
|
7231 |
codeSet ifFalse:[ |
|
7232 |
codeView contents:nil. |
|
7233 |
] |
|
7234 |
] ifFalse:[ |
|
7235 |
lineNrInMethod notNil ifTrue:[ |
|
7236 |
lineNrInMethod == 0 ifTrue:[ |
|
7237 |
(method notNil and:[method isJavaMethod]) ifTrue:[ |
|
7238 |
lineNrInMethod := method lineNumber |
|
7239 |
]. |
|
7240 |
"/ guess lineNumber from sent-messages selector |
|
7241 |
"/ kludge to fix lineNr-display of shared subclassResponsibility methods. |
|
7242 |
lineNrInMethod == 0 ifTrue:[ |
|
7243 |
|conIdx sentContext messages| |
|
7244 |
||
7245 |
conIdx := contextArray identityIndexOf:con. |
|
7246 |
conIdx > 1 ifTrue:[ |
|
7247 |
sentContext := contextArray at:conIdx-1. |
|
7248 |
sentContext isBlockContext ifFalse:[ |
|
7249 |
(method notNil and:[code notNil]) ifTrue:[ |
|
7250 |
messages := method messagesSent. |
|
7251 |
messages size == 1 ifTrue:[ |
|
7252 |
sentContext selector == messages first ifTrue:[ |
|
7253 |
lineNrInMethod := code asStringCollection findFirst:[:l | l includesString:sentContext selector]. |
|
7254 |
] |
|
7255 |
] |
|
7256 |
]. |
|
7257 |
]. |
|
7258 |
]. |
|
7259 |
]. |
|
7260 |
]. |
|
7261 |
]. |
|
7262 |
codeView isCodeView2 ifTrue:[ |
|
10649
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7263 |
codeView model setValue: code. |
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7264 |
codeView model changed. |
10628 | 7265 |
codeView methodHolder value: method. |
10752 | 7266 |
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class]) |
10628 | 7267 |
] ifFalse:[ |
7268 |
||
7269 |
UserPreferences current syntaxColoring ifTrue:[ |
|
7270 |
implementorClass isNil ifTrue:[ |
|
7271 |
(con isBlockContext |
|
7272 |
and:[con home isNil |
|
7273 |
and:[con guessedHome notNil]]) |
|
7274 |
ifTrue:[ |
|
7275 |
implementorClass := con guessedHome mclass |
|
7276 |
] |
|
7277 |
]. |
|
7278 |
implementorClass notNil ifTrue:[ |
|
7279 |
(highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[ |
|
7280 |
code size < 100000 ifTrue:[ |
|
7281 |
Error handle:[:ex | |
|
7282 |
] do:[ |
|
7283 |
code := highlighter formatMethod:code in:implementorClass. |
|
7284 |
] |
|
7285 |
] |
|
7286 |
] |
|
7287 |
] |
|
7288 |
]. |
|
1555 | 7289 |
|
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7290 |
"/ code ~= (codeView contents) ifTrue:[ |
10628 | 7291 |
codeView setContents:code. |
6178
2944e95c6eda
faster updateFromContext (avoid Text)
Claus Gittinger <cg@exept.de>
parents:
6172
diff
changeset
|
7292 |
"/ ]. |
10628 | 7293 |
]. |
7294 |
(lineNrInMethod notNil |
|
7295 |
and:[lineNrInMethod ~~ 0 |
|
7296 |
and:[lineNrInMethod <= codeView list size]]) ifTrue:[ |
|
7000 | 7297 |
lineNrInMethod == 255 ifFalse:[ |
10628 | 7298 |
(lineNrInMethod == 255 |
7299 |
and:[method notNil |
|
7300 |
and:[method hasCode not]]) ifTrue:[ |
|
7301 |
"/ means: do not really know in interpreted methods |
|
7302 |
codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0. |
|
7303 |
] ifFalse:[ |
|
7304 |
codeView selectLine:lineNrInMethod. |
|
7305 |
]. |
|
7306 |
codeView makeSelectionVisible |
|
7000 | 7307 |
]. |
10628 | 7308 |
] ifFalse:[ |
7309 |
codeView unselect. |
|
7310 |
codeView scrollToTop |
|
7311 |
] |
|
7312 |
]. |
|
7313 |
||
7314 |
codeView acceptEnabled:canAccept. |
|
7315 |
canAccept ifTrue:[ |
|
7316 |
codeView acceptAction:[:code | self codeAccept:code asString] |
|
7317 |
] ifFalse:[ |
|
7318 |
codeView acceptAction:[:code | self beep] |
|
7319 |
]. |
|
7320 |
||
7321 |
receiverInspector inspect:rec. |
|
7322 |
receiverInspector tryToSelectKeyNamed:lastSelectionInReceiverInspector. |
|
7323 |
||
7324 |
" |
|
7325 |
the one below is wrong: currently, the |
|
7326 |
evaluator cannot handle passed contexts. |
|
7327 |
Once it does, pass con as in:-arg |
|
7328 |
" |
|
7329 |
(rec isJavaObject |
|
7330 |
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[ |
|
7331 |
"/ although a java object, use the smalltalk parser here for doIts. |
|
7332 |
evaluatorClass := Parser |
|
7333 |
] ifFalse:[ |
|
7334 |
(method notNil and:[method mclass notNil]) ifTrue:[ |
|
7335 |
evaluatorClass := method mclass evaluatorClass. |
|
7336 |
] ifFalse:[ |
|
7337 |
evaluatorClass := rec class evaluatorClass. |
|
7338 |
]. |
|
7339 |
]. |
|
7340 |
||
7341 |
codeView doItAction:[:theCode | |
|
7342 |
evaluatorClass |
|
7343 |
evaluate:theCode |
|
7344 |
in:actualContext |
|
7345 |
receiver:rec |
|
7346 |
notifying:codeView |
|
7347 |
logged:true |
|
7348 |
ifFail:nil |
|
7349 |
]. |
|
7350 |
self setCurrentMethod:method. |
|
7351 |
||
7352 |
selectedContext := homeContext. |
|
7353 |
actualContext := con |
|
7354 |
]. |
|
4122 | 7355 |
] ifFalse:[ |
10628 | 7356 |
codeView contents:nil. |
4122 | 7357 |
]. |
7358 |
codeView modified:false. |
|
7359 |
||
7360 |
con isContext ifFalse:[ |
|
10628 | 7361 |
sendButton disable. |
4122 | 7362 |
] ifTrue:[ |
10628 | 7363 |
sendButton enable. |
10205 | 7364 |
]. |
7365 |
||
7366 |
"clear out locals to prevent keeping around unneeded contexts |
|
4122 | 7367 |
(due to the block held in codeView). |
7368 |
(not really needed, since stuff gets collected away sooner or later ... |
|
7369 |
... but this makes it a bit sooner) |
|
7370 |
" |
|
7371 |
con := nil. |
|
7372 |
homeContext := nil. |
|
7373 |
||
10205 | 7374 |
(callee notNil |
7375 |
and:[callee method notNil |
|
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7376 |
and:[callee method selector == #subclassResponsibility]] |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7377 |
) ifTrue:[ |
10628 | 7378 |
canDefine := true. |
8595
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7379 |
]. |
9ae7fccae337
allow \"define\" when in a subclassResponsibility method
Claus Gittinger <cg@exept.de>
parents:
8592
diff
changeset
|
7380 |
|
4122 | 7381 |
canDefine ifTrue:[ |
10628 | 7382 |
defineButton beVisible. |
4122 | 7383 |
] ifFalse:[ |
10628 | 7384 |
defineButton beInvisible. |
4122 | 7385 |
]. |
7386 |
||
7387 |
" |
|
7388 |
enable/disable some menu items |
|
7389 |
" |
|
7390 |
self updateMenuItems |
|
7391 |
||
6849
e95621a873be
try to decompile if no source
Claus Gittinger <cg@exept.de>
parents:
6821
diff
changeset
|
7392 |
"Created: / 14-08-1997 / 20:15:00 / cg" |
10649
3f480fd28a48
changed: #updateForContext:
Claus Gittinger <cg@exept.de>
parents:
10628
diff
changeset
|
7393 |
"Modified: / 22-08-2011 / 13:49:39 / cg" |
10752 | 7394 |
"Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4122 | 7395 |
! ! |
7396 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7397 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'! |
8170 | 7398 |
|
7399 |
ignoreCount:something |
|
7400 |
ignoreCount := something. |
|
7401 |
! |
|
7402 |
||
7403 |
ignoreEndTime:something |
|
7404 |
ignoreEndTime := something. |
|
7405 |
! |
|
7406 |
||
11210 | 7407 |
ignoreUntilShiftKeyPressed:aBoolean |
7408 |
ignoreUntilShiftKeyPressed := aBoolean. |
|
7409 |
||
7410 |
"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
|
7411 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7412 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7413 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7414 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7415 |
decrementIgnoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7416 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7417 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7418 |
ignoreCount := ignoreCount - 1 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7419 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7420 |
] |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7421 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7422 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7423 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7424 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7425 |
printConditionOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7426 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7427 |
aStream nextPutAll:' until shiftKey pressed'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7428 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7429 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7430 |
aStream nextPutAll:' until '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7431 |
ignoreEndTime printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7432 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7433 |
(ignoreCount > 0) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7434 |
aStream nextPutAll:' for '. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7435 |
ignoreCount printOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7436 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7437 |
(ignoreCount < 0) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7438 |
aStream nextPutAll:' forEver'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7439 |
] ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7440 |
aStream nextPutAll:' no longer'. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7441 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7442 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7443 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7444 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7445 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7446 |
"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
|
7447 |
"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
|
7448 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7449 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7450 |
!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7451 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7452 |
haltIgnoredInfoString |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7453 |
"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
|
7454 |
nil if not ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7455 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7456 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7457 |
ignoreCount > 0 ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7458 |
^ '%1 more calls ignored' bindWith:ignoreCount |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7459 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7460 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7461 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7462 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7463 |
(ignoreEndTime > Timestamp now) ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7464 |
^ 'ignored until %1' bindWith:ignoreEndTime |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7465 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7466 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7467 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7468 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7469 |
Display shiftDown ifFalse:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7470 |
^ 'ignored until shiftKey is pressed' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7471 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7472 |
^ nil |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7473 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7474 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7475 |
^ 'ignored until reenabled' |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7476 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7477 |
"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
|
7478 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7479 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7480 |
isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7481 |
"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
|
7482 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7483 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7484 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7485 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7486 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7487 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7488 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7489 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7490 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7491 |
"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
|
7492 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7493 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7494 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7495 |
^ false |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7496 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7497 |
"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
|
7498 |
"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
|
7499 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7500 |
|
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7501 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7502 |
^ false |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7503 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7504 |
"Modified: / 27-01-2012 / 11:36:01 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7505 |
"Created: / 06-03-2012 / 14:36:28 / cg" |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7506 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7507 |
|
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7508 |
isHaltIgnored |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7509 |
"true if this halt should be ignored" |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7510 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7511 |
ignoreUntilShiftKeyPressed == true ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7512 |
^ Display shiftDown not |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7513 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7514 |
ignoreCount notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7515 |
^ ignoreCount > 0 |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7516 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7517 |
ignoreEndTime notNil ifTrue:[ |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7518 |
^ ignoreEndTime > Timestamp now |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7519 |
]. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7520 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7521 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7522 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7523 |
"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
|
7524 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7525 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7526 |
!DebugView::IgnoredHalt methodsFor:'accessing'! |
11210 | 7527 |
|
8170 | 7528 |
method |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7529 |
|m| |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7530 |
|
9922 | 7531 |
weakMethodHolder == #all ifTrue:[^ weakMethodHolder ]. |
7532 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7533 |
m := weakMethodHolder at:1. |
9796 | 7534 |
"/ wait until really gone (it could still be on the call stack |
7535 |
"/ |
|
7536 |
"/ m notNil ifTrue:[ |
|
7537 |
"/ m mclass isNil ifTrue:[ |
|
7538 |
"/ "/ no longer valid |
|
7539 |
"/ weakMethodHolder at:1 put:nil. |
|
7540 |
"/ ^ nil |
|
7541 |
"/ ]. |
|
7542 |
"/ ]. |
|
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7543 |
^ m |
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7544 |
|
9922 | 7545 |
"Modified: / 08-05-2011 / 10:28:10 / cg" |
8170 | 7546 |
! |
7547 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7548 |
method:methodArg lineNumber:lineNumberArg |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7549 |
"/ self assert:(methodArg mclass notNil). |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7550 |
|
9922 | 7551 |
methodArg == #all ifTrue:[ |
11210 | 7552 |
weakMethodHolder := methodArg |
9922 | 7553 |
] ifFalse:[ |
11210 | 7554 |
weakMethodHolder := WeakArray with:methodArg. |
9922 | 7555 |
]. |
8170 | 7556 |
lineNumber := lineNumberArg. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7557 |
|
9922 | 7558 |
"Modified: / 08-05-2011 / 10:28:41 / cg" |
8170 | 7559 |
! ! |
7560 |
||
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7561 |
!DebugView::IgnoredHalt methodsFor:'printing'! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7562 |
|
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7563 |
printOn:aStream |
9922 | 7564 |
|method| |
7565 |
||
7566 |
(method := self method) isNil ifTrue:[ |
|
11210 | 7567 |
aStream nextPutAll:'an obsolete IgnoredHalt'. |
7568 |
^ self |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7569 |
]. |
9590
41587c52f59c
fixed ignoring halts for breakPoints
Claus Gittinger <cg@exept.de>
parents:
9586
diff
changeset
|
7570 |
|
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7571 |
aStream nextPutAll:'Ignore '. |
11210 | 7572 |
method whoString printOn:aStream. |
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7573 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7574 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7575 |
"Modified: / 06-03-2012 / 12:41:19 / cg" |
9093
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7576 |
! ! |
afeec57f277e
generate a change notification when ignore-halts changes
Claus Gittinger <cg@exept.de>
parents:
9078
diff
changeset
|
7577 |
|
8170 | 7578 |
!DebugView::IgnoredHalt methodsFor:'queries'! |
7579 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7580 |
isActive |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7581 |
"true if this ignore-entry is still active" |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7582 |
|
9796 | 7583 |
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
|
7584 |
^ super isActive |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7585 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7586 |
"Modified: / 06-03-2012 / 12:40:20 / cg" |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7587 |
! |
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7588 |
|
8170 | 7589 |
isForMethod:aMethod line:line |
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7590 |
"/ check in this order - method has a flushing side-effect, which is useful here... |
9922 | 7591 |
weakMethodHolder == #all ifTrue:[^ true]. |
7592 |
||
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7593 |
^ (aMethod = self method) and:[ line = lineNumber ]. |
9922 | 7594 |
|
7595 |
"Modified: / 08-05-2011 / 10:27:31 / cg" |
|
8170 | 7596 |
! |
7597 |
||
7598 |
isHaltIgnoredInMethod:aMethod line:line |
|
9095 | 7599 |
"/ 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
|
7600 |
|
9094
51cf41fd65a2
added: #removeInactiveIgnores
Claus Gittinger <cg@exept.de>
parents:
9093
diff
changeset
|
7601 |
(self isForMethod:aMethod line:line) ifFalse:[^ false]. |
9095 | 7602 |
"/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored. |
8170 | 7603 |
|
7604 |
^ self isHaltIgnored |
|
7605 |
! ! |
|
7606 |
||
11366
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7607 |
!DebugView::IgnoredBreakpoint methodsFor:'accessing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7608 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7609 |
parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7610 |
^ parameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7611 |
! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7612 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7613 |
parameter:something |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7614 |
parameter := something. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7615 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7616 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7617 |
!DebugView::IgnoredBreakpoint methodsFor:'printing'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7618 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7619 |
printOn:aStream |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7620 |
aStream nextPutAll:'Ignore breakpoint:#', parameter. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7621 |
self printConditionOn:aStream. |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7622 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7623 |
"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
|
7624 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7625 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7626 |
!DebugView::IgnoredBreakpoint methodsFor:'queries'! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7627 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7628 |
isForBreakpointWithParameter |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7629 |
^ true |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7630 |
|
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7631 |
"Created: / 06-03-2012 / 12:54:35 / cg" |
11367
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7632 |
! |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7633 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7634 |
isForBreakpointWithParameter:paramArg |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7635 |
^ paramArg = parameter |
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7636 |
|
bd0402b6421a
changed: #isBreakpointToBeIgnoredForParameter:modifyEntryCount:
Claus Gittinger <cg@exept.de>
parents:
11366
diff
changeset
|
7637 |
"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
|
7638 |
! ! |
d57e42f65841
allow for code breakpoints (breakpoint:#param) to
Claus Gittinger <cg@exept.de>
parents:
11364
diff
changeset
|
7639 |
|
4122 | 7640 |
!DebugView class methodsFor:'documentation'! |
7641 |
||
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
7642 |
version |
11443 | 7643 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.538 2012-03-19 16:41:24 cg Exp $' |
11304
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
7644 |
! |
d142697b6c1e
changed: #browseImplementingClass
Claus Gittinger <cg@exept.de>
parents:
11303
diff
changeset
|
7645 |
|
8952
7742c63ff6f5
catch halts in: #showSelection:
Claus Gittinger <cg@exept.de>
parents:
8745
diff
changeset
|
7646 |
version_CVS |
11443 | 7647 |
^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.538 2012-03-19 16:41:24 cg Exp $' |
10628 | 7648 |
! |
7649 |
||
7650 |
version_SVN |
|
7651 |
^ '§Id: DebugView.st 7818 2011-08-18 11:42:39Z vranyj1 §' |
|
4122 | 7652 |
! ! |
7653 |
||
7654 |
DebugView initialize! |