Package ghidra.program.model.symbol
Interface EquateTable
- All Known Implementing Classes:
EquateManager
public interface EquateTable
EquateTable manages all equates for program. An equate defines a relationship
between a scalar value and a string whereby the scalar may be represented by
the string. All equates are defined by the user and remain until explicitly
removed by the user.
-
Method Summary
Modifier and TypeMethodDescriptioncreateEquate
(String name, long value) Creates a new equatevoid
deleteAddressRange
(Address start, Address end, TaskMonitor monitor) Removes all equates defined in the given range.Returns the first equate found that is associated with the given value at the given reference address and operand position;Returns the equate with the given name, null if no such equate existsReturns an address iterator over all the addresses where equates have been set.getEquateAddresses
(Address start) Return an address iterator over each address with an equate reference starting at the start address.Return an address iterator over each address with an equate reference that is in the specified address set.Returns an iterator over all equates.getEquates
(long value) Returns all equates defined for value.getEquates
(Address reference) Returns the equates (one for each scalar and opIndex) at the given reference address.getEquates
(Address reference, int opndPosition) Returns the equates (one for each scalar) at the given reference address and operand position; For an instruction a given operand can have multiple scalars.boolean
removeEquate
(String name) Removes the equate from the program.
-
Method Details
-
createEquate
Creates a new equate- Parameters:
name
- the name to associate with the given value.value
- the value to associate with the given name.- Returns:
- the equate
- Throws:
DuplicateNameException
- thrown if name is already in use as an equate.InvalidInputException
- if name contains blank characters, is zero length, or is null
-
removeEquate
Removes the equate from the program.- Parameters:
name
- the name of the equate to remove.- Returns:
- true if the equate existed, false otherwise.
-
deleteAddressRange
Removes all equates defined in the given range.- Parameters:
start
- start of the rangeend
- end of the rangemonitor
- task monitor to cancel the remove operation- Throws:
CancelledException
- if the operation was cancelled.
-
getEquate
Returns the equate with the given name, null if no such equate exists- Parameters:
name
- the of the equate to be retrieved- Returns:
- the equate
-
getEquate
Returns the first equate found that is associated with the given value at the given reference address and operand position;- Parameters:
reference
- address where the equate is used.opndPosition
- the operand index of the operand where the equate is used.value
- the value where the equate is used.- Returns:
- the equate or null if there is no such equate.
-
getEquates
Returns the equates (one for each scalar) at the given reference address and operand position; For an instruction a given operand can have multiple scalars.- Parameters:
reference
- address where the equate is used.opndPosition
- the operand index of the operand where the equate is used.- Returns:
- the list of equates or empty list if there is no such equate.
-
getEquates
Returns the equates (one for each scalar and opIndex) at the given reference address. For an instruction a given operand can have multiple scalars.- Parameters:
reference
- address where the equate is used.- Returns:
- the list of equates or empty list if there is no such equate.
-
getEquateAddresses
AddressIterator getEquateAddresses()Returns an address iterator over all the addresses where equates have been set.- Returns:
- the iterator
-
getEquates
Returns all equates defined for value.- Parameters:
value
- the value to get all equates for.- Returns:
- the equates
-
getEquates
Returns an iterator over all equates.- Returns:
- the iterator
-
getEquateAddresses
Return an address iterator over each address with an equate reference starting at the start address.- Parameters:
start
- start address- Returns:
- an AddressIterator over addresses with defined equate references
-
getEquateAddresses
Return an address iterator over each address with an equate reference that is in the specified address set.- Parameters:
asv
- the address set- Returns:
- AddressIterator over addresses with defined equate references
-