Package ghidra.app.util.demangler
Class AbstractDemangledFunctionDefinitionDataType
java.lang.Object
ghidra.app.util.demangler.DemangledType
ghidra.app.util.demangler.DemangledDataType
ghidra.app.util.demangler.AbstractDemangledFunctionDefinitionDataType
- All Implemented Interfaces:
Demangled
- Direct Known Subclasses:
DemangledFunctionIndirect
,DemangledFunctionPointer
,DemangledFunctionReference
Parent base class for types that represent things that refer to functions
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected static final String
protected static final String
protected static int
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected List
<DemangledDataType> protected String
protected DemangledDataType
Fields inherited from class ghidra.app.util.demangler.DemangledDataType
ARR_NOTATION, BOOL, CHAR, CHAR8_T, CLASS, COCLASS, COINTERFACE, COMPLEX, CONST, DEMANGLER_ANONYMOUS_FUNCTION_CATEGORY_PATH, DEMANGLER_ROOT_CATEGORY_PATH, DOUBLE, ENUM, FLOAT, FLOAT128, FLOAT2, INT, INT0_T, INT128, INT16, INT32, INT64, INT8, LONG, LONG_DOUBLE, LONG_LONG, PRIMITIVES, PTR_NOTATION, PTR64, REF_NOTATION, RESTRICT, RIGHT_REF_NOTATION, SHORT, SIGNED, SPACE, STRING, STRUCT, UNALIGNED, UNDEFINED, UNION, UNSIGNED, VARARGS, VOID, VOLATILE, WCHAR_T, WCHAR16, WCHAR32
Fields inherited from class ghidra.app.util.demangler.DemangledType
mangled, namespace, template
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFunctionPointerParens
(StringBuilder buffer, String s) void
addParameter
(DemangledDataType parameter) Adds a parameters to the end of the parameter list for this demangled functionprotected void
addParentName
(StringBuilder buffer) Returns the calling convention or null, if unspecifiedprotected String
getDataType
(DataTypeManager dataTypeManager) Converts this demangled datatype into the corresponding Ghidra datatypeReturns a list of the parameters for this demangled functions.Returns the return typeGenerates a complete representation of this object to include all know attributes of this objectprotected abstract String
Returns the string for this type of reference (e.g., * or &)boolean
boolean
boolean
boolean
void
setCallingConvention
(String callingConvention) Sets the function calling convention.void
void
setModifier
(String modifier) Sets the function __ modifier.void
setReturnType
(DemangledDataType returnType) Sets the return typevoid
void
void
toSignature
(String name) Methods inherited from class ghidra.app.util.demangler.DemangledDataType
getArrayDimensions, getBasedName, getDemanglerCategoryPath, getMemberScope, getPointerLevels, incrementPointerLevels, isArray, isClass, isCoclass, isCointerface, isComplex, isEnum, isLValueReference, isPointer, isPointer64, isPrimitive, isReference, isRestrict, isRValueReference, isSigned, isStruct, isTemplate, isUnaligned, isUnion, isUnsigned, isVarArgs, isVoid, setArray, setBasedName, setClass, setCoclass, setCointerface, setComplex, setEnum, setEnumType, setEnumType, setLValueReference, setMemberScope, setPointer64, setReference, setRestrict, setRValueReference, setSigned, setStruct, setTemplate, setUnaligned, setUnion, setUnsigned, setVarArgs, toString
Methods inherited from class ghidra.app.util.demangler.DemangledType
getDemangledName, getMangledString, getName, getNamespace, getNamespaceName, getNamespaceString, getOriginalDemangled, getTemplate, isConst, isVolatile, setConst, setName, setNamespace, setTemplate, setVolatile
-
Field Details
-
DEFAULT_NAME_PREFIX
- See Also:
-
EMPTY_STRING
- See Also:
-
ID
protected static int ID -
returnType
-
callingConvention
-
parameters
-
modifier
-
isConstPointer
protected boolean isConstPointer -
parentName
-
isTrailingPointer64
protected boolean isTrailingPointer64 -
isTrailingUnaligned
protected boolean isTrailingUnaligned -
isTrailingRestrict
protected boolean isTrailingRestrict
-
-
Method Details
-
getTypeString
Returns the string for this type of reference (e.g., * or &)- Returns:
- the string
-
getSignature
Description copied from interface:Demangled
Generates a complete representation of this object to include all know attributes of this object- Specified by:
getSignature
in interfaceDemangled
- Overrides:
getSignature
in classDemangledDataType
- Returns:
- the signature
-
setReturnType
Sets the return type- Parameters:
returnType
- the return type
-
getReturnType
Returns the return type- Returns:
- the return type
-
setCallingConvention
Sets the function calling convention. For example, "__cdecl"- Parameters:
callingConvention
- the function calling convention
-
getCallingConvention
Returns the calling convention or null, if unspecified- Returns:
- the calling convention or null, if unspecified
-
setModifier
Sets the function __ modifier. For example, "namespace::".- Parameters:
modifier
- the function modifier
-
isConstPointer
public boolean isConstPointer() -
setConstPointer
public void setConstPointer() -
isTrailingPointer64
public boolean isTrailingPointer64() -
setTrailingPointer64
public void setTrailingPointer64() -
isTrailingUnaligned
public boolean isTrailingUnaligned() -
setTrailingUnaligned
public void setTrailingUnaligned() -
isTrailingRestrict
public boolean isTrailingRestrict() -
setTrailingRestrict
public void setTrailingRestrict() -
addParameter
Adds a parameters to the end of the parameter list for this demangled function- Parameters:
parameter
- the new parameter to add
-
getParameters
Returns a list of the parameters for this demangled functions.- Returns:
- a list of the parameters for this demangled functions
-
toSignature
-
getConventionPointerNameString
-
addFunctionPointerParens
-
addParentName
-
getDataType
Description copied from class:DemangledDataType
Converts this demangled datatype into the corresponding Ghidra datatype- Overrides:
getDataType
in classDemangledDataType
- Parameters:
dataTypeManager
- the manager to search and whose data organization should be used- Returns:
- the Ghidra datatype corresponding to the demangled datatype
-