decompiler  1.0.0
Public Member Functions | Private Attributes | Friends | List of all members
ghidra::JoinRecord Class Reference

A record describing how logical values are split. More...

#include <translate.hh>

Public Member Functions

int4 numPieces (void) const
 Get number of pieces in this record.
 
bool isFloatExtension (void) const
 Does this record extend a float varnode.
 
const VarnodeDatagetPiece (int4 i) const
 Get the i-th piece.
 
const VarnodeDatagetUnified (void) const
 Get the Varnode whole.
 
Address getEquivalentAddress (uintb offset, int4 &pos) const
 Given offset in join space, get equivalent address of piece. More...
 
bool operator< (const JoinRecord &op2) const
 Compare records lexigraphically by pieces. More...
 

Private Attributes

vector< VarnodeDatapieces
 All the physical pieces of the symbol.
 
VarnodeData unified
 Special entry representing entire symbol in one chunk.
 

Friends

class AddrSpaceManager
 

Detailed Description

A record describing how logical values are split.

The decompiler can describe a logical value that is stored split across multiple physical memory locations. This record describes such a split. The pieces must be listed from most significant to least significant.

Member Function Documentation

◆ getEquivalentAddress()

Address ghidra::JoinRecord::getEquivalentAddress ( uintb  offset,
int4 &  pos 
) const

Given offset in join space, get equivalent address of piece.

The join space range maps to the underlying pieces in a natural endian aware way. Given an offset in the range, figure out what address it is mapping to. The particular piece is passed back as an index, and the Address is returned.

Parameters
offsetis the offset within this range to map
poswill hold the passed back piece index
Returns
the Address mapped to

Referenced by ghidra::JoinSpace::overlapJoin(), and ghidra::AddrSpaceManager::renormalizeJoinAddress().

◆ operator<()

bool ghidra::JoinRecord::operator< ( const JoinRecord op2) const

Compare records lexigraphically by pieces.

Allow sorting on JoinRecords so that a collection of pieces can be quickly mapped to its logical whole, specified with a join address

References pieces, ghidra::VarnodeData::size, and unified.


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