diff options
| author | Xusheng <xusheng@vector35.com> | 2024-07-26 15:57:14 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2024-08-02 12:17:53 +0800 |
| commit | abbae639d8ba182e8b3cf2d5a9844a9b1f9844a1 (patch) | |
| tree | 272322e3269b09201c12489d93e7fbeb614fb140 /binaryninjaapi.h | |
| parent | 7a9a2503aae0c2b92b437b2ea7796efaae93a822 (diff) | |
Support setting user global pointer value
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 4cac3ff3..59c79631 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -4251,6 +4251,25 @@ namespace BinaryNinja { bool AutoDefined() const; }; + struct RegisterValue + { + BNRegisterValueType state; + int64_t value; + int64_t offset; + size_t size; + + bool operator==(const RegisterValue& a) const; + bool operator!=(const RegisterValue& a) const; + + RegisterValue(); + + bool IsConstant() const; + bool IsConstantData() const; + + static RegisterValue FromAPIObject(const BNRegisterValue& value); + BNRegisterValue ToAPIObject(); + }; + struct QualifiedNameAndType; struct PossibleValueSet; class Metadata; @@ -6730,6 +6749,11 @@ namespace BinaryNinja { void RemoveExternalLocation(Ref<Symbol> sourceSymbol); Ref<ExternalLocation> GetExternalLocation(Ref<Symbol> sourceSymbol); std::vector<Ref<ExternalLocation>> GetExternalLocations(); + + Confidence<RegisterValue> GetGlobalPointerValue() const; + bool UserGlobalPointerValueSet() const; + void ClearUserGlobalPointerValue(); + void SetUserGlobalPointerValue(const Confidence<RegisterValue>& value); }; class MemoryMap @@ -10286,22 +10310,6 @@ namespace BinaryNinja { /*! \ingroup function */ - struct RegisterValue - { - BNRegisterValueType state; - int64_t value; - int64_t offset; - size_t size; - - RegisterValue(); - - bool IsConstant() const; - bool IsConstantData() const; - - static RegisterValue FromAPIObject(const BNRegisterValue& value); - BNRegisterValue ToAPIObject(); - }; - struct ConstantData : public BNRegisterValue { Ref<Function> func = nullptr; |
