Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
A function parameter viewed as a name, data-type, and storage address. More...
#include <fspec.hh>
Public Member Functions | |
ProtoParameter (void) | |
Constructor. | |
virtual | ~ProtoParameter (void) |
Destructor. | |
virtual const string & | getName (void) const =0 |
Get the name of the parameter ("" for return value) | |
virtual Datatype * | getType (void) const =0 |
Get the data-type associate with this. | |
virtual Address | getAddress (void) const =0 |
Get the storage address for this parameter. | |
virtual int4 | getSize (void) const =0 |
Get the number of bytes occupied by this parameter. | |
virtual bool | isTypeLocked (void) const =0 |
Is the parameter data-type locked. | |
virtual bool | isNameLocked (void) const =0 |
Is the parameter name locked. | |
virtual bool | isSizeTypeLocked (void) const =0 |
Is the size of the parameter locked. | |
virtual bool | isThisPointer (void) const =0 |
Is this the "this" pointer for a class method. | |
virtual bool | isIndirectStorage (void) const =0 |
Is this really a pointer to the true parameter. | |
virtual bool | isHiddenReturn (void) const =0 |
Is this a pointer to storage for a return value. | |
virtual bool | isNameUndefined (void) const =0 |
Is the name of this parameter undefined. | |
virtual void | setTypeLock (bool val)=0 |
Toggle the lock on the data-type. | |
virtual void | setNameLock (bool val)=0 |
Toggle the lock on the name. | |
virtual void | setThisPointer (bool val)=0 |
Toggle whether this is the "this" pointer for a class method. | |
virtual void | overrideSizeLockType (Datatype *ct)=0 |
Change (override) the data-type of a size-locked parameter. | |
virtual void | resetSizeLockType (TypeFactory *factory)=0 |
Clear this parameter's data-type preserving any size-lock. | |
virtual ProtoParameter * | clone (void) const =0 |
Clone the parameter. | |
virtual Symbol * | getSymbol (void) const =0 |
Retrieve the formal Symbol associated with this parameter. | |
bool | operator== (const ProtoParameter &op2) const |
Compare storage location and data-type for equality. | |
bool | operator!= (const ProtoParameter &op2) const |
Compare storage location and data-type for inequality. | |
A function parameter viewed as a name, data-type, and storage address.
This is the base class, with derived classes determining what is backing up the information, whether is it a formal Symbol or just internal storage. Both input parameters and return values can be represented with this object.
|
pure virtual |
Clone the parameter.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ProtoStoreSymbol::clone(), and ghidra::ProtoStoreInternal::clone().
|
pure virtual |
Get the storage address for this parameter.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ActionPrototypeTypes::apply(), ghidra::ActionParamDouble::apply(), ghidra::ActionRestrictLocal::apply(), ghidra::FuncCallSpecs::buildParam(), ghidra::FuncProto::characterizeAsInputParam(), ghidra::FuncProto::characterizeAsOutput(), ghidra::FuncCallSpecs::commitNewInputs(), ghidra::FuncCallSpecs::commitNewOutputs(), ghidra::FuncProto::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::ProtoStoreInternal::encode(), ghidra::FuncProto::encode(), ghidra::ActionFuncLink::funcLinkInput(), ghidra::ActionFuncLink::funcLinkOutput(), ghidra::FuncProto::getBiggestContainedInputParam(), ghidra::FuncProto::getBiggestContainedOutput(), operator==(), ghidra::FuncProto::possibleInputParam(), ghidra::FuncProto::possibleOutputParam(), ghidra::FuncProto::resolveExtraPop(), ghidra::FuncCallSpecs::resolveSpacebaseRelative(), ghidra::FuncCallSpecs::transferLockedInputParam(), ghidra::FuncCallSpecs::transferLockedOutputParam(), ghidra::Heritage::tryOutputStackGuard(), ghidra::FuncProto::unjustifiedInputParam(), and ghidra::FuncProto::updateOutputTypes().
|
pure virtual |
Get the name of the parameter ("" for return value)
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ProtoStoreInternal::encode(), ghidra::FuncProto::getPieces(), ghidra::ActionNameVars::makeRec(), and ghidra::FuncProto::paramShift().
|
pure virtual |
Get the number of bytes occupied by this parameter.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ActionPrototypeTypes::apply(), ghidra::ActionRestrictLocal::apply(), ghidra::FuncCallSpecs::buildParam(), ghidra::FuncProto::characterizeAsInputParam(), ghidra::FuncProto::characterizeAsOutput(), ghidra::FuncCallSpecs::commitNewInputs(), ghidra::FuncCallSpecs::commitNewOutputs(), ghidra::FuncProto::encode(), ghidra::ActionFuncLink::funcLinkInput(), ghidra::ActionFuncLink::funcLinkOutput(), ghidra::FuncProto::getBiggestContainedInputParam(), ghidra::FuncProto::getBiggestContainedOutput(), ghidra::ActionNameVars::makeRec(), ghidra::FuncProto::possibleInputParam(), ghidra::FuncProto::possibleOutputParam(), ghidra::FuncProto::resolveExtraPop(), ghidra::FuncCallSpecs::transferLockedInputParam(), ghidra::FuncCallSpecs::transferLockedOutputParam(), ghidra::Heritage::tryOutputStackGuard(), ghidra::FuncProto::unjustifiedInputParam(), and ghidra::FuncProto::updateOutputTypes().
|
pure virtual |
Retrieve the formal Symbol associated with this parameter.
If there is no backing symbol an exception is thrown
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::PrintC::emitPrototypeInputs().
|
pure virtual |
Get the data-type associate with this.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ActionPrototypeTypes::apply(), ghidra::ActionParamDouble::apply(), ghidra::FuncProto::characterizeAsOutput(), ghidra::ActionConstantPtr::checkCopy(), ghidra::FuncCallSpecs::commitNewOutputs(), ghidra::TypeCode::compare(), ghidra::TypeCode::compareDependency(), ghidra::FuncProto::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::PrintC::emitPrototypeInputs(), ghidra::ProtoStoreInternal::encode(), ghidra::FuncProto::encode(), ghidra::ActionPrototypeTypes::extendInput(), ghidra::ActionFuncLink::funcLinkOutput(), ghidra::FuncProto::getBiggestContainedOutput(), ghidra::TypeOpCall::getInputLocal(), ghidra::TypeOpCallind::getInputLocal(), ghidra::FuncProto::getOutputType(), ghidra::FuncProto::getPieces(), ghidra::ActionConstantPtr::isPointer(), ghidra::ActionNameVars::makeRec(), operator==(), ghidra::FuncProto::paramShift(), ghidra::FuncProto::possibleOutputParam(), ghidra::FuncProto::printRaw(), ghidra::PrintC::pushPrototypeInputs(), ghidra::ScoreUnionFields::scoreParameter(), ghidra::TypeStruct::scoreSingleComponent(), and ghidra::FuncCallSpecs::transferLockedOutput().
|
pure virtual |
Is this a pointer to storage for a return value.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ProtoStoreInternal::encode(), and ghidra::FuncProto::updateThisPointer().
|
pure virtual |
Is this really a pointer to the true parameter.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ProtoStoreInternal::decode(), and ghidra::ProtoStoreInternal::encode().
|
pure virtual |
Is the parameter name locked.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ProtoStoreInternal::encode(), and ghidra::ActionNameVars::makeRec().
|
pure virtual |
Is the name of this parameter undefined.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ActionNameVars::makeRec().
|
pure virtual |
Is the size of the parameter locked.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ActionOutputPrototype::apply(), ghidra::FuncProto::clearUnlockedOutput(), and ghidra::FuncProto::updateOutputTypes().
|
pure virtual |
Is this the "this" pointer for a class method.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::PrintC::emitPrototypeInputs(), ghidra::ProtoStoreInternal::encode(), ghidra::PrintC::getHiddenThisSlot(), ghidra::TypeOpCall::getInputLocal(), ghidra::TypeOpCallind::getInputLocal(), and ghidra::Funcdata::prepareThisPointer().
|
pure virtual |
Is the parameter data-type locked.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ActionOutputPrototype::apply(), ghidra::FuncProto::characterizeAsInputParam(), ghidra::FuncProto::clearUnlockedOutput(), ghidra::ProtoStoreInternal::decode(), ghidra::ProtoStoreInternal::encode(), ghidra::FuncProto::encode(), ghidra::FuncProto::getBiggestContainedInputParam(), ghidra::TypeOpCall::getInputLocal(), ghidra::TypeOpCallind::getInputLocal(), ghidra::FuncProto::isInputLocked(), ghidra::FuncProto::isOutputLocked(), ghidra::FuncProto::possibleInputParam(), ghidra::Funcdata::prepareThisPointer(), ghidra::FuncProto::unjustifiedInputParam(), and ghidra::FuncProto::updateOutputTypes().
|
inline |
Compare storage location and data-type for inequality.
op2 | is the parameter to compare with this |
|
inline |
Compare storage location and data-type for equality.
op2 | is the parameter to compare with this |
References getAddress(), and getType().
|
pure virtual |
Change (override) the data-type of a size-locked parameter.
The original parameter must have a type-lock and TYPE_UNKNOWN data-type. The size-lock is preserved and this can be cleared back to its TYPE_UNKNOWN state.
ct | is the overriding data-type |
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::FuncProto::updateOutputTypes().
|
pure virtual |
Clear this parameter's data-type preserving any size-lock.
The data-type is converted to a TYPE_UNKNOWN of the same size
factory | is the TypeFactory that will construct the unknown data-type |
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::FuncProto::clearUnlockedOutput().
|
pure virtual |
Toggle the lock on the name.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::ProtoStoreInternal::decode().
|
pure virtual |
Toggle whether this is the "this" pointer for a class method.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::FuncProto::updateThisPointer().
|
pure virtual |
Toggle the lock on the data-type.
Implemented in ghidra::ParameterBasic, and ghidra::ParameterSymbol.
Referenced by ghidra::FuncProto::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::FuncProto::setInputLock(), and ghidra::FuncProto::setOutputLock().