2181
|
1 |
"{ Package: 'stx:libtool2' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Tools }"
|
|
4 |
|
2184
|
5 |
ToolApplicationModel subclass:#ObjectModuleInformation
|
|
6 |
instanceVariableNames:'readOnly listOfModuleNames selectedModuleIndexHolder allModules
|
2183
|
7 |
objectHandles showOthers showCObjects showBuiltIn showMethods
|
|
8 |
showClassLibs table1VisibleHolder table2VisibleHolder'
|
2181
|
9 |
classVariableNames:''
|
|
10 |
poolDictionaries:''
|
|
11 |
category:'Monitors-ST/X'
|
|
12 |
!
|
|
13 |
|
|
14 |
Object subclass:#InfoRow
|
2183
|
15 |
instanceVariableNames:'name version date value'
|
2181
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
privateIn:ObjectModuleInformation
|
|
19 |
!
|
|
20 |
|
|
21 |
!ObjectModuleInformation class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
documentation
|
|
24 |
"
|
|
25 |
Shows the modules (dll's) of ST/X.
|
|
26 |
Both builtIn modules, and dynamically loaded modules are listed.
|
|
27 |
|
|
28 |
[author:]
|
|
29 |
cg
|
|
30 |
"
|
|
31 |
!
|
|
32 |
|
|
33 |
examples
|
|
34 |
"
|
|
35 |
Starting the application:
|
|
36 |
[exBegin]
|
|
37 |
ObjectModuleInformation open
|
|
38 |
|
|
39 |
[exEnd]
|
|
40 |
"
|
|
41 |
! !
|
|
42 |
|
|
43 |
!ObjectModuleInformation class methodsFor:'info'!
|
|
44 |
|
|
45 |
defaultLabel
|
2183
|
46 |
^ 'Object Module Info'
|
2181
|
47 |
|
|
48 |
"Created: / 05-10-2007 / 11:56:59 / cg"
|
|
49 |
! !
|
|
50 |
|
|
51 |
!ObjectModuleInformation class methodsFor:'interface specs'!
|
|
52 |
|
|
53 |
windowSpec
|
|
54 |
"This resource specification was automatically generated
|
|
55 |
by the UIPainter of ST/X."
|
|
56 |
|
|
57 |
"Do not manually edit this!! If it is corrupted,
|
|
58 |
the UIPainter may not be able to read the specification."
|
|
59 |
|
|
60 |
"
|
2183
|
61 |
UIPainter new openOnClass:Tools::ObjectModuleInformation andSelector:#windowSpec
|
|
62 |
Tools::ObjectModuleInformation new openInterface:#windowSpec
|
|
63 |
Tools::ObjectModuleInformation open
|
2181
|
64 |
"
|
|
65 |
|
|
66 |
<resource: #canvas>
|
|
67 |
|
|
68 |
^
|
|
69 |
#(FullSpec
|
|
70 |
name: windowSpec
|
|
71 |
window:
|
|
72 |
(WindowSpec
|
|
73 |
label: 'ST/X Module & Version Information'
|
|
74 |
name: 'ST/X Module & Version Information'
|
|
75 |
min: (Point 0 0)
|
|
76 |
bounds: (Rectangle 0 0 505 567)
|
|
77 |
menu: mainMenu
|
|
78 |
)
|
|
79 |
component:
|
|
80 |
(SpecCollection
|
|
81 |
collection: (
|
|
82 |
(MenuPanelSpec
|
|
83 |
name: 'ToolBar1'
|
|
84 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
85 |
menu: toolbarMenu
|
|
86 |
textDefault: true
|
|
87 |
)
|
|
88 |
(VariableVerticalPanelSpec
|
|
89 |
name: 'VariableVerticalPanel1'
|
|
90 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
91 |
component:
|
|
92 |
(SpecCollection
|
|
93 |
collection: (
|
|
94 |
(SequenceViewSpec
|
|
95 |
name: 'List1'
|
|
96 |
model: selectedModuleIndexHolder
|
|
97 |
hasHorizontalScrollBar: true
|
|
98 |
hasVerticalScrollBar: true
|
|
99 |
useIndex: true
|
|
100 |
sequenceList: listOfModuleNames
|
|
101 |
)
|
|
102 |
(ViewSpec
|
|
103 |
name: 'Box1'
|
|
104 |
component:
|
|
105 |
(SpecCollection
|
|
106 |
collection: (
|
|
107 |
(LabelSpec
|
|
108 |
name: 'Label1'
|
|
109 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
110 |
translateLabel: true
|
|
111 |
labelChannel: middleLabelHolder
|
|
112 |
adjust: left
|
|
113 |
)
|
|
114 |
(DataSetSpec
|
|
115 |
name: 'Table1'
|
|
116 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
2183
|
117 |
visibilityChannel: table1VisibleHolder
|
2181
|
118 |
model: selectedInfoIndexHolder
|
|
119 |
hasHorizontalScrollBar: true
|
|
120 |
hasVerticalScrollBar: true
|
2183
|
121 |
dataList: infoTable1ListHolder
|
2181
|
122 |
columnHolder: tableColumns
|
|
123 |
separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015)
|
|
124 |
)
|
2183
|
125 |
(DataSetSpec
|
|
126 |
name: 'Table2'
|
|
127 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
128 |
initiallyInvisible: true
|
|
129 |
visibilityChannel: table2VisibleHolder
|
|
130 |
model: selectedInfoIndexHolder
|
|
131 |
hasHorizontalScrollBar: true
|
|
132 |
hasVerticalScrollBar: true
|
|
133 |
dataList: infoTable2ListHolder
|
|
134 |
columnHolder: tableColumnsForSingleInfo
|
|
135 |
separatorOneDColor: (Color 66.999313344015 66.999313344015 66.999313344015)
|
|
136 |
)
|
2181
|
137 |
)
|
|
138 |
|
|
139 |
)
|
|
140 |
)
|
|
141 |
)
|
|
142 |
|
|
143 |
)
|
|
144 |
handles: (Any 0.35195530726257 1.0)
|
|
145 |
)
|
|
146 |
)
|
|
147 |
|
|
148 |
)
|
|
149 |
)
|
|
150 |
! !
|
|
151 |
|
|
152 |
!ObjectModuleInformation class methodsFor:'menu specs'!
|
|
153 |
|
|
154 |
mainMenu
|
|
155 |
"This resource specification was automatically generated
|
|
156 |
by the MenuEditor of ST/X."
|
|
157 |
|
|
158 |
"Do not manually edit this!! If it is corrupted,
|
|
159 |
the MenuEditor may not be able to read the specification."
|
|
160 |
|
|
161 |
"
|
2183
|
162 |
MenuEditor new openOnClass:Tools::ObjectModuleInformation andSelector:#mainMenu
|
|
163 |
(Menu new fromLiteralArrayEncoding:(Tools::ObjectModuleInformation mainMenu)) startUp
|
2181
|
164 |
"
|
|
165 |
|
|
166 |
<resource: #menu>
|
|
167 |
|
|
168 |
^
|
|
169 |
#(Menu
|
|
170 |
(
|
|
171 |
(MenuItem
|
|
172 |
label: 'File'
|
|
173 |
translateLabel: true
|
|
174 |
submenu:
|
|
175 |
(Menu
|
|
176 |
(
|
|
177 |
(MenuItem
|
|
178 |
label: 'Exit'
|
|
179 |
itemValue: closeRequest
|
|
180 |
translateLabel: true
|
|
181 |
)
|
|
182 |
)
|
|
183 |
nil
|
|
184 |
nil
|
|
185 |
)
|
|
186 |
)
|
|
187 |
(MenuItem
|
|
188 |
label: 'View'
|
|
189 |
translateLabel: true
|
|
190 |
submenu:
|
|
191 |
(Menu
|
|
192 |
(
|
|
193 |
(MenuItem
|
|
194 |
label: 'Builtin'
|
|
195 |
translateLabel: true
|
2183
|
196 |
hideMenuOnActivated: false
|
2181
|
197 |
indication: showBuiltIn
|
|
198 |
)
|
|
199 |
(MenuItem
|
|
200 |
label: 'Class Libraries'
|
|
201 |
translateLabel: true
|
2183
|
202 |
hideMenuOnActivated: false
|
2181
|
203 |
indication: showClassLibs
|
|
204 |
)
|
|
205 |
(MenuItem
|
|
206 |
label: 'Methods'
|
|
207 |
translateLabel: true
|
2183
|
208 |
hideMenuOnActivated: false
|
2181
|
209 |
indication: showMethods
|
|
210 |
)
|
|
211 |
(MenuItem
|
|
212 |
label: 'C-Objects'
|
|
213 |
translateLabel: true
|
2183
|
214 |
hideMenuOnActivated: false
|
2181
|
215 |
indication: showCObjects
|
|
216 |
)
|
|
217 |
(MenuItem
|
|
218 |
label: 'Others'
|
|
219 |
translateLabel: true
|
2183
|
220 |
hideMenuOnActivated: false
|
2181
|
221 |
indication: showOthers
|
|
222 |
)
|
|
223 |
)
|
|
224 |
nil
|
|
225 |
nil
|
|
226 |
)
|
|
227 |
)
|
|
228 |
(MenuItem
|
|
229 |
label: 'Module'
|
|
230 |
translateLabel: true
|
|
231 |
submenu:
|
|
232 |
(Menu
|
|
233 |
(
|
|
234 |
(MenuItem
|
2184
|
235 |
enabled: notReadOnly
|
2181
|
236 |
label: 'Unload'
|
|
237 |
translateLabel: true
|
|
238 |
)
|
|
239 |
)
|
|
240 |
nil
|
|
241 |
nil
|
|
242 |
)
|
|
243 |
)
|
|
244 |
(MenuItem
|
|
245 |
label: 'Help'
|
|
246 |
translateLabel: true
|
|
247 |
startGroup: conditionalRight
|
|
248 |
submenu:
|
|
249 |
(Menu
|
|
250 |
(
|
|
251 |
(MenuItem
|
|
252 |
label: 'Documentation'
|
|
253 |
itemValue: openDocumentation
|
|
254 |
translateLabel: true
|
|
255 |
)
|
|
256 |
(MenuItem
|
|
257 |
label: '-'
|
|
258 |
)
|
|
259 |
(MenuItem
|
|
260 |
label: 'About this Application...'
|
|
261 |
itemValue: openAboutThisApplication
|
|
262 |
translateLabel: true
|
|
263 |
)
|
|
264 |
)
|
|
265 |
nil
|
|
266 |
nil
|
|
267 |
)
|
|
268 |
)
|
|
269 |
)
|
|
270 |
nil
|
|
271 |
nil
|
|
272 |
)
|
|
273 |
! !
|
|
274 |
|
|
275 |
!ObjectModuleInformation class methodsFor:'tableColumns specs'!
|
|
276 |
|
|
277 |
tableColumns
|
|
278 |
"This resource specification was automatically generated
|
|
279 |
by the DataSetBuilder of ST/X."
|
|
280 |
|
|
281 |
"Do not manually edit this!! If it is corrupted,
|
|
282 |
the DataSetBuilder may not be able to read the specification."
|
|
283 |
|
|
284 |
"
|
|
285 |
DataSetBuilder new openOnClass:ObjectModuleInformation andSelector:#tableColumns
|
|
286 |
"
|
|
287 |
|
|
288 |
<resource: #tableColumns>
|
|
289 |
|
|
290 |
^#(
|
|
291 |
(DataSetColumnSpec
|
|
292 |
label: 'Name'
|
|
293 |
activeHelpKey: ''
|
|
294 |
labelButtonType: Button
|
|
295 |
width: 0.5
|
|
296 |
model: name
|
|
297 |
canSelect: false
|
|
298 |
)
|
|
299 |
(DataSetColumnSpec
|
|
300 |
label: 'Version'
|
|
301 |
activeHelpKey: ''
|
|
302 |
labelButtonType: Button
|
|
303 |
model: version
|
|
304 |
canSelect: false
|
|
305 |
)
|
|
306 |
(DataSetColumnSpec
|
|
307 |
label: 'Date'
|
|
308 |
activeHelpKey: ''
|
|
309 |
labelButtonType: Button
|
|
310 |
model: date
|
|
311 |
canSelect: false
|
|
312 |
)
|
|
313 |
)
|
|
314 |
|
2183
|
315 |
!
|
|
316 |
|
|
317 |
tableColumnsForSingleInfo
|
|
318 |
"This resource specification was automatically generated
|
|
319 |
by the DataSetBuilder of ST/X."
|
|
320 |
|
|
321 |
"Do not manually edit this!! If it is corrupted,
|
|
322 |
the DataSetBuilder may not be able to read the specification."
|
|
323 |
|
|
324 |
"
|
|
325 |
DataSetBuilder new openOnClass:Tools::ObjectModuleInformation andSelector:#tableColumnsForSingleInfo
|
|
326 |
"
|
|
327 |
|
|
328 |
<resource: #tableColumns>
|
|
329 |
|
|
330 |
^#(
|
|
331 |
(DataSetColumnSpec
|
|
332 |
label: ''
|
|
333 |
activeHelpKey: ''
|
|
334 |
labelButtonType: None
|
|
335 |
width: 0.3
|
|
336 |
model: name
|
|
337 |
canSelect: false
|
|
338 |
)
|
|
339 |
(DataSetColumnSpec
|
|
340 |
label: ''
|
|
341 |
activeHelpKey: ''
|
|
342 |
labelButtonType: None
|
|
343 |
model: value
|
|
344 |
canSelect: false
|
|
345 |
)
|
|
346 |
)
|
|
347 |
|
2181
|
348 |
! !
|
|
349 |
|
|
350 |
!ObjectModuleInformation methodsFor:'aspects'!
|
|
351 |
|
2183
|
352 |
infoTable1ListHolder
|
|
353 |
^ builder valueAspectFor:#'infoTable1ListHolder' initialValue:#()
|
2181
|
354 |
|
2183
|
355 |
"Created: / 05-10-2007 / 12:48:06 / cg"
|
|
356 |
!
|
|
357 |
|
|
358 |
infoTable2ListHolder
|
|
359 |
^ builder valueAspectFor:#'infoTable2ListHolder' initialValue:#()
|
|
360 |
|
|
361 |
"Created: / 05-10-2007 / 12:48:10 / cg"
|
2181
|
362 |
!
|
|
363 |
|
|
364 |
listOfModuleNames
|
|
365 |
listOfModuleNames isNil ifTrue:[
|
|
366 |
listOfModuleNames := List new.
|
|
367 |
].
|
|
368 |
^ listOfModuleNames.
|
|
369 |
|
|
370 |
"Modified: / 05-10-2007 / 10:49:19 / cg"
|
|
371 |
!
|
|
372 |
|
|
373 |
middleLabelHolder
|
|
374 |
^ builder valueAspectFor:#'middleLabelHolder' initialValue:''
|
|
375 |
|
|
376 |
"Created: / 05-10-2007 / 11:05:08 / cg"
|
|
377 |
!
|
|
378 |
|
2184
|
379 |
notReadOnly
|
|
380 |
^ self readOnly not
|
|
381 |
|
|
382 |
"Created: / 05-10-2007 / 13:06:00 / cg"
|
|
383 |
!
|
|
384 |
|
|
385 |
readOnly
|
|
386 |
^ readOnly ? false
|
|
387 |
|
|
388 |
"Created: / 05-10-2007 / 13:05:51 / cg"
|
|
389 |
!
|
|
390 |
|
2181
|
391 |
selectedModuleIndexHolder
|
|
392 |
selectedModuleIndexHolder isNil ifTrue:[
|
|
393 |
selectedModuleIndexHolder := ValueHolder new.
|
|
394 |
selectedModuleIndexHolder onChangeSend:#selectedModuleIndexChanged to:self.
|
|
395 |
].
|
|
396 |
^ selectedModuleIndexHolder.
|
|
397 |
|
|
398 |
"Modified: / 05-10-2007 / 10:51:39 / cg"
|
|
399 |
!
|
|
400 |
|
|
401 |
showBuiltIn
|
2183
|
402 |
showBuiltIn isNil ifTrue:[
|
|
403 |
showBuiltIn := true asValue.
|
|
404 |
showBuiltIn onChangeSend:#filterChanged to:self.
|
|
405 |
].
|
|
406 |
^ showBuiltIn
|
2181
|
407 |
|
2183
|
408 |
"Modified: / 05-10-2007 / 12:43:23 / cg"
|
2181
|
409 |
!
|
|
410 |
|
|
411 |
showCObjects
|
2183
|
412 |
showCObjects isNil ifTrue:[
|
|
413 |
showCObjects := true asValue.
|
|
414 |
showCObjects onChangeSend:#filterChanged to:self.
|
|
415 |
].
|
|
416 |
^ showCObjects
|
2181
|
417 |
|
2183
|
418 |
"Modified: / 05-10-2007 / 12:43:16 / cg"
|
2181
|
419 |
!
|
|
420 |
|
|
421 |
showClassLibs
|
2183
|
422 |
showClassLibs isNil ifTrue:[
|
|
423 |
showClassLibs := true asValue.
|
|
424 |
showClassLibs onChangeSend:#filterChanged to:self.
|
|
425 |
].
|
|
426 |
^ showClassLibs
|
2181
|
427 |
|
2183
|
428 |
"Modified: / 05-10-2007 / 12:43:10 / cg"
|
2181
|
429 |
!
|
|
430 |
|
|
431 |
showMethods
|
2183
|
432 |
showMethods isNil ifTrue:[
|
|
433 |
showMethods := true asValue.
|
|
434 |
showMethods onChangeSend:#filterChanged to:self.
|
|
435 |
].
|
|
436 |
^ showMethods
|
2181
|
437 |
|
2183
|
438 |
"Modified: / 05-10-2007 / 12:43:02 / cg"
|
2181
|
439 |
!
|
|
440 |
|
|
441 |
showOthers
|
2183
|
442 |
showOthers isNil ifTrue:[
|
|
443 |
showOthers := true asValue.
|
|
444 |
showOthers onChangeSend:#filterChanged to:self.
|
|
445 |
].
|
|
446 |
^ showOthers
|
|
447 |
|
|
448 |
"Modified: / 05-10-2007 / 12:42:54 / cg"
|
|
449 |
!
|
2181
|
450 |
|
2183
|
451 |
table1VisibleHolder
|
|
452 |
table1VisibleHolder isNil ifTrue:[
|
|
453 |
table1VisibleHolder := true asValue.
|
|
454 |
].
|
|
455 |
^ table1VisibleHolder.
|
|
456 |
|
|
457 |
"Modified: / 05-10-2007 / 12:53:05 / cg"
|
|
458 |
!
|
|
459 |
|
|
460 |
table2VisibleHolder
|
|
461 |
table2VisibleHolder isNil ifTrue:[
|
|
462 |
table2VisibleHolder := false asValue.
|
|
463 |
].
|
|
464 |
^ table2VisibleHolder.
|
|
465 |
|
|
466 |
"Modified: / 05-10-2007 / 12:53:14 / cg"
|
2181
|
467 |
! !
|
|
468 |
|
|
469 |
!ObjectModuleInformation methodsFor:'change & update'!
|
|
470 |
|
|
471 |
selectedModuleIndexChanged
|
|
472 |
|sel info|
|
|
473 |
|
|
474 |
sel := self selectedModuleIndexHolder value.
|
2183
|
475 |
sel notNil ifTrue:[
|
|
476 |
(self showClassLibs value or:[self showBuiltIn value]) ifTrue:[
|
|
477 |
info := allModules at:sel ifAbsent:nil.
|
|
478 |
].
|
|
479 |
].
|
2181
|
480 |
|
|
481 |
info isNil ifTrue:[
|
|
482 |
"/ selected a method, cObject or unknown
|
|
483 |
self showInfoForNonClassLib:sel.
|
|
484 |
^ self.
|
|
485 |
].
|
|
486 |
info == #VM ifTrue:[
|
|
487 |
"/ selected the pseudo entry for the VM itself
|
|
488 |
self showInfoForVM.
|
|
489 |
^ self.
|
|
490 |
].
|
|
491 |
"/ selected a class-library package
|
|
492 |
self showInfoForClassLib:info.
|
|
493 |
|
2183
|
494 |
"Modified: / 05-10-2007 / 12:56:13 / cg"
|
2181
|
495 |
!
|
|
496 |
|
|
497 |
showInfoForClassLib:info
|
|
498 |
"/ selected a package; fill bottom list with class-info
|
|
499 |
|
2183
|
500 |
|classNames rows|
|
2181
|
501 |
|
|
502 |
self middleLabelHolder value:'Contains Modules:'.
|
|
503 |
|
|
504 |
classNames := info classNames asSortedCollection.
|
|
505 |
classNames := classNames select:[:cName |
|
|
506 |
|cls|
|
|
507 |
|
|
508 |
cls := Smalltalk classNamed:cName.
|
|
509 |
cls isNil ifTrue:[
|
|
510 |
true "a removed class"
|
|
511 |
] ifFalse:[
|
|
512 |
cls isPrivate not
|
|
513 |
].
|
|
514 |
].
|
|
515 |
|
2183
|
516 |
rows := classNames collect:[:cName |
|
2181
|
517 |
|cls entry rev listEntry revisionInfo|
|
|
518 |
|
|
519 |
listEntry := InfoRow new.
|
|
520 |
listEntry name:cName.
|
|
521 |
|
|
522 |
cls := Smalltalk classNamed:cName.
|
|
523 |
cls isNil ifTrue:[
|
2183
|
524 |
(cName endsWith:'_extensions') ifFalse:[
|
|
525 |
listEntry version:'(class removed)'.
|
|
526 |
]
|
2181
|
527 |
] ifFalse:[
|
|
528 |
rev := cls binaryRevision.
|
|
529 |
rev notNil ifTrue:[
|
|
530 |
cls isLoaded ifFalse:[
|
|
531 |
entry := '(stub for: ' , rev.
|
|
532 |
] ifTrue:[
|
|
533 |
entry :='(bin: ' , rev.
|
|
534 |
].
|
|
535 |
cls revision ~= rev ifTrue:[
|
|
536 |
entry := entry , ' / src: ' , (cls revision printString)
|
|
537 |
].
|
|
538 |
entry := entry , ')'.
|
|
539 |
listEntry version:entry
|
|
540 |
] ifFalse:[
|
|
541 |
cls revision notNil ifTrue:[
|
|
542 |
listEntry version:'(overloaded by: ' , cls revision , ')'
|
|
543 |
]
|
|
544 |
].
|
|
545 |
revisionInfo := cls revisionInfo.
|
|
546 |
revisionInfo notNil ifTrue:[
|
|
547 |
listEntry date:(revisionInfo at:#date)
|
|
548 |
].
|
|
549 |
].
|
|
550 |
listEntry
|
|
551 |
].
|
|
552 |
|
2183
|
553 |
self infoTable1ListHolder value:rows.
|
|
554 |
self table1VisibleHolder value:true.
|
|
555 |
self table2VisibleHolder value:false.
|
2181
|
556 |
|
2183
|
557 |
"Modified: / 05-10-2007 / 13:03:56 / cg"
|
2181
|
558 |
!
|
|
559 |
|
|
560 |
showInfoForNonClassLib:sel
|
|
561 |
"/ selected a method, cObject or unknown
|
|
562 |
|
2183
|
563 |
|module fileName list entry|
|
2181
|
564 |
|
|
565 |
module := objectHandles at:sel.
|
|
566 |
fileName := module pathName.
|
|
567 |
|
|
568 |
module isMethodHandle ifTrue:[
|
|
569 |
|method nm entry1 entry2 entry3|
|
|
570 |
|
2183
|
571 |
self middleLabelHolder value:'Compiled Method:'.
|
2181
|
572 |
|
|
573 |
(method := module method) isNil ifTrue:[
|
|
574 |
nm := '** removed **'.
|
|
575 |
] ifFalse:[
|
|
576 |
"/ menu := PopUpMenu
|
|
577 |
"/ labels:#('Inspect' 'Browse')
|
|
578 |
"/ selectors:#(inspect browse).
|
|
579 |
"/ menu actionAt:#inspect put:[ method inspect ].
|
|
580 |
"/ menu actionAt:#browse put:[ |who|
|
|
581 |
"/ who := method who.
|
|
582 |
"/ UserPreferences systemBrowserClass
|
|
583 |
"/ openInClass:(who methodClass)
|
|
584 |
"/ selector:(who methodSelector)
|
|
585 |
"/ ].
|
|
586 |
"/ listView1 middleButtonMenu:menu.
|
|
587 |
|
|
588 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue).
|
|
589 |
].
|
|
590 |
entry1 := InfoRow new.
|
2183
|
591 |
entry1 name:'Compiled method'; value:nm.
|
2181
|
592 |
|
|
593 |
entry2 := InfoRow new.
|
2183
|
594 |
entry2 name:'Path'; value:fileName.
|
2181
|
595 |
|
|
596 |
entry3 := InfoRow new.
|
2183
|
597 |
entry3 name:'Address'; value:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)).
|
2181
|
598 |
|
2183
|
599 |
self infoTable2ListHolder value:(Array with:entry1 with:entry2 with:entry3).
|
|
600 |
self table1VisibleHolder value:false.
|
|
601 |
self table2VisibleHolder value:true.
|
2181
|
602 |
^ self.
|
|
603 |
].
|
|
604 |
|
|
605 |
(module isFunctionObjectHandle
|
|
606 |
and:[module functions notEmpty]) ifTrue:[
|
2183
|
607 |
self middleLabelHolder value:'Functions:'.
|
2181
|
608 |
|
|
609 |
"/ menu := PopUpMenu
|
|
610 |
"/ labels:#('Inspect')
|
|
611 |
"/ selectors:#(inspect).
|
|
612 |
"/ menu actionAt:#inspect put:[ module functions inspect ].
|
|
613 |
"/ listView1 middleButtonMenu:menu.
|
|
614 |
"/
|
|
615 |
list := (module functions select:[:f | f notNil])
|
|
616 |
collect:[:f | |entry|
|
|
617 |
entry := InfoRow new.
|
|
618 |
entry name:(f name asText emphasizeAllWith:(#color->Color blue)).
|
2183
|
619 |
entry value:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)).
|
2181
|
620 |
entry
|
|
621 |
].
|
2183
|
622 |
self infoTable2ListHolder value:list.
|
|
623 |
self table1VisibleHolder value:false.
|
|
624 |
self table2VisibleHolder value:true.
|
2181
|
625 |
^ self.
|
|
626 |
].
|
|
627 |
|
|
628 |
entry := InfoRow new.
|
|
629 |
entry name:'Unknown'.
|
2183
|
630 |
self infoTable2ListHolder value:(Array with:entry).
|
|
631 |
self table1VisibleHolder value:false.
|
|
632 |
self table2VisibleHolder value:true.
|
2181
|
633 |
|
2183
|
634 |
"Modified: / 05-10-2007 / 13:01:33 / cg"
|
2181
|
635 |
!
|
|
636 |
|
|
637 |
showInfoForVM
|
|
638 |
"/ show file versions in lower view.
|
|
639 |
|
|
640 |
|l|
|
|
641 |
|
|
642 |
self middleLabelHolder value:'Contains Modules:'.
|
|
643 |
|
|
644 |
l := (ObjectMemory getVMIdentificationStrings).
|
|
645 |
l := l select:[:entry | entry includesString:'$Header'].
|
|
646 |
l := l select:[:entry | entry includesString:',v'].
|
|
647 |
l := l collect:[:entry |
|
|
648 |
|i1 i2 file revision date listEntry|
|
|
649 |
|
|
650 |
listEntry := InfoRow new.
|
|
651 |
|
|
652 |
i1 := entry indexOfSubCollection:'librun'.
|
|
653 |
i1 ~~ 0 ifTrue:[
|
|
654 |
i2 := entry indexOfSubCollection:',v' startingAt:i1.
|
|
655 |
i2 ~~ 0 ifTrue:[
|
|
656 |
file := entry copyFrom:i1+7 to:(i2-1).
|
|
657 |
listEntry name:file.
|
|
658 |
|
|
659 |
i1 := i2+3.
|
|
660 |
i2 := entry indexOfSeparatorStartingAt:i1.
|
|
661 |
revision := entry copyFrom:i1 to:(i2-1).
|
|
662 |
listEntry version:revision.
|
|
663 |
|
|
664 |
i1 := i2+1.
|
|
665 |
i2 := entry indexOfSeparatorStartingAt:i1.
|
|
666 |
date := entry copyFrom:i1 to:(i2-1).
|
|
667 |
listEntry date:date.
|
|
668 |
].
|
|
669 |
].
|
|
670 |
listEntry.
|
|
671 |
].
|
2183
|
672 |
self infoTable1ListHolder value:l.
|
|
673 |
self table1VisibleHolder value:true.
|
|
674 |
self table2VisibleHolder value:false.
|
2181
|
675 |
|
|
676 |
"/ readOnly ifFalse:[
|
|
677 |
"/ unloadButton disable.
|
|
678 |
"/ unloadAndRemoveButton disable.
|
|
679 |
"/ ]
|
|
680 |
|
2183
|
681 |
"Modified: / 05-10-2007 / 12:53:44 / cg"
|
2181
|
682 |
! !
|
|
683 |
|
|
684 |
!ObjectModuleInformation methodsFor:'initialization'!
|
|
685 |
|
|
686 |
postBuildWith:aBuilder
|
|
687 |
|canDoIt|
|
|
688 |
|
|
689 |
super postBuildWith:aBuilder.
|
|
690 |
|
|
691 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
|
|
692 |
self showBuiltIn value:canDoIt.
|
|
693 |
self showCObjects value:canDoIt.
|
|
694 |
self showClassLibs value:canDoIt.
|
|
695 |
self showMethods value:canDoIt.
|
|
696 |
self showOthers value:canDoIt.
|
|
697 |
|
|
698 |
self updateModuleList
|
|
699 |
|
|
700 |
"Created: / 05-10-2007 / 10:50:27 / cg"
|
|
701 |
! !
|
|
702 |
|
|
703 |
!ObjectModuleInformation methodsFor:'menu actions'!
|
|
704 |
|
|
705 |
openDocumentation
|
2184
|
706 |
self openHTMLDocument: 'tools/misc/TOP.html#MODULEINFO'
|
2181
|
707 |
|
2184
|
708 |
"Modified: / 05-10-2007 / 13:11:45 / cg"
|
2181
|
709 |
! !
|
|
710 |
|
|
711 |
!ObjectModuleInformation methodsFor:'private'!
|
|
712 |
|
2183
|
713 |
filterChanged
|
|
714 |
self updateModuleList
|
|
715 |
|
|
716 |
"Created: / 05-10-2007 / 12:43:36 / cg"
|
|
717 |
!
|
|
718 |
|
2181
|
719 |
updateModuleList
|
|
720 |
|showClassLibs showBuiltIn showMethods showCObjects showOthers
|
|
721 |
listOfModuleNames allObjects handles|
|
|
722 |
|
|
723 |
showClassLibs := self showClassLibs value.
|
|
724 |
showBuiltIn := self showBuiltIn value.
|
|
725 |
showMethods := self showMethods value.
|
|
726 |
showCObjects := self showCObjects value.
|
|
727 |
showOthers := self showOthers value.
|
|
728 |
|
|
729 |
listOfModuleNames := OrderedCollection new.
|
|
730 |
handles := OrderedCollection new.
|
|
731 |
|
|
732 |
allObjects := ObjectFileLoader loadedObjectHandles.
|
|
733 |
|
|
734 |
(showClassLibs or:[showBuiltIn]) ifTrue:[
|
|
735 |
|moduleNames|
|
|
736 |
|
|
737 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
|
|
738 |
(showBuiltIn and:[showClassLibs]) ifFalse:[
|
|
739 |
allModules := allModules select:
|
|
740 |
[:i |
|
|
741 |
|wantToSee|
|
|
742 |
|
|
743 |
wantToSee := i dynamic.
|
|
744 |
showBuiltIn ifTrue:[
|
|
745 |
wantToSee := wantToSee not
|
|
746 |
].
|
|
747 |
wantToSee
|
|
748 |
]
|
|
749 |
].
|
|
750 |
|
|
751 |
"/ sorting by reverse id brings newest ones to the top (a side effect)
|
|
752 |
allModules sort:[:a :b | (a id) > (b id)].
|
|
753 |
moduleNames := allModules collect:[:entry | entry name].
|
|
754 |
listOfModuleNames addAll:moduleNames.
|
|
755 |
handles addAll:allModules.
|
|
756 |
].
|
|
757 |
|
|
758 |
showMethods ifTrue:[
|
|
759 |
|methodObjects methodNames|
|
|
760 |
|
|
761 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
|
|
762 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
|
|
763 |
'compiled method - removed' " , ' (in ' , mH pathName , ')' "
|
|
764 |
] ifFalse:[
|
|
765 |
'compiled method ' , mH method whoString " , ' (in ' , mH pathName , ')' "
|
|
766 |
].
|
|
767 |
].
|
|
768 |
listOfModuleNames addAll:methodNames.
|
|
769 |
handles addAll:methodObjects.
|
|
770 |
].
|
|
771 |
|
|
772 |
showCObjects ifTrue:[
|
|
773 |
|cObjects cObjectNames|
|
|
774 |
|
|
775 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray.
|
|
776 |
cObjectNames := cObjects collect:[:entry | entry pathName].
|
|
777 |
listOfModuleNames addAll:cObjectNames.
|
|
778 |
handles addAll:cObjects.
|
|
779 |
].
|
|
780 |
|
|
781 |
showOthers ifTrue:[
|
|
782 |
|otherObjects otherObjectNames|
|
|
783 |
|
|
784 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle
|
|
785 |
or:[h isMethodHandle
|
|
786 |
or:[h isClassLibHandle]]) not]) asArray.
|
|
787 |
otherObjectNames := otherObjects collect:[:entry | entry pathName].
|
|
788 |
listOfModuleNames addAll:otherObjectNames.
|
|
789 |
handles addAll:otherObjects.
|
|
790 |
].
|
|
791 |
|
|
792 |
showBuiltIn ifTrue:[
|
|
793 |
listOfModuleNames addFirst:'VM'.
|
|
794 |
handles addFirst:#VM.
|
|
795 |
allModules addFirst:#VM.
|
|
796 |
].
|
|
797 |
|
|
798 |
self listOfModuleNames contents:listOfModuleNames.
|
2183
|
799 |
objectHandles := handles.
|
2181
|
800 |
|
2183
|
801 |
"Modified: / 05-10-2007 / 12:45:37 / cg"
|
2181
|
802 |
! !
|
|
803 |
|
|
804 |
!ObjectModuleInformation::InfoRow methodsFor:'accessing'!
|
|
805 |
|
|
806 |
date
|
|
807 |
^ date
|
|
808 |
!
|
|
809 |
|
|
810 |
date:something
|
|
811 |
date := something.
|
|
812 |
!
|
|
813 |
|
|
814 |
name
|
|
815 |
^ name
|
|
816 |
!
|
|
817 |
|
|
818 |
name:something
|
|
819 |
name := something.
|
|
820 |
!
|
|
821 |
|
|
822 |
name:nameArg version:versionArg date:dateArg
|
|
823 |
name := nameArg.
|
|
824 |
version := versionArg.
|
|
825 |
date := dateArg.
|
|
826 |
!
|
|
827 |
|
2183
|
828 |
value
|
|
829 |
^ value
|
|
830 |
!
|
|
831 |
|
|
832 |
value:something
|
|
833 |
value := something.
|
|
834 |
!
|
|
835 |
|
2181
|
836 |
version
|
|
837 |
^ version
|
|
838 |
!
|
|
839 |
|
|
840 |
version:something
|
|
841 |
version := something.
|
|
842 |
! !
|
|
843 |
|
|
844 |
!ObjectModuleInformation class methodsFor:'documentation'!
|
|
845 |
|
|
846 |
version
|
|
847 |
^ '$Header$'
|
|
848 |
! !
|