mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2668 - Small tweaks to xrefs table
This commit is contained in:
parent
ae77eb9f3c
commit
b73c9972ef
4 changed files with 50 additions and 94 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue