diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-05-25 02:02:00 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-05-25 02:02:12 -0400 |
| commit | 1c3762b59af1b949234cc9cc12a42a8fb3765b14 (patch) | |
| tree | de06a790c461fd8587f44a9ddb8d15c179333d19 /binaryninjacore.h | |
| parent | 05128d0d96b07156ea91243911efcd4da2a0b8c6 (diff) | |
Extending register value system to include ranges and lookup table values
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 51a3afdf..0eff6aaf 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -358,14 +358,27 @@ extern "C" OffsetFromEntryValue, ConstantValue, StackFrameOffset, - UndeterminedValue + UndeterminedValue, + OffsetFromUndeterminedValue, + SignedRangeValue, + UnsignedRangeValue, + LookupTableValue + }; + + struct BNLookupTableEntry + { + int64_t* fromValues; + size_t fromCount; + int64_t toValue; }; struct BNRegisterValue { BNRegisterValueType state; uint32_t reg; // For EntryValue and OffsetFromEntryValue, the original input register - int64_t value; // Offset for OffsetFromEntryValue or StackFrameOffset, value of register for ConstantValue + int64_t value; // Offset for OffsetFromEntryValue, StackFrameOffset or RangeValue, value of register for ConstantValue + uint64_t rangeStart, rangeEnd, rangeStep; // Range of register, inclusive + BNLookupTableEntry* table; // Number of entries in rangeEnd }; struct BNRegisterOrConstant @@ -1102,6 +1115,7 @@ extern "C" uint32_t reg); BINARYNINJACOREAPI BNRegisterValue BNGetRegisterValueAtLowLevelILInstruction(BNFunction* func, size_t i, uint32_t reg); BINARYNINJACOREAPI BNRegisterValue BNGetRegisterValueAfterLowLevelILInstruction(BNFunction* func, size_t i, uint32_t reg); + BINARYNINJACOREAPI void BNFreeRegisterValue(BNRegisterValue* value); BINARYNINJACOREAPI uint32_t* BNGetRegistersReadByInstruction(BNFunction* func, BNArchitecture* arch, uint64_t addr, size_t* count); BINARYNINJACOREAPI uint32_t* BNGetRegistersWrittenByInstruction(BNFunction* func, BNArchitecture* arch, uint64_t addr, |
