Header menu logo B2R2

LowUIRStream Type

Provides a stream for building LowUIR statements. This will accumulate LowUIR statements and return them as an array when requested. It also maintains internal counters for temporary variables and labels to avoid name collisions.

Constructors

Constructor Description

LowUIRStream()

Full Usage: LowUIRStream()

Returns: LowUIRStream

Create a new LowUIRStream.

Returns: LowUIRStream

LowUIRStream(capacity)

Full Usage: LowUIRStream(capacity)

Parameters:
    capacity : int

Returns: LowUIRStream
capacity : int
Returns: LowUIRStream

Instance members

Instance member Description

this.Append

Full Usage: this.Append

Parameters:
    stmt : Stmt - IR statement to add.

Append a new IR statement to the builder.

stmt : Stmt

IR statement to add.

this.Append

Full Usage: this.Append

Parameters:
    addr : uint64
    stmt : Stmt - IR statement to add.

Append a new IR statement to the builder and set the instruction address. This is used for the very first statement of an instruction.

addr : uint64
stmt : Stmt

IR statement to add.

this.MarkEnd

Full Usage: this.MarkEnd

Parameters:
    insLen : uint32

Finishes the current instruction. This is used for the last statement of an instruction to create an IEMark statement.

insLen : uint32

this.MarkStart

Full Usage: this.MarkStart

Parameters:
    addr : uint64
    insLen : uint32

Starts a new instruction located at the given address. This is used for the very first statement of an instruction to create an ISMark statement.

addr : uint64
insLen : uint32

this.NewLabel

Full Usage: this.NewLabel

Parameters:
    name : string

Returns: Label

Create a new label.

name : string
Returns: Label

this.NewTempVar

Full Usage: this.NewTempVar

Parameters:
Returns: Expr

Create a new temporary variable of RegType (rt).

rt : RegType
Returns: Expr

this.ToStmts

Full Usage: this.ToStmts

Returns: Stmt[] Returns an array of IR statements.

Create an array of IR statements from the buffer. This function will clear up the buffer and initialize the tempvar count, too.

Returns: Stmt[]

Returns an array of IR statements.

Type something to start searching.