Class MemoryAccessInfo
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.MemoryAccessInfo
Memory access information object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MemoryAccessInfo
static final MemoryAccessInfo
static final MemoryAccessInfo
static final MemoryAccessInfo
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a mutable (customizable) MAI object initially set to access everything (stack R/W, globals R/W).MemoryAccessInfo
(boolean accessEverything) Create a mutable (customizable) MAI object.MemoryAccessInfo
(boolean readStack, boolean writeStack, boolean readGlobals, boolean writeGlobals) Create an immutable MAI object with no-granularity settings: all/no stack read, all/no stack written, all/no globals read, all/no globals written. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
filterGlobalsReads
(Collection<IEVar> candidates) filterGlobalsWrites
(Collection<IEVar> candidates) filterStackReads
(Collection<IEVar> candidates) filterStackSpoiled
(Collection<IEVar> candidates) filterStackWrites
(Collection<IEVar> candidates) The object must bemutable
, else this method will throw.The object must bemutable
, else this method will throw.The object must bemutable
, else this method will throw.Retrieve the records of bad writes to stack slots.The object must bemutable
, else this method will throw.int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAccessRanges
(IdRanges stackReads, IdRanges stackWrites, IdRanges globalsReads, IdRanges globalsWrites) The object must bemutable
, else this method will throw.void
setGlobalsAccessRanges
(IdRanges read, IdRanges write) The object must bemutable
, else this method will throw.void
setStackAccessRanges
(IdRanges read, IdRanges write) The object must bemutable
, else this method will throw.void
setStackSpoiledRanges
(IdRanges spoiled) Set the records of bad writes to stack slots.toString()
-
Field Details
-
ACCESSES_NONE
-
ACCESSES_STACK
-
ACCESSES_GLOBALS
-
ACCESSES_ALL
-
-
Constructor Details
-
MemoryAccessInfo
public MemoryAccessInfo()Create a mutable (customizable) MAI object initially set to access everything (stack R/W, globals R/W).Customize accesses with
setGlobalsAccessRanges(IdRanges, IdRanges)
,setStackAccessRanges(IdRanges, IdRanges)
,setStackSpoiledRanges(IdRanges)
. -
MemoryAccessInfo
public MemoryAccessInfo(boolean accessEverything) Create a mutable (customizable) MAI object.Customize accesses with
setGlobalsAccessRanges(IdRanges, IdRanges)
,setStackAccessRanges(IdRanges, IdRanges)
,setStackSpoiledRanges(IdRanges)
.- Parameters:
accessEverything
- false to initialize to access nothing (in stack, in mem); trues to initialize to access everything (safer)
-
MemoryAccessInfo
public MemoryAccessInfo(boolean readStack, boolean writeStack, boolean readGlobals, boolean writeGlobals) Create an immutable MAI object with no-granularity settings: all/no stack read, all/no stack written, all/no globals read, all/no globals written. In order to specify granular access settings (list of variable IDs), useMemoryAccessInfo()
.- Parameters:
readStack
-writeStack
-readGlobals
-writeGlobals
-
-
-
Method Details
-
isMutable
public boolean isMutable() -
isNoAccess
public boolean isNoAccess() -
isAccessMemory
public boolean isAccessMemory() -
isReadMemory
public boolean isReadMemory() -
isWriteMemory
public boolean isWriteMemory() -
isAccessStack
public boolean isAccessStack() -
isReadStack
public boolean isReadStack() -
isWriteStack
public boolean isWriteStack() -
isAccessGlobals
public boolean isAccessGlobals() -
isReadGlobals
public boolean isReadGlobals() -
isWriteGlobals
public boolean isWriteGlobals() -
hasSpoiledStack
public boolean hasSpoiledStack() -
setAccessRanges
public void setAccessRanges(IdRanges stackReads, IdRanges stackWrites, IdRanges globalsReads, IdRanges globalsWrites) The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
setStackAccessRanges
The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
getStackReads
The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
getStackWrites
The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
setGlobalsAccessRanges
The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
getGlobalsReads
The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
getGlobalsWrites
The object must bemutable
, else this method will throw.- Throws:
IllegalStateException
- if the object is not mutable
-
setStackSpoiledRanges
Set the records of bad writes to stack slots.- Parameters:
spoiled
- optional ranges
-
getStackSpoiledRanges
Retrieve the records of bad writes to stack slots.- Returns:
- optional ranges
-
clone
-
hashCode
public int hashCode() -
equals
-
toString
-
filterGlobalsReads
-
filterGlobalsWrites
-
filterStackReads
-
filterStackWrites
-
filterStackSpoiled
-