From 5ccef726c0954116f8f4b5d6347e0acdbb0b6ce3 Mon Sep 17 00:00:00 2001 From: Brandon Miller Date: Tue, 27 Jan 2026 11:26:57 -0500 Subject: Perform function lifting and inlining in arch plugins This change allows architecture plugins to override the LiftFunction callback to iterate a function's basic block list and lift entire functions at once. This is required for architectures such as TMS320 C6x, which have non-traditional "delay slots" in that branches, loads, and other instructions take multiple cycles to complete, and branch instructions can reside within the delay slots of other branches. --- function.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'function.cpp') diff --git a/function.cpp b/function.cpp index 3f5f5b2e..a8ab3b99 100644 --- a/function.cpp +++ b/function.cpp @@ -1644,14 +1644,13 @@ Ref Function::GetCalleeForAnalysis(Ref platform, uint64_t ad } -vector Function::GetUnresolvedIndirectBranches() +set Function::GetUnresolvedIndirectBranches() { size_t count; BNArchitectureAndAddress* addresses = BNGetUnresolvedIndirectBranches(m_object, &count); - vector result; - result.reserve(count); + set result; for (size_t i = 0; i < count; i++) - result.push_back({new CoreArchitecture(addresses[i].arch), addresses[i].address}); + result.insert({new CoreArchitecture(addresses[i].arch), addresses[i].address}); BNFreeArchitectureAndAddressList(addresses); return result; } -- cgit v1.3.1