use of com.ibm.j9ddr.corereaders.memory.IDetailedMemoryRange in project openj9 by eclipse.
the class ProgramHeaderEntry method asMemorySource.
IMemorySource asMemorySource() {
IMemorySource source = null;
if (!isEmpty()) {
boolean isExecutable = (_flags & PF_X) != 0;
source = new ELFMemorySource(virtualAddress, memorySize, fileOffset, reader);
} else {
source = new UnbackedMemorySource(virtualAddress, memorySize, "ELF ProgramHeaderEntry storage declared but data not included");
}
Properties memoryProps = ((IDetailedMemoryRange) source).getProperties();
memoryProps.setProperty("IN_CORE", "" + (!isEmpty()));
if ((_flags & PF_W) != 0) {
memoryProps.setProperty(IDetailedMemoryRange.WRITABLE, Boolean.TRUE.toString());
}
if ((_flags & PF_X) != 0) {
memoryProps.setProperty(IDetailedMemoryRange.EXECUTABLE, Boolean.TRUE.toString());
}
if ((_flags & PF_R) != 0) {
memoryProps.setProperty(IDetailedMemoryRange.READABLE, Boolean.TRUE.toString());
}
return source;
}
Aggregations