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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected static final Stringprotected static final Stringprotected static intprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected List<DemangledDataType> protected Stringprotected DemangledDataTypeFields 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, WCHAR32Fields inherited from class ghidra.app.util.demangler.DemangledType
mangled, namespace, template -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFunctionPointerParens(StringBuilder buffer, String s) voidaddParameter(DemangledDataType parameter) Adds a parameters to the end of the parameter list for this demangled functionprotected voidaddParentName(StringBuilder buffer) Returns the calling convention or null, if unspecifiedprotected StringgetDataType(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 StringReturns the string for this type of reference (e.g., * or &)booleanbooleanbooleanbooleanvoidsetCallingConvention(String callingConvention) Sets the function calling convention.voidvoidsetModifier(String modifier) Sets the function __ modifier.voidsetReturnType(DemangledDataType returnType) Sets the return typevoidvoidvoidtoSignature(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, toStringMethods inherited from class ghidra.app.util.demangler.DemangledType
getDemangledName, getMangledString, getName, getNamespace, getNamespaceName, getNamespaceString, getOriginalDemangled, getTemplate, isConst, isVolatile, setConst, setName, setNamespace, setTemplate, setVolatileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.app.util.demangler.Demangled
getMangledContext, setMangledContext
-
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:DemangledGenerates a complete representation of this object to include all know attributes of this object- Specified by:
getSignaturein interfaceDemangled- Overrides:
getSignaturein 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:DemangledDataTypeConverts this demangled datatype into the corresponding Ghidra datatype- Overrides:
getDataTypein classDemangledDataType- Parameters:
dataTypeManager- the manager to search and whose data organization should be used- Returns:
- the Ghidra datatype corresponding to the demangled datatype
-