GP-2668 - Small tweaks to xrefs table

This commit is contained in:
dragonmacher 2023-01-03 18:56:40 -05:00
parent ae77eb9f3c
commit b73c9972ef
4 changed files with 50 additions and 94 deletions

View file

@ -258,6 +258,36 @@ public abstract class RefType {
private byte type;
private String name;
/**
* Returns an easy to read display string for this ref type.
* @return the string
*/
public String getDisplayString() {
if (this == RefType.THUNK) {
return "Thunk";
}
if (isRead() && isWrite()) {
return "RW";
}
if (isRead()) {
return "Read";
}
if (isWrite()) {
return "Write";
}
if (isData()) {
return "Data";
}
if (isCall()) {
return "Call";
}
if (isJump()) {
return (isConditional() ? "Branch" : "Jump");
}
return "Unknown";
}
protected RefType(byte type, String name) {
this.type = type;
this.name = name;