- java.lang.Object
-
- com.ibm.dtfj.corereaders.zos.le.Dll
-
public class Dll extends Object
This class represents a DLL (Dynamically Linked Library).
-
-
Constructor Summary
Constructors Constructor Description Dll(long address, AddressSpace space)
Constructs a new Dll given the address of the DLCB (DLL Control Block) structure.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addFunction(AddressSpace space, String name, DllFunction function)
Add the givenDllFunction
to the set of functions for this AddressSpace.static DllFunction
getFunction(AddressSpace space, String name)
From the given AddressSpace returns the namedDllFunction
(or null if it can't be found).DllFunction
getFunction(String name)
Returns the namedDllFunction
(or null if it can't be found).DllFunction[]
getFunctions()
Returns an array of theDllFunction
s belonging to this DLLlong
getLoadAddress()
Returns the load address for this DLL.String
getName()
Returns the name of this DLL.Dll
getNext()
Returns the next Dll in the chain (or null if none).DllVariable
getVariable(String name)
Returns the namedDllVariable
(or null if it can't be found).DllVariable[]
getVariables()
Returns an array of theDllVariable
s belonging to this DLLlong
getWsa()
Returns the address of the WSA (Writable Static Area) for this DLL.
-
-
-
Constructor Detail
-
Dll
public Dll(long address, AddressSpace space)
Constructs a new Dll given the address of the DLCB (DLL Control Block) structure. The normal way for a user to get hold of an instance though would be viaEdb.getFirstDll()
.
-
-
Method Detail
-
getName
public String getName() throws IOException
Returns the name of this DLL.- Throws:
IOException
-
getLoadAddress
public long getLoadAddress()
Returns the load address for this DLL.
-
getWsa
public long getWsa() throws IOException
Returns the address of the WSA (Writable Static Area) for this DLL.- Throws:
IOException
-
getNext
public Dll getNext() throws IOException
Returns the next Dll in the chain (or null if none).- Throws:
IOException
-
getVariable
public DllVariable getVariable(String name) throws IOException
Returns the namedDllVariable
(or null if it can't be found).- Throws:
IOException
-
getVariables
public DllVariable[] getVariables() throws IOException
Returns an array of theDllVariable
s belonging to this DLL- Throws:
IOException
-
getFunction
public DllFunction getFunction(String name) throws IOException
Returns the namedDllFunction
(or null if it can't be found).- Throws:
IOException
-
getFunctions
public DllFunction[] getFunctions() throws IOException
Returns an array of theDllFunction
s belonging to this DLL- Throws:
IOException
-
getFunction
public static DllFunction getFunction(AddressSpace space, String name) throws IOException
From the given AddressSpace returns the namedDllFunction
(or null if it can't be found). This caches previously found functions for speed. Note that this searches all the Dlls and returns the first match it finds so take care if multiple Dlls declare the same name!- Parameters:
space
- the AddressSpace to searchname
- the name of the required function- Throws:
IOException
-
addFunction
public static void addFunction(AddressSpace space, String name, DllFunction function)
Add the givenDllFunction
to the set of functions for this AddressSpace. This can be used to add fake entries, eg seecom.ibm.dtfj.corereaders.zos.le.FunctionEmulator#recordCalledFunctions
-
-