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 /python/log.py | |
| 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 'python/log.py')
| -rw-r--r-- | python/log.py | 7 |
1 files changed, 5 insertions, 2 deletions
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) |
