Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanr13 committed Jul 19, 2024
1 parent 336b4c1 commit dbce924
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/patcherex2/components/binary_analyzers/ghidra.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ def mem_addr_to_file_offset(self, addr: int) -> int:
addr = self.denormalize_addr(addr)
try:
return (
self.currentProgram.getMemory().getAddressSourceInfo(addr).getFileOffset()
self.currentProgram.getMemory()
.getAddressSourceInfo(addr)
.getFileOffset()
)
except Exception:
raise Exception("Can't get file offset for addr")
raise Exception("Can't get file offset for addr") from None

def get_basic_block(self, addr: int) -> dict[str, int | list[int]]:
logger.info(f"getting basic block at 0x{addr} with ghidra")
Expand Down

0 comments on commit dbce924

Please sign in to comment.