summaryrefslogtreecommitdiff
path: root/function.cpp
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2020-12-23 23:35:48 -0500
committerBrian Potchik <brian@vector35.com>2020-12-23 23:35:48 -0500
commitd27bf51d4b7c2170d00dca7cce97c7526c866868 (patch)
tree8eae0489f07d35127db322e6a70ac5eafab4c363 /function.cpp
parent30683cdc2892d7a1a8b6b9070fbbceb8981882a8 (diff)
Add GetLowLevelILInstructionsForAddress API to retrieve all LLIL for an address.
Diffstat (limited to 'function.cpp')
-rw-r--r--function.cpp14
1 files changed, 14 insertions, 0 deletions
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<size_t> Function::GetLowLevelILInstructionsForAddress(Architecture* arch, uint64_t addr)
+{
+ size_t count;
+ size_t* instrs = BNGetLowLevelILInstructionsForAddress(m_object, arch->GetObject(), addr, &count);
+
+ set<size_t> result;
+ for (size_t i = 0; i < count; i++)
+ result.insert(instrs[i]);
+
+ BNFreeILInstructionList(instrs);
+ return result;
+}
+
+
vector<size_t> Function::GetLowLevelILExitsForInstruction(Architecture* arch, uint64_t addr)
{
size_t count;