Package ghidra.app.util.demangler
Class DemangledString
- java.lang.Object
-
- ghidra.app.util.demangler.DemangledObject
-
- ghidra.app.util.demangler.DemangledString
-
public class DemangledString extends DemangledObject
-
-
Field Summary
-
Fields inherited from class ghidra.app.util.demangler.DemangledObject
basedName, EMPTY_STRING, isRestrict, isStatic, isThunk, isUnaligned, isVirtual, memberScope, namespace, NAMESPACE_SEPARATOR, originalMangled, SPACE, SPACE_PATTERN, specialMidfix, specialPrefix, specialSuffix, storageClass, utilDemangled, visibility
-
-
Constructor Summary
Constructors Constructor Description DemangledString(java.lang.String name, java.lang.String string, int length, boolean unicode)
Construct demangled string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applyTo(Program program, Address address, DemanglerOptions options, TaskMonitor monitor)
int
getLength()
Returns the length in bytes of the demangled string.java.lang.String
getSignature(boolean format)
Returns a complete signature for the demangled symbol.java.lang.String
getString()
Returns the demangled string.boolean
isUnicode()
Returns true if the demangled string is unicode.-
Methods inherited from class ghidra.app.util.demangler.DemangledObject
applyDemangledName, applyDemangledName, createClassStructure, createNamespace, ensureNameLength, generatePlateComment, getBasedName, getDemangledName, getMemberScope, getName, getNamespace, getSpecialMidfix, getSpecialPrefix, getSpecialSuffix, getStorageClass, getUtilDemangled, getVisibility, isAlreadyDemangled, isConst, isPointer64, isRestrict, isStatic, isThunk, isUnaligned, isVirtual, isVolatile, pad, setBasedName, setConst, setMemberScope, setName, setNamespace, setOriginalMangled, setPointer64, setRestrict, setSignature, setSpecialMidfix, setSpecialPrefix, setSpecialSuffix, setStatic, setStorageClass, setThunk, setUnaligned, setUtilDemangled, setVirtual, setVisibilty, setVolatile, toString
-
-
-
-
Constructor Detail
-
DemangledString
public DemangledString(java.lang.String name, java.lang.String string, int length, boolean unicode)
Construct demangled string.- Parameters:
name
- name associated with this objectstring
- string text associated with this object or null. This is used to establish label and plate comment if specified. If null, name will be used as symbol name.length
- length of string or -1. Actual string data type applied currently assumes null terminated string.unicode
- true if string is a Unicode string.
-
-
Method Detail
-
getSignature
public java.lang.String getSignature(boolean format)
Description copied from class:DemangledObject
Returns a complete signature for the demangled symbol. For example: "unsigned long foo" "unsigned char * ClassA::getFoo(float, short *)" "void * getBar(int **, MyStruct &)" Note: based on the underlying mangling scheme, the return type may or may not be specified in the signature.- Specified by:
getSignature
in classDemangledObject
- Parameters:
format
- true if signature should be pretty printed- Returns:
- a complete signature for the demangled symbol
-
applyTo
public boolean applyTo(Program program, Address address, DemanglerOptions options, TaskMonitor monitor) throws java.lang.Exception
- Overrides:
applyTo
in classDemangledObject
- Throws:
java.lang.Exception
-
getString
public java.lang.String getString()
Returns the demangled string.- Returns:
- the demangled string
-
getLength
public int getLength()
Returns the length in bytes of the demangled string.- Returns:
- the length in bytes of the demangled string
-
isUnicode
public boolean isUnicode()
Returns true if the demangled string is unicode.- Returns:
- true if the demangled string is unicode
-
-