java.lang.Object
com.ibm.j9ddr.tools.ddrinteractive.DDRInteractive
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass -
Constructor Summary
ConstructorsConstructorDescriptionDDRInteractive(IProcess proc, IVMData vmData, PrintStream out) DDRInteractive(Object obj, PrintStream out) Construct DDR from J9DDRImage, ICore or IProcessDDRInteractive(String path, CommandReader commandReader, PrintStream out) Start DDRDDRInteractive(String path, PrintStream out) Start DDR.DDRInteractive(List<Object> dtfjcontexts, PrintStream out) Construct DDR from DTFJ contexts, this prevents both the DTFJ view such as jdmpview from scanning a core file, followed by a second scan by DDR interactive. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the core file and libraries opened by the core reader, and release any resourcesvoidexecute(CommandParser command) voidObject[]Get the current context that is being operated on.static StringgetPath()This function returns the path DDR interactive was invoked against.static voidvoidprocessLine(String line) Have the underlying command reader process a given linevoidrun()Execute DDR inside a thread that was started by a debugger (!voidUsed by external clients to set the input stream.voidvoidstartDDR()
-
Constructor Details
-
DDRInteractive
Construct DDR from J9DDRImage, ICore or IProcess- Parameters:
obj- Core file.out- result output stream.- Throws:
Exception
-
DDRInteractive
- Throws:
Exception
-
DDRInteractive
Construct DDR from DTFJ contexts, this prevents both the DTFJ view such as jdmpview from scanning a core file, followed by a second scan by DDR interactive. It also ensures that a tool can know which contexts point to the same VM. Uses reflection to avoid a binding to the DTFJ jars which allows DDR to be invoked independently- Parameters:
out- result output stream.obj-- Throws:
Exception
-
DDRInteractive
Start DDR. Read command from standard input.- Parameters:
path- path to core file.out- result output stream.- Throws:
Exception
-
DDRInteractive
Start DDR- Parameters:
path- core file location on disk.commandReader- user input.out- result output stream.- Throws:
Exception
-
-
Method Details
-
main
- Parameters:
args-- Throws:
Exception
-
getCommandNames
-
getCurrentContext
Get the current context that is being operated on. This is used by external applications such as Eclipse which are providing their own command parsers- Returns:
- the current context
-
startDDR
- Throws:
Exception
-
setInputStream
Used by external clients to set the input stream.- Parameters:
in- the new stream to read commands from
-
processLine
Have the underlying command reader process a given line- Parameters:
line- command line to process- Throws:
Exception- re-throw any exceptions
-
showContexts
public void showContexts() -
run
public void run()Execute DDR inside a thread that was started by a debugger (!startddr). -
execute
-
execute
-
getStructuresForCurrentContext
-
getPath
This function returns the path DDR interactive was invoked against. This allows commands to obtain the file name. ( A single file could contain multiple address spaces/processes so this cannot be usefully stored on IProcess or IContext. ) External tools may create more than one instance of DDRInteractive at the same time. This is a static property so allow it to be changed by external tools. The path can set at startup or via the com.ibm.j9ddr.tools.ddrinteractive.filepath system property- Returns:
- the path to the file DDRInteractive was launched against or null if a path wasn't specified.
-
close
Close the core file and libraries opened by the core reader, and release any resources- Throws:
Exception
-