From 336b4c1d247e2c6dd2beb744f72a6668eec426e4 Mon Sep 17 00:00:00 2001 From: Burhan Rajgara Date: Thu, 18 Jul 2024 23:22:00 -0700 Subject: [PATCH] fixed exception handler --- src/patcherex2/components/binary_analyzers/ghidra.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patcherex2/components/binary_analyzers/ghidra.py b/src/patcherex2/components/binary_analyzers/ghidra.py index f3daa99..1627924 100644 --- a/src/patcherex2/components/binary_analyzers/ghidra.py +++ b/src/patcherex2/components/binary_analyzers/ghidra.py @@ -40,7 +40,7 @@ def mem_addr_to_file_offset(self, addr: int) -> int: self.currentProgram.getMemory().getAddressSourceInfo(addr).getFileOffset() ) except Exception: - raise Exception(f"Can't get file offset for {hex(addr)}") + raise Exception("Can't get file offset for addr") def get_basic_block(self, addr: int) -> dict[str, int | list[int]]: logger.info(f"getting basic block at 0x{addr} with ghidra")