- java.lang.Object
-
- com.ibm.j9ddr.corereaders.tdump.zebedee.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 voidaddFunction(AddressSpace space, String name, DllFunction function)Add the givenDllFunctionto the set of functions for this AddressSpace.static DllFunctiongetFunction(AddressSpace space, String name)From the given AddressSpace returns the namedDllFunction(or null if it can't be found).DllFunctiongetFunction(String name)Returns the namedDllFunction(or null if it can't be found).DllFunction[]getFunctions()Returns an array of theDllFunctions belonging to this DLLlonggetLoadAddress()Returns the load address for this DLL.StringgetName()Returns the name of this DLL.DllgetNext()Returns the next Dll in the chain (or null if none).AddressSpacegetSpace()The AddressSpace we belong toDllVariablegetVariable(String name)Returns the namedDllVariable(or null if it can't be found).DllVariable[]getVariables()Returns an array of theDllVariables belonging to this DLLlonggetWsa()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
-
getSpace
public AddressSpace getSpace()
The AddressSpace we belong to
-
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 IOExceptionReturns 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 theDllVariables 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 theDllFunctions 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 givenDllFunctionto the set of functions for this AddressSpace. This can be used to add fake entries, eg seeFunctionEmulator.recordCalledFunctions()
-
-