use of com.ibm.j9ddr.corereaders.ILibraryResolver in project openj9 by eclipse.
the class AIXDumpReader method executablePathHint.
// Passback of executable path. If we couldn't load the executable the first time, try again now.
public void executablePathHint(String path) {
if (_executable instanceof MissingFileModule) {
// Check the hint points at the same file name
try {
if (!getFileName(_executable.getName()).equals(getFileName(path))) {
return;
}
} catch (CorruptDataException e1) {
return;
}
// Remove placeholder memory source
_process.removeMemorySource(_executableTextSection);
// Remember the current placeholder in case this one fails too
IModule currentExecutable = _executable;
IMemorySource currentExecutableTextSection = _executableTextSection;
ILibraryResolver resolver = LibraryResolverFactory.getResolverForCoreFile(this.coreFile);
IProcess proc = getProcess();
try {
seek(_loaderOffset);
readInt();
// Ignore flags
readLoaderInfoFlags();
// Ignore dataOffset
readAddress();
long textVirtualAddress = readAddress();
long textSize = readAddress();
long dataVirtualAddress = readAddress();
long dataSize = readAddress();
// Disregard fileName from core
readString();
String fileName = path;
String objectName = readString();
String moduleName = fileName;
if (0 < objectName.length()) {
moduleName += "(" + objectName + ")";
}
loadModule(resolver, proc, textVirtualAddress, textSize, dataVirtualAddress, dataSize, fileName, objectName, moduleName, true);
} catch (IOException e) {
// TODO handle
}
// If the executable is still a MissingFileModule, the hint didn't work
if (_executable instanceof MissingFileModule) {
_process.removeMemorySource(_executableTextSection);
_executableTextSection = currentExecutableTextSection;
_process.addMemorySource(_executableTextSection);
_executable = currentExecutable;
}
}
}
Aggregations