decompiler  1.0.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ghidra::TraverseNode Struct Reference

Node for a forward traversal of a Varnode expression. More...

#include <varnode.hh>

Public Types

enum  {
  actionalt = 1, indirect = 2, indirectalt = 4, lsb_truncated = 8,
  concat_high = 0x10
}
 

Public Member Functions

 TraverseNode (const Varnode *v, uint4 f)
 Constructor.
 

Static Public Member Functions

static bool isAlternatePathValid (const Varnode *vn, uint4 flags)
 Return true if the alternate path looks more valid than the main path. More...
 

Public Attributes

const Varnodevn
 Varnode at the point of traversal.
 
uint4 flags
 Flags associated with the node.
 

Detailed Description

Node for a forward traversal of a Varnode expression.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
actionalt 

Alternate path traverses a solid action or non-incidental COPY.

indirect 

Main path traverses an INDIRECT.

indirectalt 

Alternate path traverses an INDIRECT.

lsb_truncated 

Least significant byte(s) of original value have been truncated.

concat_high 

Original value has been concatented as most significant portion.

Member Function Documentation

◆ isAlternatePathValid()

bool ghidra::TraverseNode::isAlternatePathValid ( const Varnode vn,
uint4  flags 
)
static

Return true if the alternate path looks more valid than the main path.

Two different paths from a common Varnode each terminate at a CALL, CALLIND, or RETURN. Evaluate which path most likely represents actual parameter/return value passing, based on traversal information about each path.

Parameters
vnis the Varnode terminating the alternate path
flagsindicates traversals for both paths
Returns
true if the alternate path is preferred

References ghidra::PcodeOp::code(), ghidra::CPUI_SUBPIECE, ghidra::Varnode::getDef(), ghidra::PcodeOp::getIn(), ghidra::Varnode::getOffset(), ghidra::Varnode::getSize(), ghidra::Varnode::isInput(), ghidra::PcodeOp::isMarker(), ghidra::Varnode::isWritten(), and ghidra::Varnode::loneDescend().

Referenced by ghidra::Funcdata::checkCallDoubleUse(), and ghidra::Funcdata::onlyOpUse().


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