diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-07-22 21:53:19 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-07-22 21:53:19 -0400 |
| commit | c80542f9836e38563ca7a4efc87916959c4a0c73 (patch) | |
| tree | e2fe41b9661e2d2c6e6ce28bcbea90d124b10ba8 /python | |
| parent | eb36e3217dfce3d8738a135093110e7406c88449 (diff) | |
Add Variable.is_parameter_variable
Diffstat (limited to 'python')
| -rw-r--r-- | python/variable.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/variable.py b/python/variable.py index 1ea4728e..ee96cb46 100644 --- a/python/variable.py +++ b/python/variable.py @@ -834,6 +834,11 @@ class Variable(CoreVariable): core.BNSetFunctionVariableDeadStoreElimination(self._function.handle, self.to_BNVariable(), value) @property + def is_parameter_variable(self) -> bool: + """returns whether this variable is a function parameter""" + return self in self._function.parameter_vars + + @property def offset_to_next_variable(self) -> Optional[int]: """returns number of bytes to the next variable on the stack""" if self.source_type != VariableSourceType.StackVariableSourceType: |
