Skip to content

Ghidra is a software reverse engineering (SRE) framework

Added DYNAMIC flag to toString for OperandType

alex-bellon7cc70cd5e806
diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java
index 75fe4c01ed..9ed542cf73 100644
--- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java
+++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java
@@ -341,6 +341,16 @@ public final class OperandType {
public static boolean isCoProcessor(int operandType) {
return (operandType & COP) != 0;
}
+
+ /**
+ * check the DYNAMIC flag.
+ * @param operandType the bit field to examine.
+ *
+ * @return true if the DYNAMIC flag is set.
+ */
+ public static boolean isDynamic(int operandType) {
+ return (operandType & DYNAMIC) != 0;
+ }
/**
* check if both a scalar and an address
@@ -458,6 +468,10 @@ public final class OperandType {
append(buf, "COP ");
}
+ if (isDynamic(operandType)) {
+ append(buf, "DYN ");
+ }
+
return buf.toString();
}