From df2691ad3443fdf9767869be73c1014f49383239 Mon Sep 17 00:00:00 2001 From: Ryan Snyder Date: Fri, 20 Jun 2025 11:13:53 -0400 Subject: abb: minor refactor --- function.cpp | 84 ------------------------------------------------------------ 1 file changed, 84 deletions(-) (limited to 'function.cpp') diff --git a/function.cpp b/function.cpp index 0a4337df..103fec95 100644 --- a/function.cpp +++ b/function.cpp @@ -319,27 +319,6 @@ vector> Function::GetBasicBlocks() const } -Ref Function::CreateBasicBlock(Architecture* arch, uint64_t addr) -{ - BNBasicBlock* block = BNCreateFunctionBasicBlock(m_object, arch->GetObject(), addr); - if (!block) - return nullptr; - return new BasicBlock(block); -} - - -void Function::AddBasicBlock(Ref block) -{ - BNAddFunctionBasicBlock(m_object, block->GetObject()); -} - - -void Function::FinalizeBasicBlocks() -{ - BNFinalizeFunctionBasicBlocks(m_object); -} - - Ref Function::GetBasicBlockAtAddress(Architecture* arch, uint64_t addr) const { BNBasicBlock* block = BNGetFunctionBasicBlockAtAddress(m_object, arch->GetObject(), addr); @@ -1808,33 +1787,6 @@ vector Function::GetIndirectBranchesAt(Architecture* arch, u } -void Function::AddDirectCodeReference(const ArchAndAddr& source, uint64_t target) -{ - BNArchitectureAndAddress bnSource; - bnSource.arch = source.arch->GetObject(); - bnSource.address = source.address; - BNFunctionAddDirectCodeReference(m_object, &bnSource, target); -} - - -void Function::AddDirectNoReturnCall(const ArchAndAddr& location) -{ - BNArchitectureAndAddress bnLocation; - bnLocation.arch = location.arch->GetObject(); - bnLocation.address = location.address; - BNFunctionAddDirectNoReturnCall(m_object, &bnLocation); -} - - -bool Function::LocationHasNoReturnCalls(const ArchAndAddr& location) const -{ - BNArchitectureAndAddress bnLocation; - bnLocation.arch = location.arch->GetObject(); - bnLocation.address = location.address; - return BNFunctionLocationHasNoReturnCalls(m_object, &bnLocation); -} - - Ref Function::GetCalleeForAnalysis(Ref platform, uint64_t addr, bool exact) { BNFunction* func = BNGetCalleeForAnalysis(m_object, platform->GetObject(), addr, exact); @@ -1844,42 +1796,6 @@ Ref Function::GetCalleeForAnalysis(Ref platform, uint64_t ad } -void Function::AddTempOutgoingReference(Ref target) -{ - BNFunctionAddTempOutgoingReference(m_object, target->GetObject()); -} - - -bool Function::HasTempOutgoingReference(Ref target) const -{ - return BNFunctionHasTempOutgoingReference(m_object, target->GetObject()); -} - - -void Function::AddTempIncomingReference(Ref source) -{ - BNFunctionAddTempIncomingReference(m_object, source->GetObject()); -} - - -bool Function::GetContextualFunctionReturn(const ArchAndAddr& location, bool& value) const -{ - BNArchitectureAndAddress bnLocation; - bnLocation.arch = location.arch->GetObject(); - bnLocation.address = location.address; - return BNFunctionGetContextualFunctionReturn(m_object, &bnLocation, &value); -} - - -void Function::SetContextualFunctionReturn(const ArchAndAddr& location, bool value) -{ - BNArchitectureAndAddress bnLocation; - bnLocation.arch = location.arch->GetObject(); - bnLocation.address = location.address; - BNFunctionSetContextualFunctionReturn(m_object, &bnLocation, value); -} - - vector Function::GetUnresolvedIndirectBranches() { size_t count; -- cgit v1.3.1