mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-29 03:01:15 +00:00
Asm generate hotfix
This commit is contained in:
parent
fce90ed8d8
commit
efa86711f9
@ -9,6 +9,7 @@
|
||||
import re
|
||||
from typing import Callable, List, Optional, Tuple
|
||||
from collections import namedtuple
|
||||
from isledecomp.bin import InvalidVirtualAddressError
|
||||
from capstone import Cs, CS_ARCH_X86, CS_MODE_32
|
||||
|
||||
disassembler = Cs(CS_ARCH_X86, CS_MODE_32)
|
||||
@ -55,7 +56,11 @@ def is_relocated(self, addr: int) -> bool:
|
||||
|
||||
def float_replace(self, addr: int, data_size: int) -> Optional[str]:
|
||||
if callable(self.float_lookup):
|
||||
float_str = self.float_lookup(addr, data_size)
|
||||
try:
|
||||
float_str = self.float_lookup(addr, data_size)
|
||||
except InvalidVirtualAddressError:
|
||||
# probably caused by reading an invalid instruction
|
||||
return None
|
||||
if float_str is not None:
|
||||
return f"{float_str} (FLOAT)"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user