use of com.ibm.j9ddr.blobs.IBlobFactory.Platforms in project openj9 by eclipse.
the class VMDataFactory method getBlobFromLibrary.
/**
* Try and determine a blob by scanning the process.
* This can be very expensive and should be the last option tried.
*
* @param process process to scan
* @return a blob if one can be identified, null if not
*/
private static ImageInputStream getBlobFromLibrary(IProcess process, StructureHeader header) throws JVMNotFoundException {
try {
if (header != null) {
IBlobFactory factory = BlobFactory.getInstance();
Platforms platform = null;
switch(process.getPlatform()) {
case LINUX:
platform = (process.bytesPerPointer() == 4) ? Platforms.xi32 : Platforms.xa64;
break;
default:
break;
}
if (platform != null) {
int[] data = header.getBlobVersionArray();
return factory.getBlob(platform, header.getPackageID(), data[2], data[1], data[0]);
}
}
return null;
} catch (Exception e) {
throw new JVMNotFoundException(process, e);
}
}
Aggregations