public class

MemoryAccessInfo

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.MemoryAccessInfo

Class Overview

Memory access information object.

Summary

Fields
public static final MemoryAccessInfo ACCESSES_ALL
public static final MemoryAccessInfo ACCESSES_GLOBALS
public static final MemoryAccessInfo ACCESSES_NONE
public static final MemoryAccessInfo ACCESSES_STACK
Public Constructors
MemoryAccessInfo()
Create 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.
Public Methods
MemoryAccessInfo clone()
boolean equals(Object obj)
Collection<IEVar> filterGlobalsReads(Collection<IEVar> candidates)
Collection<IEVar> filterGlobalsWrites(Collection<IEVar> candidates)
Collection<IEVar> filterStackReads(Collection<IEVar> candidates)
Collection<IEVar> filterStackSpoiled(Collection<IEVar> candidates)
Collection<IEVar> filterStackWrites(Collection<IEVar> candidates)
IdRanges getGlobalsReads()
The object must be mutable, else this method will throw.
IdRanges getGlobalsWrites()
The object must be mutable, else this method will throw.
IdRanges getStackReads()
The object must be mutable, else this method will throw.
IdRanges getStackSpoiledRanges()
Retrieve the records of bad writes to stack slots.
IdRanges getStackWrites()
The object must be mutable, else this method will throw.
boolean hasSpoiledStack()
int hashCode()
boolean isAccessGlobals()
boolean isAccessMemory()
boolean isAccessStack()
boolean isMutable()
boolean isNoAccess()
boolean isReadGlobals()
boolean isReadMemory()
boolean isReadStack()
boolean isWriteGlobals()
boolean isWriteMemory()
boolean isWriteStack()
void setAccessRanges(IdRanges stackReads, IdRanges stackWrites, IdRanges globalsReads, IdRanges globalsWrites)
The object must be mutable, else this method will throw.
void setGlobalsAccessRanges(IdRanges read, IdRanges write)
The object must be mutable, else this method will throw.
void setStackAccessRanges(IdRanges read, IdRanges write)
The object must be mutable, else this method will throw.
void setStackSpoiledRanges(IdRanges spoiled)
Set the records of bad writes to stack slots.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final MemoryAccessInfo ACCESSES_ALL

public static final MemoryAccessInfo ACCESSES_GLOBALS

public static final MemoryAccessInfo ACCESSES_NONE

public static final MemoryAccessInfo ACCESSES_STACK

Public Constructors

public MemoryAccessInfo ()

Create a mutable (customizable) MAI object initially set to access everything (stack R/W, globals R/W).

Customize accesses with #setCustomGlobalsAccessRanges(IdRanges, IdRanges), #setCustomStackAccessRanges(IdRanges, IdRanges), setStackSpoiledRanges(IdRanges).

public MemoryAccessInfo (boolean accessEverything)

Create a mutable (customizable) MAI object.

Customize accesses with #setCustomGlobalsAccessRanges(IdRanges, IdRanges), #setCustomStackAccessRanges(IdRanges, IdRanges), setStackSpoiledRanges(IdRanges).

Parameters
accessEverything false to initialize to access nothing (in stack, in mem); trues to initialize to access everything (safer)

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), use MemoryAccessInfo().

Public Methods

public MemoryAccessInfo clone ()

public boolean equals (Object obj)

public Collection<IEVar> filterGlobalsReads (Collection<IEVar> candidates)

public Collection<IEVar> filterGlobalsWrites (Collection<IEVar> candidates)

public Collection<IEVar> filterStackReads (Collection<IEVar> candidates)

public Collection<IEVar> filterStackSpoiled (Collection<IEVar> candidates)

public Collection<IEVar> filterStackWrites (Collection<IEVar> candidates)

public IdRanges getGlobalsReads ()

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public IdRanges getGlobalsWrites ()

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public IdRanges getStackReads ()

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public IdRanges getStackSpoiledRanges ()

Retrieve the records of bad writes to stack slots.

Returns
  • optional ranges

public IdRanges getStackWrites ()

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public boolean hasSpoiledStack ()

public int hashCode ()

public boolean isAccessGlobals ()

public boolean isAccessMemory ()

public boolean isAccessStack ()

public boolean isMutable ()

public boolean isNoAccess ()

public boolean isReadGlobals ()

public boolean isReadMemory ()

public boolean isReadStack ()

public boolean isWriteGlobals ()

public boolean isWriteMemory ()

public boolean isWriteStack ()

public void setAccessRanges (IdRanges stackReads, IdRanges stackWrites, IdRanges globalsReads, IdRanges globalsWrites)

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public void setGlobalsAccessRanges (IdRanges read, IdRanges write)

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public void setStackAccessRanges (IdRanges read, IdRanges write)

The object must be mutable, else this method will throw.

Throws
IllegalStateException if the object is not mutable

public void setStackSpoiledRanges (IdRanges spoiled)

Set the records of bad writes to stack slots.

Parameters
spoiled optional ranges

public String toString ()