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 /lowlevelil.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 'lowlevelil.cpp')
| -rw-r--r-- | lowlevelil.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lowlevelil.cpp b/lowlevelil.cpp index 514595bb..cc1cb6d0 100644 --- a/lowlevelil.cpp +++ b/lowlevelil.cpp @@ -97,6 +97,12 @@ void LowLevelILFunction::SetCurrentAddress(Architecture* arch, uint64_t addr) } +void LowLevelILFunction::SetCurrentSourceBlock(BasicBlock* source) +{ + BNLowLevelILSetCurrentSourceBlock(m_object, source->GetObject()); +} + + size_t LowLevelILFunction::GetInstructionStart(Architecture* arch, uint64_t addr) { return BNLowLevelILGetInstructionStart(m_object, arch ? arch->GetObject() : nullptr, addr); @@ -145,6 +151,12 @@ void LowLevelILFunction::SetIndirectBranches(const vector<ArchAndAddr>& branches } +bool LowLevelILFunction::HasIndirectBranches() const +{ + return BNLowLevelILFunctionHasIndirectBranches(m_object); +} + + std::vector<uint32_t> LowLevelILFunction::GetRegisters() { std::vector<uint32_t> result; |
