diff options
| -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()); |
