diff options
| author | Peter LaFosse <peter@vector35.com> | 2025-10-17 10:20:44 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2025-10-22 09:33:28 -0400 |
| commit | 290374ed95c31744ded99280af99bb1f2ec5a37f (patch) | |
| tree | 73c9b2aefe23dca9a1f9f7e1c72300de75a22095 | |
| parent | 3e63b6e83ad95663e478a63f39b271d308db6f89 (diff) | |
Add Type::SetIgnored API
| -rw-r--r-- | binaryninjaapi.h | 5 | ||||
| -rw-r--r-- | binaryninjacore.h | 1 | ||||
| -rw-r--r-- | type.cpp | 9 |
3 files changed, 15 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index ecdeabdf..90ee2585 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -10348,6 +10348,11 @@ namespace BinaryNinja { Ref<Type> Duplicate() const; + /*! Call this with setIgnored=True if this Type object is expected to be always resident. + * This prevents the type object from showing up in the results of GetMemoryUsageInfo + */ + Type* SetIgnored(bool setIgnored); + /*! Create a "void" type diff --git a/binaryninjacore.h b/binaryninjacore.h index 3e34662c..f19d57d5 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -6799,6 +6799,7 @@ extern "C" BINARYNINJACOREAPI char* BNGetTypeAndName(BNType* type, BNQualifiedName* name, BNTokenEscapingType escaping); BINARYNINJACOREAPI void BNFreeType(BNType* type); BINARYNINJACOREAPI void BNFreeTypeList(BNType** types, size_t count); + BINARYNINJACOREAPI BNType* BNTypeSetIgnored(BNType* type, bool ignored); BINARYNINJACOREAPI BNTypeBuilder* BNCreateTypeBuilderFromType(BNType* type); BINARYNINJACOREAPI BNTypeBuilder* BNCreateVoidTypeBuilder(void); @@ -793,6 +793,8 @@ string Type::GetTypeAndName(const QualifiedName& nameList, BNTokenEscapingType e return outName; } + + string Type::GetStringBeforeName(Platform* platform, BNTokenEscapingType escaping) const { char* str = BNGetTypeStringBeforeName(m_object, platform ? platform->GetObject() : nullptr, escaping); @@ -846,6 +848,13 @@ Ref<Type> Type::Duplicate() const } +Type* Type::SetIgnored(bool setIgnored) +{ + BNTypeSetIgnored(m_object, setIgnored); + return this; +} + + Ref<Type> Type::VoidType() { return new Type(BNCreateVoidType()); |
