public interface

IEVar

implements IVariable IEGeneric
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEVar

Class Overview

Representation of an IR variable. Also a polymorphic placeholder for a variety of terminal expressions.

Variables can represent underlying physical registers, virtual registers, local variables, global variables, etc. The class of an IEVar can be retrieved from its id. Global-scope (IEGlobalContext) ids are positive or zero; local-scope (IERoutineContext) ids are negative.

Summary

Constants
int FLAG_LIKELY_COPIED_PARAM Variables with this flag are stack variables likely to be copies of input parameters, that may have been provided in physical registers.
int FLAG_LIKELY_SAVED_VAR Variables with this flag are stack variables likely to be defensive copies of registers that need to be preserved.
int FLAG_NO_COPY This variable should not be copied: duplicates, pairs, splits generally created during SSA- or SSA-like passes are forbidden.
int IDL_BEGIN
int IDL_COPY Start of full range for copy variables.
int IDL_COPY_DUP2 SOR for additional (secondary) duplicates of IEVar-registers.
int IDL_COPY_DUP2_END EOR for additional (secondary) duplicates of IEVar-registers.
int IDL_COPY_DUPFULL SOR for duplicates (mirrors and secondary duplicates).
int IDL_COPY_DUPFULL_END EOR for duplicates (mirrors and secondary duplicates).
int IDL_COPY_END End of full range for copy variables.
int IDL_COPY_MERGER SOR for copies that consist of mergers of 2 or more IEVar-registers.
int IDL_COPY_MERGER_END EOR for copies that consist of mergers of 2 or more IEVar-registers.
int IDL_COPY_SLICE SOR for partial (truncated, slices) copies of IEVar-registers.
int IDL_COPY_SLICE_END EOR for partial (truncated, slices) copies of IEVar-registers.
int IDL_END
int IDL_MIRROR SOR for primary duplicates (primary dup.
int IDL_MIRROR_END EOR for primary duplicates (primary dup.
int IDL_PSEUDO_VAR
int IDL_PSEUDO_VAR_END
int IDL_SPECIAL
int IDL_SPECIAL_END
int IDL_STACKVAR
int IDL_STACKVAR_BASE
int IDL_STACKVAR_END
int IDL_SYMBOL Start of range for stack-variable references.
int IDL_SYMBOL_END End of range for stack-variable references.
int IDL_VIRTUAL
int IDL_VIRTUAL_END
int ID_BEGIN
int ID_END
int ID_MEMVAR
int ID_MEMVAR_END
int ID_PHYSICAL_REGISTER
int ID_PHYSICAL_REGISTER_END
int ID_PSEUDO_VAR
int ID_REGISTER
int ID_REGISTER_END
int ID_SYMBOL
int ID_SYMBOL_END
int ID_VIRTUAL_REGISTER
int ID_VIRTUAL_REGISTER_END
int REGISTER_RANGE_SIZE
Public Methods
abstract void copyProperties(IEVar dst)
abstract ICElement generateC(IERoutineContext ectx, ICMethod cctx, int position, boolean deref)
Specialized C Variable generator, allowing the specification of the variable position within its containing expression.
abstract ICElement generateC(IERoutineContext ectx, ICMethod cctx, int position)
Specialized C Variable generator, allowing the specification of the variable position within its containing expression.
abstract Long getAddress()
abstract int getId()
abstract String getName()
abstract boolean isCopy()
abstract boolean isGlobalReference()
abstract boolean isGlobalVariable()
abstract boolean isPhysicalRegister()
abstract boolean isPseudoVar()
abstract boolean isReference()
abstract boolean isRegister()
abstract boolean isRoutineScope()
abstract boolean isStackReference()
abstract boolean isStackVariable()
abstract boolean isTypeable()
abstract boolean isVirtualRegister()
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
From interface com.pnfsoftware.jeb.core.units.code.IVariable
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric
From interface com.pnfsoftware.jeb.util.collect.ISegment
From interface java.lang.Comparable

Constants

public static final int FLAG_LIKELY_COPIED_PARAM

Variables with this flag are stack variables likely to be copies of input parameters, that may have been provided in physical registers.

SUch variables should not be treated as local vars when it comes to may-use/may-def calculations for statements that access memory, such as EMem or ECall. That yields cleaner conservative data chains.

Constant Value: 64 (0x00000040)

public static final int FLAG_LIKELY_SAVED_VAR

Variables with this flag are stack variables likely to be defensive copies of registers that need to be preserved.

Such variables should not be treated as local vars when it comes to may-use/may-def calculations for statements that access memory, such as EMem or ECall. That yields cleaner conservative data chains.

Constant Value: 32 (0x00000020)

public static final int FLAG_NO_COPY

This variable should not be copied: duplicates, pairs, splits generally created during SSA- or SSA-like passes are forbidden. The original var should be used (and therefore, types are unlikely to be applied to it.)

Constant Value: 16 (0x00000010)

public static final int IDL_BEGIN

Constant Value: 1 (0x00000001)

public static final int IDL_COPY

Start of full range for copy variables. The full range consists of: duplicates (mirrors + secondary duplicates), mergers, and slices.

Constant Value: 65536 (0x00010000)

public static final int IDL_COPY_DUP2

SOR for additional (secondary) duplicates of IEVar-registers.

Constant Value: 196608 (0x00030000)

public static final int IDL_COPY_DUP2_END

EOR for additional (secondary) duplicates of IEVar-registers.

Constant Value: 1245184 (0x00130000)

public static final int IDL_COPY_DUPFULL

SOR for duplicates (mirrors and secondary duplicates).

Constant Value: 65536 (0x00010000)

public static final int IDL_COPY_DUPFULL_END

EOR for duplicates (mirrors and secondary duplicates).

Constant Value: 1245184 (0x00130000)

public static final int IDL_COPY_END

End of full range for copy variables. The full range consists of: duplicates (mirrors + secondary duplicates), mergers, and slices.

Constant Value: 1769472 (0x001b0000)

public static final int IDL_COPY_MERGER

SOR for copies that consist of mergers of 2 or more IEVar-registers.

Constant Value: 1245184 (0x00130000)

public static final int IDL_COPY_MERGER_END

EOR for copies that consist of mergers of 2 or more IEVar-registers.

Constant Value: 1507328 (0x00170000)

public static final int IDL_COPY_SLICE

SOR for partial (truncated, slices) copies of IEVar-registers.

Constant Value: 1507328 (0x00170000)

public static final int IDL_COPY_SLICE_END

EOR for partial (truncated, slices) copies of IEVar-registers.

Constant Value: 1769472 (0x001b0000)

public static final int IDL_END

Constant Value: 2147483647 (0x7fffffff)

public static final int IDL_MIRROR

SOR for primary duplicates (primary dup. = "mirror") of IEVar-registers. Note that the range must have same size as the full register range.

Constant Value: 65536 (0x00010000)

public static final int IDL_MIRROR_END

EOR for primary duplicates (primary dup. = "mirror") of IEVar-registers. Note that the range must have same size as the full register range.

Constant Value: 196608 (0x00030000)

public static final int IDL_PSEUDO_VAR

Constant Value: 1 (0x00000001)

public static final int IDL_PSEUDO_VAR_END

Constant Value: 2 (0x00000002)

public static final int IDL_SPECIAL

Constant Value: 2 (0x00000002)

public static final int IDL_SPECIAL_END

Constant Value: 65536 (0x00010000)

public static final int IDL_STACKVAR

Constant Value: 33554432 (0x02000000)

public static final int IDL_STACKVAR_BASE

Constant Value: 1073741824 (0x40000000)

public static final int IDL_STACKVAR_END

Constant Value: 2147483647 (0x7fffffff)

public static final int IDL_SYMBOL

Start of range for stack-variable references.

Constant Value: 8388608 (0x00800000)

public static final int IDL_SYMBOL_END

End of range for stack-variable references.

Constant Value: 8454144 (0x00810000)

public static final int IDL_VIRTUAL

Constant Value: 16777216 (0x01000000)

public static final int IDL_VIRTUAL_END

Constant Value: 33554432 (0x02000000)

public static final int ID_BEGIN

Constant Value: 0 (0x00000000)

public static final int ID_END

Constant Value: 2147483647 (0x7fffffff)

public static final int ID_MEMVAR

Constant Value: 16777216 (0x01000000)

public static final int ID_MEMVAR_END

Constant Value: 2147483647 (0x7fffffff)

public static final int ID_PHYSICAL_REGISTER

Constant Value: 0 (0x00000000)

public static final int ID_PHYSICAL_REGISTER_END

Constant Value: 65536 (0x00010000)

public static final int ID_PSEUDO_VAR

Constant Value: -1 (0xffffffff)

public static final int ID_REGISTER

Constant Value: 0 (0x00000000)

public static final int ID_REGISTER_END

Constant Value: 131072 (0x00020000)

public static final int ID_SYMBOL

Constant Value: 131072 (0x00020000)

public static final int ID_SYMBOL_END

Constant Value: 196608 (0x00030000)

public static final int ID_VIRTUAL_REGISTER

Constant Value: 65536 (0x00010000)

public static final int ID_VIRTUAL_REGISTER_END

Constant Value: 131072 (0x00020000)

public static final int REGISTER_RANGE_SIZE

Constant Value: 131072 (0x00020000)

Public Methods

public abstract void copyProperties (IEVar dst)

public abstract ICElement generateC (IERoutineContext ectx, ICMethod cctx, int position, boolean deref)

Specialized C Variable generator, allowing the specification of the variable position within its containing expression.

Parameters
position variable "position": 0=unknown, 1=left-side of EAssign, 2=function parameter
deref generate a dereferenced version of the variable

public abstract ICElement generateC (IERoutineContext ectx, ICMethod cctx, int position)

Specialized C Variable generator, allowing the specification of the variable position within its containing expression.

Parameters
position variable "position": 0=unknown, 1=left-side of EAssign, 2=function parameter

public abstract Long getAddress ()

public abstract int getId ()

public abstract String getName ()

public abstract boolean isCopy ()

public abstract boolean isGlobalReference ()

public abstract boolean isGlobalVariable ()

public abstract boolean isPhysicalRegister ()

public abstract boolean isPseudoVar ()

public abstract boolean isReference ()

public abstract boolean isRegister ()

public abstract boolean isRoutineScope ()

public abstract boolean isStackReference ()

public abstract boolean isStackVariable ()

public abstract boolean isTypeable ()

public abstract boolean isVirtualRegister ()