Package ghidra.program.database.symbol
Class EquateDB
java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.program.database.symbol.EquateDB
- All Implemented Interfaces:
- Equate
Database object for an Equate.
- 
Field SummaryFields inherited from class ghidra.program.database.DatabaseObjectkey
- 
Constructor SummaryConstructorsConstructorDescriptionEquateDB(EquateManager equateMgr, DBObjectCache<EquateDB> cache, DBRecord record) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddReference(long dynamicHash, Address refAddr) Add a reference (at the given dynamic hash position) to this equate.voidaddReference(Address refAddr, int opIndex) Add a reference (at the given operand position) to this equate.booleanGets the "display name" of this equate.Gets a more accurate representation of the equate value.Gets the universal id from this equate if the equate was based off of an enum.getName()Get the actual name of this equate.intGet the number of references to this equate.Get the references for this equate.getReferences(Address refAddr) Get references for this equate attached to a specific addresslonggetValue()Get the value of this equate.inthashCode()booleanChecks if equate is based off an enum's universal id.booleanChecks if equate is based off an enum's universal id and checks if the enum still exists.protected booleanrefresh()Tells the object to refresh its state from the database.voidremoveReference(long dynamicHash, Address refAddr) Remove the reference at the given addressvoidremoveReference(Address refAddr, int opIndex) Remove the reference at the given operand position.voidrenameEquate(String newName) Changes the name associated with the equate.toString()Get the name of this equate.Methods inherited from class ghidra.program.database.DatabaseObjectcheckDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, refresh, setDeleted, setInvalid, validate
- 
Constructor Details- 
EquateDBConstructor- Parameters:
- equateMgr- the equate manager
- cache- EquateDB cache
- record- the record for this equate.
 
 
- 
- 
Method Details- 
refreshprotected boolean refresh()Description copied from class:DatabaseObjectTells the object to refresh its state from the database.- Specified by:
- refreshin class- DatabaseObject
- Returns:
- true if the object was able to refresh itself. Return false if the object was deleted. Objects that extend this class must implement a refresh method. If an object can never refresh itself, then it should always return false.
 
- 
addReferenceDescription copied from interface:EquateAdd a reference (at the given operand position) to this equate. If a reference already exists for the instruction at this address, then the old reference will be removed before the new reference is added.- Specified by:
- addReferencein interface- Equate
- Parameters:
- refAddr- the address where the equate is used.
- opIndex- the operand index where the equate is used.
 
- 
addReferenceDescription copied from interface:EquateAdd a reference (at the given dynamic hash position) to this equate. If a reference already exists for the instruction at this address, then the old reference will be removed before the new reference is added.- Specified by:
- addReferencein interface- Equate
- Parameters:
- dynamicHash- constant varnode dynamic hash value
- refAddr- the address where the equate is used.
 
- 
getNameDescription copied from interface:EquateGet the actual name of this equate. Note that this name may be different than the "display name," which is what the user will see.
- 
getDisplayNameDescription copied from interface:EquateGets the "display name" of this equate. Note that the display name may be different than the equate's actual name if the equate is based off a data type id.- Specified by:
- getDisplayNamein interface- Equate
- Returns:
- The "display name" of this equate.
 
- 
getEnumUUIDDescription copied from interface:EquateGets the universal id from this equate if the equate was based off of an enum.- Specified by:
- getEnumUUIDin interface- Equate
- Returns:
- The universal id for this equate.
 
- 
getReferenceCountpublic int getReferenceCount()Description copied from interface:EquateGet the number of references to this equate.- Specified by:
- getReferenceCountin interface- Equate
 
- 
getReferencesDescription copied from interface:EquateGet the references for this equate.- Specified by:
- getReferencesin interface- Equate
- Returns:
- a array of EquateReferences.
 
- 
getReferencesDescription copied from interface:EquateGet references for this equate attached to a specific address- Specified by:
- getReferencesin interface- Equate
- Parameters:
- refAddr- is the address
- Returns:
- the list of EquateReferences
 
- 
getValuepublic long getValue()Description copied from interface:EquateGet the value of this equate.
- 
getDisplayValueDescription copied from interface:EquateGets a more accurate representation of the equate value. Used for rendering as close to the listing as possible.- Specified by:
- getDisplayValuein interface- Equate
- Returns:
- A more accurate representation of the equate value.
 
- 
removeReferenceDescription copied from interface:EquateRemove the reference at the given operand position.- Specified by:
- removeReferencein interface- Equate
- Parameters:
- refAddr- the address that was using this equate
- opIndex- the operand index of the operand that was using this eqate.
 
- 
removeReferenceDescription copied from interface:EquateRemove the reference at the given address- Specified by:
- removeReferencein interface- Equate
- Parameters:
- dynamicHash- the hash of the reference
- refAddr- the reference's address
 
- 
renameEquateDescription copied from interface:EquateChanges the name associated with the equate.- Specified by:
- renameEquatein interface- Equate
- Parameters:
- newName- the new name for this equate.
- Throws:
- DuplicateNameException- thrown if newName is already used by another equate.
- InvalidInputException- if newName contains blank characters, is zero length, or is null
 
- 
isValidUUIDpublic boolean isValidUUID()Description copied from interface:EquateChecks if equate is based off an enum's universal id and checks if the enum still exists. The equate is still valid if the equate is not based off an enum.- Specified by:
- isValidUUIDin interface- Equate
- Returns:
- true if the equate is based off an enum that still exists.
 
- 
isEnumBasedpublic boolean isEnumBased()Description copied from interface:EquateChecks if equate is based off an enum's universal id.- Specified by:
- isEnumBasedin interface- Equate
- Returns:
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toStringDescription copied from interface:EquateGet the name of this equate.
 
-