Ghidra Decompiler Analysis Engine
Classes | Typedefs | Functions
varnode.hh File Reference

The Varnode and VarnodeBank classes. More...

#include "pcoderaw.hh"
#include "cover.hh"
Include dependency graph for varnode.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VarnodeCompareLocDef
 Compare two Varnode pointers by location then definition. More...
 
struct  VarnodeCompareDefLoc
 Compare two Varnode pointers by definition then location. More...
 
class  Varnode
 A low-level variable or contiguous set of bytes described by an Address and a size. More...
 
class  VarnodeBank
 A container for Varnode objects from a specific function. More...
 

Typedefs

typedef set< Varnode *, VarnodeCompareLocDefVarnodeLocSet
 A set of Varnodes sorted by location (then by definition)
 
typedef set< Varnode *, VarnodeCompareDefLocVarnodeDefSet
 A set of Varnodes sorted by definition (then location)
 

Functions

bool contiguous_test (Varnode *vn1, Varnode *vn2)
 Test if Varnodes are pieces of a whole. More...
 
VarnodefindContiguousWhole (Funcdata &data, Varnode *vn1, Varnode *vn2)
 Retrieve the whole Varnode given pieces. More...
 

Detailed Description

The Varnode and VarnodeBank classes.

Function Documentation

◆ contiguous_test()

bool contiguous_test ( Varnode vn1,
Varnode vn2 
)

Test if Varnodes are pieces of a whole.

Return true if vn1 contains the high part and vn2 the low part of what was(is) a single value.

Parameters
vn1is the putative high Varnode
vn2is the putative low Varnode
Returns
true if they are pieces of a whole

◆ findContiguousWhole()

Varnode* findContiguousWhole ( Funcdata data,
Varnode vn1,
Varnode vn2 
)

Retrieve the whole Varnode given pieces.

Assuming vn1,vn2 has passed the contiguous_test(), return the Varnode containing the whole value.

Parameters
datais the underlying function
vn1is the high Varnode
vn2is the low Varnode
Returns
the whole Varnode