diff options
| -rw-r--r-- | binaryninjaapi.h | 3 | ||||
| -rw-r--r-- | function.cpp | 6 | ||||
| -rw-r--r-- | type.cpp | 6 |
3 files changed, 15 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index d4176aa5..43dd3b3d 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1064,6 +1064,8 @@ namespace BinaryNinja std::string GetStringBeforeName() const; std::string GetStringAfterName() const; + Ref<Type> Duplicate() const; + static Ref<Type> VoidType(); static Ref<Type> BoolType(); static Ref<Type> IntegerType(size_t width, bool sign); @@ -1202,6 +1204,7 @@ namespace BinaryNinja std::vector<uint32_t> GetRegistersWrittenByInstruction(Architecture* arch, uint64_t addr); Ref<Type> GetType() const; + void ApplyImportedTypes(Symbol* sym); Ref<FunctionGraph> CreateFunctionGraph(); }; diff --git a/function.cpp b/function.cpp index 9c8968b7..27d0795b 100644 --- a/function.cpp +++ b/function.cpp @@ -192,6 +192,12 @@ Ref<Type> Function::GetType() const } +void Function::ApplyImportedTypes(Symbol* sym) +{ + BNApplyImportedTypes(m_func, sym->GetSymbolObject()); +} + + Ref<FunctionGraph> Function::CreateFunctionGraph() { BNFunctionGraph* graph = BNCreateFunctionGraph(m_func); @@ -151,6 +151,12 @@ string Type::GetStringAfterName() const } +Ref<Type> Type::Duplicate() const +{ + return new Type(BNDuplicateType(m_type)); +} + + Ref<Type> Type::VoidType() { return new Type(BNCreateVoidType()); |
