summaryrefslogtreecommitdiff
path: root/python/mediumlevelil.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mediumlevelil.py')
-rw-r--r--python/mediumlevelil.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index 31c4d363..e8e020ea 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -26,7 +26,7 @@ from dataclasses import dataclass
# Binary Ninja components
from . import _binaryninjacore as core
-from .enums import MediumLevelILOperation, ILBranchDependence, DataFlowQueryOption, FunctionGraphType, DeadStoreElimination, ILInstructionAttribute
+from .enums import MediumLevelILOperation, ILBranchDependence, DataFlowQueryOption, FunctionGraphType, DeadStoreElimination, ILInstructionAttribute, StringType
from . import basicblock
from . import function
from . import types
@@ -1230,6 +1230,10 @@ class MediumLevelILConstPtr(MediumLevelILConstBase):
def detailed_operands(self) -> List[Tuple[str, MediumLevelILOperandType, str]]:
return [("constant", self.constant, "int")]
+ @property
+ def string(self) -> Optional[Tuple[str, StringType]]:
+ return self.function.view.check_for_string_annotation_type(self.constant, True, True, 0)
+
@dataclass(frozen=True, repr=False, eq=False)
class MediumLevelILFloatConst(MediumLevelILConstBase, FloatingPoint):