author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 11 Jul 2011 19:28:00 +0200 | |
changeset 2554 | 31516fc84824 |
parent 2551 | 4470029ad63a |
child 2792 | 41047dab5b11 |
permissions | -rw-r--r-- |
2510 | 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 |
" |
|
12 |
"{ Package: 'stx:libcomp' }" |
|
13 |
||
14 |
Object subclass:#Breakpoint |
|
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
15 |
instanceVariableNames:'method position description line isReached' |
2510 | 16 |
classVariableNames:'' |
17 |
poolDictionaries:'' |
|
18 |
category:'System-Compiler-Debugging' |
|
19 |
! |
|
20 |
||
21 |
!Breakpoint class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! ! |
|
36 |
||
37 |
!Breakpoint class methodsFor:'instance creation'! |
|
38 |
||
39 |
new |
|
40 |
"return an initialized instance" |
|
41 |
||
42 |
^ self basicNew initialize. |
|
43 |
! ! |
|
44 |
||
45 |
!Breakpoint methodsFor:'accessing'! |
|
46 |
||
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
47 |
description |
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
48 |
^ description |
2510 | 49 |
! |
50 |
||
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
51 |
description:aBreakpointDescription |
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
52 |
description := aBreakpointDescription. |
2510 | 53 |
! |
54 |
||
2541 | 55 |
isReached |
56 |
^ isReached |
|
57 |
! |
|
58 |
||
59 |
isReached:aBoolean |
|
60 |
isReached := aBoolean. |
|
61 |
! |
|
62 |
||
2510 | 63 |
line |
64 |
^ line |
|
65 |
! |
|
66 |
||
67 |
line:anInteger |
|
68 |
line := anInteger. |
|
69 |
! |
|
70 |
||
71 |
position |
|
72 |
^ position |
|
73 |
! |
|
74 |
||
75 |
position:something |
|
76 |
position := something. |
|
77 |
! ! |
|
78 |
||
79 |
!Breakpoint methodsFor:'initialization'! |
|
80 |
||
81 |
initialize |
|
82 |
"Invoked when a new instance is created." |
|
83 |
||
84 |
"/ please change as required (and remove this comment) |
|
85 |
"/ method := nil. |
|
86 |
"/ position := nil. |
|
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
87 |
description := BreakpointDescription new. |
2510 | 88 |
"/ line := nil. |
89 |
||
90 |
"/ super initialize. -- commented since inherited method does nothing |
|
91 |
||
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
92 |
"Modified: / 11-07-2011 / 18:19:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2510 | 93 |
! ! |
94 |
||
95 |
!Breakpoint methodsFor:'printing & storing'! |
|
96 |
||
97 |
printOn:aStream |
|
98 |
"append a printed representation if the receiver to the argument, aStream" |
|
99 |
||
100 |
aStream |
|
101 |
nextPutAll: 'BPNT'; |
|
102 |
nextPut: $(; |
|
103 |
nextPutAll: position printString; |
|
104 |
nextPut: $). |
|
105 |
||
106 |
"Modified: / 16-06-2011 / 14:48:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
107 |
! ! |
|
108 |
||
109 |
!Breakpoint methodsFor:'support'! |
|
110 |
||
111 |
break |
|
2545 | 112 |
"invoked by the breakPoint's code (see BreakPointNode)" |
2510 | 113 |
|
114 |
<resource: #skipInDebuggersWalkBack> |
|
115 |
||
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
116 |
(description shouldBreakIn: thisContext sender) ifTrue:[ |
2510 | 117 |
HaltSignal |
118 |
raiseRequestWith: self |
|
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
119 |
errorString:('Breakpoint encountered at line %1' bindWith:self line) |
2545 | 120 |
in:thisContext sender. |
2510 | 121 |
] |
122 |
||
123 |
"Created: / 15-06-2011 / 12:48:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2545 | 124 |
"Modified: / 06-07-2011 / 10:11:55 / cg" |
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
125 |
"Modified: / 11-07-2011 / 18:17:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2510 | 126 |
! |
127 |
||
128 |
toggle |
|
129 |
||
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
130 |
description toggle |
2510 | 131 |
|
132 |
"Created: / 17-06-2011 / 13:40:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2545 | 133 |
"Modified (format): / 06-07-2011 / 12:33:10 / cg" |
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
134 |
"Modified: / 11-07-2011 / 18:18:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2510 | 135 |
! ! |
136 |
||
137 |
!Breakpoint methodsFor:'testing'! |
|
138 |
||
139 |
isEnabled |
|
140 |
||
141 |
"Bad coding here, state should be full object" |
|
142 |
||
2551
4470029ad63a
Breakpoint state extracted to BreakpointDescription object
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2545
diff
changeset
|
143 |
^description isEnabled |
2510 | 144 |
|
145 |
"Created: / 28-06-2011 / 08:27:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
146 |
! ! |
|
147 |
||
148 |
!Breakpoint class methodsFor:'documentation'! |
|
149 |
||
2554
31516fc84824
#icon moved to stx:libtool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2551
diff
changeset
|
150 |
version |
31516fc84824
#icon moved to stx:libtool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2551
diff
changeset
|
151 |
^ '$Header: /cvs/stx/stx/libcomp/Breakpoint.st,v 1.5 2011-07-11 17:28:00 vrany Exp $' |
31516fc84824
#icon moved to stx:libtool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2551
diff
changeset
|
152 |
! |
31516fc84824
#icon moved to stx:libtool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2551
diff
changeset
|
153 |
|
2510 | 154 |
version_CVS |
2554
31516fc84824
#icon moved to stx:libtool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2551
diff
changeset
|
155 |
^ '$Header: /cvs/stx/stx/libcomp/Breakpoint.st,v 1.5 2011-07-11 17:28:00 vrany Exp $' |
2510 | 156 |
! |
157 |
||
158 |
version_SVN |
|
2541 | 159 |
^ '§ Id §' |
2510 | 160 |
! ! |