Class CodePointer
java.lang.Object
com.pnfsoftware.jeb.core.units.code.Pointer
com.pnfsoftware.jeb.core.units.code.CodePointer
- All Implemented Interfaces:
ICodePointer
Standard implementation of a pointer to code.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCodePointer(long address) Create an entry-point description using a default processor mode.CodePointer(long address, int mode) Create an entry-point address description.CodePointer(ICodePointer src) Create a code pointer from another pointer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanalmostEquals(Object obj) Equality that disregards theprocessor mode.static CodePointercreateFrom(long internalAddress, INativeCodeModel<?> model) Create a code pointer from an internal address and native code model.static CodePointercreateFrom(INativeMethodDataItem routineData) Create a code pointer from routine data.static CodePointercreateFrom(INativeMethodItem routine) Create a code pointer from a routine item.static CodePointerCreate a code pointer from a located instruction.static CodePointercreateFrom(String entryPointAsString) Create a code pointer from its string representation.static CodePointerCreate an Entry Point Description pointing to an unknown address.static CodePointercreateUnknown(int mode) Create an Entry Point Description pointing to an unknown address.booleanintgetMode()Get the processor mode that should be used when parsing at the address.inthashCode()booleanIndicate if the entry-point relates to an unknown addressvoidsetMode(int mode) Set the processor mode.toString()Methods inherited from class com.pnfsoftware.jeb.core.units.code.Pointer
getAddress, getSize, getType, setSizeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodePointer
getAddress
-
Constructor Details
-
CodePointer
public CodePointer(long address, int mode) Create an entry-point address description.- Parameters:
address- address of the Entry point or -1 for unknown address.mode- optional processor mode, can beIProcessor.MODE_DEFAULT(0) if unknown/default
-
CodePointer
public CodePointer(long address) Create an entry-point description using a default processor mode.- Parameters:
address- address of the entry point or -1 for unknown address
-
CodePointer
Create a code pointer from another pointer.- Parameters:
src- source pointer
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
almostEquals
Equality that disregards theprocessor mode.- Parameters:
obj- object to compare- Returns:
- true if the address and size match
-
getMode
public int getMode()Get the processor mode that should be used when parsing at the address.- Specified by:
getModein interfaceICodePointer- Returns:
- processor mode
-
setMode
public void setMode(int mode) Set the processor mode.- Parameters:
mode- processor mode
-
isUnknownAddress
public boolean isUnknownAddress()Description copied from interface:ICodePointerIndicate if the entry-point relates to an unknown address- Specified by:
isUnknownAddressin interfaceICodePointer- Returns:
- true if address is unknown, false otherwise
-
toString
Description copied from interface:ICodePointer- Specified by:
toStringin interfaceICodePointer- Overrides:
toStringin classPointer- Returns:
- formatted pointer
-
createFrom
Create a code pointer from its string representation.- Parameters:
entryPointAsString- entry-point string- Returns:
- code pointer
-
createFrom
Create a code pointer from an internal address and native code model.- Parameters:
internalAddress- internal addressmodel- native code model- Returns:
- code pointer
-
createFrom
Create a code pointer from a located instruction.- Parameters:
insn- located instruction- Returns:
- code pointer
-
createFrom
Create a code pointer from routine data.- Parameters:
routineData- routine data- Returns:
- code pointer
-
createFrom
Create a code pointer from a routine item.- Parameters:
routine- routine item- Returns:
- code pointer
-
createUnknown
Create an Entry Point Description pointing to an unknown address.- Returns:
- code pointer
-
createUnknown
Create an Entry Point Description pointing to an unknown address.- Parameters:
mode- processor mode- Returns:
- code pointer
-