diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-05-02 18:11:21 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-05-02 22:19:30 -0400 |
| commit | 362b82012d980f06c98b54b8032c4912ff5c8893 (patch) | |
| tree | 734a645706d2467aecd7ed760634c9c65a719447 /python/architecture.py | |
| parent | 597a190065ed23553c8351905803b6b5699c18cd (diff) | |
Renaming SSA index to version, more uniform register and variable representation in IL
Diffstat (limited to 'python/architecture.py')
| -rw-r--r-- | python/architecture.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/architecture.py b/python/architecture.py index d3778613..60c8a1dd 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -1232,6 +1232,20 @@ class Architecture(object): """ return core.BNGetArchitectureFlagName(self.handle, flag) + def get_reg_index(self, reg): + if isinstance(reg, str): + return self.regs[reg].index + elif isinstance(reg, lowlevelil.ILRegister): + return reg.index + return reg + + def get_flag_index(self, flag): + if isinstance(flag, str): + return self._flags[flag] + elif isinstance(flag, lowlevelil.ILFlag): + return flag.index + return flag + def get_flag_write_type_name(self, write_type): """ ``get_flag_write_type_name`` gets the flag write type name for the given flag. |
