- java.lang.Object
-
- com.ibm.j9ddr.tools.ddrinteractive.DDRInteractive
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DDRInteractive.ContextCommand
class
DDRInteractive.J9HelpCommand
-
Constructor Summary
Constructors Constructor Description DDRInteractive(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the core file and libraries opened by the core reader, and release any resourcesvoid
execute(CommandParser command)
void
execute(String command, String[] arguments)
Object[]
getCommandNames()
Context
getCurrentContext()
Get the current context that is being operated on.static String
getPath()
This function returns the path DDR interactive was invoked against.Collection
getStructuresForCurrentContext()
static void
main(String[] args)
void
processLine(String line)
Have the underlying command reader process a given linevoid
run()
Execute DDR inside a thread that was started by a debugger (!void
setInputStream(InputStream in)
Used by external clients to set the input stream.void
showContexts()
void
startDDR()
-
-
-
Constructor Detail
-
DDRInteractive
public DDRInteractive(Object obj, PrintStream out) throws Exception
Construct DDR from J9DDRImage, ICore or IProcess- Parameters:
obj
- Core file.out
- result output stream.- Throws:
Exception
-
DDRInteractive
public DDRInteractive(IProcess proc, IVMData vmData, PrintStream out) throws Exception
- Throws:
Exception
-
DDRInteractive
public DDRInteractive(List<Object> dtfjcontexts, PrintStream out) throws Exception
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:
obj
-out
- result output stream.- Throws:
Exception
-
DDRInteractive
public DDRInteractive(String path, PrintStream out) throws Exception
Start DDR. Read command from standard input.- Parameters:
path
- path to core file.out
- result output stream.- Throws:
Exception
-
DDRInteractive
public DDRInteractive(String path, CommandReader commandReader, PrintStream out) throws Exception
Start DDR- Parameters:
path
- core file location on disk.commandReader
- user input.out
- result output stream.- Throws:
Exception
-
-
Method Detail
-
getCommandNames
public Object[] getCommandNames()
-
getCurrentContext
public Context 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
-
setInputStream
public void setInputStream(InputStream in)
Used by external clients to set the input stream.- Parameters:
in
- the new stream to read commands from
-
processLine
public void processLine(String line) throws Exception
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).- Specified by:
run
in interfaceRunnable
- See Also:
Thread.run()
-
execute
public void execute(CommandParser command)
-
getStructuresForCurrentContext
public Collection getStructuresForCurrentContext()
-
getPath
public static String 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.
-
-