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

A description where and how data was loaded from memory. More...

#include <jumptable.hh>

Public Member Functions

 LoadTable (const Address &ad, int4 sz)
 Constructor for a single entry table.
 
 LoadTable (const Address &ad, int4 sz, int4 nm)
 Construct a full table.
 
bool operator< (const LoadTable &op2) const
 Compare this with another table by address.
 
void encode (Encoder &encoder) const
 Encode a description of this as an <loadtable> element. More...
 
void decode (Decoder &decoder)
 Decode this table from a <loadtable> element. More...
 

Static Public Member Functions

static void collapseTable (vector< LoadTable > &table)
 Collapse a sequence of table descriptions. More...
 

Private Attributes

Address addr
 Starting address of table.
 
int4 size
 Size of table entry.
 
int4 num
 Number of entries in table;.
 

Friends

class EmulateFunction
 

Detailed Description

A description where and how data was loaded from memory.

This is a generic table description, giving the starting address of the table, the size of an entry, and number of entries.

Member Function Documentation

◆ collapseTable()

void ghidra::LoadTable::collapseTable ( vector< LoadTable > &  table)
static

Collapse a sequence of table descriptions.

We assume the list of LoadTable entries is sorted and perform an in-place collapse of any sequences into a single LoadTable entry.

Parameters
tableis the list of entries to collapse

Referenced by ghidra::EmulateFunction::collectLoadPoints().

◆ decode()

void ghidra::LoadTable::decode ( Decoder decoder)

Decode this table from a <loadtable> element.

Parameters
decoderis the stream decoder

References addr, ghidra::Decoder::closeElement(), ghidra::Address::decode(), num, ghidra::Decoder::openElement(), ghidra::Decoder::readSignedInteger(), and size.

◆ encode()

void ghidra::LoadTable::encode ( Encoder encoder) const

Encode a description of this as an <loadtable> element.

Parameters
encoderis the stream encoder

References addr, ghidra::Encoder::closeElement(), ghidra::Address::encode(), num, ghidra::Encoder::openElement(), size, and ghidra::Encoder::writeSignedInteger().


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