author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 05 May 2016 00:28:47 +0200 | |
branch | jv |
changeset 3841 | a22f33410bdf |
parent 3759 | 2c4fbb050841 |
child 4007 | 95308b6e887e |
permissions | -rw-r--r-- |
3841 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
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 |
" |
|
2552 | 12 |
"{ Package: 'stx:libcomp' }" |
13 |
||
3758 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
2552 | 16 |
Object subclass:#BreakpointDescription |
3478
10e2a710037f
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
17 |
instanceVariableNames:'state condition icon' |
2552 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'System-Compiler-Debugging' |
|
21 |
! |
|
22 |
||
23 |
!BreakpointDescription class methodsFor:'documentation'! |
|
24 |
||
3841 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
2552 | 39 |
documentation |
40 |
" |
|
41 |
I describe a breakpoint: its state (enabled/disabled), |
|
42 |
condition, etc. |
|
43 |
||
44 |
I may be shared by multiple instances of Breakpoint, |
|
45 |
since there may be multiple version of same method |
|
46 |
with breakpoints on different position but representing |
|
3113
4d7936f562c2
class: BreakpointDescription
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2969
diff
changeset
|
47 |
the same logical breakpoint (the one set by the user). |
2552 | 48 |
|
49 |
[author:] |
|
50 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
51 |
||
52 |
[instance variables:] |
|
53 |
||
54 |
[class variables:] |
|
55 |
||
56 |
[see also:] |
|
57 |
||
58 |
" |
|
59 |
! ! |
|
60 |
||
61 |
!BreakpointDescription class methodsFor:'instance creation'! |
|
62 |
||
63 |
new |
|
64 |
"return an initialized instance" |
|
65 |
||
66 |
^ self basicNew initialize. |
|
67 |
! ! |
|
68 |
||
69 |
!BreakpointDescription methodsFor:'accessing'! |
|
70 |
||
71 |
condition |
|
72 |
^ condition |
|
73 |
! |
|
74 |
||
75 |
condition:something |
|
76 |
condition := something. |
|
77 |
! ! |
|
78 |
||
79 |
!BreakpointDescription methodsFor:'initialization'! |
|
80 |
||
81 |
initialize |
|
82 |
"Invoked when a new instance is created." |
|
83 |
||
84 |
state := #enabled |
|
85 |
||
86 |
"/ super initialize. -- commented since inherited method does nothing |
|
87 |
||
88 |
"Modified: / 17-06-2011 / 13:41:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
89 |
! ! |
|
90 |
||
91 |
!BreakpointDescription methodsFor:'support'! |
|
92 |
||
3197
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
93 |
beInvisible |
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
94 |
state := #hidden. |
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
95 |
! |
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
96 |
|
2794 | 97 |
beTracepoint |
98 |
state := #tracing. |
|
99 |
||
100 |
"Created: / 27-01-2012 / 13:55:20 / cg" |
|
101 |
! |
|
102 |
||
2969 | 103 |
disable |
104 |
state == #deleted ifTrue:[^self]. |
|
105 |
||
106 |
state := #disabled. |
|
107 |
! |
|
108 |
||
2552 | 109 |
shouldBreakIn: aContext |
110 |
state ~~ #enabled ifTrue:[^false]. |
|
111 |
||
2793 | 112 |
^ condition isNil or:[condition value: thisContext sender] |
2552 | 113 |
|
114 |
"Created: / 11-07-2011 / 18:16:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2793 | 115 |
"Modified (format): / 27-01-2012 / 13:42:28 / cg" |
116 |
! |
|
117 |
||
118 |
shouldTraceIn: aContext |
|
119 |
state ~~ #tracing ifTrue:[^false]. |
|
120 |
||
121 |
^ condition isNil or:[condition value: thisContext sender] |
|
122 |
||
123 |
"Created: / 27-01-2012 / 13:41:58 / cg" |
|
2552 | 124 |
! |
125 |
||
126 |
toggle |
|
127 |
state == #deleted ifTrue:[^self]. |
|
128 |
||
2793 | 129 |
(state == #enabled) ifTrue:[ |
130 |
state := #disabled. |
|
131 |
] ifFalse:[ |
|
2794 | 132 |
state := #enabled |
2793 | 133 |
]. |
2552 | 134 |
|
135 |
"Created: / 17-06-2011 / 13:40:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2794 | 136 |
"Modified: / 27-01-2012 / 13:52:54 / cg" |
137 |
! |
|
138 |
||
139 |
toggleTracing |
|
140 |
state == #deleted ifTrue:[^self]. |
|
141 |
||
142 |
(state == #tracing) ifTrue:[ |
|
143 |
state := #disabled |
|
144 |
] ifFalse:[ |
|
145 |
state := #tracing. |
|
146 |
]. |
|
147 |
||
148 |
"Created: / 27-01-2012 / 13:52:41 / cg" |
|
2552 | 149 |
! ! |
150 |
||
151 |
!BreakpointDescription methodsFor:'testing'! |
|
152 |
||
153 |
isEnabled |
|
154 |
||
155 |
"Bad coding here, state should be full object" |
|
156 |
||
3392
8ce7c295de8c
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3197
diff
changeset
|
157 |
^ state == #enabled or:[ state == #tracing ] |
2552 | 158 |
|
159 |
"Created: / 28-06-2011 / 08:27:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3197
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
160 |
! |
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
161 |
|
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
162 |
isVisible |
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
163 |
"Bad coding here, state should be full object" |
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
164 |
|
fe2be038af11
class: BreakpointDescription
Claus Gittinger <cg@exept.de>
parents:
3113
diff
changeset
|
165 |
^state ~~ #hidden |
2552 | 166 |
! ! |
167 |
||
168 |
!BreakpointDescription class methodsFor:'documentation'! |
|
169 |
||
170 |
version |
|
3758 | 171 |
^ '$Header$' |
2552 | 172 |
! |
173 |
||
174 |
version_CVS |
|
3758 | 175 |
^ '$Header$' |
2552 | 176 |
! ! |
3113
4d7936f562c2
class: BreakpointDescription
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2969
diff
changeset
|
177 |