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