85 |
85 |
86 aStream nextPutAll:'at '. |
86 aStream nextPutAll:'at '. |
87 location := breakpoint propertyAt: 'what'. |
87 location := breakpoint propertyAt: 'what'. |
88 aStream nextPutAll: location ? '??'. |
88 aStream nextPutAll: location ? '??'. |
89 ] ifFalse:[ |
89 ] ifFalse:[ |
|
90 | func | |
90 aStream nextPutAll: 'B '. |
91 aStream nextPutAll: 'B '. |
91 breakpoint number printOn:aStream. |
92 breakpoint number printOn:aStream. |
92 aStream nextPutAll:', '. |
93 aStream nextPutAll:', '. |
|
94 |
|
95 func := breakpoint func. |
|
96 func isNil and:[ |
|
97 func := breakpoint propertyAt:'original-location' |
|
98 ]. |
93 |
99 |
94 breakpoint func notNil ifTrue:[ |
100 func notNil ifTrue:[ |
95 aStream nextPutAll:'in '. |
101 aStream nextPutAll:'in '. |
96 breakpoint func printOn:aStream. |
102 func printOn:aStream. |
97 aStream nextPutAll:'(), '. |
103 "/ I (JV) prefer to have () after plain C function names. GDB seems to |
|
104 "/ to add them for C functions but does add them for C++ functions / methods |
|
105 "/ (well. perhaps this is compile who does that, does not matter). |
|
106 "/ |
|
107 "/ So, if there's no $(, assume it's a C function and add () at the end. |
|
108 "/ We'll see how this works... |
|
109 (func includes: $() ifFalse:[ |
|
110 aStream nextPutAll:'()'. |
|
111 ]. |
|
112 aStream nextPutAll:', ' |
98 ]. |
113 ]. |
99 breakpoint file notNil ifTrue:[ |
114 breakpoint hasMultipleLocations ifTrue:[ |
100 breakpoint file printOn:aStream. |
115 breakpoint locations size printOn: aStream. |
101 aStream nextPut:$:. |
116 aStream nextPutAll: ' locations'. |
102 breakpoint line printOn:aStream. |
117 ] ifFalse:[ |
103 ] ifFalse:[ |
118 breakpoint file notNil ifTrue:[ |
104 | addr | |
119 breakpoint file printOn:aStream. |
105 |
120 aStream nextPut:$:. |
106 addr := breakpoint addr. |
121 breakpoint line printOn:aStream. |
107 addr isNil ifTrue:[ |
|
108 aStream nextPutAll:'at ??'. |
|
109 ] ifFalse:[addr isInteger ifTrue:[ |
|
110 aStream nextPutAll:'at 0x'. |
|
111 addr printOn: aStream radix: 16 |
|
112 ] ifFalse:[ |
122 ] ifFalse:[ |
113 addr printOn: aStream |
123 | addr | |
114 ]]. |
124 |
115 ]. |
125 addr := breakpoint addr. |
|
126 addr isNil ifTrue:[ |
|
127 aStream nextPutAll:'at ??'. |
|
128 ] ifFalse:[addr isInteger ifTrue:[ |
|
129 aStream nextPutAll:'at 0x'. |
|
130 addr printOn: aStream radix: 16 |
|
131 ] ifFalse:[ |
|
132 addr printOn: aStream |
|
133 ]]. |
|
134 ]. |
|
135 ]. |
116 ] |
136 ] |
117 ]. |
137 ]. |
118 |
138 |
119 "Created: / 10-07-2017 / 13:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
139 "Created: / 10-07-2017 / 13:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
120 "Modified: / 21-01-2019 / 21:13:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
140 "Modified: / 26-03-2019 / 10:58:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
121 ! |
141 ! |
122 |
142 |
123 subject |
143 subject |
124 "Return an instance of GDB object that this presenter displays." |
144 "Return an instance of GDB object that this presenter displays." |
125 |
145 |
162 ^ breakpoint enabled not |
182 ^ breakpoint enabled not |
163 |
183 |
164 "Created: / 05-02-2018 / 12:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
184 "Created: / 05-02-2018 / 12:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
165 ! ! |
185 ! ! |
166 |
186 |
|
187 !VDBBreakpointPresenter methodsFor:'private'! |
|
188 |
|
189 fetchChildren |
|
190 breakpoint hasMultipleLocations ifTrue:[ |
|
191 ^ breakpoint locations collect:[ :l | VDBBreakpointPresenter new setBreakpoint: l; parent: self ] |
|
192 ] ifFalse:[ |
|
193 ^ #() |
|
194 ]. |
|
195 |
|
196 "Created: / 26-03-2019 / 10:10:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
197 ! ! |
|
198 |
167 !VDBBreakpointPresenter methodsFor:'testing'! |
199 !VDBBreakpointPresenter methodsFor:'testing'! |
168 |
200 |
169 isBreakpointPresenter |
201 isBreakpointPresenter |
170 ^ true |
202 ^ true |
171 |
203 |