diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-02-25 00:25:36 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-02-25 00:25:36 -0500 |
| commit | 57a3ea491d2d819ab5415d8d7bdf7e9e505808fc (patch) | |
| tree | 5c516eed341b1d0022cfb8c35f1e783874fde5a2 /python | |
| parent | ba4bb6dbee0476d5c30d942ae978621af790d518 (diff) | |
Add APIs to access SSA-based data flow
Diffstat (limited to 'python')
| -rw-r--r-- | python/lowlevelil.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 564fef34..6c664cb4 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -1386,6 +1386,28 @@ class LowLevelILFunction(object): core.BNFreeLowLevelILInstructionList(instrs) return result + def get_ssa_reg_value(self, reg, index): + if isinstance(reg, str): + reg = self.arch.regs[reg].index + value = core.BNGetLowLevelILSSARegisterValue(self.handle, reg, index) + result = function.RegisterValue(self.arch, value) + core.BNFreeRegisterValue(value) + return result + + def get_ssa_flag_value(self, flag, index): + if isinstance(flag, str): + flag = self.arch.get_flag_by_name(flag) + value = core.BNGetLowLevelILSSAFlagValue(self.handle, flag, index) + result = function.RegisterValue(self.arch, value) + core.BNFreeRegisterValue(value) + return result + + def get_ssa_stack_contents(self, memory_index, offset, size): + value = core.BNGetLowLevelILSSAStackContents(self.handle, memory_index, offset, size) + result = function.RegisterValue(self.arch, value) + core.BNFreeRegisterValue(value) + return result + class LowLevelILBasicBlock(basicblock.BasicBlock): def __init__(self, view, handle, owner): |
