decompiler  1.0.0
Classes | Typedefs | Functions
varnode.hh File Reference

The Varnode and VarnodeBank classes. More...

#include "pcoderaw.hh"
#include "cover.hh"

Classes

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

Typedefs

typedef set< Varnode *, VarnodeCompareLocDef > ghidra::VarnodeLocSet
 A set of Varnodes sorted by location (then by definition)
 
typedef set< Varnode *, VarnodeCompareDefLoc > ghidra::VarnodeDefSet
 A set of Varnodes sorted by definition (then location)
 

Functions

bool ghidra::contiguous_test (Varnode *vn1, Varnode *vn2)
 Test if Varnodes are pieces of a whole. More...
 
Varnode * ghidra::findContiguousWhole (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 ghidra::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 * ghidra::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