Package ghidra.trace.database.program
Class DBTraceProgramViewEquateTable
java.lang.Object
ghidra.trace.database.program.DBTraceProgramViewEquateTable
- All Implemented Interfaces:
EquateTable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<DBTraceEquate, DBTraceProgramViewEquate> protected final DBTraceEquateManagerprotected final DBTraceProgramView -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEquate(String name, long value) Creates a new equatevoiddeleteAddressRange(Address start, Address end, TaskMonitor monitor) Removes all equates defined in the given range.protected DBTraceProgramViewEquatedoGetViewEquate(DBTraceEquate equate) 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.booleanremoveEquate(String name) Removes the equate from the program.
-
Field Details
-
program
-
equateManager
-
cache
-
-
Constructor Details
-
DBTraceProgramViewEquateTable
-
-
Method Details
-
createEquate
public Equate createEquate(String name, long value) throws DuplicateNameException, InvalidInputException Description copied from interface:EquateTableCreates a new equate- Specified by:
createEquatein interfaceEquateTable- 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
Description copied from interface:EquateTableRemoves the equate from the program.- Specified by:
removeEquatein interfaceEquateTable- Parameters:
name- the name of the equate to remove.- Returns:
- true if the equate existed, false otherwise.
-
deleteAddressRange
public void deleteAddressRange(Address start, Address end, TaskMonitor monitor) throws CancelledException Description copied from interface:EquateTableRemoves all equates defined in the given range.- Specified by:
deleteAddressRangein interfaceEquateTable- Parameters:
start- start of the rangeend- end of the rangemonitor- task monitor to cancel the remove operation- Throws:
CancelledException- if the operation was cancelled.
-
doGetViewEquate
-
getEquate
Description copied from interface:EquateTableReturns the equate with the given name, null if no such equate exists- Specified by:
getEquatein interfaceEquateTable- Parameters:
name- the of the equate to be retrieved- Returns:
- the equate
-
getEquate
Description copied from interface:EquateTableReturns the first equate found that is associated with the given value at the given reference address and operand position;- Specified by:
getEquatein interfaceEquateTable- 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
Description copied from interface:EquateTableReturns the equates (one for each scalar) at the given reference address and operand position; For an instruction a given operand can have multiple scalars.- Specified by:
getEquatesin interfaceEquateTable- 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
Description copied from interface:EquateTableReturns the equates (one for each scalar and opIndex) at the given reference address. For an instruction a given operand can have multiple scalars.- Specified by:
getEquatesin interfaceEquateTable- Parameters:
reference- address where the equate is used.- Returns:
- the list of equates or empty list if there is no such equate.
-
getEquateAddresses
Description copied from interface:EquateTableReturns an address iterator over all the addresses where equates have been set.- Specified by:
getEquateAddressesin interfaceEquateTable- Returns:
- the iterator
-
getEquates
Description copied from interface:EquateTableReturns all equates defined for value.- Specified by:
getEquatesin interfaceEquateTable- Parameters:
value- the value to get all equates for.- Returns:
- the equates
-
getEquates
Description copied from interface:EquateTableReturns an iterator over all equates.- Specified by:
getEquatesin interfaceEquateTable- Returns:
- the iterator
-
getEquateAddresses
Description copied from interface:EquateTableReturn an address iterator over each address with an equate reference starting at the start address.- Specified by:
getEquateAddressesin interfaceEquateTable- Parameters:
start- start address- Returns:
- an AddressIterator over addresses with defined equate references
-
getEquateAddresses
Description copied from interface:EquateTableReturn an address iterator over each address with an equate reference that is in the specified address set.- Specified by:
getEquateAddressesin interfaceEquateTable- Parameters:
asv- the address set- Returns:
- AddressIterator over addresses with defined equate references
-