|
Ghidra 11.4.2
Ghidra internal decompiler documentation.
|
A collection parameter descriptions making up a function prototype. More...
#include <fspec.hh>
Public Member Functions | |
| virtual | ~ProtoStore (void) |
| Constructor. | |
| virtual ProtoParameter * | setInput (int4 i, const string &nm, const ParameterPieces &pieces)=0 |
| Establish name, data-type, storage of a specific input parameter. | |
| virtual void | clearInput (int4 i)=0 |
| Clear the input parameter at the specified slot. | |
| virtual void | clearAllInputs (void)=0 |
| Clear all input parameters (and any backing symbols) | |
| virtual int4 | getNumInputs (void) const =0 |
| Get the number of input parameters for this prototype. | |
| virtual ProtoParameter * | getInput (int4 i)=0 |
| Get the i-th input parameter (or NULL if it doesn't exist) | |
| virtual ProtoParameter * | setOutput (const ParameterPieces &piece)=0 |
| Establish the data-type and storage of the return value. | |
| virtual void | clearOutput (void)=0 |
| Clear the return value to TYPE_VOID. | |
| virtual ProtoParameter * | getOutput (void)=0 |
| Get the return-value description. | |
| virtual ProtoStore * | clone (void) const =0 |
| Clone the entire collection of parameter descriptions. | |
| virtual void | encode (Encoder &encoder) const =0 |
| Encode any parameters that are not backed by symbols to a stream. | |
| virtual void | decode (Decoder &decoder, ProtoModel *model)=0 |
| Restore any internal parameter descriptions from a stream. | |
A collection parameter descriptions making up a function prototype.
A unified interface for accessing descriptions of individual parameters in a function prototype. Both input parameters and return values are described.
|
pure virtual |
Clear all input parameters (and any backing symbols)
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::clearInput(), ghidra::FuncProto::clearUnlockedInput(), ghidra::FuncProto::updateAllTypes(), ghidra::FuncProto::updateInputNoTypes(), and ghidra::FuncProto::updateInputTypes().
|
pure virtual |
Clear the input parameter at the specified slot.
The parameter is excised, any following parameters are shifted to fill its spot. If there is a backing Symbol, it is removed from the SymbolTable
| i | is the specified parameter slot to remove |
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::removeParam().
|
pure virtual |
Clear the return value to TYPE_VOID.
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::clearUnlockedOutput(), ghidra::FuncProto::updateAllTypes(), ghidra::FuncProto::updateOutputNoTypes(), and ghidra::FuncProto::updateOutputTypes().
|
pure virtual |
Clone the entire collection of parameter descriptions.
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::copy().
|
pure virtual |
Restore any internal parameter descriptions from a stream.
Parse an <internallist> element containing <param> and <retparam> child elements.
| decoder | is the stream decoder |
| model | is prototype model for determining storage for unassigned parameters |
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::decode().
|
pure virtual |
Encode any parameters that are not backed by symbols to a stream.
Symbols are stored elsewhere, so symbol backed parameters are not serialized. If there are any internal parameters an <internallist> element is emitted.
| encoder | is the stream encoder |
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::encode().
|
pure virtual |
Get the i-th input parameter (or NULL if it doesn't exist)
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::getParam(), ghidra::FuncProto::getPieces(), and ghidra::FuncProto::updateThisPointer().
|
pure virtual |
Get the number of input parameters for this prototype.
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::getPieces(), ghidra::FuncProto::numParams(), and ghidra::FuncProto::updateThisPointer().
|
pure virtual |
Get the return-value description.
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::decode(), ghidra::FuncProto::encode(), ghidra::FuncProto::getOutput(), ghidra::FuncProto::getOutputType(), ghidra::FuncProto::getPieces(), ghidra::FuncProto::isCompatible(), ghidra::FuncProto::isOutputLocked(), and ghidra::FuncProto::setOutputLock().
|
pure virtual |
Establish name, data-type, storage of a specific input parameter.
This either allocates a new parameter or replaces the existing one at the specified input slot. If there is a backing symbol table, a Symbol is created or modified.
| i | is the specified input slot |
| nm | is the (optional) name of the parameter |
| pieces | holds the raw storage address and data-type to set |
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::paramShift(), ghidra::FuncProto::setParam(), ghidra::FuncProto::updateAllTypes(), ghidra::FuncProto::updateInputNoTypes(), and ghidra::FuncProto::updateInputTypes().
|
pure virtual |
Establish the data-type and storage of the return value.
This either allocates a new parameter or replaces the existing one. A void return value can be specified with an invalid address and TYPE_VOID data-type.
| piece | holds the raw storage address and data-type to set |
Implemented in ghidra::ProtoStoreSymbol, and ghidra::ProtoStoreInternal.
Referenced by ghidra::FuncProto::decode(), ghidra::FuncProto::paramShift(), ghidra::FuncProto::setOutput(), ghidra::FuncProto::updateAllTypes(), ghidra::FuncProto::updateOutputNoTypes(), and ghidra::FuncProto::updateOutputTypes().