diff options
| author | Ryan Snyder <ryan@vector35.com> | 2025-06-20 11:13:53 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2025-06-23 13:44:12 -0400 |
| commit | df2691ad3443fdf9767869be73c1014f49383239 (patch) | |
| tree | a95b48dc2c4cdaec898477c52c6f60164a32777c /function.cpp | |
| parent | b079d1a1e19151f5c39de84c2e1e6cc6a91abc74 (diff) | |
abb: minor refactor
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/function.cpp b/function.cpp index 0a4337df..103fec95 100644 --- a/function.cpp +++ b/function.cpp @@ -319,27 +319,6 @@ vector<Ref<BasicBlock>> Function::GetBasicBlocks() const } -Ref<BasicBlock> 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<BasicBlock> block) -{ - BNAddFunctionBasicBlock(m_object, block->GetObject()); -} - - -void Function::FinalizeBasicBlocks() -{ - BNFinalizeFunctionBasicBlocks(m_object); -} - - Ref<BasicBlock> Function::GetBasicBlockAtAddress(Architecture* arch, uint64_t addr) const { BNBasicBlock* block = BNGetFunctionBasicBlockAtAddress(m_object, arch->GetObject(), addr); @@ -1808,33 +1787,6 @@ vector<IndirectBranchInfo> 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> Function::GetCalleeForAnalysis(Ref<Platform> platform, uint64_t addr, bool exact) { BNFunction* func = BNGetCalleeForAnalysis(m_object, platform->GetObject(), addr, exact); @@ -1844,42 +1796,6 @@ Ref<Function> Function::GetCalleeForAnalysis(Ref<Platform> platform, uint64_t ad } -void Function::AddTempOutgoingReference(Ref<Function> target) -{ - BNFunctionAddTempOutgoingReference(m_object, target->GetObject()); -} - - -bool Function::HasTempOutgoingReference(Ref<Function> target) const -{ - return BNFunctionHasTempOutgoingReference(m_object, target->GetObject()); -} - - -void Function::AddTempIncomingReference(Ref<Function> 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<uint64_t> Function::GetUnresolvedIndirectBranches() { size_t count; |
