Package ghidra.program.model.symbol
Class ThunkReference
- java.lang.Object
-
- ghidra.program.model.symbol.ThunkReference
-
- All Implemented Interfaces:
DynamicReference,Reference,java.lang.Comparable<Reference>
public class ThunkReference extends java.lang.Object implements DynamicReference
Implementation for a Thunk Function reference. These references are dynamic in nature and may not be explicitly added, removed or altered. There presence is inferred by the existence of a thunk function.
-
-
Constructor Summary
Constructors Constructor Description ThunkReference(Address thunkAddr, Address thunkedAddr)Thunk reference constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Reference ref)booleanequals(java.lang.Object obj)AddressgetFromAddress()Get the address of the codeunit that is making the reference.intgetOperandIndex()Get the operand index of where this reference was placed.RefTypegetReferenceType()Get the type of reference being made.SourceTypegetSource()Gets the source of this reference.longgetSymbolID()Get the symbol ID associated with this reference.AddressgetToAddress()Get the "to" address for this reference.booleanisEntryPointReference()Returns true if this reference is an instance of EntryReference.booleanisExternalReference()Returns true if this reference is an instance of ExternalReference.booleanisMemoryReference()Returns true if this reference to an address in the programs memory space.booleanisMnemonicReference()Return true if this reference is on the Mnemonic and not on an operandbooleanisOffsetReference()Returns true if this reference is an instance of OffsetReference.booleanisOperandReference()Return true if this reference is on an operand and not on the Mnemonic.booleanisPrimary()Return whether this reference is marked as primary.booleanisRegisterReference()Returns true if this reference to an address in the programs register space.booleanisShiftedReference()Returns true if this reference is an instance of ShiftedReference.booleanisStackReference()Returns true if this reference is an instance of StackReference and refers to a stack location.
-
-
-
Method Detail
-
getFromAddress
public Address getFromAddress()
Description copied from interface:ReferenceGet the address of the codeunit that is making the reference.- Specified by:
getFromAddressin interfaceReference- See Also:
Reference.getFromAddress()
-
getToAddress
public Address getToAddress()
Description copied from interface:ReferenceGet the "to" address for this reference.- Specified by:
getToAddressin interfaceReference- See Also:
Reference.getToAddress()
-
isPrimary
public boolean isPrimary()
Description copied from interface:ReferenceReturn whether this reference is marked as primary.- Specified by:
isPrimaryin interfaceReference- See Also:
Reference.isPrimary()
-
getSymbolID
public long getSymbolID()
Description copied from interface:ReferenceGet the symbol ID associated with this reference.- Specified by:
getSymbolIDin interfaceReference- Returns:
- symbol ID or -1 if no symbol is associated with this reference
- See Also:
Reference.getSymbolID()
-
getReferenceType
public RefType getReferenceType()
Description copied from interface:ReferenceGet the type of reference being made.- Specified by:
getReferenceTypein interfaceReference- See Also:
Reference.getReferenceType()
-
getOperandIndex
public int getOperandIndex()
Description copied from interface:ReferenceGet the operand index of where this reference was placed.- Specified by:
getOperandIndexin interfaceReference- Returns:
- op index or ReferenceManager.MNEMONIC
- See Also:
Reference.getOperandIndex()
-
isMnemonicReference
public boolean isMnemonicReference()
Description copied from interface:ReferenceReturn true if this reference is on the Mnemonic and not on an operand- Specified by:
isMnemonicReferencein interfaceReference- See Also:
Reference.isMnemonicReference()
-
isOperandReference
public boolean isOperandReference()
Description copied from interface:ReferenceReturn true if this reference is on an operand and not on the Mnemonic.- Specified by:
isOperandReferencein interfaceReference- See Also:
Reference.isOperandReference()
-
compareTo
public int compareTo(Reference ref)
- Specified by:
compareToin interfacejava.lang.Comparable<Reference>- See Also:
Comparable.compareTo(Object)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(Object)
-
isExternalReference
public boolean isExternalReference()
Description copied from interface:ReferenceReturns true if this reference is an instance of ExternalReference.- Specified by:
isExternalReferencein interfaceReference- See Also:
Reference.isExternalReference()
-
isOffsetReference
public boolean isOffsetReference()
Description copied from interface:ReferenceReturns true if this reference is an instance of OffsetReference.- Specified by:
isOffsetReferencein interfaceReference- See Also:
Reference.isOffsetReference()
-
isShiftedReference
public boolean isShiftedReference()
Description copied from interface:ReferenceReturns true if this reference is an instance of ShiftedReference.- Specified by:
isShiftedReferencein interfaceReference- See Also:
Reference.isShiftedReference()
-
isEntryPointReference
public boolean isEntryPointReference()
Description copied from interface:ReferenceReturns true if this reference is an instance of EntryReference.- Specified by:
isEntryPointReferencein interfaceReference- See Also:
Reference.isEntryPointReference()
-
isMemoryReference
public boolean isMemoryReference()
Description copied from interface:ReferenceReturns true if this reference to an address in the programs memory space. This includes offset and shifted references.- Specified by:
isMemoryReferencein interfaceReference- See Also:
Reference.isMemoryReference()
-
isRegisterReference
public boolean isRegisterReference()
Description copied from interface:ReferenceReturns true if this reference to an address in the programs register space.- Specified by:
isRegisterReferencein interfaceReference- See Also:
Reference.isRegisterReference()
-
isStackReference
public boolean isStackReference()
Description copied from interface:ReferenceReturns true if this reference is an instance of StackReference and refers to a stack location.- Specified by:
isStackReferencein interfaceReference- See Also:
Reference.isStackReference()
-
getSource
public SourceType getSource()
Description copied from interface:ReferenceGets the source of this reference.SourceTypes
-
-