decompiler
1.0.0
|
A collection of named p-code sections for a single Constructor. More...
#include <slgh_compile.hh>
Public Member Functions | |
SectionVector (ConstructTpl *rtl, SymbolScope *scope) | |
Constructor. More... | |
ConstructTpl * | getMainSection (void) const |
Get the main section. | |
ConstructTpl * | getNamedSection (int4 index) const |
Get a named section by index. | |
RtlPair | getMainPair (void) const |
Get the main section/namespace pair. | |
RtlPair | getNamedPair (int4 i) const |
Get a named section/namespace pair by index. | |
void | setNextIndex (int4 i) |
Set the index of the currently parsing named section. | |
int4 | getMaxId (void) const |
Get the maximum (exclusive) named section index. | |
void | append (ConstructTpl *rtl, SymbolScope *scope) |
Add a new named section. More... | |
Private Attributes | |
int4 | nextindex |
Index of the section currently being parsed. | |
RtlPair | main |
The main section. | |
vector< RtlPair > | named |
Named sections accessed by index. | |
A collection of named p-code sections for a single Constructor.
A Constructor always has a main section of p-code (which may be empty). Alternately a Constructor may define additional named sections of p-code. Operations in these sections are emitted using the crossbuild directive and can be incorporated into following instructions.
Internally different sections (RtlPair) are identified by index. A SectionSymbol holds the section's name and its corresponding index.
ghidra::SectionVector::SectionVector | ( | ConstructTpl * | rtl, |
SymbolScope * | scope | ||
) |
Constructor.
This must be constructed with the main section of p-code, which can contain no p-code
rtl | is the main section of p-code |
scope | is the symbol scope associated with the section |
References main, nextindex, ghidra::RtlPair::scope, and ghidra::RtlPair::section.
void ghidra::SectionVector::append | ( | ConstructTpl * | rtl, |
SymbolScope * | scope | ||
) |
Add a new named section.
Associate the new section with nextindex, established prior to parsing
rtl | is the named section of p-code |
scope | is the associated symbol scope |
References named, and nextindex.
Referenced by ghidra::SleighCompile::finalNamedSection(), and ghidra::SleighCompile::nextNamedSection().