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. --- python/log.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'python/log.py') diff --git a/python/log.py b/python/log.py index 2f5dda49..13c65c81 100644 --- a/python/log.py +++ b/python/log.py @@ -365,10 +365,13 @@ def close_logs(): class Logger: - def __init__(self, session_id: int, logger_name: str): + def __init__(self, session_id: int, logger_name: str, handle=None): self.session_id = session_id self.logger_name = logger_name - self.handle = core.BNLogCreateLogger(logger_name, session_id) + if handle: + self.handle = handle + else: + self.handle = core.BNLogCreateLogger(logger_name, session_id) def log(self, level: LogLevel, message: str) -> None: log(level, message, self.logger_name, self.session_id) -- cgit v1.3.1