From 1c01b00d87e45c7ae8eb6320b20e7dcf67915d77 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 10 Jul 2025 01:32:32 -0400 Subject: Move LLIL instruction retrieval into the LLIL function where it belongs The python API was kept the same seeing as we are close to the release, will likely start deprecating some of those API's soon. --- function.cpp | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) (limited to 'function.cpp') diff --git a/function.cpp b/function.cpp index c2e52e55..1b2c0a46 100644 --- a/function.cpp +++ b/function.cpp @@ -460,39 +460,6 @@ Ref Function::GetLowLevelILIfAvailable() const } -size_t Function::GetLowLevelILForInstruction(Architecture* arch, uint64_t addr) -{ - return BNGetLowLevelILForInstruction(m_object, arch->GetObject(), addr); -} - - -set Function::GetLowLevelILInstructionsForAddress(Architecture* arch, uint64_t addr) -{ - size_t count; - size_t* instrs = BNGetLowLevelILInstructionsForAddress(m_object, arch->GetObject(), addr, &count); - - set result; - for (size_t i = 0; i < count; i++) - result.insert(instrs[i]); - - BNFreeILInstructionList(instrs); - return result; -} - - -vector Function::GetLowLevelILExitsForInstruction(Architecture* arch, uint64_t addr) -{ - size_t count; - size_t* exits = BNGetLowLevelILExitsForInstruction(m_object, arch->GetObject(), addr, &count); - - vector result; - result.insert(result.end(), exits, &exits[count]); - - BNFreeILInstructionList(exits); - return result; -} - - RegisterValue RegisterValue::FromAPIObject(const BNRegisterValue& value) { RegisterValue result; @@ -795,26 +762,6 @@ Ref Function::GetLiftedILIfAvailable() const } -size_t Function::GetLiftedILForInstruction(Architecture* arch, uint64_t addr) -{ - return BNGetLiftedILForInstruction(m_object, arch->GetObject(), addr); -} - - -set Function::GetLiftedILInstructionsForAddress(Architecture* arch, uint64_t addr) -{ - size_t count; - size_t* instrs = BNGetLiftedILInstructionsForAddress(m_object, arch->GetObject(), addr, &count); - - set result; - for (size_t i = 0; i < count; i++) - result.insert(instrs[i]); - - BNFreeILInstructionList(instrs); - return result; -} - - set Function::GetLiftedILFlagUsesForDefinition(size_t i, uint32_t flag) { size_t count; -- cgit v1.3.1