From d27bf51d4b7c2170d00dca7cce97c7526c866868 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Wed, 23 Dec 2020 23:35:48 -0500 Subject: Add GetLowLevelILInstructionsForAddress API to retrieve all LLIL for an address. --- function.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'function.cpp') diff --git a/function.cpp b/function.cpp index 340f1e53..d7345248 100644 --- a/function.cpp +++ b/function.cpp @@ -307,6 +307,20 @@ size_t Function::GetLowLevelILForInstruction(Architecture* arch, uint64_t 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; -- cgit v1.3.1