Search in sources :

Example 1 with ILibraryDependentCore

use of com.ibm.j9ddr.corereaders.ILibraryDependentCore in project openj9 by eclipse.

the class NativeLibrariesCommand method getExeFromDDR.

// we can use the hint mechanism in DTFJ to work out the exe location for elf cores with very long path names
private void getExeFromDDR(Context ctx, PrintStream out) {
    try {
        ICore core = ctx.process.getAddressSpace().getCore();
        if (ILibraryDependentCore.class.isAssignableFrom(core.getClass())) {
            ILibraryDependentCore ldcore = (ILibraryDependentCore) core;
            J9DDRImageProcess proc = new J9DDRImageProcess(ctx.process);
            ImageModule exe = proc.getExecutable();
            out.println("exe = " + exe.getName());
            ldcore.executablePathHint(exe.getName());
        }
    } catch (Exception e) {
        out.println("Could not determine EXE name using DDR : " + e.getMessage());
    }
}
Also used : ILibraryDependentCore(com.ibm.j9ddr.corereaders.ILibraryDependentCore) J9DDRImageProcess(com.ibm.j9ddr.view.dtfj.image.J9DDRImageProcess) ICore(com.ibm.j9ddr.corereaders.ICore) ImageModule(com.ibm.dtfj.image.ImageModule) DDRInteractiveCommandException(com.ibm.j9ddr.tools.ddrinteractive.DDRInteractiveCommandException) IOException(java.io.IOException) CorruptDataException(com.ibm.j9ddr.CorruptDataException)

Aggregations

ImageModule (com.ibm.dtfj.image.ImageModule)1 CorruptDataException (com.ibm.j9ddr.CorruptDataException)1 ICore (com.ibm.j9ddr.corereaders.ICore)1 ILibraryDependentCore (com.ibm.j9ddr.corereaders.ILibraryDependentCore)1 DDRInteractiveCommandException (com.ibm.j9ddr.tools.ddrinteractive.DDRInteractiveCommandException)1 J9DDRImageProcess (com.ibm.j9ddr.view.dtfj.image.J9DDRImageProcess)1 IOException (java.io.IOException)1