eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ObjectFileHandle':



Class: ObjectFileHandle



rev: 1.46 date: 2019/06/28 07:06:06
user: cg
file: ObjectFileHandle.st directory: libcomp
module: stx stc-classLibrary: libcomp
Claus Gittinger


not for public use - used by ObjectFileLoader to keep track of loaded modules,
associating objectFile names and moduleIDs to classes/methods.
This is required to be able to fixup classes, methods and function references
when an image is restarted and the dynamic objects are reloaded.

Related information:


Class protocol:

change & update
o  preSnapshot
about to write a snapshot.
Mark all the current instances as being snapshotted

Instance protocol:

o  classes
return the classes

o  classes: aCollectionOfClasses
set the classes collection

o  functions
return the functions which were already extracted from the module.

o  makeClassLibHandle
make this a classLibHandle - must be done manually when init failed for proper de-registration

o  method
return the method (or nil, if I am not a method-file handle)

o  method: something
set the method

o  methods
return the collection of methods (or an empty collection,
if I am not a method-file handle)

o  moduleID
return moduleID

o  moduleID: something
set moduleID

o  pathName
return pathName

o  pathName: something
set pathName

o  snapshot
return the value of the instance variable 'snapshot' (automatically generated)

o  snapshot: something
set the value of the instance variable 'snapshot' (automatically generated)

o  sysHandle1
return sysHandle1

o  sysHandle1: something
set sysHandle1

o  sysHandle2
return sysHandle2

o  sysHandle2: something
set sysHandle2

o  removeConnectedObjects
remove the smalltalk objects from the system that are connected
with this ObjectFileHandle

o  removeUnusedObjectFile
remove the object file,
but only if we are sure, that it is not referenced by a snapshot.

o  unload
unload the object file represented by me

change & update
o  update: something with: aParameter from: changedObject
my method/class object was collected - unload the underlying objectfile

o  postCopy
flush module handles of the copy

o  postDeepCopy

printing & storing
o  printOn: aStream
append a printed representation of the receiver to aStream

o  getFunction: aString
return a function object for an entry in the module represented by the receiver.

o  getFunctionAddress: aString into: anExternalFunction
fill the code address of the external function named aString into anExternalFunction.
Returns the address, or nil.

o  hasUndefinedSymbols
return true, if the module has any undefined symbols.
The only system, which allows modules with undefined symbols to be
loaded is (currently) the linux a.out version.

o  isClassLibHandle
return true, if I am a handle for a class library

o  isFunctionObjectHandle
return true, if I am a handle for a c-code (or other) function object file

o  isMethodHandle
return true, if I am a handle for a single compiled method

o  isObsolete
return true, if my clases/method has already been removed from
the image. I.e. if the object file can be unloaded without danger.

o  isUnknownHandle
return true, if it is not (yet) known, what type of
file is represented by the handle. (i.e. when loaded, but not yet

o  package
retrieve the packageID of the class-library handle

usage example(s):

sigh - for now, the package must be extracted from the first classes/methods

usage example(s):


ST/X; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 17 Aug 2022 23:21:16 GMT