use of com.ibm.j9ddr.vm29.pointer.WideSelfRelativePointer in project openj9 by eclipse.
the class J9SRPFormatter method format.
@Override
public FormatWalkResult format(String name, String type, String declaredType, int thisTypeCode, long address, PrintStream out, Context context, IStructureFormatter structureFormatter) throws CorruptDataException {
if (thisTypeCode != typeCode) {
return FormatWalkResult.KEEP_WALKING;
}
VoidPointer targetAddress = VoidPointer.NULL;
/* Figure out the resulting address */
if (wide) {
WideSelfRelativePointer s = WideSelfRelativePointer.cast(address);
targetAddress = s.get();
} else {
SelfRelativePointer s = SelfRelativePointer.cast(address);
targetAddress = s.get();
}
if (type.contains("(")) {
/* Strip off one layer of SRP, work out the SRP address, and re-format it */
type = stripSRP(type);
structureFormatter.formatField(name, type, type, targetAddress.getAddress(), out, context);
} else {
/* An SRP without the final type specified */
out.print("!j9x ");
out.print(targetAddress.getHexAddress());
}
return FormatWalkResult.STOP_WALKING;
}
Aggregations