Interface IImageProcessBuilder
- All Known Implementing Classes:
ImageProcessBuilder
public interface IImageProcessBuilder
Factory for building a com.ibm.dtfj.image.ImageProcess
Each Image Process factory must have at least one Java runtime factory that builds
Basic support for multiple java runtime factories is present.
Each Image Process factory must have at least one Java runtime factory that builds
JavaRuntime
Basic support for multiple java runtime factories is present.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEnvironmentVariable
(String name, String value) Add environment variablesaddImageStackFrame
(long nativeThreadID, String name, long baseAddress, long procAddress) Adds a stack frame to an image threadaddImageStackSection
(ImageThread thread, ImageSection section) Adds a stack section to an image threadaddImageThread
(long nativeThreadID, long systemThreadID, Properties properties) Adds a com.ibm.dtfj.image.ImageThread to the Image process being built.addLibrary
(String name) Will add an com.ibm.dtfj.image.ImageModule for the specified library name.void
addProperty
(ImageModule library, String name, String value) Adds/updates a property for the libraryaddRoutine
(ImageModule library, String name, long address) Add a routine to a moduleGenerates a new java runtime factory.At least one java runtime factory must be associated with an image process factory.getJavaRuntimeBuilder
(String builderID) void
setCommandLine
(String cmdLine) Set command line if available in javacore.void
setCurrentThreadID
(long imageThreadID) Sets the current threadvoid
setExecutable
(ImageModule execMod) Sets the module as the process executablevoid
Sets the id of the processvoid
setPointerSize
(int size) Valid values: 64, 32, or 31 (s390) bits.void
setRegisters
(Map regs) Set registers if available in javacore.void
setSignal
(int signal) Set signal value if available in javacore.
-
Method Details
-
getCurrentJavaRuntimeBuilder
IJavaRuntimeBuilder getCurrentJavaRuntimeBuilder()At least one java runtime factory must be associated with an image process factory. In multiple runtime environments, the last java runtime generated for this image process may be considered the current java runtime factory.- Returns:
- current java runtime factory. Must never be null.
-
getJavaRuntimeBuilder
- Parameters:
builderID
- unique id that looks up a java runtime factory- Returns:
- found java runtime factory, or null.
-
addLibrary
Will add an com.ibm.dtfj.image.ImageModule for the specified library name. If the image module already exists, it will return the latter. A null library name returns a null ImageModule.- Parameters:
name
- shared library to be added to the com.ibm.dtfj.image.ImageProcess being built by this image process factory.- Returns:
- added/found ImageModule, or null if not added (if the library name isnull)
-
addImageThread
ImageThread addImageThread(long nativeThreadID, long systemThreadID, Properties properties) throws BuilderFailureException Adds a com.ibm.dtfj.image.ImageThread to the Image process being built. If the arguments are invalid and a valid ImageThread cannot be constructed, error occurs.
If the thread already exists, it will populate any missing data into the image thread, and return the latter.
If the thread does not exist, it will create a new ImageThread and register it with the image process being built.- Parameters:
nativeThreadID
-systemThreadID
-properties
-- Returns:
- generated ImageThread. Must not be null. If a valid image thread cannot be created or found, throw exception.
- Throws:
BuilderFailureException
- if valid image thread was not created or found/updated.
-
addImageStackSection
Adds a stack section to an image thread- Parameters:
thread
-section
- the area in memory used for the stack- Returns:
-
addImageStackFrame
ImageStackFrame addImageStackFrame(long nativeThreadID, String name, long baseAddress, long procAddress) Adds a stack frame to an image thread- Parameters:
nativeThreadID
-name
- of routinethe
- address of the framethe
- address of the code- Returns:
-
generateJavaRuntimeBuilder
Generates a new java runtime factory. If generation fails, an exception is thrown. If the java runtime factory already exists, it returns the latter.- Parameters:
id
- unique id to identify a new java runtime factory to be generated- Returns:
- generated java runtime factory.
- Throws:
BuilderFailureException
- if java runtime factory is not created.
-
setPointerSize
void setPointerSize(int size) Valid values: 64, 32, or 31 (s390) bits.- Parameters:
pointer
- size for this javacore. Usually parsed or computed from the data found in the javacore.
-
setSignal
void setSignal(int signal) Set signal value if available in javacore.- Parameters:
generic
- signal value.
-
setCommandLine
Set command line if available in javacore.- Parameters:
command
- line string
-
setRegisters
Set registers if available in javacore.- Parameters:
regs
- Map of registers
-
addEnvironmentVariable
-
addRoutine
Add a routine to a module- Parameters:
library
-name
-address
-- Returns:
-
setExecutable
Sets the module as the process executable- Parameters:
execMod
-
-
setID
-
setCurrentThreadID
void setCurrentThreadID(long imageThreadID) Sets the current thread- Parameters:
imageThreadID
-
-
addProperty
Adds/updates a property for the library- Parameters:
library
- the modulename
- the property namevalue
- the property value
-