Package ghidra.app.util.demangler
Class DemangledString
java.lang.Object
ghidra.app.util.demangler.DemangledObject
ghidra.app.util.demangler.DemangledString
- All Implemented Interfaces:
Demangled
-
Field Summary
Fields inherited from class ghidra.app.util.demangler.DemangledObject
basedName, EMPTY_STRING, isRestrict, isStatic, isThunk, isUnaligned, isVirtual, mangled, memberScope, namespace, NAMESPACE_SEPARATOR, originalDemangled, SPACE, SPACE_PATTERN, specialPrefix, storageClass, visibility
-
Constructor Summary
ConstructorDescriptionDemangledString
(String mangled, String originalDemangled, String name, String string, int length, boolean unicode) Construct demangled string. -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyTo
(Program program, Address address, DemanglerOptions options, TaskMonitor monitor) Apply this demangled object detail to the specified program.int
Returns the length in bytes of the demangled string.getSignature
(boolean format) Returns a complete signature for the demangled symbol.Returns the demangled string.boolean
Returns true if the demangled string is unicode.Methods inherited from class ghidra.app.util.demangler.DemangledObject
applyDemangledName, applyDemangledName, applyPlateCommentOnly, createNamespace, demangledNameSuccessfully, ensureNameLength, generatePlateComment, getBasedName, getDemangledName, getErrorMessage, getMangledString, getMemberScope, getName, getNamespace, getNamespaceName, getNamespaceString, getOriginalDemangled, getSignature, getSpecialPrefix, getStorageClass, getVisibility, isAlreadyDemangled, isConst, isPointer64, isRestrict, isStatic, isThunk, isUnaligned, isVirtual, isVolatile, setBackupPlateComment, setBasedName, setConst, setErrorMessage, setMemberScope, setName, setNamespace, setOriginalDemangled, setPointer64, setRestrict, setSpecialPrefix, setStatic, setStorageClass, setThunk, setUnaligned, setVirtual, setVisibilty, setVolatile, toString
-
Constructor Details
-
DemangledString
public DemangledString(String mangled, String originalDemangled, String name, String string, int length, boolean unicode) Construct demangled string.- Parameters:
mangled
- the source mangled stringoriginalDemangled
- the original demangled stringname
- 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 Details
-
getSignature
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 Exception Description copied from class:DemangledObject
Apply this demangled object detail to the specified program.
NOTE: An open Program transaction must be established prior to invoking this method.- Overrides:
applyTo
in classDemangledObject
- Parameters:
program
- program to which demangled data should be applied.address
- address which corresponds to this demangled objectoptions
- options which control how demangled data is appliedmonitor
- task monitor- Returns:
- true if successfully applied, else false
- Throws:
Exception
- if an error occurs during the apply operation
-
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
-