Ghidra Decompiler Analysis Engine
Public Member Functions | Static Public Member Functions | List of all members
BlockVarnode Class Reference

Helper class associating a Varnode with the block where it is defined. More...

#include <merge.hh>

Public Member Functions

void set (Varnode *v)
 Set this as representing the given Varnode. More...
 

Static Public Member Functions

static int4 findFront (int4 blocknum, const vector< BlockVarnode > &list)
 Find the first Varnode defined in the BlockBasic of the given index. More...
 

Detailed Description

Helper class associating a Varnode with the block where it is defined.

This class explicitly stores a Varnode with the index of the BlockBasic that defines it. If a Varnode does not have a defining PcodeOp it is assigned an index of 0. This facilitates quicker sorting of Varnodes based on their defining block.

Member Function Documentation

◆ findFront()

int4 BlockVarnode::findFront ( int4  blocknum,
const vector< BlockVarnode > &  list 
)
static

Find the first Varnode defined in the BlockBasic of the given index.

A BlockVarnode is identified from a sorted list. The position of the first BlockVarnode in this list that has the given BlockBasic index is returned.

Parameters
blocknumis the index of the BlockBasic to search for
listis the sorted list of BlockVarnodes
Returns
the index of the BlockVarnode within the list or -1 if no Varnode in the block is found

◆ set()

void BlockVarnode::set ( Varnode v)

Set this as representing the given Varnode.

This instance assumes the identity of the given Varnode and the defining index is cached to facilitate quick sorting.

Parameters
vis the given Varnode

The documentation for this class was generated from the following files: