diff options
| author | Brandon Miller <brandon@vector35.com> | 2026-01-27 11:26:57 -0500 |
|---|---|---|
| committer | Brandon Miller <brandon@vector35.com> | 2026-01-27 11:26:57 -0500 |
| commit | 5ccef726c0954116f8f4b5d6347e0acdbb0b6ce3 (patch) | |
| tree | ef347ed0ae08bbdafb53fd5e82ffdfd104377522 /function.cpp | |
| parent | e5805fe927f42d3ac56dd283fc02b394a9739d79 (diff) | |
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.
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/function.cpp b/function.cpp index 3f5f5b2e..a8ab3b99 100644 --- a/function.cpp +++ b/function.cpp @@ -1644,14 +1644,13 @@ Ref<Function> Function::GetCalleeForAnalysis(Ref<Platform> platform, uint64_t ad } -vector<ArchAndAddr> Function::GetUnresolvedIndirectBranches() +set<ArchAndAddr> Function::GetUnresolvedIndirectBranches() { size_t count; BNArchitectureAndAddress* addresses = BNGetUnresolvedIndirectBranches(m_object, &count); - vector<ArchAndAddr> result; - result.reserve(count); + set<ArchAndAddr> 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; } |
