mirror of
https://github.com/icicle-emu/icicle-python
synced 2026-06-21 13:53:41 +00:00
Update icicle-emu to the latest version
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
from .icicle import *
|
||||
|
||||
class MemoryError(Exception):
|
||||
def __init__(self, message, code):
|
||||
class MemoryException(Exception):
|
||||
def __init__(self, message: str, code: MemoryExceptionCode):
|
||||
super().__init__(message)
|
||||
self.code = code
|
||||
|
||||
def __str__(self):
|
||||
return f"{super().__str__()}: {self.code}"
|
||||
|
||||
def __ghidra_init():
|
||||
import os
|
||||
for path in __path__ + [os.getenv("GHIDRA_SRC", ".")]:
|
||||
processors_dir = os.path.join(path, "Ghidra/Processors")
|
||||
processors_dir = os.path.join(path, "Ghidra", "Processors")
|
||||
if os.path.isdir(processors_dir):
|
||||
os.putenv("GHIDRA_SRC", path)
|
||||
os.environ["GHIDRA_SRC"] = path
|
||||
|
||||
@@ -9,9 +9,10 @@ class MemoryProtection(Enum):
|
||||
ExecuteRead = ...
|
||||
ExecuteReadWrite = ...
|
||||
|
||||
class MemoryErrorCode(Enum):
|
||||
class MemoryExceptionCode(Enum):
|
||||
Unallocated = ...
|
||||
Unmapped = ...
|
||||
UnmappedRegisters = ...
|
||||
Uninitialized = ...
|
||||
ReadViolation = ...
|
||||
WriteViolation = ...
|
||||
@@ -43,7 +44,7 @@ class ExceptionCode(Enum):
|
||||
Sleep = ...
|
||||
Syscall = ...
|
||||
CpuStateChanged = ...
|
||||
DivideByZero = ...
|
||||
DivisionException = ...
|
||||
ReadUnmapped = ...
|
||||
ReadPerm = ...
|
||||
ReadUnaligned = ...
|
||||
@@ -71,11 +72,9 @@ class ExceptionCode(Enum):
|
||||
Environment = ...
|
||||
JitError = ...
|
||||
InternalError = ...
|
||||
UnmappedRegister = ...
|
||||
UnknownError = ...
|
||||
|
||||
class MemoryError(Exception):
|
||||
code: MemoryErrorCode
|
||||
|
||||
class Icicle:
|
||||
def __init__(self, architecture: str, *,
|
||||
jit = True,
|
||||
|
||||
Reference in New Issue
Block a user