Class ResolvedOperandByteValue
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.simulator.ResolvedOperandByteValue
- All Implemented Interfaces:
IResolvedOperandValue
A resolved operand representing an immediate value which type is unknown.
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedOperandByteValue
(byte[] b) ResolvedOperandByteValue
(long value, int size, ByteOrder byteOrder) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes()
Get the processor-order bytes of the resolved (aka, "actual" or "computed") operand value.Get the composite elements of the operands.
-
Constructor Details
-
ResolvedOperandByteValue
-
ResolvedOperandByteValue
public ResolvedOperandByteValue(byte[] b)
-
-
Method Details
-
getBytes
public byte[] getBytes()Description copied from interface:IResolvedOperandValue
Get the processor-order bytes of the resolved (aka, "actual" or "computed") operand value. This method provides the true value of the operand. Example:
- If the operand is an immediate, the actual value is trivial
- If the operand is a register, the value of the register should be returned
- If the operand points to a memory address, the actual in-memory value should be returned
- If the operand is composed of sub-values (eg, composition of registers with arithmetic operations), the final actual value is returned
Constituting elements may be returned via theIResolvedOperandValue.getElements()
method.Note about byte ordering: if the value is a 32-bit register on an little-endian ARM architecture, the returned array will contain 4 bytes encoding the register in a little-endian form.
- Specified by:
getBytes
in interfaceIResolvedOperandValue
- Returns:
- the bytes array
-
getElements
Description copied from interface:IResolvedOperandValue
Get the composite elements of the operands.- Specified by:
getElements
in interfaceIResolvedOperandValue
- Returns:
- a list of elements, possibly empty
-