Header menu logo B2R2

ConcStateAccessor Type

Provides structured access to a concrete EvalState.

Constructors

Constructor Description

ConcStateAccessor(hdl, state)

Full Usage: ConcStateAccessor(hdl, state)

Parameters:
Returns: ConcStateAccessor
hdl : BinHandle
state : EvalState
Returns: ConcStateAccessor

ConcStateAccessor(hdl, state, os)

Full Usage: ConcStateAccessor(hdl, state, os)

Parameters:
Returns: ConcStateAccessor
hdl : BinHandle
state : EvalState
os : OS
Returns: ConcStateAccessor

Instance members

Instance member Description

this.AllocateStackBuffer

Full Usage: this.AllocateStackBuffer

Parameters:
    size : int

Returns: uint64

Allocate a buffer from the current stack and return its address.

size : int
Returns: uint64

this.GetRegister

Full Usage: this.GetRegister

Parameters:
Returns: BitVector

Get a register value by register ID.

rid : RegisterID
Returns: BitVector

this.GetRegister

Full Usage: this.GetRegister

Parameters:
    name : string

Returns: BitVector

Get a register value by name.

name : string
Returns: BitVector

this.GetReturnValue

Full Usage: this.GetReturnValue

Returns: BitVector

Get the return value for the supported ABI.

Returns: BitVector

this.InitializeDefaultStack

Full Usage: this.InitializeDefaultStack

Initialize the stack pointer with the default stack top.

this.InitializeFramePointer

Full Usage: this.InitializeFramePointer

Initialize the frame pointer with the current stack pointer.

this.InitializeStack

Full Usage: this.InitializeStack

Parameters:
    stackTop : uint64

Initialize the stack pointer with the given stack top.

stackTop : uint64

this.PopFromStack

Full Usage: this.PopFromStack

Returns: BitVector

Pop a word-sized value from the stack.

Returns: BitVector

this.PopPointer

Full Usage: this.PopPointer

Returns: uint64

Pop a word-sized pointer value from the stack.

Returns: uint64

this.PushPointer

Full Usage: this.PushPointer

Parameters:
Returns: uint64

Push a word-sized pointer value to the stack and return its address.

value : Addr
Returns: uint64

this.PushToStack

Full Usage: this.PushToStack

Parameters:
Returns: uint64

Push a word-sized value to the stack and return its address.

value : BitVector
Returns: uint64

this.ReadBytes

Full Usage: this.ReadBytes

Parameters:
    addr : Addr
    length : int

Returns: byte array

Read concrete bytes from memory.

addr : Addr
length : int
Returns: byte array

this.ReadCString

Full Usage: this.ReadCString

Parameters:
    addr : Addr
    maxLength : int

Returns: string

Read a null-terminated ASCII string from memory.

addr : Addr
maxLength : int
Returns: string

this.ReadPointer

Full Usage: this.ReadPointer

Parameters:
Returns: uint64

Read a word-sized pointer value from memory.

addr : Addr
Returns: uint64

this.SetArgument

Full Usage: this.SetArgument

Parameters:

Set an integer or pointer argument for the supported ABI.

idx : int
value : BitVector

this.SetRegister

Full Usage: this.SetRegister

Parameters:

Set a register value by register ID.

rid : RegisterID
value : BitVector

this.SetRegister

Full Usage: this.SetRegister

Parameters:

Set a register value by name.

name : string
value : BitVector

this.SetStackPointer

Full Usage: this.SetStackPointer

Parameters:
    addr : uint64

Set the current stack pointer value.

addr : uint64

this.StackPointer

Full Usage: this.StackPointer

Returns: uint64

Current stack pointer value.

Returns: uint64

this.State

Full Usage: this.State

Returns: EvalState

The underlying concrete state.

Returns: EvalState

this.WordBytes

Full Usage: this.WordBytes

Returns: int

Target word size in bytes.

Returns: int

this.WordType

Full Usage: this.WordType

Returns: int<MeasureProduct<rt, MeasureOne>>

Target word-sized register type.

Returns: int<MeasureProduct<rt, MeasureOne>>

this.WordValue

Full Usage: this.WordValue

Parameters:
    value : uint64

Returns: BitVector

Creates a word-sized concrete value.

value : uint64
Returns: BitVector

this.WriteBytes

Full Usage: this.WriteBytes

Parameters:
    addr : Addr
    bytes : byte[]

Write concrete bytes to memory.

addr : Addr
bytes : byte[]

this.WriteInteger

Full Usage: this.WriteInteger

Parameters:

Write a concrete integer value to memory.

addr : Addr
value : uint64
typ : RegType

this.WritePointer

Full Usage: this.WritePointer

Parameters:

Write a word-sized pointer value to memory.

addr : Addr
value : Addr

this.ZeroRegisters

Full Usage: this.ZeroRegisters

Parameters:

Clear selected registers to zero.

rids : RegisterID[]

this.ZeroRegisters

Full Usage: this.ZeroRegisters

Parameters:
    names : string[]

Clear selected registers to zero.

names : string[]

Static members

Static member Description

ConcStateAccessor.DefaultStackTop

Full Usage: ConcStateAccessor.DefaultStackTop

Returns: uint64

Default stack top used by concrete states.

Returns: uint64

Type something to start searching.