Ghidra 11.3.2
Ghidra internal decompiler documentation.
Loading...
Searching...
No Matches
ghidra::ParameterSymbol Class Reference

A parameter with a formal backing Symbol. More...

#include <fspec.hh>

Inheritance diagram for ghidra::ParameterSymbol:
[legend]
Collaboration diagram for ghidra::ParameterSymbol:
[legend]

Public Member Functions

 ParameterSymbol (void)
 Constructor.
 
virtual const string & getName (void) const
 Get the name of the parameter ("" for return value)
 
virtual DatatypegetType (void) const
 Get the data-type associate with this.
 
virtual Address getAddress (void) const
 Get the storage address for this parameter.
 
virtual int4 getSize (void) const
 Get the number of bytes occupied by this parameter.
 
virtual bool isTypeLocked (void) const
 Is the parameter data-type locked.
 
virtual bool isNameLocked (void) const
 Is the parameter name locked.
 
virtual bool isSizeTypeLocked (void) const
 Is the size of the parameter locked.
 
virtual bool isThisPointer (void) const
 Is this the "this" pointer for a class method.
 
virtual bool isIndirectStorage (void) const
 Is this really a pointer to the true parameter.
 
virtual bool isHiddenReturn (void) const
 Is this a pointer to storage for a return value.
 
virtual bool isNameUndefined (void) const
 Is the name of this parameter undefined.
 
virtual void setTypeLock (bool val)
 Toggle the lock on the data-type.
 
virtual void setNameLock (bool val)
 Toggle the lock on the name.
 
virtual void setThisPointer (bool val)
 Toggle whether this is the "this" pointer for a class method.
 
virtual void overrideSizeLockType (Datatype *ct)
 Change (override) the data-type of a size-locked parameter.
 
virtual void resetSizeLockType (TypeFactory *factory)
 Clear this parameter's data-type preserving any size-lock.
 
virtual ProtoParameterclone (void) const
 Clone the parameter.
 
virtual SymbolgetSymbol (void) const
 Retrieve the formal Symbol associated with this parameter.
 
- Public Member Functions inherited from ghidra::ProtoParameter
 ProtoParameter (void)
 Constructor.
 
virtual ~ProtoParameter (void)
 Destructor.
 
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.
 

Private Attributes

Symbolsym
 Backing Symbol for this parameter.
 

Friends

class ProtoStoreSymbol
 

Detailed Description

A parameter with a formal backing Symbol.

Input parameters generally have a symbol associated with them. This class holds a reference to the Symbol object and pulls the relevant parameter information off of it.

Member Function Documentation

◆ clone()

ProtoParameter * ghidra::ParameterSymbol::clone ( void  ) const
virtual

Clone the parameter.

Implements ghidra::ProtoParameter.

◆ getAddress()

Address ghidra::ParameterSymbol::getAddress ( void  ) const
virtual

Get the storage address for this parameter.

Implements ghidra::ProtoParameter.

References ghidra::SymbolEntry::getAddr(), ghidra::Symbol::getFirstWholeMap(), and sym.

◆ getName()

const string & ghidra::ParameterSymbol::getName ( void  ) const
virtual

Get the name of the parameter ("" for return value)

Implements ghidra::ProtoParameter.

References ghidra::Symbol::getName(), and sym.

◆ getSize()

int4 ghidra::ParameterSymbol::getSize ( void  ) const
virtual

Get the number of bytes occupied by this parameter.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::getFirstWholeMap(), ghidra::SymbolEntry::getSize(), and sym.

◆ getSymbol()

Symbol * ghidra::ParameterSymbol::getSymbol ( void  ) const
virtual

Retrieve the formal Symbol associated with this parameter.

If there is no backing symbol an exception is thrown

Returns
the backing Symbol object

Implements ghidra::ProtoParameter.

References sym.

◆ getType()

Datatype * ghidra::ParameterSymbol::getType ( void  ) const
virtual

Get the data-type associate with this.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::getType(), and sym.

◆ isHiddenReturn()

bool ghidra::ParameterSymbol::isHiddenReturn ( void  ) const
virtual

Is this a pointer to storage for a return value.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isHiddenReturn(), and sym.

◆ isIndirectStorage()

bool ghidra::ParameterSymbol::isIndirectStorage ( void  ) const
virtual

Is this really a pointer to the true parameter.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isIndirectStorage(), and sym.

◆ isNameLocked()

bool ghidra::ParameterSymbol::isNameLocked ( void  ) const
virtual

Is the parameter name locked.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isNameLocked(), and sym.

◆ isNameUndefined()

bool ghidra::ParameterSymbol::isNameUndefined ( void  ) const
virtual

Is the name of this parameter undefined.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isNameUndefined(), and sym.

◆ isSizeTypeLocked()

bool ghidra::ParameterSymbol::isSizeTypeLocked ( void  ) const
virtual

Is the size of the parameter locked.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isSizeTypeLocked(), and sym.

◆ isThisPointer()

bool ghidra::ParameterSymbol::isThisPointer ( void  ) const
virtual

Is this the "this" pointer for a class method.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isThisPointer(), and sym.

◆ isTypeLocked()

bool ghidra::ParameterSymbol::isTypeLocked ( void  ) const
virtual

Is the parameter data-type locked.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::isTypeLocked(), and sym.

◆ overrideSizeLockType()

void ghidra::ParameterSymbol::overrideSizeLockType ( Datatype ct)
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.

Parameters
ctis the overriding data-type

Implements ghidra::ProtoParameter.

References ghidra::Symbol::getScope(), ghidra::Scope::overrideSizeLockType(), and sym.

◆ resetSizeLockType()

void ghidra::ParameterSymbol::resetSizeLockType ( TypeFactory factory)
virtual

Clear this parameter's data-type preserving any size-lock.

The data-type is converted to a TYPE_UNKNOWN of the same size

Parameters
factoryis the TypeFactory that will construct the unknown data-type

Implements ghidra::ProtoParameter.

References ghidra::Symbol::getScope(), ghidra::Scope::resetSizeLockType(), and sym.

◆ setNameLock()

void ghidra::ParameterSymbol::setNameLock ( bool  val)
virtual

◆ setThisPointer()

void ghidra::ParameterSymbol::setThisPointer ( bool  val)
virtual

Toggle whether this is the "this" pointer for a class method.

Implements ghidra::ProtoParameter.

References ghidra::Symbol::getScope(), ghidra::Scope::setThisPointer(), and sym.

◆ setTypeLock()

void ghidra::ParameterSymbol::setTypeLock ( bool  val)
virtual

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