Class ReferenceDBManager
- java.lang.Object
-
- ghidra.program.database.references.ReferenceDBManager
-
- All Implemented Interfaces:
ErrorHandler,ManagerDB,ReferenceManager
public class ReferenceDBManager extends java.lang.Object implements ReferenceManager, ManagerDB, ErrorHandler
Reference manager implementation for the database.
-
-
Field Summary
-
Fields inherited from interface ghidra.program.model.symbol.ReferenceManager
MNEMONIC
-
-
Constructor Summary
Constructors Constructor Description ReferenceDBManager(DBHandle dbHandle, AddressMap addrMap, int openMode, Lock lock, TaskMonitor monitor)Construct a new reference manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExternalEntryPointRef(Address toAddr)Create a memory reference to the given address to mark it as an external entry point.ReferenceaddExternalReference(Address fromAddr, int opIndex, ExternalLocation location, SourceType sourceType, RefType type)Adds an external reference.ReferenceaddExternalReference(Address fromAddr, Namespace extNamespace, java.lang.String extLabel, Address extAddr, SourceType sourceType, int opIndex, RefType type)Adds an external reference.ReferenceaddExternalReference(Address fromAddr, java.lang.String libraryName, java.lang.String extLabel, Address extAddr, SourceType sourceType, int opIndex, RefType type)Adds an external reference.ReferenceaddMemoryReference(Address fromAddr, Address toAddr, RefType type, SourceType sourceType, int opIndex)Adds a memory reference.ReferenceaddOffsetMemReference(Address fromAddr, Address toAddr, long offset, RefType type, SourceType sourceType, int opIndex)Add an offset memory reference.ReferenceaddReference(Reference ref)Add a memory, stack, register or external referenceReferenceaddRegisterReference(Address fromAddr, int opIndex, Register register, RefType type, SourceType sourceType)Add a reference to a register.ReferenceaddShiftedMemReference(Address fromAddr, Address toAddr, int shiftValue, RefType type, SourceType sourceType, int opIndex)Add a shifted memory reference; the "to" address is computed as the value at the operand at opIndex shifted by some number of bits, specified in the shiftValue parameter.ReferenceaddStackReference(Address fromAddr, int opIndex, int stackOffset, RefType type, SourceType sourceType)Add a reference to a stack location.voiddbError(java.io.IOException e)Notification that an IO exception occurred.voiddelete(Reference ref)Deletes the given reference objectvoiddeleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor)Delete all objects which have been applied to the address range startAddr to endAddr and update the database accordingly.AddressIteratorgetExternalEntryIterator()ReferenceIteratorgetExternalReferences()Returns an iterator over all external referencesReference[]getFlowReferencesFrom(Address addr)Get the flow references from the given address.ReferencegetPrimaryReferenceFrom(Address addr, int opIndex)Get the primary reference from the given address.ReferencegetReference(Address fromAddr, Address toAddr, int opIndex)Get the reference that has the given from and to address, and operand index.intgetReferenceCountFrom(Address fromAddr)Returns the number of memory References from the specifiedfromAddrintgetReferenceCountTo(Address toAddr)Returns the number of memory References to the specifiedtoAddrintgetReferenceDestinationCount()Return the number of references for "to" addresses.AddressIteratorgetReferenceDestinationIterator(Address startAddr, boolean forward)Returns an iterator over all addresses that are the "To" address in a reference.AddressIteratorgetReferenceDestinationIterator(AddressSetView addrSet, boolean forward)Returns an iterator over all addresses that are the "To" address in a memory reference, restricted by the given address set.VariablegetReferencedVariable(Reference reference)Attempts to determine which if any of the local functions variables are referenced by the specified reference.ReferenceIteratorgetReferenceIterator(Address startAddr)Get an iterator over references starting with the specified fromAddr.bytegetReferenceLevel(Address toAddr)Returns the reference level for the references to the given addressReference[]getReferencesFrom(Address addr)Get all references "from" the specified addr.Reference[]getReferencesFrom(Address fromAddr, int opIndex)Returns all references "from" the given fromAddr and operand (specified by opIndex).intgetReferenceSourceCount()Return the number of references for "from" addresses.AddressIteratorgetReferenceSourceIterator(Address startAddr, boolean forward)Returns an iterator over addresses that are the "From" address in a referenceAddressIteratorgetReferenceSourceIterator(AddressSetView addrSet, boolean forward)Returns an iterator over all addresses that are the "From" address in a reference, restricted by the given address set.ReferenceIteratorgetReferencesTo(Address addr)Get an iterator over all references that have the given address as their "To" address.Reference[]getReferencesTo(Variable var)Attempts to determine the set of references which refer to the specified variable.booleanhasFlowReferencesFrom(Address addr)Return whether the given address has flow references from this address.booleanhasReferencesFrom(Address fromAddr)Returns true if there are any memory references at the given address.booleanhasReferencesFrom(Address fromAddr, int opIndex)Returns true if there are any memory references at the given address/opIndex.booleanhasReferencesTo(Address toAddr)Return true if a memory reference exists with the given "to" address.voidinvalidateCache(boolean all)Clears all data caches.booleanisExternalEntryPoint(Address toAddr)Return whether the address is an external entry pointvoidmoveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor)Move all objects within an address range to a new location.intmoveReferencesTo(Address oldToAddr, Address newToAddr, TaskMonitor monitor)Move all references to the specified oldAddr.voidprogramReady(int openMode, int currentRevision, TaskMonitor monitor)Callback from program made to each manager after the program has completed initialization.voidremoveAllReferencesFrom(Address fromAddr)Remove all stack, external, and memory references for the given from address.voidremoveAllReferencesFrom(Address beginAddr, Address endAddr)Removes all references where "From address" is in the given range.voidremoveAllReferencesTo(Address toAddr)Remove all stack, external, and memory references for the given to address.voidremoveAssociation(Reference ref)Removes any symbol associations with the given reference.voidremoveExternalEntryPoint(Address addr)Removes the external entry point at the given addressvoidsetAssociation(Symbol s, Reference ref)Associates the given reference with the given symbol.voidsetPrimary(Reference ref, boolean isPrimary)Set the given reference's primary attributevoidsetProgram(ProgramDB program)Callback from program used to indicate all manager have been created.voidsymbolAdded(Symbol sym)Symbol has been addedvoidsymbolRemoved(Symbol symbol)Symbol is about to be removedReferenceupdateRefType(Reference ref, RefType refType)Uodate the reference type on a memory reference.
-
-
-
Constructor Detail
-
ReferenceDBManager
public ReferenceDBManager(DBHandle dbHandle, AddressMap addrMap, int openMode, Lock lock, TaskMonitor monitor) throws CancelledException, java.io.IOException, VersionException
Construct a new reference manager.- Parameters:
dbHandle- handle to the databaseaddrMap- map to convert addresses to longs and longs to addressesopenMode- one of ProgramDB.CREATE, UPDATE, UPGRADE, or READ_ONLYlock- the program synchronization lockmonitor- Task monitor for upgrading- Throws:
CancelledException- if the user cancels the loading of this dbjava.io.IOException- if a database io error occurs.VersionException- if the database version is different from the expected version
-
-
Method Detail
-
setProgram
public void setProgram(ProgramDB program)
Description copied from interface:ManagerDBCallback from program used to indicate all manager have been created. When this method is invoked, all managers have been instantiated but may not be fully initialized.- Specified by:
setProgramin interfaceManagerDB- Parameters:
program- the program is set when all the initializations have been completed.
-
programReady
public void programReady(int openMode, int currentRevision, TaskMonitor monitor) throws java.io.IOException, CancelledExceptionDescription copied from interface:ManagerDBCallback from program made to each manager after the program has completed initialization. This method may be used by managers to perform additional upgrading which may have been deferred.- Specified by:
programReadyin interfaceManagerDB- Parameters:
openMode- the mode that the program is being opened.currentRevision- current program revision. If openMode is UPGRADE, this value reflects the pre-upgrade value.monitor- the task monitor to use in any upgrade operations.- Throws:
java.io.IOException- if a database io error occurs.CancelledException- if the user cancelled the operation via the task monitor.
-
addMemoryReference
public Reference addMemoryReference(Address fromAddr, Address toAddr, RefType type, SourceType sourceType, int opIndex)
Description copied from interface:ReferenceManagerAdds a memory reference. Only first the first memory reference placed on an operand will be made primary by default. All non-memory references will be removed from the specified operand.- Specified by:
addMemoryReferencein interfaceReferenceManager- Parameters:
fromAddr- address of the codeunit where the reference occurstoAddr- address of the location being referenced. Memory, stack, and register addresses are all permitted.type- reference type - how the location is being referenced.sourceType- the source of this referenceopIndex- the operand index display of the operand making this reference
-
addStackReference
public Reference addStackReference(Address fromAddr, int opIndex, int stackOffset, RefType type, SourceType sourceType)
Description copied from interface:ReferenceManagerAdd a reference to a stack location. If a reference already exists for the fromAddr and opIndex, the existing reference is replaced with the new reference.- Specified by:
addStackReferencein interfaceReferenceManager- Parameters:
fromAddr- "from" address within a functionopIndex- operand indexstackOffset- stack offset of the referencetype- reference type - how the location is being referenced.sourceType- the source of this reference
-
addRegisterReference
public Reference addRegisterReference(Address fromAddr, int opIndex, Register register, RefType type, SourceType sourceType)
Description copied from interface:ReferenceManagerAdd a reference to a register. If a reference already exists for the fromAddr and opIndex, the existing reference is replaced with the new reference.- Specified by:
addRegisterReferencein interfaceReferenceManager- Parameters:
fromAddr- "from" addressopIndex- operand indexregister- register to add the reference totype- reference type - how the location is being referenced.sourceType- the source of this reference
-
addOffsetMemReference
public Reference addOffsetMemReference(Address fromAddr, Address toAddr, long offset, RefType type, SourceType sourceType, int opIndex)
Description copied from interface:ReferenceManagerAdd an offset memory reference. Only first the first memory reference placed on an operand will be made primary by default. All non-memory references will be removed from the specified operand.- Specified by:
addOffsetMemReferencein interfaceReferenceManager- Parameters:
fromAddr- address for the "from"toAddr- address of the "to"offset- value added to a base address to get the toAddrtype- reference type - how the location is being referencedsourceType- the source of this referenceopIndex- the operand index
-
addShiftedMemReference
public Reference addShiftedMemReference(Address fromAddr, Address toAddr, int shiftValue, RefType type, SourceType sourceType, int opIndex)
Description copied from interface:ReferenceManagerAdd a shifted memory reference; the "to" address is computed as the value at the operand at opIndex shifted by some number of bits, specified in the shiftValue parameter. Only first the first memory reference placed on an operand will be made primary by default. All non-memory references will be removed from the specified operand.- Specified by:
addShiftedMemReferencein interfaceReferenceManager- Parameters:
fromAddr- address for the "from"toAddr- computed as the value of the operand at opIndex shifted by the number of bits specified by shiftValuetype- reference type - how the location is being referencedsourceType- the source of this referenceopIndex- the operand index
-
addExternalReference
public Reference addExternalReference(Address fromAddr, int opIndex, ExternalLocation location, SourceType sourceType, RefType type) throws InvalidInputException
Description copied from interface:ReferenceManagerAdds an external reference. If a reference already exists for the fromAddr and opIndex, the existing reference is replaced with the new reference.- Specified by:
addExternalReferencein interfaceReferenceManager- Parameters:
fromAddr- from address (source of the reference)opIndex- operand indexlocation- external locationsourceType- the source of this referencetype- reference type - how the location is being referenced- Returns:
- external reference
- Throws:
InvalidInputException
-
addExternalReference
public Reference addExternalReference(Address fromAddr, java.lang.String libraryName, java.lang.String extLabel, Address extAddr, SourceType sourceType, int opIndex, RefType type) throws InvalidInputException, DuplicateNameException
Description copied from interface:ReferenceManagerAdds an external reference. If a reference already exists for the fromAddr and opIndex, the existing reference is replaced with the new reference.- Specified by:
addExternalReferencein interfaceReferenceManager- Parameters:
fromAddr- from address (source of the reference)libraryName- name of external programextLabel- label within the external program, may be null if extAddr is not nullextAddr- address within the external program, may be nullsourceType- the source of this referenceopIndex- operand indextype- reference type - how the location is being referenced- Throws:
InvalidInputExceptionDuplicateNameException
-
addExternalReference
public Reference addExternalReference(Address fromAddr, Namespace extNamespace, java.lang.String extLabel, Address extAddr, SourceType sourceType, int opIndex, RefType type) throws InvalidInputException, DuplicateNameException
Description copied from interface:ReferenceManagerAdds an external reference. If a reference already exists for the fromAddr and opIndex, the existing reference is replaced with the new reference.- Specified by:
addExternalReferencein interfaceReferenceManager- Parameters:
fromAddr- from address (source of the reference)extNamespace- external namespace containing the named external label.extLabel- label within the external program, may be null if extAddr is not nullextAddr- address within the external program, may be nullsourceType- the source of this referenceopIndex- operand indextype- reference type - how the location is being referenced- Throws:
InvalidInputExceptionDuplicateNameException
-
getReferencedVariable
public Variable getReferencedVariable(Reference reference)
Attempts to determine which if any of the local functions variables are referenced by the specified reference. In utilizing the firstUseOffset scoping model, negative offsets (relative to the functions entry) are shifted beyond the maximum positive offset within the function. While this does not account for the actual instruction flow, it is hopefully accurate enough for most situations.- Specified by:
getReferencedVariablein interfaceReferenceManager- Returns:
- function variable or null if variable not found
- See Also:
ReferenceManager.getReferencedVariable(ghidra.program.model.symbol.Reference)
-
getReferencesTo
public Reference[] getReferencesTo(Variable var)
Attempts to determine the set of references which refer to the specified variable. In utilizing the firstUseOffset scoping model, negative offsets (relative to the functions entry) are shifted beyond the maximum positive offset within the function. While this does not account for the actual instruction flow, it is hopefully accurate enough for most situations.- Specified by:
getReferencesToin interfaceReferenceManager- Parameters:
var- variable to retrieve references to- Returns:
- array of variable references, or zero length array if no references exist
- See Also:
ReferenceManager.getReferencesTo(ghidra.program.model.listing.Variable)
-
setPrimary
public void setPrimary(Reference ref, boolean isPrimary)
Description copied from interface:ReferenceManagerSet the given reference's primary attribute- Specified by:
setPrimaryin interfaceReferenceManager- Parameters:
ref- the reference to make primary.isPrimary- true to make the reference primary, false to make it non-primary
-
getReferencesFrom
public Reference[] getReferencesFrom(Address addr)
Description copied from interface:ReferenceManagerGet all references "from" the specified addr.- Specified by:
getReferencesFromin interfaceReferenceManager- Parameters:
addr- address of code-unit making the references.- Returns:
- array of all references "from" the specified addr.
-
getFlowReferencesFrom
public Reference[] getFlowReferencesFrom(Address addr)
Description copied from interface:ReferenceManagerGet the flow references from the given address.- Specified by:
getFlowReferencesFromin interfaceReferenceManager- Parameters:
addr- the address of the codeunit to get all flows from.
-
getReference
public Reference getReference(Address fromAddr, Address toAddr, int opIndex)
Description copied from interface:ReferenceManagerGet the reference that has the given from and to address, and operand index.- Specified by:
getReferencein interfaceReferenceManager- Parameters:
fromAddr- the address of the codeunit making the reference.toAddr- the address being referred to.opIndex- the operand index.
-
getReferenceCountFrom
public int getReferenceCountFrom(Address fromAddr)
Description copied from interface:ReferenceManagerReturns the number of memory References from the specifiedfromAddr- Specified by:
getReferenceCountFromin interfaceReferenceManager- Parameters:
fromAddr- the address of the codeunit making the reference.
-
getReferenceCountTo
public int getReferenceCountTo(Address toAddr)
Description copied from interface:ReferenceManagerReturns the number of memory References to the specifiedtoAddr- Specified by:
getReferenceCountToin interfaceReferenceManager- Parameters:
toAddr- the address being referenced
-
getReferenceDestinationCount
public int getReferenceDestinationCount()
Description copied from interface:ReferenceManagerReturn the number of references for "to" addresses.- Specified by:
getReferenceDestinationCountin interfaceReferenceManager
-
getReferenceSourceCount
public int getReferenceSourceCount()
Description copied from interface:ReferenceManagerReturn the number of references for "from" addresses.- Specified by:
getReferenceSourceCountin interfaceReferenceManager
-
getPrimaryReferenceFrom
public Reference getPrimaryReferenceFrom(Address addr, int opIndex)
Description copied from interface:ReferenceManagerGet the primary reference from the given address.- Specified by:
getPrimaryReferenceFromin interfaceReferenceManager- Parameters:
addr- from addressopIndex- operand index
-
getReferenceDestinationIterator
public AddressIterator getReferenceDestinationIterator(Address startAddr, boolean forward)
Description copied from interface:ReferenceManagerReturns an iterator over all addresses that are the "To" address in a reference.- Specified by:
getReferenceDestinationIteratorin interfaceReferenceManager- Parameters:
startAddr- start of iteratorforward- true means to iterate in the forward direction
-
getReferenceDestinationIterator
public AddressIterator getReferenceDestinationIterator(AddressSetView addrSet, boolean forward)
Description copied from interface:ReferenceManagerReturns an iterator over all addresses that are the "To" address in a memory reference, restricted by the given address set.- Specified by:
getReferenceDestinationIteratorin interfaceReferenceManager- Parameters:
addrSet- the set of address to restrict the iterator or null for all addresses.forward- true means to iterate in the forward direction
-
getReferenceSourceIterator
public AddressIterator getReferenceSourceIterator(Address startAddr, boolean forward)
Description copied from interface:ReferenceManagerReturns an iterator over addresses that are the "From" address in a reference- Specified by:
getReferenceSourceIteratorin interfaceReferenceManager- Parameters:
startAddr- address to position iterator.forward- true means to iterate in the forward direction
-
getReferenceIterator
public ReferenceIterator getReferenceIterator(Address startAddr)
Description copied from interface:ReferenceManagerGet an iterator over references starting with the specified fromAddr. A forward iterator is returned with references sorted on the from address.- Specified by:
getReferenceIteratorin interfaceReferenceManager- Parameters:
startAddr- the first from address to consider.- Returns:
- a forward memory reference iterator.
-
getReferenceSourceIterator
public AddressIterator getReferenceSourceIterator(AddressSetView addrSet, boolean forward)
Description copied from interface:ReferenceManagerReturns an iterator over all addresses that are the "From" address in a reference, restricted by the given address set.- Specified by:
getReferenceSourceIteratorin interfaceReferenceManager- Parameters:
addrSet- the set of address to restrict the iterator or null for all addresses.forward- true means to iterate in the forward direction
-
hasFlowReferencesFrom
public boolean hasFlowReferencesFrom(Address addr)
Description copied from interface:ReferenceManagerReturn whether the given address has flow references from this address.- Specified by:
hasFlowReferencesFromin interfaceReferenceManager- Parameters:
addr- the address to test for flow references.
-
hasReferencesFrom
public boolean hasReferencesFrom(Address fromAddr)
Description copied from interface:ReferenceManagerReturns true if there are any memory references at the given address.- Specified by:
hasReferencesFromin interfaceReferenceManager- Parameters:
fromAddr- the address of the codeunit being tested
-
hasReferencesFrom
public boolean hasReferencesFrom(Address fromAddr, int opIndex)
Description copied from interface:ReferenceManagerReturns true if there are any memory references at the given address/opIndex. Keep in mind this is a rather inefficient method as it must examine all references from the specified fromAddr.- Specified by:
hasReferencesFromin interfaceReferenceManager- Parameters:
fromAddr- the address of the codeunit being testedopIndex- the index of the operand being tested.
-
hasReferencesTo
public boolean hasReferencesTo(Address toAddr)
Description copied from interface:ReferenceManagerReturn true if a memory reference exists with the given "to" address.- Specified by:
hasReferencesToin interfaceReferenceManager- Parameters:
toAddr- address being referred to.
-
removeAllReferencesFrom
public void removeAllReferencesFrom(Address beginAddr, Address endAddr)
Description copied from interface:ReferenceManagerRemoves all references where "From address" is in the given range.- Specified by:
removeAllReferencesFromin interfaceReferenceManager- Parameters:
beginAddr- the first address in the range.endAddr- the last address in the range.
-
removeAllReferencesFrom
public void removeAllReferencesFrom(Address fromAddr)
Description copied from interface:ReferenceManagerRemove all stack, external, and memory references for the given from address.- Specified by:
removeAllReferencesFromin interfaceReferenceManager- Parameters:
fromAddr- the address of the codeunit from which to remove all references.
-
removeAllReferencesTo
public void removeAllReferencesTo(Address toAddr)
Description copied from interface:ReferenceManagerRemove all stack, external, and memory references for the given to address.- Specified by:
removeAllReferencesToin interfaceReferenceManager- Parameters:
toAddr- the address for which all references to should be removed.
-
symbolRemoved
public void symbolRemoved(Symbol symbol)
Symbol is about to be removed- Parameters:
symbol- the symbol that will be removed
-
symbolAdded
public void symbolAdded(Symbol sym)
Symbol has been added- Parameters:
sym- new symbol
-
setAssociation
public void setAssociation(Symbol s, Reference ref)
Description copied from interface:ReferenceManagerAssociates the given reference with the given symbol.- Specified by:
setAssociationin interfaceReferenceManager- Parameters:
s- the symbol to associate with the given reference.ref- the reference to associate with the given symbol
-
removeAssociation
public void removeAssociation(Reference ref)
Description copied from interface:ReferenceManagerRemoves any symbol associations with the given reference.- Specified by:
removeAssociationin interfaceReferenceManager- Parameters:
ref- the reference for which any symbol association is to be removed.
-
updateRefType
public Reference updateRefType(Reference ref, RefType refType)
Description copied from interface:ReferenceManagerUodate the reference type on a memory reference.- Specified by:
updateRefTypein interfaceReferenceManager- Parameters:
ref- reference to be updatedrefType- new reference type
-
getReferencesTo
public ReferenceIterator getReferencesTo(Address addr)
Description copied from interface:ReferenceManagerGet an iterator over all references that have the given address as their "To" address.- Specified by:
getReferencesToin interfaceReferenceManager- Parameters:
addr- the address that all references in the iterator refer to.
-
invalidateCache
public void invalidateCache(boolean all)
Description copied from interface:ManagerDBClears all data caches.- Specified by:
invalidateCachein interfaceManagerDB- Parameters:
all- if false, some managers may not need to update their cache if they can tell that its not necessary. If this flag is true, then all managers should clear their cache no matter what.
-
moveReferencesTo
public int moveReferencesTo(Address oldToAddr, Address newToAddr, TaskMonitor monitor) throws CancelledException, java.io.IOException
Move all references to the specified oldAddr. Any symbol binding will be discarded since these are intended for memory label references only. This method is intended specifically to support upgrading of certain references (i.e., Stack, Register and External addresses). NOTE! After ProgramDB version 12, this method will no longer be useful for upgrading stack and register references since they will not exist within the ReferenceTo-list.- Parameters:
oldToAddr- old reference to addressnewToAddr- new reference to addressmonitor- the monitor- Returns:
- number of references updated
- Throws:
CancelledException- if the task is cancelledjava.io.IOException- if a database exception occurs
-
deleteAddressRange
public void deleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor)
Description copied from interface:ManagerDBDelete all objects which have been applied to the address range startAddr to endAddr and update the database accordingly.- Specified by:
deleteAddressRangein interfaceManagerDB- Parameters:
startAddr- the first address in the range.endAddr- the last address in the range.monitor- the task monitor to use in any upgrade operations.
-
moveAddressRange
public void moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws CancelledException
Description copied from interface:ManagerDBMove all objects within an address range to a new location.- Specified by:
moveAddressRangein interfaceManagerDB- Parameters:
fromAddr- the first address of the range to be moved.toAddr- the address where to the range is to be moved.length- the number of addresses to move.monitor- the task monitor to use in any upgrade operations.- Throws:
CancelledException- if the user cancelled the operation via the task monitor.
-
getReferenceLevel
public byte getReferenceLevel(Address toAddr)
Returns the reference level for the references to the given address- Specified by:
getReferenceLevelin interfaceReferenceManager- Parameters:
toAddr- the address at which to find the highest reference level
-
getExternalEntryIterator
public AddressIterator getExternalEntryIterator()
-
isExternalEntryPoint
public boolean isExternalEntryPoint(Address toAddr)
Return whether the address is an external entry point- Parameters:
toAddr- the address to test for external entry point- Returns:
- true if the address is an external entry point
-
addExternalEntryPointRef
public void addExternalEntryPointRef(Address toAddr)
Create a memory reference to the given address to mark it as an external entry point.- Parameters:
toAddr- the address at which to make an external entry point
-
removeExternalEntryPoint
public void removeExternalEntryPoint(Address addr)
Removes the external entry point at the given address- Parameters:
addr- that address at which to remove the external entry point attribute.
-
dbError
public void dbError(java.io.IOException e)
Description copied from interface:ErrorHandlerNotification that an IO exception occurred.- Specified by:
dbErrorin interfaceErrorHandler
-
delete
public void delete(Reference ref)
Description copied from interface:ReferenceManagerDeletes the given reference object- Specified by:
deletein interfaceReferenceManager- Parameters:
ref- the reference to be deleted.
-
getExternalReferences
public ReferenceIterator getExternalReferences()
Description copied from interface:ReferenceManagerReturns an iterator over all external references- Specified by:
getExternalReferencesin interfaceReferenceManager
-
addReference
public Reference addReference(Reference ref)
Description copied from interface:ReferenceManagerAdd a memory, stack, register or external reference- Specified by:
addReferencein interfaceReferenceManager
-
getReferencesFrom
public Reference[] getReferencesFrom(Address fromAddr, int opIndex)
Description copied from interface:ReferenceManagerReturns all references "from" the given fromAddr and operand (specified by opIndex).- Specified by:
getReferencesFromin interfaceReferenceManager- Parameters:
fromAddr- the from which to get referencesopIndex- the operand from which to get references- Returns:
- all references "from" the given fromAddr and operand.
-
-